@wrongstack/core 0.284.0 → 0.285.0
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/dist/agent-status-tracker.d.ts +74 -0
- package/dist/agent-status-tracker.d.ts.map +1 -0
- package/dist/autophase/auto-phase-planner.d.ts +79 -0
- package/dist/autophase/auto-phase-planner.d.ts.map +1 -0
- package/dist/autophase/auto-phase-runner.d.ts +79 -0
- package/dist/autophase/auto-phase-runner.d.ts.map +1 -0
- package/dist/autophase/checkpoint.d.ts +49 -0
- package/dist/autophase/checkpoint.d.ts.map +1 -0
- package/dist/autophase/index.d.ts +9 -0
- package/dist/autophase/index.d.ts.map +1 -0
- package/dist/autophase/phase-graph-builder.d.ts +46 -0
- package/dist/autophase/phase-graph-builder.d.ts.map +1 -0
- package/dist/autophase/phase-orchestrator.d.ts +150 -0
- package/dist/autophase/phase-orchestrator.d.ts.map +1 -0
- package/dist/autophase/phase-store.d.ts +29 -0
- package/dist/autophase/phase-store.d.ts.map +1 -0
- package/dist/autophase/types.d.ts +329 -0
- package/dist/autophase/types.d.ts.map +1 -0
- package/dist/boot.d.ts +73 -0
- package/dist/boot.d.ts.map +1 -0
- package/dist/coordination/adaptive-concurrency.d.ts +63 -0
- package/dist/coordination/adaptive-concurrency.d.ts.map +1 -0
- package/dist/coordination/agent-bridge.d.ts +24 -0
- package/dist/coordination/agent-bridge.d.ts.map +1 -0
- package/dist/coordination/agent-monitor.d.ts +100 -0
- package/dist/coordination/agent-monitor.d.ts.map +1 -0
- package/dist/coordination/agent-subagent-runner.d.ts +74 -0
- package/dist/coordination/agent-subagent-runner.d.ts.map +1 -0
- package/dist/coordination/agents/agent-prompts.d.ts +2 -0
- package/dist/coordination/agents/agent-prompts.d.ts.map +1 -0
- package/dist/coordination/agents/index.d.ts +35 -0
- package/dist/coordination/agents/index.d.ts.map +1 -0
- package/dist/coordination/agents/phase1-discovery.d.ts +4 -0
- package/dist/coordination/agents/phase1-discovery.d.ts.map +1 -0
- package/dist/coordination/agents/phase2-planning.d.ts +4 -0
- package/dist/coordination/agents/phase2-planning.d.ts.map +1 -0
- package/dist/coordination/agents/phase3-build.d.ts +4 -0
- package/dist/coordination/agents/phase3-build.d.ts.map +1 -0
- package/dist/coordination/agents/phase3-techstack.d.ts +13 -0
- package/dist/coordination/agents/phase3-techstack.d.ts.map +1 -0
- package/dist/coordination/agents/phase4-verify.d.ts +4 -0
- package/dist/coordination/agents/phase4-verify.d.ts.map +1 -0
- package/dist/coordination/agents/phase5-review.d.ts +4 -0
- package/dist/coordination/agents/phase5-review.d.ts.map +1 -0
- package/dist/coordination/agents/phase6-domain.d.ts +4 -0
- package/dist/coordination/agents/phase6-domain.d.ts.map +1 -0
- package/dist/coordination/agents/phase7-knowledge.d.ts +4 -0
- package/dist/coordination/agents/phase7-knowledge.d.ts.map +1 -0
- package/dist/coordination/agents/phase8-delivery.d.ts +4 -0
- package/dist/coordination/agents/phase8-delivery.d.ts.map +1 -0
- package/dist/coordination/agents/phase9-meta.d.ts +4 -0
- package/dist/coordination/agents/phase9-meta.d.ts.map +1 -0
- package/dist/coordination/agents/types.d.ts +79 -0
- package/dist/coordination/agents/types.d.ts.map +1 -0
- package/dist/coordination/agents.d.ts +8 -0
- package/dist/coordination/agents.d.ts.map +1 -0
- package/dist/coordination/auto-extend.d.ts +46 -0
- package/dist/coordination/auto-extend.d.ts.map +1 -0
- package/dist/coordination/autonomous-brain.d.ts +154 -0
- package/dist/coordination/autonomous-brain.d.ts.map +1 -0
- package/dist/coordination/autonomous-coordinator.d.ts +239 -0
- package/dist/coordination/autonomous-coordinator.d.ts.map +1 -0
- package/dist/coordination/brain-monitor.d.ts +74 -0
- package/dist/coordination/brain-monitor.d.ts.map +1 -0
- package/dist/coordination/brain.d.ts +104 -0
- package/dist/coordination/brain.d.ts.map +1 -0
- package/dist/coordination/change-manager.d.ts +151 -0
- package/dist/coordination/change-manager.d.ts.map +1 -0
- package/dist/coordination/checkpoint-wiring.d.ts +61 -0
- package/dist/coordination/checkpoint-wiring.d.ts.map +1 -0
- package/dist/coordination/collab-bus.d.ts +132 -0
- package/dist/coordination/collab-bus.d.ts.map +1 -0
- package/dist/coordination/collab-debug.d.ts +302 -0
- package/dist/coordination/collab-debug.d.ts.map +1 -0
- package/dist/coordination/commit-safety.d.ts +72 -0
- package/dist/coordination/commit-safety.d.ts.map +1 -0
- package/dist/coordination/consensus-protocol.d.ts +106 -0
- package/dist/coordination/consensus-protocol.d.ts.map +1 -0
- package/dist/coordination/coordinator/error-classifier.d.ts +15 -0
- package/dist/coordination/coordinator/error-classifier.d.ts.map +1 -0
- package/dist/coordination/delegate-tool.d.ts +101 -0
- package/dist/coordination/delegate-tool.d.ts.map +1 -0
- package/dist/coordination/dep-watcher-bridge.d.ts +47 -0
- package/dist/coordination/dep-watcher-bridge.d.ts.map +1 -0
- package/dist/coordination/dep-watcher.d.ts +74 -0
- package/dist/coordination/dep-watcher.d.ts.map +1 -0
- package/dist/coordination/director/director-errors.d.ts +29 -0
- package/dist/coordination/director/director-errors.d.ts.map +1 -0
- package/dist/coordination/director-construction.d.ts +90 -0
- package/dist/coordination/director-construction.d.ts.map +1 -0
- package/dist/coordination/director-prompts.d.ts +119 -0
- package/dist/coordination/director-prompts.d.ts.map +1 -0
- package/dist/coordination/director-session.d.ts +68 -0
- package/dist/coordination/director-session.d.ts.map +1 -0
- package/dist/coordination/director-tools.d.ts +65 -0
- package/dist/coordination/director-tools.d.ts.map +1 -0
- package/dist/coordination/director.d.ts +802 -0
- package/dist/coordination/director.d.ts.map +1 -0
- package/dist/coordination/dispatcher.d.ts +82 -0
- package/dist/coordination/dispatcher.d.ts.map +1 -0
- package/dist/coordination/file-author-tracker.d.ts +76 -0
- package/dist/coordination/file-author-tracker.d.ts.map +1 -0
- package/dist/coordination/fleet-bus.d.ts +122 -0
- package/dist/coordination/fleet-bus.d.ts.map +1 -0
- package/dist/coordination/fleet-event-validation.d.ts +10 -0
- package/dist/coordination/fleet-event-validation.d.ts.map +1 -0
- package/dist/coordination/fleet-manager.d.ts +234 -0
- package/dist/coordination/fleet-manager.d.ts.map +1 -0
- package/dist/coordination/fleet-spawn.d.ts +102 -0
- package/dist/coordination/fleet-spawn.d.ts.map +1 -0
- package/dist/coordination/fleet-status-tool.d.ts +36 -0
- package/dist/coordination/fleet-status-tool.d.ts.map +1 -0
- package/dist/coordination/fleet-supervisor.d.ts +157 -0
- package/dist/coordination/fleet-supervisor.d.ts.map +1 -0
- package/dist/coordination/fleet.d.ts +96 -0
- package/dist/coordination/fleet.d.ts.map +1 -0
- package/dist/coordination/global-mailbox.d.ts +234 -0
- package/dist/coordination/global-mailbox.d.ts.map +1 -0
- package/dist/coordination/icoordinator.d.ts +97 -0
- package/dist/coordination/icoordinator.d.ts.map +1 -0
- package/dist/coordination/ifleet-manager.d.ts +177 -0
- package/dist/coordination/ifleet-manager.d.ts.map +1 -0
- package/dist/coordination/in-memory-transport.d.ts +12 -0
- package/dist/coordination/in-memory-transport.d.ts.map +1 -0
- package/dist/coordination/index.d.ts +78 -2587
- package/dist/coordination/index.d.ts.map +1 -0
- package/dist/coordination/index.js +739 -254
- package/dist/coordination/index.js.map +7 -1
- package/dist/coordination/knowledge-graph.d.ts +217 -0
- package/dist/coordination/knowledge-graph.d.ts.map +1 -0
- package/dist/coordination/large-answer-store.d.ts +61 -0
- package/dist/coordination/large-answer-store.d.ts.map +1 -0
- package/dist/coordination/mail-tools.d.ts +34 -0
- package/dist/coordination/mail-tools.d.ts.map +1 -0
- package/dist/coordination/mailbox-actions.d.ts +68 -0
- package/dist/coordination/mailbox-actions.d.ts.map +1 -0
- package/dist/coordination/mailbox-health.d.ts +131 -0
- package/dist/coordination/mailbox-health.d.ts.map +1 -0
- package/dist/coordination/mailbox-hooks.d.ts +55 -0
- package/dist/coordination/mailbox-hooks.d.ts.map +1 -0
- package/dist/coordination/mailbox-tool.d.ts +75 -0
- package/dist/coordination/mailbox-tool.d.ts.map +1 -0
- package/dist/{mailbox-types-BGZWrYTJ.d.ts → coordination/mailbox-types.d.ts} +37 -22
- package/dist/coordination/mailbox-types.d.ts.map +1 -0
- package/dist/coordination/mailbox.d.ts +69 -0
- package/dist/coordination/mailbox.d.ts.map +1 -0
- package/dist/coordination/model-matrix.d.ts +98 -0
- package/dist/coordination/model-matrix.d.ts.map +1 -0
- package/dist/coordination/multi-agent-coordinator.d.ts +202 -0
- package/dist/coordination/multi-agent-coordinator.d.ts.map +1 -0
- package/dist/coordination/null-fleet-bus.d.ts +10 -0
- package/dist/coordination/null-fleet-bus.d.ts.map +1 -0
- package/dist/coordination/package-author-tracker.d.ts +87 -0
- package/dist/coordination/package-author-tracker.d.ts.map +1 -0
- package/dist/coordination/package-outdated-watcher.d.ts +83 -0
- package/dist/coordination/package-outdated-watcher.d.ts.map +1 -0
- package/dist/coordination/single-instance-mailbox.d.ts +154 -0
- package/dist/coordination/single-instance-mailbox.d.ts.map +1 -0
- package/dist/coordination/spawn-budget.d.ts +6 -0
- package/dist/coordination/spawn-budget.d.ts.map +1 -0
- package/dist/coordination/subagent-budget.d.ts +323 -0
- package/dist/coordination/subagent-budget.d.ts.map +1 -0
- package/dist/coordination/subagent-nicknames.d.ts +42 -0
- package/dist/coordination/subagent-nicknames.d.ts.map +1 -0
- package/dist/coordination/subagent-result-tool.d.ts +20 -0
- package/dist/coordination/subagent-result-tool.d.ts.map +1 -0
- package/dist/coordination/task-auctioneer.d.ts +143 -0
- package/dist/coordination/task-auctioneer.d.ts.map +1 -0
- package/dist/coordination/task-dag.d.ts +147 -0
- package/dist/coordination/task-dag.d.ts.map +1 -0
- package/dist/coordination/techstack-mailbox-consumer.d.ts +50 -0
- package/dist/coordination/techstack-mailbox-consumer.d.ts.map +1 -0
- package/dist/coordination/transport.d.ts +2 -0
- package/dist/coordination/transport.d.ts.map +1 -0
- package/dist/coordination/worktree-task-runner.d.ts +45 -0
- package/dist/coordination/worktree-task-runner.d.ts.map +1 -0
- package/dist/core/agent-internals.d.ts +41 -0
- package/dist/core/agent-internals.d.ts.map +1 -0
- package/dist/core/agent-loop.d.ts +18 -0
- package/dist/core/agent-loop.d.ts.map +1 -0
- package/dist/core/agent-response.d.ts +21 -0
- package/dist/core/agent-response.d.ts.map +1 -0
- package/dist/core/agent-tools.d.ts +21 -0
- package/dist/core/agent-tools.d.ts.map +1 -0
- package/dist/core/agent-types.d.ts +95 -0
- package/dist/core/agent-types.d.ts.map +1 -0
- package/dist/core/agent.d.ts +54 -0
- package/dist/core/agent.d.ts.map +1 -0
- package/dist/core/btw.d.ts +40 -0
- package/dist/core/btw.d.ts.map +1 -0
- package/dist/core/context.d.ts +269 -0
- package/dist/core/context.d.ts.map +1 -0
- package/dist/core/continue-intent.d.ts +92 -0
- package/dist/core/continue-intent.d.ts.map +1 -0
- package/dist/core/continue-to-next-iteration.d.ts +96 -0
- package/dist/core/continue-to-next-iteration.d.ts.map +1 -0
- package/dist/core/conversation-state.d.ts +96 -0
- package/dist/core/conversation-state.d.ts.map +1 -0
- package/dist/core/fallback-model.d.ts +94 -0
- package/dist/core/fallback-model.d.ts.map +1 -0
- package/dist/core/fleet-pulse.d.ts +42 -0
- package/dist/core/fleet-pulse.d.ts.map +1 -0
- package/dist/core/input-builder.d.ts +95 -0
- package/dist/core/input-builder.d.ts.map +1 -0
- package/dist/core/instruction-bundle.d.ts +22 -0
- package/dist/core/instruction-bundle.d.ts.map +1 -0
- package/dist/core/iteration-limit.d.ts +35 -0
- package/dist/core/iteration-limit.d.ts.map +1 -0
- package/dist/core/mailbox-loop.d.ts +63 -0
- package/dist/core/mailbox-loop.d.ts.map +1 -0
- package/dist/core/modes/brief.d.ts +2 -0
- package/dist/core/modes/brief.d.ts.map +1 -0
- package/dist/core/modes/default.d.ts +8 -0
- package/dist/core/modes/default.d.ts.map +1 -0
- package/dist/core/modes/teach.d.ts +2 -0
- package/dist/core/modes/teach.d.ts.map +1 -0
- package/dist/core/provider-runner.d.ts +24 -0
- package/dist/core/provider-runner.d.ts.map +1 -0
- package/dist/core/queued-messages.d.ts +55 -0
- package/dist/core/queued-messages.d.ts.map +1 -0
- package/dist/core/run-env.d.ts +49 -0
- package/dist/core/run-env.d.ts.map +1 -0
- package/dist/core/streaming-response-builder.d.ts +78 -0
- package/dist/core/streaming-response-builder.d.ts.map +1 -0
- package/dist/core/system-prompt-builder.d.ts +213 -0
- package/dist/core/system-prompt-builder.d.ts.map +1 -0
- package/dist/defaults/index.d.ts +68 -158
- package/dist/defaults/index.d.ts.map +1 -0
- package/dist/defaults/index.js +1257 -819
- package/dist/defaults/index.js.map +7 -1
- package/dist/execution/auto-compaction-middleware.d.ts +123 -0
- package/dist/execution/auto-compaction-middleware.d.ts.map +1 -0
- package/dist/execution/autonomous-runner.d.ts +55 -0
- package/dist/execution/autonomous-runner.d.ts.map +1 -0
- package/dist/execution/autonomy-brain.d.ts +90 -0
- package/dist/execution/autonomy-brain.d.ts.map +1 -0
- package/dist/execution/autonomy-prompt-contributor.d.ts +39 -0
- package/dist/execution/autonomy-prompt-contributor.d.ts.map +1 -0
- package/dist/execution/compaction-core.d.ts +103 -0
- package/dist/execution/compaction-core.d.ts.map +1 -0
- package/dist/execution/compactor.d.ts +56 -0
- package/dist/execution/compactor.d.ts.map +1 -0
- package/dist/execution/design-color.d.ts +31 -0
- package/dist/execution/design-color.d.ts.map +1 -0
- package/dist/execution/design-detect.d.ts +96 -0
- package/dist/execution/design-detect.d.ts.map +1 -0
- package/dist/execution/design-kit-loader.d.ts +53 -0
- package/dist/execution/design-kit-loader.d.ts.map +1 -0
- package/dist/execution/design-materialize.d.ts +32 -0
- package/dist/execution/design-materialize.d.ts.map +1 -0
- package/dist/execution/design-project-store.d.ts +57 -0
- package/dist/execution/design-project-store.d.ts.map +1 -0
- package/dist/execution/design-verify.d.ts +44 -0
- package/dist/execution/design-verify.d.ts.map +1 -0
- package/dist/execution/error-handler.d.ts +34 -0
- package/dist/execution/error-handler.d.ts.map +1 -0
- package/dist/{parallel-eternal-engine-HUrtePLd.d.ts → execution/eternal-autonomy.d.ts} +10 -225
- package/dist/execution/eternal-autonomy.d.ts.map +1 -0
- package/dist/execution/goal-preamble.d.ts +2 -0
- package/dist/execution/goal-preamble.d.ts.map +1 -0
- package/dist/execution/index.d.ts +21 -180
- package/dist/execution/index.d.ts.map +1 -0
- package/dist/execution/index.js +465 -180
- package/dist/execution/index.js.map +7 -1
- package/dist/execution/intelligent-compactor.d.ts +85 -0
- package/dist/execution/intelligent-compactor.d.ts.map +1 -0
- package/dist/execution/model-runtime.d.ts +75 -0
- package/dist/execution/model-runtime.d.ts.map +1 -0
- package/dist/execution/parallel-eternal-engine.d.ts +130 -0
- package/dist/execution/parallel-eternal-engine.d.ts.map +1 -0
- package/dist/execution/prompt-enhancer.d.ts +12 -13
- package/dist/execution/prompt-enhancer.d.ts.map +1 -0
- package/dist/execution/prompt-enhancer.js +13 -7
- package/dist/execution/prompt-enhancer.js.map +7 -1
- package/dist/execution/prompt-loader.d.ts +52 -0
- package/dist/execution/prompt-loader.d.ts.map +1 -0
- package/dist/execution/provider-runner-impl.d.ts +14 -0
- package/dist/execution/provider-runner-impl.d.ts.map +1 -0
- package/dist/execution/regex-patterns.d.ts +7 -0
- package/dist/execution/regex-patterns.d.ts.map +1 -0
- package/dist/execution/retry-policy.d.ts +35 -0
- package/dist/execution/retry-policy.d.ts.map +1 -0
- package/dist/execution/selective-compactor.d.ts +94 -0
- package/dist/execution/selective-compactor.d.ts.map +1 -0
- package/dist/execution/skill-loader.d.ts +43 -0
- package/dist/execution/skill-loader.d.ts.map +1 -0
- package/dist/execution/strategy-compactor.d.ts +43 -0
- package/dist/execution/strategy-compactor.d.ts.map +1 -0
- package/dist/execution/tool-executor.d.ts +112 -0
- package/dist/execution/tool-executor.d.ts.map +1 -0
- package/dist/extension/extension-points.d.ts +121 -0
- package/dist/extension/extension-points.d.ts.map +1 -0
- package/dist/extension/index.d.ts +3 -10
- package/dist/extension/index.d.ts.map +1 -0
- package/dist/extension/index.js +59 -5
- package/dist/extension/index.js.map +7 -1
- package/dist/extension/registry.d.ts +86 -0
- package/dist/extension/registry.d.ts.map +1 -0
- package/dist/fleet-notifier.d.ts +28 -0
- package/dist/fleet-notifier.d.ts.map +1 -0
- package/dist/hooks/http-executor.d.ts +11 -0
- package/dist/hooks/http-executor.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/registry.d.ts +71 -0
- package/dist/hooks/registry.d.ts.map +1 -0
- package/dist/hooks/runner.d.ts +65 -0
- package/dist/hooks/runner.d.ts.map +1 -0
- package/dist/hooks/shell-executor.d.ts +33 -0
- package/dist/hooks/shell-executor.d.ts.map +1 -0
- package/dist/hooks/shell-hooks-equal.d.ts +15 -0
- package/dist/hooks/shell-hooks-equal.d.ts.map +1 -0
- package/dist/hq/agent-bridge.d.ts +27 -0
- package/dist/hq/agent-bridge.d.ts.map +1 -0
- package/dist/hq/alerts.d.ts +67 -0
- package/dist/hq/alerts.d.ts.map +1 -0
- package/dist/hq/auth-store.d.ts +161 -0
- package/dist/hq/auth-store.d.ts.map +1 -0
- package/dist/hq/brain-bridge.d.ts +37 -0
- package/dist/hq/brain-bridge.d.ts.map +1 -0
- package/dist/hq/commands.d.ts +122 -0
- package/dist/hq/commands.d.ts.map +1 -0
- package/dist/hq/cost-bridge.d.ts +36 -0
- package/dist/hq/cost-bridge.d.ts.map +1 -0
- package/dist/hq/factory.d.ts +66 -0
- package/dist/hq/factory.d.ts.map +1 -0
- package/dist/hq/fleet-bridge.d.ts +39 -0
- package/dist/hq/fleet-bridge.d.ts.map +1 -0
- package/dist/hq/index.d.ts +18 -816
- package/dist/hq/index.d.ts.map +1 -0
- package/dist/hq/index.js +417 -122
- package/dist/hq/index.js.map +7 -1
- package/dist/hq/mailbox-mapper.d.ts +27 -0
- package/dist/hq/mailbox-mapper.d.ts.map +1 -0
- package/dist/hq/persistence.d.ts +121 -0
- package/dist/hq/persistence.d.ts.map +1 -0
- package/dist/hq/protocol.d.ts +560 -0
- package/dist/hq/protocol.d.ts.map +1 -0
- package/dist/hq/publisher.d.ts +177 -0
- package/dist/hq/publisher.d.ts.map +1 -0
- package/dist/hq/redaction.d.ts +30 -0
- package/dist/hq/redaction.d.ts.map +1 -0
- package/dist/hq/session-bridge.d.ts +29 -0
- package/dist/hq/session-bridge.d.ts.map +1 -0
- package/dist/hq/tool-bridge.d.ts +41 -0
- package/dist/hq/tool-bridge.d.ts.map +1 -0
- package/dist/hq/transcript-mapper.d.ts +36 -0
- package/dist/hq/transcript-mapper.d.ts.map +1 -0
- package/dist/hq/worktree-bridge.d.ts +34 -0
- package/dist/hq/worktree-bridge.d.ts.map +1 -0
- package/dist/index.d.ts +108 -2872
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2724 -1344
- package/dist/index.js.map +7 -1
- package/dist/infrastructure/context-manager.d.ts +92 -0
- package/dist/infrastructure/context-manager.d.ts.map +1 -0
- package/dist/infrastructure/index.d.ts +6 -64
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/infrastructure/index.js +39 -12
- package/dist/infrastructure/index.js.map +7 -1
- package/dist/infrastructure/logger.d.ts +99 -0
- package/dist/infrastructure/logger.d.ts.map +1 -0
- package/dist/infrastructure/mcp-servers.d.ts +83 -0
- package/dist/infrastructure/mcp-servers.d.ts.map +1 -0
- package/dist/{path-resolver-CMS5307d.d.ts → infrastructure/path-resolver.d.ts} +3 -5
- package/dist/infrastructure/path-resolver.d.ts.map +1 -0
- package/dist/infrastructure/token-counter.d.ts +57 -0
- package/dist/infrastructure/token-counter.d.ts.map +1 -0
- package/dist/kernel/container.d.ts +84 -0
- package/dist/kernel/container.d.ts.map +1 -0
- package/dist/{events-Bgnh43r9.d.ts → kernel/events.d.ts} +112 -206
- package/dist/kernel/events.d.ts.map +1 -0
- package/dist/kernel/index.d.ts +6 -107
- package/dist/kernel/index.d.ts.map +1 -0
- package/dist/kernel/index.js +56 -4
- package/dist/kernel/index.js.map +7 -1
- package/dist/kernel/pipeline.d.ts +105 -0
- package/dist/kernel/pipeline.d.ts.map +1 -0
- package/dist/kernel/run-controller.d.ts +55 -0
- package/dist/kernel/run-controller.d.ts.map +1 -0
- package/dist/kernel/tokens.d.ts +53 -0
- package/dist/kernel/tokens.d.ts.map +1 -0
- package/dist/mailbox-attach.d.ts +27 -0
- package/dist/mailbox-attach.d.ts.map +1 -0
- package/dist/middleware/collab-pause.d.ts +73 -0
- package/dist/middleware/collab-pause.d.ts.map +1 -0
- package/dist/models/codex-catalog.d.ts +41 -0
- package/dist/models/codex-catalog.d.ts.map +1 -0
- package/dist/models/index.d.ts +8 -163
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +150 -51
- package/dist/models/index.js.map +7 -1
- package/dist/models/llm-selector.d.ts +47 -0
- package/dist/models/llm-selector.d.ts.map +1 -0
- package/dist/models/mode-store.d.ts +22 -0
- package/dist/models/mode-store.d.ts.map +1 -0
- package/dist/models/model-intelligence.d.ts +56 -0
- package/dist/models/model-intelligence.d.ts.map +1 -0
- package/dist/models/model-router.d.ts +100 -0
- package/dist/models/model-router.d.ts.map +1 -0
- package/dist/models/models-registry.d.ts +106 -0
- package/dist/models/models-registry.d.ts.map +1 -0
- package/dist/models/provider-model-resolve.d.ts +69 -0
- package/dist/models/provider-model-resolve.d.ts.map +1 -0
- package/dist/observability/event-bridge.d.ts +10 -0
- package/dist/observability/event-bridge.d.ts.map +1 -0
- package/dist/observability/health.d.ts +18 -0
- package/dist/observability/health.d.ts.map +1 -0
- package/dist/observability/index.d.ts +9 -354
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +21 -8
- package/dist/observability/index.js.map +7 -1
- package/dist/observability/metrics.d.ts +26 -0
- package/dist/observability/metrics.d.ts.map +1 -0
- package/dist/observability/otel-tracer.d.ts +41 -0
- package/dist/observability/otel-tracer.d.ts.map +1 -0
- package/dist/observability/otlp-metrics.d.ts +111 -0
- package/dist/observability/otlp-metrics.d.ts.map +1 -0
- package/dist/observability/otlp-traces.d.ts +95 -0
- package/dist/observability/otlp-traces.d.ts.map +1 -0
- package/dist/observability/prometheus.d.ts +49 -0
- package/dist/observability/prometheus.d.ts.map +1 -0
- package/dist/observability/tracer.d.ts +9 -0
- package/dist/observability/tracer.d.ts.map +1 -0
- package/dist/plugin/api.d.ts +226 -0
- package/dist/plugin/api.d.ts.map +1 -0
- package/dist/plugin/loader.d.ts +73 -0
- package/dist/plugin/loader.d.ts.map +1 -0
- package/dist/plugins/chimera-plugin.d.ts +37 -0
- package/dist/plugins/chimera-plugin.d.ts.map +1 -0
- package/dist/plugins/git-plugin.d.ts +15 -0
- package/dist/plugins/git-plugin.d.ts.map +1 -0
- package/dist/plugins/observability-plugin.d.ts +19 -0
- package/dist/plugins/observability-plugin.d.ts.map +1 -0
- package/dist/plugins/plan-plugin.d.ts +16 -0
- package/dist/plugins/plan-plugin.d.ts.map +1 -0
- package/dist/plugins/prompts-plugin.d.ts +26 -0
- package/dist/plugins/prompts-plugin.d.ts.map +1 -0
- package/dist/plugins/security-plugin.d.ts +19 -0
- package/dist/plugins/security-plugin.d.ts.map +1 -0
- package/dist/plugins/skills-plugin.d.ts +42 -0
- package/dist/plugins/skills-plugin.d.ts.map +1 -0
- package/dist/plugins/sync-plugin.d.ts +22 -0
- package/dist/plugins/sync-plugin.d.ts.map +1 -0
- package/dist/prompts/index.d.ts +3 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/prompt-installer.d.ts +50 -0
- package/dist/prompts/prompt-installer.d.ts.map +1 -0
- package/dist/prompts/prompt-manifest-store.d.ts +18 -0
- package/dist/prompts/prompt-manifest-store.d.ts.map +1 -0
- package/dist/registry/provider-registry.d.ts +51 -0
- package/dist/registry/provider-registry.d.ts.map +1 -0
- package/dist/registry/slash-command-registry.d.ts +61 -0
- package/dist/registry/slash-command-registry.d.ts.map +1 -0
- package/dist/registry/tool-registry.d.ts +154 -0
- package/dist/registry/tool-registry.d.ts.map +1 -0
- package/dist/replay/hash.d.ts +31 -0
- package/dist/replay/hash.d.ts.map +1 -0
- package/dist/replay/replay-provider-runner.d.ts +53 -0
- package/dist/replay/replay-provider-runner.d.ts.map +1 -0
- package/dist/{index-CbyuOE5y.d.ts → security/capabilities.d.ts} +31 -34
- package/dist/security/capabilities.d.ts.map +1 -0
- package/dist/security/config-secrets.d.ts +25 -0
- package/dist/security/config-secrets.d.ts.map +1 -0
- package/dist/security/index.d.ts +6 -8
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +102 -381
- package/dist/security/index.js.map +7 -1
- package/dist/security/permission-policy.d.ts +153 -0
- package/dist/security/permission-policy.d.ts.map +1 -0
- package/dist/security/secret-scrubber.d.ts +14 -0
- package/dist/security/secret-scrubber.d.ts.map +1 -0
- package/dist/security/secret-vault.d.ts +87 -0
- package/dist/security/secret-vault.d.ts.map +1 -0
- package/dist/security/yolo-risk.d.ts +11 -0
- package/dist/security/yolo-risk.d.ts.map +1 -0
- package/dist/{session-registry-Dvg7i_IA.d.ts → session-registry.d.ts} +8 -9
- package/dist/session-registry.d.ts.map +1 -0
- package/dist/skills/foreign-sources.d.ts +59 -0
- package/dist/skills/foreign-sources.d.ts.map +1 -0
- package/dist/skills/frontmatter.d.ts +44 -0
- package/dist/skills/frontmatter.d.ts.map +1 -0
- package/dist/skills/github-fetcher.d.ts +38 -0
- package/dist/skills/github-fetcher.d.ts.map +1 -0
- package/dist/skills/index.d.ts +11 -582
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +81 -43
- package/dist/skills/index.js.map +7 -1
- package/dist/skills/limits.d.ts +92 -0
- package/dist/skills/limits.d.ts.map +1 -0
- package/dist/skills/manifest-store.d.ts +42 -0
- package/dist/skills/manifest-store.d.ts.map +1 -0
- package/dist/skills/registry/github-direct-adapter.d.ts +17 -0
- package/dist/skills/registry/github-direct-adapter.d.ts.map +1 -0
- package/dist/skills/registry/registry-adapter.d.ts +84 -0
- package/dist/skills/registry/registry-adapter.d.ts.map +1 -0
- package/dist/skills/registry/skills-sh-adapter.d.ts +13 -0
- package/dist/skills/registry/skills-sh-adapter.d.ts.map +1 -0
- package/dist/skills/skill-generator.d.ts +82 -0
- package/dist/skills/skill-generator.d.ts.map +1 -0
- package/dist/skills/skill-installer.d.ts +124 -0
- package/dist/skills/skill-installer.d.ts.map +1 -0
- package/dist/storage/annotations-store.d.ts +118 -0
- package/dist/storage/annotations-store.d.ts.map +1 -0
- package/dist/storage/attachment-store.d.ts +31 -0
- package/dist/storage/attachment-store.d.ts.map +1 -0
- package/dist/storage/cloud-sync.d.ts +44 -0
- package/dist/storage/cloud-sync.d.ts.map +1 -0
- package/dist/storage/completed-work-checkpoint.d.ts +11 -0
- package/dist/storage/completed-work-checkpoint.d.ts.map +1 -0
- package/dist/storage/config-loader.d.ts +104 -0
- package/dist/storage/config-loader.d.ts.map +1 -0
- package/dist/storage/config-migration.d.ts +87 -0
- package/dist/storage/config-migration.d.ts.map +1 -0
- package/dist/storage/config-store.d.ts +22 -0
- package/dist/storage/config-store.d.ts.map +1 -0
- package/dist/{director-state-CMS_bMs4.d.ts → storage/director-state.d.ts} +28 -8
- package/dist/storage/director-state.d.ts.map +1 -0
- package/dist/storage/file-session-writer.d.ts +169 -0
- package/dist/storage/file-session-writer.d.ts.map +1 -0
- package/dist/{goal-store-Datpp-ar.d.ts → storage/goal-store.d.ts} +26 -19
- package/dist/storage/goal-store.d.ts.map +1 -0
- package/dist/storage/index.d.ts +39 -1031
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +655 -300
- package/dist/storage/index.js.map +7 -1
- package/dist/storage/input-history-store.d.ts +56 -0
- package/dist/storage/input-history-store.d.ts.map +1 -0
- package/dist/storage/memory-backend.d.ts +66 -0
- package/dist/storage/memory-backend.d.ts.map +1 -0
- package/dist/storage/memory-consolidator.d.ts +50 -0
- package/dist/storage/memory-consolidator.d.ts.map +1 -0
- package/dist/storage/memory-graph-backend.d.ts +117 -0
- package/dist/storage/memory-graph-backend.d.ts.map +1 -0
- package/dist/storage/memory-store.d.ts +119 -0
- package/dist/storage/memory-store.d.ts.map +1 -0
- package/dist/storage/plan-store.d.ts +78 -0
- package/dist/storage/plan-store.d.ts.map +1 -0
- package/dist/storage/plan-templates.d.ts +21 -0
- package/dist/storage/plan-templates.d.ts.map +1 -0
- package/dist/storage/prompt-store.d.ts +37 -0
- package/dist/storage/prompt-store.d.ts.map +1 -0
- package/dist/storage/prompt-usage-store.d.ts +29 -0
- package/dist/storage/prompt-usage-store.d.ts.map +1 -0
- package/dist/storage/provider-config-watcher.d.ts +34 -0
- package/dist/storage/provider-config-watcher.d.ts.map +1 -0
- package/dist/storage/queue-store.d.ts +37 -0
- package/dist/storage/queue-store.d.ts.map +1 -0
- package/dist/storage/recovery-lock.d.ts +79 -0
- package/dist/storage/recovery-lock.d.ts.map +1 -0
- package/dist/storage/replay-log-store.d.ts +97 -0
- package/dist/storage/replay-log-store.d.ts.map +1 -0
- package/dist/storage/session-analyzer.d.ts +48 -0
- package/dist/storage/session-analyzer.d.ts.map +1 -0
- package/dist/storage/session-checkpoint-cas.d.ts +37 -0
- package/dist/storage/session-checkpoint-cas.d.ts.map +1 -0
- package/dist/{session-event-bridge-D_z_mBwk.d.ts → storage/session-event-bridge.d.ts} +14 -15
- package/dist/storage/session-event-bridge.d.ts.map +1 -0
- package/dist/storage/session-helpers.d.ts +9 -0
- package/dist/storage/session-helpers.d.ts.map +1 -0
- package/dist/storage/session-id.d.ts +18 -0
- package/dist/storage/session-id.d.ts.map +1 -0
- package/dist/storage/session-reader.d.ts +21 -0
- package/dist/storage/session-reader.d.ts.map +1 -0
- package/dist/storage/session-recovery.d.ts +93 -0
- package/dist/storage/session-recovery.d.ts.map +1 -0
- package/dist/storage/session-resume-validation.d.ts +6 -0
- package/dist/storage/session-resume-validation.d.ts.map +1 -0
- package/dist/storage/session-rewinder.d.ts +21 -0
- package/dist/storage/session-rewinder.d.ts.map +1 -0
- package/dist/storage/session-store.d.ts +210 -0
- package/dist/storage/session-store.d.ts.map +1 -0
- package/dist/storage/session-summary.d.ts +12 -0
- package/dist/storage/session-summary.d.ts.map +1 -0
- package/dist/storage/session-tool-call-ends.d.ts +5 -0
- package/dist/storage/session-tool-call-ends.d.ts.map +1 -0
- package/dist/storage/storage-concurrency.d.ts +2 -0
- package/dist/storage/storage-concurrency.d.ts.map +1 -0
- package/dist/storage/task-store.d.ts +33 -0
- package/dist/storage/task-store.d.ts.map +1 -0
- package/dist/storage/todos-checkpoint.d.ts +39 -0
- package/dist/storage/todos-checkpoint.d.ts.map +1 -0
- package/dist/storage/tool-audit-log.d.ts +141 -0
- package/dist/storage/tool-audit-log.d.ts.map +1 -0
- package/dist/tasking/index.d.ts +3 -124
- package/dist/tasking/index.d.ts.map +1 -0
- package/dist/tasking/index.js +57 -4
- package/dist/tasking/index.js.map +7 -1
- package/dist/tasking/task-store.d.ts +22 -0
- package/dist/tasking/task-store.d.ts.map +1 -0
- package/dist/tasking/task-tracker.d.ts +102 -0
- package/dist/tasking/task-tracker.d.ts.map +1 -0
- package/dist/tools/index.d.ts +2 -59
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +93 -14
- package/dist/tools/index.js.map +7 -1
- package/dist/tools/mcp-control.d.ts +53 -0
- package/dist/tools/mcp-control.d.ts.map +1 -0
- package/dist/tools/mcp-use.d.ts +24 -0
- package/dist/tools/mcp-use.d.ts.map +1 -0
- package/dist/types/agent-bridge.d.ts +42 -0
- package/dist/types/agent-bridge.d.ts.map +1 -0
- package/dist/types/attachment.d.ts +54 -0
- package/dist/types/attachment.d.ts.map +1 -0
- package/dist/types/autonomy.d.ts +5 -0
- package/dist/types/autonomy.d.ts.map +1 -0
- package/dist/types/blocks.d.ts +76 -0
- package/dist/types/blocks.d.ts.map +1 -0
- package/dist/{compactor-DQLL4HTo.d.ts → types/compactor.d.ts} +5 -7
- package/dist/types/compactor.d.ts.map +1 -0
- package/dist/{config-MRqn1V-u.d.ts → types/config.d.ts} +135 -354
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/context-evidence.d.ts +68 -0
- package/dist/types/context-evidence.d.ts.map +1 -0
- package/dist/types/context-window.d.ts +35 -0
- package/dist/types/context-window.d.ts.map +1 -0
- package/dist/{default-config-B79_gJYv.d.ts → types/default-config.d.ts} +10 -11
- package/dist/types/default-config.d.ts.map +1 -0
- package/dist/types/design-kit.d.ts +91 -0
- package/dist/types/design-kit.d.ts.map +1 -0
- package/dist/{retry-policy-CQ7KwXJa.d.ts → types/error-handler.d.ts} +5 -12
- package/dist/types/error-handler.d.ts.map +1 -0
- package/dist/types/errors.d.ts +277 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/hooks.d.ts +167 -0
- package/dist/types/hooks.d.ts.map +1 -0
- package/dist/types/index.d.ts +40 -244
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +90 -12
- package/dist/types/index.js.map +7 -1
- package/dist/{input-reader-E-ffP2ee.d.ts → types/input-reader.d.ts} +3 -4
- package/dist/types/input-reader.d.ts.map +1 -0
- package/dist/{logger-B63L5bTg.d.ts → types/logger.d.ts} +3 -4
- package/dist/types/logger.d.ts.map +1 -0
- package/dist/types/memory.d.ts +89 -0
- package/dist/types/memory.d.ts.map +1 -0
- package/dist/types/messages.d.ts +24 -0
- package/dist/types/messages.d.ts.map +1 -0
- package/dist/types/mode-prompts.d.ts +2 -0
- package/dist/types/mode-prompts.d.ts.map +1 -0
- package/dist/{mode-CZlO9iU1.d.ts → types/mode.d.ts} +6 -7
- package/dist/types/mode.d.ts.map +1 -0
- package/dist/types/models-registry.d.ts +105 -0
- package/dist/types/models-registry.d.ts.map +1 -0
- package/dist/types/multi-agent.d.ts +435 -0
- package/dist/types/multi-agent.d.ts.map +1 -0
- package/dist/{observability-D-HZN_mF.d.ts → types/observability.d.ts} +12 -13
- package/dist/types/observability.d.ts.map +1 -0
- package/dist/{path-resolver-CPRj4bFY.d.ts → types/path-resolver.d.ts} +2 -3
- package/dist/types/path-resolver.d.ts.map +1 -0
- package/dist/{permission-ByDKXEcG.d.ts → types/permission.d.ts} +8 -9
- package/dist/types/permission.d.ts.map +1 -0
- package/dist/types/plugin.d.ts +385 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/prompt-registry.d.ts +81 -0
- package/dist/types/prompt-registry.d.ts.map +1 -0
- package/dist/{prompt-DLd35n4Q.d.ts → types/prompt.d.ts} +14 -15
- package/dist/types/prompt.d.ts.map +1 -0
- package/dist/{provider-runner-ChL-kVg6.d.ts → types/provider-runner.d.ts} +9 -10
- package/dist/types/provider-runner.d.ts.map +1 -0
- package/dist/types/provider.d.ts +387 -0
- package/dist/types/provider.d.ts.map +1 -0
- package/dist/types/renderer.d.ts +23 -0
- package/dist/types/renderer.d.ts.map +1 -0
- package/dist/types/retry-policy.d.ts +7 -0
- package/dist/types/retry-policy.d.ts.map +1 -0
- package/dist/types/secret-scrubber.d.ts +5 -0
- package/dist/types/secret-scrubber.d.ts.map +1 -0
- package/dist/{secret-vault-BAKpgFw_.d.ts → types/secret-vault.d.ts} +13 -7
- package/dist/types/secret-vault.d.ts.map +1 -0
- package/dist/{selector-D8O6B_Rm.d.ts → types/selector.d.ts} +4 -6
- package/dist/types/selector.d.ts.map +1 -0
- package/dist/types/session-reader.d.ts +81 -0
- package/dist/types/session-reader.d.ts.map +1 -0
- package/dist/{session-rewinder-C9HnMkhP.d.ts → types/session-rewinder.d.ts} +5 -6
- package/dist/types/session-rewinder.d.ts.map +1 -0
- package/dist/types/session.d.ts +650 -0
- package/dist/types/session.d.ts.map +1 -0
- package/dist/types/side-effect.d.ts +34 -0
- package/dist/types/side-effect.d.ts.map +1 -0
- package/dist/{skill-DHniprNl.d.ts → types/skill.d.ts} +4 -5
- package/dist/types/skill.d.ts.map +1 -0
- package/dist/types/slash-command.d.ts +59 -0
- package/dist/types/slash-command.d.ts.map +1 -0
- package/dist/types/spec.d.ts +77 -0
- package/dist/types/spec.d.ts.map +1 -0
- package/dist/types/system-prompt-contributor.d.ts +20 -0
- package/dist/types/system-prompt-contributor.d.ts.map +1 -0
- package/dist/types/system-prompt.d.ts +51 -0
- package/dist/types/system-prompt.d.ts.map +1 -0
- package/dist/{task-graph-CH3acNQ7.d.ts → types/task-graph.d.ts} +21 -22
- package/dist/types/task-graph.d.ts.map +1 -0
- package/dist/types/token-counter.d.ts +42 -0
- package/dist/types/token-counter.d.ts.map +1 -0
- package/dist/types/tool-executor.d.ts +133 -0
- package/dist/types/tool-executor.d.ts.map +1 -0
- package/dist/types/tool-markers.d.ts +23 -0
- package/dist/types/tool-markers.d.ts.map +1 -0
- package/dist/types/tool.d.ts +245 -0
- package/dist/types/tool.d.ts.map +1 -0
- package/dist/types/utility-types.d.ts +31 -0
- package/dist/types/utility-types.d.ts.map +1 -0
- package/dist/utils/assert-never.d.ts +14 -0
- package/dist/utils/assert-never.d.ts.map +1 -0
- package/dist/utils/atomic-write.d.ts +12 -0
- package/dist/utils/atomic-write.d.ts.map +1 -0
- package/dist/utils/child-env.d.ts +67 -0
- package/dist/utils/child-env.d.ts.map +1 -0
- package/dist/utils/color.d.ts +20 -0
- package/dist/utils/color.d.ts.map +1 -0
- package/dist/utils/config-json.d.ts +14 -0
- package/dist/utils/config-json.d.ts.map +1 -0
- package/dist/utils/context-evidence.d.ts +47 -0
- package/dist/utils/context-evidence.d.ts.map +1 -0
- package/dist/utils/deep-merge.d.ts +64 -0
- package/dist/utils/deep-merge.d.ts.map +1 -0
- package/dist/utils/diff.d.ts +11 -0
- package/dist/utils/diff.d.ts.map +1 -0
- package/dist/utils/error.d.ts +2 -3
- package/dist/utils/error.d.ts.map +1 -0
- package/dist/utils/error.js +3 -3
- package/dist/utils/error.js.map +7 -1
- package/dist/utils/expect-defined.d.ts +2 -3
- package/dist/utils/expect-defined.d.ts.map +1 -0
- package/dist/utils/expect-defined.js +3 -3
- package/dist/utils/expect-defined.js.map +7 -1
- package/dist/utils/glob-expand.d.ts +10 -0
- package/dist/utils/glob-expand.d.ts.map +1 -0
- package/dist/utils/glob-match.d.ts +4 -0
- package/dist/utils/glob-match.d.ts.map +1 -0
- package/dist/utils/index.d.ts +37 -920
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +242 -33
- package/dist/utils/index.js.map +7 -1
- package/dist/utils/instruction-file.d.ts +3 -0
- package/dist/utils/instruction-file.d.ts.map +1 -0
- package/dist/utils/ip-guard.d.ts +34 -0
- package/dist/utils/ip-guard.d.ts.map +1 -0
- package/dist/utils/json-repair.d.ts +23 -0
- package/dist/utils/json-repair.d.ts.map +1 -0
- package/dist/utils/json-schema-validate.d.ts +42 -0
- package/dist/utils/json-schema-validate.d.ts.map +1 -0
- package/dist/utils/lru-cache.d.ts +29 -0
- package/dist/utils/lru-cache.d.ts.map +1 -0
- package/dist/utils/merge-custom-models.d.ts +12 -0
- package/dist/utils/merge-custom-models.d.ts.map +1 -0
- package/dist/utils/merge-models-payload.d.ts +20 -0
- package/dist/utils/merge-models-payload.d.ts.map +1 -0
- package/dist/utils/message-invariants.d.ts +22 -0
- package/dist/utils/message-invariants.d.ts.map +1 -0
- package/dist/utils/newline-normalize.d.ts +5 -0
- package/dist/utils/newline-normalize.d.ts.map +1 -0
- package/dist/utils/regex-guard.d.ts +21 -0
- package/dist/utils/regex-guard.d.ts.map +1 -0
- package/dist/utils/safe-json.d.ts +31 -0
- package/dist/utils/safe-json.d.ts.map +1 -0
- package/dist/utils/session-scoped-path.d.ts +13 -0
- package/dist/utils/session-scoped-path.d.ts.map +1 -0
- package/dist/utils/sleep.d.ts +5 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/slug.d.ts +13 -0
- package/dist/utils/slug.d.ts.map +1 -0
- package/dist/utils/string.d.ts +9 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/task-format.d.ts +22 -0
- package/dist/utils/task-format.d.ts.map +1 -0
- package/dist/utils/term.d.ts +133 -0
- package/dist/utils/term.d.ts.map +1 -0
- package/dist/utils/todos-format.d.ts +30 -0
- package/dist/utils/todos-format.d.ts.map +1 -0
- package/dist/utils/token-estimate.d.ts +112 -0
- package/dist/utils/token-estimate.d.ts.map +1 -0
- package/dist/utils/tool-description-mode.d.ts +28 -0
- package/dist/utils/tool-description-mode.d.ts.map +1 -0
- package/dist/utils/tool-output-serializer.d.ts +40 -0
- package/dist/utils/tool-output-serializer.d.ts.map +1 -0
- package/dist/utils/tool-result-render-mode.d.ts +55 -0
- package/dist/utils/tool-result-render-mode.d.ts.map +1 -0
- package/dist/utils/tool-subject.d.ts +5 -0
- package/dist/utils/tool-subject.d.ts.map +1 -0
- package/dist/utils/tool-wire-compact.d.ts +28 -0
- package/dist/utils/tool-wire-compact.d.ts.map +1 -0
- package/dist/utils/ulid.d.ts +11 -0
- package/dist/utils/ulid.d.ts.map +1 -0
- package/dist/{wstack-paths-C3K40Qst.d.ts → utils/wstack-paths.d.ts} +7 -8
- package/dist/utils/wstack-paths.d.ts.map +1 -0
- package/dist/worktree/index.d.ts +2 -0
- package/dist/worktree/index.d.ts.map +1 -0
- package/dist/{worktree-manager-DzwxKE35.d.ts → worktree/worktree-manager.d.ts} +19 -13
- package/dist/worktree/worktree-manager.d.ts.map +1 -0
- package/instructions/autonomy/active-mission.md +2 -4
- package/instructions/sections/tool/delegation-full.md +1 -1
- package/package.json +4 -5
- package/skills/node-modern/SKILL.md +2 -2
- package/skills/plugin-author/SKILL.md +9 -16
- package/dist/dispatcher-types.d-BBeXBQgS.d.ts +0 -66
- package/dist/global-mailbox-sZwyI6CS.d.ts +0 -959
- package/dist/index--Gm41aBJ.d.ts +0 -671
- package/dist/mcp-servers-DEV4s6Ks.d.ts +0 -259
- package/dist/multi-agent-coordinator-4RCRZKjN.d.ts +0 -1770
- package/dist/null-fleet-bus-CFoNVQEK.d.ts +0 -2127
- package/dist/pipeline-DGDyIohT.d.ts +0 -331
- package/dist/provider-model-resolve-o2hHLs79.d.ts +0 -263
- package/dist/secret-scrubber-3MHDDAtm.d.ts +0 -6
- package/dist/secret-vault-DxohkUBc.d.ts +0 -272
- package/dist/session-reader-7Esxrkpw.d.ts +0 -155
- package/dist/task-format-GX0B1mMC.d.ts +0 -23
- package/dist/todos-checkpoint-FY7PjmMx.d.ts +0 -850
- package/dist/tool-BNlnIJvo.d.ts +0 -2190
- package/dist/tool-executor-CckSCM5E.d.ts +0 -906
package/dist/security/index.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import { randomBytes, createCipheriv, createDecipheriv, scryptSync } from 'crypto';
|
|
2
|
-
import * as fs2 from 'fs';
|
|
3
|
-
import * as fs from 'fs/promises';
|
|
4
|
-
import * as path from 'path';
|
|
5
|
-
|
|
6
1
|
// src/security/secret-scrubber.ts
|
|
7
2
|
var PATTERNS = [
|
|
8
3
|
// Anchored at the start where possible so partial matches inside larger
|
|
@@ -191,6 +186,17 @@ var DefaultSecretScrubber = class {
|
|
|
191
186
|
return visit(obj);
|
|
192
187
|
}
|
|
193
188
|
};
|
|
189
|
+
|
|
190
|
+
// src/security/secret-vault.ts
|
|
191
|
+
import { createCipheriv, createDecipheriv, randomBytes as randomBytes2, scryptSync } from "node:crypto";
|
|
192
|
+
import * as fs2 from "node:fs";
|
|
193
|
+
import * as fsp from "node:fs/promises";
|
|
194
|
+
import * as path2 from "node:path";
|
|
195
|
+
|
|
196
|
+
// src/utils/atomic-write.ts
|
|
197
|
+
import { randomBytes } from "node:crypto";
|
|
198
|
+
import * as fs from "node:fs/promises";
|
|
199
|
+
import * as path from "node:path";
|
|
194
200
|
async function atomicWrite(targetPath, content, opts = {}) {
|
|
195
201
|
const dir = path.dirname(targetPath);
|
|
196
202
|
await fs.mkdir(dir, { recursive: true });
|
|
@@ -253,7 +259,7 @@ async function renameWithRetry(from, to) {
|
|
|
253
259
|
if (!code || !TRANSIENT_RENAME_CODES.has(code) || i === delays.length) {
|
|
254
260
|
throw err;
|
|
255
261
|
}
|
|
256
|
-
await new Promise((
|
|
262
|
+
await new Promise((resolve) => setTimeout(resolve, delays[i]));
|
|
257
263
|
}
|
|
258
264
|
}
|
|
259
265
|
throw lastErr;
|
|
@@ -326,7 +332,7 @@ function toErrorMessage(err) {
|
|
|
326
332
|
// src/utils/expect-defined.ts
|
|
327
333
|
function expectDefined(value, label) {
|
|
328
334
|
if (value === null || value === void 0) {
|
|
329
|
-
const err = new Error("Expected value to be defined");
|
|
335
|
+
const err = new Error(label ? `Expected ${label} to be defined` : "Expected value to be defined");
|
|
330
336
|
err.name = "ExpectDefinedError";
|
|
331
337
|
throw err;
|
|
332
338
|
}
|
|
@@ -571,6 +577,49 @@ function encryptedPrefixForVersion(version) {
|
|
|
571
577
|
return `enc:v${version}:`;
|
|
572
578
|
}
|
|
573
579
|
|
|
580
|
+
// src/security/config-secrets.ts
|
|
581
|
+
function decryptConfigSecrets(cfg, vault, opts) {
|
|
582
|
+
const warn = opts?.warn ?? ((msg) => console.warn(msg));
|
|
583
|
+
return walk(cfg, vault, (v, key) => {
|
|
584
|
+
try {
|
|
585
|
+
return vault.decrypt(v);
|
|
586
|
+
} catch (err) {
|
|
587
|
+
warn(
|
|
588
|
+
`[secret-vault] Failed to decrypt "${key}": ${err instanceof Error ? err.message : err}`
|
|
589
|
+
);
|
|
590
|
+
return "";
|
|
591
|
+
}
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
function encryptConfigSecrets(cfg, vault, _opts) {
|
|
595
|
+
return walk(cfg, vault, (v) => vault.encrypt(v));
|
|
596
|
+
}
|
|
597
|
+
function walk(node, vault, transform) {
|
|
598
|
+
if (node === null || node === void 0) return node;
|
|
599
|
+
if (typeof node !== "object") return node;
|
|
600
|
+
if (Array.isArray(node)) {
|
|
601
|
+
return node.map((item) => walk(item, vault, transform));
|
|
602
|
+
}
|
|
603
|
+
const out = /* @__PURE__ */ Object.create(null);
|
|
604
|
+
for (const [k, v] of Object.entries(node)) {
|
|
605
|
+
if (typeof v === "string" && isSecretField(k)) {
|
|
606
|
+
out[k] = transform(v, k);
|
|
607
|
+
} else if (typeof v === "object" && v !== null) {
|
|
608
|
+
out[k] = walk(v, vault, transform);
|
|
609
|
+
} else {
|
|
610
|
+
out[k] = v;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
return out;
|
|
614
|
+
}
|
|
615
|
+
var SECRET_KEY_PATTERN = /(?:apikey|api_key|authtoken|auth_token|bearer|secret|password|passwd|pwd|refreshtoken|refresh_token|sessionkey|session_key|access[_-]?token|private[_-]?key)/i;
|
|
616
|
+
var NON_SECRET_OVERRIDES = /* @__PURE__ */ new Set(["publickey", "public_key"]);
|
|
617
|
+
function isSecretField(name) {
|
|
618
|
+
const lc = name.toLowerCase();
|
|
619
|
+
if (NON_SECRET_OVERRIDES.has(lc)) return false;
|
|
620
|
+
return SECRET_KEY_PATTERN.test(lc);
|
|
621
|
+
}
|
|
622
|
+
|
|
574
623
|
// src/security/secret-vault.ts
|
|
575
624
|
var KEY_BYTES = 32;
|
|
576
625
|
var IV_BYTES = 12;
|
|
@@ -602,8 +651,8 @@ function deriveKEK(passphrase, salt) {
|
|
|
602
651
|
});
|
|
603
652
|
}
|
|
604
653
|
function wrapDataKey(dataKey, keyVersion, passphrase) {
|
|
605
|
-
const salt =
|
|
606
|
-
const iv =
|
|
654
|
+
const salt = randomBytes2(KEK_SALT_BYTES);
|
|
655
|
+
const iv = randomBytes2(IV_BYTES);
|
|
607
656
|
const kek = deriveKEK(passphrase, salt);
|
|
608
657
|
const cipher = createCipheriv(ALGO, kek, iv);
|
|
609
658
|
const ct = Buffer.concat([cipher.update(dataKey), cipher.final()]);
|
|
@@ -693,7 +742,7 @@ var DefaultSecretVault = class {
|
|
|
693
742
|
encrypt(plaintext) {
|
|
694
743
|
if (this.isEncrypted(plaintext)) return plaintext;
|
|
695
744
|
const key = this.loadOrCreateKey();
|
|
696
|
-
const iv =
|
|
745
|
+
const iv = randomBytes2(IV_BYTES);
|
|
697
746
|
const cipher = createCipheriv(ALGO, key, iv);
|
|
698
747
|
const ct = Buffer.concat([cipher.update(plaintext, "utf8"), cipher.final()]);
|
|
699
748
|
const tag = cipher.getAuthTag();
|
|
@@ -746,9 +795,9 @@ var DefaultSecretVault = class {
|
|
|
746
795
|
*/
|
|
747
796
|
rotateKey() {
|
|
748
797
|
const oldVersion = this._keyVersion;
|
|
749
|
-
const newKey =
|
|
798
|
+
const newKey = randomBytes2(KEY_BYTES);
|
|
750
799
|
const newVersion = oldVersion + 1;
|
|
751
|
-
fs2.mkdirSync(
|
|
800
|
+
fs2.mkdirSync(path2.dirname(this.keyFile), { recursive: true });
|
|
752
801
|
const passphrase = getVaultPassphrase();
|
|
753
802
|
if (passphrase) {
|
|
754
803
|
fs2.writeFileSync(this.keyFile, wrapDataKey(newKey, newVersion, passphrase), { mode: 384 });
|
|
@@ -832,8 +881,8 @@ var DefaultSecretVault = class {
|
|
|
832
881
|
} catch (err) {
|
|
833
882
|
if (err.code !== "ENOENT") throw err;
|
|
834
883
|
}
|
|
835
|
-
fs2.mkdirSync(
|
|
836
|
-
const key =
|
|
884
|
+
fs2.mkdirSync(path2.dirname(this.keyFile), { recursive: true });
|
|
885
|
+
const key = randomBytes2(KEY_BYTES);
|
|
837
886
|
const passphrase = getVaultPassphrase();
|
|
838
887
|
const initialBytes = passphrase ? wrapDataKey(key, 1, passphrase) : key;
|
|
839
888
|
try {
|
|
@@ -881,64 +930,23 @@ var DefaultSecretVault = class {
|
|
|
881
930
|
return key;
|
|
882
931
|
}
|
|
883
932
|
};
|
|
884
|
-
function decryptConfigSecrets(cfg, vault, opts) {
|
|
885
|
-
const warn = opts?.warn ?? ((msg) => console.warn(msg));
|
|
886
|
-
return walk(cfg, vault, (v, key) => {
|
|
887
|
-
try {
|
|
888
|
-
return vault.decrypt(v);
|
|
889
|
-
} catch (err) {
|
|
890
|
-
warn(
|
|
891
|
-
`[secret-vault] Failed to decrypt "${key}": ${err instanceof Error ? err.message : err}`
|
|
892
|
-
);
|
|
893
|
-
return "";
|
|
894
|
-
}
|
|
895
|
-
});
|
|
896
|
-
}
|
|
897
|
-
function encryptConfigSecrets(cfg, vault, _opts) {
|
|
898
|
-
return walk(cfg, vault, (v) => vault.encrypt(v));
|
|
899
|
-
}
|
|
900
|
-
function walk(node, vault, transform) {
|
|
901
|
-
if (node === null || node === void 0) return node;
|
|
902
|
-
if (typeof node !== "object") return node;
|
|
903
|
-
if (Array.isArray(node)) {
|
|
904
|
-
return node.map((item) => walk(item, vault, transform));
|
|
905
|
-
}
|
|
906
|
-
const out = /* @__PURE__ */ Object.create(null);
|
|
907
|
-
for (const [k, v] of Object.entries(node)) {
|
|
908
|
-
if (typeof v === "string" && isSecretField(k)) {
|
|
909
|
-
out[k] = transform(v, k);
|
|
910
|
-
} else if (typeof v === "object" && v !== null) {
|
|
911
|
-
out[k] = walk(v, vault, transform);
|
|
912
|
-
} else {
|
|
913
|
-
out[k] = v;
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
return out;
|
|
917
|
-
}
|
|
918
|
-
var SECRET_KEY_PATTERN = /(?:apikey|api_key|authtoken|auth_token|bearer|secret|password|passwd|pwd|refreshtoken|refresh_token|sessionkey|session_key|access[_-]?token|private[_-]?key)/i;
|
|
919
|
-
var NON_SECRET_OVERRIDES = /* @__PURE__ */ new Set(["publickey", "public_key"]);
|
|
920
|
-
function isSecretField(name) {
|
|
921
|
-
const lc = name.toLowerCase();
|
|
922
|
-
if (NON_SECRET_OVERRIDES.has(lc)) return false;
|
|
923
|
-
return SECRET_KEY_PATTERN.test(lc);
|
|
924
|
-
}
|
|
925
933
|
async function rewriteConfigEncrypted(configPath, vault, patch) {
|
|
926
934
|
let current = {};
|
|
927
935
|
try {
|
|
928
|
-
const raw = await
|
|
936
|
+
const raw = await fsp.readFile(configPath, "utf8");
|
|
929
937
|
current = JSON.parse(raw);
|
|
930
938
|
} catch {
|
|
931
939
|
}
|
|
932
940
|
const merged = deepMerge(current, patch ?? {});
|
|
933
941
|
const encrypted = encryptConfigSecrets(merged, vault);
|
|
934
|
-
await
|
|
942
|
+
await fsp.mkdir(path2.dirname(configPath), { recursive: true });
|
|
935
943
|
await atomicWrite(configPath, JSON.stringify(encrypted, null, 2), { mode: 384 });
|
|
936
944
|
await restrictFilePermissions(configPath);
|
|
937
945
|
}
|
|
938
946
|
async function migratePlaintextSecrets(configPath, vault, logger) {
|
|
939
947
|
let raw;
|
|
940
948
|
try {
|
|
941
|
-
raw = await
|
|
949
|
+
raw = await fsp.readFile(configPath, "utf8");
|
|
942
950
|
} catch {
|
|
943
951
|
return { migrated: 0, file: configPath };
|
|
944
952
|
}
|
|
@@ -964,7 +972,7 @@ async function rotateConfigKeys(configPath, vault, logger) {
|
|
|
964
972
|
const warn = logger?.warn ?? ((msg) => console.warn(msg));
|
|
965
973
|
let raw;
|
|
966
974
|
try {
|
|
967
|
-
raw = await
|
|
975
|
+
raw = await fsp.readFile(configPath, "utf8");
|
|
968
976
|
} catch {
|
|
969
977
|
const { oldVersion: oldVersion2, newVersion: newVersion2 } = vault.rotateKey();
|
|
970
978
|
log(`[secret-vault] Key rotated (v${oldVersion2} \u2192 v${newVersion2}) \u2014 no config file to re-encrypt`);
|
|
@@ -1045,8 +1053,8 @@ async function restrictFilePermissions(filePath, opts) {
|
|
|
1045
1053
|
const warn = opts?.warn ?? ((msg) => console.warn(msg));
|
|
1046
1054
|
if (process.platform === "win32") {
|
|
1047
1055
|
try {
|
|
1048
|
-
const { execFile } = await import(
|
|
1049
|
-
const { promisify } = await import(
|
|
1056
|
+
const { execFile } = await import("node:child_process");
|
|
1057
|
+
const { promisify } = await import("node:util");
|
|
1050
1058
|
const execFileAsync = promisify(execFile);
|
|
1051
1059
|
const user = windowsAccountName();
|
|
1052
1060
|
if (!user) {
|
|
@@ -1063,7 +1071,7 @@ async function restrictFilePermissions(filePath, opts) {
|
|
|
1063
1071
|
}
|
|
1064
1072
|
} else {
|
|
1065
1073
|
try {
|
|
1066
|
-
await
|
|
1074
|
+
await fsp.chmod(filePath, 384);
|
|
1067
1075
|
} catch {
|
|
1068
1076
|
}
|
|
1069
1077
|
}
|
|
@@ -1095,6 +1103,9 @@ function walkCount(node, vault, counter) {
|
|
|
1095
1103
|
return out;
|
|
1096
1104
|
}
|
|
1097
1105
|
|
|
1106
|
+
// src/security/permission-policy.ts
|
|
1107
|
+
import * as fs3 from "node:fs/promises";
|
|
1108
|
+
|
|
1098
1109
|
// src/security/capabilities.ts
|
|
1099
1110
|
var ToolCapabilities = {
|
|
1100
1111
|
/** Can execute arbitrary commands in the user's shell (the `bash` tool). */
|
|
@@ -1158,7 +1169,7 @@ var DANGEROUS_FOR_SUBAGENTS = [
|
|
|
1158
1169
|
ToolCapabilities.CONFIG_MUTATE,
|
|
1159
1170
|
ToolCapabilities.PACKAGE_INSTALL
|
|
1160
1171
|
];
|
|
1161
|
-
[
|
|
1172
|
+
var WIDE_SUBAGENT_CAPABILITIES = [
|
|
1162
1173
|
ToolCapabilities.FS_READ,
|
|
1163
1174
|
ToolCapabilities.FS_WRITE,
|
|
1164
1175
|
ToolCapabilities.NET_OUTBOUND,
|
|
@@ -1230,253 +1241,13 @@ var LruCache = class {
|
|
|
1230
1241
|
return this.store.size;
|
|
1231
1242
|
}
|
|
1232
1243
|
};
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
// make a filesystem — wipes a partition
|
|
1236
|
-
/\bformat\s+[A-Za-z]:/i,
|
|
1237
|
-
// format C: — wipes a Windows volume
|
|
1238
|
-
/\bdiskpart\b/i,
|
|
1239
|
-
// Windows partition editor
|
|
1240
|
-
/\bdd\b[^|]*\bof=(?:\/dev\/|\\\\[.?]\\)/i,
|
|
1241
|
-
// dd writing straight to a raw device
|
|
1242
|
-
/>\s*\/dev\/(?:sd|hd|nvme|disk|mapper|vd)/i,
|
|
1243
|
-
// redirect into a raw block device
|
|
1244
|
-
/:\(\)\s*\{\s*:\|:&\s*\}\s*;/
|
|
1245
|
-
// classic fork bomb
|
|
1246
|
-
];
|
|
1247
|
-
var HIGH_IMPACT_PATTERNS = [
|
|
1248
|
-
/\b(?:curl|wget|fetch|httpie|http|irm|iwr|Invoke-WebRequest|Invoke-RestMethod)\b[\s\S]{0,300}\|\s*(?:sudo\s+)?(?:sh|bash|zsh|fish|pwsh|powershell|iex|Invoke-Expression)\b/i,
|
|
1249
|
-
/\b(?:powershell|pwsh)(?:\.exe)?\b[\s\S]{0,120}-(?:enc|encodedcommand)\b/i,
|
|
1250
|
-
/\b(?:shutdown|reboot)\b/i
|
|
1251
|
-
];
|
|
1252
|
-
var CATASTROPHIC_POSIX_ROOTS = /* @__PURE__ */ new Set([
|
|
1253
|
-
"/etc",
|
|
1254
|
-
"/usr",
|
|
1255
|
-
"/bin",
|
|
1256
|
-
"/sbin",
|
|
1257
|
-
"/lib",
|
|
1258
|
-
"/lib64",
|
|
1259
|
-
"/var",
|
|
1260
|
-
"/boot",
|
|
1261
|
-
"/dev",
|
|
1262
|
-
"/sys",
|
|
1263
|
-
"/proc",
|
|
1264
|
-
"/opt",
|
|
1265
|
-
"/root",
|
|
1266
|
-
"/home",
|
|
1267
|
-
"/srv",
|
|
1268
|
-
"/run",
|
|
1269
|
-
"/system",
|
|
1270
|
-
"/library",
|
|
1271
|
-
"/applications",
|
|
1272
|
-
"/users"
|
|
1273
|
-
]);
|
|
1274
|
-
var CATASTROPHIC_WIN_SUBDIRS = /* @__PURE__ */ new Set([
|
|
1275
|
-
"windows",
|
|
1276
|
-
"system32",
|
|
1277
|
-
"winnt",
|
|
1278
|
-
"program files",
|
|
1279
|
-
"program files (x86)",
|
|
1280
|
-
"programdata",
|
|
1281
|
-
"users"
|
|
1282
|
-
]);
|
|
1283
|
-
var SHELL_OPERATORS = /* @__PURE__ */ new Set(["&&", "||", "|", ";", ">", ">>", "<", "2>", "2>>"]);
|
|
1244
|
+
|
|
1245
|
+
// src/security/yolo-risk.ts
|
|
1284
1246
|
function getInputString(input, key) {
|
|
1285
1247
|
if (!input || typeof input !== "object") return void 0;
|
|
1286
1248
|
const value = input[key];
|
|
1287
1249
|
return typeof value === "string" ? value : void 0;
|
|
1288
1250
|
}
|
|
1289
|
-
function pathLooksInsideProject(rawPath, projectRoot) {
|
|
1290
|
-
if (!projectRoot) return false;
|
|
1291
|
-
if (rawPath === "~" || rawPath.startsWith("~/") || rawPath.startsWith("~\\")) return false;
|
|
1292
|
-
const resolved = path.resolve(projectRoot, rawPath);
|
|
1293
|
-
const relative2 = path.relative(projectRoot, resolved);
|
|
1294
|
-
return !!relative2 && !relative2.startsWith("..") && !path.isAbsolute(relative2);
|
|
1295
|
-
}
|
|
1296
|
-
function tokenizeShell(command) {
|
|
1297
|
-
return command.match(/"[^"]*"|'[^']*'|\S+/g)?.map((token) => token.replace(/^['"]|['"]$/g, "")) ?? [];
|
|
1298
|
-
}
|
|
1299
|
-
function commandSegment(tokens, start) {
|
|
1300
|
-
const out = [];
|
|
1301
|
-
for (let i = start; i < tokens.length; i++) {
|
|
1302
|
-
const token = tokens[i];
|
|
1303
|
-
if (token === void 0 || SHELL_OPERATORS.has(token)) break;
|
|
1304
|
-
out.push(token);
|
|
1305
|
-
}
|
|
1306
|
-
return out;
|
|
1307
|
-
}
|
|
1308
|
-
function hasShortFlag(args, letters) {
|
|
1309
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1310
|
-
for (const arg of args) {
|
|
1311
|
-
if (!arg.startsWith("-") || arg.startsWith("--")) continue;
|
|
1312
|
-
for (const ch of arg.replace(/^-+/, "")) seen.add(ch.toLowerCase());
|
|
1313
|
-
}
|
|
1314
|
-
return letters.split("").every((letter) => seen.has(letter));
|
|
1315
|
-
}
|
|
1316
|
-
function hasRecursiveForceDelete(command, projectRoot) {
|
|
1317
|
-
const tokens = tokenizeShell(command);
|
|
1318
|
-
for (let i = 0; i < tokens.length; i++) {
|
|
1319
|
-
const token = tokens[i]?.toLowerCase();
|
|
1320
|
-
if (!token) continue;
|
|
1321
|
-
if (token === "rm" || token === "rmdir") {
|
|
1322
|
-
const args = commandSegment(tokens, i + 1);
|
|
1323
|
-
const recursiveForce = hasShortFlag(args, "rf") || args.some((arg) => arg === "--recursive") && args.some((arg) => arg === "--force");
|
|
1324
|
-
if (recursiveForce) {
|
|
1325
|
-
const targets = args.filter((arg) => !arg.startsWith("-") && !SHELL_OPERATORS.has(arg));
|
|
1326
|
-
if (targets.length > 0 && targets.every((target) => target.trim().length === 0)) {
|
|
1327
|
-
continue;
|
|
1328
|
-
}
|
|
1329
|
-
if (targets.length === 0) return true;
|
|
1330
|
-
if (targets.some(isCatastrophicDeleteTarget)) return true;
|
|
1331
|
-
if (targets.some((target) => !pathLooksInsideProject(target, projectRoot))) return true;
|
|
1332
|
-
}
|
|
1333
|
-
}
|
|
1334
|
-
if (token === "remove-item" || token === "ri") {
|
|
1335
|
-
const args = commandSegment(tokens, i + 1).map((arg) => arg.toLowerCase());
|
|
1336
|
-
const recurse = args.some((arg) => arg === "-recurse" || arg === "-r");
|
|
1337
|
-
const force = args.some((arg) => arg === "-force" || arg === "-f");
|
|
1338
|
-
if (recurse && force && !args.includes("-whatif")) {
|
|
1339
|
-
const targets = args.filter((arg) => !arg.startsWith("-") && !SHELL_OPERATORS.has(arg));
|
|
1340
|
-
if (targets.length === 0) return true;
|
|
1341
|
-
if (targets.some(isCatastrophicDeleteTarget)) return true;
|
|
1342
|
-
if (targets.some((target) => !pathLooksInsideProject(target, projectRoot))) return true;
|
|
1343
|
-
}
|
|
1344
|
-
}
|
|
1345
|
-
if (token === "rd" || token === "rmdir") {
|
|
1346
|
-
const args = commandSegment(tokens, i + 1).map((arg) => arg.toLowerCase());
|
|
1347
|
-
if (args.includes("/s")) {
|
|
1348
|
-
const targets = args.filter((arg) => !arg.startsWith("-") && !arg.startsWith("/") && !SHELL_OPERATORS.has(arg));
|
|
1349
|
-
if (targets.length === 0) return true;
|
|
1350
|
-
if (targets.some(isCatastrophicDeleteTarget)) return true;
|
|
1351
|
-
if (targets.some((target) => !pathLooksInsideProject(target, projectRoot))) return true;
|
|
1352
|
-
}
|
|
1353
|
-
}
|
|
1354
|
-
}
|
|
1355
|
-
return false;
|
|
1356
|
-
}
|
|
1357
|
-
function hasGitHistoryRewrite(command) {
|
|
1358
|
-
const tokens = tokenizeShell(command).map((token) => token.toLowerCase());
|
|
1359
|
-
for (let i = 0; i < tokens.length; i++) {
|
|
1360
|
-
if (tokens[i] !== "git") continue;
|
|
1361
|
-
const args = commandSegment(tokens, i + 1);
|
|
1362
|
-
if (args.includes("reset") && args.some((arg) => arg === "--hard" || arg.startsWith("--hard="))) {
|
|
1363
|
-
return true;
|
|
1364
|
-
}
|
|
1365
|
-
const cleanIdx = args.indexOf("clean");
|
|
1366
|
-
if (cleanIdx >= 0) {
|
|
1367
|
-
const cleanArgs = args.slice(cleanIdx + 1);
|
|
1368
|
-
if (cleanArgs.some((arg) => arg === "-f" || arg === "--force" || /^-[a-z]*f[a-z]*$/i.test(arg))) {
|
|
1369
|
-
return true;
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
const pushIdx = args.indexOf("push");
|
|
1373
|
-
if (pushIdx >= 0) {
|
|
1374
|
-
const pushArgs = args.slice(pushIdx + 1);
|
|
1375
|
-
if (pushArgs.some(
|
|
1376
|
-
(arg) => arg === "-f" || arg === "--force" || arg === "--force-with-lease" || arg.startsWith("--force=") || arg.startsWith("--force-with-lease=")
|
|
1377
|
-
)) {
|
|
1378
|
-
return true;
|
|
1379
|
-
}
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
return false;
|
|
1383
|
-
}
|
|
1384
|
-
function hasExternalPublish(command) {
|
|
1385
|
-
const tokens = tokenizeShell(command).map((token) => token.toLowerCase());
|
|
1386
|
-
for (let i = 0; i < tokens.length; i++) {
|
|
1387
|
-
const cmd = tokens[i];
|
|
1388
|
-
if (!cmd) continue;
|
|
1389
|
-
const args = commandSegment(tokens, i + 1);
|
|
1390
|
-
if (["npm", "pnpm", "yarn", "bun"].includes(cmd) && (args.includes("publish") || args.includes("deploy"))) {
|
|
1391
|
-
return true;
|
|
1392
|
-
}
|
|
1393
|
-
if (cmd === "cargo" && (args.includes("publish") || args.includes("yank"))) return true;
|
|
1394
|
-
if ((cmd === "docker" || cmd === "podman") && args.includes("push")) return true;
|
|
1395
|
-
if (cmd === "kubectl") {
|
|
1396
|
-
const deleteIdx = args.indexOf("delete");
|
|
1397
|
-
if (deleteIdx >= 0 && (args[deleteIdx + 1] === "namespace" || args[deleteIdx + 1] === "ns")) {
|
|
1398
|
-
return true;
|
|
1399
|
-
}
|
|
1400
|
-
if (args.includes("drain")) return true;
|
|
1401
|
-
}
|
|
1402
|
-
}
|
|
1403
|
-
return false;
|
|
1404
|
-
}
|
|
1405
|
-
function hasFindExec(command) {
|
|
1406
|
-
const tokens = tokenizeShell(command).map((token) => token.toLowerCase());
|
|
1407
|
-
for (let i = 0; i < tokens.length; i++) {
|
|
1408
|
-
if (tokens[i] !== "find") continue;
|
|
1409
|
-
const args = commandSegment(tokens, i + 1);
|
|
1410
|
-
if (args.some((arg) => arg === "-exec" || arg === "-ok" || arg === "-execdir")) return true;
|
|
1411
|
-
}
|
|
1412
|
-
return false;
|
|
1413
|
-
}
|
|
1414
|
-
function isCatastrophicDeleteTarget(rawTarget) {
|
|
1415
|
-
const t = rawTarget.replace(/^['"]|['"]$/g, "").trim();
|
|
1416
|
-
if (!t) return false;
|
|
1417
|
-
if (t === "*" || t === "." || t === "./" || t === ".\\" || t === "./*" || t === ".\\*") return true;
|
|
1418
|
-
const s = t.replace(/[\\/]\*+$/, "").replace(/[\\/]+$/, "");
|
|
1419
|
-
if (s === "") return true;
|
|
1420
|
-
if (s === "~" || /^\$HOME$/i.test(s) || /^%USERPROFILE%$/i.test(s)) return true;
|
|
1421
|
-
if (/^[A-Za-z]:$/.test(s)) return true;
|
|
1422
|
-
const norm = s.toLowerCase().replace(/\\/g, "/");
|
|
1423
|
-
if (CATASTROPHIC_POSIX_ROOTS.has(norm)) return true;
|
|
1424
|
-
const win = norm.match(/^[a-z]:\/([^/]+)$/);
|
|
1425
|
-
if (win?.[1] && CATASTROPHIC_WIN_SUBDIRS.has(win[1])) return true;
|
|
1426
|
-
return false;
|
|
1427
|
-
}
|
|
1428
|
-
function hasCatastrophicDelete(command) {
|
|
1429
|
-
const tokens = tokenizeShell(command);
|
|
1430
|
-
for (let i = 0; i < tokens.length; i++) {
|
|
1431
|
-
const token = tokens[i]?.toLowerCase();
|
|
1432
|
-
if (!token) continue;
|
|
1433
|
-
if (token === "rm") {
|
|
1434
|
-
const args = tokens.slice(i + 1);
|
|
1435
|
-
const recursiveOrForce = args.some(
|
|
1436
|
-
(arg) => /^-[^-]*[rf]/i.test(arg) || arg === "--recursive" || arg === "--force" || arg === "--no-preserve-root"
|
|
1437
|
-
);
|
|
1438
|
-
if (!recursiveOrForce) continue;
|
|
1439
|
-
const targets = args.filter((arg) => !arg.startsWith("-") && !SHELL_OPERATORS.has(arg));
|
|
1440
|
-
if (targets.length === 0) return true;
|
|
1441
|
-
if (targets.some(isCatastrophicDeleteTarget)) return true;
|
|
1442
|
-
}
|
|
1443
|
-
if (token === "remove-item" || token === "ri") {
|
|
1444
|
-
const args = tokens.slice(i + 1);
|
|
1445
|
-
const recursive = args.some((arg) => {
|
|
1446
|
-
const a = arg.toLowerCase();
|
|
1447
|
-
return a === "-recurse" || a === "-force";
|
|
1448
|
-
});
|
|
1449
|
-
if (!recursive) continue;
|
|
1450
|
-
const targets = args.filter((arg) => !arg.startsWith("-") && !SHELL_OPERATORS.has(arg));
|
|
1451
|
-
if (targets.some(isCatastrophicDeleteTarget)) return true;
|
|
1452
|
-
}
|
|
1453
|
-
if (token === "rmdir" || token === "rd") {
|
|
1454
|
-
const args = tokens.slice(i + 1);
|
|
1455
|
-
const recursive = args.some((arg) => arg.toLowerCase() === "/s");
|
|
1456
|
-
if (!recursive) continue;
|
|
1457
|
-
const targets = args.filter((arg) => !arg.startsWith("-") && !arg.startsWith("/") && !SHELL_OPERATORS.has(arg));
|
|
1458
|
-
if (targets.some(isCatastrophicDeleteTarget)) return true;
|
|
1459
|
-
}
|
|
1460
|
-
if (token === "del" || token === "erase") {
|
|
1461
|
-
const args = tokens.slice(i + 1);
|
|
1462
|
-
const targets = args.filter((arg) => !arg.startsWith("-") && !arg.startsWith("/") && !SHELL_OPERATORS.has(arg));
|
|
1463
|
-
if (targets.some(isCatastrophicDeleteTarget)) return true;
|
|
1464
|
-
}
|
|
1465
|
-
}
|
|
1466
|
-
return false;
|
|
1467
|
-
}
|
|
1468
|
-
function isClearlyDestructiveBashCommand(command, projectRoot) {
|
|
1469
|
-
const trimmed = command.trim();
|
|
1470
|
-
if (!trimmed) return false;
|
|
1471
|
-
if (hasRecursiveForceDelete(trimmed, projectRoot)) return true;
|
|
1472
|
-
if (hasGitHistoryRewrite(trimmed)) return true;
|
|
1473
|
-
if (hasExternalPublish(trimmed)) return true;
|
|
1474
|
-
if (hasFindExec(trimmed)) return true;
|
|
1475
|
-
if (hasCatastrophicDelete(trimmed)) return true;
|
|
1476
|
-
if (CATASTROPHIC_PATTERNS.some((pattern) => pattern.test(trimmed))) return true;
|
|
1477
|
-
if (HIGH_IMPACT_PATTERNS.some((pattern) => pattern.test(trimmed))) return true;
|
|
1478
|
-
return false;
|
|
1479
|
-
}
|
|
1480
1251
|
|
|
1481
1252
|
// src/security/permission-policy.ts
|
|
1482
1253
|
function matchesTrust(patterns, subject) {
|
|
@@ -1555,7 +1326,7 @@ var DefaultPermissionPolicy = class {
|
|
|
1555
1326
|
trustFile;
|
|
1556
1327
|
yolo;
|
|
1557
1328
|
yoloDestructive;
|
|
1558
|
-
/**
|
|
1329
|
+
/** Deprecated compatibility flag; no longer gates YOLO calls. */
|
|
1559
1330
|
confirmDestructive;
|
|
1560
1331
|
/**
|
|
1561
1332
|
* Session-scoped "soft deny" map. When the user presses 'n' (block once),
|
|
@@ -1590,7 +1361,7 @@ var DefaultPermissionPolicy = class {
|
|
|
1590
1361
|
/**
|
|
1591
1362
|
* Evaluate-result cache. Keyed by `tool.name::subject` so repeated calls
|
|
1592
1363
|
* with the same tool+input skip namespace matching, subject computation,
|
|
1593
|
-
* pattern matching (matchAny)
|
|
1364
|
+
* and pattern matching (matchAny).
|
|
1594
1365
|
*
|
|
1595
1366
|
* Cleared on any state change (reload, trust, deny, yolo toggle) because
|
|
1596
1367
|
* the result depends on the full policy state. The write-tool smart-bypass
|
|
@@ -1608,7 +1379,7 @@ var DefaultPermissionPolicy = class {
|
|
|
1608
1379
|
this.trustFile = opts.trustFile;
|
|
1609
1380
|
this.yolo = opts.yolo ?? false;
|
|
1610
1381
|
this.yoloDestructive = opts.yoloDestructive ?? opts.forceAllYolo ?? false;
|
|
1611
|
-
this.confirmDestructive =
|
|
1382
|
+
this.confirmDestructive = opts.confirmDestructive ?? false;
|
|
1612
1383
|
this.promptDelegate = opts.promptDelegate;
|
|
1613
1384
|
}
|
|
1614
1385
|
/**
|
|
@@ -1638,18 +1409,18 @@ var DefaultPermissionPolicy = class {
|
|
|
1638
1409
|
getYoloDestructive() {
|
|
1639
1410
|
return this.yoloDestructive;
|
|
1640
1411
|
}
|
|
1641
|
-
/** Toggle destructive confirmation
|
|
1642
|
-
setConfirmDestructive(
|
|
1643
|
-
if (
|
|
1644
|
-
this.confirmDestructive =
|
|
1412
|
+
/** Toggle deprecated destructive confirmation compatibility flag. */
|
|
1413
|
+
setConfirmDestructive(enabled) {
|
|
1414
|
+
if (this.confirmDestructive !== enabled) this._evalCache.clear();
|
|
1415
|
+
this.confirmDestructive = enabled;
|
|
1645
1416
|
}
|
|
1646
|
-
/** Check
|
|
1417
|
+
/** Check deprecated destructive confirmation compatibility flag. */
|
|
1647
1418
|
getConfirmDestructive() {
|
|
1648
1419
|
return this.confirmDestructive;
|
|
1649
1420
|
}
|
|
1650
1421
|
async reload() {
|
|
1651
1422
|
try {
|
|
1652
|
-
const raw = await
|
|
1423
|
+
const raw = await fs3.readFile(this.trustFile, "utf8");
|
|
1653
1424
|
const parsed = safeParse(raw);
|
|
1654
1425
|
if (parsed.ok && parsed.value) this.policy = parsed.value;
|
|
1655
1426
|
} catch {
|
|
@@ -1698,29 +1469,6 @@ var DefaultPermissionPolicy = class {
|
|
|
1698
1469
|
this._evalCache.set(cacheKey, decision);
|
|
1699
1470
|
return decision;
|
|
1700
1471
|
}
|
|
1701
|
-
if (this.yolo) {
|
|
1702
|
-
const destructive = this.isDestructiveYoloCall(tool, input, ctx);
|
|
1703
|
-
if (destructive) {
|
|
1704
|
-
if (this.promptDelegate) {
|
|
1705
|
-
const decision = await this.promptDelegate(tool, input, subject ?? tool.name);
|
|
1706
|
-
if (decision === "deny") {
|
|
1707
|
-
await this.deny({ tool: tool.name, pattern: subject ?? tool.name });
|
|
1708
|
-
return { permission: "deny", source: "user", reason: "user denied destructive yolo" };
|
|
1709
|
-
}
|
|
1710
|
-
return {
|
|
1711
|
-
permission: decision === "yes" || decision === "always" ? "auto" : "deny",
|
|
1712
|
-
source: "user",
|
|
1713
|
-
reason: "destructive yolo approved for this call"
|
|
1714
|
-
};
|
|
1715
|
-
}
|
|
1716
|
-
return {
|
|
1717
|
-
permission: "confirm",
|
|
1718
|
-
source: "yolo_destructive",
|
|
1719
|
-
riskTier: "destructive",
|
|
1720
|
-
reason: "destructive tool needs explicit approval in YOLO mode"
|
|
1721
|
-
};
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
1472
|
if (entry?.allow && subject && matchesTrust(entry.allow, subject)) {
|
|
1725
1473
|
const decision = { permission: "auto", source: "trust", reason: "matched allow pattern" };
|
|
1726
1474
|
this._evalCache.set(cacheKey, decision);
|
|
@@ -1802,47 +1550,6 @@ var DefaultPermissionPolicy = class {
|
|
|
1802
1550
|
}
|
|
1803
1551
|
return { permission: "confirm", source: "default" };
|
|
1804
1552
|
}
|
|
1805
|
-
// Capability-based destructive check (preferred over name-based)
|
|
1806
|
-
isDestructiveByCapability(tool) {
|
|
1807
|
-
const caps = tool.capabilities ?? [];
|
|
1808
|
-
if (caps.includes(ToolCapabilities.SHELL_ARBITRARY)) return true;
|
|
1809
|
-
if (caps.includes(ToolCapabilities.SHELL_RESTRICTED)) return true;
|
|
1810
|
-
if (caps.includes(ToolCapabilities.SHELL_EXEC)) return true;
|
|
1811
|
-
if (caps.includes(ToolCapabilities.FS_WRITE)) return true;
|
|
1812
|
-
if (caps.includes(ToolCapabilities.FS_WRITE_OUTSIDE_PROJECT)) return true;
|
|
1813
|
-
return false;
|
|
1814
|
-
}
|
|
1815
|
-
isDestructiveYoloCall(tool, input, ctx) {
|
|
1816
|
-
if (tool.name === "mcp_control") {
|
|
1817
|
-
const action = getInputString(input, "action");
|
|
1818
|
-
if (action === "list" || action === "search" || action === "activate" || action === "deactivate") {
|
|
1819
|
-
return false;
|
|
1820
|
-
}
|
|
1821
|
-
}
|
|
1822
|
-
if (this.isDestructiveByCapability(tool)) {
|
|
1823
|
-
const caps = tool.capabilities ?? [];
|
|
1824
|
-
if (caps.includes(ToolCapabilities.SHELL_ARBITRARY) || caps.includes(ToolCapabilities.SHELL_RESTRICTED) || caps.includes(ToolCapabilities.SHELL_EXEC)) {
|
|
1825
|
-
const command = shellCommandLineFromInput(input);
|
|
1826
|
-
return command ? isClearlyDestructiveBashCommand(command, ctx.projectRoot) : tool.riskTier === "destructive";
|
|
1827
|
-
}
|
|
1828
|
-
if (caps.includes(ToolCapabilities.FS_WRITE_OUTSIDE_PROJECT)) return true;
|
|
1829
|
-
if (caps.includes(ToolCapabilities.FS_WRITE)) {
|
|
1830
|
-
const targetPath = getInputString(input, "path") ?? getInputString(input, "file");
|
|
1831
|
-
if (!targetPath || !ctx.projectRoot) return false;
|
|
1832
|
-
return !pathLooksInsideProject(targetPath, ctx.projectRoot);
|
|
1833
|
-
}
|
|
1834
|
-
}
|
|
1835
|
-
if (tool.name === "bash" || tool.name === "shell" || tool.name === "exec") {
|
|
1836
|
-
const command = shellCommandLineFromInput(input);
|
|
1837
|
-
return command ? isClearlyDestructiveBashCommand(command, ctx.projectRoot) : tool.riskTier === "destructive";
|
|
1838
|
-
}
|
|
1839
|
-
if (tool.name === "write" || tool.name === "edit" || tool.name === "replace" || tool.name === "patch") {
|
|
1840
|
-
const targetPath = getInputString(input, "path") ?? getInputString(input, "file");
|
|
1841
|
-
if (!targetPath || !ctx.projectRoot) return false;
|
|
1842
|
-
return !pathLooksInsideProject(targetPath, ctx.projectRoot);
|
|
1843
|
-
}
|
|
1844
|
-
return tool.riskTier === "destructive";
|
|
1845
|
-
}
|
|
1846
1553
|
isSensitiveReadCall(tool, input) {
|
|
1847
1554
|
const isReadTool = hasCapability(tool, ToolCapabilities.FS_READ) || tool.name === "read" || tool.name === "grep" || tool.name === "glob" || tool.name === "tree";
|
|
1848
1555
|
if (isReadTool && inputPathLooksSensitive(input)) return true;
|
|
@@ -1950,7 +1657,21 @@ var AutoApprovePermissionPolicy = class _AutoApprovePermissionPolicy {
|
|
|
1950
1657
|
async reload() {
|
|
1951
1658
|
}
|
|
1952
1659
|
};
|
|
1953
|
-
|
|
1954
|
-
|
|
1660
|
+
export {
|
|
1661
|
+
AutoApprovePermissionPolicy,
|
|
1662
|
+
DANGEROUS_FOR_SUBAGENTS,
|
|
1663
|
+
DefaultPermissionPolicy,
|
|
1664
|
+
DefaultSecretScrubber,
|
|
1665
|
+
DefaultSecretVault,
|
|
1666
|
+
ToolCapabilities,
|
|
1667
|
+
decryptConfigSecrets,
|
|
1668
|
+
encryptConfigSecrets,
|
|
1669
|
+
getDangerousCapabilities,
|
|
1670
|
+
hasCapability,
|
|
1671
|
+
hasDangerousCapabilityForSubagents,
|
|
1672
|
+
isSecretField,
|
|
1673
|
+
migratePlaintextSecrets,
|
|
1674
|
+
rewriteConfigEncrypted,
|
|
1675
|
+
rotateConfigKeys
|
|
1676
|
+
};
|
|
1955
1677
|
//# sourceMappingURL=index.js.map
|
|
1956
|
-
//# sourceMappingURL=index.js.map
|