attocode 0.2.4 → 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 +56 -1
- package/dist/src/adapters.d.ts +2 -1
- package/dist/src/adapters.d.ts.map +1 -1
- package/dist/src/adapters.js +60 -2
- 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 +14 -115
- package/dist/src/agent.d.ts.map +1 -1
- package/dist/src/agent.js +36 -1177
- package/dist/src/agent.js.map +1 -1
- package/dist/src/cli.js +1 -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 +8 -7
- package/dist/src/commands/handler.js.map +1 -1
- package/dist/src/commands/init.js +1 -1
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/config/schema.d.ts +6 -6
- package/dist/src/core/execution-loop.d.ts.map +1 -1
- package/dist/src/core/execution-loop.js +155 -16
- package/dist/src/core/execution-loop.js.map +1 -1
- package/dist/src/core/response-handler.d.ts.map +1 -1
- package/dist/src/core/response-handler.js +3 -2
- package/dist/src/core/response-handler.js.map +1 -1
- package/dist/src/core/subagent-spawner.d.ts.map +1 -1
- package/dist/src/core/subagent-spawner.js +13 -6
- package/dist/src/core/subagent-spawner.js.map +1 -1
- package/dist/src/core/tool-executor.d.ts.map +1 -1
- package/dist/src/core/tool-executor.js +7 -2
- package/dist/src/core/tool-executor.js.map +1 -1
- package/dist/src/core/types.d.ts +1 -0
- package/dist/src/core/types.d.ts.map +1 -1
- package/dist/src/core/types.js.map +1 -1
- package/dist/src/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/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/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/index.d.ts +72 -68
- package/dist/src/integrations/index.d.ts.map +1 -1
- package/dist/src/integrations/index.js +76 -68
- package/dist/src/integrations/index.js.map +1 -1
- package/dist/src/integrations/lsp/lsp.d.ts +196 -0
- package/dist/src/integrations/lsp/lsp.d.ts.map +1 -0
- package/dist/src/integrations/lsp/lsp.js +583 -0
- package/dist/src/integrations/lsp/lsp.js.map +1 -0
- package/dist/src/integrations/mcp/mcp-client.d.ts +279 -0
- package/dist/src/integrations/mcp/mcp-client.d.ts.map +1 -0
- package/dist/src/integrations/mcp/mcp-client.js +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/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/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/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/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/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/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.js +1 -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.map +1 -1
- package/dist/src/integrations/swarm/swarm-config-loader.js +7 -0
- package/dist/src/integrations/swarm/swarm-config-loader.js.map +1 -1
- package/dist/src/integrations/swarm/swarm-events.d.ts +1 -1
- package/dist/src/integrations/swarm/swarm-events.d.ts.map +1 -1
- package/dist/src/integrations/swarm/swarm-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 +84 -203
- package/dist/src/integrations/swarm/swarm-orchestrator.d.ts.map +1 -1
- package/dist/src/integrations/swarm/swarm-orchestrator.js +251 -2870
- 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.map +1 -1
- package/dist/src/integrations/swarm/swarm-state-store.js +6 -0
- package/dist/src/integrations/swarm/swarm-state-store.js.map +1 -1
- package/dist/src/integrations/swarm/task-queue.d.ts +1 -1
- package/dist/src/integrations/swarm/task-queue.d.ts.map +1 -1
- package/dist/src/integrations/swarm/task-queue.js +28 -1
- package/dist/src/integrations/swarm/task-queue.js.map +1 -1
- package/dist/src/integrations/swarm/types.d.ts +17 -5
- package/dist/src/integrations/swarm/types.d.ts.map +1 -1
- package/dist/src/integrations/swarm/types.js.map +1 -1
- package/dist/src/integrations/swarm/worker-pool.d.ts +1 -1
- package/dist/src/integrations/swarm/worker-pool.d.ts.map +1 -1
- package/dist/src/integrations/swarm/worker-pool.js +13 -9
- package/dist/src/integrations/swarm/worker-pool.js.map +1 -1
- package/dist/src/integrations/tasks/dependency-analyzer.d.ts +34 -0
- package/dist/src/integrations/tasks/dependency-analyzer.d.ts.map +1 -0
- package/dist/src/integrations/tasks/dependency-analyzer.js +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 +10 -4
- package/dist/src/main.js.map +1 -1
- package/dist/src/modes/repl.d.ts.map +1 -1
- package/dist/src/modes/repl.js +22 -5
- 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 +23 -6
- 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.js +1 -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 +31 -0
- package/dist/src/persistence/schema.js.map +1 -1
- package/dist/src/providers/adapters/anthropic.d.ts +6 -0
- package/dist/src/providers/adapters/anthropic.d.ts.map +1 -1
- package/dist/src/providers/adapters/anthropic.js +99 -15
- 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 +39 -8
- 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 +73 -3
- package/dist/src/providers/adapters/openrouter.js.map +1 -1
- package/dist/src/providers/provider.js +1 -1
- package/dist/src/providers/provider.js.map +1 -1
- package/dist/src/providers/resilient-provider.js +1 -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 +1 -1
- package/dist/src/session-picker.js.map +1 -1
- package/dist/src/shared/budget-tracker.js +1 -1
- package/dist/src/shared/budget-tracker.js.map +1 -1
- package/dist/src/tools/agent.d.ts +1 -1
- package/dist/src/tools/agent.d.ts.map +1 -1
- package/dist/src/tools/bash.js +1 -1
- package/dist/src/tools/bash.js.map +1 -1
- package/dist/src/tools/file.js +1 -1
- package/dist/src/tools/file.js.map +1 -1
- package/dist/src/tools/permission.js +2 -2
- 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/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 +22 -0
- package/dist/src/tracing/trace-collector.d.ts.map +1 -1
- package/dist/src/tracing/trace-collector.js +27 -3
- package/dist/src/tracing/trace-collector.js.map +1 -1
- package/dist/src/tracing/types.d.ts +17 -1
- package/dist/src/tracing/types.d.ts.map +1 -1
- package/dist/src/tracing/types.js.map +1 -1
- package/dist/src/tricks/failure-evidence.js +1 -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 +3 -3
- package/dist/src/tui/app.d.ts.map +1 -1
- package/dist/src/tui/app.js +86 -14
- 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.js +1 -1
- 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.js +1 -1
- package/dist/src/tui/event-display.js.map +1 -1
- package/dist/src/tui/index.js +1 -1
- 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 +27 -2
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Seatbelt Sandbox (macOS)
|
|
3
|
+
*
|
|
4
|
+
* Uses macOS sandbox-exec with Seatbelt profiles to restrict command execution.
|
|
5
|
+
* Seatbelt is Apple's mandatory access control framework.
|
|
6
|
+
*
|
|
7
|
+
* Key features:
|
|
8
|
+
* - Fine-grained file system access control
|
|
9
|
+
* - Network access restrictions
|
|
10
|
+
* - Process spawning limits
|
|
11
|
+
* - Signal restrictions
|
|
12
|
+
*
|
|
13
|
+
* Note: This uses spawn() with explicit shell arguments for the sandboxed execution.
|
|
14
|
+
* The sandbox itself provides the security layer - we're wrapping shell execution
|
|
15
|
+
* with OS-level access controls.
|
|
16
|
+
*
|
|
17
|
+
* Reference: https://reverse.put.as/wp-content/uploads/2011/09/Apple-Sandbox-Guide-v1.0.pdf
|
|
18
|
+
*/
|
|
19
|
+
import { spawn, execSync } from 'child_process';
|
|
20
|
+
// =============================================================================
|
|
21
|
+
// SEATBELT PROFILE GENERATION
|
|
22
|
+
// =============================================================================
|
|
23
|
+
/**
|
|
24
|
+
* Generate a Seatbelt profile based on options.
|
|
25
|
+
*/
|
|
26
|
+
function generateSeatbeltProfile(options) {
|
|
27
|
+
const writablePaths = options.writablePaths ?? ['.'];
|
|
28
|
+
const readablePaths = options.readablePaths ?? ['/'];
|
|
29
|
+
const networkAllowed = options.networkAllowed ?? false;
|
|
30
|
+
const workingDir = options.workingDir ?? process.cwd();
|
|
31
|
+
// Start with version declaration and deny default
|
|
32
|
+
const rules = [
|
|
33
|
+
'(version 1)',
|
|
34
|
+
'(deny default)',
|
|
35
|
+
];
|
|
36
|
+
// Allow process management
|
|
37
|
+
rules.push('(allow process-fork)');
|
|
38
|
+
rules.push('(allow process-exec)');
|
|
39
|
+
rules.push('(allow signal (target self))');
|
|
40
|
+
// Allow system basics
|
|
41
|
+
rules.push('(allow sysctl-read)');
|
|
42
|
+
rules.push('(allow mach-lookup)');
|
|
43
|
+
rules.push('(allow ipc-posix-shm)');
|
|
44
|
+
// Allow file reads for standard paths
|
|
45
|
+
const standardReadPaths = [
|
|
46
|
+
'/bin',
|
|
47
|
+
'/usr/bin',
|
|
48
|
+
'/usr/local/bin',
|
|
49
|
+
'/opt/homebrew/bin',
|
|
50
|
+
'/sbin',
|
|
51
|
+
'/usr/sbin',
|
|
52
|
+
'/lib',
|
|
53
|
+
'/usr/lib',
|
|
54
|
+
'/usr/local/lib',
|
|
55
|
+
'/opt/homebrew/lib',
|
|
56
|
+
'/System',
|
|
57
|
+
'/Library/Frameworks',
|
|
58
|
+
'/private/var/db',
|
|
59
|
+
'/dev/null',
|
|
60
|
+
'/dev/urandom',
|
|
61
|
+
'/dev/random',
|
|
62
|
+
'/dev/tty',
|
|
63
|
+
'/etc',
|
|
64
|
+
'/private/etc',
|
|
65
|
+
'/var/folders', // Temp files
|
|
66
|
+
'/private/var/folders',
|
|
67
|
+
'/tmp',
|
|
68
|
+
'/private/tmp',
|
|
69
|
+
];
|
|
70
|
+
// Add read access for standard paths
|
|
71
|
+
for (const path of standardReadPaths) {
|
|
72
|
+
rules.push(`(allow file-read* (subpath "${path}"))`);
|
|
73
|
+
}
|
|
74
|
+
// Add user-specified readable paths
|
|
75
|
+
for (const path of readablePaths) {
|
|
76
|
+
const resolvedPath = resolvePath(path, workingDir);
|
|
77
|
+
rules.push(`(allow file-read* (subpath "${resolvedPath}"))`);
|
|
78
|
+
}
|
|
79
|
+
// Add write access for specified paths
|
|
80
|
+
for (const path of writablePaths) {
|
|
81
|
+
const resolvedPath = resolvePath(path, workingDir);
|
|
82
|
+
rules.push(`(allow file-read* (subpath "${resolvedPath}"))`);
|
|
83
|
+
rules.push(`(allow file-write* (subpath "${resolvedPath}"))`);
|
|
84
|
+
}
|
|
85
|
+
// Temp directory access
|
|
86
|
+
rules.push('(allow file-read* (subpath "/tmp"))');
|
|
87
|
+
rules.push('(allow file-write* (subpath "/tmp"))');
|
|
88
|
+
rules.push('(allow file-read* (subpath "/private/tmp"))');
|
|
89
|
+
rules.push('(allow file-write* (subpath "/private/tmp"))');
|
|
90
|
+
// Allow write to stderr/stdout
|
|
91
|
+
rules.push('(allow file-write* (literal "/dev/tty"))');
|
|
92
|
+
rules.push('(allow file-write* (literal "/dev/null"))');
|
|
93
|
+
// Network access
|
|
94
|
+
if (networkAllowed) {
|
|
95
|
+
rules.push('(allow network*)');
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
// Still allow localhost for dev servers
|
|
99
|
+
rules.push('(allow network-inbound (local ip "*:*"))');
|
|
100
|
+
rules.push('(allow network-outbound (local ip "localhost:*"))');
|
|
101
|
+
rules.push('(allow network-outbound (local ip "127.0.0.1:*"))');
|
|
102
|
+
rules.push('(allow network-outbound (local ip "::1:*"))');
|
|
103
|
+
}
|
|
104
|
+
return rules.join('\n');
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Resolve a path relative to working directory.
|
|
108
|
+
*/
|
|
109
|
+
function resolvePath(path, workingDir) {
|
|
110
|
+
if (path.startsWith('/')) {
|
|
111
|
+
return path;
|
|
112
|
+
}
|
|
113
|
+
if (path === '.') {
|
|
114
|
+
return workingDir;
|
|
115
|
+
}
|
|
116
|
+
return `${workingDir}/${path}`;
|
|
117
|
+
}
|
|
118
|
+
// =============================================================================
|
|
119
|
+
// SEATBELT SANDBOX
|
|
120
|
+
// =============================================================================
|
|
121
|
+
/**
|
|
122
|
+
* macOS Seatbelt sandbox implementation.
|
|
123
|
+
*/
|
|
124
|
+
export class SeatbeltSandbox {
|
|
125
|
+
options;
|
|
126
|
+
available = null;
|
|
127
|
+
constructor(options) {
|
|
128
|
+
this.options = options;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Execute a command inside the Seatbelt sandbox.
|
|
132
|
+
*
|
|
133
|
+
* Note: We use spawn with 'bash -c' because the sandbox-exec command
|
|
134
|
+
* itself provides the security boundary. The command string is passed
|
|
135
|
+
* to the sandboxed shell, which has restricted access via Seatbelt.
|
|
136
|
+
*/
|
|
137
|
+
async execute(command, options) {
|
|
138
|
+
const mergedOptions = { ...this.options, ...options };
|
|
139
|
+
const profile = generateSeatbeltProfile(mergedOptions);
|
|
140
|
+
const timeout = mergedOptions.timeout ?? 60000;
|
|
141
|
+
const workDir = mergedOptions.workingDir ?? process.cwd();
|
|
142
|
+
return new Promise((resolve) => {
|
|
143
|
+
// sandbox-exec -p 'profile' bash -c 'command'
|
|
144
|
+
// The sandbox profile restricts what the shell can do
|
|
145
|
+
const proc = spawn('sandbox-exec', ['-p', profile, 'bash', '-c', command], {
|
|
146
|
+
cwd: workDir,
|
|
147
|
+
env: {
|
|
148
|
+
...process.env,
|
|
149
|
+
...mergedOptions.env,
|
|
150
|
+
// Add common paths to PATH
|
|
151
|
+
PATH: [
|
|
152
|
+
process.env.PATH,
|
|
153
|
+
'/usr/local/bin',
|
|
154
|
+
'/opt/homebrew/bin',
|
|
155
|
+
'/usr/bin',
|
|
156
|
+
'/bin',
|
|
157
|
+
].filter(Boolean).join(':'),
|
|
158
|
+
},
|
|
159
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
160
|
+
});
|
|
161
|
+
let stdout = '';
|
|
162
|
+
let stderr = '';
|
|
163
|
+
let killed = false;
|
|
164
|
+
let timedOut = false;
|
|
165
|
+
const timer = setTimeout(() => {
|
|
166
|
+
timedOut = true;
|
|
167
|
+
killed = true;
|
|
168
|
+
proc.kill('SIGKILL');
|
|
169
|
+
}, timeout);
|
|
170
|
+
proc.stdout?.on('data', (data) => {
|
|
171
|
+
stdout += data.toString();
|
|
172
|
+
});
|
|
173
|
+
proc.stderr?.on('data', (data) => {
|
|
174
|
+
stderr += data.toString();
|
|
175
|
+
});
|
|
176
|
+
proc.on('close', (code) => {
|
|
177
|
+
clearTimeout(timer);
|
|
178
|
+
// Check if the sandbox blocked something
|
|
179
|
+
const sandboxError = this.parseSandboxError(stderr);
|
|
180
|
+
resolve({
|
|
181
|
+
stdout,
|
|
182
|
+
stderr,
|
|
183
|
+
exitCode: code ?? 1,
|
|
184
|
+
killed,
|
|
185
|
+
timedOut,
|
|
186
|
+
error: sandboxError,
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
proc.on('error', (err) => {
|
|
190
|
+
clearTimeout(timer);
|
|
191
|
+
resolve({
|
|
192
|
+
stdout,
|
|
193
|
+
stderr,
|
|
194
|
+
exitCode: 1,
|
|
195
|
+
killed: false,
|
|
196
|
+
timedOut: false,
|
|
197
|
+
error: err.message,
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Check if Seatbelt is available on this system.
|
|
204
|
+
*/
|
|
205
|
+
async isAvailable() {
|
|
206
|
+
if (this.available !== null) {
|
|
207
|
+
return this.available;
|
|
208
|
+
}
|
|
209
|
+
// Must be macOS
|
|
210
|
+
if (process.platform !== 'darwin') {
|
|
211
|
+
this.available = false;
|
|
212
|
+
return false;
|
|
213
|
+
}
|
|
214
|
+
// Check if sandbox-exec exists
|
|
215
|
+
try {
|
|
216
|
+
execSync('which sandbox-exec', { stdio: 'pipe' });
|
|
217
|
+
this.available = true;
|
|
218
|
+
return true;
|
|
219
|
+
}
|
|
220
|
+
catch {
|
|
221
|
+
this.available = false;
|
|
222
|
+
return false;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Get sandbox type.
|
|
227
|
+
*/
|
|
228
|
+
getType() {
|
|
229
|
+
return 'seatbelt';
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Cleanup resources.
|
|
233
|
+
*/
|
|
234
|
+
async cleanup() {
|
|
235
|
+
// No persistent resources to clean up
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Parse sandbox error from stderr.
|
|
239
|
+
*/
|
|
240
|
+
parseSandboxError(stderr) {
|
|
241
|
+
// Look for sandbox denial messages
|
|
242
|
+
if (stderr.includes('sandbox-exec:') || stderr.includes('deny')) {
|
|
243
|
+
const match = stderr.match(/sandbox-exec: (.+)/);
|
|
244
|
+
if (match) {
|
|
245
|
+
return `Sandbox denied: ${match[1]}`;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return undefined;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
// =============================================================================
|
|
252
|
+
// PREDEFINED PROFILES
|
|
253
|
+
// =============================================================================
|
|
254
|
+
/**
|
|
255
|
+
* Strict profile - minimal access for pure computation.
|
|
256
|
+
*/
|
|
257
|
+
export const STRICT_PROFILE = {
|
|
258
|
+
writablePaths: [],
|
|
259
|
+
readablePaths: ['/usr/lib', '/System'],
|
|
260
|
+
networkAllowed: false,
|
|
261
|
+
timeout: 30000,
|
|
262
|
+
maxMemoryMB: 256,
|
|
263
|
+
maxCpuSeconds: 10,
|
|
264
|
+
};
|
|
265
|
+
/**
|
|
266
|
+
* Development profile - allows npm, node, git operations.
|
|
267
|
+
*/
|
|
268
|
+
export const DEV_PROFILE = {
|
|
269
|
+
writablePaths: ['.', 'node_modules', '.git'],
|
|
270
|
+
readablePaths: ['/'],
|
|
271
|
+
networkAllowed: true, // Allow npm install
|
|
272
|
+
timeout: 300000, // 5 minutes
|
|
273
|
+
maxMemoryMB: 1024,
|
|
274
|
+
maxCpuSeconds: 120,
|
|
275
|
+
};
|
|
276
|
+
/**
|
|
277
|
+
* Build profile - allows compilation but no network.
|
|
278
|
+
*/
|
|
279
|
+
export const BUILD_PROFILE = {
|
|
280
|
+
writablePaths: ['.', 'dist', 'build', 'node_modules/.cache'],
|
|
281
|
+
readablePaths: ['/'],
|
|
282
|
+
networkAllowed: false,
|
|
283
|
+
timeout: 300000,
|
|
284
|
+
maxMemoryMB: 2048,
|
|
285
|
+
maxCpuSeconds: 300,
|
|
286
|
+
};
|
|
287
|
+
/**
|
|
288
|
+
* Test profile - allows test execution with limited write access.
|
|
289
|
+
*/
|
|
290
|
+
export const TEST_PROFILE = {
|
|
291
|
+
writablePaths: ['.', 'coverage', 'test-results', 'node_modules/.cache'],
|
|
292
|
+
readablePaths: ['/'],
|
|
293
|
+
networkAllowed: false, // Tests should be isolated
|
|
294
|
+
timeout: 600000, // 10 minutes
|
|
295
|
+
maxMemoryMB: 1024,
|
|
296
|
+
maxCpuSeconds: 300,
|
|
297
|
+
};
|
|
298
|
+
//# sourceMappingURL=seatbelt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seatbelt.js","sourceRoot":"","sources":["../../../../../src/integrations/safety/sandbox/seatbelt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,eA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,EAAQ,aAAa;IACpC,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,GAAG;CACnB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript Compilation Checker
|
|
3
|
+
*
|
|
4
|
+
* Detects TypeScript projects, runs `tsc --noEmit` periodically during editing
|
|
5
|
+
* and at completion, and formats errors for agent consumption.
|
|
6
|
+
*
|
|
7
|
+
* Uses the same safe spawn pattern as src/tools/bash.ts.
|
|
8
|
+
*/
|
|
9
|
+
export interface TypeCheckError {
|
|
10
|
+
file: string;
|
|
11
|
+
line: number;
|
|
12
|
+
column: number;
|
|
13
|
+
code: string;
|
|
14
|
+
message: string;
|
|
15
|
+
}
|
|
16
|
+
export interface TypeCheckResult {
|
|
17
|
+
success: boolean;
|
|
18
|
+
errorCount: number;
|
|
19
|
+
errors: TypeCheckError[];
|
|
20
|
+
duration: number;
|
|
21
|
+
}
|
|
22
|
+
export interface TypeCheckerState {
|
|
23
|
+
tsconfigDir: string | null;
|
|
24
|
+
tsEditsSinceLastCheck: number;
|
|
25
|
+
lastResult: TypeCheckResult | null;
|
|
26
|
+
hasRunOnce: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Walk up from cwd looking for tsconfig.json.
|
|
30
|
+
* Returns the containing directory or null.
|
|
31
|
+
*/
|
|
32
|
+
export declare function detectTypeScriptProject(cwd: string): string | null;
|
|
33
|
+
/**
|
|
34
|
+
* Run `npx tsc --noEmit --pretty false` in tsconfigDir.
|
|
35
|
+
* Uses spawn (not exec) to avoid shell injection — same safe pattern as tools/bash.ts.
|
|
36
|
+
* On spawn error (tsc not installed), returns success (graceful degradation).
|
|
37
|
+
*/
|
|
38
|
+
export declare function runTypeCheck(tsconfigDir: string, timeout?: number): Promise<TypeCheckResult>;
|
|
39
|
+
/**
|
|
40
|
+
* Parse tsc --pretty false output into structured errors.
|
|
41
|
+
* Format: file(line,column): error TSxxxx: message
|
|
42
|
+
*/
|
|
43
|
+
export declare function parseTypeCheckOutput(output: string): TypeCheckError[];
|
|
44
|
+
/**
|
|
45
|
+
* Format compilation errors into an agent-readable nudge message.
|
|
46
|
+
* Shows up to maxErrors errors and ends with a fix instruction.
|
|
47
|
+
*/
|
|
48
|
+
export declare function formatTypeCheckNudge(result: TypeCheckResult, maxErrors?: number): string;
|
|
49
|
+
/**
|
|
50
|
+
* Create initial TypeCheckerState by detecting the project.
|
|
51
|
+
*/
|
|
52
|
+
export declare function createTypeCheckerState(cwd: string): TypeCheckerState;
|
|
53
|
+
//# sourceMappingURL=type-checker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-checker.d.ts","sourceRoot":"","sources":["../../../../src/integrations/safety/type-checker.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAUH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,UAAU,EAAE,eAAe,GAAG,IAAI,CAAC;IACnC,UAAU,EAAE,OAAO,CAAC;CACrB;AAMD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAalE;AAMD;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,MAAe,GACvB,OAAO,CAAC,eAAe,CAAC,CA6C1B;AAMD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,EAAE,CAgBrE;AAMD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,eAAe,EACvB,SAAS,GAAE,MAAW,GACrB,MAAM,CAmBR;AAMD;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAOpE"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript Compilation Checker
|
|
3
|
+
*
|
|
4
|
+
* Detects TypeScript projects, runs `tsc --noEmit` periodically during editing
|
|
5
|
+
* and at completion, and formats errors for agent consumption.
|
|
6
|
+
*
|
|
7
|
+
* Uses the same safe spawn pattern as src/tools/bash.ts.
|
|
8
|
+
*/
|
|
9
|
+
import { spawn } from 'node:child_process';
|
|
10
|
+
import { existsSync } from 'node:fs';
|
|
11
|
+
import { join, dirname } from 'node:path';
|
|
12
|
+
// =============================================================================
|
|
13
|
+
// PROJECT DETECTION
|
|
14
|
+
// =============================================================================
|
|
15
|
+
/**
|
|
16
|
+
* Walk up from cwd looking for tsconfig.json.
|
|
17
|
+
* Returns the containing directory or null.
|
|
18
|
+
*/
|
|
19
|
+
export function detectTypeScriptProject(cwd) {
|
|
20
|
+
let dir = cwd;
|
|
21
|
+
const root = dirname(dir) === dir ? dir : undefined; // filesystem root guard
|
|
22
|
+
for (let i = 0; i < 20; i++) {
|
|
23
|
+
if (existsSync(join(dir, 'tsconfig.json'))) {
|
|
24
|
+
return dir;
|
|
25
|
+
}
|
|
26
|
+
const parent = dirname(dir);
|
|
27
|
+
if (parent === dir || parent === root)
|
|
28
|
+
break;
|
|
29
|
+
dir = parent;
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
// =============================================================================
|
|
34
|
+
// TSC EXECUTION
|
|
35
|
+
// =============================================================================
|
|
36
|
+
/**
|
|
37
|
+
* Run `npx tsc --noEmit --pretty false` in tsconfigDir.
|
|
38
|
+
* Uses spawn (not exec) to avoid shell injection — same safe pattern as tools/bash.ts.
|
|
39
|
+
* On spawn error (tsc not installed), returns success (graceful degradation).
|
|
40
|
+
*/
|
|
41
|
+
export async function runTypeCheck(tsconfigDir, timeout = 60_000) {
|
|
42
|
+
const start = Date.now();
|
|
43
|
+
return new Promise((resolve) => {
|
|
44
|
+
let stdout = '';
|
|
45
|
+
let stderr = '';
|
|
46
|
+
let resolved = false;
|
|
47
|
+
const done = (success) => {
|
|
48
|
+
if (resolved)
|
|
49
|
+
return;
|
|
50
|
+
resolved = true;
|
|
51
|
+
const output = stdout + '\n' + stderr;
|
|
52
|
+
const errors = parseTypeCheckOutput(output);
|
|
53
|
+
resolve({
|
|
54
|
+
success,
|
|
55
|
+
errorCount: errors.length,
|
|
56
|
+
errors,
|
|
57
|
+
duration: Date.now() - start,
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
try {
|
|
61
|
+
const child = spawn('npx', ['tsc', '--noEmit', '--pretty', 'false'], {
|
|
62
|
+
cwd: tsconfigDir,
|
|
63
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
64
|
+
env: { ...process.env },
|
|
65
|
+
timeout,
|
|
66
|
+
});
|
|
67
|
+
child.stdout?.on('data', (data) => { stdout += data.toString(); });
|
|
68
|
+
child.stderr?.on('data', (data) => { stderr += data.toString(); });
|
|
69
|
+
child.on('close', (code) => {
|
|
70
|
+
done(code === 0);
|
|
71
|
+
});
|
|
72
|
+
child.on('error', () => {
|
|
73
|
+
// tsc not installed or spawn failed — graceful degradation
|
|
74
|
+
done(true);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
// Spawn itself failed — graceful degradation
|
|
79
|
+
done(true);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
// =============================================================================
|
|
84
|
+
// OUTPUT PARSING
|
|
85
|
+
// =============================================================================
|
|
86
|
+
/**
|
|
87
|
+
* Parse tsc --pretty false output into structured errors.
|
|
88
|
+
* Format: file(line,column): error TSxxxx: message
|
|
89
|
+
*/
|
|
90
|
+
export function parseTypeCheckOutput(output) {
|
|
91
|
+
const errors = [];
|
|
92
|
+
const regex = /^(.+?)\((\d+),(\d+)\):\s+error\s+(TS\d+):\s+(.+)$/gm;
|
|
93
|
+
let match;
|
|
94
|
+
while ((match = regex.exec(output)) !== null) {
|
|
95
|
+
errors.push({
|
|
96
|
+
file: match[1],
|
|
97
|
+
line: parseInt(match[2], 10),
|
|
98
|
+
column: parseInt(match[3], 10),
|
|
99
|
+
code: match[4],
|
|
100
|
+
message: match[5],
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
return errors;
|
|
104
|
+
}
|
|
105
|
+
// =============================================================================
|
|
106
|
+
// NUDGE FORMATTING
|
|
107
|
+
// =============================================================================
|
|
108
|
+
/**
|
|
109
|
+
* Format compilation errors into an agent-readable nudge message.
|
|
110
|
+
* Shows up to maxErrors errors and ends with a fix instruction.
|
|
111
|
+
*/
|
|
112
|
+
export function formatTypeCheckNudge(result, maxErrors = 15) {
|
|
113
|
+
const parts = [
|
|
114
|
+
`[System] TypeScript compilation failed with ${result.errorCount} error(s):`,
|
|
115
|
+
'',
|
|
116
|
+
];
|
|
117
|
+
const shown = result.errors.slice(0, maxErrors);
|
|
118
|
+
for (const err of shown) {
|
|
119
|
+
parts.push(` ${err.file}(${err.line},${err.column}): ${err.code}: ${err.message}`);
|
|
120
|
+
}
|
|
121
|
+
if (result.errors.length > maxErrors) {
|
|
122
|
+
parts.push(` ... and ${result.errors.length - maxErrors} more error(s)`);
|
|
123
|
+
}
|
|
124
|
+
parts.push('');
|
|
125
|
+
parts.push('Fix these TypeScript compilation errors before completing the task.');
|
|
126
|
+
return parts.join('\n');
|
|
127
|
+
}
|
|
128
|
+
// =============================================================================
|
|
129
|
+
// FACTORY
|
|
130
|
+
// =============================================================================
|
|
131
|
+
/**
|
|
132
|
+
* Create initial TypeCheckerState by detecting the project.
|
|
133
|
+
*/
|
|
134
|
+
export function createTypeCheckerState(cwd) {
|
|
135
|
+
return {
|
|
136
|
+
tsconfigDir: detectTypeScriptProject(cwd),
|
|
137
|
+
tsEditsSinceLastCheck: 0,
|
|
138
|
+
lastResult: null,
|
|
139
|
+
hasRunOnce: false,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=type-checker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-checker.js","sourceRoot":"","sources":["../../../../src/integrations/safety/type-checker.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4B1C,gFAAgF;AAChF,oBAAoB;AACpB,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,GAAW;IACjD,IAAI,GAAG,GAAG,GAAG,CAAC;IACd,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,wBAAwB;IAE7E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5B,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC;YAC3C,OAAO,GAAG,CAAC;QACb,CAAC;QACD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,IAAI;YAAE,MAAM;QAC7C,GAAG,GAAG,MAAM,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC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AEhF;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAuB,EACvB,YAAoB,EAAE;IAEtB,MAAM,KAAK,GAAa;QACtB,+CAA+C,MAAM,CAAC,UAAU,YAAY;QAC5E,EAAE;KACH,CAAC;IAEF,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IAChD,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC;QACxB,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,MAAM,MAAM,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,EAAE,CAAC;QACrC,KAAK,CAAC,IAAI,CAAC,aAAa,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,gBAAgB,CAAC,CAAC;IAC5E,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,qEAAqE,CAAC,CAAC;IAElF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAEhF;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,GAAW;IAChD,OAAO;QACL,WAAW,EAAE,uBAAuB,CAAC,GAAG,CAAC;QACzC,qBAAqB,EAAE,CAAC;QACxB,UAAU,EAAE,IAAI;QAChB,UAAU,EAAE,KAAK;KAClB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill Executor
|
|
3
|
+
*
|
|
4
|
+
* Handles invocation of skills with argument parsing and template substitution.
|
|
5
|
+
* Skills can be invoked like commands: /review --file src/main.ts --focus security
|
|
6
|
+
*/
|
|
7
|
+
import type { Skill, SkillManager } from './skills.js';
|
|
8
|
+
/**
|
|
9
|
+
* Parsed arguments from command line input.
|
|
10
|
+
*/
|
|
11
|
+
export interface ParsedArgs {
|
|
12
|
+
/** Named arguments (--name value or -n value) */
|
|
13
|
+
named: Record<string, unknown>;
|
|
14
|
+
/** Positional arguments (remaining after named) */
|
|
15
|
+
positional: string[];
|
|
16
|
+
/** Any parsing errors */
|
|
17
|
+
errors: string[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Context provided during skill execution.
|
|
21
|
+
*/
|
|
22
|
+
export interface SkillExecutionContext {
|
|
23
|
+
/** Current working directory */
|
|
24
|
+
cwd: string;
|
|
25
|
+
/** Session ID */
|
|
26
|
+
sessionId?: string;
|
|
27
|
+
/** Current conversation context (for prompt injection) */
|
|
28
|
+
conversationContext?: string;
|
|
29
|
+
/** Callback to run agent with injected prompt */
|
|
30
|
+
runWithPrompt?: (prompt: string) => Promise<SkillExecutionResult>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Result of skill execution.
|
|
34
|
+
*/
|
|
35
|
+
export interface SkillExecutionResult {
|
|
36
|
+
/** Whether execution succeeded */
|
|
37
|
+
success: boolean;
|
|
38
|
+
/** Result message or output */
|
|
39
|
+
output: string;
|
|
40
|
+
/** Injected prompt for the agent (if prompt-injection mode) */
|
|
41
|
+
injectedPrompt?: string;
|
|
42
|
+
/** Error message if failed */
|
|
43
|
+
error?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Skill execution event types.
|
|
47
|
+
*/
|
|
48
|
+
export type SkillExecutorEvent = {
|
|
49
|
+
type: 'skill.invoke.start';
|
|
50
|
+
skillName: string;
|
|
51
|
+
args: string[];
|
|
52
|
+
} | {
|
|
53
|
+
type: 'skill.invoke.parsed';
|
|
54
|
+
skillName: string;
|
|
55
|
+
parsed: ParsedArgs;
|
|
56
|
+
} | {
|
|
57
|
+
type: 'skill.invoke.complete';
|
|
58
|
+
skillName: string;
|
|
59
|
+
result: SkillExecutionResult;
|
|
60
|
+
} | {
|
|
61
|
+
type: 'skill.invoke.error';
|
|
62
|
+
skillName: string;
|
|
63
|
+
error: string;
|
|
64
|
+
};
|
|
65
|
+
export type SkillExecutorEventListener = (event: SkillExecutorEvent) => void;
|
|
66
|
+
/**
|
|
67
|
+
* Executes invokable skills with argument parsing and template substitution.
|
|
68
|
+
*/
|
|
69
|
+
export declare class SkillExecutor {
|
|
70
|
+
private skillManager;
|
|
71
|
+
private eventListeners;
|
|
72
|
+
constructor(skillManager: SkillManager);
|
|
73
|
+
/**
|
|
74
|
+
* Check if an input string is a potential skill invocation.
|
|
75
|
+
* Returns the skill name if it matches, null otherwise.
|
|
76
|
+
*/
|
|
77
|
+
isSkillInvocation(input: string): string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Parse command-line style arguments.
|
|
80
|
+
*/
|
|
81
|
+
parseArguments(skill: Skill, rawArgs: string[]): ParsedArgs;
|
|
82
|
+
/**
|
|
83
|
+
* Substitute template variables in skill content.
|
|
84
|
+
* Variables are in the form {{name}} or {{name|default}}.
|
|
85
|
+
*/
|
|
86
|
+
substituteTemplate(content: string, args: ParsedArgs): string;
|
|
87
|
+
/**
|
|
88
|
+
* Execute a skill by name with arguments.
|
|
89
|
+
*/
|
|
90
|
+
executeSkill(skillName: string, rawArgs: string[], ctx: SkillExecutionContext): Promise<SkillExecutionResult>;
|
|
91
|
+
/**
|
|
92
|
+
* Build the prompt to inject based on skill content and arguments.
|
|
93
|
+
*/
|
|
94
|
+
private buildInjectedPrompt;
|
|
95
|
+
/**
|
|
96
|
+
* Format help text for a skill.
|
|
97
|
+
*/
|
|
98
|
+
formatSkillHelp(skill: Skill): string;
|
|
99
|
+
/**
|
|
100
|
+
* Get all invokable skills.
|
|
101
|
+
*/
|
|
102
|
+
getInvokableSkills(): Skill[];
|
|
103
|
+
/**
|
|
104
|
+
* Subscribe to executor events.
|
|
105
|
+
*/
|
|
106
|
+
subscribe(listener: SkillExecutorEventListener): () => void;
|
|
107
|
+
private emit;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Create a skill executor.
|
|
111
|
+
*/
|
|
112
|
+
export declare function createSkillExecutor(skillManager: SkillManager): SkillExecutor;
|
|
113
|
+
//# sourceMappingURL=skill-executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-executor.d.ts","sourceRoot":"","sources":["../../../../src/integrations/skills/skill-executor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAiB,YAAY,EAAE,MAAM,aAAa,CAAC;AAMtE;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE/B,mDAAmD;IACnD,UAAU,EAAE,MAAM,EAAE,CAAC;IAErB,yBAAyB;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,gCAAgC;IAChC,GAAG,EAAE,MAAM,CAAC;IAEZ,iBAAiB;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,0DAA0D;IAC1D,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B,iDAAiD;IACjD,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACnE;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,kCAAkC;IAClC,OAAO,EAAE,OAAO,CAAC;IAEjB,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IAEf,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IAAE,IAA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