All notable changes to TeaAgent are tracked here.
-
EFX durable-effect governance guards (
87d1c61,26e80d4,62ddf99):external_effecttool annotation: GitHub PR create/review, browser navigate/click/fill/evaluate, and ALL remote MCP tools fail closed in read-only/workspace-write and require approval in prompt mode; remotereadOnlyHint/destructiveHinthints are untrusted (EFX-002).- Unmatched mutating-tool starts checkpoint
pending_effectbefore execute; resume surfacesOUTCOME_UNKNOWNwithretry_safe=falseand refuses blind non-idempotent redispatch (EFX-001). - One-time JIT approvals bind a canonical payload digest and are consumed at authorization — changed arguments cannot replay a grant; omitted call IDs derive digest-suffixed identities (EFX-003).
- Providerless acceptance:
tests/acceptance/test_efx_durable_effect_flow.py(acceptance guard now 669).
-
Approval/ops surface (
839a847,39fd5a8,2684b31):daily/preflightwarn whenGITHUB_TOKEN/GH_TOKENare ambient.- High-risk-path commits:
TEAAGENT_RISK_ACKmust cite an existingdocs/reviews/*-risk.md(ref <report>: <reason>). - Session-approved tools skip redundant payload hashing on the approval hot path.
-
Tests/docs hardening (
b48d773..f8c8233): hermetic skill-diagnostics, GitHub no-token, and resume-prep tests; mutation-smoke registry realigned with both-flag killer tests; release checklist mandates recorded full-suite evidence (latest: 6668 passed / 0 failed / 25 skipped, coverage 78.37%); docs aging cleared to zero stale; Effect Authority vocabulary added to the terminology guide; CLI command-group roster drift-guarded. -
Whole-project lens review adoption (G-P2-9): use-cases market-standard table repaired to its 5 real columns; maturity-matrix acceptance posture refreshed (131 files / 669 collected) and drift-guarded; North-Star G1–G6 status table added to roadmap-status with G3 recorded as rescoped (M4/M5 work-logs); product-contract permission bullet names EFX-002 fail-closed external-effect gating; dormant-surface deletion trigger lane added to the execution plan; panel record with C1–C6 adoption ledger in
docs/analysis/whole-project-lens-review-2026-08-26.md. -
ADR-0031 H4 evidence packet prepared (G-P2-10): ran all five Phase 2 evidence scripts; criteria 2 (coverage: 0 gaps), 3 (performance: median 0.50 ms < 50 ms threshold), 5 (rollback: ok) pass; criterion 1 (shadow window: 0 observed
h4_governance_shadowevents in 1391 audit logs) and criterion 4 (human sign-off) remain open;promotion_ready=false. Evidence stored at.teaagent/reviews/adr-0031/; roadmap-status H4 row and execution plan §6.1.1 updated with results. -
Plan execution batch (system-transparency / comprehensive plans):
teaagent.async_bridge.run_coroutine_sync— approval/multisig paths no longer callasyncio.set_event_loop(ADR 009).- ACP stdio loop emits JSON-RPC errors instead of swallowing exceptions.
- Audit L3 docstring corrected (plaintext, not encrypted at rest).
- Code-analysis graph LRU cache (
_MAX_GRAPH_CACHE=8) andclear_graph_cache(). ChildProcessCodeModeBackend.trusted_onlygate for untrusted workloads.scripts/verify_docs.shlocal docs gate; plan status table in engineering plan.- Tests:
test_acp_adapter_error_response,test_approval_async_from_sync,test_code_analysis_graph_cache,test_code_mode_trusted_only,test_policy_denial_reason_code_flow.
-
Denial reason codes and transparency CLI:
DenialReasonCodeenum and optionalreason_codeonToolPermissionError— maps denials to read-only mode, workspace-write mode, plan contract, JIT, multi-sig quorum, and related paths.- Audit events
tool_call_denied,tool_call_blocked, andtool_call_pending_approvalmay includereason_codein the payload. teaagent approval why-denied <run_id>lists denial/block events from a run's audit log with human-readable explanations.- Code-analysis
code_relations_to_graphscopes in-memory graphs per workspace root (stateful=Trueannotation). - Tool lint warns on
stateful_without_governancewhen stateful tools lack destructive or idempotent governance signals. - Docs:
docs/cli.md,docs/audit-events.md.
-
Analysis and planning artifacts (2026-05-31):
- Competitive, enterprise security, market UX, and risk findings under
docs/analysis/. - Positioning, comprehensive, and UX improvement plans under
docs/plans/.
- Competitive, enterprise security, market UX, and risk findings under
-
TUI Evolution Phase A-C (fb59e41):
- Phase A — TUI responsiveness: Async autocomplete with background ontology cache refresh (
_completion.py), fuzzy session switch viadifflib.get_close_matches(_commands.py), secret filename heuristics on pinned fileadd()to block env/SSH/cert/credential paths (pinned_file.py). - Phase B — Approval UX: Unicode tree view for subagent approval queue grouped by
parent_run_id(_approval_subagents.py),approvals diff <call_id>git-diff preview subcommand (_commands.py). - Phase C — Quality & compliance: 12 headless pty TUI acceptance tests (
test_headless_tui.py), compliance audit exporter with signed JSON bundle and chain verification (audit_export.py, 13 tests). Session grants cancelled — existingApprovalGrant(scope='session')already covers it. - Docs: Updated acceptance count to 273, documented new features in cli.md and maturity-matrix.md.
- Phase A — TUI responsiveness: Async autocomplete with background ontology cache refresh (
-
Vote Relay OOM Fix: Added
MAX_HTTP_BODY_BYTES=1_048_576guard tovote_relay.py::_read_json()— rejects oversized payloads withValueError('body too large')instead of unboundedrfile.read()(DoS vector; matchessignature_relay.pypattern) -
Verification-Driven Hardening (12 fixes): Batch 1 (initial fixes):
- SEC-05-REV (
federated_sync.py):_validate_relay_urlnow resolves hostnames via DNS and checks all resolved IPs against private ranges — blocks wildcard DNS SSRF attacks (e.g.192.168.1.1.nip.io) - SEC-04-REV (
jit_approval_server.py):start()now enforces loopback binding withip_address(self._host).is_loopbackcheck at runtime - F-01-REV (
graphqlite_production.py):_fetch_documentescapes backslashes before single quotes —doc_id.replace("\\", "\\\\").replace("'", "''")for Cypher/SQLite defense-in-depth - FIND-01-REV (
_approval_queue_store.py): Lock method uses dedicated.json.lockfile instead of data file — preventsflockorphanage fromos.replaceinode swap - FIND-02-REV (
_approval_queue.py):reload_from_storenow resolves_pending_futures(asyncio.Future) alongside_sync_waiters— prevents async subagent hangs on disk-approved requests - F-02-REV (
memory_legacy.py):_atomic_write_entriesuses UUID-suffixed temp path instead of static.jsonl.tmp— eliminates temp file collisions Batch 2 (verification-driven remediation): - SEC-04-REG (
jit_approval_server.py):start()now resolves hostname ('localhost') beforeipaddress.ip_address()— preventsValueErroron standard loopback hostname; usessocket.gethostbyname()with fallback - SEC-05-TOCTOU (
federated_sync.py):_validate_relay_urlbakes the resolved IP into the returned URL — prevents DNS rebinding TOCTOU between validation and HTTP fetch - F-01-CYPHER (
graphqlite_production.py): Replaced manual string escaping with parameterized queries ($doc_id,$termplaceholders) — eliminates Cypher injection risk entirely; updated both_fetch_documentandgraph_retrieve - FIND-03-LOCK (
_approval_queue_store.py):prune_stalenow acquires exclusive file lock before read/delete — prevents concurrent write races during queue pruning - FIND-02-THREADSAFE (
_approval_queue.py):reload_from_storeusescall_soon_threadsafefor async future resolution — prevents asyncio event loop corruption from background threads - F-02-FLOCK (
memory_legacy.py): Replacedthreading.Lock()withfcntl.flock-based cross-process file lock — prevents silent data loss when subagents run in separate processes
- SEC-05-REV (
-
Deep Audit Remediation (10 fixes):
- SEC-01 (
tool_permissions.py): Unknown/unregistered tools now require JIT approval — addedpermission is Noneguard incheck_tool_accessto prevent safe-default bypass - SEC-02 (
policy.py): Quorum signature verification now looks up SSH keys bypeer_idinstead of client-suppliedssh_key_id— blocks peer impersonation - SEC-03 (
policy.py): Approval hash now includesrun_idand hourly time window — cryptographic replay protection - SEC-04 (
jit_approval_server.py): SSE server default host changed fromlocalhostto127.0.0.1; added auth handshake TODO note - SEC-05 (
federated_sync.py): Added_validate_relay_url()— validates scheme, blocks private IPs (except loopback) before POST to prevent SSRF - FIND-01 (
_approval_queue_store.py):load()now uses shared lock (LOCK_SH) instead of exclusive lock (LOCK_EX) — prevents writer starvation during polling - FIND-02 (
_approval_queue_store.py): Dict serialization insave()moved inside file lock — preventsRuntimeError: dictionary changed size during iteration - DSR-01 (
graphqlite_production.py):_apply_migrationsnow opens an sqlite3 connection and passes it astarget_conn— migrations actually execute in production - DSR-02 (
graphqlite_production.py): Document IDs in Cypher queries are now single-quote escaped — prevents stored Cypher injection - DSR-05 (
memory_legacy.py): Added_file_lock+ atomic temp/rename write pattern to all mutation methods — prevents concurrent write corruption - Regression Fix (
schema_migration.py):executescriptnow includesBEGIN IMMEDIATE; … ;COMMIT;in the script string — avoids "cannot commit" and "database is locked" errors
- SEC-01 (
-
Swarm/Approval/Migration Security Hardening (4 fixes):
- Workspace Contamination: Added
_sandbox_lock(module-levelthreading.Lock) toGitBranchSandbox.start/rollback/merge— serializes git checkout operations across parallelThreadPoolExecutorthreads so concurrent subagents don't race on branch creation in the same working tree - JIT Approval Bypass: Made JIT approvals single-use —
check_tool_accessnow callsagent_approved.discard(tool_name)after a successful check;request_tool_approvalno longer redundantly adds tools to_agent_tool_whitelist;jit_approval_server.pyuses the properrequest_tool_approvalAPI instead of directly manipulating_agent_approved_tools - Split Lock Races: Centralized
_approval_queuedict protection underself._sync_lock(threading.Lock) in all 7 async methods that mutateself._requests/self._batches— eliminates data races betweenasyncio.Lock-gated andthreading.Lock-gated callers - Migration Collisions: Wrapped
MigrationRunner.apply_pendingin_migration_lock(threading.Lock), re-readsapplied_versionsunder lock (TOCTOU fix), and wrapsexecutescriptinBEGIN IMMEDIATE/COMMITfor SQLite-level write serialization
- Workspace Contamination: Added
-
Residual Risk Fixes (3 fixes):
- Policy:
_run_async_signature_collectionnow uses a shared instance-levelThreadPoolExecutorinstead of creating a new executor per call; executor field properly declared in frozen dataclass viafield(init=False) - Context Bus:
subscribe_deltasandget_delta_countrestructured to releaseself._lockbefore calling_execute_with_retry— prevents lock-held-during-sleep thread starvation for writers - Federated Sync:
collect_approval_signatureswraps blocking I/O operations (glob,read_text,unlink) withloop.run_in_executorto prevent event loop blocking during async polling
- Policy:
-
Concurrency & Transaction Audit Round 3 (6 fixes):
- Federated Sync:
collect_approval_signaturesnow acceptsrequired_approvalsparameter and waits for quorum instead of breaking on first signature; deduplicates peer signatures - Policy:
_run_async_signature_collectionoffloads toThreadPoolExecutorworker thread with fresh event loop — preventsRuntimeError: cannot run event loop from within running loop - Context Bus:
_execute_with_retry/_commit_with_retryno longer holdself._lockduringtime.sleep()(fixes thread starvation); added rollback in all OperationalError paths;publish_delta/_clear_deltas/cleanup_old_deltasrestructured with retry loops that sleep outside the lock - Swarm:
SwarmManagernow binds_swarm_managertosubagent_manager(fixes heartbeat registration being silently skipped);tick_heartbeat()method on Subagent for periodic liveness updates; heartbeat monitor now storesSubagentResult(success=False, error=...)on hang detection instead of silently discarding - JIT Approval Server:
approve_requestdirectly whitelists tool in permission manager instead of callingrequest_tool_approval()(fixes silent override of manual approvals);_schedule_broadcastusesasyncio.run_coroutine_threadsafeinstead of non-thread-safecall_soon_threadsafe(asyncio.ensure_future) - Workflow Engine:
execute_workflow/resume_workflowaccept optionalaudit_loggerparameter and attachUndoJournalsink to caller-provided logger (fixes no-op rollback);_execute_stepexception handler now routes to self-healing instead of immediate failure return
- Federated Sync:
-
Oracle Review Fixes (7 concurrency/architecture fixes):
- Context Bus:
_execute_with_retrynow returnssqlite3.Cursor— callers (subscribe_deltas,get_delta_count,cleanup_old_deltas) use the reconnected cursor forfetchall()/fetchone()/rowcountinstead of the stale pre-reconnect cursor;except Exceptionnarrowed toexcept sqlite3.Errorinpublish_delta - Swarm:
register_subagent_heartbeatstores subagent reference directly instead ofid(subagent_ref)(fixesgetattr(int, 'is_running', False)always returning False); added_heartbeat_lockfor thread-safe access to heartbeat dicts - Policy:
_run_async_signature_collectioncreates a new event loop when called from the event loop thread — preventsrun_coroutine_threadsafe+future.result()deadlock - Workflow Engine:
resume_workflownow acquiresself._workflow_lockand sets upUndoJournal+ rollback check (matchingexecute_workflowbehavior)
- Context Bus:
-
Deeper Concurrency Audit (11 fixes):
- Context Bus:
_execute_with_retry/_commit_with_retrynow retryDatabaseErrorwith reconnect + exponential backoff instead of immediate re-raise;publish_deltaadded rollback on commit failure to prevent transaction leaks;subscribe_deltas/get_delta_countSELECTs now use_execute_with_retryfor lock-contention safety - Federated Sync:
collect_approval_signaturesconverted from synchronoustime.sleep()polling toasync defwithasyncio.sleep(), preventing 5-minute asyncio event loop starvation during peer signature collection - Policy:
_collect_peer_signaturesdispatches async signature collection viarun_coroutine_threadsafe(if event loop active) orasyncio.run()— prevents blocking the main thread during multi-sig quorum - Swarm:
Subagentnow tracksis_running/last_heartbeatfor thread-liveness;_heartbeat_monitor_loopreplaced defunct PID-basedis_process_alive(pid)with subagent-ref-basedgetattr(subagent_ref, 'is_running', False)— actually detects thread hangs instead of checking parent process PID - Workflow Engine:
_execute_stepaddedcurrent_attemptparameter, preserving self-healing attempt count across recursive re-execution (fixes infinite loop where counter reset on every newStepExecution);execute_workflowintegratesUndoJournal+AuditLoggerand callsjournal.restore()on strict validation failure
- Context Bus:
-
Security & Concurrency Audit (19 fixes):
- JIT Server: Fixed
_clientsset mutation during broadcast iteration (list(self._clients));_schedule_broadcastnow thread-safe viacall_soon_threadsafe - Approval Queue: Replaced
asyncio.Lockwiththreading.Lockfor global queue registry;get_pending_requestsnow holds_sync_lockduring iteration - Context Bus:
archive_to_ragpassesmax_timestampto_clear_deltaspreventing data loss; added_reconnect()for database corruption recovery - Swarm: Added
timeouttoThreadPoolExecutor.as_completed()preventing indefinite hangs; atomic writes forprompt_gene_pool.jsonl - Git Sandbox:
stash_savenow returns actual stash reflog selector instead of hardcodedstash@{0};stash_popaccepts optional stash reference - Workflow Engine: Added
threading.Lockfor thread-safeexecute_workflow/cancel_workflow - Undo Journal: Fixed restore order — processes entries forward (oldest first) to restore original pre-write state for multi-write files
- Policy: Added brace expansion, process substitution extraction, and non-string/non-list fallback to shell normalization
- File Policy: Widened protected dir patterns (
.git*,workspace_write_*); addedos.path.normpathnormalization inDenyRule.matches() - Tool Permissions:
register_tool_permissionblocks DESTRUCTIVE→SAFE downgrade withoutallow_downgrade=True - Code Mode: Added
RLIMIT_NPROC(max 8 child processes) to prevent fork bombs - Agent Factory: Atomic file writes via temp file +
os.replace()in_persist_agent
- JIT Server: Fixed
-
Security & Concurrency Hardening (5 fixes):
- JIT Approval Server async refactor (
teaagent/jit_approval_server.py): Converted_wait_for_approvalfrom synchronoustime.sleep(1)spin-lock toasync defusingasyncio.Event+asyncio.wait_for, preventing asyncio event loop starvation during approval waits.request_approvalis nowasync def. - Context Bus SQLite concurrency (
teaagent/context_bus.py): Per-thread connections withtimeout=5.0, WAL pragmas on connect,_execute_with_retrywith exponential backoff (5 retries) on lock contention. Applied topublish_delta,_clear_deltas,cleanup_old_deltas. - Shell command normalization (
teaagent/policy.py): Added_normalize_shell_argstatic method with 5-pass normalization (quote stripping, backslash removal, backtick extraction,$()subshell extraction, shlex split). Added list-type command argument handling to prevent bypass via["rm", "-rf", "/prod"]. - Per-agent JIT approval (
teaagent/tool_permissions.py): Replaced globalrequires_approval=Falsemutation inrequest_tool_approvalwith per-agent_agent_approved_toolstracking, preventing privilege escalation where approving one agent granted all agents access. - Added regression test
test_approval_is_per_agent_not_globalverifying cross-agent isolation.
- JIT Approval Server async refactor (
-
Governance Hardening (Tranche B Completion): Implemented three key governance decisions with CI release gates:
- Centralized Approval Queue for Subagents: Added
CentralizedApprovalQueueinteaagent/subagents/_approval_queue.pyfor aggregating destructive tool requests from multiple subagents, supporting batch approval/deny with full lineage tracking, and preventing approval fatigue in tournament/swarm modes - Strict Plan-before-Write Enforcement: Modified
teaagent/governance/plan_gate.pyto enforce plan-by-default in workspace-write mode, added--skip-plan-checkCLI flag for explicit override, updatedChatAgentConfigandAgentRunnerto support the new parameter - Automated Memory Invalidation: Extended
FailureCardStoragewithAutoInvalidationRuleandMemoryAutoInvalidationConfig, implemented conservative default rules (file_signature_change: invalidate, test_refactor: warn, dependency_version_change: warn), addedapply_auto_invalidation()method with file signature tracking, added CLI commandteaagent memory failures auto-invalidate, and supports per-project custom rules via.teaagent/config.json - Governance Fuzz Tests: Added comprehensive adversarial fuzz tests in
tests/test_governance_fuzz.pycovering plan-before-write enforcement, memory invalidation, and approval queue security with 13 tests validating conservative defaults and path filtering - CI Release Gates: Added
governance-gatejob to.github/workflows/ci.ymlthat runs governance fuzz tests, tool lint validation, and permission matrix tests before package build
- Centralized Approval Queue for Subagents: Added
-
Added Phase 5 Cognitive Swarm Evolution with self-healing validation, cross-sandbox Delta sharing, evolutionary prompt tuning, and remote JIT approval:
teaagent/workflow_engine.py: Self-healing validation loops with ruff/mypy/pytest checks, automatic hot-reload and re-execution (max 3 attempts)teaagent/context_bus.py: Cross-sandbox Delta sharing via WAL-mode SQLite for concurrent access, with publish/subscribe and RAG archiveteaagent/agent_factory.py: Evolutionary prompt self-tuning based on performance feedback with LLM and heuristic fallbackteaagent/jit_approval_server.py: Remote SSE JIT approval server with 3-minute timeout and safe abort- Added 29 tests across 4 test files for Phase 5 components
-
Added Cooragent multi-agent integration with task coordination, dynamic agent generation, tool permissions, and workflow execution:
teaagent/coordinator.py: Task classification by type (code_review, testing, documentation, refactoring, debugging, feature_implementation, general) with LLM-based and heuristic classificationteaagent/agent_factory.py: Dynamic agent generation with LLM-structured system prompts, memory/disk registration, and hot-reload supportteaagent/tool_permissions.py: Tool safety classification (safe, inspect, destructive) with safe defaults and JIT approval for destructive toolsteaagent/workflow_engine.py: Multi-step workflow execution with polish mode, unified diff display, and workflow state management- Added 35 tests across 4 test files for Phase 4 components
-
Added Skill-RAG integration with ContextGatherer for collaborative retrieval with token reduction benefits
-
Added Swarm lock management with 60-second timeout and heartbeat monitoring
-
Added
ANPGovernedServiceto wire ANP inbound tool calls throughAgentRunnerwith federation audit events, outbound delegation timeouts, and budget enforcement; accepted ADR 0007. -
Hardened OpenAI-compatible content extraction for
reasoning_content,textcontent parts, and nestedresult.output_text(opencodezen-go/kimi-style payloads). -
Refreshed MCP discovery card, provider-authoring conformance docs, ANP acceptance tier (P1), nightly smoke providers (
workers-ai,aigateway), andscripts/refresh_agent_readme_survey.md. -
Added 8-event Hook System (Claude Code compatible):
SessionStart,UserPromptSubmit,PreToolUse,PostToolUse,PreCompact,Stop,SubagentStop,SessionEnd. IncludesHookRegistry,permission_check_hook,lint_check_hook,run_tests_hook,mcp_tool_filter_hook, andPermissionModeenum. -
Added Three-Tier Memory System (Claude Code compatible):
MemoryHierarchywith Project (.teaagent/memory.jsonl), Personal (~/.config/teaagent/memory.jsonl), and Auto-Memory (.claude/MEMORY.md) tiers. -
Added Context Compaction with traffic light zones: Green (0-75%), Yellow (75-92%), Red (92%+). Implements
CompactionManagerwithshould_compact()andcheck_and_compact(). -
Added Plugin System with four extension points: Commands, Agents, Hooks, MCP Servers. Includes
PluginRegistry,PluginManifest,CommandPlugin,AgentPlugin, and built-in plugins (code-reviewer, tester, docs-writer). -
Added Plan Mode for read-only exploration:
PlanModeclass withenable(),disable(),can_execute_tool()to block writes/shell in exploration mode. -
Added ACP (Agent Client Protocol) adapter for IDE integration:
ACPServerfor VS Code, Zed, JetBrains withinitialize,tools/list,tools/call,completion,tools/cancelmethods. -
Added FilteredMCPClient with tool filtering (allow/block lists) and sampling configuration (max_tokens, temperature).
-
Added bundled skills:
code-review,git-workflow,testing,refactoring,mcp-integrationunder.opencode/skill/. -
Added GraphQLite production deployment:
GraphQLitePersistentStorewith WAL mode, 5-version schema migration framework viaSQLiteMigrationStore/MigrationRunner, index strategy (Entity name, Document source/doc_id, EDGE relation),graph_retrievevia Cypher traversal, round-tripsync_to_knowledge_graph,graphqlite migrateCLI, and production deployment guide atdocs/graphqlite-production.md. -
Added VS Code extension (
vscode/) wrapping the CLI with command palette entries (doctor, agent run, preflight, model providers, GraphQLite smoke, TUI), custom task definitions, problem matcher, terminal profile, and TeaAgent output channel. -
Added API documentation infrastructure:
pdoc>=14dev dependency,scripts/build_docs.pybuild script covering all submodules, and class-level docstrings on core types (AgentRunner,ToolRegistry,ToolAnnotations,ToolDefinition,RunBudget,MemoryEntry). -
Removed stale P0/P1/P2/P3 scope files (
docs/p0-scope.md,docs/p1-scope.md,docs/p2-scope.md,docs/p3-scope.md) — all deferred items were already implemented and tracked indocs/backlog-priority.md. -
Updated ADRs 0001, 0004, and 0006 with post-implementation notes for multi-agent orchestration, key rotation, cross-host OAuthStore backends, and key-ring CLI support.
-
Aligned scope docs with current implementation status by updating P0/P1 deferred lists and adding implemented-since-baseline notes for MCP transport, OAuth/DPoP, and telemetry paths.
-
Unified package version lookup to
importlib.metadata.version("teaagent")with a local fallback, removing hard-coded duplication risk between code and packaging metadata. -
Narrowed
teaagent.__all__to a stable core API surface and added a migration guide atdocs/migration-top-level-api.mdfor projects that relied on star-import convenience. -
Clarified local developer setup for PEP 668 environments by adding virtualenv-first install steps to
README.mdandCONTRIBUTING.md. -
Updated contributor check commands to use
.venv/bin/...explicitly for reproducible local lint/type/test runs. -
Consolidated agent-instruction precedence by making
AGENT.mda compatibility pointer and declaringAGENTS.mdas the canonical rule source. -
Pinned dev
mypyto<2to keep Python 3.10 type-check configuration compatible and avoid local warning churn. -
Split
teaagent/tui.py(517 → ~290 lines) by extractinghandle_commandlogic to_commands.py. -
Split
teaagent/mcp_http.py(575 → ~400 lines) by extracting OAuth endpoint handlers to_oauth.py. -
Split
teaagent/telemetry.pyinto ateaagent/telemetry/package with focused modules:_availability.py,_config.py,_audit.py,_metrics.py, and_transport.py. -
Split
teaagent/code_mode.pyinto ateaagent/code_mode/package with focused modules:_types.py,_validation.py,_child_process.py, and_container.py. -
Split
teaagent/cli/_handlers.pyinto ateaagent/cli/_handlers/package and extracted agent-run lifecycle logic into_agent.pywhile preserving command handler imports. -
Continued splitting
teaagent/cli/_handlers/by moving doctor, memory, model, MCP, misc, and audit handlers into dedicated modules and keeping stable re-exports in__init__.py. -
Split
teaagent/llm_conformance.pyinto ateaagent/llm_conformance/package with_types.pyand_runner.py, preserving existing imports. -
Split
teaagent/runner.pyinto ateaagent/runner/package with_types.pyand_core.py, preserving existingteaagent.runnerimports. -
Made
teaagent.cli.main()accept injectable_adapter_factory,_serve_mcp_http,_check_graphqlite,_check_llm, and_run_model_conformancekeyword arguments, enabling handler extraction without breaking existing tests. -
Split
teaagent/workspace_tools.pyinto ateaagent/workspace_tools/package with four focused modules:_config.py,_helpers.py,_shell.py,_files.py. Backward-compatible public imports preserved via__init__.pyre-exports. -
Expanded audit string redaction with patterns for JWT tokens, AWS access keys (
AKIA...), and GitHub personal access tokens (ghp_...,github_pat_...). -
Split
teaagent/llm.pyinto ateaagent/llm/package with focused modules:_types.py,_transport.py,_retry.py,_extract.py,_adapters.py,_config.py. Backward-compatible public imports preserved via__init__.pyre-exports. -
Refactored
OpenAICompatibleAdapterstreaming path to support an injectablestreaming_linesparameter, removing the last urllib patch dependency in LLM tests. -
Added a 5-minute walkthrough section to the README that walks through the end-to-end example step by step.
-
Added deeper MCP HTTP transport tests covering empty batches, mixed-type batches, initialize with no id, and DELETE lifecycle (reuse after delete, non-existent session).
-
Added community health files:
CODE_OF_CONDUCT.md,SUPPORT.md, and GitHub issue templates for bugs and feature requests. -
Added
.editorconfigwith consistent encoding, EOL, and indentation settings for Python, Markdown, YAML, TOML, JSON, and Makefiles. -
Added
.github/CODEOWNERSfor automated PR review routing. -
Added
docs/architecture.mdcovering the system overview, component layers, data flow, state boundaries, and extension points for all major subsystems. -
Added
examples/full_agent_run.py, a self-contained end-to-end example that walks through workspace tools, audit, memory, budget, agent loop, run-store persistence, and metrics without requiring LLM API keys. -
Added a package CI job that builds sdist/wheel artifacts, runs
twine check, installs the wheel in a clean venv, and verifiesteaagent/py.typedships in the package. -
Wired OAuth key rings through the MCP HTTP resource-server boundary so tokens signed with rotated authorization-server keys validate at the actual HTTP endpoint.
-
Added short-lived DPoP proof
jtireplay caches to the authorization and resource servers so replaying the same proof within the freshness window fails. -
Made OAuth DPoP nonce validation one-time by adding
OAuthStore.consume_nonce()and using atomic consume/delete semantics inSQLiteOAuthStore. -
Added optional container image digest pinning and image allowlist enforcement to
ContainerCodeModeBackend. -
Changed
ContainerCodeModeBackendto enforceCodeModeSandbox.max_output_byteswhile streaming stdout/stderr and kill the child process immediately when the combined output limit is exceeded. -
Updated README, SECURITY, and P2 scope docs so Code Mode backend limitations and optional dependency groups match the current implementation.
-
Added MCP HTTP boundary tests for malformed
Content-Length, oversized JSON-RPC bodies, and scalar JSON payloads; oversized MCP JSON-RPC requests now return413consistently. -
Hardened
SQLiteOAuthStoreclient-secret storage with PBKDF2-SHA256 hashes, per-client random salts, schema-version metadata, and server-side validation through the store instead of plaintext retrieval. -
Cleaned repo agent instructions by removing embedded session-memory context from
AGENTS.md. -
Added a dedicated telemetry CI job that installs
.[dev,telemetry]and runs telemetry tests without relying on skipped optional imports. -
Extended release automation with PyPI Trusted Publishing and GitHub artifact provenance attestation for tagged releases.
-
Added
releaseandsecurityoptional dependency groups for local build/twine andpip-auditworkflows. -
Removed the remaining package-level mypy strictness overrides; all
teaagent/modules now run withdisallow_untyped_defsanddisallow_incomplete_defsenabled. -
Added packaging and contribution hygiene:
MANIFEST.in,CONTRIBUTING.md, and a pull request template with validation/governance checklist. -
Added audit redaction for secret-like patterns inside otherwise non-sensitive strings (Bearer tokens,
sk-...keys, and URL/query-styletoken=.../api_key=...values). -
Added
SQLiteOAuthStore, a durable OAuth 2.1 store for clients, one-time authorization codes, and DPoP nonces. It uses SQLite WAL mode and an immediate transaction for consume-and-delete authorization-code semantics. -
Added
configure_metrics()and a newmetrics_otlp_endpointfield onTelemetryConfigso OpenTelemetry counters and histograms have a realMeterProviderwith OTLP/console exporters; previously only an in-memory metrics path existed. -
Fixed the
TracingHTTPTransportdocstring example to match the actual two-argument constructor. -
Hardened OAuth resource-server verification:
OAuth21ResourceServerandOAuth21AuthorizationServer.introspect_tokennow resolve the verification key by JWTkidviaOAuthKeyRing, so rotated signing keys keep verifying without losing trust in older tokens. -
Added Dependabot configuration (
pip+github-actions, weekly) and a Security workflow that runspip-auditand CodeQL on every push, pull request, and weekly schedule. -
Restricted the release workflow to least-privilege permissions (
contents: read). -
Re-licensed the project under the MIT License and added the matching PyPI classifier.
-
Marked the package as typed by shipping
teaagent/py.typedand configuring setuptoolspackage-data. -
Hardened
ContainerCodeModeBackend: rejects empty images at construction, enforces--read-only,--cap-drop=ALL,--security-opt=no-new-privileges, non-root--user,--tmpfs /tmp,--memory-swap, and a separate--ulimit cpufor CPU time. The--cpusflag now reflects an explicit CPU-share field instead of reusing the CPU-time budget. -
Added
CodeModeSandbox.max_output_bytesand switched the container backend tosubprocess.Popenso oversized stdout is rejected instead of buffered without bound. -
Updated
SECURITY.mdto reflect the storage-layer file locking that audit and memory writes already use, and addeddocs/p3-scope.mdto mirror the existing P0/P1/P2 scope notes. -
Added a pluggable Code Mode backend boundary with the existing child-process backend and a Docker/Podman-style container backend.
-
Added audit-driven metrics sinks for run and tool lifecycle counters plus basic histogram samples.
-
Added release packaging basics: license file, changelog, and distribution build workflow.