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,410 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lesson 23: Hooks Integration
|
|
3
|
+
*
|
|
4
|
+
* Integrates the hook system (Lesson 10-11) into the production agent.
|
|
5
|
+
* Provides event emission and interception capabilities.
|
|
6
|
+
*/
|
|
7
|
+
import { logger } from './logger.js';
|
|
8
|
+
import { spawn } from 'node:child_process';
|
|
9
|
+
/**
|
|
10
|
+
* Manages hooks and plugins for the agent.
|
|
11
|
+
*/
|
|
12
|
+
export class HookManager {
|
|
13
|
+
hooks = new Map();
|
|
14
|
+
plugins = new Map();
|
|
15
|
+
tools = new Map();
|
|
16
|
+
listeners = new Set();
|
|
17
|
+
config;
|
|
18
|
+
// Async hook tracking for error handling and cleanup
|
|
19
|
+
pendingHooks = new Set();
|
|
20
|
+
hookErrors = [];
|
|
21
|
+
errorListeners = new Set();
|
|
22
|
+
maxHookErrors = 100; // Bounded error history
|
|
23
|
+
constructor(hooksConfig, pluginsConfig) {
|
|
24
|
+
this.config = { hooks: hooksConfig, plugins: pluginsConfig };
|
|
25
|
+
this.initializeBuiltInHooks();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Initialize built-in hooks based on config.
|
|
29
|
+
*/
|
|
30
|
+
initializeBuiltInHooks() {
|
|
31
|
+
const builtIn = this.config.hooks.builtIn || {};
|
|
32
|
+
if (builtIn.logging) {
|
|
33
|
+
this.registerHook({
|
|
34
|
+
event: 'llm.before',
|
|
35
|
+
handler: (data) => {
|
|
36
|
+
const d = data;
|
|
37
|
+
logger.debug('Hook: LLM call starting', { model: d.model || 'unknown' });
|
|
38
|
+
},
|
|
39
|
+
priority: 100,
|
|
40
|
+
});
|
|
41
|
+
this.registerHook({
|
|
42
|
+
event: 'tool.before',
|
|
43
|
+
handler: (data) => {
|
|
44
|
+
const d = data;
|
|
45
|
+
logger.debug('Hook: Tool call', { tool: d.tool || 'unknown' });
|
|
46
|
+
},
|
|
47
|
+
priority: 100,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
if (builtIn.timing) {
|
|
51
|
+
const startTimes = new Map();
|
|
52
|
+
this.registerHook({
|
|
53
|
+
event: 'llm.before',
|
|
54
|
+
handler: () => {
|
|
55
|
+
startTimes.set('llm', Date.now());
|
|
56
|
+
},
|
|
57
|
+
priority: 99,
|
|
58
|
+
});
|
|
59
|
+
this.registerHook({
|
|
60
|
+
event: 'llm.after',
|
|
61
|
+
handler: () => {
|
|
62
|
+
const start = startTimes.get('llm');
|
|
63
|
+
if (start) {
|
|
64
|
+
logger.debug('Hook: LLM call completed', { durationMs: Date.now() - start });
|
|
65
|
+
startTimes.delete('llm');
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
priority: 99,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
// Register custom hooks from config
|
|
72
|
+
for (const hook of this.config.hooks.custom || []) {
|
|
73
|
+
this.registerHook(hook);
|
|
74
|
+
}
|
|
75
|
+
this.registerShellHooks();
|
|
76
|
+
}
|
|
77
|
+
registerShellHooks() {
|
|
78
|
+
const shellCfg = this.config.hooks.shell;
|
|
79
|
+
if (!shellCfg?.enabled || !shellCfg.commands?.length) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
for (const cmd of shellCfg.commands) {
|
|
83
|
+
this.registerHook({
|
|
84
|
+
id: cmd.id || `shell:${cmd.event}:${cmd.command}`,
|
|
85
|
+
event: cmd.event,
|
|
86
|
+
priority: cmd.priority ?? 60,
|
|
87
|
+
handler: (data) => this.executeShellHook(cmd, data),
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
executeShellHook(commandConfig, data) {
|
|
92
|
+
return new Promise((resolve, reject) => {
|
|
93
|
+
const shellCfg = this.config.hooks.shell || {};
|
|
94
|
+
const timeoutMs = commandConfig.timeoutMs ?? shellCfg.defaultTimeoutMs ?? 5000;
|
|
95
|
+
const baseEnvKeys = ['PATH', 'HOME', 'SHELL', 'TMPDIR', 'USER'];
|
|
96
|
+
const env = {};
|
|
97
|
+
for (const key of baseEnvKeys) {
|
|
98
|
+
const value = process.env[key];
|
|
99
|
+
if (typeof value === 'string') {
|
|
100
|
+
env[key] = value;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
for (const key of shellCfg.envAllowlist || []) {
|
|
104
|
+
const value = process.env[key];
|
|
105
|
+
if (typeof value === 'string') {
|
|
106
|
+
env[key] = value;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const child = spawn(commandConfig.command, commandConfig.args || [], {
|
|
110
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
111
|
+
env,
|
|
112
|
+
});
|
|
113
|
+
const timer = setTimeout(() => {
|
|
114
|
+
child.kill('SIGTERM');
|
|
115
|
+
reject(new Error(`Shell hook timed out after ${timeoutMs}ms (${commandConfig.command})`));
|
|
116
|
+
}, timeoutMs);
|
|
117
|
+
let stderr = '';
|
|
118
|
+
child.stderr.on('data', chunk => {
|
|
119
|
+
stderr += String(chunk);
|
|
120
|
+
});
|
|
121
|
+
child.on('error', err => {
|
|
122
|
+
clearTimeout(timer);
|
|
123
|
+
reject(err);
|
|
124
|
+
});
|
|
125
|
+
child.on('exit', code => {
|
|
126
|
+
clearTimeout(timer);
|
|
127
|
+
if (code === 0) {
|
|
128
|
+
resolve();
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
reject(new Error(`Shell hook failed (${commandConfig.command}) exit=${code}${stderr ? `: ${stderr.trim()}` : ''}`));
|
|
132
|
+
});
|
|
133
|
+
try {
|
|
134
|
+
child.stdin.write(JSON.stringify({ event: commandConfig.event, payload: data }));
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
// Non-serializable payloads are best-effort only.
|
|
138
|
+
}
|
|
139
|
+
child.stdin.end();
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Register a hook.
|
|
144
|
+
*/
|
|
145
|
+
registerHook(hook) {
|
|
146
|
+
const existing = this.hooks.get(hook.event) || [];
|
|
147
|
+
// Check for duplicate by ID or handler reference
|
|
148
|
+
if (hook.id && existing.some((h) => h.id === hook.id)) {
|
|
149
|
+
logger.warn('Hook already registered', { hookId: hook.id, event: hook.event });
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
if (existing.some((h) => h.handler === hook.handler)) {
|
|
153
|
+
logger.warn('Duplicate handler already registered', { event: hook.event });
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
existing.push(hook);
|
|
157
|
+
// Sort by priority (lower = higher priority)
|
|
158
|
+
existing.sort((a, b) => (a.priority || 50) - (b.priority || 50));
|
|
159
|
+
this.hooks.set(hook.event, existing);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Unregister a hook.
|
|
163
|
+
*/
|
|
164
|
+
unregisterHook(event, handler) {
|
|
165
|
+
const existing = this.hooks.get(event) || [];
|
|
166
|
+
const index = existing.findIndex((h) => h.handler === handler);
|
|
167
|
+
if (index !== -1) {
|
|
168
|
+
existing.splice(index, 1);
|
|
169
|
+
this.hooks.set(event, existing);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Execute hooks for an event.
|
|
174
|
+
*/
|
|
175
|
+
async executeHooks(event, data) {
|
|
176
|
+
const hooks = this.hooks.get(event) || [];
|
|
177
|
+
for (const hook of hooks) {
|
|
178
|
+
try {
|
|
179
|
+
await hook.handler(data);
|
|
180
|
+
}
|
|
181
|
+
catch (err) {
|
|
182
|
+
logger.error('Hook execution error', { event, error: String(err) });
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Load and initialize a plugin.
|
|
188
|
+
*/
|
|
189
|
+
async loadPlugin(plugin) {
|
|
190
|
+
if (this.plugins.has(plugin.name)) {
|
|
191
|
+
logger.warn('Plugin already loaded', { plugin: plugin.name });
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
const context = {
|
|
195
|
+
registerHook: (hook) => this.registerHook(hook),
|
|
196
|
+
registerTool: (tool) => this.tools.set(tool.name, tool),
|
|
197
|
+
getConfig: (key) => {
|
|
198
|
+
// Simple config access
|
|
199
|
+
return undefined;
|
|
200
|
+
},
|
|
201
|
+
log: (level, message) => {
|
|
202
|
+
logger.info('Plugin log', { plugin: plugin.name, level, message });
|
|
203
|
+
},
|
|
204
|
+
};
|
|
205
|
+
try {
|
|
206
|
+
await plugin.initialize(context);
|
|
207
|
+
this.plugins.set(plugin.name, plugin);
|
|
208
|
+
logger.info('Plugin loaded', { plugin: plugin.name, version: plugin.version });
|
|
209
|
+
}
|
|
210
|
+
catch (err) {
|
|
211
|
+
logger.error('Failed to load plugin', { plugin: plugin.name, error: String(err) });
|
|
212
|
+
throw err;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Unload a plugin.
|
|
217
|
+
*/
|
|
218
|
+
async unloadPlugin(name) {
|
|
219
|
+
const plugin = this.plugins.get(name);
|
|
220
|
+
if (!plugin)
|
|
221
|
+
return;
|
|
222
|
+
if (plugin.cleanup) {
|
|
223
|
+
await plugin.cleanup();
|
|
224
|
+
}
|
|
225
|
+
this.plugins.delete(name);
|
|
226
|
+
logger.info('Plugin unloaded', { plugin: name });
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Get tools registered by plugins.
|
|
230
|
+
*/
|
|
231
|
+
getPluginTools() {
|
|
232
|
+
return Array.from(this.tools.values());
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Subscribe to agent events.
|
|
236
|
+
*/
|
|
237
|
+
subscribe(listener) {
|
|
238
|
+
this.listeners.add(listener);
|
|
239
|
+
return () => this.listeners.delete(listener);
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Emit an agent event.
|
|
243
|
+
* Synchronous listeners are called immediately.
|
|
244
|
+
* Async hooks are fire-and-forget but errors are tracked.
|
|
245
|
+
*/
|
|
246
|
+
emit(event) {
|
|
247
|
+
// Sync listeners (unchanged)
|
|
248
|
+
for (const listener of this.listeners) {
|
|
249
|
+
try {
|
|
250
|
+
listener(event);
|
|
251
|
+
}
|
|
252
|
+
catch (err) {
|
|
253
|
+
logger.error('Event listener error', { error: String(err) });
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
// Map agent events to hook events
|
|
257
|
+
const hookEvent = this.mapToHookEvent(event);
|
|
258
|
+
if (hookEvent) {
|
|
259
|
+
// Fire-and-forget WITH error tracking
|
|
260
|
+
const hookPromise = this.executeHooks(hookEvent, event)
|
|
261
|
+
.catch((err) => this.recordHookError(hookEvent, err))
|
|
262
|
+
.finally(() => this.pendingHooks.delete(hookPromise));
|
|
263
|
+
this.pendingHooks.add(hookPromise);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Emit an event and wait for all hooks to complete.
|
|
268
|
+
* Use this for critical events that MUST complete before continuing.
|
|
269
|
+
*/
|
|
270
|
+
async emitAsync(event) {
|
|
271
|
+
// Sync listeners
|
|
272
|
+
for (const listener of this.listeners) {
|
|
273
|
+
try {
|
|
274
|
+
listener(event);
|
|
275
|
+
}
|
|
276
|
+
catch (err) {
|
|
277
|
+
logger.error('Event listener error', { error: String(err) });
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
// Map agent events to hook events and await
|
|
281
|
+
const hookEvent = this.mapToHookEvent(event);
|
|
282
|
+
if (hookEvent) {
|
|
283
|
+
await this.executeHooks(hookEvent, event);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Wait for all pending hooks to complete.
|
|
288
|
+
* Call this before shutdown or when you need to ensure all hooks have finished.
|
|
289
|
+
*/
|
|
290
|
+
async flush() {
|
|
291
|
+
if (this.pendingHooks.size === 0) {
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
// Wait for all pending hooks (they already have error handling)
|
|
295
|
+
await Promise.all(Array.from(this.pendingHooks));
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Record a hook error for observability.
|
|
299
|
+
*/
|
|
300
|
+
recordHookError(event, error) {
|
|
301
|
+
const hookError = {
|
|
302
|
+
event,
|
|
303
|
+
error: error instanceof Error ? error : new Error(String(error)),
|
|
304
|
+
timestamp: new Date(),
|
|
305
|
+
};
|
|
306
|
+
// Add to bounded error history
|
|
307
|
+
this.hookErrors.push(hookError);
|
|
308
|
+
if (this.hookErrors.length > this.maxHookErrors) {
|
|
309
|
+
this.hookErrors.shift();
|
|
310
|
+
}
|
|
311
|
+
// Notify error listeners
|
|
312
|
+
for (const listener of this.errorListeners) {
|
|
313
|
+
try {
|
|
314
|
+
listener(hookError);
|
|
315
|
+
}
|
|
316
|
+
catch {
|
|
317
|
+
// Ignore errors in error listeners to prevent cascading failures
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
// Always log for visibility
|
|
321
|
+
logger.error('Hook error', { event, error: hookError.error.message });
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Subscribe to hook errors for observability.
|
|
325
|
+
* Returns an unsubscribe function.
|
|
326
|
+
*/
|
|
327
|
+
subscribeToErrors(listener) {
|
|
328
|
+
this.errorListeners.add(listener);
|
|
329
|
+
return () => this.errorListeners.delete(listener);
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Get recent hook errors.
|
|
333
|
+
*/
|
|
334
|
+
getHookErrors(limit = 10) {
|
|
335
|
+
return this.hookErrors.slice(-limit);
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Get count of pending hooks (for diagnostics).
|
|
339
|
+
*/
|
|
340
|
+
getPendingHookCount() {
|
|
341
|
+
return this.pendingHooks.size;
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Map agent event to hook event.
|
|
345
|
+
*/
|
|
346
|
+
mapToHookEvent(event) {
|
|
347
|
+
switch (event.type) {
|
|
348
|
+
case 'run.before':
|
|
349
|
+
return 'run.before';
|
|
350
|
+
case 'run.after':
|
|
351
|
+
return 'run.after';
|
|
352
|
+
case 'iteration.before':
|
|
353
|
+
return 'iteration.before';
|
|
354
|
+
case 'iteration.after':
|
|
355
|
+
return 'iteration.after';
|
|
356
|
+
case 'completion.before':
|
|
357
|
+
return 'completion.before';
|
|
358
|
+
case 'completion.after':
|
|
359
|
+
return 'completion.after';
|
|
360
|
+
case 'recovery.before':
|
|
361
|
+
return 'recovery.before';
|
|
362
|
+
case 'recovery.after':
|
|
363
|
+
return 'recovery.after';
|
|
364
|
+
case 'start':
|
|
365
|
+
return 'agent.start';
|
|
366
|
+
case 'complete':
|
|
367
|
+
return 'agent.end';
|
|
368
|
+
case 'llm.start':
|
|
369
|
+
return 'llm.before';
|
|
370
|
+
case 'llm.complete':
|
|
371
|
+
return 'llm.after';
|
|
372
|
+
case 'tool.start':
|
|
373
|
+
return 'tool.before';
|
|
374
|
+
case 'tool.complete':
|
|
375
|
+
return 'tool.after';
|
|
376
|
+
case 'error':
|
|
377
|
+
return 'error';
|
|
378
|
+
default:
|
|
379
|
+
return null;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Initialize all configured plugins.
|
|
384
|
+
*/
|
|
385
|
+
async initializePlugins() {
|
|
386
|
+
for (const plugin of this.config.plugins.plugins || []) {
|
|
387
|
+
await this.loadPlugin(plugin);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Cleanup all plugins and flush pending hooks.
|
|
392
|
+
*/
|
|
393
|
+
async cleanup() {
|
|
394
|
+
// Wait for pending hooks to complete
|
|
395
|
+
await this.flush();
|
|
396
|
+
// Unload all plugins
|
|
397
|
+
for (const name of this.plugins.keys()) {
|
|
398
|
+
await this.unloadPlugin(name);
|
|
399
|
+
}
|
|
400
|
+
// Clear error listeners
|
|
401
|
+
this.errorListeners.clear();
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
// =============================================================================
|
|
405
|
+
// FACTORY
|
|
406
|
+
// =============================================================================
|
|
407
|
+
export function createHookManager(hooksConfig, pluginsConfig) {
|
|
408
|
+
return new HookManager(hooksConfig, pluginsConfig);
|
|
409
|
+
}
|
|
410
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../src/integrations/utilities/hooks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAcH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAqB3C;;GAEG;AACH,MAAM,OAAO,WAAW;IACd,KAAK,GAA2B,IAAI,GAAG,EAAE,CAAC;IAC1C,OAAO,GAAwB,IAAI,GAAG,EAAE,CAAC;IACzC,KAAK,GAAgC,IAAI,GAAG,EAAE,CAAC;IAC/C,SAAS,GAA4B,IAAI,GAAG,EAAE,CAAC;IAC/C,MAAM,CAAiD;IAE/D,qDAAqD;IAC7C,YAAY,GAAuB,IAAI,GAAG,EAAE,CAAC;IAC7C,UAAU,GAAgB,EAAE,CAAC;IAC7B,cAAc,GAA2B,IAAI,GAAG,EAAE,CAAC;IACnD,aAAa,GAAG,GAAG,CAAC,CAAC,wBAAwB;IAErD,YAAY,WAAwB,EAAE,aAA4B;QAChE,IAAI,CAAC,MAAM,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC;QAC7D,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAChC,CAAC;IAED;;OAEG;IACK,sBAAsB;QAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC;QAEhD,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACpB,IAAI,CAAC,YAAY,CAAC;gBAChB,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,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,EAAE,CAAC;YACvD,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAChC,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAO;QACX,qCAAqC;QACrC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;QAEnB,qBAAqB;QACrB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;YACvC,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;QAED,wBAAwB;QACxB,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACF;AAED,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAEhF,MAAM,UAAU,iBAAiB,CAC/B,WAAwB,EACxB,aAA4B;IAE5B,OAAO,IAAI,WAAW,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* .agentignore Support
|
|
3
|
+
*
|
|
4
|
+
* AI-specific file exclusion patterns, separate from .gitignore.
|
|
5
|
+
* Allows hiding files from the agent that shouldn't be modified or seen,
|
|
6
|
+
* without affecting git behavior.
|
|
7
|
+
*
|
|
8
|
+
* Priority order (highest first):
|
|
9
|
+
* 1. .agentignore in current directory
|
|
10
|
+
* 2. .gitignore in current directory
|
|
11
|
+
* 3. Global ~/.agent/ignore
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
* const ignore = createIgnoreManager();
|
|
15
|
+
* await ignore.load(process.cwd());
|
|
16
|
+
* const filtered = ignore.filterPaths(paths);
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Ignore pattern with metadata.
|
|
20
|
+
*/
|
|
21
|
+
export interface IgnorePattern {
|
|
22
|
+
/** The pattern string */
|
|
23
|
+
pattern: string;
|
|
24
|
+
/** Whether this is a negation pattern (starts with !) */
|
|
25
|
+
negated: boolean;
|
|
26
|
+
/** Whether pattern is directory-only (ends with /) */
|
|
27
|
+
directoryOnly: boolean;
|
|
28
|
+
/** Compiled regex for matching */
|
|
29
|
+
regex: RegExp;
|
|
30
|
+
/** Source file */
|
|
31
|
+
source: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Ignore manager configuration.
|
|
35
|
+
*/
|
|
36
|
+
export interface IgnoreConfig {
|
|
37
|
+
/** Enable/disable ignore functionality */
|
|
38
|
+
enabled?: boolean;
|
|
39
|
+
/** Whether to include .gitignore patterns */
|
|
40
|
+
includeGitignore?: boolean;
|
|
41
|
+
/** Whether to include global patterns */
|
|
42
|
+
includeGlobal?: boolean;
|
|
43
|
+
/** Additional patterns to include */
|
|
44
|
+
extraPatterns?: string[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Ignore event types.
|
|
48
|
+
*/
|
|
49
|
+
export type IgnoreEvent = {
|
|
50
|
+
type: 'ignore.loaded';
|
|
51
|
+
source: string;
|
|
52
|
+
patternCount: number;
|
|
53
|
+
} | {
|
|
54
|
+
type: 'ignore.matched';
|
|
55
|
+
path: string;
|
|
56
|
+
pattern: string;
|
|
57
|
+
} | {
|
|
58
|
+
type: 'ignore.error';
|
|
59
|
+
source: string;
|
|
60
|
+
error: string;
|
|
61
|
+
};
|
|
62
|
+
export type IgnoreEventListener = (event: IgnoreEvent) => void;
|
|
63
|
+
/**
|
|
64
|
+
* Manages ignore patterns for file filtering.
|
|
65
|
+
*/
|
|
66
|
+
export declare class IgnoreManager {
|
|
67
|
+
private config;
|
|
68
|
+
private patterns;
|
|
69
|
+
private workspaceRoot;
|
|
70
|
+
private eventListeners;
|
|
71
|
+
private loaded;
|
|
72
|
+
constructor(config?: IgnoreConfig);
|
|
73
|
+
/**
|
|
74
|
+
* Load ignore patterns from files.
|
|
75
|
+
*/
|
|
76
|
+
load(workspaceRoot?: string): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Load patterns from a file.
|
|
79
|
+
*/
|
|
80
|
+
private loadFromFile;
|
|
81
|
+
/**
|
|
82
|
+
* Add patterns programmatically.
|
|
83
|
+
*/
|
|
84
|
+
addPatterns(patterns: string[], source?: string): void;
|
|
85
|
+
/**
|
|
86
|
+
* Check if a path should be ignored.
|
|
87
|
+
*/
|
|
88
|
+
shouldIgnore(path: string, isDirectory?: boolean): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Filter a list of paths, removing ignored ones.
|
|
91
|
+
*/
|
|
92
|
+
filterPaths(paths: string[]): string[];
|
|
93
|
+
/**
|
|
94
|
+
* Filter paths with directory info.
|
|
95
|
+
*/
|
|
96
|
+
filterPathsWithStats(paths: string[]): Promise<string[]>;
|
|
97
|
+
/**
|
|
98
|
+
* Get all patterns for debugging.
|
|
99
|
+
*/
|
|
100
|
+
getPatterns(): IgnorePattern[];
|
|
101
|
+
/**
|
|
102
|
+
* Check if patterns have been loaded.
|
|
103
|
+
*/
|
|
104
|
+
isLoaded(): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Clear all patterns.
|
|
107
|
+
*/
|
|
108
|
+
clear(): void;
|
|
109
|
+
/**
|
|
110
|
+
* Reload patterns from files.
|
|
111
|
+
*/
|
|
112
|
+
reload(): Promise<void>;
|
|
113
|
+
/**
|
|
114
|
+
* Subscribe to events.
|
|
115
|
+
*/
|
|
116
|
+
subscribe(listener: IgnoreEventListener): () => void;
|
|
117
|
+
/**
|
|
118
|
+
* Cleanup resources.
|
|
119
|
+
*/
|
|
120
|
+
cleanup(): void;
|
|
121
|
+
/**
|
|
122
|
+
* Normalize a path for matching.
|
|
123
|
+
*/
|
|
124
|
+
private normalizePath;
|
|
125
|
+
private emit;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Create an ignore manager.
|
|
129
|
+
*/
|
|
130
|
+
export declare function createIgnoreManager(config?: IgnoreConfig): IgnoreManager;
|
|
131
|
+
/**
|
|
132
|
+
* Quick check if a path should be ignored using default patterns.
|
|
133
|
+
*/
|
|
134
|
+
export declare function quickShouldIgnore(path: string): boolean;
|
|
135
|
+
/**
|
|
136
|
+
* Get sample .agentignore content.
|
|
137
|
+
*/
|
|
138
|
+
export declare function getSampleAgentignore(): string;
|
|
139
|
+
/**
|
|
140
|
+
* Get built-in patterns for reference.
|
|
141
|
+
*/
|
|
142
|
+
export declare function getBuiltinIgnorePatterns(): string[];
|
|
143
|
+
//# sourceMappingURL=ignore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../../../../src/integrations/utilities/ignore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAUH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAEhB,yDAAyD;IACzD,OAAO,EAAE,OAAO,CAAC;IAEjB,sDAAsD;IACtD,aAAa,EAAE,OAAO,CAAC;IAEvB,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IAEd,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,0CAA0C;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,6CAA6C;IAC7C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,yCAAyC;IACzC,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,qCAAqC;IACrC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GAC/D;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO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