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,386 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OS-Specific Sandbox Integration
|
|
3
|
+
*
|
|
4
|
+
* Provides platform-aware sandboxing for command execution:
|
|
5
|
+
* - macOS: Uses sandbox-exec with Seatbelt profiles
|
|
6
|
+
* - Linux: Uses Docker containers for isolation
|
|
7
|
+
* - Fallback: Basic allowlist-based validation
|
|
8
|
+
*
|
|
9
|
+
* Inspired by Codex's approach to secure code execution.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* const sandbox = createSandbox({ writablePaths: ['.'], networkAllowed: false });
|
|
13
|
+
* const result = await sandbox.execute('npm install');
|
|
14
|
+
*/
|
|
15
|
+
import { SeatbeltSandbox } from './seatbelt.js';
|
|
16
|
+
import { DockerSandbox } from './docker.js';
|
|
17
|
+
import { BasicSandbox } from './basic.js';
|
|
18
|
+
import { LandlockSandbox } from './landlock.js';
|
|
19
|
+
import { logger } from '../../utilities/logger.js';
|
|
20
|
+
// =============================================================================
|
|
21
|
+
// DEFAULT OPTIONS
|
|
22
|
+
// =============================================================================
|
|
23
|
+
const DEFAULT_OPTIONS = {
|
|
24
|
+
writablePaths: ['.'],
|
|
25
|
+
readablePaths: ['/'],
|
|
26
|
+
networkAllowed: false,
|
|
27
|
+
timeout: 60000, // 1 minute
|
|
28
|
+
workingDir: process.cwd(),
|
|
29
|
+
env: {},
|
|
30
|
+
maxMemoryMB: 512,
|
|
31
|
+
maxCpuSeconds: 30,
|
|
32
|
+
allowedCommands: [
|
|
33
|
+
'node', 'npm', 'npx', 'yarn', 'pnpm', 'bun',
|
|
34
|
+
'git', 'ls', 'cat', 'head', 'tail', 'grep', 'find', 'wc',
|
|
35
|
+
'echo', 'pwd', 'which', 'env', 'mkdir', 'cp', 'mv', 'touch',
|
|
36
|
+
'tsc', 'eslint', 'prettier', 'jest', 'vitest', 'mocha',
|
|
37
|
+
],
|
|
38
|
+
blockedCommands: [
|
|
39
|
+
'rm -rf /',
|
|
40
|
+
'rm -rf ~',
|
|
41
|
+
'sudo',
|
|
42
|
+
'chmod 777',
|
|
43
|
+
'curl | sh',
|
|
44
|
+
'curl | bash',
|
|
45
|
+
'wget | sh',
|
|
46
|
+
'wget | bash',
|
|
47
|
+
':(){:|:&};:',
|
|
48
|
+
'mkfs',
|
|
49
|
+
'dd if=/dev/zero',
|
|
50
|
+
],
|
|
51
|
+
bashMode: 'full',
|
|
52
|
+
bashWriteProtection: 'off',
|
|
53
|
+
blockFileCreationViaBash: false,
|
|
54
|
+
};
|
|
55
|
+
// =============================================================================
|
|
56
|
+
// SANDBOX MANAGER
|
|
57
|
+
// =============================================================================
|
|
58
|
+
/**
|
|
59
|
+
* Manages sandbox selection and execution.
|
|
60
|
+
*/
|
|
61
|
+
export class SandboxManager {
|
|
62
|
+
config;
|
|
63
|
+
activeSandbox = null;
|
|
64
|
+
eventListeners = new Set();
|
|
65
|
+
constructor(config = {}) {
|
|
66
|
+
this.config = {
|
|
67
|
+
mode: config.mode ?? 'auto',
|
|
68
|
+
defaults: { ...DEFAULT_OPTIONS, ...config.defaults },
|
|
69
|
+
dockerImage: config.dockerImage ?? 'agent-sandbox:latest',
|
|
70
|
+
verbose: config.verbose ?? false,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Get or create the appropriate sandbox for this system.
|
|
75
|
+
*/
|
|
76
|
+
async getSandbox() {
|
|
77
|
+
if (this.activeSandbox) {
|
|
78
|
+
return this.activeSandbox;
|
|
79
|
+
}
|
|
80
|
+
this.activeSandbox = await this.createSandbox(this.config.mode);
|
|
81
|
+
return this.activeSandbox;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Execute a command in the sandbox.
|
|
85
|
+
*/
|
|
86
|
+
async execute(command, options) {
|
|
87
|
+
const sandbox = await this.getSandbox();
|
|
88
|
+
const startTime = Date.now();
|
|
89
|
+
this.emit({
|
|
90
|
+
type: 'sandbox.execute.start',
|
|
91
|
+
command,
|
|
92
|
+
mode: sandbox.getType(),
|
|
93
|
+
});
|
|
94
|
+
try {
|
|
95
|
+
const mergedOptions = { ...this.config.defaults, ...options };
|
|
96
|
+
const result = await sandbox.execute(command, mergedOptions);
|
|
97
|
+
const duration = Date.now() - startTime;
|
|
98
|
+
this.emit({
|
|
99
|
+
type: 'sandbox.execute.complete',
|
|
100
|
+
command,
|
|
101
|
+
exitCode: result.exitCode,
|
|
102
|
+
duration,
|
|
103
|
+
});
|
|
104
|
+
return result;
|
|
105
|
+
}
|
|
106
|
+
catch (err) {
|
|
107
|
+
const error = err instanceof Error ? err.message : String(err);
|
|
108
|
+
this.emit({ type: 'sandbox.execute.error', command, error });
|
|
109
|
+
throw err;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Check if a command should be blocked.
|
|
114
|
+
*/
|
|
115
|
+
isCommandBlocked(command) {
|
|
116
|
+
const blockedPatterns = this.config.defaults.blockedCommands ?? [];
|
|
117
|
+
for (const pattern of blockedPatterns) {
|
|
118
|
+
if (command.includes(pattern)) {
|
|
119
|
+
return { blocked: true, reason: `Command contains blocked pattern: ${pattern}` };
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// Check for dangerous patterns
|
|
123
|
+
const dangerousPatterns = [
|
|
124
|
+
/rm\s+-[rf]*\s+\/(?!\w)/, // rm -rf / or similar
|
|
125
|
+
/>\s*\/dev\/sd[a-z]/, // writing to block devices
|
|
126
|
+
/mkfs/, // formatting filesystems
|
|
127
|
+
/:\(\)\{.*\};:/, // fork bomb
|
|
128
|
+
/wget.*\|\s*(?:ba)?sh/, // download and execute
|
|
129
|
+
/curl.*\|\s*(?:ba)?sh/, // download and execute
|
|
130
|
+
];
|
|
131
|
+
for (const pattern of dangerousPatterns) {
|
|
132
|
+
if (pattern.test(command)) {
|
|
133
|
+
return { blocked: true, reason: `Command matches dangerous pattern` };
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return { blocked: false };
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Set the sandbox mode.
|
|
140
|
+
*/
|
|
141
|
+
async setMode(mode) {
|
|
142
|
+
if (mode === this.config.mode)
|
|
143
|
+
return;
|
|
144
|
+
const oldMode = this.config.mode;
|
|
145
|
+
// Cleanup old sandbox
|
|
146
|
+
if (this.activeSandbox) {
|
|
147
|
+
await this.activeSandbox.cleanup();
|
|
148
|
+
this.activeSandbox = null;
|
|
149
|
+
}
|
|
150
|
+
this.config.mode = mode;
|
|
151
|
+
this.emit({ type: 'sandbox.mode.changed', from: oldMode, to: mode });
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Get the current sandbox mode.
|
|
155
|
+
*/
|
|
156
|
+
getMode() {
|
|
157
|
+
return this.config.mode;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Get info about available sandboxes.
|
|
161
|
+
*/
|
|
162
|
+
async getAvailableSandboxes() {
|
|
163
|
+
const results = [];
|
|
164
|
+
// Check Seatbelt (macOS)
|
|
165
|
+
const seatbelt = new SeatbeltSandbox(this.config.defaults);
|
|
166
|
+
results.push({ mode: 'seatbelt', available: await seatbelt.isAvailable() });
|
|
167
|
+
// Check Landlock (Linux)
|
|
168
|
+
const landlock = new LandlockSandbox(this.config.defaults);
|
|
169
|
+
results.push({ mode: 'landlock', available: await landlock.isAvailable() });
|
|
170
|
+
// Check Docker
|
|
171
|
+
const docker = new DockerSandbox(this.config.defaults, this.config.dockerImage);
|
|
172
|
+
results.push({ mode: 'docker', available: await docker.isAvailable() });
|
|
173
|
+
// Basic is always available
|
|
174
|
+
results.push({ mode: 'basic', available: true });
|
|
175
|
+
// None is always available
|
|
176
|
+
results.push({ mode: 'none', available: true });
|
|
177
|
+
return results;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Subscribe to sandbox events.
|
|
181
|
+
*/
|
|
182
|
+
subscribe(listener) {
|
|
183
|
+
this.eventListeners.add(listener);
|
|
184
|
+
return () => this.eventListeners.delete(listener);
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Cleanup resources.
|
|
188
|
+
*/
|
|
189
|
+
async cleanup() {
|
|
190
|
+
if (this.activeSandbox) {
|
|
191
|
+
await this.activeSandbox.cleanup();
|
|
192
|
+
this.activeSandbox = null;
|
|
193
|
+
}
|
|
194
|
+
this.eventListeners.clear();
|
|
195
|
+
}
|
|
196
|
+
// Internal methods
|
|
197
|
+
/**
|
|
198
|
+
* Create a sandbox based on mode.
|
|
199
|
+
*/
|
|
200
|
+
async createSandbox(mode) {
|
|
201
|
+
if (mode === 'auto') {
|
|
202
|
+
return this.autoDetectSandbox();
|
|
203
|
+
}
|
|
204
|
+
switch (mode) {
|
|
205
|
+
case 'seatbelt': {
|
|
206
|
+
const seatbelt = new SeatbeltSandbox(this.config.defaults);
|
|
207
|
+
if (await seatbelt.isAvailable()) {
|
|
208
|
+
return seatbelt;
|
|
209
|
+
}
|
|
210
|
+
throw new Error('Seatbelt sandbox not available (requires macOS)');
|
|
211
|
+
}
|
|
212
|
+
case 'landlock': {
|
|
213
|
+
const landlock = new LandlockSandbox(this.config.defaults);
|
|
214
|
+
if (await landlock.isAvailable()) {
|
|
215
|
+
return landlock;
|
|
216
|
+
}
|
|
217
|
+
throw new Error('Landlock sandbox not available (requires Linux with Landlock/bwrap/firejail)');
|
|
218
|
+
}
|
|
219
|
+
case 'docker': {
|
|
220
|
+
const docker = new DockerSandbox(this.config.defaults, this.config.dockerImage);
|
|
221
|
+
if (await docker.isAvailable()) {
|
|
222
|
+
return docker;
|
|
223
|
+
}
|
|
224
|
+
throw new Error('Docker sandbox not available');
|
|
225
|
+
}
|
|
226
|
+
case 'basic':
|
|
227
|
+
return new BasicSandbox(this.config.defaults);
|
|
228
|
+
case 'none':
|
|
229
|
+
return new NoSandbox();
|
|
230
|
+
default:
|
|
231
|
+
throw new Error(`Unknown sandbox mode: ${mode}`);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Auto-detect the best available sandbox.
|
|
236
|
+
*/
|
|
237
|
+
async autoDetectSandbox() {
|
|
238
|
+
// Try Seatbelt first (macOS)
|
|
239
|
+
if (process.platform === 'darwin') {
|
|
240
|
+
const seatbelt = new SeatbeltSandbox(this.config.defaults);
|
|
241
|
+
if (await seatbelt.isAvailable()) {
|
|
242
|
+
if (this.config.verbose) {
|
|
243
|
+
logger.info('[Sandbox] Auto-detected: Seatbelt (macOS)');
|
|
244
|
+
}
|
|
245
|
+
return seatbelt;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
// Try Landlock on Linux (preferred over Docker for lower overhead)
|
|
249
|
+
if (process.platform === 'linux') {
|
|
250
|
+
const landlock = new LandlockSandbox(this.config.defaults);
|
|
251
|
+
if (await landlock.isAvailable()) {
|
|
252
|
+
if (this.config.verbose) {
|
|
253
|
+
logger.info('[Sandbox] Auto-detected: Landlock (Linux)');
|
|
254
|
+
}
|
|
255
|
+
return landlock;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
// Try Docker (any platform with Docker)
|
|
259
|
+
const docker = new DockerSandbox(this.config.defaults, this.config.dockerImage);
|
|
260
|
+
if (await docker.isAvailable()) {
|
|
261
|
+
if (this.config.verbose) {
|
|
262
|
+
logger.info('[Sandbox] Auto-detected: Docker');
|
|
263
|
+
}
|
|
264
|
+
return docker;
|
|
265
|
+
}
|
|
266
|
+
// Fall back to basic sandbox
|
|
267
|
+
if (this.config.verbose) {
|
|
268
|
+
logger.info('[Sandbox] Auto-detected: Basic (allowlist-based)');
|
|
269
|
+
}
|
|
270
|
+
return new BasicSandbox(this.config.defaults);
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Emit a sandbox event.
|
|
274
|
+
*/
|
|
275
|
+
emit(event) {
|
|
276
|
+
for (const listener of this.eventListeners) {
|
|
277
|
+
try {
|
|
278
|
+
listener(event);
|
|
279
|
+
}
|
|
280
|
+
catch {
|
|
281
|
+
// Ignore listener errors
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
// =============================================================================
|
|
287
|
+
// NO SANDBOX (PASSTHROUGH)
|
|
288
|
+
// =============================================================================
|
|
289
|
+
/**
|
|
290
|
+
* No sandbox - executes commands directly (unsafe).
|
|
291
|
+
*/
|
|
292
|
+
class NoSandbox {
|
|
293
|
+
async execute(command, options) {
|
|
294
|
+
const { spawn } = await import('child_process');
|
|
295
|
+
return new Promise((resolve) => {
|
|
296
|
+
const timeout = options?.timeout ?? 60000;
|
|
297
|
+
const workDir = options?.workingDir ?? process.cwd();
|
|
298
|
+
const proc = spawn('bash', ['-c', command], {
|
|
299
|
+
cwd: workDir,
|
|
300
|
+
env: { ...process.env, ...options?.env },
|
|
301
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
302
|
+
});
|
|
303
|
+
let stdout = '';
|
|
304
|
+
let stderr = '';
|
|
305
|
+
let killed = false;
|
|
306
|
+
let timedOut = false;
|
|
307
|
+
const timer = setTimeout(() => {
|
|
308
|
+
timedOut = true;
|
|
309
|
+
killed = true;
|
|
310
|
+
proc.kill('SIGKILL');
|
|
311
|
+
}, timeout);
|
|
312
|
+
proc.stdout?.on('data', (data) => {
|
|
313
|
+
stdout += data.toString();
|
|
314
|
+
});
|
|
315
|
+
proc.stderr?.on('data', (data) => {
|
|
316
|
+
stderr += data.toString();
|
|
317
|
+
});
|
|
318
|
+
proc.on('close', (code) => {
|
|
319
|
+
clearTimeout(timer);
|
|
320
|
+
resolve({
|
|
321
|
+
stdout,
|
|
322
|
+
stderr,
|
|
323
|
+
exitCode: code ?? 1,
|
|
324
|
+
killed,
|
|
325
|
+
timedOut,
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
proc.on('error', (err) => {
|
|
329
|
+
clearTimeout(timer);
|
|
330
|
+
resolve({
|
|
331
|
+
stdout,
|
|
332
|
+
stderr,
|
|
333
|
+
exitCode: 1,
|
|
334
|
+
killed: false,
|
|
335
|
+
timedOut: false,
|
|
336
|
+
error: err.message,
|
|
337
|
+
});
|
|
338
|
+
});
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
async isAvailable() {
|
|
342
|
+
return true;
|
|
343
|
+
}
|
|
344
|
+
getType() {
|
|
345
|
+
return 'none';
|
|
346
|
+
}
|
|
347
|
+
async cleanup() {
|
|
348
|
+
// No cleanup needed
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
// =============================================================================
|
|
352
|
+
// FACTORY FUNCTIONS
|
|
353
|
+
// =============================================================================
|
|
354
|
+
/**
|
|
355
|
+
* Create a sandbox manager.
|
|
356
|
+
*/
|
|
357
|
+
export function createSandboxManager(config) {
|
|
358
|
+
return new SandboxManager(config);
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Create a sandbox directly with auto-detection.
|
|
362
|
+
*/
|
|
363
|
+
export async function createSandbox(options) {
|
|
364
|
+
const manager = new SandboxManager({ defaults: options });
|
|
365
|
+
return manager.getSandbox();
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Quick execute with auto-detected sandbox.
|
|
369
|
+
*/
|
|
370
|
+
export async function sandboxExec(command, options) {
|
|
371
|
+
const sandbox = await createSandbox(options);
|
|
372
|
+
try {
|
|
373
|
+
return await sandbox.execute(command, options);
|
|
374
|
+
}
|
|
375
|
+
finally {
|
|
376
|
+
await sandbox.cleanup();
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
// =============================================================================
|
|
380
|
+
// RE-EXPORTS
|
|
381
|
+
// =============================================================================
|
|
382
|
+
export { SeatbeltSandbox } from './seatbelt.js';
|
|
383
|
+
export { DockerSandbox } from './docker.js';
|
|
384
|
+
export { BasicSandbox } from './basic.js';
|
|
385
|
+
export { LandlockSandbox, createLandlockSandbox, checkLandlockSupport } from './landlock.js';
|
|
386
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/integrations/safety/sandbox/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAiHnD,gFAAgF;AAChF,kBAAkB;AAClB,gFAAgF;AAEhF,MAAM,eAAe,GAA6B;IAChD,aAAa,EAAE,CAAC,GAAG,CAAC;IACpB,aAAa,EAAE,CAAC,GAAG,CAAC;IACpB,cAAc,EAAE,KAAK;IACrB,OAAO,EAAE,KAAK,EAAE,WAAW;IAC3B,UAAU,EAAE,OAAO,CAAC,GAAG,EAAE;IACzB,GAAG,EAAE,EAAE;IACP,WAAW,EAAE,GAAG;IAChB,aAAa,EAAE,EAAE;IACjB,eAAe,EAAE;QACf,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK;QAC3C,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI;QACxD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO;QAC3D,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO;KACvD;IACD,eAAe,EAAE;QACf,UAAU;QACV,UAAU;QACV,MAAM;QACN,WAAW;QACX,WAAW;QACX,aAAa;QACb,WAAW;QACX,aAAa;QACb,aAAa;QACb,MAAM;QACN,iBAAiB;KAClB;IACD,QAAQ,EAAE,MAAM;I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,UAAU,oBAAoB,CAAC,MAA6B;IAChE,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAAwB;IAC1D,MAAM,OAAO,GAAG,IAAI,cAAc,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;IAC1D,OAAO,OAAO,CAAC,UAAU,EAAE,CAAC;AAC9B,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,OAAe,EACf,OAAwB;IAExB,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,CAAC;IAC7C,IAAI,CAAC;QACH,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;YAAS,CAAC;QACT,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;AACH,CAAC;AAED,gFAAgF;AAChF,aAAa;AACb,gFAAgF;AAEhF,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Landlock Sandbox (Linux)
|
|
3
|
+
*
|
|
4
|
+
* Uses Linux Landlock LSM for unprivileged process sandboxing.
|
|
5
|
+
* Requires Linux kernel 5.13+ with Landlock enabled.
|
|
6
|
+
*
|
|
7
|
+
* Landlock works by creating a ruleset that restricts what the process can do:
|
|
8
|
+
* - File system access (read, write, execute)
|
|
9
|
+
* - Network access (Linux 6.7+)
|
|
10
|
+
*
|
|
11
|
+
* Unlike seccomp, Landlock operates at the file path level rather than
|
|
12
|
+
* syscall level, making it more suitable for path-based restrictions.
|
|
13
|
+
*/
|
|
14
|
+
import type { Sandbox, ExecResult, SandboxOptions, SandboxMode } from './index.js';
|
|
15
|
+
/**
|
|
16
|
+
* Landlock-based sandbox for Linux.
|
|
17
|
+
* Falls back to bubblewrap or firejail if native Landlock is not easily accessible.
|
|
18
|
+
*/
|
|
19
|
+
export declare class LandlockSandbox implements Sandbox {
|
|
20
|
+
private defaults;
|
|
21
|
+
private landlockAvailable;
|
|
22
|
+
private landlockVersion;
|
|
23
|
+
private useBubblewrap;
|
|
24
|
+
private useFirejail;
|
|
25
|
+
constructor(defaults: Partial<SandboxOptions>);
|
|
26
|
+
isAvailable(): Promise<boolean>;
|
|
27
|
+
getType(): SandboxMode;
|
|
28
|
+
execute(command: string, options?: Partial<SandboxOptions>): Promise<ExecResult>;
|
|
29
|
+
/**
|
|
30
|
+
* Build the sandboxed command.
|
|
31
|
+
*/
|
|
32
|
+
private buildSandboxedCommand;
|
|
33
|
+
/**
|
|
34
|
+
* Build command using bubblewrap (bwrap).
|
|
35
|
+
*/
|
|
36
|
+
private buildBubblewrapCommand;
|
|
37
|
+
/**
|
|
38
|
+
* Build command using firejail.
|
|
39
|
+
*/
|
|
40
|
+
private buildFirejailCommand;
|
|
41
|
+
/**
|
|
42
|
+
* Build command with ulimit constraints (minimal isolation).
|
|
43
|
+
*/
|
|
44
|
+
private buildUlimitCommand;
|
|
45
|
+
cleanup(): Promise<void>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Create a Landlock sandbox.
|
|
49
|
+
*/
|
|
50
|
+
export declare function createLandlockSandbox(options?: Partial<SandboxOptions>): LandlockSandbox;
|
|
51
|
+
/**
|
|
52
|
+
* Check if Landlock/Linux isolation is available.
|
|
53
|
+
*/
|
|
54
|
+
export declare function checkLandlockSupport(): Promise<{
|
|
55
|
+
available: boolean;
|
|
56
|
+
method: 'landlock' | 'bubblewrap' | 'firejail' | 'ulimit' | 'none';
|
|
57
|
+
details: string;
|
|
58
|
+
}>;
|
|
59
|
+
//# sourceMappingURL=landlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"landlock.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/safety/sandbox/landlock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAuFnF;;;GAGG;AACH,qBAAa,eAAgB,YAAW,OAAO;IAC7C,OAAO,CAAC,QAAQ,CAA2B;IAC3C,OAAO,CAAC,iBAAiB,CAAwB;IACjD,OAAO,CAAC,eAAe,CAAa;IACpC,OAAO,CAAC,aAAa,CAAkB;IACvC,OAAO,CAAC,WAAW,CAAkB;gBAEzB,QAAQ,EAAE,OAAO,CAAC,cAAc,CAAC;IAkBvC,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAqCrC,OAAO,IAAI,WAAW;IAKhB,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IA4DtF;;OAEG;YACW,qBAAqB;IAiBnC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAmD9B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAwC5B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAcpB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAG/B;AAMD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,eAAe,CAExF;AAED;;GAEG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC;IACpD,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,UAAU,GAAG,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;IACnE,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,CA2BD"}
|