attocode 0.2.3 → 0.2.5
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 +122 -1
- package/README.md +65 -5
- package/dist/src/adapters.d.ts +2 -1
- package/dist/src/adapters.d.ts.map +1 -1
- package/dist/src/adapters.js +74 -12
- 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 +677 -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 +173 -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 +262 -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.d.ts +52 -213
- package/dist/src/agent.d.ts.map +1 -1
- package/dist/src/agent.js +544 -4072
- package/dist/src/agent.js.map +1 -1
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +2 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/handler.d.ts.map +1 -1
- package/dist/src/commands/handler.js +18 -9
- 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 +16 -1
- package/dist/src/commands/init-commands.js.map +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +31 -0
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/config/base-types.d.ts +45 -0
- package/dist/src/config/base-types.d.ts.map +1 -0
- package/dist/src/config/base-types.js +9 -0
- package/dist/src/config/base-types.js.map +1 -0
- package/dist/src/config/config-manager.d.ts +35 -0
- package/dist/src/config/config-manager.d.ts.map +1 -0
- package/dist/src/config/config-manager.js +108 -0
- package/dist/src/config/config-manager.js.map +1 -0
- package/dist/src/config/index.d.ts +4 -0
- package/dist/src/config/index.d.ts.map +1 -0
- package/dist/src/config/index.js +3 -0
- package/dist/src/config/index.js.map +1 -0
- package/dist/src/config/schema.d.ts +1546 -0
- package/dist/src/config/schema.d.ts.map +1 -0
- package/dist/src/config/schema.js +268 -0
- package/dist/src/config/schema.js.map +1 -0
- package/dist/src/config.d.ts +4 -1
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +8 -12
- package/dist/src/config.js.map +1 -1
- package/dist/src/core/agent-state-machine.d.ts +131 -0
- package/dist/src/core/agent-state-machine.d.ts.map +1 -0
- package/dist/src/core/agent-state-machine.js +302 -0
- package/dist/src/core/agent-state-machine.js.map +1 -0
- package/dist/src/core/base-manager.d.ts +79 -0
- package/dist/src/core/base-manager.d.ts.map +1 -0
- package/dist/src/core/base-manager.js +170 -0
- package/dist/src/core/base-manager.js.map +1 -0
- package/dist/src/core/completion-analyzer.d.ts +15 -0
- package/dist/src/core/completion-analyzer.d.ts.map +1 -0
- package/dist/src/core/completion-analyzer.js +53 -0
- package/dist/src/core/completion-analyzer.js.map +1 -0
- package/dist/src/core/execution-loop.d.ts +46 -0
- package/dist/src/core/execution-loop.d.ts.map +1 -0
- package/dist/src/core/execution-loop.js +1397 -0
- package/dist/src/core/execution-loop.js.map +1 -0
- package/dist/src/core/index.d.ts +7 -0
- package/dist/src/core/index.d.ts.map +1 -1
- package/dist/src/core/index.js +9 -0
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/core/process-handlers.d.ts.map +1 -1
- package/dist/src/core/process-handlers.js +14 -0
- package/dist/src/core/process-handlers.js.map +1 -1
- package/dist/src/core/protocol/types.d.ts +12 -12
- package/dist/src/core/response-handler.d.ts +16 -0
- package/dist/src/core/response-handler.d.ts.map +1 -0
- package/dist/src/core/response-handler.js +235 -0
- package/dist/src/core/response-handler.js.map +1 -0
- package/dist/src/core/subagent-spawner.d.ts +43 -0
- package/dist/src/core/subagent-spawner.d.ts.map +1 -0
- package/dist/src/core/subagent-spawner.js +973 -0
- package/dist/src/core/subagent-spawner.js.map +1 -0
- package/dist/src/core/tool-executor.d.ts +59 -0
- package/dist/src/core/tool-executor.d.ts.map +1 -0
- package/dist/src/core/tool-executor.js +682 -0
- package/dist/src/core/tool-executor.js.map +1 -0
- package/dist/src/core/types.d.ts +134 -0
- package/dist/src/core/types.d.ts.map +1 -0
- package/dist/src/core/types.js +12 -0
- package/dist/src/core/types.js.map +1 -0
- package/dist/src/defaults.d.ts +2 -2
- package/dist/src/defaults.d.ts.map +1 -1
- package/dist/src/defaults.js +29 -1
- package/dist/src/defaults.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 +213 -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 +233 -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 +306 -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 +951 -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 +257 -0
- package/dist/src/integrations/agents/subagent-output-store.js.map +1 -0
- package/dist/src/integrations/auto-compaction.d.ts.map +1 -1
- package/dist/src/integrations/auto-compaction.js +3 -2
- package/dist/src/integrations/auto-compaction.js.map +1 -1
- 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 +205 -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 +520 -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 +151 -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 +1007 -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 +287 -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 +262 -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 +318 -0
- package/dist/src/integrations/budget/resources.js.map +1 -0
- package/dist/src/integrations/budget-pool.d.ts +7 -0
- package/dist/src/integrations/budget-pool.d.ts.map +1 -1
- package/dist/src/integrations/budget-pool.js +43 -0
- package/dist/src/integrations/budget-pool.js.map +1 -1
- package/dist/src/integrations/codebase-ast.d.ts +52 -0
- package/dist/src/integrations/codebase-ast.d.ts.map +1 -0
- package/dist/src/integrations/codebase-ast.js +457 -0
- package/dist/src/integrations/codebase-ast.js.map +1 -0
- package/dist/src/integrations/codebase-context.d.ts +18 -0
- package/dist/src/integrations/codebase-context.d.ts.map +1 -1
- package/dist/src/integrations/codebase-context.js +197 -17
- package/dist/src/integrations/codebase-context.js.map +1 -1
- package/dist/src/integrations/compaction.d.ts.map +1 -1
- package/dist/src/integrations/compaction.js +14 -6
- package/dist/src/integrations/compaction.js.map +1 -1
- 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 +477 -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 +448 -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 +649 -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 +818 -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 +685 -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 +384 -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 +372 -0
- package/dist/src/integrations/context/semantic-cache.js.map +1 -0
- package/dist/src/integrations/context-engineering.d.ts +8 -0
- package/dist/src/integrations/context-engineering.d.ts.map +1 -1
- package/dist/src/integrations/context-engineering.js +19 -0
- package/dist/src/integrations/context-engineering.js.map +1 -1
- package/dist/src/integrations/economics.d.ts +25 -1
- package/dist/src/integrations/economics.d.ts.map +1 -1
- package/dist/src/integrations/economics.js +217 -38
- package/dist/src/integrations/economics.js.map +1 -1
- package/dist/src/integrations/edit-validator.d.ts +30 -0
- package/dist/src/integrations/edit-validator.d.ts.map +1 -0
- package/dist/src/integrations/edit-validator.js +85 -0
- package/dist/src/integrations/edit-validator.js.map +1 -0
- package/dist/src/integrations/file-cache.d.ts +7 -0
- package/dist/src/integrations/file-cache.d.ts.map +1 -1
- package/dist/src/integrations/file-cache.js +54 -0
- package/dist/src/integrations/file-cache.js.map +1 -1
- package/dist/src/integrations/health-check.d.ts.map +1 -1
- package/dist/src/integrations/health-check.js +3 -2
- package/dist/src/integrations/health-check.js.map +1 -1
- package/dist/src/integrations/hierarchical-config.d.ts +3 -0
- package/dist/src/integrations/hierarchical-config.d.ts.map +1 -1
- package/dist/src/integrations/hierarchical-config.js +3 -0
- package/dist/src/integrations/hierarchical-config.js.map +1 -1
- package/dist/src/integrations/hooks.d.ts +2 -0
- package/dist/src/integrations/hooks.d.ts.map +1 -1
- package/dist/src/integrations/hooks.js +99 -15
- package/dist/src/integrations/hooks.js.map +1 -1
- package/dist/src/integrations/index.d.ts +77 -66
- package/dist/src/integrations/index.d.ts.map +1 -1
- package/dist/src/integrations/index.js +83 -67
- package/dist/src/integrations/index.js.map +1 -1
- package/dist/src/integrations/logger.d.ts +104 -0
- package/dist/src/integrations/logger.d.ts.map +1 -0
- package/dist/src/integrations/logger.js +219 -0
- package/dist/src/integrations/logger.js.map +1 -0
- 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/lsp.d.ts.map +1 -1
- package/dist/src/integrations/lsp.js +5 -4
- package/dist/src/integrations/lsp.js.map +1 -1
- 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 +755 -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 +141 -0
- package/dist/src/integrations/mcp/mcp-tool-validator.js.map +1 -0
- package/dist/src/integrations/mcp-client.d.ts.map +1 -1
- package/dist/src/integrations/mcp-client.js +8 -7
- package/dist/src/integrations/mcp-client.js.map +1 -1
- package/dist/src/integrations/observability.d.ts.map +1 -1
- package/dist/src/integrations/observability.js +5 -4
- package/dist/src/integrations/observability.js.map +1 -1
- package/dist/src/integrations/openrouter-pricing.d.ts.map +1 -1
- package/dist/src/integrations/openrouter-pricing.js +4 -3
- package/dist/src/integrations/openrouter-pricing.js.map +1 -1
- 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 +81 -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 +184 -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 +165 -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 +197 -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 +770 -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 +676 -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 +183 -0
- package/dist/src/integrations/persistence/worker-repository.js.map +1 -0
- package/dist/src/integrations/persistence.d.ts.map +1 -1
- package/dist/src/integrations/persistence.js +5 -4
- package/dist/src/integrations/persistence.js.map +1 -1
- package/dist/src/integrations/planning.d.ts.map +1 -1
- package/dist/src/integrations/planning.js +5 -4
- package/dist/src/integrations/planning.js.map +1 -1
- 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 +252 -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 +543 -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 +415 -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 +646 -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 +268 -0
- package/dist/src/integrations/quality/tool-recommendation.js.map +1 -0
- package/dist/src/integrations/retry.d.ts +1 -0
- package/dist/src/integrations/retry.d.ts.map +1 -1
- package/dist/src/integrations/retry.js.map +1 -1
- package/dist/src/integrations/routing.d.ts.map +1 -1
- package/dist/src/integrations/routing.js +2 -1
- package/dist/src/integrations/routing.js.map +1 -1
- 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 +144 -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 +352 -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 +247 -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 +470 -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 +335 -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 +386 -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 +329 -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 +298 -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 +142 -0
- package/dist/src/integrations/safety/type-checker.js.map +1 -0
- package/dist/src/integrations/safety.d.ts.map +1 -1
- package/dist/src/integrations/safety.js +13 -13
- package/dist/src/integrations/safety.js.map +1 -1
- package/dist/src/integrations/sandbox/docker.d.ts.map +1 -1
- package/dist/src/integrations/sandbox/docker.js +2 -1
- package/dist/src/integrations/sandbox/docker.js.map +1 -1
- package/dist/src/integrations/sandbox/index.d.ts.map +1 -1
- package/dist/src/integrations/sandbox/index.js +5 -4
- package/dist/src/integrations/sandbox/index.js.map +1 -1
- package/dist/src/integrations/session-store.d.ts +1 -0
- package/dist/src/integrations/session-store.d.ts.map +1 -1
- package/dist/src/integrations/session-store.js +1 -0
- package/dist/src/integrations/session-store.js.map +1 -1
- package/dist/src/integrations/shared-blackboard.d.ts +3 -0
- package/dist/src/integrations/shared-blackboard.d.ts.map +1 -1
- package/dist/src/integrations/shared-blackboard.js +47 -0
- package/dist/src/integrations/shared-blackboard.js.map +1 -1
- 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 +270 -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 +602 -0
- package/dist/src/integrations/skills/skills.js.map +1 -0
- package/dist/src/integrations/smart-decomposer.d.ts +27 -0
- package/dist/src/integrations/smart-decomposer.d.ts.map +1 -1
- package/dist/src/integrations/smart-decomposer.js +414 -30
- package/dist/src/integrations/smart-decomposer.js.map +1 -1
- package/dist/src/integrations/sqlite-store.d.ts +2 -0
- package/dist/src/integrations/sqlite-store.d.ts.map +1 -1
- package/dist/src/integrations/sqlite-store.js +18 -6
- package/dist/src/integrations/sqlite-store.js.map +1 -1
- 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 +367 -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 +362 -0
- package/dist/src/integrations/streaming/streaming.js.map +1 -0
- package/dist/src/integrations/swarm/failure-classifier.d.ts +11 -0
- package/dist/src/integrations/swarm/failure-classifier.d.ts.map +1 -0
- package/dist/src/integrations/swarm/failure-classifier.js +95 -0
- package/dist/src/integrations/swarm/failure-classifier.js.map +1 -0
- package/dist/src/integrations/swarm/index.d.ts +2 -1
- package/dist/src/integrations/swarm/index.d.ts.map +1 -1
- package/dist/src/integrations/swarm/index.js +2 -0
- 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 +2 -1
- package/dist/src/integrations/swarm/model-selector.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 +8 -0
- package/dist/src/integrations/swarm/swarm-config-loader.d.ts.map +1 -1
- package/dist/src/integrations/swarm/swarm-config-loader.js +102 -0
- package/dist/src/integrations/swarm/swarm-config-loader.js.map +1 -1
- package/dist/src/integrations/swarm/swarm-event-bridge.d.ts +74 -0
- package/dist/src/integrations/swarm/swarm-event-bridge.d.ts.map +1 -1
- package/dist/src/integrations/swarm/swarm-event-bridge.js +37 -0
- package/dist/src/integrations/swarm/swarm-event-bridge.js.map +1 -1
- package/dist/src/integrations/swarm/swarm-events.d.ts +4 -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 +1021 -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 +95 -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 +922 -0
- package/dist/src/integrations/swarm/swarm-lifecycle.js.map +1 -0
- package/dist/src/integrations/swarm/swarm-orchestrator.d.ts +96 -192
- package/dist/src/integrations/swarm/swarm-orchestrator.d.ts.map +1 -1
- package/dist/src/integrations/swarm/swarm-orchestrator.js +384 -2528
- package/dist/src/integrations/swarm/swarm-orchestrator.js.map +1 -1
- package/dist/src/integrations/swarm/swarm-quality-gate.js +1 -1
- 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 +550 -0
- package/dist/src/integrations/swarm/swarm-recovery.js.map +1 -0
- package/dist/src/integrations/swarm/swarm-state-store.d.ts +4 -1
- package/dist/src/integrations/swarm/swarm-state-store.d.ts.map +1 -1
- package/dist/src/integrations/swarm/swarm-state-store.js +14 -1
- package/dist/src/integrations/swarm/swarm-state-store.js.map +1 -1
- package/dist/src/integrations/swarm/task-queue.d.ts +11 -1
- package/dist/src/integrations/swarm/task-queue.d.ts.map +1 -1
- package/dist/src/integrations/swarm/task-queue.js +64 -2
- package/dist/src/integrations/swarm/task-queue.js.map +1 -1
- package/dist/src/integrations/swarm/types.d.ts +57 -4
- package/dist/src/integrations/swarm/types.d.ts.map +1 -1
- package/dist/src/integrations/swarm/types.js +9 -0
- package/dist/src/integrations/swarm/types.js.map +1 -1
- package/dist/src/integrations/swarm/worker-pool.d.ts +13 -3
- package/dist/src/integrations/swarm/worker-pool.d.ts.map +1 -1
- package/dist/src/integrations/swarm/worker-pool.js +66 -13
- package/dist/src/integrations/swarm/worker-pool.js.map +1 -1
- package/dist/src/integrations/task-manager.d.ts +33 -1
- package/dist/src/integrations/task-manager.d.ts.map +1 -1
- package/dist/src/integrations/task-manager.js +78 -4
- package/dist/src/integrations/task-manager.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 +232 -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 +655 -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 +413 -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 +661 -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 +383 -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 +537 -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 +193 -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 +275 -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 +426 -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 +497 -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 +84 -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 +538 -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 +383 -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 +504 -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 +306 -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 +219 -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 +311 -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 +407 -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 +273 -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 +348 -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 +284 -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 +379 -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 +357 -0
- package/dist/src/integrations/utilities/thread-manager.js.map +1 -0
- package/dist/src/integrations/utilities/token-estimate.d.ts +11 -0
- package/dist/src/integrations/utilities/token-estimate.d.ts.map +1 -0
- package/dist/src/integrations/utilities/token-estimate.js +14 -0
- package/dist/src/integrations/utilities/token-estimate.js.map +1 -0
- package/dist/src/main.js +92 -35
- package/dist/src/main.js.map +1 -1
- package/dist/src/modes/repl.d.ts.map +1 -1
- package/dist/src/modes/repl.js +60 -11
- 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 +57 -10
- package/dist/src/modes/tui.js.map +1 -1
- package/dist/src/modes.js +1 -1
- package/dist/src/modes.js.map +1 -1
- package/dist/src/observability/tracer.d.ts.map +1 -1
- package/dist/src/observability/tracer.js +2 -1
- package/dist/src/observability/tracer.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 +42 -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 +101 -16
- 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 +354 -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 +44 -3
- 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 +41 -9
- 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 +83 -13
- package/dist/src/providers/adapters/openrouter.js.map +1 -1
- package/dist/src/providers/circuit-breaker.d.ts +1 -0
- package/dist/src/providers/circuit-breaker.d.ts.map +1 -1
- package/dist/src/providers/circuit-breaker.js.map +1 -1
- package/dist/src/providers/provider.d.ts.map +1 -1
- package/dist/src/providers/provider.js +2 -1
- package/dist/src/providers/provider.js.map +1 -1
- package/dist/src/providers/resilient-provider.d.ts.map +1 -1
- package/dist/src/providers/resilient-provider.js +2 -1
- 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 +40 -5
- package/dist/src/session-picker.js.map +1 -1
- package/dist/src/shared/budget-tracker.d.ts +65 -0
- package/dist/src/shared/budget-tracker.d.ts.map +1 -0
- package/dist/src/shared/budget-tracker.js +128 -0
- package/dist/src/shared/budget-tracker.js.map +1 -0
- package/dist/src/shared/context-engine.d.ts +64 -0
- package/dist/src/shared/context-engine.d.ts.map +1 -0
- package/dist/src/shared/context-engine.js +117 -0
- package/dist/src/shared/context-engine.js.map +1 -0
- package/dist/src/shared/index.d.ts +12 -0
- package/dist/src/shared/index.d.ts.map +1 -0
- package/dist/src/shared/index.js +12 -0
- package/dist/src/shared/index.js.map +1 -0
- package/dist/src/shared/persistence.d.ts +57 -0
- package/dist/src/shared/persistence.d.ts.map +1 -0
- package/dist/src/shared/persistence.js +168 -0
- package/dist/src/shared/persistence.js.map +1 -0
- package/dist/src/shared/shared-context-state.d.ts +89 -0
- package/dist/src/shared/shared-context-state.d.ts.map +1 -0
- package/dist/src/shared/shared-context-state.js +175 -0
- package/dist/src/shared/shared-context-state.js.map +1 -0
- package/dist/src/shared/shared-economics-state.d.ts +61 -0
- package/dist/src/shared/shared-economics-state.d.ts.map +1 -0
- package/dist/src/shared/shared-economics-state.js +100 -0
- package/dist/src/shared/shared-economics-state.js.map +1 -0
- package/dist/src/tools/agent.d.ts +1 -1
- package/dist/src/tools/agent.d.ts.map +1 -1
- package/dist/src/tools/bash.d.ts +3 -3
- package/dist/src/tools/bash.d.ts.map +1 -1
- package/dist/src/tools/bash.js +2 -1
- package/dist/src/tools/bash.js.map +1 -1
- package/dist/src/tools/file.d.ts +3 -3
- package/dist/src/tools/file.js +1 -1
- package/dist/src/tools/file.js.map +1 -1
- package/dist/src/tools/permission.d.ts.map +1 -1
- package/dist/src/tools/permission.js +7 -6
- 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 +1 -1
- package/dist/src/tools/registry.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/types.d.ts +1 -0
- package/dist/src/tools/types.d.ts.map +1 -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/tracing/cache-boundary-tracker.d.ts.map +1 -1
- package/dist/src/tracing/cache-boundary-tracker.js +2 -2
- package/dist/src/tracing/cache-boundary-tracker.js.map +1 -1
- package/dist/src/tracing/trace-collector.d.ts +147 -0
- package/dist/src/tracing/trace-collector.d.ts.map +1 -1
- package/dist/src/tracing/trace-collector.js +138 -7
- package/dist/src/tracing/trace-collector.js.map +1 -1
- package/dist/src/tracing/types.d.ts +112 -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 +2 -1
- package/dist/src/tricks/failure-evidence.js.map +1 -1
- package/dist/src/tricks/recitation.d.ts.map +1 -1
- package/dist/src/tricks/recitation.js +2 -1
- 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 +2 -2
- 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 +6 -2
- package/dist/src/tricks/reversible-compaction.js.map +1 -1
- package/dist/src/tui/app.d.ts +16 -3
- package/dist/src/tui/app.d.ts.map +1 -1
- package/dist/src/tui/app.js +211 -25
- package/dist/src/tui/app.js.map +1 -1
- 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/DiagnosticsPanel.d.ts +24 -0
- package/dist/src/tui/components/DiagnosticsPanel.d.ts.map +1 -0
- package/dist/src/tui/components/DiagnosticsPanel.js +47 -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/ErrorBoundary.d.ts.map +1 -1
- package/dist/src/tui/components/ErrorBoundary.js +3 -2
- package/dist/src/tui/components/ErrorBoundary.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/event-display.d.ts.map +1 -1
- package/dist/src/tui/event-display.js +36 -62
- package/dist/src/tui/event-display.js.map +1 -1
- package/dist/src/tui/index.d.ts +4 -0
- package/dist/src/tui/index.d.ts.map +1 -1
- package/dist/src/tui/index.js +17 -0
- package/dist/src/tui/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 +21 -0
- package/dist/src/tui/transparency-aggregator.js.map +1 -1
- package/dist/src/types.d.ts +170 -3
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +18 -3
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AutoCompactionManager - Monitors token usage and triggers compaction
|
|
3
|
+
*
|
|
4
|
+
* Implements a three-tier threshold system:
|
|
5
|
+
* - OK (< 80%): Continue normally
|
|
6
|
+
* - Warning (80-89%): Alert user, no automatic action
|
|
7
|
+
* - Auto-Compact (90-97%): Depending on mode, auto-compact or request approval
|
|
8
|
+
* - Hard Limit (>= 98%): Agent cannot continue - context too full
|
|
9
|
+
*/
|
|
10
|
+
import type { Message } from '../../types.js';
|
|
11
|
+
import type { Compactor } from './compaction.js';
|
|
12
|
+
import type { Reference } from '../../tricks/reversible-compaction.js';
|
|
13
|
+
/**
|
|
14
|
+
* Result from a custom compaction handler (supports reversible compaction).
|
|
15
|
+
*/
|
|
16
|
+
export interface CustomCompactionResult {
|
|
17
|
+
/** The summarized content */
|
|
18
|
+
summary: string;
|
|
19
|
+
/** Token count before compaction */
|
|
20
|
+
tokensBefore: number;
|
|
21
|
+
/** Token count after compaction */
|
|
22
|
+
tokensAfter: number;
|
|
23
|
+
/** Messages to preserve in context */
|
|
24
|
+
preservedMessages: Message[];
|
|
25
|
+
/** Preserved references for retrieval (from reversible compaction) */
|
|
26
|
+
references?: Reference[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Custom compaction handler function type.
|
|
30
|
+
* Allows integration with reversible compaction or other compaction strategies.
|
|
31
|
+
*/
|
|
32
|
+
export type CompactHandler = (messages: Message[]) => Promise<CustomCompactionResult>;
|
|
33
|
+
/**
|
|
34
|
+
* Configuration for automatic compaction behavior.
|
|
35
|
+
*/
|
|
36
|
+
export interface AutoCompactionConfig {
|
|
37
|
+
/** Compaction mode: auto (no approval), approval (asks user), manual (never auto) */
|
|
38
|
+
mode: 'auto' | 'approval' | 'manual';
|
|
39
|
+
/** Warning threshold as ratio (default: 0.80) */
|
|
40
|
+
warningThreshold: number;
|
|
41
|
+
/** Auto-compact threshold as ratio (default: 0.90) */
|
|
42
|
+
autoCompactThreshold: number;
|
|
43
|
+
/** Hard limit threshold as ratio (default: 0.98) */
|
|
44
|
+
hardLimitThreshold: number;
|
|
45
|
+
/** Number of recent user messages to preserve (default: 5) */
|
|
46
|
+
preserveRecentUserMessages: number;
|
|
47
|
+
/** Number of recent assistant messages to preserve (default: 5) */
|
|
48
|
+
preserveRecentAssistantMessages: number;
|
|
49
|
+
/** Cooldown between compactions in ms (default: 60000) */
|
|
50
|
+
cooldownMs: number;
|
|
51
|
+
/** Max context window tokens (default: 200000 for Claude) */
|
|
52
|
+
maxContextTokens: number;
|
|
53
|
+
/** Optional custom compaction handler (e.g., for reversible compaction with reference preservation) */
|
|
54
|
+
compactHandler?: CompactHandler;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Result of checking token usage and potentially compacting.
|
|
58
|
+
*/
|
|
59
|
+
export interface CompactionCheckResult {
|
|
60
|
+
/** Current status after check */
|
|
61
|
+
status: 'ok' | 'warning' | 'compacted' | 'needs_approval' | 'hard_limit';
|
|
62
|
+
/** Current token count */
|
|
63
|
+
currentTokens: number;
|
|
64
|
+
/** Maximum allowed tokens */
|
|
65
|
+
maxTokens: number;
|
|
66
|
+
/** Ratio of current to max (0-1) */
|
|
67
|
+
ratio: number;
|
|
68
|
+
/** Compacted messages if compaction occurred */
|
|
69
|
+
compactedMessages?: Message[];
|
|
70
|
+
/** Summary generated during compaction */
|
|
71
|
+
summary?: string;
|
|
72
|
+
/** Preserved references from reversible compaction (for later retrieval) */
|
|
73
|
+
references?: Reference[];
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Events emitted by AutoCompactionManager.
|
|
77
|
+
*/
|
|
78
|
+
export type AutoCompactionEvent = {
|
|
79
|
+
type: 'autocompaction.check';
|
|
80
|
+
currentTokens: number;
|
|
81
|
+
ratio: number;
|
|
82
|
+
threshold: string;
|
|
83
|
+
} | {
|
|
84
|
+
type: 'autocompaction.warning';
|
|
85
|
+
currentTokens: number;
|
|
86
|
+
ratio: number;
|
|
87
|
+
} | {
|
|
88
|
+
type: 'autocompaction.triggered';
|
|
89
|
+
mode: string;
|
|
90
|
+
currentTokens: number;
|
|
91
|
+
} | {
|
|
92
|
+
type: 'autocompaction.completed';
|
|
93
|
+
tokensBefore: number;
|
|
94
|
+
tokensAfter: number;
|
|
95
|
+
reduction: number;
|
|
96
|
+
} | {
|
|
97
|
+
type: 'autocompaction.cooldown';
|
|
98
|
+
remainingMs: number;
|
|
99
|
+
} | {
|
|
100
|
+
type: 'autocompaction.hard_limit';
|
|
101
|
+
currentTokens: number;
|
|
102
|
+
ratio: number;
|
|
103
|
+
} | {
|
|
104
|
+
type: 'autocompaction.needs_approval';
|
|
105
|
+
currentTokens: number;
|
|
106
|
+
ratio: number;
|
|
107
|
+
} | {
|
|
108
|
+
type: 'autocompaction.emergency_truncate';
|
|
109
|
+
reason: string;
|
|
110
|
+
messagesBefore: number;
|
|
111
|
+
messagesAfter: number;
|
|
112
|
+
};
|
|
113
|
+
export type AutoCompactionEventListener = (event: AutoCompactionEvent) => void;
|
|
114
|
+
/**
|
|
115
|
+
* Monitors token usage and triggers compaction based on thresholds.
|
|
116
|
+
*
|
|
117
|
+
* Three-tier threshold design:
|
|
118
|
+
* - OK (< 80%): Normal operation
|
|
119
|
+
* - Warning (80-89%): User alerted but no action
|
|
120
|
+
* - Auto-Compact (90-97%): Automatic compaction (in auto mode) or approval request
|
|
121
|
+
* - Hard Limit (>= 98%): Cannot continue - too close to context limit
|
|
122
|
+
*/
|
|
123
|
+
export declare class AutoCompactionManager {
|
|
124
|
+
private compactor;
|
|
125
|
+
private config;
|
|
126
|
+
private lastCompactionTime;
|
|
127
|
+
private listeners;
|
|
128
|
+
constructor(compactor: Compactor, config?: Partial<AutoCompactionConfig>);
|
|
129
|
+
/**
|
|
130
|
+
* Check token usage and maybe perform compaction.
|
|
131
|
+
*
|
|
132
|
+
* @param options - Current tokens and messages
|
|
133
|
+
* @returns Result indicating status and any compaction performed
|
|
134
|
+
*/
|
|
135
|
+
checkAndMaybeCompact(options: {
|
|
136
|
+
currentTokens: number;
|
|
137
|
+
messages: Message[];
|
|
138
|
+
}): Promise<CompactionCheckResult>;
|
|
139
|
+
/**
|
|
140
|
+
* Get the current token ratio.
|
|
141
|
+
*/
|
|
142
|
+
getTokenRatio(currentTokens: number): number;
|
|
143
|
+
/**
|
|
144
|
+
* Check if currently in cooldown period.
|
|
145
|
+
*/
|
|
146
|
+
isInCooldown(): boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Get remaining cooldown time in milliseconds.
|
|
149
|
+
*/
|
|
150
|
+
getRemainingCooldown(): number;
|
|
151
|
+
/**
|
|
152
|
+
* Reset cooldown (e.g., after manual compaction request).
|
|
153
|
+
*/
|
|
154
|
+
resetCooldown(): void;
|
|
155
|
+
/**
|
|
156
|
+
* Force compaction regardless of mode or cooldown.
|
|
157
|
+
* Useful for manual compaction requests.
|
|
158
|
+
*/
|
|
159
|
+
forceCompact(messages: Message[]): Promise<CompactionCheckResult>;
|
|
160
|
+
/**
|
|
161
|
+
* Get current configuration.
|
|
162
|
+
*/
|
|
163
|
+
getConfig(): AutoCompactionConfig;
|
|
164
|
+
/**
|
|
165
|
+
* Update configuration.
|
|
166
|
+
*/
|
|
167
|
+
updateConfig(updates: Partial<AutoCompactionConfig>): void;
|
|
168
|
+
/**
|
|
169
|
+
* Subscribe to events.
|
|
170
|
+
*/
|
|
171
|
+
on(listener: AutoCompactionEventListener): () => void;
|
|
172
|
+
/**
|
|
173
|
+
* Determine which zone the current ratio falls into.
|
|
174
|
+
*/
|
|
175
|
+
private determineZone;
|
|
176
|
+
/**
|
|
177
|
+
* Perform the actual compaction.
|
|
178
|
+
*/
|
|
179
|
+
private performCompaction;
|
|
180
|
+
/**
|
|
181
|
+
* Perform compaction using custom handler (supports reversible compaction with references).
|
|
182
|
+
*/
|
|
183
|
+
private performCustomCompaction;
|
|
184
|
+
/**
|
|
185
|
+
* Perform compaction using default compactor.
|
|
186
|
+
*/
|
|
187
|
+
private performDefaultCompaction;
|
|
188
|
+
/**
|
|
189
|
+
* Emergency truncation fallback when LLM-based compaction fails.
|
|
190
|
+
* Simply keeps system message and last N messages without summarization.
|
|
191
|
+
*/
|
|
192
|
+
private emergencyTruncate;
|
|
193
|
+
/**
|
|
194
|
+
* Emit an event to all listeners.
|
|
195
|
+
*/
|
|
196
|
+
private emit;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Create an AutoCompactionManager.
|
|
200
|
+
*/
|
|
201
|
+
export declare function createAutoCompactionManager(compactor: Compactor, config?: Partial<AutoCompactionConfig>): AutoCompactionManager;
|
|
202
|
+
/**
|
|
203
|
+
* Format a CompactionCheckResult for display.
|
|
204
|
+
*/
|
|
205
|
+
export declare function formatCompactionCheckResult(result: CompactionCheckResult): string;
|
|
206
|
+
/**
|
|
207
|
+
* Get suggested action based on check result.
|
|
208
|
+
*/
|
|
209
|
+
export declare function getSuggestedAction(result: CompactionCheckResult): string | null;
|
|
210
|
+
//# sourceMappingURL=auto-compaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-compaction.d.ts","sourceRoot":"","sources":["../../../../src/integrations/context/auto-compaction.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AutoCompactionManager - Monitors token usage and triggers compaction
|
|
3
|
+
*
|
|
4
|
+
* Implements a three-tier threshold system:
|
|
5
|
+
* - OK (< 80%): Continue normally
|
|
6
|
+
* - Warning (80-89%): Alert user, no automatic action
|
|
7
|
+
* - Auto-Compact (90-97%): Depending on mode, auto-compact or request approval
|
|
8
|
+
* - Hard Limit (>= 98%): Agent cannot continue - context too full
|
|
9
|
+
*/
|
|
10
|
+
import { logger } from '../utilities/logger.js';
|
|
11
|
+
// =============================================================================
|
|
12
|
+
// DEFAULT CONFIG
|
|
13
|
+
// =============================================================================
|
|
14
|
+
const DEFAULT_CONFIG = {
|
|
15
|
+
mode: 'auto',
|
|
16
|
+
warningThreshold: 0.80,
|
|
17
|
+
autoCompactThreshold: 0.90,
|
|
18
|
+
hardLimitThreshold: 0.98,
|
|
19
|
+
preserveRecentUserMessages: 5,
|
|
20
|
+
preserveRecentAssistantMessages: 5,
|
|
21
|
+
cooldownMs: 60000, // 1 minute
|
|
22
|
+
maxContextTokens: 200000, // Claude's context window
|
|
23
|
+
};
|
|
24
|
+
// =============================================================================
|
|
25
|
+
// AUTO COMPACTION MANAGER
|
|
26
|
+
// =============================================================================
|
|
27
|
+
/**
|
|
28
|
+
* Monitors token usage and triggers compaction based on thresholds.
|
|
29
|
+
*
|
|
30
|
+
* Three-tier threshold design:
|
|
31
|
+
* - OK (< 80%): Normal operation
|
|
32
|
+
* - Warning (80-89%): User alerted but no action
|
|
33
|
+
* - Auto-Compact (90-97%): Automatic compaction (in auto mode) or approval request
|
|
34
|
+
* - Hard Limit (>= 98%): Cannot continue - too close to context limit
|
|
35
|
+
*/
|
|
36
|
+
export class AutoCompactionManager {
|
|
37
|
+
compactor;
|
|
38
|
+
config;
|
|
39
|
+
lastCompactionTime = 0;
|
|
40
|
+
listeners = [];
|
|
41
|
+
constructor(compactor, config) {
|
|
42
|
+
this.compactor = compactor;
|
|
43
|
+
this.config = { ...DEFAULT_CONFIG, ...config };
|
|
44
|
+
// Validate thresholds are in correct order
|
|
45
|
+
if (this.config.warningThreshold >= this.config.autoCompactThreshold) {
|
|
46
|
+
throw new Error('warningThreshold must be less than autoCompactThreshold');
|
|
47
|
+
}
|
|
48
|
+
if (this.config.autoCompactThreshold >= this.config.hardLimitThreshold) {
|
|
49
|
+
throw new Error('autoCompactThreshold must be less than hardLimitThreshold');
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Check token usage and maybe perform compaction.
|
|
54
|
+
*
|
|
55
|
+
* @param options - Current tokens and messages
|
|
56
|
+
* @returns Result indicating status and any compaction performed
|
|
57
|
+
*/
|
|
58
|
+
async checkAndMaybeCompact(options) {
|
|
59
|
+
const { currentTokens, messages } = options;
|
|
60
|
+
const ratio = this.getTokenRatio(currentTokens);
|
|
61
|
+
const maxTokens = this.config.maxContextTokens;
|
|
62
|
+
// Determine which zone we're in
|
|
63
|
+
const zone = this.determineZone(ratio);
|
|
64
|
+
this.emit({
|
|
65
|
+
type: 'autocompaction.check',
|
|
66
|
+
currentTokens,
|
|
67
|
+
ratio,
|
|
68
|
+
threshold: zone,
|
|
69
|
+
});
|
|
70
|
+
// Zone: OK (< warningThreshold)
|
|
71
|
+
if (zone === 'ok') {
|
|
72
|
+
return {
|
|
73
|
+
status: 'ok',
|
|
74
|
+
currentTokens,
|
|
75
|
+
maxTokens,
|
|
76
|
+
ratio,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
// Zone: Hard Limit (>= hardLimitThreshold)
|
|
80
|
+
if (zone === 'hard_limit') {
|
|
81
|
+
this.emit({
|
|
82
|
+
type: 'autocompaction.hard_limit',
|
|
83
|
+
currentTokens,
|
|
84
|
+
ratio,
|
|
85
|
+
});
|
|
86
|
+
return {
|
|
87
|
+
status: 'hard_limit',
|
|
88
|
+
currentTokens,
|
|
89
|
+
maxTokens,
|
|
90
|
+
ratio,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
// Zone: Warning (warningThreshold <= ratio < autoCompactThreshold)
|
|
94
|
+
if (zone === 'warning') {
|
|
95
|
+
this.emit({
|
|
96
|
+
type: 'autocompaction.warning',
|
|
97
|
+
currentTokens,
|
|
98
|
+
ratio,
|
|
99
|
+
});
|
|
100
|
+
return {
|
|
101
|
+
status: 'warning',
|
|
102
|
+
currentTokens,
|
|
103
|
+
maxTokens,
|
|
104
|
+
ratio,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
// Zone: Auto-Compact (autoCompactThreshold <= ratio < hardLimitThreshold)
|
|
108
|
+
// Check cooldown
|
|
109
|
+
if (this.isInCooldown()) {
|
|
110
|
+
const remaining = this.getRemainingCooldown();
|
|
111
|
+
this.emit({
|
|
112
|
+
type: 'autocompaction.cooldown',
|
|
113
|
+
remainingMs: remaining,
|
|
114
|
+
});
|
|
115
|
+
// During cooldown, treat as warning
|
|
116
|
+
return {
|
|
117
|
+
status: 'warning',
|
|
118
|
+
currentTokens,
|
|
119
|
+
maxTokens,
|
|
120
|
+
ratio,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
// Handle based on mode
|
|
124
|
+
switch (this.config.mode) {
|
|
125
|
+
case 'auto':
|
|
126
|
+
return this.performCompaction(messages, currentTokens, maxTokens, ratio);
|
|
127
|
+
case 'approval':
|
|
128
|
+
this.emit({
|
|
129
|
+
type: 'autocompaction.needs_approval',
|
|
130
|
+
currentTokens,
|
|
131
|
+
ratio,
|
|
132
|
+
});
|
|
133
|
+
return {
|
|
134
|
+
status: 'needs_approval',
|
|
135
|
+
currentTokens,
|
|
136
|
+
maxTokens,
|
|
137
|
+
ratio,
|
|
138
|
+
};
|
|
139
|
+
case 'manual':
|
|
140
|
+
// In manual mode, auto-compact zone is treated as warning
|
|
141
|
+
this.emit({
|
|
142
|
+
type: 'autocompaction.warning',
|
|
143
|
+
currentTokens,
|
|
144
|
+
ratio,
|
|
145
|
+
});
|
|
146
|
+
return {
|
|
147
|
+
status: 'warning',
|
|
148
|
+
currentTokens,
|
|
149
|
+
maxTokens,
|
|
150
|
+
ratio,
|
|
151
|
+
};
|
|
152
|
+
default:
|
|
153
|
+
return {
|
|
154
|
+
status: 'warning',
|
|
155
|
+
currentTokens,
|
|
156
|
+
maxTokens,
|
|
157
|
+
ratio,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Get the current token ratio.
|
|
163
|
+
*/
|
|
164
|
+
getTokenRatio(currentTokens) {
|
|
165
|
+
return currentTokens / this.config.maxContextTokens;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Check if currently in cooldown period.
|
|
169
|
+
*/
|
|
170
|
+
isInCooldown() {
|
|
171
|
+
if (this.lastCompactionTime === 0) {
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
return Date.now() - this.lastCompactionTime < this.config.cooldownMs;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Get remaining cooldown time in milliseconds.
|
|
178
|
+
*/
|
|
179
|
+
getRemainingCooldown() {
|
|
180
|
+
if (!this.isInCooldown()) {
|
|
181
|
+
return 0;
|
|
182
|
+
}
|
|
183
|
+
return this.config.cooldownMs - (Date.now() - this.lastCompactionTime);
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Reset cooldown (e.g., after manual compaction request).
|
|
187
|
+
*/
|
|
188
|
+
resetCooldown() {
|
|
189
|
+
this.lastCompactionTime = 0;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Force compaction regardless of mode or cooldown.
|
|
193
|
+
* Useful for manual compaction requests.
|
|
194
|
+
*/
|
|
195
|
+
async forceCompact(messages) {
|
|
196
|
+
const currentTokens = this.compactor.estimateTokens(messages);
|
|
197
|
+
const ratio = this.getTokenRatio(currentTokens);
|
|
198
|
+
const maxTokens = this.config.maxContextTokens;
|
|
199
|
+
return this.performCompaction(messages, currentTokens, maxTokens, ratio);
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Get current configuration.
|
|
203
|
+
*/
|
|
204
|
+
getConfig() {
|
|
205
|
+
return { ...this.config };
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Update configuration.
|
|
209
|
+
*/
|
|
210
|
+
updateConfig(updates) {
|
|
211
|
+
this.config = { ...this.config, ...updates };
|
|
212
|
+
// Re-validate thresholds
|
|
213
|
+
if (this.config.warningThreshold >= this.config.autoCompactThreshold) {
|
|
214
|
+
throw new Error('warningThreshold must be less than autoCompactThreshold');
|
|
215
|
+
}
|
|
216
|
+
if (this.config.autoCompactThreshold >= this.config.hardLimitThreshold) {
|
|
217
|
+
throw new Error('autoCompactThreshold must be less than hardLimitThreshold');
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Subscribe to events.
|
|
222
|
+
*/
|
|
223
|
+
on(listener) {
|
|
224
|
+
this.listeners.push(listener);
|
|
225
|
+
return () => {
|
|
226
|
+
const idx = this.listeners.indexOf(listener);
|
|
227
|
+
if (idx >= 0)
|
|
228
|
+
this.listeners.splice(idx, 1);
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
// ===========================================================================
|
|
232
|
+
// PRIVATE METHODS
|
|
233
|
+
// ===========================================================================
|
|
234
|
+
/**
|
|
235
|
+
* Determine which zone the current ratio falls into.
|
|
236
|
+
*/
|
|
237
|
+
determineZone(ratio) {
|
|
238
|
+
if (ratio >= this.config.hardLimitThreshold) {
|
|
239
|
+
return 'hard_limit';
|
|
240
|
+
}
|
|
241
|
+
if (ratio >= this.config.autoCompactThreshold) {
|
|
242
|
+
return 'auto_compact';
|
|
243
|
+
}
|
|
244
|
+
if (ratio >= this.config.warningThreshold) {
|
|
245
|
+
return 'warning';
|
|
246
|
+
}
|
|
247
|
+
return 'ok';
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Perform the actual compaction.
|
|
251
|
+
*/
|
|
252
|
+
async performCompaction(messages, currentTokens, maxTokens, _ratio) {
|
|
253
|
+
this.emit({
|
|
254
|
+
type: 'autocompaction.triggered',
|
|
255
|
+
mode: this.config.mode,
|
|
256
|
+
currentTokens,
|
|
257
|
+
});
|
|
258
|
+
// Use custom compaction handler if provided (e.g., for reversible compaction)
|
|
259
|
+
if (this.config.compactHandler) {
|
|
260
|
+
return this.performCustomCompaction(messages, maxTokens);
|
|
261
|
+
}
|
|
262
|
+
// Otherwise use the default compactor
|
|
263
|
+
return this.performDefaultCompaction(messages, maxTokens);
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Perform compaction using custom handler (supports reversible compaction with references).
|
|
267
|
+
*/
|
|
268
|
+
async performCustomCompaction(messages, maxTokens) {
|
|
269
|
+
const totalPreserve = this.config.preserveRecentUserMessages + this.config.preserveRecentAssistantMessages;
|
|
270
|
+
try {
|
|
271
|
+
const result = await this.config.compactHandler(messages);
|
|
272
|
+
// Update cooldown
|
|
273
|
+
this.lastCompactionTime = Date.now();
|
|
274
|
+
const reduction = result.tokensBefore > 0
|
|
275
|
+
? Math.round((1 - result.tokensAfter / result.tokensBefore) * 100)
|
|
276
|
+
: 0;
|
|
277
|
+
this.emit({
|
|
278
|
+
type: 'autocompaction.completed',
|
|
279
|
+
tokensBefore: result.tokensBefore,
|
|
280
|
+
tokensAfter: result.tokensAfter,
|
|
281
|
+
reduction,
|
|
282
|
+
});
|
|
283
|
+
return {
|
|
284
|
+
status: 'compacted',
|
|
285
|
+
currentTokens: result.tokensAfter,
|
|
286
|
+
maxTokens,
|
|
287
|
+
ratio: result.tokensAfter / maxTokens,
|
|
288
|
+
compactedMessages: result.preservedMessages,
|
|
289
|
+
summary: result.summary,
|
|
290
|
+
references: result.references, // Preserve references from reversible compaction
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
catch (compactionError) {
|
|
294
|
+
logger.error('[AutoCompaction] Custom compaction failed, using emergency truncation:', { error: compactionError });
|
|
295
|
+
const emergencyResult = this.emergencyTruncate(messages, totalPreserve);
|
|
296
|
+
this.lastCompactionTime = Date.now();
|
|
297
|
+
return emergencyResult;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Perform compaction using default compactor.
|
|
302
|
+
*/
|
|
303
|
+
async performDefaultCompaction(messages, maxTokens) {
|
|
304
|
+
// Configure compactor to preserve the specified number of messages
|
|
305
|
+
const totalPreserve = this.config.preserveRecentUserMessages + this.config.preserveRecentAssistantMessages;
|
|
306
|
+
const currentCompactorConfig = this.compactor.getConfig();
|
|
307
|
+
// Temporarily adjust if our preserve count differs
|
|
308
|
+
const needsRestore = currentCompactorConfig.preserveRecentCount !== totalPreserve;
|
|
309
|
+
if (needsRestore) {
|
|
310
|
+
this.compactor.updateConfig({ preserveRecentCount: totalPreserve });
|
|
311
|
+
}
|
|
312
|
+
let result;
|
|
313
|
+
try {
|
|
314
|
+
result = await this.compactor.compact(messages);
|
|
315
|
+
}
|
|
316
|
+
catch (compactionError) {
|
|
317
|
+
// LLM-based compaction failed - use emergency truncation as fallback
|
|
318
|
+
logger.error('[AutoCompaction] LLM compaction failed, using emergency truncation:', { error: compactionError });
|
|
319
|
+
const emergencyResult = this.emergencyTruncate(messages, totalPreserve);
|
|
320
|
+
// Restore original config
|
|
321
|
+
if (needsRestore) {
|
|
322
|
+
this.compactor.updateConfig({ preserveRecentCount: currentCompactorConfig.preserveRecentCount });
|
|
323
|
+
}
|
|
324
|
+
// Update cooldown even for emergency truncation
|
|
325
|
+
this.lastCompactionTime = Date.now();
|
|
326
|
+
return emergencyResult;
|
|
327
|
+
}
|
|
328
|
+
// Restore original config
|
|
329
|
+
if (needsRestore) {
|
|
330
|
+
this.compactor.updateConfig({ preserveRecentCount: currentCompactorConfig.preserveRecentCount });
|
|
331
|
+
}
|
|
332
|
+
// Update cooldown
|
|
333
|
+
this.lastCompactionTime = Date.now();
|
|
334
|
+
const reduction = result.tokensBefore > 0
|
|
335
|
+
? Math.round((1 - result.tokensAfter / result.tokensBefore) * 100)
|
|
336
|
+
: 0;
|
|
337
|
+
this.emit({
|
|
338
|
+
type: 'autocompaction.completed',
|
|
339
|
+
tokensBefore: result.tokensBefore,
|
|
340
|
+
tokensAfter: result.tokensAfter,
|
|
341
|
+
reduction,
|
|
342
|
+
});
|
|
343
|
+
return {
|
|
344
|
+
status: 'compacted',
|
|
345
|
+
currentTokens: result.tokensAfter,
|
|
346
|
+
maxTokens,
|
|
347
|
+
ratio: result.tokensAfter / maxTokens,
|
|
348
|
+
compactedMessages: result.preservedMessages,
|
|
349
|
+
summary: result.summary,
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Emergency truncation fallback when LLM-based compaction fails.
|
|
354
|
+
* Simply keeps system message and last N messages without summarization.
|
|
355
|
+
*/
|
|
356
|
+
emergencyTruncate(messages, preserveCount) {
|
|
357
|
+
const messagesBefore = messages.length;
|
|
358
|
+
// Find and keep the system message
|
|
359
|
+
const systemMessage = messages.find(m => m.role === 'system');
|
|
360
|
+
// Get the last N messages (excluding system message from count)
|
|
361
|
+
const nonSystemMessages = messages.filter(m => m.role !== 'system');
|
|
362
|
+
const preservedMessages = nonSystemMessages.slice(-preserveCount);
|
|
363
|
+
// Build the truncated message array
|
|
364
|
+
const truncatedMessages = [];
|
|
365
|
+
if (systemMessage) {
|
|
366
|
+
truncatedMessages.push(systemMessage);
|
|
367
|
+
}
|
|
368
|
+
// Add a marker message about the truncation
|
|
369
|
+
const removedCount = messagesBefore - preservedMessages.length - (systemMessage ? 1 : 0);
|
|
370
|
+
truncatedMessages.push({
|
|
371
|
+
role: 'system',
|
|
372
|
+
content: `[CONTEXT REDUCED - Emergency truncation]\n\nPrevious context was truncated to stay within token limits.\n` +
|
|
373
|
+
`${removedCount} messages were removed. ` +
|
|
374
|
+
`Continue working from the preserved messages below. ` +
|
|
375
|
+
`If you need context from earlier in the conversation, check your goals and work log.`,
|
|
376
|
+
});
|
|
377
|
+
truncatedMessages.push(...preservedMessages);
|
|
378
|
+
const messagesAfter = truncatedMessages.length;
|
|
379
|
+
const tokensAfter = this.compactor.estimateTokens(truncatedMessages);
|
|
380
|
+
this.emit({
|
|
381
|
+
type: 'autocompaction.emergency_truncate',
|
|
382
|
+
reason: 'LLM compaction failed',
|
|
383
|
+
messagesBefore,
|
|
384
|
+
messagesAfter,
|
|
385
|
+
});
|
|
386
|
+
return {
|
|
387
|
+
status: 'compacted',
|
|
388
|
+
currentTokens: tokensAfter,
|
|
389
|
+
maxTokens: this.config.maxContextTokens,
|
|
390
|
+
ratio: tokensAfter / this.config.maxContextTokens,
|
|
391
|
+
compactedMessages: truncatedMessages,
|
|
392
|
+
summary: '[Emergency truncation - no summary available]',
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Emit an event to all listeners.
|
|
397
|
+
*/
|
|
398
|
+
emit(event) {
|
|
399
|
+
for (const listener of this.listeners) {
|
|
400
|
+
try {
|
|
401
|
+
listener(event);
|
|
402
|
+
}
|
|
403
|
+
catch {
|
|
404
|
+
// Ignore listener errors
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
// =============================================================================
|
|
410
|
+
// FACTORY
|
|
411
|
+
// =============================================================================
|
|
412
|
+
/**
|
|
413
|
+
* Create an AutoCompactionManager.
|
|
414
|
+
*/
|
|
415
|
+
export function createAutoCompactionManager(compactor, config) {
|
|
416
|
+
return new AutoCompactionManager(compactor, config);
|
|
417
|
+
}
|
|
418
|
+
// =============================================================================
|
|
419
|
+
// UTILITIES
|
|
420
|
+
// =============================================================================
|
|
421
|
+
/**
|
|
422
|
+
* Format a CompactionCheckResult for display.
|
|
423
|
+
*/
|
|
424
|
+
export function formatCompactionCheckResult(result) {
|
|
425
|
+
const percentUsed = Math.round(result.ratio * 100);
|
|
426
|
+
const lines = [];
|
|
427
|
+
switch (result.status) {
|
|
428
|
+
case 'ok':
|
|
429
|
+
lines.push(`Context usage: ${percentUsed}% (${result.currentTokens.toLocaleString()} / ${result.maxTokens.toLocaleString()} tokens)`);
|
|
430
|
+
lines.push('Status: OK');
|
|
431
|
+
break;
|
|
432
|
+
case 'warning':
|
|
433
|
+
lines.push(`Context usage: ${percentUsed}% (${result.currentTokens.toLocaleString()} / ${result.maxTokens.toLocaleString()} tokens)`);
|
|
434
|
+
lines.push('Status: WARNING - Context usage is high');
|
|
435
|
+
lines.push('Consider compacting the conversation to free up space.');
|
|
436
|
+
break;
|
|
437
|
+
case 'needs_approval':
|
|
438
|
+
lines.push(`Context usage: ${percentUsed}% (${result.currentTokens.toLocaleString()} / ${result.maxTokens.toLocaleString()} tokens)`);
|
|
439
|
+
lines.push('Status: NEEDS APPROVAL');
|
|
440
|
+
lines.push('Context is nearing capacity. Approve compaction to continue.');
|
|
441
|
+
break;
|
|
442
|
+
case 'compacted':
|
|
443
|
+
lines.push(`Context usage: ${percentUsed}% (${result.currentTokens.toLocaleString()} / ${result.maxTokens.toLocaleString()} tokens)`);
|
|
444
|
+
lines.push('Status: COMPACTED');
|
|
445
|
+
if (result.summary) {
|
|
446
|
+
lines.push('Summary preserved: Yes');
|
|
447
|
+
}
|
|
448
|
+
break;
|
|
449
|
+
case 'hard_limit':
|
|
450
|
+
lines.push(`Context usage: ${percentUsed}% (${result.currentTokens.toLocaleString()} / ${result.maxTokens.toLocaleString()} tokens)`);
|
|
451
|
+
lines.push('Status: HARD LIMIT REACHED');
|
|
452
|
+
lines.push('Cannot continue - context window is too full.');
|
|
453
|
+
lines.push('Manual intervention required.');
|
|
454
|
+
break;
|
|
455
|
+
}
|
|
456
|
+
return lines.join('\n');
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Get suggested action based on check result.
|
|
460
|
+
*/
|
|
461
|
+
export function getSuggestedAction(result) {
|
|
462
|
+
switch (result.status) {
|
|
463
|
+
case 'ok':
|
|
464
|
+
return null;
|
|
465
|
+
case 'warning':
|
|
466
|
+
return 'Consider running /compact to free up context space';
|
|
467
|
+
case 'needs_approval':
|
|
468
|
+
return 'Approve context compaction to continue';
|
|
469
|
+
case 'compacted':
|
|
470
|
+
return null;
|
|
471
|
+
case 'hard_limit':
|
|
472
|
+
return 'Start a new conversation or manually clear context';
|
|
473
|
+
default:
|
|
474
|
+
return null;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
//# sourceMappingURL=auto-compaction.js.map
|