attocode 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +88 -1
- package/dist/src/adapters.d.ts +39 -1
- package/dist/src/adapters.d.ts.map +1 -1
- package/dist/src/adapters.js +201 -16
- package/dist/src/adapters.js.map +1 -1
- package/dist/src/agent/agent-builder.d.ts +117 -0
- package/dist/src/agent/agent-builder.d.ts.map +1 -0
- package/dist/src/agent/agent-builder.js +204 -0
- package/dist/src/agent/agent-builder.js.map +1 -0
- package/dist/src/agent/feature-initializer.d.ts +80 -0
- package/dist/src/agent/feature-initializer.d.ts.map +1 -0
- package/dist/src/agent/feature-initializer.js +676 -0
- package/dist/src/agent/feature-initializer.js.map +1 -0
- package/dist/src/agent/index.d.ts +13 -0
- package/dist/src/agent/index.d.ts.map +1 -0
- package/dist/src/agent/index.js +13 -0
- package/dist/src/agent/index.js.map +1 -0
- package/dist/src/agent/message-builder.d.ts +50 -0
- package/dist/src/agent/message-builder.d.ts.map +1 -0
- package/dist/src/agent/message-builder.js +176 -0
- package/dist/src/agent/message-builder.js.map +1 -0
- package/dist/src/agent/session-api.d.ts +94 -0
- package/dist/src/agent/session-api.d.ts.map +1 -0
- package/dist/src/agent/session-api.js +264 -0
- package/dist/src/agent/session-api.js.map +1 -0
- package/dist/src/agent-tools/lsp-file-tools.d.ts +1 -1
- package/dist/src/agent-tools/lsp-file-tools.d.ts.map +1 -1
- package/dist/src/agent-tools/lsp-file-tools.js +17 -13
- package/dist/src/agent-tools/lsp-file-tools.js.map +1 -1
- package/dist/src/agent.d.ts +26 -117
- package/dist/src/agent.d.ts.map +1 -1
- package/dist/src/agent.js +239 -1249
- package/dist/src/agent.js.map +1 -1
- package/dist/src/analysis/feedback-loop.d.ts.map +1 -1
- package/dist/src/analysis/feedback-loop.js +13 -9
- package/dist/src/analysis/feedback-loop.js.map +1 -1
- package/dist/src/analysis/index.d.ts +1 -1
- package/dist/src/analysis/index.d.ts.map +1 -1
- package/dist/src/analysis/index.js +1 -1
- package/dist/src/analysis/index.js.map +1 -1
- package/dist/src/analysis/prompt-templates.d.ts.map +1 -1
- package/dist/src/analysis/prompt-templates.js.map +1 -1
- package/dist/src/analysis/trace-summary.d.ts.map +1 -1
- package/dist/src/analysis/trace-summary.js +25 -9
- package/dist/src/analysis/trace-summary.js.map +1 -1
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +4 -2
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/agents-commands.d.ts.map +1 -1
- package/dist/src/commands/agents-commands.js +3 -3
- package/dist/src/commands/agents-commands.js.map +1 -1
- package/dist/src/commands/handler.d.ts.map +1 -1
- package/dist/src/commands/handler.js +68 -44
- package/dist/src/commands/handler.js.map +1 -1
- package/dist/src/commands/init-commands.d.ts.map +1 -1
- package/dist/src/commands/init-commands.js +8 -10
- package/dist/src/commands/init-commands.js.map +1 -1
- package/dist/src/commands/init.js +17 -17
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/skills-commands.d.ts.map +1 -1
- package/dist/src/commands/skills-commands.js +10 -7
- package/dist/src/commands/skills-commands.js.map +1 -1
- package/dist/src/commands/types.d.ts.map +1 -1
- package/dist/src/config/config-manager.d.ts.map +1 -1
- package/dist/src/config/config-manager.js +4 -1
- package/dist/src/config/config-manager.js.map +1 -1
- package/dist/src/config/index.d.ts +1 -1
- package/dist/src/config/index.d.ts.map +1 -1
- package/dist/src/config/schema.d.ts +6 -6
- package/dist/src/config/schema.d.ts.map +1 -1
- package/dist/src/config/schema.js +6 -2
- package/dist/src/config/schema.js.map +1 -1
- package/dist/src/core/agent-state-machine.d.ts.map +1 -1
- package/dist/src/core/agent-state-machine.js +5 -2
- package/dist/src/core/agent-state-machine.js.map +1 -1
- package/dist/src/core/completion-analyzer.d.ts.map +1 -1
- package/dist/src/core/completion-analyzer.js +2 -2
- package/dist/src/core/completion-analyzer.js.map +1 -1
- package/dist/src/core/execution-loop.d.ts +172 -1
- package/dist/src/core/execution-loop.d.ts.map +1 -1
- package/dist/src/core/execution-loop.js +597 -360
- package/dist/src/core/execution-loop.js.map +1 -1
- package/dist/src/core/index.d.ts +2 -2
- package/dist/src/core/index.d.ts.map +1 -1
- package/dist/src/core/index.js +1 -1
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/core/queues/event-queue.d.ts.map +1 -1
- package/dist/src/core/queues/event-queue.js.map +1 -1
- package/dist/src/core/response-handler.d.ts.map +1 -1
- package/dist/src/core/response-handler.js +20 -10
- package/dist/src/core/response-handler.js.map +1 -1
- package/dist/src/core/subagent-spawner.d.ts.map +1 -1
- package/dist/src/core/subagent-spawner.js +98 -59
- package/dist/src/core/subagent-spawner.js.map +1 -1
- package/dist/src/core/tool-executor.d.ts.map +1 -1
- package/dist/src/core/tool-executor.js +63 -27
- package/dist/src/core/tool-executor.js.map +1 -1
- package/dist/src/core/types.d.ts +1 -0
- package/dist/src/core/types.d.ts.map +1 -1
- package/dist/src/core/types.js.map +1 -1
- package/dist/src/costs/model-registry.js +6 -6
- package/dist/src/costs/model-registry.js.map +1 -1
- package/dist/src/defaults.d.ts.map +1 -1
- package/dist/src/defaults.js +67 -20
- package/dist/src/defaults.js.map +1 -1
- package/dist/src/errors/index.d.ts.map +1 -1
- package/dist/src/errors/index.js +6 -8
- package/dist/src/errors/index.js.map +1 -1
- package/dist/src/first-run.d.ts.map +1 -1
- package/dist/src/first-run.js +11 -11
- package/dist/src/first-run.js.map +1 -1
- package/dist/src/integrations/agents/agent-registry.d.ts +262 -0
- package/dist/src/integrations/agents/agent-registry.d.ts.map +1 -0
- package/dist/src/integrations/agents/agent-registry.js +686 -0
- package/dist/src/integrations/agents/agent-registry.js.map +1 -0
- package/dist/src/integrations/agents/async-subagent.d.ts +135 -0
- package/dist/src/integrations/agents/async-subagent.d.ts.map +1 -0
- package/dist/src/integrations/agents/async-subagent.js +211 -0
- package/dist/src/integrations/agents/async-subagent.js.map +1 -0
- package/dist/src/integrations/agents/complexity-classifier.d.ts +86 -0
- package/dist/src/integrations/agents/complexity-classifier.d.ts.map +1 -0
- package/dist/src/integrations/agents/complexity-classifier.js +264 -0
- package/dist/src/integrations/agents/complexity-classifier.js.map +1 -0
- package/dist/src/integrations/agents/delegation-protocol.d.ts +86 -0
- package/dist/src/integrations/agents/delegation-protocol.d.ts.map +1 -0
- package/dist/src/integrations/agents/delegation-protocol.js +127 -0
- package/dist/src/integrations/agents/delegation-protocol.js.map +1 -0
- package/dist/src/integrations/agents/multi-agent.d.ts +150 -0
- package/dist/src/integrations/agents/multi-agent.d.ts.map +1 -0
- package/dist/src/integrations/agents/multi-agent.js +302 -0
- package/dist/src/integrations/agents/multi-agent.js.map +1 -0
- package/dist/src/integrations/agents/result-synthesizer.d.ts +389 -0
- package/dist/src/integrations/agents/result-synthesizer.d.ts.map +1 -0
- package/dist/src/integrations/agents/result-synthesizer.js +953 -0
- package/dist/src/integrations/agents/result-synthesizer.js.map +1 -0
- package/dist/src/integrations/agents/shared-blackboard.d.ts +406 -0
- package/dist/src/integrations/agents/shared-blackboard.d.ts.map +1 -0
- package/dist/src/integrations/agents/shared-blackboard.js +757 -0
- package/dist/src/integrations/agents/shared-blackboard.js.map +1 -0
- package/dist/src/integrations/agents/subagent-output-store.d.ts +91 -0
- package/dist/src/integrations/agents/subagent-output-store.d.ts.map +1 -0
- package/dist/src/integrations/agents/subagent-output-store.js +256 -0
- package/dist/src/integrations/agents/subagent-output-store.js.map +1 -0
- package/dist/src/integrations/budget/budget-pool.d.ts +115 -0
- package/dist/src/integrations/budget/budget-pool.d.ts.map +1 -0
- package/dist/src/integrations/budget/budget-pool.js +201 -0
- package/dist/src/integrations/budget/budget-pool.js.map +1 -0
- package/dist/src/integrations/budget/cancellation.d.ts +229 -0
- package/dist/src/integrations/budget/cancellation.d.ts.map +1 -0
- package/dist/src/integrations/budget/cancellation.js +534 -0
- package/dist/src/integrations/budget/cancellation.js.map +1 -0
- package/dist/src/integrations/budget/dynamic-budget.d.ts +81 -0
- package/dist/src/integrations/budget/dynamic-budget.d.ts.map +1 -0
- package/dist/src/integrations/budget/dynamic-budget.js +149 -0
- package/dist/src/integrations/budget/dynamic-budget.js.map +1 -0
- package/dist/src/integrations/budget/economics.d.ts +435 -0
- package/dist/src/integrations/budget/economics.d.ts.map +1 -0
- package/dist/src/integrations/budget/economics.js +1039 -0
- package/dist/src/integrations/budget/economics.js.map +1 -0
- package/dist/src/integrations/budget/injection-budget.d.ts +71 -0
- package/dist/src/integrations/budget/injection-budget.d.ts.map +1 -0
- package/dist/src/integrations/budget/injection-budget.js +137 -0
- package/dist/src/integrations/budget/injection-budget.js.map +1 -0
- package/dist/src/integrations/budget/loop-detector.d.ts +105 -0
- package/dist/src/integrations/budget/loop-detector.d.ts.map +1 -0
- package/dist/src/integrations/budget/loop-detector.js +304 -0
- package/dist/src/integrations/budget/loop-detector.js.map +1 -0
- package/dist/src/integrations/budget/phase-tracker.d.ts +114 -0
- package/dist/src/integrations/budget/phase-tracker.d.ts.map +1 -0
- package/dist/src/integrations/budget/phase-tracker.js +265 -0
- package/dist/src/integrations/budget/phase-tracker.js.map +1 -0
- package/dist/src/integrations/budget/resources.d.ts +182 -0
- package/dist/src/integrations/budget/resources.d.ts.map +1 -0
- package/dist/src/integrations/budget/resources.js +362 -0
- package/dist/src/integrations/budget/resources.js.map +1 -0
- package/dist/src/integrations/context/auto-compaction.d.ts +210 -0
- package/dist/src/integrations/context/auto-compaction.d.ts.map +1 -0
- package/dist/src/integrations/context/auto-compaction.js +485 -0
- package/dist/src/integrations/context/auto-compaction.js.map +1 -0
- package/dist/src/integrations/context/code-analyzer.d.ts +71 -0
- package/dist/src/integrations/context/code-analyzer.d.ts.map +1 -0
- package/dist/src/integrations/context/code-analyzer.js +445 -0
- package/dist/src/integrations/context/code-analyzer.js.map +1 -0
- package/dist/src/integrations/context/code-selector.d.ts +78 -0
- package/dist/src/integrations/context/code-selector.d.ts.map +1 -0
- package/dist/src/integrations/context/code-selector.js +668 -0
- package/dist/src/integrations/context/code-selector.js.map +1 -0
- package/dist/src/integrations/context/codebase-ast.d.ts +138 -0
- package/dist/src/integrations/context/codebase-ast.d.ts.map +1 -0
- package/dist/src/integrations/context/codebase-ast.js +881 -0
- package/dist/src/integrations/context/codebase-ast.js.map +1 -0
- package/dist/src/integrations/context/codebase-context.d.ts +473 -0
- package/dist/src/integrations/context/codebase-context.d.ts.map +1 -0
- package/dist/src/integrations/context/codebase-context.js +694 -0
- package/dist/src/integrations/context/codebase-context.js.map +1 -0
- package/dist/src/integrations/context/compaction.d.ts +191 -0
- package/dist/src/integrations/context/compaction.d.ts.map +1 -0
- package/dist/src/integrations/context/compaction.js +391 -0
- package/dist/src/integrations/context/compaction.js.map +1 -0
- package/dist/src/integrations/context/context-engineering.d.ts +274 -0
- package/dist/src/integrations/context/context-engineering.d.ts.map +1 -0
- package/dist/src/integrations/context/context-engineering.js +437 -0
- package/dist/src/integrations/context/context-engineering.js.map +1 -0
- package/dist/src/integrations/context/file-cache.d.ts +97 -0
- package/dist/src/integrations/context/file-cache.d.ts.map +1 -0
- package/dist/src/integrations/context/file-cache.js +218 -0
- package/dist/src/integrations/context/file-cache.js.map +1 -0
- package/dist/src/integrations/context/semantic-cache.d.ts +178 -0
- package/dist/src/integrations/context/semantic-cache.d.ts.map +1 -0
- package/dist/src/integrations/context/semantic-cache.js +377 -0
- package/dist/src/integrations/context/semantic-cache.js.map +1 -0
- package/dist/src/integrations/index.d.ts +72 -68
- package/dist/src/integrations/index.d.ts.map +1 -1
- package/dist/src/integrations/index.js +76 -68
- package/dist/src/integrations/index.js.map +1 -1
- package/dist/src/integrations/lsp/lsp.d.ts +196 -0
- package/dist/src/integrations/lsp/lsp.d.ts.map +1 -0
- package/dist/src/integrations/lsp/lsp.js +583 -0
- package/dist/src/integrations/lsp/lsp.js.map +1 -0
- package/dist/src/integrations/mcp/mcp-client.d.ts +279 -0
- package/dist/src/integrations/mcp/mcp-client.d.ts.map +1 -0
- package/dist/src/integrations/mcp/mcp-client.js +776 -0
- package/dist/src/integrations/mcp/mcp-client.js.map +1 -0
- package/dist/src/integrations/mcp/mcp-custom-tools.d.ts +102 -0
- package/dist/src/integrations/mcp/mcp-custom-tools.d.ts.map +1 -0
- package/dist/src/integrations/mcp/mcp-custom-tools.js +232 -0
- package/dist/src/integrations/mcp/mcp-custom-tools.js.map +1 -0
- package/dist/src/integrations/mcp/mcp-tool-search.d.ts +77 -0
- package/dist/src/integrations/mcp/mcp-tool-search.d.ts.map +1 -0
- package/dist/src/integrations/mcp/mcp-tool-search.js +220 -0
- package/dist/src/integrations/mcp/mcp-tool-search.js.map +1 -0
- package/dist/src/integrations/mcp/mcp-tool-validator.d.ts +60 -0
- package/dist/src/integrations/mcp/mcp-tool-validator.d.ts.map +1 -0
- package/dist/src/integrations/mcp/mcp-tool-validator.js +139 -0
- package/dist/src/integrations/mcp/mcp-tool-validator.js.map +1 -0
- package/dist/src/integrations/persistence/codebase-repository.d.ts +45 -0
- package/dist/src/integrations/persistence/codebase-repository.d.ts.map +1 -0
- package/dist/src/integrations/persistence/codebase-repository.js +85 -0
- package/dist/src/integrations/persistence/codebase-repository.js.map +1 -0
- package/dist/src/integrations/persistence/goal-repository.d.ts +71 -0
- package/dist/src/integrations/persistence/goal-repository.d.ts.map +1 -0
- package/dist/src/integrations/persistence/goal-repository.js +187 -0
- package/dist/src/integrations/persistence/goal-repository.js.map +1 -0
- package/dist/src/integrations/persistence/history.d.ts +72 -0
- package/dist/src/integrations/persistence/history.d.ts.map +1 -0
- package/dist/src/integrations/persistence/history.js +163 -0
- package/dist/src/integrations/persistence/history.js.map +1 -0
- package/dist/src/integrations/persistence/persistence.d.ts +49 -0
- package/dist/src/integrations/persistence/persistence.d.ts.map +1 -0
- package/dist/src/integrations/persistence/persistence.js +200 -0
- package/dist/src/integrations/persistence/persistence.js.map +1 -0
- package/dist/src/integrations/persistence/session-repository.d.ts +212 -0
- package/dist/src/integrations/persistence/session-repository.d.ts.map +1 -0
- package/dist/src/integrations/persistence/session-repository.js +781 -0
- package/dist/src/integrations/persistence/session-repository.js.map +1 -0
- package/dist/src/integrations/persistence/session-store.d.ts +184 -0
- package/dist/src/integrations/persistence/session-store.d.ts.map +1 -0
- package/dist/src/integrations/persistence/session-store.js +346 -0
- package/dist/src/integrations/persistence/session-store.js.map +1 -0
- package/dist/src/integrations/persistence/sqlite-store.d.ts +453 -0
- package/dist/src/integrations/persistence/sqlite-store.d.ts.map +1 -0
- package/dist/src/integrations/persistence/sqlite-store.js +680 -0
- package/dist/src/integrations/persistence/sqlite-store.js.map +1 -0
- package/dist/src/integrations/persistence/worker-repository.d.ts +65 -0
- package/dist/src/integrations/persistence/worker-repository.d.ts.map +1 -0
- package/dist/src/integrations/persistence/worker-repository.js +181 -0
- package/dist/src/integrations/persistence/worker-repository.js.map +1 -0
- package/dist/src/integrations/quality/auto-checkpoint.d.ts +98 -0
- package/dist/src/integrations/quality/auto-checkpoint.d.ts.map +1 -0
- package/dist/src/integrations/quality/auto-checkpoint.js +250 -0
- package/dist/src/integrations/quality/auto-checkpoint.js.map +1 -0
- package/dist/src/integrations/quality/dead-letter-queue.d.ts +233 -0
- package/dist/src/integrations/quality/dead-letter-queue.d.ts.map +1 -0
- package/dist/src/integrations/quality/dead-letter-queue.js +549 -0
- package/dist/src/integrations/quality/dead-letter-queue.js.map +1 -0
- package/dist/src/integrations/quality/health-check.d.ts +218 -0
- package/dist/src/integrations/quality/health-check.d.ts.map +1 -0
- package/dist/src/integrations/quality/health-check.js +418 -0
- package/dist/src/integrations/quality/health-check.js.map +1 -0
- package/dist/src/integrations/quality/learning-store.d.ts +291 -0
- package/dist/src/integrations/quality/learning-store.d.ts.map +1 -0
- package/dist/src/integrations/quality/learning-store.js +723 -0
- package/dist/src/integrations/quality/learning-store.js.map +1 -0
- package/dist/src/integrations/quality/self-improvement.d.ts +90 -0
- package/dist/src/integrations/quality/self-improvement.d.ts.map +1 -0
- package/dist/src/integrations/quality/self-improvement.js +229 -0
- package/dist/src/integrations/quality/self-improvement.js.map +1 -0
- package/dist/src/integrations/quality/tool-recommendation.d.ts +61 -0
- package/dist/src/integrations/quality/tool-recommendation.d.ts.map +1 -0
- package/dist/src/integrations/quality/tool-recommendation.js +298 -0
- package/dist/src/integrations/quality/tool-recommendation.js.map +1 -0
- package/dist/src/integrations/safety/bash-policy.d.ts +33 -0
- package/dist/src/integrations/safety/bash-policy.d.ts.map +1 -0
- package/dist/src/integrations/safety/bash-policy.js +147 -0
- package/dist/src/integrations/safety/bash-policy.js.map +1 -0
- package/dist/src/integrations/safety/edit-validator.d.ts +30 -0
- package/dist/src/integrations/safety/edit-validator.d.ts.map +1 -0
- package/dist/src/integrations/safety/edit-validator.js +87 -0
- package/dist/src/integrations/safety/edit-validator.js.map +1 -0
- package/dist/src/integrations/safety/execution-policy.d.ts +189 -0
- package/dist/src/integrations/safety/execution-policy.d.ts.map +1 -0
- package/dist/src/integrations/safety/execution-policy.js +362 -0
- package/dist/src/integrations/safety/execution-policy.js.map +1 -0
- package/dist/src/integrations/safety/policy-engine.d.ts +55 -0
- package/dist/src/integrations/safety/policy-engine.d.ts.map +1 -0
- package/dist/src/integrations/safety/policy-engine.js +287 -0
- package/dist/src/integrations/safety/policy-engine.js.map +1 -0
- package/dist/src/integrations/safety/safety.d.ts +174 -0
- package/dist/src/integrations/safety/safety.d.ts.map +1 -0
- package/dist/src/integrations/safety/safety.js +473 -0
- package/dist/src/integrations/safety/safety.js.map +1 -0
- package/dist/src/integrations/safety/sandbox/basic.d.ts +81 -0
- package/dist/src/integrations/safety/sandbox/basic.d.ts.map +1 -0
- package/dist/src/integrations/safety/sandbox/basic.js +333 -0
- package/dist/src/integrations/safety/sandbox/basic.js.map +1 -0
- package/dist/src/integrations/safety/sandbox/docker.d.ts +94 -0
- package/dist/src/integrations/safety/sandbox/docker.d.ts.map +1 -0
- package/dist/src/integrations/safety/sandbox/docker.js +294 -0
- package/dist/src/integrations/safety/sandbox/docker.js.map +1 -0
- package/dist/src/integrations/safety/sandbox/index.d.ts +188 -0
- package/dist/src/integrations/safety/sandbox/index.d.ts.map +1 -0
- package/dist/src/integrations/safety/sandbox/index.js +410 -0
- package/dist/src/integrations/safety/sandbox/index.js.map +1 -0
- package/dist/src/integrations/safety/sandbox/landlock.d.ts +59 -0
- package/dist/src/integrations/safety/sandbox/landlock.d.ts.map +1 -0
- package/dist/src/integrations/safety/sandbox/landlock.js +333 -0
- package/dist/src/integrations/safety/sandbox/landlock.js.map +1 -0
- package/dist/src/integrations/safety/sandbox/seatbelt.d.ts +68 -0
- package/dist/src/integrations/safety/sandbox/seatbelt.d.ts.map +1 -0
- package/dist/src/integrations/safety/sandbox/seatbelt.js +291 -0
- package/dist/src/integrations/safety/sandbox/seatbelt.js.map +1 -0
- package/dist/src/integrations/safety/type-checker.d.ts +53 -0
- package/dist/src/integrations/safety/type-checker.d.ts.map +1 -0
- package/dist/src/integrations/safety/type-checker.js +146 -0
- package/dist/src/integrations/safety/type-checker.js.map +1 -0
- package/dist/src/integrations/skills/skill-executor.d.ts +113 -0
- package/dist/src/integrations/skills/skill-executor.d.ts.map +1 -0
- package/dist/src/integrations/skills/skill-executor.js +266 -0
- package/dist/src/integrations/skills/skill-executor.js.map +1 -0
- package/dist/src/integrations/skills/skills.d.ts +262 -0
- package/dist/src/integrations/skills/skills.d.ts.map +1 -0
- package/dist/src/integrations/skills/skills.js +611 -0
- package/dist/src/integrations/skills/skills.js.map +1 -0
- package/dist/src/integrations/streaming/pty-shell.d.ts +169 -0
- package/dist/src/integrations/streaming/pty-shell.d.ts.map +1 -0
- package/dist/src/integrations/streaming/pty-shell.js +371 -0
- package/dist/src/integrations/streaming/pty-shell.js.map +1 -0
- package/dist/src/integrations/streaming/streaming.d.ts +102 -0
- package/dist/src/integrations/streaming/streaming.d.ts.map +1 -0
- package/dist/src/integrations/streaming/streaming.js +364 -0
- package/dist/src/integrations/streaming/streaming.js.map +1 -0
- package/dist/src/integrations/swarm/failure-classifier.d.ts.map +1 -1
- package/dist/src/integrations/swarm/failure-classifier.js +18 -3
- package/dist/src/integrations/swarm/failure-classifier.js.map +1 -1
- package/dist/src/integrations/swarm/index.d.ts +6 -5
- package/dist/src/integrations/swarm/index.d.ts.map +1 -1
- package/dist/src/integrations/swarm/index.js +5 -3
- package/dist/src/integrations/swarm/index.js.map +1 -1
- package/dist/src/integrations/swarm/model-selector.d.ts.map +1 -1
- package/dist/src/integrations/swarm/model-selector.js +21 -24
- package/dist/src/integrations/swarm/model-selector.js.map +1 -1
- package/dist/src/integrations/swarm/request-throttle.d.ts.map +1 -1
- package/dist/src/integrations/swarm/request-throttle.js +7 -4
- package/dist/src/integrations/swarm/request-throttle.js.map +1 -1
- package/dist/src/integrations/swarm/swarm-budget.d.ts +1 -1
- package/dist/src/integrations/swarm/swarm-budget.d.ts.map +1 -1
- package/dist/src/integrations/swarm/swarm-budget.js +1 -1
- package/dist/src/integrations/swarm/swarm-budget.js.map +1 -1
- package/dist/src/integrations/swarm/swarm-config-loader.d.ts.map +1 -1
- package/dist/src/integrations/swarm/swarm-config-loader.js +53 -17
- package/dist/src/integrations/swarm/swarm-config-loader.js.map +1 -1
- package/dist/src/integrations/swarm/swarm-event-bridge.d.ts.map +1 -1
- package/dist/src/integrations/swarm/swarm-event-bridge.js +69 -23
- package/dist/src/integrations/swarm/swarm-event-bridge.js.map +1 -1
- package/dist/src/integrations/swarm/swarm-events.d.ts +1 -1
- package/dist/src/integrations/swarm/swarm-events.d.ts.map +1 -1
- package/dist/src/integrations/swarm/swarm-events.js +1 -1
- package/dist/src/integrations/swarm/swarm-events.js.map +1 -1
- package/dist/src/integrations/swarm/swarm-execution.d.ts +27 -0
- package/dist/src/integrations/swarm/swarm-execution.d.ts.map +1 -0
- package/dist/src/integrations/swarm/swarm-execution.js +1071 -0
- package/dist/src/integrations/swarm/swarm-execution.js.map +1 -0
- package/dist/src/integrations/swarm/swarm-helpers.d.ts +26 -0
- package/dist/src/integrations/swarm/swarm-helpers.d.ts.map +1 -0
- package/dist/src/integrations/swarm/swarm-helpers.js +108 -0
- package/dist/src/integrations/swarm/swarm-helpers.js.map +1 -0
- package/dist/src/integrations/swarm/swarm-lifecycle.d.ts +100 -0
- package/dist/src/integrations/swarm/swarm-lifecycle.d.ts.map +1 -0
- package/dist/src/integrations/swarm/swarm-lifecycle.js +977 -0
- package/dist/src/integrations/swarm/swarm-lifecycle.js.map +1 -0
- package/dist/src/integrations/swarm/swarm-orchestrator.d.ts +84 -203
- package/dist/src/integrations/swarm/swarm-orchestrator.d.ts.map +1 -1
- package/dist/src/integrations/swarm/swarm-orchestrator.js +338 -2899
- package/dist/src/integrations/swarm/swarm-orchestrator.js.map +1 -1
- package/dist/src/integrations/swarm/swarm-quality-gate.d.ts.map +1 -1
- package/dist/src/integrations/swarm/swarm-quality-gate.js +19 -15
- package/dist/src/integrations/swarm/swarm-quality-gate.js.map +1 -1
- package/dist/src/integrations/swarm/swarm-recovery.d.ts +75 -0
- package/dist/src/integrations/swarm/swarm-recovery.d.ts.map +1 -0
- package/dist/src/integrations/swarm/swarm-recovery.js +563 -0
- package/dist/src/integrations/swarm/swarm-recovery.js.map +1 -0
- package/dist/src/integrations/swarm/swarm-state-store.d.ts.map +1 -1
- package/dist/src/integrations/swarm/swarm-state-store.js +8 -0
- package/dist/src/integrations/swarm/swarm-state-store.js.map +1 -1
- package/dist/src/integrations/swarm/task-queue.d.ts +8 -2
- package/dist/src/integrations/swarm/task-queue.d.ts.map +1 -1
- package/dist/src/integrations/swarm/task-queue.js +60 -26
- package/dist/src/integrations/swarm/task-queue.js.map +1 -1
- package/dist/src/integrations/swarm/types.d.ts +17 -5
- package/dist/src/integrations/swarm/types.d.ts.map +1 -1
- package/dist/src/integrations/swarm/types.js +89 -12
- package/dist/src/integrations/swarm/types.js.map +1 -1
- package/dist/src/integrations/swarm/worker-pool.d.ts +1 -1
- package/dist/src/integrations/swarm/worker-pool.d.ts.map +1 -1
- package/dist/src/integrations/swarm/worker-pool.js +43 -31
- package/dist/src/integrations/swarm/worker-pool.js.map +1 -1
- package/dist/src/integrations/tasks/dependency-analyzer.d.ts +34 -0
- package/dist/src/integrations/tasks/dependency-analyzer.d.ts.map +1 -0
- package/dist/src/integrations/tasks/dependency-analyzer.js +231 -0
- package/dist/src/integrations/tasks/dependency-analyzer.js.map +1 -0
- package/dist/src/integrations/tasks/interactive-planning.d.ts +322 -0
- package/dist/src/integrations/tasks/interactive-planning.d.ts.map +1 -0
- package/dist/src/integrations/tasks/interactive-planning.js +648 -0
- package/dist/src/integrations/tasks/interactive-planning.js.map +1 -0
- package/dist/src/integrations/tasks/pending-plan.d.ts +196 -0
- package/dist/src/integrations/tasks/pending-plan.d.ts.map +1 -0
- package/dist/src/integrations/tasks/pending-plan.js +431 -0
- package/dist/src/integrations/tasks/pending-plan.js.map +1 -0
- package/dist/src/integrations/tasks/planning.d.ts +115 -0
- package/dist/src/integrations/tasks/planning.d.ts.map +1 -0
- package/dist/src/integrations/tasks/planning.js +432 -0
- package/dist/src/integrations/tasks/planning.js.map +1 -0
- package/dist/src/integrations/tasks/smart-decomposer.d.ts +316 -0
- package/dist/src/integrations/tasks/smart-decomposer.d.ts.map +1 -0
- package/dist/src/integrations/tasks/smart-decomposer.js +668 -0
- package/dist/src/integrations/tasks/smart-decomposer.js.map +1 -0
- package/dist/src/integrations/tasks/task-manager.d.ts +164 -0
- package/dist/src/integrations/tasks/task-manager.d.ts.map +1 -0
- package/dist/src/integrations/tasks/task-manager.js +390 -0
- package/dist/src/integrations/tasks/task-manager.js.map +1 -0
- package/dist/src/integrations/tasks/task-splitter.d.ts +56 -0
- package/dist/src/integrations/tasks/task-splitter.d.ts.map +1 -0
- package/dist/src/integrations/tasks/task-splitter.js +542 -0
- package/dist/src/integrations/tasks/task-splitter.js.map +1 -0
- package/dist/src/integrations/tasks/verification-gate.d.ts +103 -0
- package/dist/src/integrations/tasks/verification-gate.d.ts.map +1 -0
- package/dist/src/integrations/tasks/verification-gate.js +195 -0
- package/dist/src/integrations/tasks/verification-gate.js.map +1 -0
- package/dist/src/integrations/tasks/work-log.d.ts +87 -0
- package/dist/src/integrations/tasks/work-log.d.ts.map +1 -0
- package/dist/src/integrations/tasks/work-log.js +287 -0
- package/dist/src/integrations/tasks/work-log.js.map +1 -0
- package/dist/src/integrations/utilities/capabilities.d.ts +160 -0
- package/dist/src/integrations/utilities/capabilities.d.ts.map +1 -0
- package/dist/src/integrations/utilities/capabilities.js +464 -0
- package/dist/src/integrations/utilities/capabilities.js.map +1 -0
- package/dist/src/integrations/utilities/diff-utils.d.ts +105 -0
- package/dist/src/integrations/utilities/diff-utils.d.ts.map +1 -0
- package/dist/src/integrations/utilities/diff-utils.js +496 -0
- package/dist/src/integrations/utilities/diff-utils.js.map +1 -0
- package/dist/src/integrations/utilities/environment-facts.d.ts +52 -0
- package/dist/src/integrations/utilities/environment-facts.d.ts.map +1 -0
- package/dist/src/integrations/utilities/environment-facts.js +94 -0
- package/dist/src/integrations/utilities/environment-facts.js.map +1 -0
- package/dist/src/integrations/utilities/file-change-tracker.d.ts +162 -0
- package/dist/src/integrations/utilities/file-change-tracker.d.ts.map +1 -0
- package/dist/src/integrations/utilities/file-change-tracker.js +537 -0
- package/dist/src/integrations/utilities/file-change-tracker.js.map +1 -0
- package/dist/src/integrations/utilities/graph-visualization.d.ts +72 -0
- package/dist/src/integrations/utilities/graph-visualization.d.ts.map +1 -0
- package/dist/src/integrations/utilities/graph-visualization.js +385 -0
- package/dist/src/integrations/utilities/graph-visualization.js.map +1 -0
- package/dist/src/integrations/utilities/hierarchical-config.d.ts +215 -0
- package/dist/src/integrations/utilities/hierarchical-config.d.ts.map +1 -0
- package/dist/src/integrations/utilities/hierarchical-config.js +508 -0
- package/dist/src/integrations/utilities/hierarchical-config.js.map +1 -0
- package/dist/src/integrations/utilities/hooks.d.ts +116 -0
- package/dist/src/integrations/utilities/hooks.d.ts.map +1 -0
- package/dist/src/integrations/utilities/hooks.js +410 -0
- package/dist/src/integrations/utilities/hooks.js.map +1 -0
- package/dist/src/integrations/utilities/ignore.d.ts +143 -0
- package/dist/src/integrations/utilities/ignore.d.ts.map +1 -0
- package/dist/src/integrations/utilities/ignore.js +417 -0
- package/dist/src/integrations/utilities/ignore.js.map +1 -0
- package/dist/src/integrations/utilities/image-renderer.d.ts +119 -0
- package/dist/src/integrations/utilities/image-renderer.d.ts.map +1 -0
- package/dist/src/integrations/utilities/image-renderer.js +301 -0
- package/dist/src/integrations/utilities/image-renderer.js.map +1 -0
- package/dist/src/integrations/utilities/logger.d.ts +104 -0
- package/dist/src/integrations/utilities/logger.d.ts.map +1 -0
- package/dist/src/integrations/utilities/logger.js +217 -0
- package/dist/src/integrations/utilities/logger.js.map +1 -0
- package/dist/src/integrations/utilities/memory.d.ts +116 -0
- package/dist/src/integrations/utilities/memory.d.ts.map +1 -0
- package/dist/src/integrations/utilities/memory.js +309 -0
- package/dist/src/integrations/utilities/memory.js.map +1 -0
- package/dist/src/integrations/utilities/observability.d.ts +162 -0
- package/dist/src/integrations/utilities/observability.d.ts.map +1 -0
- package/dist/src/integrations/utilities/observability.js +408 -0
- package/dist/src/integrations/utilities/observability.js.map +1 -0
- package/dist/src/integrations/utilities/openrouter-pricing.d.ts +67 -0
- package/dist/src/integrations/utilities/openrouter-pricing.d.ts.map +1 -0
- package/dist/src/integrations/utilities/openrouter-pricing.js +166 -0
- package/dist/src/integrations/utilities/openrouter-pricing.js.map +1 -0
- package/dist/src/integrations/utilities/react.d.ts +139 -0
- package/dist/src/integrations/utilities/react.d.ts.map +1 -0
- package/dist/src/integrations/utilities/react.js +269 -0
- package/dist/src/integrations/utilities/react.js.map +1 -0
- package/dist/src/integrations/utilities/retry.d.ts +132 -0
- package/dist/src/integrations/utilities/retry.d.ts.map +1 -0
- package/dist/src/integrations/utilities/retry.js +233 -0
- package/dist/src/integrations/utilities/retry.js.map +1 -0
- package/dist/src/integrations/utilities/routing.d.ts +118 -0
- package/dist/src/integrations/utilities/routing.d.ts.map +1 -0
- package/dist/src/integrations/utilities/routing.js +360 -0
- package/dist/src/integrations/utilities/routing.js.map +1 -0
- package/dist/src/integrations/utilities/rules.d.ts +131 -0
- package/dist/src/integrations/utilities/rules.d.ts.map +1 -0
- package/dist/src/integrations/utilities/rules.js +282 -0
- package/dist/src/integrations/utilities/rules.js.map +1 -0
- package/dist/src/integrations/utilities/sourcegraph.d.ts +169 -0
- package/dist/src/integrations/utilities/sourcegraph.d.ts.map +1 -0
- package/dist/src/integrations/utilities/sourcegraph.js +377 -0
- package/dist/src/integrations/utilities/sourcegraph.js.map +1 -0
- package/dist/src/integrations/utilities/thinking-strategy.d.ts +52 -0
- package/dist/src/integrations/utilities/thinking-strategy.d.ts.map +1 -0
- package/dist/src/integrations/utilities/thinking-strategy.js +129 -0
- package/dist/src/integrations/utilities/thinking-strategy.js.map +1 -0
- package/dist/src/integrations/utilities/thread-manager.d.ts +199 -0
- package/dist/src/integrations/utilities/thread-manager.d.ts.map +1 -0
- package/dist/src/integrations/utilities/thread-manager.js +359 -0
- package/dist/src/integrations/utilities/thread-manager.js.map +1 -0
- package/dist/src/integrations/utilities/token-estimate.d.ts +16 -0
- package/dist/src/integrations/utilities/token-estimate.d.ts.map +1 -0
- package/dist/src/integrations/utilities/token-estimate.js +20 -0
- package/dist/src/integrations/utilities/token-estimate.js.map +1 -0
- package/dist/src/main.js +50 -27
- package/dist/src/main.js.map +1 -1
- package/dist/src/modes/repl.d.ts.map +1 -1
- package/dist/src/modes/repl.js +73 -22
- package/dist/src/modes/repl.js.map +1 -1
- package/dist/src/modes/tui.d.ts.map +1 -1
- package/dist/src/modes/tui.js +93 -16
- package/dist/src/modes/tui.js.map +1 -1
- package/dist/src/modes.d.ts.map +1 -1
- package/dist/src/modes.js +14 -14
- package/dist/src/modes.js.map +1 -1
- package/dist/src/observability/tracer.d.ts.map +1 -1
- package/dist/src/observability/tracer.js +8 -4
- package/dist/src/observability/tracer.js.map +1 -1
- package/dist/src/observability/types.d.ts.map +1 -1
- package/dist/src/observability/types.js.map +1 -1
- package/dist/src/paths.d.ts.map +1 -1
- package/dist/src/paths.js +2 -6
- package/dist/src/paths.js.map +1 -1
- package/dist/src/persistence/migrator.d.ts.map +1 -1
- package/dist/src/persistence/migrator.js +7 -7
- package/dist/src/persistence/migrator.js.map +1 -1
- package/dist/src/persistence/schema.d.ts +2 -0
- package/dist/src/persistence/schema.d.ts.map +1 -1
- package/dist/src/persistence/schema.js +31 -0
- package/dist/src/persistence/schema.js.map +1 -1
- package/dist/src/providers/adapters/anthropic.d.ts +6 -0
- package/dist/src/providers/adapters/anthropic.d.ts.map +1 -1
- package/dist/src/providers/adapters/anthropic.js +132 -36
- package/dist/src/providers/adapters/anthropic.js.map +1 -1
- package/dist/src/providers/adapters/azure.d.ts +74 -0
- package/dist/src/providers/adapters/azure.d.ts.map +1 -0
- package/dist/src/providers/adapters/azure.js +369 -0
- package/dist/src/providers/adapters/azure.js.map +1 -0
- package/dist/src/providers/adapters/mock.d.ts +16 -2
- package/dist/src/providers/adapters/mock.d.ts.map +1 -1
- package/dist/src/providers/adapters/mock.js +51 -10
- package/dist/src/providers/adapters/mock.js.map +1 -1
- package/dist/src/providers/adapters/openai.d.ts +6 -1
- package/dist/src/providers/adapters/openai.d.ts.map +1 -1
- package/dist/src/providers/adapters/openai.js +57 -19
- package/dist/src/providers/adapters/openai.js.map +1 -1
- package/dist/src/providers/adapters/openrouter.d.ts +6 -0
- package/dist/src/providers/adapters/openrouter.d.ts.map +1 -1
- package/dist/src/providers/adapters/openrouter.js +127 -30
- package/dist/src/providers/adapters/openrouter.js.map +1 -1
- package/dist/src/providers/circuit-breaker.d.ts.map +1 -1
- package/dist/src/providers/circuit-breaker.js +4 -3
- package/dist/src/providers/circuit-breaker.js.map +1 -1
- package/dist/src/providers/fallback-chain.d.ts.map +1 -1
- package/dist/src/providers/fallback-chain.js +3 -3
- package/dist/src/providers/fallback-chain.js.map +1 -1
- package/dist/src/providers/llm-resilience.d.ts.map +1 -1
- package/dist/src/providers/llm-resilience.js +2 -2
- package/dist/src/providers/llm-resilience.js.map +1 -1
- package/dist/src/providers/provider.d.ts.map +1 -1
- package/dist/src/providers/provider.js +2 -3
- package/dist/src/providers/provider.js.map +1 -1
- package/dist/src/providers/resilient-fetch.d.ts.map +1 -1
- package/dist/src/providers/resilient-fetch.js +3 -4
- package/dist/src/providers/resilient-fetch.js.map +1 -1
- package/dist/src/providers/resilient-provider.d.ts.map +1 -1
- package/dist/src/providers/resilient-provider.js +9 -6
- package/dist/src/providers/resilient-provider.js.map +1 -1
- package/dist/src/providers/types.d.ts +23 -2
- package/dist/src/providers/types.d.ts.map +1 -1
- package/dist/src/session-picker.d.ts +1 -1
- package/dist/src/session-picker.d.ts.map +1 -1
- package/dist/src/session-picker.js +10 -6
- package/dist/src/session-picker.js.map +1 -1
- package/dist/src/shared/budget-tracker.d.ts.map +1 -1
- package/dist/src/shared/budget-tracker.js +2 -2
- package/dist/src/shared/budget-tracker.js.map +1 -1
- package/dist/src/shared/context-engine.d.ts.map +1 -1
- package/dist/src/shared/context-engine.js +1 -1
- package/dist/src/shared/context-engine.js.map +1 -1
- package/dist/src/shared/persistence.d.ts.map +1 -1
- package/dist/src/shared/persistence.js +2 -6
- package/dist/src/shared/persistence.js.map +1 -1
- package/dist/src/shared/shared-context-state.d.ts.map +1 -1
- package/dist/src/shared/shared-context-state.js.map +1 -1
- package/dist/src/shared/shared-economics-state.d.ts.map +1 -1
- package/dist/src/shared/shared-economics-state.js.map +1 -1
- package/dist/src/tools/agent.d.ts +2 -2
- package/dist/src/tools/agent.d.ts.map +1 -1
- package/dist/src/tools/agent.js +10 -7
- package/dist/src/tools/agent.js.map +1 -1
- package/dist/src/tools/bash.d.ts.map +1 -1
- package/dist/src/tools/bash.js +1 -1
- package/dist/src/tools/bash.js.map +1 -1
- package/dist/src/tools/coercion.js +1 -1
- package/dist/src/tools/coercion.js.map +1 -1
- package/dist/src/tools/file.d.ts.map +1 -1
- package/dist/src/tools/file.js +2 -2
- package/dist/src/tools/file.js.map +1 -1
- package/dist/src/tools/permission.js +7 -8
- package/dist/src/tools/permission.js.map +1 -1
- package/dist/src/tools/registry.d.ts +1 -1
- package/dist/src/tools/registry.d.ts.map +1 -1
- package/dist/src/tools/registry.js +4 -6
- package/dist/src/tools/registry.js.map +1 -1
- package/dist/src/tools/standard.d.ts.map +1 -1
- package/dist/src/tools/standard.js +1 -3
- package/dist/src/tools/standard.js.map +1 -1
- package/dist/src/tools/tasks.d.ts +1 -1
- package/dist/src/tools/tasks.d.ts.map +1 -1
- package/dist/src/tools/tasks.js +4 -4
- package/dist/src/tools/tasks.js.map +1 -1
- package/dist/src/tools/types.d.ts.map +1 -1
- package/dist/src/tools/types.js +5 -1
- package/dist/src/tools/types.js.map +1 -1
- package/dist/src/tools/undo.d.ts +1 -1
- package/dist/src/tools/undo.d.ts.map +1 -1
- package/dist/src/tools/undo.js +4 -2
- package/dist/src/tools/undo.js.map +1 -1
- package/dist/src/tracing/cache-boundary-tracker.d.ts.map +1 -1
- package/dist/src/tracing/cache-boundary-tracker.js +9 -13
- package/dist/src/tracing/cache-boundary-tracker.js.map +1 -1
- package/dist/src/tracing/trace-collector.d.ts +22 -0
- package/dist/src/tracing/trace-collector.d.ts.map +1 -1
- package/dist/src/tracing/trace-collector.js +55 -31
- package/dist/src/tracing/trace-collector.js.map +1 -1
- package/dist/src/tracing/types.d.ts +17 -1
- package/dist/src/tracing/types.d.ts.map +1 -1
- package/dist/src/tracing/types.js.map +1 -1
- package/dist/src/tricks/failure-evidence.d.ts.map +1 -1
- package/dist/src/tricks/failure-evidence.js +17 -27
- package/dist/src/tricks/failure-evidence.js.map +1 -1
- package/dist/src/tricks/json-utils.d.ts.map +1 -1
- package/dist/src/tricks/json-utils.js +1 -4
- package/dist/src/tricks/json-utils.js.map +1 -1
- package/dist/src/tricks/kv-cache-context.d.ts.map +1 -1
- package/dist/src/tricks/kv-cache-context.js +2 -3
- package/dist/src/tricks/kv-cache-context.js.map +1 -1
- package/dist/src/tricks/recitation.d.ts.map +1 -1
- package/dist/src/tricks/recitation.js +24 -19
- package/dist/src/tricks/recitation.js.map +1 -1
- package/dist/src/tricks/recursive-context.d.ts.map +1 -1
- package/dist/src/tricks/recursive-context.js +10 -7
- package/dist/src/tricks/recursive-context.js.map +1 -1
- package/dist/src/tricks/reversible-compaction.d.ts.map +1 -1
- package/dist/src/tricks/reversible-compaction.js +17 -9
- package/dist/src/tricks/reversible-compaction.js.map +1 -1
- package/dist/src/tricks/serialization-diversity.d.ts.map +1 -1
- package/dist/src/tricks/serialization-diversity.js +12 -12
- package/dist/src/tricks/serialization-diversity.js.map +1 -1
- package/dist/src/tui/app.d.ts +9 -5
- package/dist/src/tui/app.d.ts.map +1 -1
- package/dist/src/tui/app.js +690 -565
- package/dist/src/tui/app.js.map +1 -1
- package/dist/src/tui/components/ActiveAgentsPanel.d.ts +2 -0
- package/dist/src/tui/components/ActiveAgentsPanel.d.ts.map +1 -1
- package/dist/src/tui/components/ActiveAgentsPanel.js +5 -5
- package/dist/src/tui/components/ActiveAgentsPanel.js.map +1 -1
- package/dist/src/tui/components/ApprovalDialog.d.ts.map +1 -1
- package/dist/src/tui/components/ApprovalDialog.js +14 -0
- package/dist/src/tui/components/ApprovalDialog.js.map +1 -1
- package/dist/src/tui/components/BudgetExtensionDialog.d.ts +18 -0
- package/dist/src/tui/components/BudgetExtensionDialog.d.ts.map +1 -0
- package/dist/src/tui/components/BudgetExtensionDialog.js +40 -0
- package/dist/src/tui/components/BudgetExtensionDialog.js.map +1 -0
- package/dist/src/tui/components/CollapsibleDiffView.d.ts +1 -1
- package/dist/src/tui/components/CollapsibleDiffView.d.ts.map +1 -1
- package/dist/src/tui/components/CollapsibleDiffView.js +18 -13
- package/dist/src/tui/components/CollapsibleDiffView.js.map +1 -1
- package/dist/src/tui/components/DebugPanel.d.ts.map +1 -1
- package/dist/src/tui/components/DebugPanel.js +46 -26
- package/dist/src/tui/components/DebugPanel.js.map +1 -1
- package/dist/src/tui/components/DiagnosticsPanel.d.ts +24 -0
- package/dist/src/tui/components/DiagnosticsPanel.d.ts.map +1 -0
- package/dist/src/tui/components/DiagnosticsPanel.js +63 -0
- package/dist/src/tui/components/DiagnosticsPanel.js.map +1 -0
- package/dist/src/tui/components/DiffView.d.ts +1 -1
- package/dist/src/tui/components/DiffView.d.ts.map +1 -1
- package/dist/src/tui/components/DiffView.js +21 -14
- package/dist/src/tui/components/DiffView.js.map +1 -1
- package/dist/src/tui/components/ErrorBoundary.d.ts.map +1 -1
- package/dist/src/tui/components/ErrorBoundary.js +8 -3
- package/dist/src/tui/components/ErrorBoundary.js.map +1 -1
- package/dist/src/tui/components/ErrorDetailPanel.d.ts.map +1 -1
- package/dist/src/tui/components/ErrorDetailPanel.js +4 -4
- package/dist/src/tui/components/ErrorDetailPanel.js.map +1 -1
- package/dist/src/tui/components/FileChangeSummary.d.ts.map +1 -1
- package/dist/src/tui/components/FileChangeSummary.js +3 -3
- package/dist/src/tui/components/FileChangeSummary.js.map +1 -1
- package/dist/src/tui/components/InputArea.d.ts.map +1 -1
- package/dist/src/tui/components/InputArea.js +32 -15
- package/dist/src/tui/components/InputArea.js.map +1 -1
- package/dist/src/tui/components/LearningValidationDialog.d.ts +25 -0
- package/dist/src/tui/components/LearningValidationDialog.d.ts.map +1 -0
- package/dist/src/tui/components/LearningValidationDialog.js +35 -0
- package/dist/src/tui/components/LearningValidationDialog.js.map +1 -0
- package/dist/src/tui/components/MessageItem.d.ts.map +1 -1
- package/dist/src/tui/components/MessageItem.js.map +1 -1
- package/dist/src/tui/components/PlanPanel.d.ts +27 -0
- package/dist/src/tui/components/PlanPanel.d.ts.map +1 -0
- package/dist/src/tui/components/PlanPanel.js +45 -0
- package/dist/src/tui/components/PlanPanel.js.map +1 -0
- package/dist/src/tui/components/ScrollableBox.d.ts.map +1 -1
- package/dist/src/tui/components/ScrollableBox.js +2 -2
- package/dist/src/tui/components/ScrollableBox.js.map +1 -1
- package/dist/src/tui/components/SideBySideDiff.d.ts.map +1 -1
- package/dist/src/tui/components/SideBySideDiff.js +20 -18
- package/dist/src/tui/components/SideBySideDiff.js.map +1 -1
- package/dist/src/tui/components/StatusBar.d.ts +41 -0
- package/dist/src/tui/components/StatusBar.d.ts.map +1 -0
- package/dist/src/tui/components/StatusBar.js +114 -0
- package/dist/src/tui/components/StatusBar.js.map +1 -0
- package/dist/src/tui/components/SwarmStatusPanel.d.ts.map +1 -1
- package/dist/src/tui/components/SwarmStatusPanel.js +25 -17
- package/dist/src/tui/components/SwarmStatusPanel.js.map +1 -1
- package/dist/src/tui/components/TasksPanel.d.ts +1 -1
- package/dist/src/tui/components/TasksPanel.d.ts.map +1 -1
- package/dist/src/tui/components/TasksPanel.js +12 -11
- package/dist/src/tui/components/TasksPanel.js.map +1 -1
- package/dist/src/tui/components/ToolCallItem.d.ts.map +1 -1
- package/dist/src/tui/components/ToolCallItem.js +19 -6
- package/dist/src/tui/components/ToolCallItem.js.map +1 -1
- package/dist/src/tui/components/ToolCallsPanel.d.ts +15 -0
- package/dist/src/tui/components/ToolCallsPanel.d.ts.map +1 -0
- package/dist/src/tui/components/ToolCallsPanel.js +34 -0
- package/dist/src/tui/components/ToolCallsPanel.js.map +1 -0
- package/dist/src/tui/components/TransparencyPanel.d.ts +15 -0
- package/dist/src/tui/components/TransparencyPanel.d.ts.map +1 -0
- package/dist/src/tui/components/TransparencyPanel.js +46 -0
- package/dist/src/tui/components/TransparencyPanel.js.map +1 -0
- package/dist/src/tui/components/index.d.ts +8 -2
- package/dist/src/tui/components/index.d.ts.map +1 -1
- package/dist/src/tui/components/index.js +14 -2
- package/dist/src/tui/components/index.js.map +1 -1
- package/dist/src/tui/event-display.d.ts.map +1 -1
- package/dist/src/tui/event-display.js +13 -4
- package/dist/src/tui/event-display.js.map +1 -1
- package/dist/src/tui/hooks/index.d.ts +1 -0
- package/dist/src/tui/hooks/index.d.ts.map +1 -1
- package/dist/src/tui/hooks/index.js +1 -0
- package/dist/src/tui/hooks/index.js.map +1 -1
- package/dist/src/tui/hooks/use-agent-events.d.ts +53 -0
- package/dist/src/tui/hooks/use-agent-events.d.ts.map +1 -0
- package/dist/src/tui/hooks/use-agent-events.js +444 -0
- package/dist/src/tui/hooks/use-agent-events.js.map +1 -0
- package/dist/src/tui/hooks/use-throttled-state.d.ts +18 -0
- package/dist/src/tui/hooks/use-throttled-state.d.ts.map +1 -0
- package/dist/src/tui/hooks/use-throttled-state.js +93 -0
- package/dist/src/tui/hooks/use-throttled-state.js.map +1 -0
- package/dist/src/tui/hooks/useMessagePruning.d.ts.map +1 -1
- package/dist/src/tui/hooks/useMessagePruning.js.map +1 -1
- package/dist/src/tui/index.d.ts +2 -2
- package/dist/src/tui/index.d.ts.map +1 -1
- package/dist/src/tui/index.js +102 -7
- package/dist/src/tui/index.js.map +1 -1
- package/dist/src/tui/input/CommandPalette.d.ts.map +1 -1
- package/dist/src/tui/input/CommandPalette.js +2 -2
- package/dist/src/tui/input/CommandPalette.js.map +1 -1
- package/dist/src/tui/input/index.d.ts +1 -1
- package/dist/src/tui/input/index.d.ts.map +1 -1
- package/dist/src/tui/input/index.js +1 -1
- package/dist/src/tui/input/index.js.map +1 -1
- package/dist/src/tui/syntax/languages/bash.js +94 -16
- package/dist/src/tui/syntax/languages/bash.js.map +1 -1
- package/dist/src/tui/syntax/languages/javascript.js +65 -12
- package/dist/src/tui/syntax/languages/javascript.js.map +1 -1
- package/dist/src/tui/syntax/languages/json.js.map +1 -1
- package/dist/src/tui/syntax/languages/python.js +81 -15
- package/dist/src/tui/syntax/languages/python.js.map +1 -1
- package/dist/src/tui/theme/index.js.map +1 -1
- package/dist/src/tui/transparency-aggregator.d.ts +13 -0
- package/dist/src/tui/transparency-aggregator.d.ts.map +1 -1
- package/dist/src/tui/transparency-aggregator.js +39 -4
- package/dist/src/tui/transparency-aggregator.js.map +1 -1
- package/dist/src/tui/types.d.ts.map +1 -1
- package/dist/src/tui/types.js.map +1 -1
- package/dist/src/tui/utils/keyboard.d.ts.map +1 -1
- package/dist/src/tui/utils/keyboard.js.map +1 -1
- package/dist/src/types.d.ts +39 -2
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verification Gate - Opt-in Completion Verification
|
|
3
|
+
*
|
|
4
|
+
* Prevents premature completion by checking if required verification
|
|
5
|
+
* steps (like running tests) have been performed before allowing
|
|
6
|
+
* the agent to stop.
|
|
7
|
+
*
|
|
8
|
+
* Configuration:
|
|
9
|
+
* - TUI mode: off by default
|
|
10
|
+
* - Eval mode: auto-configured from FAIL_TO_PASS tests
|
|
11
|
+
* - Swarm mode: set by orchestrator per worker
|
|
12
|
+
*/
|
|
13
|
+
export interface VerificationCriteria {
|
|
14
|
+
/** Tests that must be run (e.g., pytest test paths) */
|
|
15
|
+
requiredTests?: string[];
|
|
16
|
+
/** Must have edited at least one file */
|
|
17
|
+
requireFileChanges?: boolean;
|
|
18
|
+
/** Max nudges before giving up and allowing completion */
|
|
19
|
+
maxAttempts?: number;
|
|
20
|
+
/** Require TypeScript compilation to pass before completion */
|
|
21
|
+
requireCompilation?: boolean;
|
|
22
|
+
/** Max compilation-specific nudges before giving up (default: 8) */
|
|
23
|
+
compilationMaxAttempts?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface VerificationState {
|
|
26
|
+
/** Tests that have been detected as run */
|
|
27
|
+
testsRun: Set<string>;
|
|
28
|
+
/** Whether any test passed */
|
|
29
|
+
anyTestPassed: boolean;
|
|
30
|
+
/** Whether file changes were made */
|
|
31
|
+
hasFileChanges: boolean;
|
|
32
|
+
/** Number of verification nudges already sent */
|
|
33
|
+
nudgeCount: number;
|
|
34
|
+
/** Whether TypeScript compilation passed */
|
|
35
|
+
compilationPassed: boolean;
|
|
36
|
+
/** Number of TypeScript compilation errors */
|
|
37
|
+
compilationErrorCount: number;
|
|
38
|
+
/** Number of compilation-specific nudges sent */
|
|
39
|
+
compilationNudgeCount: number;
|
|
40
|
+
}
|
|
41
|
+
export interface VerificationCheckResult {
|
|
42
|
+
/** Whether verification criteria are satisfied */
|
|
43
|
+
satisfied: boolean;
|
|
44
|
+
/** If not satisfied, a nudge message to inject */
|
|
45
|
+
nudge?: string;
|
|
46
|
+
/** If max attempts exceeded, allow anyway */
|
|
47
|
+
forceAllow: boolean;
|
|
48
|
+
/** What's still missing */
|
|
49
|
+
missing: string[];
|
|
50
|
+
}
|
|
51
|
+
export declare class VerificationGate {
|
|
52
|
+
private criteria;
|
|
53
|
+
private state;
|
|
54
|
+
constructor(criteria: VerificationCriteria);
|
|
55
|
+
/**
|
|
56
|
+
* Record that a bash command was executed.
|
|
57
|
+
* Detects test execution from command patterns and output.
|
|
58
|
+
*/
|
|
59
|
+
recordBashExecution(command: string, output: string, exitCode: number | null): void;
|
|
60
|
+
/**
|
|
61
|
+
* Record that a file was modified.
|
|
62
|
+
*/
|
|
63
|
+
recordFileChange(): void;
|
|
64
|
+
/**
|
|
65
|
+
* Record the result of a TypeScript compilation check.
|
|
66
|
+
*/
|
|
67
|
+
recordCompilationResult(passed: boolean, errorCount: number): void;
|
|
68
|
+
/**
|
|
69
|
+
* Increment the compilation nudge counter.
|
|
70
|
+
* Called from the TSC gate in the execution loop (which uses `continue`
|
|
71
|
+
* and therefore never reaches verificationGate.check()).
|
|
72
|
+
*/
|
|
73
|
+
incrementCompilationNudge(): void;
|
|
74
|
+
/**
|
|
75
|
+
* Check if the agent can complete.
|
|
76
|
+
* Returns satisfied=true if criteria are met, or a nudge message if not.
|
|
77
|
+
*/
|
|
78
|
+
check(): VerificationCheckResult;
|
|
79
|
+
/**
|
|
80
|
+
* Get the current verification state.
|
|
81
|
+
*/
|
|
82
|
+
getState(): {
|
|
83
|
+
testsRun: number;
|
|
84
|
+
anyTestPassed: boolean;
|
|
85
|
+
hasFileChanges: boolean;
|
|
86
|
+
nudgeCount: number;
|
|
87
|
+
maxAttempts: number;
|
|
88
|
+
compilationPassed: boolean;
|
|
89
|
+
compilationErrorCount: number;
|
|
90
|
+
compilationNudgeCount: number;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Reset the gate state (for reuse).
|
|
94
|
+
*/
|
|
95
|
+
reset(): void;
|
|
96
|
+
private buildNudge;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Create a verification gate from criteria.
|
|
100
|
+
* Returns null if no criteria provided (gate disabled).
|
|
101
|
+
*/
|
|
102
|
+
export declare function createVerificationGate(criteria?: VerificationCriteria | null): VerificationGate | null;
|
|
103
|
+
//# sourceMappingURL=verification-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verification-gate.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tasks/verification-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,MAAM,WAAW,oBAAoB;IACnC,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,yCAAyC;IACzC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,oEAAoE;IACpE,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,iBAAiB;IAChC,2CAA2C;IAC3C,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,8BAA8B;IAC9B,aAAa,EAAE,OAAO,CAAC;IACvB,qCAAqC;IACrC,cAAc,EAAE,OAAO,CAAC;IACxB,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,iBAAiB,EAAE,OAAO,CAAC;IAC3B,8CAA8C;IAC9C,qBAAqB,EAAE,MAAM,CAAC;IAC9B,iDAAiD;IACjD,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAuB;IACtC,kDAAkD;IAClD,SAAS,EAAE,OAAO,CAAC;IACnB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,UAAU,EAAE,OAAO,CAAC;IACpB,2BAA2B;IAC3B,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAMD,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,KAAK,CAAoB;gBAErB,QAAQ,EAAE,oBAAoB;IAoB1C;;;OAGG;IACH,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAoBnF;;OAEG;IACH,gBAAgB,IAAI,IAAI;IAIxB;;OAEG;IACH,uBAAuB,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IAKlE;;;;OAIG;IACH,yBAAyB,IAAI,IAAI;IAIjC;;;OAGG;IACH,KAAK,IAAI,uBAAuB;IAyDhC;;OAEG;IACH,QAAQ,IAAI;QACV,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,OAAO,CAAC;QACvB,cAAc,EAAE,OAAO,CAAC;QACxB,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,iBAAiB,EAAE,OAAO,CAAC;QAC3B,qBAAqB,EAAE,MAAM,CAAC;QAC9B,qBAAqB,EAAE,MAAM,CAAC;KAC/B;IAaD;;OAEG;IACH,KAAK,IAAI,IAAI;IAgBb,OAAO,CAAC,UAAU;CAoBnB;AAMD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,CAAC,EAAE,oBAAoB,GAAG,IAAI,GACrC,gBAAgB,GAAG,IAAI,CAUzB"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verification Gate - Opt-in Completion Verification
|
|
3
|
+
*
|
|
4
|
+
* Prevents premature completion by checking if required verification
|
|
5
|
+
* steps (like running tests) have been performed before allowing
|
|
6
|
+
* the agent to stop.
|
|
7
|
+
*
|
|
8
|
+
* Configuration:
|
|
9
|
+
* - TUI mode: off by default
|
|
10
|
+
* - Eval mode: auto-configured from FAIL_TO_PASS tests
|
|
11
|
+
* - Swarm mode: set by orchestrator per worker
|
|
12
|
+
*/
|
|
13
|
+
// =============================================================================
|
|
14
|
+
// VERIFICATION GATE
|
|
15
|
+
// =============================================================================
|
|
16
|
+
export class VerificationGate {
|
|
17
|
+
criteria;
|
|
18
|
+
state;
|
|
19
|
+
constructor(criteria) {
|
|
20
|
+
this.criteria = {
|
|
21
|
+
requiredTests: criteria.requiredTests,
|
|
22
|
+
requireFileChanges: criteria.requireFileChanges ?? false,
|
|
23
|
+
maxAttempts: criteria.maxAttempts ?? 2,
|
|
24
|
+
requireCompilation: criteria.requireCompilation,
|
|
25
|
+
compilationMaxAttempts: criteria.compilationMaxAttempts,
|
|
26
|
+
};
|
|
27
|
+
this.state = {
|
|
28
|
+
testsRun: new Set(),
|
|
29
|
+
anyTestPassed: false,
|
|
30
|
+
hasFileChanges: false,
|
|
31
|
+
nudgeCount: 0,
|
|
32
|
+
compilationPassed: false,
|
|
33
|
+
compilationErrorCount: 0,
|
|
34
|
+
compilationNudgeCount: 0,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Record that a bash command was executed.
|
|
39
|
+
* Detects test execution from command patterns and output.
|
|
40
|
+
*/
|
|
41
|
+
recordBashExecution(command, output, exitCode) {
|
|
42
|
+
// Detect pytest/test runs
|
|
43
|
+
const isTestRun = /pytest|python\s+-m\s+pytest/.test(command);
|
|
44
|
+
if (isTestRun) {
|
|
45
|
+
this.state.testsRun.add(command);
|
|
46
|
+
if (exitCode === 0) {
|
|
47
|
+
this.state.anyTestPassed = true;
|
|
48
|
+
}
|
|
49
|
+
// Check if specific required tests were run
|
|
50
|
+
if (this.criteria.requiredTests) {
|
|
51
|
+
for (const req of this.criteria.requiredTests) {
|
|
52
|
+
if (command.includes(req) || output.includes(req)) {
|
|
53
|
+
this.state.testsRun.add(req);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Record that a file was modified.
|
|
61
|
+
*/
|
|
62
|
+
recordFileChange() {
|
|
63
|
+
this.state.hasFileChanges = true;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Record the result of a TypeScript compilation check.
|
|
67
|
+
*/
|
|
68
|
+
recordCompilationResult(passed, errorCount) {
|
|
69
|
+
this.state.compilationPassed = passed;
|
|
70
|
+
this.state.compilationErrorCount = errorCount;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Increment the compilation nudge counter.
|
|
74
|
+
* Called from the TSC gate in the execution loop (which uses `continue`
|
|
75
|
+
* and therefore never reaches verificationGate.check()).
|
|
76
|
+
*/
|
|
77
|
+
incrementCompilationNudge() {
|
|
78
|
+
this.state.compilationNudgeCount++;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Check if the agent can complete.
|
|
82
|
+
* Returns satisfied=true if criteria are met, or a nudge message if not.
|
|
83
|
+
*/
|
|
84
|
+
check() {
|
|
85
|
+
const missing = [];
|
|
86
|
+
// Check file changes
|
|
87
|
+
if (this.criteria.requireFileChanges && !this.state.hasFileChanges) {
|
|
88
|
+
missing.push('No file changes made');
|
|
89
|
+
}
|
|
90
|
+
// Check required tests
|
|
91
|
+
if (this.criteria.requiredTests && this.criteria.requiredTests.length > 0) {
|
|
92
|
+
if (this.state.testsRun.size === 0) {
|
|
93
|
+
missing.push('Required tests have not been run');
|
|
94
|
+
}
|
|
95
|
+
else if (!this.state.anyTestPassed) {
|
|
96
|
+
missing.push('Tests ran but none passed');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// Check TypeScript compilation
|
|
100
|
+
if (this.criteria.requireCompilation && !this.state.compilationPassed) {
|
|
101
|
+
missing.push(`TypeScript compilation has ${this.state.compilationErrorCount} error(s)`);
|
|
102
|
+
}
|
|
103
|
+
// All criteria met
|
|
104
|
+
if (missing.length === 0) {
|
|
105
|
+
return { satisfied: true, forceAllow: false, missing: [] };
|
|
106
|
+
}
|
|
107
|
+
// Determine if we should force-allow:
|
|
108
|
+
// Test nudges and compilation nudges have separate counters and limits.
|
|
109
|
+
// Force-allow only when ALL exceeded nudge categories have hit their limits.
|
|
110
|
+
const testNudgesExceeded = this.state.nudgeCount >= (this.criteria.maxAttempts ?? 2);
|
|
111
|
+
const compilationMaxNudges = this.criteria.compilationMaxAttempts ?? 8;
|
|
112
|
+
const compilationNudgesExceeded = this.state.compilationNudgeCount >= compilationMaxNudges;
|
|
113
|
+
const hasTestMissing = missing.some((m) => !m.startsWith('TypeScript compilation'));
|
|
114
|
+
const hasCompilationMissing = this.criteria.requireCompilation && !this.state.compilationPassed;
|
|
115
|
+
const allExceeded = (!hasTestMissing || testNudgesExceeded) &&
|
|
116
|
+
(!hasCompilationMissing || compilationNudgesExceeded);
|
|
117
|
+
if (allExceeded) {
|
|
118
|
+
return { satisfied: false, forceAllow: true, missing };
|
|
119
|
+
}
|
|
120
|
+
// Increment appropriate nudge counters
|
|
121
|
+
if (hasTestMissing) {
|
|
122
|
+
this.state.nudgeCount++;
|
|
123
|
+
}
|
|
124
|
+
if (hasCompilationMissing) {
|
|
125
|
+
this.state.compilationNudgeCount++;
|
|
126
|
+
}
|
|
127
|
+
const nudge = this.buildNudge(missing);
|
|
128
|
+
return { satisfied: false, forceAllow: false, nudge, missing };
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Get the current verification state.
|
|
132
|
+
*/
|
|
133
|
+
getState() {
|
|
134
|
+
return {
|
|
135
|
+
testsRun: this.state.testsRun.size,
|
|
136
|
+
anyTestPassed: this.state.anyTestPassed,
|
|
137
|
+
hasFileChanges: this.state.hasFileChanges,
|
|
138
|
+
nudgeCount: this.state.nudgeCount,
|
|
139
|
+
maxAttempts: this.criteria.maxAttempts ?? 2,
|
|
140
|
+
compilationPassed: this.state.compilationPassed,
|
|
141
|
+
compilationErrorCount: this.state.compilationErrorCount,
|
|
142
|
+
compilationNudgeCount: this.state.compilationNudgeCount,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Reset the gate state (for reuse).
|
|
147
|
+
*/
|
|
148
|
+
reset() {
|
|
149
|
+
this.state = {
|
|
150
|
+
testsRun: new Set(),
|
|
151
|
+
anyTestPassed: false,
|
|
152
|
+
hasFileChanges: false,
|
|
153
|
+
nudgeCount: 0,
|
|
154
|
+
compilationPassed: false,
|
|
155
|
+
compilationErrorCount: 0,
|
|
156
|
+
compilationNudgeCount: 0,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
// ---------------------------------------------------------------------------
|
|
160
|
+
// PRIVATE
|
|
161
|
+
// ---------------------------------------------------------------------------
|
|
162
|
+
buildNudge(missing) {
|
|
163
|
+
const parts = ['[System] Verification incomplete:'];
|
|
164
|
+
for (const m of missing) {
|
|
165
|
+
parts.push(`- ${m}`);
|
|
166
|
+
}
|
|
167
|
+
if (this.criteria.requiredTests && this.criteria.requiredTests.length > 0) {
|
|
168
|
+
const testCmd = `python -m pytest ${this.criteria.requiredTests.join(' ')} -xvs`;
|
|
169
|
+
parts.push(`\nRun the required tests now: \`${testCmd}\``);
|
|
170
|
+
}
|
|
171
|
+
if (this.criteria.requireCompilation && !this.state.compilationPassed) {
|
|
172
|
+
parts.push(`\nRun \`npx tsc --noEmit\` and fix the ${this.state.compilationErrorCount} TypeScript error(s).`);
|
|
173
|
+
}
|
|
174
|
+
parts.push('Do NOT finish until verification is complete.');
|
|
175
|
+
return parts.join('\n');
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
// =============================================================================
|
|
179
|
+
// FACTORY
|
|
180
|
+
// =============================================================================
|
|
181
|
+
/**
|
|
182
|
+
* Create a verification gate from criteria.
|
|
183
|
+
* Returns null if no criteria provided (gate disabled).
|
|
184
|
+
*/
|
|
185
|
+
export function createVerificationGate(criteria) {
|
|
186
|
+
if (!criteria)
|
|
187
|
+
return null;
|
|
188
|
+
// Only create if there's something to verify
|
|
189
|
+
if (!criteria.requiredTests?.length &&
|
|
190
|
+
!criteria.requireFileChanges &&
|
|
191
|
+
!criteria.requireCompilation)
|
|
192
|
+
return null;
|
|
193
|
+
return new VerificationGate(criteria);
|
|
194
|
+
}
|
|
195
|
+
//# sourceMappingURL=verification-gate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verification-gate.js","sourceRoot":"","sources":["../../../../src/integrations/tasks/verification-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA+CH,gFAAgF;AAChF,oBAAoB;AACpB,gFAAgF;AAEhF,MAAM,OAAO,gBAAgB;IACnB,QAAQ,CAAuB;IAC/B,KAAK,CAAoB;IAEjC,YAAY,QAA8B;QACxC,IAAI,CAAC,QAAQ,GAAG;YACd,aAAa,EAAE,QAAQ,CAAC,aAAa;YACrC,kBAAkB,EAAE,QAAQ,CAAC,kBAAkB,IAAI,KAAK;YACxD,WAAW,EAAE,QAAQ,CAAC,WAAW,IAAI,CAAC;YACtC,kBAAkB,EAAE,QAAQ,CAAC,kBAAkB;YAC/C,sBAAsB,EAAE,QAAQ,CAAC,sBAAsB;SACxD,CAAC;QAEF,IAAI,CAAC,KAAK,GAAG;YACX,QAAQ,EAAE,IAAI,GAAG,EAAE;YACnB,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,KAAK;YACrB,UAAU,EAAE,CAAC;YACb,iBAAiB,EAAE,KAAK;YACxB,qBAAqB,EAAE,CAAC;YACxB,qBAAqB,EAAE,CAAC;SACzB,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,mBAAmB,CAAC,OAAe,EAAE,MAAc,EAAE,QAAuB;QAC1E,0BAA0B;QAC1B,MAAM,SAAS,GAAG,6BAA6B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC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O,IAAI,CAAC;IAC3B,6CAA6C;IAC7C,IACE,CAAC,QAAQ,CAAC,aAAa,EAAE,MAAM;QAC/B,CAAC,QAAQ,CAAC,kBAAkB;QAC5B,CAAC,QAAQ,CAAC,kBAAkB;QAE5B,OAAO,IAAI,CAAC;IACd,OAAO,IAAI,gBAAgB,CAAC,QAAQ,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Work Log - Compaction-Resilient Structured Summary
|
|
3
|
+
*
|
|
4
|
+
* Maintains a persistent structured summary of agent work that survives
|
|
5
|
+
* context compaction. Auto-populated from tool execution results.
|
|
6
|
+
*
|
|
7
|
+
* When context is compacted, the work log is injected as a system message
|
|
8
|
+
* so the agent doesn't "forget" what it has already done (preventing
|
|
9
|
+
* re-reading files, re-searching, etc.).
|
|
10
|
+
*/
|
|
11
|
+
export interface WorkLogEntry {
|
|
12
|
+
timestamp: number;
|
|
13
|
+
type: 'file_read' | 'file_edit' | 'search' | 'test_run' | 'command' | 'approach';
|
|
14
|
+
summary: string;
|
|
15
|
+
}
|
|
16
|
+
export interface TestResult {
|
|
17
|
+
test: string;
|
|
18
|
+
passed: boolean;
|
|
19
|
+
error?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ApproachEntry {
|
|
22
|
+
approach: string;
|
|
23
|
+
outcome: 'success' | 'failure' | 'partial';
|
|
24
|
+
detail?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface WorkLogConfig {
|
|
27
|
+
/** Maximum number of entries per category before oldest are dropped */
|
|
28
|
+
maxEntriesPerCategory?: number;
|
|
29
|
+
/** Maximum token count for compact output */
|
|
30
|
+
maxCompactTokens?: number;
|
|
31
|
+
}
|
|
32
|
+
export declare class WorkLog {
|
|
33
|
+
private currentHypothesis;
|
|
34
|
+
private filesRead;
|
|
35
|
+
private filesModified;
|
|
36
|
+
private testResults;
|
|
37
|
+
private approachesTried;
|
|
38
|
+
private commands;
|
|
39
|
+
private config;
|
|
40
|
+
constructor(config?: WorkLogConfig);
|
|
41
|
+
/**
|
|
42
|
+
* Record a tool execution result into the work log.
|
|
43
|
+
* Called automatically after each tool call in agent.ts.
|
|
44
|
+
*/
|
|
45
|
+
recordToolExecution(toolName: string, args: Record<string, unknown>, result?: unknown): void;
|
|
46
|
+
/**
|
|
47
|
+
* Record an approach the agent tried and its outcome.
|
|
48
|
+
*/
|
|
49
|
+
recordApproach(approach: string, outcome: ApproachEntry['outcome'], detail?: string): void;
|
|
50
|
+
/**
|
|
51
|
+
* Set the current working hypothesis.
|
|
52
|
+
*/
|
|
53
|
+
setHypothesis(hypothesis: string): void;
|
|
54
|
+
/**
|
|
55
|
+
* Generate a compact string representation (~500 tokens) for injection
|
|
56
|
+
* after context compaction.
|
|
57
|
+
*/
|
|
58
|
+
toCompactString(): string;
|
|
59
|
+
/**
|
|
60
|
+
* Produce a truncated compact string that fits within the character budget.
|
|
61
|
+
* Keeps fewer entries per category to stay within limits.
|
|
62
|
+
*/
|
|
63
|
+
private toCompactStringTruncated;
|
|
64
|
+
/**
|
|
65
|
+
* Check if the work log has any content worth injecting.
|
|
66
|
+
*/
|
|
67
|
+
hasContent(): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Get basic stats about the work log.
|
|
70
|
+
*/
|
|
71
|
+
getStats(): {
|
|
72
|
+
filesRead: number;
|
|
73
|
+
filesModified: number;
|
|
74
|
+
testResults: number;
|
|
75
|
+
approaches: number;
|
|
76
|
+
commands: number;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Reset the work log.
|
|
80
|
+
*/
|
|
81
|
+
reset(): void;
|
|
82
|
+
private summarizeFileContent;
|
|
83
|
+
private parseTestResults;
|
|
84
|
+
private trimMap;
|
|
85
|
+
}
|
|
86
|
+
export declare function createWorkLog(config?: WorkLogConfig): WorkLog;
|
|
87
|
+
//# sourceMappingURL=work-log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-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