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,264 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session, checkpoint, and file-change tracking API.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from ProductionAgent to keep agent.ts focused on orchestration.
|
|
5
|
+
* Each function takes a `SessionApiDeps` object that exposes the private
|
|
6
|
+
* fields it needs, plus explicit parameters that mirror the original
|
|
7
|
+
* method signatures.
|
|
8
|
+
*/
|
|
9
|
+
import { createComponentLogger } from '../integrations/utilities/logger.js';
|
|
10
|
+
const log = createComponentLogger('SessionApi');
|
|
11
|
+
// =============================================================================
|
|
12
|
+
// FILE CHANGE TRACKING
|
|
13
|
+
// =============================================================================
|
|
14
|
+
/**
|
|
15
|
+
* Record a file change for potential undo.
|
|
16
|
+
* No-op if file change tracking is not enabled.
|
|
17
|
+
*
|
|
18
|
+
* @returns Change ID if tracked, -1 otherwise
|
|
19
|
+
*/
|
|
20
|
+
export async function trackFileChange(deps, params) {
|
|
21
|
+
if (!deps.fileChangeTracker) {
|
|
22
|
+
return -1;
|
|
23
|
+
}
|
|
24
|
+
return deps.fileChangeTracker.recordChange({
|
|
25
|
+
filePath: params.filePath,
|
|
26
|
+
operation: params.operation,
|
|
27
|
+
contentBefore: params.contentBefore,
|
|
28
|
+
contentAfter: params.contentAfter,
|
|
29
|
+
turnNumber: deps.state.iteration,
|
|
30
|
+
toolCallId: params.toolCallId,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Undo the last change to a specific file.
|
|
35
|
+
* Returns null if file change tracking is not enabled.
|
|
36
|
+
*/
|
|
37
|
+
export async function undoLastFileChange(deps, filePath) {
|
|
38
|
+
if (!deps.fileChangeTracker) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
return deps.fileChangeTracker.undoLastChange(filePath);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Undo all changes in the current turn.
|
|
45
|
+
* Returns null if file change tracking is not enabled.
|
|
46
|
+
*/
|
|
47
|
+
export async function undoCurrentTurn(deps) {
|
|
48
|
+
if (!deps.fileChangeTracker) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
return deps.fileChangeTracker.undoTurn(deps.state.iteration);
|
|
52
|
+
}
|
|
53
|
+
// =============================================================================
|
|
54
|
+
// STATE RESET
|
|
55
|
+
// =============================================================================
|
|
56
|
+
/**
|
|
57
|
+
* Reset agent state to initial values.
|
|
58
|
+
*/
|
|
59
|
+
export function reset(deps) {
|
|
60
|
+
deps.state.status = 'idle';
|
|
61
|
+
deps.state.messages = [];
|
|
62
|
+
deps.state.plan = undefined;
|
|
63
|
+
deps.state.memoryContext = [];
|
|
64
|
+
deps.state.metrics = {
|
|
65
|
+
totalTokens: 0,
|
|
66
|
+
inputTokens: 0,
|
|
67
|
+
outputTokens: 0,
|
|
68
|
+
estimatedCost: 0,
|
|
69
|
+
llmCalls: 0,
|
|
70
|
+
toolCalls: 0,
|
|
71
|
+
duration: 0,
|
|
72
|
+
successCount: 0,
|
|
73
|
+
failureCount: 0,
|
|
74
|
+
cancelCount: 0,
|
|
75
|
+
retryCount: 0,
|
|
76
|
+
};
|
|
77
|
+
deps.state.iteration = 0;
|
|
78
|
+
deps.memory?.clear();
|
|
79
|
+
deps.observability?.metrics?.reset();
|
|
80
|
+
deps.planning?.clearPlan();
|
|
81
|
+
deps.observability?.logger?.info('Agent state reset');
|
|
82
|
+
}
|
|
83
|
+
// =============================================================================
|
|
84
|
+
// MESSAGE LOADING (deprecated)
|
|
85
|
+
// =============================================================================
|
|
86
|
+
/**
|
|
87
|
+
* Load messages from a previous session.
|
|
88
|
+
* @deprecated Use loadState() for full state restoration
|
|
89
|
+
*/
|
|
90
|
+
export function loadMessages(deps, messages) {
|
|
91
|
+
deps.state.messages = [...messages];
|
|
92
|
+
// Sync to threadManager if enabled
|
|
93
|
+
if (deps.threadManager) {
|
|
94
|
+
const thread = deps.threadManager.getActiveThread();
|
|
95
|
+
thread.messages = [...messages];
|
|
96
|
+
}
|
|
97
|
+
deps.observability?.logger?.info('Messages loaded', { count: messages.length });
|
|
98
|
+
}
|
|
99
|
+
// =============================================================================
|
|
100
|
+
// SERIALIZABLE STATE
|
|
101
|
+
// =============================================================================
|
|
102
|
+
/**
|
|
103
|
+
* Serializable state for checkpoints (excludes non-serializable fields).
|
|
104
|
+
*/
|
|
105
|
+
export function getSerializableState(deps) {
|
|
106
|
+
return {
|
|
107
|
+
messages: deps.state.messages,
|
|
108
|
+
iteration: deps.state.iteration,
|
|
109
|
+
metrics: { ...deps.state.metrics },
|
|
110
|
+
plan: deps.state.plan ? { ...deps.state.plan } : undefined,
|
|
111
|
+
memoryContext: deps.state.memoryContext ? [...deps.state.memoryContext] : undefined,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
// =============================================================================
|
|
115
|
+
// CHECKPOINT VALIDATION
|
|
116
|
+
// =============================================================================
|
|
117
|
+
/**
|
|
118
|
+
* Validate checkpoint data before loading.
|
|
119
|
+
* Returns validation result with errors and warnings.
|
|
120
|
+
*/
|
|
121
|
+
export function validateCheckpoint(data) {
|
|
122
|
+
const errors = [];
|
|
123
|
+
const warnings = [];
|
|
124
|
+
// Check if data is an object
|
|
125
|
+
if (!data || typeof data !== 'object') {
|
|
126
|
+
errors.push('Checkpoint data must be an object');
|
|
127
|
+
return { valid: false, errors, warnings, sanitized: null };
|
|
128
|
+
}
|
|
129
|
+
const checkpoint = data;
|
|
130
|
+
// Validate messages array (required)
|
|
131
|
+
if (!checkpoint.messages) {
|
|
132
|
+
errors.push('Checkpoint missing required "messages" field');
|
|
133
|
+
}
|
|
134
|
+
else if (!Array.isArray(checkpoint.messages)) {
|
|
135
|
+
errors.push('Checkpoint "messages" must be an array');
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
// Validate each message has required fields
|
|
139
|
+
for (let i = 0; i < checkpoint.messages.length; i++) {
|
|
140
|
+
const msg = checkpoint.messages[i];
|
|
141
|
+
if (!msg || typeof msg !== 'object') {
|
|
142
|
+
errors.push(`Message at index ${i} is not an object`);
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
if (!msg.role || typeof msg.role !== 'string') {
|
|
146
|
+
errors.push(`Message at index ${i} missing valid "role" field`);
|
|
147
|
+
}
|
|
148
|
+
if (msg.content !== undefined && msg.content !== null && typeof msg.content !== 'string') {
|
|
149
|
+
// Content can be undefined for tool call messages
|
|
150
|
+
warnings.push(`Message at index ${i} has non-string content (type: ${typeof msg.content})`);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
// Validate iteration (optional but should be non-negative number)
|
|
155
|
+
if (checkpoint.iteration !== undefined) {
|
|
156
|
+
if (typeof checkpoint.iteration !== 'number' || checkpoint.iteration < 0) {
|
|
157
|
+
warnings.push(`Invalid iteration value: ${checkpoint.iteration}, will use default`);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
// Validate metrics (optional)
|
|
161
|
+
if (checkpoint.metrics !== undefined && checkpoint.metrics !== null) {
|
|
162
|
+
if (typeof checkpoint.metrics !== 'object') {
|
|
163
|
+
warnings.push('Metrics field is not an object, will be ignored');
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
// Validate memoryContext (optional)
|
|
167
|
+
if (checkpoint.memoryContext !== undefined && checkpoint.memoryContext !== null) {
|
|
168
|
+
if (!Array.isArray(checkpoint.memoryContext)) {
|
|
169
|
+
warnings.push('memoryContext is not an array, will be ignored');
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
// If we have critical errors, fail validation
|
|
173
|
+
if (errors.length > 0) {
|
|
174
|
+
return { valid: false, errors, warnings, sanitized: null };
|
|
175
|
+
}
|
|
176
|
+
// Build sanitized checkpoint
|
|
177
|
+
const messages = checkpoint.messages.filter((msg) => msg && typeof msg === 'object' && typeof msg.role === 'string');
|
|
178
|
+
const sanitized = {
|
|
179
|
+
messages,
|
|
180
|
+
iteration: typeof checkpoint.iteration === 'number' && checkpoint.iteration >= 0
|
|
181
|
+
? checkpoint.iteration
|
|
182
|
+
: Math.floor(messages.length / 2),
|
|
183
|
+
metrics: typeof checkpoint.metrics === 'object' && checkpoint.metrics !== null
|
|
184
|
+
? checkpoint.metrics
|
|
185
|
+
: undefined,
|
|
186
|
+
plan: checkpoint.plan,
|
|
187
|
+
memoryContext: Array.isArray(checkpoint.memoryContext)
|
|
188
|
+
? checkpoint.memoryContext
|
|
189
|
+
: undefined,
|
|
190
|
+
};
|
|
191
|
+
return { valid: true, errors, warnings, sanitized };
|
|
192
|
+
}
|
|
193
|
+
// =============================================================================
|
|
194
|
+
// STATE LOADING
|
|
195
|
+
// =============================================================================
|
|
196
|
+
/**
|
|
197
|
+
* Load full state from a checkpoint.
|
|
198
|
+
* Restores messages, iteration, metrics, plan, and memory context.
|
|
199
|
+
* Validates checkpoint data before loading to prevent corrupted state.
|
|
200
|
+
*/
|
|
201
|
+
export function loadState(deps, savedState) {
|
|
202
|
+
// Validate checkpoint data
|
|
203
|
+
const validation = validateCheckpoint(savedState);
|
|
204
|
+
// Log warnings
|
|
205
|
+
for (const warning of validation.warnings) {
|
|
206
|
+
log.warn('Checkpoint validation warning', { warning });
|
|
207
|
+
deps.observability?.logger?.warn('Checkpoint validation warning', { warning });
|
|
208
|
+
}
|
|
209
|
+
// Fail on validation errors
|
|
210
|
+
if (!validation.valid || !validation.sanitized) {
|
|
211
|
+
const errorMsg = `Invalid checkpoint: ${validation.errors.join('; ')}`;
|
|
212
|
+
deps.observability?.logger?.error('Checkpoint validation failed', {
|
|
213
|
+
errors: validation.errors,
|
|
214
|
+
});
|
|
215
|
+
throw new Error(errorMsg);
|
|
216
|
+
}
|
|
217
|
+
// Use sanitized data
|
|
218
|
+
const sanitized = validation.sanitized;
|
|
219
|
+
// Restore messages
|
|
220
|
+
deps.state.messages = [...sanitized.messages];
|
|
221
|
+
// Restore iteration (already validated/defaulted in sanitized)
|
|
222
|
+
deps.state.iteration = sanitized.iteration;
|
|
223
|
+
// Restore metrics (merge with defaults)
|
|
224
|
+
if (sanitized.metrics) {
|
|
225
|
+
deps.state.metrics = {
|
|
226
|
+
totalTokens: sanitized.metrics.totalTokens ?? 0,
|
|
227
|
+
inputTokens: sanitized.metrics.inputTokens ?? 0,
|
|
228
|
+
outputTokens: sanitized.metrics.outputTokens ?? 0,
|
|
229
|
+
estimatedCost: sanitized.metrics.estimatedCost ?? 0,
|
|
230
|
+
llmCalls: sanitized.metrics.llmCalls ?? 0,
|
|
231
|
+
toolCalls: sanitized.metrics.toolCalls ?? 0,
|
|
232
|
+
duration: sanitized.metrics.duration ?? 0,
|
|
233
|
+
reflectionAttempts: sanitized.metrics.reflectionAttempts,
|
|
234
|
+
successCount: sanitized.metrics.successCount ?? 0,
|
|
235
|
+
failureCount: sanitized.metrics.failureCount ?? 0,
|
|
236
|
+
cancelCount: sanitized.metrics.cancelCount ?? 0,
|
|
237
|
+
retryCount: sanitized.metrics.retryCount ?? 0,
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
// Restore plan if present
|
|
241
|
+
if (sanitized.plan) {
|
|
242
|
+
deps.state.plan = { ...sanitized.plan };
|
|
243
|
+
// Sync with planning manager if enabled
|
|
244
|
+
if (deps.planning) {
|
|
245
|
+
deps.planning.loadPlan(sanitized.plan);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
// Restore memory context if present
|
|
249
|
+
if (sanitized.memoryContext) {
|
|
250
|
+
deps.state.memoryContext = [...sanitized.memoryContext];
|
|
251
|
+
}
|
|
252
|
+
// Sync to threadManager if enabled
|
|
253
|
+
if (deps.threadManager) {
|
|
254
|
+
const thread = deps.threadManager.getActiveThread();
|
|
255
|
+
thread.messages = [...sanitized.messages];
|
|
256
|
+
}
|
|
257
|
+
deps.observability?.logger?.info('State loaded', {
|
|
258
|
+
messageCount: sanitized.messages.length,
|
|
259
|
+
iteration: deps.state.iteration,
|
|
260
|
+
hasPlan: !!sanitized.plan,
|
|
261
|
+
hasMemoryContext: !!sanitized.memoryContext,
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
//# sourceMappingURL=session-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-api.js","sourceRoot":"","sources":["../../../src/agent/session-api.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAaH,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,MAAM,GAAG,GAAG,qBAAqB,CAAC,YAAY,CAAC,CAAC;AAsBhD,gFAAgF;AAChF,uBAAuB;AACvB,gFAAgF;AAEhF;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,IAAoB,EACpB,MAMC;IAED,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC5B,OAAO,CAAC,CAAC,CAAC;IACZ,CAAC;IAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC;QACzC,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;QAChC,UAAU,EAAE,MAAM,CAAC,UAAU;KAC9B,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,IAAoB,EACpB,QAAgB;IAEhB,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;AACzD,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,IAAoB;IACxD,IAAI,CAAC,IAAI,CAA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AAC,UAAU,IAAI,CAAC;SAC9C,CAAC;IACJ,CAAC;IAED,0BAA0B;IAC1B,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC;QACnB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC;QACxC,wCAAwC;QACxC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACzC,CAAC;IACH,CAAC;IAED,oCAAoC;IACpC,IAAI,SAAS,CAAC,aAAa,EAAE,CAAC;QAC5B,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,CAAC,GAAG,SAAS,CAAC,aAAa,CAAC,CAAC;IAC1D,CAAC;IAED,mCAAmC;IACnC,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;QACvB,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC;QACpD,MAAM,CAAC,QAAQ,GAAG,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC5C,CAAC;IAED,IAAI,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE;QAC/C,YAAY,EAAE,SAAS,CAAC,QAAQ,CAAC,MAAM;QACvC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;QAC/B,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI;QACzB,gBAAgB,EAAE,CAAC,CAAC,SAAS,CAAC,aAAa;KAC5C,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* to provide real-time diagnostic feedback after modifications.
|
|
6
6
|
*/
|
|
7
7
|
import type { ToolDefinition } from '../types.js';
|
|
8
|
-
import type { LSPManager } from '../integrations/lsp.js';
|
|
8
|
+
import type { LSPManager } from '../integrations/lsp/lsp.js';
|
|
9
9
|
export interface LSPFileToolsConfig {
|
|
10
10
|
/** LSPManager instance for diagnostics */
|
|
11
11
|
lspManager: LSPManager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lsp-file-tools.d.ts","sourceRoot":"","sources":["../../../src/agent-tools/lsp-file-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,
|
|
1
|
+
{"version":3,"file":"lsp-file-tools.d.ts","sourceRoot":"","sources":["../../../src/agent-tools/lsp-file-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAiB,MAAM,4BAA4B,CAAC;AAM5E,MAAM,WAAW,kBAAkB;IACjC,0CAA0C;IAC1C,UAAU,EAAE,UAAU,CAAC;IACvB,gDAAgD;IAChD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iCAAiC;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AA8ED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,kBAAkB,GAAG,cAAc,CA2DhF;AAWD;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,kBAAkB,GAAG,cAAc,CAkDjF;AAMD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,GAAG,cAAc,EAAE,CAE/E;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAiB5D"}
|
|
@@ -17,8 +17,8 @@ function formatDiagnostics(diagnostics, filePath) {
|
|
|
17
17
|
if (diagnostics.length === 0) {
|
|
18
18
|
return '';
|
|
19
19
|
}
|
|
20
|
-
const errors = diagnostics.filter(d => d.severity === 'error');
|
|
21
|
-
const warnings = diagnostics.filter(d => d.severity === 'warning');
|
|
20
|
+
const errors = diagnostics.filter((d) => d.severity === 'error');
|
|
21
|
+
const warnings = diagnostics.filter((d) => d.severity === 'warning');
|
|
22
22
|
const parts = [];
|
|
23
23
|
if (errors.length > 0) {
|
|
24
24
|
parts.push(`\n\n⚠️ ${errors.length} error(s) detected:`);
|
|
@@ -49,14 +49,14 @@ async function waitForDiagnostics(lsp, filePath, delay) {
|
|
|
49
49
|
// Open the document (required for LSP to track it)
|
|
50
50
|
lsp.notifyFileOpened(filePath, content);
|
|
51
51
|
// Small delay then notify change to trigger diagnostics
|
|
52
|
-
await new Promise(resolve => setTimeout(resolve, 100));
|
|
52
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
53
53
|
lsp.notifyFileChanged(filePath, content, Date.now());
|
|
54
54
|
}
|
|
55
55
|
catch {
|
|
56
56
|
// File might not exist yet, that's ok
|
|
57
57
|
}
|
|
58
58
|
// Wait for diagnostics to be computed
|
|
59
|
-
await new Promise(resolve => setTimeout(resolve, delay));
|
|
59
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
60
60
|
return lsp.getDiagnostics(filePath);
|
|
61
61
|
}
|
|
62
62
|
// =============================================================================
|
|
@@ -99,7 +99,7 @@ export function createLSPEditFileTool(config) {
|
|
|
99
99
|
let output = `Successfully edited ${input.path} (${linesDiff >= 0 ? '+' : ''}${linesDiff} lines)`;
|
|
100
100
|
// Get LSP diagnostics
|
|
101
101
|
const diagnostics = await waitForDiagnostics(lspManager, input.path, diagnosticDelay);
|
|
102
|
-
const diagOutput = formatDiagnostics(includeWarnings ? diagnostics : diagnostics.filter(d => d.severity === 'error'), input.path);
|
|
102
|
+
const diagOutput = formatDiagnostics(includeWarnings ? diagnostics : diagnostics.filter((d) => d.severity === 'error'), input.path);
|
|
103
103
|
if (diagOutput) {
|
|
104
104
|
output += diagOutput;
|
|
105
105
|
}
|
|
@@ -155,7 +155,7 @@ export function createLSPWriteFileTool(config) {
|
|
|
155
155
|
let output = `Successfully ${action} ${input.path} (${lines} lines, ${input.content.length} bytes)`;
|
|
156
156
|
// Get LSP diagnostics
|
|
157
157
|
const diagnostics = await waitForDiagnostics(lspManager, input.path, diagnosticDelay);
|
|
158
|
-
const diagOutput = formatDiagnostics(includeWarnings ? diagnostics : diagnostics.filter(d => d.severity === 'error'), input.path);
|
|
158
|
+
const diagOutput = formatDiagnostics(includeWarnings ? diagnostics : diagnostics.filter((d) => d.severity === 'error'), input.path);
|
|
159
159
|
if (diagOutput) {
|
|
160
160
|
output += diagOutput;
|
|
161
161
|
}
|
|
@@ -178,10 +178,7 @@ export function createLSPWriteFileTool(config) {
|
|
|
178
178
|
* Create all LSP-aware file tools.
|
|
179
179
|
*/
|
|
180
180
|
export function createLSPFileTools(config) {
|
|
181
|
-
return [
|
|
182
|
-
createLSPEditFileTool(config),
|
|
183
|
-
createLSPWriteFileTool(config),
|
|
184
|
-
];
|
|
181
|
+
return [createLSPEditFileTool(config), createLSPWriteFileTool(config)];
|
|
185
182
|
}
|
|
186
183
|
/**
|
|
187
184
|
* Check if LSP diagnostics are available for a file type.
|
|
@@ -189,11 +186,18 @@ export function createLSPFileTools(config) {
|
|
|
189
186
|
export function isLSPSupportedFile(filePath) {
|
|
190
187
|
const ext = path.extname(filePath).toLowerCase();
|
|
191
188
|
const supported = [
|
|
192
|
-
'.ts',
|
|
193
|
-
'.
|
|
189
|
+
'.ts',
|
|
190
|
+
'.tsx',
|
|
191
|
+
'.js',
|
|
192
|
+
'.jsx',
|
|
193
|
+
'.mjs',
|
|
194
|
+
'.cjs', // TypeScript/JavaScript
|
|
195
|
+
'.py',
|
|
196
|
+
'.pyi', // Python
|
|
194
197
|
'.rs', // Rust
|
|
195
198
|
'.go', // Go
|
|
196
|
-
'.json',
|
|
199
|
+
'.json',
|
|
200
|
+
'.jsonc', // JSON
|
|
197
201
|
];
|
|
198
202
|
return supported.includes(ext);
|
|
199
203
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lsp-file-tools.js","sourceRoot":"","sources":["../../../src/agent-tools/lsp-file-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAiBlC,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF,SAAS,YAAY,CAAC,MAAc;IAClC,OAAO,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AACvD,CAAC;AAED,SAAS,iBAAiB,CAAC,WAA4B,EAAE,QAAgB;IACvE,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"lsp-file-tools.js","sourceRoot":"","sources":["../../../src/agent-tools/lsp-file-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAiBlC,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF,SAAS,YAAY,CAAC,MAAc;IAClC,OAAO,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AACvD,CAAC;AAED,SAAS,iBAAiB,CAAC,WAA4B,EAAE,QAAgB;IACvE,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,E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M;QACN,KAAK;QACL,MAAM;QACN,MAAM;QACN,MAAM,EAAE,wBAAwB;QAChC,KAAK;QACL,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,KAAK;QACZ,OAAO;QACP,QAAQ,EAAE,OAAO;KAClB,CAAC;IACF,OAAO,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACjC,CAAC"}
|
package/dist/src/agent.d.ts
CHANGED
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
* - Execution Policies (Lesson 23)
|
|
19
19
|
* - Thread Management (Lesson 24)
|
|
20
20
|
*/
|
|
21
|
-
import type { ProductionAgentConfig, LLMProvider, Message, ToolDefinition, AgentState, AgentMetrics, AgentPlan, AgentResult, AgentEventListener
|
|
21
|
+
import type { ProductionAgentConfig, LLMProvider, Message, ToolDefinition, AgentState, AgentMetrics, AgentPlan, AgentResult, AgentEventListener } from './types.js';
|
|
22
22
|
import { type AgentMode } from './modes.js';
|
|
23
23
|
import { type LSPFileToolsConfig } from './agent-tools/index.js';
|
|
24
|
-
import { AgentRegistry, LSPManager, SkillManager, type ExecutionBudget, type AgentRole, type TeamTask, type TeamResult, type ReActTrace, type Checkpoint, type AgentDefinition, type LoadedAgent, type SpawnResult, type CancellationTokenType, type Skill, type ApprovalScope, type PendingPlan, LearningStore, AutoCompactionManager, FileChangeTracker, CapabilitiesRegistry, TaskManager, type SQLiteStore } from './integrations/index.js';
|
|
24
|
+
import { AgentRegistry, LSPManager, SkillManager, type ExecutionBudget, type AgentRole, type TeamTask, type TeamResult, type ReActTrace, type Checkpoint, type AgentDefinition, type LoadedAgent, type SpawnResult, type CancellationTokenType, type Skill, type ApprovalScope, type PendingPlan, InteractivePlanner, LearningStore, AutoCompactionManager, FileChangeTracker, CapabilitiesRegistry, TaskManager, type SQLiteStore } from './integrations/index.js';
|
|
25
25
|
import { TraceCollector } from './tracing/trace-collector.js';
|
|
26
26
|
import { type SpawnConstraints } from './tools/agent.js';
|
|
27
27
|
import { PARALLELIZABLE_TOOLS, CONDITIONALLY_PARALLEL_TOOLS, extractToolFilePath, groupToolCallsIntoBatches } from './core/index.js';
|
|
28
|
-
export { PARALLELIZABLE_TOOLS, CONDITIONALLY_PARALLEL_TOOLS, extractToolFilePath, groupToolCallsIntoBatches };
|
|
28
|
+
export { PARALLELIZABLE_TOOLS, CONDITIONALLY_PARALLEL_TOOLS, extractToolFilePath, groupToolCallsIntoBatches, };
|
|
29
29
|
/**
|
|
30
30
|
* Production-ready agent that composes all features.
|
|
31
31
|
*/
|
|
@@ -76,6 +76,7 @@ export declare class ProductionAgent {
|
|
|
76
76
|
private swarmOrchestrator;
|
|
77
77
|
private workLog;
|
|
78
78
|
private verificationGate;
|
|
79
|
+
private typeCheckerState;
|
|
79
80
|
private injectionBudget;
|
|
80
81
|
private selfImprovement;
|
|
81
82
|
private subagentOutputStore;
|
|
@@ -100,6 +101,7 @@ export declare class ProductionAgent {
|
|
|
100
101
|
});
|
|
101
102
|
/**
|
|
102
103
|
* Initialize all enabled features.
|
|
104
|
+
* Delegates to the extracted feature-initializer module.
|
|
103
105
|
*/
|
|
104
106
|
private initializeFeatures;
|
|
105
107
|
/**
|
|
@@ -218,6 +220,11 @@ export declare class ProductionAgent {
|
|
|
218
220
|
* Returns null if learning store is not enabled.
|
|
219
221
|
*/
|
|
220
222
|
getLearningStore(): LearningStore | null;
|
|
223
|
+
/**
|
|
224
|
+
* Get the interactive planner for structured task planning.
|
|
225
|
+
* Returns null if interactive planning is not enabled.
|
|
226
|
+
*/
|
|
227
|
+
getInteractivePlanner(): InteractivePlanner | null;
|
|
221
228
|
/**
|
|
222
229
|
* Get the auto-compaction manager.
|
|
223
230
|
* Returns null if compaction is not enabled.
|
|
@@ -400,6 +407,11 @@ export declare class ProductionAgent {
|
|
|
400
407
|
* Extend the budget limits.
|
|
401
408
|
*/
|
|
402
409
|
extendBudget(extension: Partial<ExecutionBudget>): void;
|
|
410
|
+
/**
|
|
411
|
+
* Set the budget extension request handler.
|
|
412
|
+
* When the economics system needs more budget, it calls this handler to ask the user.
|
|
413
|
+
*/
|
|
414
|
+
setExtensionHandler(handler: (request: import('./integrations/budget/economics.js').ExtensionRequest) => Promise<Partial<ExecutionBudget> | null>): void;
|
|
403
415
|
/**
|
|
404
416
|
* Create a checkpoint of the current state.
|
|
405
417
|
* Useful before risky operations.
|
|
@@ -507,7 +519,7 @@ export declare class ProductionAgent {
|
|
|
507
519
|
/**
|
|
508
520
|
* Get current resource usage.
|
|
509
521
|
*/
|
|
510
|
-
getResourceUsage(): import("./integrations/
|
|
522
|
+
getResourceUsage(): import("./integrations/index.js").ResourceUsage | null;
|
|
511
523
|
/**
|
|
512
524
|
* Get formatted resource status string.
|
|
513
525
|
*/
|
|
@@ -526,11 +538,11 @@ export declare class ProductionAgent {
|
|
|
526
538
|
/**
|
|
527
539
|
* Get code definition location.
|
|
528
540
|
*/
|
|
529
|
-
getLSPDefinition(file: string, line: number, col: number): Promise<import("./integrations/
|
|
541
|
+
getLSPDefinition(file: string, line: number, col: number): Promise<import("./integrations/index.js").LSPLocation | null>;
|
|
530
542
|
/**
|
|
531
543
|
* Get code completions.
|
|
532
544
|
*/
|
|
533
|
-
getLSPCompletions(file: string, line: number, col: number): Promise<never[] | import("./integrations/
|
|
545
|
+
getLSPCompletions(file: string, line: number, col: number): Promise<never[] | import("./integrations/index.js").LSPCompletion[]>;
|
|
534
546
|
/**
|
|
535
547
|
* Get hover documentation.
|
|
536
548
|
*/
|
|
@@ -538,7 +550,7 @@ export declare class ProductionAgent {
|
|
|
538
550
|
/**
|
|
539
551
|
* Get all references to a symbol.
|
|
540
552
|
*/
|
|
541
|
-
getLSPReferences(file: string, line: number, col: number): Promise<never[] | import("./integrations/
|
|
553
|
+
getLSPReferences(file: string, line: number, col: number): Promise<never[] | import("./integrations/index.js").LSPLocation[]>;
|
|
542
554
|
/**
|
|
543
555
|
* Get active LSP servers.
|
|
544
556
|
*/
|
|
@@ -546,7 +558,7 @@ export declare class ProductionAgent {
|
|
|
546
558
|
/**
|
|
547
559
|
* Get LSP diagnostics for a file.
|
|
548
560
|
*/
|
|
549
|
-
getLSPDiagnostics(file: string): import("./integrations/
|
|
561
|
+
getLSPDiagnostics(file: string): import("./integrations/index.js").LSPDiagnostic[];
|
|
550
562
|
/**
|
|
551
563
|
* Get the LSP manager instance (for advanced use).
|
|
552
564
|
*/
|
|
@@ -580,7 +592,7 @@ export declare class ProductionAgent {
|
|
|
580
592
|
/**
|
|
581
593
|
* Get cache statistics.
|
|
582
594
|
*/
|
|
583
|
-
getCacheStats(): import("./integrations/
|
|
595
|
+
getCacheStats(): import("./integrations/index.js").CacheStats;
|
|
584
596
|
/**
|
|
585
597
|
* Clear the semantic cache.
|
|
586
598
|
*/
|
|
@@ -635,6 +647,10 @@ export declare class ProductionAgent {
|
|
|
635
647
|
* Cycle to the next mode (for Tab key).
|
|
636
648
|
*/
|
|
637
649
|
cycleMode(): AgentMode;
|
|
650
|
+
/**
|
|
651
|
+
* Get type checker state for TUI diagnostics display.
|
|
652
|
+
*/
|
|
653
|
+
getTypeCheckerState(): import('./integrations/safety/type-checker.js').TypeCheckerState | null;
|
|
638
654
|
/**
|
|
639
655
|
* Get all registered tools.
|
|
640
656
|
*/
|
|
@@ -766,113 +782,6 @@ export declare class ProductionAgent {
|
|
|
766
782
|
*/
|
|
767
783
|
cleanup(): Promise<void>;
|
|
768
784
|
}
|
|
769
|
-
/**
|
|
770
|
-
* Create a production agent with the given configuration.
|
|
771
|
-
*/
|
|
772
|
-
export declare function createProductionAgent(config: Partial<ProductionAgentConfig> & {
|
|
773
|
-
provider: LLMProvider;
|
|
774
|
-
}): ProductionAgent;
|
|
775
|
-
/**
|
|
776
|
-
* Builder for creating customized production agents.
|
|
777
|
-
*/
|
|
778
|
-
export declare class ProductionAgentBuilder {
|
|
779
|
-
private config;
|
|
780
|
-
/**
|
|
781
|
-
* Set the LLM provider.
|
|
782
|
-
*/
|
|
783
|
-
provider(provider: LLMProvider): this;
|
|
784
|
-
/**
|
|
785
|
-
* Set the model.
|
|
786
|
-
*/
|
|
787
|
-
model(model: string): this;
|
|
788
|
-
/**
|
|
789
|
-
* Set the system prompt.
|
|
790
|
-
*/
|
|
791
|
-
systemPrompt(prompt: string): this;
|
|
792
|
-
/**
|
|
793
|
-
* Add tools.
|
|
794
|
-
*/
|
|
795
|
-
tools(tools: ToolDefinition[]): this;
|
|
796
|
-
/**
|
|
797
|
-
* Configure hooks.
|
|
798
|
-
*/
|
|
799
|
-
hooks(config: ProductionAgentConfig['hooks']): this;
|
|
800
|
-
/**
|
|
801
|
-
* Configure plugins.
|
|
802
|
-
*/
|
|
803
|
-
plugins(config: ProductionAgentConfig['plugins']): this;
|
|
804
|
-
/**
|
|
805
|
-
* Configure memory.
|
|
806
|
-
*/
|
|
807
|
-
memory(config: ProductionAgentConfig['memory']): this;
|
|
808
|
-
/**
|
|
809
|
-
* Configure planning.
|
|
810
|
-
*/
|
|
811
|
-
planning(config: ProductionAgentConfig['planning']): this;
|
|
812
|
-
/**
|
|
813
|
-
* Configure reflection.
|
|
814
|
-
*/
|
|
815
|
-
reflection(config: ProductionAgentConfig['reflection']): this;
|
|
816
|
-
/**
|
|
817
|
-
* Configure observability.
|
|
818
|
-
*/
|
|
819
|
-
observability(config: ProductionAgentConfig['observability']): this;
|
|
820
|
-
/**
|
|
821
|
-
* Configure sandbox.
|
|
822
|
-
*/
|
|
823
|
-
sandbox(config: ProductionAgentConfig['sandbox']): this;
|
|
824
|
-
/**
|
|
825
|
-
* Configure human-in-the-loop.
|
|
826
|
-
*/
|
|
827
|
-
humanInLoop(config: ProductionAgentConfig['humanInLoop']): this;
|
|
828
|
-
/**
|
|
829
|
-
* Configure routing.
|
|
830
|
-
*/
|
|
831
|
-
routing(config: ProductionAgentConfig['routing']): this;
|
|
832
|
-
/**
|
|
833
|
-
* Configure multi-agent coordination (Lesson 17).
|
|
834
|
-
*/
|
|
835
|
-
multiAgent(config: ProductionAgentConfig['multiAgent']): this;
|
|
836
|
-
/**
|
|
837
|
-
* Add a role to multi-agent config.
|
|
838
|
-
*/
|
|
839
|
-
addRole(role: AgentRoleConfig): this;
|
|
840
|
-
/**
|
|
841
|
-
* Configure ReAct pattern (Lesson 18).
|
|
842
|
-
*/
|
|
843
|
-
react(config: ProductionAgentConfig['react']): this;
|
|
844
|
-
/**
|
|
845
|
-
* Configure execution policies (Lesson 23).
|
|
846
|
-
*/
|
|
847
|
-
executionPolicy(config: ProductionAgentConfig['executionPolicy']): this;
|
|
848
|
-
/**
|
|
849
|
-
* Configure thread management (Lesson 24).
|
|
850
|
-
*/
|
|
851
|
-
threads(config: ProductionAgentConfig['threads']): this;
|
|
852
|
-
/**
|
|
853
|
-
* Configure skills system.
|
|
854
|
-
*/
|
|
855
|
-
skills(config: ProductionAgentConfig['skills']): this;
|
|
856
|
-
/**
|
|
857
|
-
* Set max iterations.
|
|
858
|
-
*/
|
|
859
|
-
maxIterations(max: number): this;
|
|
860
|
-
/**
|
|
861
|
-
* Set timeout.
|
|
862
|
-
*/
|
|
863
|
-
timeout(ms: number): this;
|
|
864
|
-
/**
|
|
865
|
-
* Disable a feature.
|
|
866
|
-
*/
|
|
867
|
-
disable(feature: keyof Omit<ProductionAgentConfig, 'provider' | 'tools' | 'systemPrompt' | 'model' | 'maxIterations' | 'timeout'>): this;
|
|
868
|
-
/**
|
|
869
|
-
* Build the agent.
|
|
870
|
-
*/
|
|
871
|
-
build(): ProductionAgent;
|
|
872
|
-
}
|
|
873
|
-
/**
|
|
874
|
-
* Start building a production agent.
|
|
875
|
-
*/
|
|
876
|
-
export declare function buildAgent(): ProductionAgentBuilder;
|
|
877
785
|
export { parseStructuredClosureReport } from './core/index.js';
|
|
786
|
+
export { buildAgent, ProductionAgentBuilder, createProductionAgent } from './agent/index.js';
|
|
878
787
|
//# sourceMappingURL=agent.d.ts.map
|