@wrongstack/core 0.284.1 → 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
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CollaborationBus — kernel-level pause/resume signal for the
|
|
3
|
+
* collaboration `controller` role (Phase 3 of idea #13 from IDEAS.md).
|
|
4
|
+
*
|
|
5
|
+
* The bus is a single-process singleton. The webui server (which hosts
|
|
6
|
+
* the agent loop) creates one at boot, passes it to both the agent's
|
|
7
|
+
* `toolCall` pipeline (as a middleware) and the `CollaborationWsHandler`
|
|
8
|
+
* (which toggles it on client requests).
|
|
9
|
+
*
|
|
10
|
+
* Semantics:
|
|
11
|
+
* - `requestPause(by)` flips the bus into the "paused" state. The
|
|
12
|
+
* state has no timeout of its own — the *middleware* decides how
|
|
13
|
+
* long to wait before auto-resuming (default 60s).
|
|
14
|
+
* - `resume()` returns the bus to the running state. Idempotent:
|
|
15
|
+
* calling resume() when not paused is a no-op returning `false`.
|
|
16
|
+
* - `waitForResume(timeoutMs)` is what the middleware calls. It
|
|
17
|
+
* returns `true` if the bus was resumed in time, `false` if the
|
|
18
|
+
* timeout fired (in which case it also auto-resumes, so the agent
|
|
19
|
+
* loop is never permanently stuck).
|
|
20
|
+
* - `getState()` returns a snapshot for observability surfaces
|
|
21
|
+
* (UI badges, CLI `/collab status`).
|
|
22
|
+
*
|
|
23
|
+
* Why a separate bus object rather than putting state on RunController?
|
|
24
|
+
*
|
|
25
|
+
* - The RunController is per-run; the bus is per-process. A single
|
|
26
|
+
* pause signal across the whole webui process is the right
|
|
27
|
+
* granularity (the webui hosts exactly one Agent.run at a time).
|
|
28
|
+
* - The bus can be unit-tested without spinning up an Agent. The
|
|
29
|
+
* middleware can be tested by injecting a fake bus.
|
|
30
|
+
* - Future multi-session webui (when the bus is upgraded to filter
|
|
31
|
+
* by sessionId) does not require touching the agent loop — the
|
|
32
|
+
* middleware already receives the sessionId in its payload.
|
|
33
|
+
*/
|
|
34
|
+
export type CollabBusState = {
|
|
35
|
+
paused: boolean;
|
|
36
|
+
pausedAt: string | null;
|
|
37
|
+
pausedBy: string | null;
|
|
38
|
+
};
|
|
39
|
+
export declare class CollaborationBus {
|
|
40
|
+
private pausePromise;
|
|
41
|
+
private pauseResolve;
|
|
42
|
+
private pausedAtMs;
|
|
43
|
+
private pausedBy;
|
|
44
|
+
isPaused(): boolean;
|
|
45
|
+
getState(): CollabBusState;
|
|
46
|
+
/**
|
|
47
|
+
* Pause the agent loop. Idempotent: a second `requestPause` while
|
|
48
|
+
* already paused is a no-op (the original pause wins; we do not
|
|
49
|
+
* overwrite `pausedBy`). Returns true when the state actually
|
|
50
|
+
* transitioned, false when it was already paused.
|
|
51
|
+
*/
|
|
52
|
+
requestPause(byParticipant: string): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Resume the agent loop. Returns true when the state actually
|
|
55
|
+
* transitioned from paused → running, false when it was already
|
|
56
|
+
* running (no-op).
|
|
57
|
+
*/
|
|
58
|
+
resume(): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Block until the bus is resumed or the timeout fires. Returns:
|
|
61
|
+
* - `true` → bus was resumed in time
|
|
62
|
+
* - `false` → timeout fired; bus was auto-resumed as a side effect
|
|
63
|
+
*
|
|
64
|
+
* When `timeoutMs` is `0` the wait is unbounded (the middleware must
|
|
65
|
+
* be paired with an external AbortSignal in that case — we don't
|
|
66
|
+
* expose one here to keep the API simple).
|
|
67
|
+
*/
|
|
68
|
+
waitForResume(timeoutMs: number): Promise<boolean>;
|
|
69
|
+
private readonly injectionQueue;
|
|
70
|
+
private onConsumed?;
|
|
71
|
+
/**
|
|
72
|
+
* Register a listener fired when `collabInjectMiddleware` actually splices a
|
|
73
|
+
* queued injection into a tool call (Phase 4 feedback loop). The webui's
|
|
74
|
+
* CollaborationWebSocketHandler uses it to broadcast a
|
|
75
|
+
* `collab.injection.granted` with phase `'consumed'` so observers learn the
|
|
76
|
+
* injection was applied (and to which real tool). Last registration wins.
|
|
77
|
+
*/
|
|
78
|
+
onInjectionConsumed(fn: (info: ConsumedInjectionInfo) => void): void;
|
|
79
|
+
/**
|
|
80
|
+
* Invoked by `collabInjectMiddleware` immediately after it replaces a tool
|
|
81
|
+
* call's result with a queued injection. No-op when no listener is set.
|
|
82
|
+
*/
|
|
83
|
+
notifyInjectionConsumed(info: ConsumedInjectionInfo): void;
|
|
84
|
+
/**
|
|
85
|
+
* Queue a manual tool result. The next time the agent's toolCall
|
|
86
|
+
* pipeline sees a matching `toolUse.id`, the
|
|
87
|
+
* `collabInjectMiddleware` consumes this entry and replaces the
|
|
88
|
+
* real tool execution. Returns `false` if an injection for the
|
|
89
|
+
* same id is already queued (idempotent — first write wins).
|
|
90
|
+
*/
|
|
91
|
+
injectToolResult(input: InjectedToolResult): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Pop an injection from the queue. Returns the payload (and
|
|
94
|
+
* removes it) if one is pending, or `null` when nothing matches.
|
|
95
|
+
* Called by the middleware on every tool call.
|
|
96
|
+
*/
|
|
97
|
+
takeInjection(toolUseId: string): InjectedToolResult | null;
|
|
98
|
+
/** Inspect the queue size (for observability / tests). */
|
|
99
|
+
pendingInjectionCount(): number;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Payload for a queued manual tool-call injection. The middleware
|
|
103
|
+
* splices this into the toolCall pipeline as a synthetic result.
|
|
104
|
+
*/
|
|
105
|
+
export interface InjectedToolResult {
|
|
106
|
+
toolUseId: string;
|
|
107
|
+
/** Serialized content the model will see (string, JSON, etc.). */
|
|
108
|
+
content: unknown;
|
|
109
|
+
/** When true, the result is rendered as a tool error. */
|
|
110
|
+
isError: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Free-form context surfaced in the broadcast and the audit log,
|
|
113
|
+
* e.g. "controller: read returned the right file but with these
|
|
114
|
+
* contents" or "controller: skipped the destructive bash call".
|
|
115
|
+
*/
|
|
116
|
+
reason: string;
|
|
117
|
+
/** Participant id of the controller who issued the injection. */
|
|
118
|
+
authorId: string;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Emitted to `onInjectionConsumed` listeners when the middleware splices a
|
|
122
|
+
* queued injection into a real tool call. Carries the resolved tool NAME
|
|
123
|
+
* (unknown at queue time — the injection is keyed only by tool_use_id).
|
|
124
|
+
*/
|
|
125
|
+
export interface ConsumedInjectionInfo {
|
|
126
|
+
toolUseId: string;
|
|
127
|
+
toolName: string;
|
|
128
|
+
authorId: string;
|
|
129
|
+
reason: string;
|
|
130
|
+
isError: boolean;
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=collab-bus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collab-bus.d.ts","sourceRoot":"","sources":["../../src/coordination/collab-bus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,YAAY,CAA8B;IAClD,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,UAAU,CAAuB;IACzC,OAAO,CAAC,QAAQ,CAAuB;IAIvC,QAAQ,IAAI,OAAO,CAElB;IAED,QAAQ,IAAI,cAAc,CAMzB;IAID;;;;;OAKG;IACH,YAAY,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAQ3C;IAED;;;;OAIG;IACH,MAAM,IAAI,OAAO,CAQhB;IAID;;;;;;;;OAQG;IACG,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CA0BvD;IAUD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAyC;IACxE,OAAO,CAAC,UAAU,CAAC,CAAsD;IAEzE;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,GAAG,IAAI,CAEnE;IAED;;;OAGG;IACH,uBAAuB,CAAC,IAAI,EAAE,qBAAqB,GAAG,IAAI,CAEzD;IAED;;;;;;OAMG;IACH,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAInD;IAED;;;;OAIG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAK1D;IAED,0DAA0D;IAC1D,qBAAqB,IAAI,MAAM,CAE9B;CACF;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,OAAO,EAAE,OAAO,CAAC;IACjB,yDAAyD;IACzD,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB"}
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collaborative Debugging Session — parallel multi-agent debugging on the same problem.
|
|
3
|
+
*
|
|
4
|
+
* Architecture:
|
|
5
|
+
* - BugHunter, RefactorPlanner, and Critic run in parallel on shared file snapshots.
|
|
6
|
+
* - Findings flow through the FleetBus via structured events: bug.found → refactor.plan → critic.evaluation.
|
|
7
|
+
* - The Director acts as ResultRouter, collecting outputs and routing them to dependents.
|
|
8
|
+
* - A shared scratchpad stores intermediate results so agents can read each other's
|
|
9
|
+
* conclusions without needing each other's full transcripts.
|
|
10
|
+
*
|
|
11
|
+
* Flow:
|
|
12
|
+
* 1. Director.spawnCollab() creates a CollabSession with a SharedFileSnapshot.
|
|
13
|
+
* 2. All three agents are spawned simultaneously and receive the same file snapshot.
|
|
14
|
+
* 3. BugHunter emits bug.found events → Director routes to RefactorPlanner.
|
|
15
|
+
* 4. RefactorPlanner subscribes to bug.found and emits refactor.plan events.
|
|
16
|
+
* 5. Critic subscribes to both bug.found and refactor.plan and emits critic.evaluation.
|
|
17
|
+
* 6. Director collects all results and produces a structured CollabDebugReport.
|
|
18
|
+
*
|
|
19
|
+
* Timeout and cancellation:
|
|
20
|
+
* - CollabSession agents report budget threshold events to the Director via fleet events.
|
|
21
|
+
* - The Director's collabAlert() handler receives warnings for timeout/iteration/tool_call
|
|
22
|
+
* thresholds and can decide to cancel the session or let it continue.
|
|
23
|
+
* - Director.cancelCollabSession() sends director.cancel_collab to all collab agents,
|
|
24
|
+
* causing them to finish early with a 'cancelled' status in the report.
|
|
25
|
+
* - The Director reads /btw notes via getLeaderBtwNotes() and can inject them into
|
|
26
|
+
* collab agents via task context before making cancellation decisions.
|
|
27
|
+
*/
|
|
28
|
+
import { EventEmitter } from 'node:events';
|
|
29
|
+
/**
|
|
30
|
+
* Default maximum number of files a collab_debug session may target.
|
|
31
|
+
* Each of the three agents (BugHunter, RefactorPlanner, Critic) receives
|
|
32
|
+
* the full file snapshot as context — a large target causes token overflow
|
|
33
|
+
* and timeout failures. Keep this low (20-30) for reliable sessions.
|
|
34
|
+
* Used when neither `maxTargetFiles` nor `contextWindow` is provided.
|
|
35
|
+
*/
|
|
36
|
+
export declare const DEFAULT_MAX_TARGET_FILES = 30;
|
|
37
|
+
/**
|
|
38
|
+
* Alert levels the Director can emit when a collab session needs attention.
|
|
39
|
+
* These flow through the FleetBus so the host can display them in the UI.
|
|
40
|
+
*/
|
|
41
|
+
export declare enum DirectorAlertLevel {
|
|
42
|
+
/** The agent is still making progress but has hit a soft budget limit. */
|
|
43
|
+
WARNING = "warning",
|
|
44
|
+
/** The agent has hit a hard limit and the session cannot continue. */
|
|
45
|
+
CRITICAL = "critical",
|
|
46
|
+
/** The Director has decided to cancel the session (user request or policy). */
|
|
47
|
+
CANCELLED = "cancelled"
|
|
48
|
+
}
|
|
49
|
+
export interface DirectorAlert {
|
|
50
|
+
sessionId: string;
|
|
51
|
+
subagentId: string;
|
|
52
|
+
role: string;
|
|
53
|
+
level: DirectorAlertLevel;
|
|
54
|
+
/** Human-readable message for UI/logs */
|
|
55
|
+
message: string;
|
|
56
|
+
/** Budget kind that triggered this alert, if any */
|
|
57
|
+
budgetKind?: 'timeout' | 'idle_timeout' | 'iterations' | 'tool_calls' | 'tokens' | 'cost' | undefined;
|
|
58
|
+
/** Elapsed ms at time of alert */
|
|
59
|
+
elapsedMs?: number | undefined;
|
|
60
|
+
/** Limit that was hit */
|
|
61
|
+
limit?: number | undefined;
|
|
62
|
+
/** /btw notes the director has collected (may be empty) */
|
|
63
|
+
btwNotes?: string[] | undefined;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Immutable snapshot of target files at the start of a collab session.
|
|
67
|
+
* All agents in the session read from this snapshot — they see the same baseline.
|
|
68
|
+
*/
|
|
69
|
+
export interface SharedFileSnapshot {
|
|
70
|
+
id: string;
|
|
71
|
+
createdAt: string;
|
|
72
|
+
files: SharedFileEntry[];
|
|
73
|
+
}
|
|
74
|
+
export interface SharedFileEntry {
|
|
75
|
+
path: string;
|
|
76
|
+
content: string;
|
|
77
|
+
language?: string | undefined;
|
|
78
|
+
snapshotMtimeMs?: number | undefined;
|
|
79
|
+
snapshotSizeBytes?: number | undefined;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Bug finding emitted by BugHunter and consumed by RefactorPlanner + Critic.
|
|
83
|
+
*/
|
|
84
|
+
export interface BugFinding {
|
|
85
|
+
id: string;
|
|
86
|
+
type: string;
|
|
87
|
+
severity: 'critical' | 'high' | 'medium' | 'low';
|
|
88
|
+
location: {
|
|
89
|
+
file: string;
|
|
90
|
+
line: number;
|
|
91
|
+
};
|
|
92
|
+
description: string;
|
|
93
|
+
suggestedFix?: string | undefined;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Refactoring plan emitted by RefactorPlanner, consuming BugFinding(s).
|
|
97
|
+
*/
|
|
98
|
+
export interface RefactorPlan {
|
|
99
|
+
id: string;
|
|
100
|
+
basedOnBugIds: string[];
|
|
101
|
+
phases: RefactorPhase[];
|
|
102
|
+
riskScore: 'low' | 'medium' | 'high';
|
|
103
|
+
estimatedChangeCount: number;
|
|
104
|
+
rollbackStrategy: string;
|
|
105
|
+
}
|
|
106
|
+
/** One phase within a refactor plan. */
|
|
107
|
+
export interface RefactorPhase {
|
|
108
|
+
number: number;
|
|
109
|
+
title: string;
|
|
110
|
+
tasks: string[];
|
|
111
|
+
risk: 'low' | 'medium' | 'high';
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Critic evaluation of a bug finding or refactor plan.
|
|
115
|
+
*/
|
|
116
|
+
export interface CriticEvaluation {
|
|
117
|
+
id: string;
|
|
118
|
+
subjectType: 'bug_finding' | 'refactor_plan';
|
|
119
|
+
subjectId: string;
|
|
120
|
+
score: number;
|
|
121
|
+
verdict: 'approve' | 'needs_revision' | 'reject';
|
|
122
|
+
strengths: string[];
|
|
123
|
+
weaknesses: string[];
|
|
124
|
+
concerns: CriticConcern[];
|
|
125
|
+
}
|
|
126
|
+
export interface CriticConcern {
|
|
127
|
+
description: string;
|
|
128
|
+
location?: {
|
|
129
|
+
file: string | undefined;
|
|
130
|
+
line: number;
|
|
131
|
+
};
|
|
132
|
+
severity: 'blocking' | 'advisory';
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Full structured report produced when a CollabSession resolves.
|
|
136
|
+
*/
|
|
137
|
+
export interface CollabDebugReport {
|
|
138
|
+
sessionId: string;
|
|
139
|
+
startedAt: string;
|
|
140
|
+
completedAt: string;
|
|
141
|
+
targetPaths: string[];
|
|
142
|
+
/** How the session ended. 'completed' = all agents finished normally.
|
|
143
|
+
* 'cancelled' = Director called cancelCollabSession().
|
|
144
|
+
* 'timeout' = session-level timeout elapsed before all agents finished.
|
|
145
|
+
* 'critical_alert' = Director escalated a warning to a cancel decision.
|
|
146
|
+
*/
|
|
147
|
+
disposition: 'completed' | 'cancelled' | 'timeout' | 'critical_alert';
|
|
148
|
+
bugs: BugFinding[];
|
|
149
|
+
refactorPlans: RefactorPlan[];
|
|
150
|
+
evaluations: CriticEvaluation[];
|
|
151
|
+
/** Alerts that were raised during the session (may be empty). */
|
|
152
|
+
alerts: DirectorAlert[];
|
|
153
|
+
/** Files modified after the initial static snapshot was captured. */
|
|
154
|
+
snapshotWarnings?: string[] | undefined;
|
|
155
|
+
/** Overall verdict from the Critic across all evaluated subjects. */
|
|
156
|
+
overallVerdict: 'approve' | 'needs_revision' | 'reject';
|
|
157
|
+
/** Markdown-formatted summary for the director's context window. */
|
|
158
|
+
summary: string;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Per-agent budget configuration for collab sessions.
|
|
162
|
+
* Allows the caller (Director) to control the exact limits instead of
|
|
163
|
+
* using hard-coded defaults that may not match the director's policy.
|
|
164
|
+
*/
|
|
165
|
+
export interface CollabBudgetConfig {
|
|
166
|
+
maxIterations: number;
|
|
167
|
+
maxToolCalls: number;
|
|
168
|
+
timeoutMs: number;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Budget overrides for specific roles in a collab session.
|
|
172
|
+
* When a role is not present in the map, the default budget is used.
|
|
173
|
+
*/
|
|
174
|
+
export type CollabBudgetOverrides = Partial<Record<string, CollabBudgetConfig>>;
|
|
175
|
+
export interface BugFoundPayload {
|
|
176
|
+
finding: BugFinding;
|
|
177
|
+
}
|
|
178
|
+
export interface RefactorPlanPayload {
|
|
179
|
+
plan: RefactorPlan;
|
|
180
|
+
}
|
|
181
|
+
export interface CriticEvaluationPayload {
|
|
182
|
+
evaluation: CriticEvaluation;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Emitted by a collab agent when it hits a soft budget limit.
|
|
186
|
+
* The Director's fleet handler receives this and calls collabAlert().
|
|
187
|
+
*/
|
|
188
|
+
export interface CollabBudgetWarningPayload {
|
|
189
|
+
sessionId: string;
|
|
190
|
+
role: string;
|
|
191
|
+
kind: 'timeout' | 'idle_timeout' | 'iterations' | 'tool_calls' | 'tokens' | 'cost';
|
|
192
|
+
used: number;
|
|
193
|
+
limit: number;
|
|
194
|
+
timeoutMs?: number | undefined;
|
|
195
|
+
elapsedMs: number;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Emitted by the Director to cancel all agents in a collab session.
|
|
199
|
+
* CollabSession listens for this and causes its agent pool to finish early.
|
|
200
|
+
*/
|
|
201
|
+
export interface DirectorCancelCollabPayload {
|
|
202
|
+
sessionId: string;
|
|
203
|
+
reason: string;
|
|
204
|
+
cancelledAt: string;
|
|
205
|
+
}
|
|
206
|
+
export interface CollabSessionOptions {
|
|
207
|
+
/** Paths to scan — used to build the SharedFileSnapshot. */
|
|
208
|
+
targetPaths: string[];
|
|
209
|
+
/** Files already read and snapshot. When provided, snapshot is skipped. */
|
|
210
|
+
prebuiltSnapshot?: SharedFileSnapshot | undefined;
|
|
211
|
+
/** Max time to wait for the session to resolve (ms). Default: 10 min. */
|
|
212
|
+
timeoutMs?: number | undefined;
|
|
213
|
+
/**
|
|
214
|
+
* Maximum number of files to include in the snapshot.
|
|
215
|
+
* - If set explicitly: use this value (hard override).
|
|
216
|
+
* - If `contextWindow` is set: calculate dynamically from estimated token budget.
|
|
217
|
+
* - If neither: use `DEFAULT_MAX_TARGET_FILES` (30).
|
|
218
|
+
*/
|
|
219
|
+
maxTargetFiles?: number | undefined;
|
|
220
|
+
/**
|
|
221
|
+
* Context window size (in tokens) of the model running the subagents.
|
|
222
|
+
* When provided and `maxTargetFiles` is not set, the limit is computed
|
|
223
|
+
* dynamically: `floor((contextWindow * 0.4) / AVG_TOKENS_PER_FILE)`.
|
|
224
|
+
* If not provided, `DEFAULT_MAX_TARGET_FILES` is used as the fallback.
|
|
225
|
+
*/
|
|
226
|
+
contextWindow?: number | undefined;
|
|
227
|
+
/**
|
|
228
|
+
* Budget overrides per role. When provided, these override the hard-coded
|
|
229
|
+
* defaults so the Director can enforce fleet-wide budget policy.
|
|
230
|
+
* Keys must match role names: 'bug-hunter', 'refactor-planner', 'critic'.
|
|
231
|
+
*/
|
|
232
|
+
budgetOverrides?: CollabBudgetOverrides | undefined;
|
|
233
|
+
/**
|
|
234
|
+
* Called by the Director when a collab agent hits a soft budget limit.
|
|
235
|
+
* The Director uses this to decide whether to cancel the session or extend.
|
|
236
|
+
* Return 'cancel' to stop the session immediately; 'extend' to continue
|
|
237
|
+
* with the agent's proposed new limits; 'ignore' to let the default
|
|
238
|
+
* auto-extend logic handle it.
|
|
239
|
+
*/
|
|
240
|
+
onBudgetWarning?: ((alert: DirectorAlert) => 'cancel' | 'extend' | 'ignore') | undefined;
|
|
241
|
+
}
|
|
242
|
+
export declare class CollabSession extends EventEmitter {
|
|
243
|
+
readonly sessionId: string;
|
|
244
|
+
readonly options: CollabSessionOptions;
|
|
245
|
+
readonly snapshot: SharedFileSnapshot;
|
|
246
|
+
private readonly director;
|
|
247
|
+
private readonly fleetBus;
|
|
248
|
+
private readonly subagentIds;
|
|
249
|
+
private readonly bugs;
|
|
250
|
+
private readonly plans;
|
|
251
|
+
private readonly evaluations;
|
|
252
|
+
private readonly disposers;
|
|
253
|
+
private settled;
|
|
254
|
+
private readonly timeoutMs;
|
|
255
|
+
private cancelled;
|
|
256
|
+
private _raceResolved;
|
|
257
|
+
private readonly alerts;
|
|
258
|
+
private snapshotWarnings;
|
|
259
|
+
/** Tracks tool call counts per subagent for progress-based timeout decisions. */
|
|
260
|
+
private readonly progressBySubagent;
|
|
261
|
+
/** Last tool call count when a timeout warning was handled. */
|
|
262
|
+
private readonly lastTimeoutProgress;
|
|
263
|
+
/** Session-level timeout timer handle (cleared on cancel or natural completion). */
|
|
264
|
+
private _timeoutTimer?;
|
|
265
|
+
constructor(director: import('./director.js').Director, fleetBus: import('./fleet-bus.js').FleetBus, options: CollabSessionOptions);
|
|
266
|
+
get id(): string;
|
|
267
|
+
getSessionAlerts(): DirectorAlert[];
|
|
268
|
+
isCancelled(): boolean;
|
|
269
|
+
/**
|
|
270
|
+
* Snapshot of role → subagentId map. The Director calls coordinator.stop()
|
|
271
|
+
* for each agent when cancelling the session, using this map to enumerate
|
|
272
|
+
* all three collab agents.
|
|
273
|
+
*/
|
|
274
|
+
getSubagentIds(): ReadonlyMap<string, string>;
|
|
275
|
+
/**
|
|
276
|
+
* Returns the effective file limit for this session.
|
|
277
|
+
* Priority: explicit `maxTargetFiles` > dynamic from `contextWindow` > `DEFAULT_MAX_TARGET_FILES`.
|
|
278
|
+
*/
|
|
279
|
+
effectiveFileLimit(): number;
|
|
280
|
+
buildSnapshot(): Promise<SharedFileSnapshot>;
|
|
281
|
+
/**
|
|
282
|
+
* Cancel the session. Emits director.cancel_collab on the FleetBus so all
|
|
283
|
+
* collab agents finish early. The session-level timeout timer is also cleared.
|
|
284
|
+
* Safe to call multiple times (idempotent after first call).
|
|
285
|
+
*/
|
|
286
|
+
cancel(reason?: string): void;
|
|
287
|
+
start(): Promise<CollabDebugReport>;
|
|
288
|
+
private parseAndEmit;
|
|
289
|
+
private extractJsonObjects;
|
|
290
|
+
private budgetForRole;
|
|
291
|
+
private spawnAgent;
|
|
292
|
+
private buildBugHunterTask;
|
|
293
|
+
private buildRefactorPlannerTask;
|
|
294
|
+
private buildCriticTask;
|
|
295
|
+
private wireFleetBus;
|
|
296
|
+
private roleFromSubagentId;
|
|
297
|
+
private assembleReport;
|
|
298
|
+
private checkSnapshotFreshness;
|
|
299
|
+
private buildMarkdownSummary;
|
|
300
|
+
private cleanup;
|
|
301
|
+
}
|
|
302
|
+
//# sourceMappingURL=collab-debug.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collab-debug.d.ts","sourceRoot":"","sources":["../../src/coordination/collab-debug.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAO3C;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAM3C;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,0EAA0E;IAC1E,OAAO,YAAY;IACnB,sEAAsE;IACtE,QAAQ,aAAa;IACrB,+EAA+E;IAC/E,SAAS,cAAc;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,kBAAkB,CAAC;IAC1B,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,UAAU,CAAC,EACP,SAAS,GACT,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,QAAQ,GACR,MAAM,GACN,SAAS,CAAC;IACd,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS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Y;IA8B1B,OAAO,CAAC,kBAAkB;IAsC1B,OAAO,CAAC,aAAa;YAqBP,UAAU;IAgBxB,OAAO,CAAC,kBAAkB;IAkB1B,OAAO,CAAC,wBAAwB;IAoBhC,OAAO,CAAC,eAAe;IAwBvB,OAAO,CAAC,YAAY;IAiLpB,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,cAAc;YA2CR,sBAAsB;IAoBpC,OAAO,CAAC,oBAAoB;IAmE5B,OAAO,CAAC,OAAO;CAiBhB"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* commit-safety — detect when a commit would sweep up work that this session
|
|
3
|
+
* did NOT author.
|
|
4
|
+
*
|
|
5
|
+
* When several coding agents (or a separate wrongstack process, or a human)
|
|
6
|
+
* edit the same worktree at once, a blanket `git add .` / commit-all captures
|
|
7
|
+
* everyone's uncommitted changes — including half-finished work from another
|
|
8
|
+
* agent. There is no way to un-bake that once it lands in a shared commit.
|
|
9
|
+
*
|
|
10
|
+
* This module reads the working tree and cross-references it against the
|
|
11
|
+
* per-project {@link file-author-tracker} log (which records the sessionId that
|
|
12
|
+
* created/edited each file). Dirty files whose latest author is a DIFFERENT
|
|
13
|
+
* session are flagged as "foreign"; dirty files with no recorded author are
|
|
14
|
+
* "unverified" (a concurrent non-wrongstack agent, a build/format step, or a
|
|
15
|
+
* human). The result is a plain-text warning callers render before committing.
|
|
16
|
+
*
|
|
17
|
+
* Warn-only by design: this never blocks or rewrites what gets committed — it
|
|
18
|
+
* surfaces the risk so the agent (or user) can scope the commit to its own
|
|
19
|
+
* files or coordinate first.
|
|
20
|
+
*
|
|
21
|
+
* @module commit-safety
|
|
22
|
+
*/
|
|
23
|
+
export interface CommitSafetyOptions {
|
|
24
|
+
/** Directory to run git in (the agent's cwd is fine). */
|
|
25
|
+
cwd: string;
|
|
26
|
+
/** Project root, used to locate the file-author log. */
|
|
27
|
+
projectRoot: string;
|
|
28
|
+
/**
|
|
29
|
+
* The current session's id — the "self" key. Dirty files authored by a
|
|
30
|
+
* different sessionId are flagged as foreign. When omitted, every authored
|
|
31
|
+
* file counts as foreign (we cannot prove ownership).
|
|
32
|
+
*/
|
|
33
|
+
sessionId?: string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Directory holding the file-author log. Defaults to the resolved per-project
|
|
36
|
+
* dir (`~/.wrongstack/projects/<slug>`). Mainly an injection seam for tests.
|
|
37
|
+
*/
|
|
38
|
+
storageDir?: string | undefined;
|
|
39
|
+
/** Abort signal for the git subprocesses. */
|
|
40
|
+
signal?: AbortSignal | undefined;
|
|
41
|
+
}
|
|
42
|
+
export interface ForeignFile {
|
|
43
|
+
/** Repo-relative path. */
|
|
44
|
+
path: string;
|
|
45
|
+
/** Human-readable name of the agent that last authored it, if known. */
|
|
46
|
+
agentName?: string | undefined;
|
|
47
|
+
/** Session that last authored it, if known. */
|
|
48
|
+
sessionId?: string | undefined;
|
|
49
|
+
}
|
|
50
|
+
export interface CommitSafetyReport {
|
|
51
|
+
/** Total uncommitted (staged + unstaged + untracked) paths. */
|
|
52
|
+
dirtyCount: number;
|
|
53
|
+
/** Dirty files whose latest recorded author is a DIFFERENT session. */
|
|
54
|
+
foreignFiles: ForeignFile[];
|
|
55
|
+
/** Dirty files with no recorded author for any session. */
|
|
56
|
+
unverifiedFiles: string[];
|
|
57
|
+
/** Branch names of OTHER active worktrees of this repo (excludes ours). */
|
|
58
|
+
otherWorktrees: string[];
|
|
59
|
+
/**
|
|
60
|
+
* Pre-formatted, plain-text (no ANSI) multi-line warning, or '' when there
|
|
61
|
+
* is nothing notable to surface. Callers may colorize/wrap as they see fit.
|
|
62
|
+
*/
|
|
63
|
+
warning: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Assess whether committing now risks capturing another agent's work.
|
|
67
|
+
*
|
|
68
|
+
* Best-effort: any git failure (not a repo, git missing, timeout) yields an
|
|
69
|
+
* empty report rather than throwing — commit-safety must never break a commit.
|
|
70
|
+
*/
|
|
71
|
+
export declare function assessCommitSafety(opts: CommitSafetyOptions): Promise<CommitSafetyReport>;
|
|
72
|
+
//# sourceMappingURL=commit-safety.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit-safety.d.ts","sourceRoot":"","sources":["../../src/coordination/commit-safety.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAQH,MAAM,WAAW,mBAAmB;IAClC,yDAAyD;IACzD,GAAG,EAAE,MAAM,CAAC;IACZ,wDAAwD;IACxD,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,6CAA6C;IAC7C,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CAClC;AAED,MAAM,WAAW,WAAW;IAC1B,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,2DAA2D;IAC3D,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,2EAA2E;IAC3E,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAKD;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAsE/F"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ConsensusProtocol — agent voting on proposed changes.
|
|
3
|
+
*
|
|
4
|
+
* Enables autonomous approval of code changes without a human. Agents register
|
|
5
|
+
* as voters with a role weight; changes gather votes; the protocol resolves
|
|
6
|
+
* the outcome based on configured quorum rules.
|
|
7
|
+
*
|
|
8
|
+
* Voting rules (configurable):
|
|
9
|
+
* - Quorum: minimum fraction of eligible voters required (default: 0.5)
|
|
10
|
+
* - Approval threshold: minimum fraction of cast votes that must be approve (default: 0.6)
|
|
11
|
+
* - Veto roles: roles whose 'reject' vote is fatal regardless of count
|
|
12
|
+
* - Auto-approve: changes with severity=critical bypass voting if the proposer is trusted
|
|
13
|
+
*
|
|
14
|
+
* The protocol is stateless — it reads from the KnowledgeGraph and writes results
|
|
15
|
+
* back to it. This makes it naturally consistent with the shared knowledge model.
|
|
16
|
+
*
|
|
17
|
+
* @module consensus-protocol
|
|
18
|
+
*/
|
|
19
|
+
import type { VoteRecord, VoteValue } from './knowledge-graph.js';
|
|
20
|
+
import type { KnowledgeGraph } from './knowledge-graph.js';
|
|
21
|
+
import type { FleetBus } from './fleet-bus.js';
|
|
22
|
+
export interface VoterConfig {
|
|
23
|
+
agentId: string;
|
|
24
|
+
agentName: string;
|
|
25
|
+
role: string;
|
|
26
|
+
/** Weight multiplier for this voter's vote. Default: 1. */
|
|
27
|
+
weight: number;
|
|
28
|
+
/** If true, a 'reject' vote from this role is a hard veto. Default: false. */
|
|
29
|
+
veto?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated Not yet implemented. Auto-approve of low-risk changes is planned
|
|
32
|
+
* but not wired up in the vote resolution logic.
|
|
33
|
+
*/
|
|
34
|
+
autoApprovesLowRisk?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface QuorumRule {
|
|
37
|
+
/** Fraction of eligible voters required (0-1). Default: 0.5. */
|
|
38
|
+
quorumFraction: number;
|
|
39
|
+
/** Fraction of cast votes that must be approve (0-1). Default: 0.6. */
|
|
40
|
+
approvalFraction: number;
|
|
41
|
+
/** Roles whose reject vote is a hard veto regardless of count. */
|
|
42
|
+
vetoRoles: string[];
|
|
43
|
+
/** Minimum total weight of approve votes to pass (0-1 of total eligible weight). */
|
|
44
|
+
approvalWeightFraction?: number | undefined;
|
|
45
|
+
}
|
|
46
|
+
export interface ConsensusResult {
|
|
47
|
+
changeId: string;
|
|
48
|
+
outcome: 'approved' | 'rejected' | 'pending' | 'vetoed' | 'quorum_not_met';
|
|
49
|
+
votes: VoteRecord[];
|
|
50
|
+
approveCount: number;
|
|
51
|
+
rejectCount: number;
|
|
52
|
+
abstainCount: number;
|
|
53
|
+
totalWeightApprove: number;
|
|
54
|
+
totalWeightReject: number;
|
|
55
|
+
eligibleVoters: string[];
|
|
56
|
+
quorumMet: boolean;
|
|
57
|
+
approvalMet: boolean;
|
|
58
|
+
vetoedBy?: string;
|
|
59
|
+
rationale: string;
|
|
60
|
+
}
|
|
61
|
+
export interface ConsensusOptions {
|
|
62
|
+
rules?: Partial<QuorumRule>;
|
|
63
|
+
voters: VoterConfig[];
|
|
64
|
+
graph: KnowledgeGraph;
|
|
65
|
+
fleet?: FleetBus | undefined;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* ConsensusProtocol manages voting on ChangeNodes in the KnowledgeGraph.
|
|
69
|
+
* It is instantiated once per autonomous session and used to initiate votes,
|
|
70
|
+
* cast votes, and resolve outcomes.
|
|
71
|
+
*/
|
|
72
|
+
export declare class ConsensusProtocol {
|
|
73
|
+
private readonly graph;
|
|
74
|
+
private readonly fleet?;
|
|
75
|
+
private readonly rules;
|
|
76
|
+
private readonly voters;
|
|
77
|
+
constructor(opts: ConsensusOptions);
|
|
78
|
+
/**
|
|
79
|
+
* Initiate a vote on a proposed change. Updates the change node's status
|
|
80
|
+
* to 'proposed' and notifies eligible voters via FleetBus.
|
|
81
|
+
*/
|
|
82
|
+
initiateVote(changeId: string): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Cast a vote. Updates the change node in the graph and re-evaluates
|
|
85
|
+
* consensus. If the vote triggers a resolution, updates the change status.
|
|
86
|
+
*/
|
|
87
|
+
castVote(changeId: string, voterId: string, value: VoteValue, rationale?: string): Promise<ConsensusResult>;
|
|
88
|
+
/**
|
|
89
|
+
* Resolve the current vote without waiting for all eligible voters.
|
|
90
|
+
* Useful when a timeout fires or an agent decides to finalize early.
|
|
91
|
+
*/
|
|
92
|
+
resolveNow(changeId: string): Promise<ConsensusResult>;
|
|
93
|
+
/**
|
|
94
|
+
* Register or update a voter's configuration.
|
|
95
|
+
*/
|
|
96
|
+
registerVoter(config: VoterConfig): void;
|
|
97
|
+
/**
|
|
98
|
+
* Get the current vote status for a change.
|
|
99
|
+
*/
|
|
100
|
+
getStatus(changeId: string): ConsensusResult | null;
|
|
101
|
+
private _eligibleVoters;
|
|
102
|
+
private _resolve;
|
|
103
|
+
private _toChangeStatus;
|
|
104
|
+
private _notifyVoters;
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=consensus-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consensus-protocol.d.ts","sourceRoot":"","sources":["../../src/coordination/consensus-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAc,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAI/C,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,UAAU;IACzB,gEAAgE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C,IAAI,CAAC,CAQlD;IAED;;;OAGG;IACG,QAAQ,CACZ,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,SAAS,EAChB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,eAAe,CAAC,CA0C1B;IAED;;;OAGG;IACG,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAY3D;IAED;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAEvC;IAED;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAKlD;IAID,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,QAAQ;IA4HhB,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,aAAa;CActB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SubagentError } from '../../types/multi-agent.js';
|
|
2
|
+
/**
|
|
3
|
+
* Map any raw exception thrown out of a subagent's runner into a
|
|
4
|
+
* structured `SubagentError`. This is the single point where the
|
|
5
|
+
* coordinator decides "what kind of failure was that" — so callers
|
|
6
|
+
* (delegate tool output, /agents UI, retry policies) branch on
|
|
7
|
+
* `kind` instead of substring-matching `error.message`.
|
|
8
|
+
*
|
|
9
|
+
* Exported because tests and CLI surfaces want to assert on the
|
|
10
|
+
* classification without instantiating a coordinator.
|
|
11
|
+
*/
|
|
12
|
+
export declare function classifySubagentError(err: unknown, hints?: {
|
|
13
|
+
parentAborted?: boolean | undefined;
|
|
14
|
+
}): SubagentError;
|
|
15
|
+
//# sourceMappingURL=error-classifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-classifier.d.ts","sourceRoot":"","sources":["../../../src/coordination/coordinator/error-classifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAqB,MAAM,4BAA4B,CAAC;AAMnF;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,OAAO,EACZ,KAAK,GAAE;IAAE,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAO,GAClD,aAAa,CA8Df"}
|