@wrongstack/core 0.284.1 → 0.286.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 +129 -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 +152 -0
- package/dist/coordination/autonomous-brain.d.ts.map +1 -0
- package/dist/coordination/autonomous-coordinator.d.ts +243 -0
- package/dist/coordination/autonomous-coordinator.d.ts.map +1 -0
- package/dist/coordination/brain-ledger.d.ts +142 -0
- package/dist/coordination/brain-ledger.d.ts.map +1 -0
- package/dist/coordination/brain-monitor.d.ts +103 -0
- package/dist/coordination/brain-monitor.d.ts.map +1 -0
- package/dist/coordination/brain.d.ts +147 -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 +295 -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 +79 -2587
- package/dist/coordination/index.d.ts.map +1 -0
- package/dist/coordination/index.js +2262 -673
- package/dist/coordination/index.js.map +7 -1
- package/dist/coordination/knowledge-graph.d.ts +229 -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 +67 -0
- package/dist/coordination/mailbox-actions.d.ts.map +1 -0
- package/dist/coordination/mailbox-constants.d.ts +64 -0
- package/dist/coordination/mailbox-constants.d.ts.map +1 -0
- package/dist/coordination/mailbox-events.d.ts +32 -0
- package/dist/coordination/mailbox-events.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-message-codec.d.ts +8 -0
- package/dist/coordination/mailbox-message-codec.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} +125 -26
- package/dist/coordination/mailbox-types.d.ts.map +1 -0
- package/dist/coordination/mailbox.d.ts +88 -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 +2061 -1300
- 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 +61 -0
- package/dist/execution/autonomous-runner.d.ts.map +1 -0
- package/dist/execution/autonomy-brain.d.ts +151 -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/brain-chain.d.ts +53 -0
- package/dist/execution/brain-chain.d.ts.map +1 -0
- package/dist/execution/brain-evaluation.d.ts +66 -0
- package/dist/execution/brain-evaluation.d.ts.map +1 -0
- package/dist/execution/brain-runtime.d.ts +171 -0
- package/dist/execution/brain-runtime.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/council-brain.d.ts +79 -0
- package/dist/execution/council-brain.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} +22 -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 +25 -180
- package/dist/execution/index.d.ts.map +1 -0
- package/dist/execution/index.js +1748 -490
- 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 +142 -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 +179 -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 +69 -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 +1043 -192
- 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 +612 -0
- package/dist/hq/protocol.d.ts.map +1 -0
- package/dist/hq/publisher.d.ts +181 -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 +114 -2872
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6104 -2737
- 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} +134 -210
- 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 +37 -23
- 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/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 +7 -8
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +354 -401
- package/dist/security/index.js.map +7 -1
- package/dist/security/permission-policy-schema.d.ts +77 -0
- package/dist/security/permission-policy-schema.d.ts.map +1 -0
- package/dist/security/permission-policy.d.ts +158 -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 +96 -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 +114 -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 +783 -443
- 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 +41 -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 +219 -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} +344 -355
- 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 +101 -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 +443 -0
- package/dist/types/multi-agent.d.ts.map +1 -0
- package/dist/{observability-D-HZN_mF.d.ts → types/observability.d.ts} +17 -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 +252 -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/incoming-images.d.ts +39 -0
- package/dist/utils/incoming-images.d.ts.map +1 -0
- package/dist/utils/index.d.ts +38 -920
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +323 -36
- 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} +32 -17
- package/dist/worktree/worktree-manager.d.ts.map +1 -0
- package/instructions/agents/browser.md +25 -16
- package/instructions/autonomy/active-mission.md +2 -4
- package/instructions/coordination/subagent-baseline.md +16 -2
- package/instructions/leader-after-task.md +3 -1
- package/instructions/sections/tool/common-patterns.md +7 -1
- package/instructions/sections/tool/delegation-full.md +1 -1
- package/instructions/system.md +47 -0
- package/package.json +4 -5
- package/skills/docker-deploy/SKILL.md +1 -1
- package/skills/node-modern/SKILL.md +2 -2
- package/skills/plugin-author/SKILL.md +9 -16
- package/skills/wrongstack-mailbox/SKILL.md +51 -12
- 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,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;IAChE,cAAc,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,gBAAgB,EAAE,MAAM,CAAC;IACzB,kEAAkE;IAClE,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,oFAAoF;IACpF,sBAAsB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7C;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,gBAAgB,CAAC;IAC3E,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAC5B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,KAAK,EAAE,cAAc,CAAC;IACtB,KAAK,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CAC9B;AAED;;;;GAIG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAiB;IACvC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAuB;IAC9C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAa;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA2B;IAElD,YAAY,IAAI,EAAE,gBAAgB,EAUjC;IAID;;;OAGG;IACG,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,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"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { EventBus } from '../kernel/events.js';
|
|
2
|
+
import type { SubagentConfig } from '../types/multi-agent.js';
|
|
3
|
+
import type { Tool } from '../types/tool.js';
|
|
4
|
+
import type { Director } from './director.js';
|
|
5
|
+
/**
|
|
6
|
+
* Opaque host interface so this factory doesn't have to depend on the
|
|
7
|
+
* CLI's `MultiAgentHost`. Any caller that exposes the same three
|
|
8
|
+
* methods can wire `delegate` — including test doubles.
|
|
9
|
+
*/
|
|
10
|
+
export interface DelegateHost {
|
|
11
|
+
/** True if a Director is already attached and running. */
|
|
12
|
+
isDirectorMode(): boolean;
|
|
13
|
+
/** Build (or return the cached) Director when director mode is on. */
|
|
14
|
+
ensureDirector(): Promise<Director | null>;
|
|
15
|
+
/**
|
|
16
|
+
* Force-promote a non-director session into director mode at runtime.
|
|
17
|
+
* Returns the Director, or null when promotion is impossible (e.g. a
|
|
18
|
+
* non-director coordinator has already spawned subagents in the
|
|
19
|
+
* legacy code path).
|
|
20
|
+
*/
|
|
21
|
+
promoteToDirector(): Promise<Director | null>;
|
|
22
|
+
/**
|
|
23
|
+
* Optional: when promotion fails, return the human-readable reason.
|
|
24
|
+
* Used to render an actionable error to the calling model instead of
|
|
25
|
+
* the prior opaque "Director could not be activated" message.
|
|
26
|
+
* Implementations may return null when they don't track the reason.
|
|
27
|
+
*/
|
|
28
|
+
getPromotionBlockReason?(): string | null;
|
|
29
|
+
}
|
|
30
|
+
export interface CreateDelegateToolOptions {
|
|
31
|
+
host: DelegateHost;
|
|
32
|
+
/**
|
|
33
|
+
* Roster used to resolve `role` strings into full `SubagentConfig`s.
|
|
34
|
+
* Typically `FLEET_ROSTER`. When omitted, `delegate({ role })` calls
|
|
35
|
+
* fail and only the explicit `name + provider + model` path works.
|
|
36
|
+
*/
|
|
37
|
+
roster?: Record<string, SubagentConfig>;
|
|
38
|
+
/**
|
|
39
|
+
* Default await timeout in milliseconds. `delegate` blocks until the
|
|
40
|
+
* subagent's task resolves; without a cap, a stuck worker would hang
|
|
41
|
+
* the host indefinitely. Set generously (default: 4 hours) so the
|
|
42
|
+
* orchestrator can run multi-step refactors / monorepo audits
|
|
43
|
+
* without being killed for being slow — the orchestrator must
|
|
44
|
+
* decide per-call when a task needs to be cut short.
|
|
45
|
+
*/
|
|
46
|
+
defaultTimeoutMs?: number | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Absolute directory under which per-subagent JSONL transcripts live —
|
|
49
|
+
* matches `MultiAgentHostOptions.sessionsRoot`. When set, the delegate
|
|
50
|
+
* tool reads the subagent's transcript on timeout / budget-exhaustion
|
|
51
|
+
* to extract partial output, so the host LLM gets *something* useful
|
|
52
|
+
* back instead of just an error.
|
|
53
|
+
*/
|
|
54
|
+
sessionsRoot?: string | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* The directorRunId used to namespace transcripts (typically the host
|
|
57
|
+
* session id). Combined with `sessionsRoot` to locate per-subagent
|
|
58
|
+
* JSONLs at `<sessionsRoot>/<runId>/<subagentId>.jsonl`.
|
|
59
|
+
*/
|
|
60
|
+
directorRunId?: string | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Buffer subtracted from the caller's `timeoutMs` before passing it
|
|
63
|
+
* to the subagent. Gives the host a window to detect a subagent that
|
|
64
|
+
* has gone silent and surface a partial result rather than a generic
|
|
65
|
+
* timeout. Default: 60_000 ms (raised from 30s to give subagents
|
|
66
|
+
* more headroom before the host kills them).
|
|
67
|
+
*/
|
|
68
|
+
subagentTimeoutBufferMs?: number | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Host EventBus. When supplied, `delegate` emits `delegate.started`
|
|
71
|
+
* (before it blocks on the subagent) and `delegate.completed` (once the
|
|
72
|
+
* subagent settles) so UIs / the Telegram bridge can render readable
|
|
73
|
+
* start/finish lines instead of inferring them from the truncated
|
|
74
|
+
* `tool.executed` JSON preview. Optional — emits are best-effort and a
|
|
75
|
+
* missing bus never affects delegation behaviour.
|
|
76
|
+
*/
|
|
77
|
+
events?: EventBus | undefined;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* `delegate` — the compact multi-agent tool exposed after Director mode is
|
|
81
|
+
* enabled. It bundles spawn + assign + await into a single call.
|
|
82
|
+
*
|
|
83
|
+
* The model never has to ask "are we in director mode?" — it just calls
|
|
84
|
+
* `delegate({ role, task })` and gets back a `TaskResult`. The cost of
|
|
85
|
+
* that ergonomic packaging is that `delegate` cannot be used for
|
|
86
|
+
* parallel work as-is; the model must fire multiple `delegate` calls in
|
|
87
|
+
* parallel through the provider's parallel-tool-call surface, or escalate
|
|
88
|
+
* to the explicit `spawn_subagent` + `assign_task` + `await_tasks` flow
|
|
89
|
+
* when it wants fan-out it controls itself.
|
|
90
|
+
*/
|
|
91
|
+
export declare function createDelegateTool(opts: CreateDelegateToolOptions): Tool;
|
|
92
|
+
/**
|
|
93
|
+
* Per-kind orchestrator hint. Returned alongside the structured error
|
|
94
|
+
* so the calling model has a concrete next step instead of "task
|
|
95
|
+
* failed, good luck". Returns undefined for success / unknown kinds —
|
|
96
|
+
* the caller checks for presence before including in output.
|
|
97
|
+
*/
|
|
98
|
+
export declare function hintForKind(kind: string | undefined, retryable: boolean | undefined, backoffMs: number | undefined, partial?: {
|
|
99
|
+
lastAssistantText?: string | undefined;
|
|
100
|
+
} | undefined): string | undefined;
|
|
101
|
+
//# sourceMappingURL=delegate-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delegate-tool.d.ts","sourceRoot":"","sources":["../../src/coordination/delegate-tool.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,yBAAyB,CAAC;AAC1E,OAAO,KAAK,EAAc,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAM9C;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,0DAA0D;IAC1D,cAAc,IAAI,OAAO,CAAC;IAC1B,sEAAsE;IACtE,cAAc,IAAI,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IAC3C;;;;;OAKG;IACH,iBAAiB,IAAI,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IAC9C;;;;;OAKG;IACH,uBAAuB,CAAC,IAAI,MAAM,GAAG,IAAI,CAAC;CAC3C;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,YAAY,CAAC;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACxC;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC;;;;;;OAMG;IACH,uBAAuB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7C;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CAC/B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,yBAAyB,GAAG,IAAI,CAwbxE;AAgLD;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,SAAS,EAAE,OAAO,GAAG,SAAS,EAC9B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,CAAC,EAAE;IAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,SAAS,GAC/D,MAAM,GAAG,SAAS,CAkDpB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dep-watcher-bridge — Bridges the file-watcher plugin's custom events
|
|
3
|
+
* to the dependency watcher → mailbox pipeline.
|
|
4
|
+
*
|
|
5
|
+
* The file-watcher plugin emits `file-watcher:changed` custom events
|
|
6
|
+
* when files change. This module subscribes to those events, filters
|
|
7
|
+
* for dependency manifests (package.json, go.mod, etc.), and posts
|
|
8
|
+
* assign messages to the inter-agent mailbox for tech-stack audit.
|
|
9
|
+
*
|
|
10
|
+
* Returns a dispose function that unsubscribes from the event bus.
|
|
11
|
+
*
|
|
12
|
+
* @module dep-watcher-bridge
|
|
13
|
+
*/
|
|
14
|
+
import type { EventBus } from '../kernel/events.js';
|
|
15
|
+
import type { Mailbox } from './mailbox-types.js';
|
|
16
|
+
export interface DepWatcherBridgeOptions {
|
|
17
|
+
/** The event bus to subscribe to (same bus the file-watcher plugin emits on). */
|
|
18
|
+
events: EventBus;
|
|
19
|
+
/** The mailbox instance where dep-change notifications will be posted. */
|
|
20
|
+
mailbox: Mailbox;
|
|
21
|
+
/** Absolute project root — used to build watch paths and match file patterns. */
|
|
22
|
+
projectRoot: string;
|
|
23
|
+
/** Agent id the tech-stack audit tasks should target. Default: 'tech-stack'. */
|
|
24
|
+
targetAgent?: string | undefined;
|
|
25
|
+
/** Agent id of the watcher/sender. Default: 'dep-watcher'. */
|
|
26
|
+
watcherAgentId?: string | undefined;
|
|
27
|
+
/** Debounce window in ms. Default: 3000 (3 seconds). */
|
|
28
|
+
debounceMs?: number | undefined;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Wire the file-watcher's `file-watcher:changed` events into the
|
|
32
|
+
* dependency watcher → mailbox pipeline.
|
|
33
|
+
*
|
|
34
|
+
* Returns a dispose function. Call it to unsubscribe when the
|
|
35
|
+
* session ends or the watcher is no longer needed.
|
|
36
|
+
*
|
|
37
|
+
* Usage:
|
|
38
|
+
* const dispose = attachDepWatcherBridge({
|
|
39
|
+
* events: ctx.events,
|
|
40
|
+
* mailbox: new DefaultMailbox(sessionDir),
|
|
41
|
+
* projectRoot: ctx.projectRoot,
|
|
42
|
+
* });
|
|
43
|
+
* // ... session runs ...
|
|
44
|
+
* dispose(); // clean up on exit
|
|
45
|
+
*/
|
|
46
|
+
export declare function attachDepWatcherBridge(opts: DepWatcherBridgeOptions): () => void;
|
|
47
|
+
//# sourceMappingURL=dep-watcher-bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dep-watcher-bridge.d.ts","sourceRoot":"","sources":["../../src/coordination/dep-watcher-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,MAAM,WAAW,uBAAuB;IACtC,iFAAiF;IACjF,MAAM,EAAE,QAAQ,CAAC;IACjB,0EAA0E;IAC1E,OAAO,EAAE,OAAO,CAAC;IACjB,iFAAiF;IACjF,WAAW,EAAE,MAAM,CAAC;IACpB,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,8DAA8D;IAC9D,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,uBAAuB,GAC5B,MAAM,IAAI,CA4CZ"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dep-watcher — File-change → Mailbox bridge for dependency monitoring.
|
|
3
|
+
*
|
|
4
|
+
* Watches dependency manifest files (package.json, go.mod, Cargo.toml, etc.)
|
|
5
|
+
* and when they change (create/update), posts a message to the inter-agent
|
|
6
|
+
* mailbox. A tech-stack analysis agent can then pick up the message and
|
|
7
|
+
* run a full tech-stack validation, feeding results back to the coding LLM.
|
|
8
|
+
*
|
|
9
|
+
* This module is a *config factory*, not a watcher itself. It produces
|
|
10
|
+
* configuration that the file-watcher plugin (`watch_start`) can consume,
|
|
11
|
+
* plus a callback that posts to a Mailbox instance.
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
* const cfg = makeDependencyWatcherConfig({
|
|
15
|
+
* projectRoot: '/path/to/project',
|
|
16
|
+
* mailbox,
|
|
17
|
+
* targetAgent: 'tech-stack-agent',
|
|
18
|
+
* });
|
|
19
|
+
* // cfg.watchPaths → pass to watch_start
|
|
20
|
+
* // cfg.onChange → call on file-watcher:changed events
|
|
21
|
+
*
|
|
22
|
+
* @module dep-watcher
|
|
23
|
+
*/
|
|
24
|
+
import type { Mailbox } from './mailbox-types.js';
|
|
25
|
+
/**
|
|
26
|
+
* Files that declare project dependencies. When any of these change
|
|
27
|
+
* (create/update), a mailbox message triggers a tech-stack audit.
|
|
28
|
+
*/
|
|
29
|
+
export declare const DEPENDENCY_FILE_PATTERNS: ReadonlyArray<string>;
|
|
30
|
+
export interface DepWatchEntry {
|
|
31
|
+
/** Relative path from project root that changed. */
|
|
32
|
+
path: string;
|
|
33
|
+
/** Event type from the file watcher: 'change', 'add', 'delete' (rare). */
|
|
34
|
+
event: string;
|
|
35
|
+
/** ISO8601 timestamp of when the change was detected. */
|
|
36
|
+
timestamp: string;
|
|
37
|
+
}
|
|
38
|
+
export interface DependencyWatcherConfig {
|
|
39
|
+
/** Paths to pass to `watch_start` — the project-root-relative dependency files. */
|
|
40
|
+
watchPaths: string[];
|
|
41
|
+
/** Callback to invoke when a dependency file changes. Posts to mailbox. */
|
|
42
|
+
onChange: (entry: DepWatchEntry) => Promise<void>;
|
|
43
|
+
/** Debounce window in ms — multiple changes to the same file within this window are collapsed. */
|
|
44
|
+
debounceMs: number;
|
|
45
|
+
/** Cancel all in-flight debounce timers. Call when the file watcher is
|
|
46
|
+
* stopped (session end / project switch) so pending setTimeouts — each
|
|
47
|
+
* holding a closure over the mailbox + entry — don't leak. */
|
|
48
|
+
dispose: () => void;
|
|
49
|
+
}
|
|
50
|
+
export interface DependencyWatcherOptions {
|
|
51
|
+
/** Absolute path to the project root. */
|
|
52
|
+
projectRoot: string;
|
|
53
|
+
/** The mailbox instance where messages will be posted. */
|
|
54
|
+
mailbox: Mailbox;
|
|
55
|
+
/** Agent id that should receive the tech-stack audit task. */
|
|
56
|
+
targetAgent?: string | undefined;
|
|
57
|
+
/** Agent id of the watcher (sender). */
|
|
58
|
+
watcherAgentId?: string | undefined;
|
|
59
|
+
/** Debounce window in ms. Default: 3000 (3 seconds). */
|
|
60
|
+
debounceMs?: number | undefined;
|
|
61
|
+
/** Only watch these specific patterns. Defaults to DEPENDENCY_FILE_PATTERNS. */
|
|
62
|
+
patterns?: string[] | undefined;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Build a dependency watcher configuration. The returned `watchPaths` can be
|
|
66
|
+
* passed directly to the `watch_start` tool, and `onChange` should be wired
|
|
67
|
+
* to the `file-watcher:changed` custom event.
|
|
68
|
+
*
|
|
69
|
+
* When a dependency file changes, `onChange` posts a high-priority `assign`
|
|
70
|
+
* message to the mailbox targeting the tech-stack agent, with the changed
|
|
71
|
+
* file path and event type in the body.
|
|
72
|
+
*/
|
|
73
|
+
export declare function makeDependencyWatcherConfig(opts: DependencyWatcherOptions): DependencyWatcherConfig;
|
|
74
|
+
//# sourceMappingURL=dep-watcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dep-watcher.d.ts","sourceRoot":"","sources":["../../src/coordination/dep-watcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,aAAa,CAAC,MAAM,CAmC1D,CAAC;AAIF,MAAM,WAAW,aAAa;IAC5B,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC,mFAAmF;IACnF,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,2EAA2E;IAC3E,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,kGAAkG;IAClG,UAAU,EAAE,MAAM,CAAC;IACnB;;mEAE+D;IAC/D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,yCAAyC;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,wCAAwC;IACxC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,gFAAgF;IAChF,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACjC;AAID;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,wBAAwB,GAC7B,uBAAuB,CAiHzB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Director-specific error types. Extracted to keep the Director class
|
|
3
|
+
* focused on orchestration logic.
|
|
4
|
+
*/
|
|
5
|
+
export declare class FleetSpawnBudgetError extends Error {
|
|
6
|
+
readonly kind: 'max_spawns' | 'max_spawn_depth';
|
|
7
|
+
readonly limit: number;
|
|
8
|
+
readonly observed: number;
|
|
9
|
+
constructor(kind: 'max_spawns' | 'max_spawn_depth', limit: number, observed: number, message?: string | undefined);
|
|
10
|
+
}
|
|
11
|
+
export declare class FleetCostCapError extends Error {
|
|
12
|
+
readonly kind: 'max_cost_usd';
|
|
13
|
+
readonly limit: number;
|
|
14
|
+
readonly observed: number;
|
|
15
|
+
constructor(limit: number, observed: number);
|
|
16
|
+
}
|
|
17
|
+
export declare class FleetTokenCapError extends Error {
|
|
18
|
+
readonly kind: 'max_tokens';
|
|
19
|
+
readonly limit: number;
|
|
20
|
+
readonly observed: number;
|
|
21
|
+
constructor(limit: number, observed: number);
|
|
22
|
+
}
|
|
23
|
+
export declare class FleetContextOverflowError extends Error {
|
|
24
|
+
readonly kind: 'max_context_load';
|
|
25
|
+
readonly limit: number;
|
|
26
|
+
readonly observed: number;
|
|
27
|
+
constructor(limit: number, observed: number);
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=director-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"director-errors.d.ts","sourceRoot":"","sources":["../../../src/coordination/director/director-errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,iBAAiB,CAAC;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,YACE,IAAI,EAAE,YAAY,GAAG,iBAAiB,EACtC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,EAW7B;CACF;AAED,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,YAAY,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAQ1C;CACF;AAED,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,YAAY,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAQ1C;CACF;AAED,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,YAAY,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAQ1C;CACF"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Director construction helpers.
|
|
3
|
+
*
|
|
4
|
+
* The `Director` constructor was historically a single 300+ line function
|
|
5
|
+
* that interleaved field assignments with two pieces of event-listener
|
|
6
|
+
* wiring: the `task.completed` listener on the coordinator (which mirrors
|
|
7
|
+
* completions into the in-memory wait table, the on-disk checkpoint, and
|
|
8
|
+
* the session JSONL event stream) and the `budget.threshold_reached`
|
|
9
|
+
* filter on the FleetBus (which implements the heartbeat-driven timeout
|
|
10
|
+
* policy and the per-kind auto-extension logic).
|
|
11
|
+
*
|
|
12
|
+
* Both wirings were inlined because they close over a lot of Director
|
|
13
|
+
* private state (`completed`, `taskWaiters`, `taskDescriptions`,
|
|
14
|
+
* `appendSessionEvent`, `scheduleManifest`, `recordExtension`,
|
|
15
|
+
* `maxBudgetExtensions`, `maxFleetCostUsd`, etc.). Pulling them out
|
|
16
|
+
* without losing the closures requires a narrow `DirectorInternals`
|
|
17
|
+
* shape — exactly what this module exposes.
|
|
18
|
+
*
|
|
19
|
+
* The constructor itself stays a member-initializer; the helpers below
|
|
20
|
+
* are called *during* construction, after the relevant fields are
|
|
21
|
+
* populated. Each helper ends with `coordinator.on(...)` /
|
|
22
|
+
* `fleet.filter(...)` registration so the listener is wired exactly
|
|
23
|
+
* once, at construction time.
|
|
24
|
+
*/
|
|
25
|
+
import type { TaskResult, TaskSpec } from '../types/multi-agent.js';
|
|
26
|
+
/** Cap on the in-memory `completed` map. Trimmed oldest-first when exceeded. */
|
|
27
|
+
export declare const MAX_COMPLETED = 10000;
|
|
28
|
+
/** Narrow shape the wiring helpers need from a partially-constructed Director.
|
|
29
|
+
* The helpers accept a `Director` instance (structural typing — the class
|
|
30
|
+
* exposes every field this interface requires), so the constructor can pass
|
|
31
|
+
* `this` directly without an explicit cast.
|
|
32
|
+
*
|
|
33
|
+
* Note: Private/protected members cannot be picked via Pick<> because keyof
|
|
34
|
+
* only returns public keys. We define the interface explicitly rather than
|
|
35
|
+
* deriving from Director to include private fields the wiring code needs. */
|
|
36
|
+
export interface DirectorInternals {
|
|
37
|
+
id: string;
|
|
38
|
+
directorRunId: string;
|
|
39
|
+
completed: Map<string, import('../types/multi-agent.js').TaskResult>;
|
|
40
|
+
taskWaiters: Map<string, {
|
|
41
|
+
promise: Promise<import('../types/multi-agent.js').TaskResult>;
|
|
42
|
+
resolve: (r: import('../types/multi-agent.js').TaskResult) => void;
|
|
43
|
+
}>;
|
|
44
|
+
taskDescriptions: Map<string, string>;
|
|
45
|
+
stateCheckpoint: import('../storage/director-state.js').DirectorStateCheckpoint | null;
|
|
46
|
+
usage: import('./fleet-bus.js').FleetUsageAggregator;
|
|
47
|
+
fleetManager: import('./fleet-manager.js').FleetManager | undefined;
|
|
48
|
+
fleet: import('./fleet-bus.js').FleetBus;
|
|
49
|
+
coordinator: import('./icoordinator.js').ICoordinator;
|
|
50
|
+
maxBudgetExtensions: number;
|
|
51
|
+
maxFleetCostUsd: number;
|
|
52
|
+
recordExtension: (subagentId: string, taskId: string | undefined, kind: string, newLimit: number) => void;
|
|
53
|
+
appendSessionEvent: (event: Parameters<import('../types/session.js').SessionWriter['append']>[0]) => Promise<void>;
|
|
54
|
+
scheduleManifest: () => void;
|
|
55
|
+
brain: import('./brain.js').BrainArbiter | undefined;
|
|
56
|
+
}
|
|
57
|
+
export { TIMEOUT_PREEMPT_FRACTION } from './subagent-budget.js';
|
|
58
|
+
/**
|
|
59
|
+
* Wire the coordinator's `task.completed` event into the Director's
|
|
60
|
+
* in-memory wait table, the on-disk state checkpoint, and the session
|
|
61
|
+
* JSONL event stream.
|
|
62
|
+
*
|
|
63
|
+
* Mirrors coordinator completion events into:
|
|
64
|
+
* - `d.completed` (capped at `Director.MAX_COMPLETED`, oldest-first trim)
|
|
65
|
+
* - `d.taskWaiters` (resolve and clear the matching waiter)
|
|
66
|
+
* - `d.stateCheckpoint.recordTaskStatus(...)` + `setUsage(...)`
|
|
67
|
+
* - session event stream via `d.appendSessionEvent(...)`
|
|
68
|
+
* - fleet manifest via `d.fleetManager?.flushManifest()` or `d.scheduleManifest()`
|
|
69
|
+
*
|
|
70
|
+
* Returns the listener so the Director can call `coordinator.off(...)`
|
|
71
|
+
* during `shutdown()`.
|
|
72
|
+
*/
|
|
73
|
+
export declare function wireTaskCompletedListener(d: DirectorInternals): (payload: {
|
|
74
|
+
task: TaskSpec;
|
|
75
|
+
result: TaskResult;
|
|
76
|
+
}) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Wire the FleetBus's `budget.threshold_reached` filter with the
|
|
79
|
+
* Director's auto-extend/deny policy. Implements:
|
|
80
|
+
*
|
|
81
|
+
* - Heartbeat-driven timeout policy: while a subagent keeps executing
|
|
82
|
+
* tools it never dies on time; once it stops making progress between
|
|
83
|
+
* grants, deny. Wall-clock time alone is never a reliable "stuck" signal.
|
|
84
|
+
* - Per-kind auto-extension with `maxBudgetExtensions` cap.
|
|
85
|
+
* - Brain-decision routing when a brain arbiter is configured.
|
|
86
|
+
* - Collab-subagent passthrough (BugHunter / RefactorPlanner / Critic
|
|
87
|
+
* own their own budget routing via the CollabSession).
|
|
88
|
+
*/
|
|
89
|
+
export declare function wireBudgetHandler(d: DirectorInternals): void;
|
|
90
|
+
//# sourceMappingURL=director-construction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"director-construction.d.ts","sourceRoot":"","sources":["../../src/coordination/director-construction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEpE,gFAAgF;AAChF,eAAO,MAAM,aAAa,QAAS,CAAC;AAEpC;;;;;;;8EAO8E;AAC9E,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,yBAAyB,EAAE,UAAU,CAAC,CAAC;IACrE,WAAW,EAAE,GAAG,CACd,MAAM,EACN;QAAE,OAAO,EAAE,OAAO,CAAC,OAAO,yBAAyB,EAAE,UAAU,CAAC,CAAC;QAAC,OAAO,EAAE,CAAC,CAAC,EAAE,OAAO,yBAAyB,EAAE,UAAU,KAAK,IAAI,CAAA;KAAE,CACvI,CAAC;IACF,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe,EAAE,OAAO,8BAA8B,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACvF,KAAK,EAAE,OAAO,gBAAgB,EAAE,oBAAoB,CAAC;IACrD,YAAY,EAAE,OAAO,oBAAoB,EAAE,YAAY,GAAG,SAAS,CAAC;IACpE,KAAK,EAAE,OAAO,gBAAgB,EAAE,QAAQ,CAAC;IACzC,WAAW,EAAE,OAAO,mBAAmB,EAAE,YAAY,CAAC;IACtD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1G,kBAAkB,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,qBAAqB,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnH,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,KAAK,EAAE,OAAO,YAAY,EAAE,YAAY,GAAG,SAAS,CAAC;CACtD;AAyBD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAShE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,iBAAiB,GAAG,CAAC,OAAO,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,KAAK,IAAI,CAiEzH;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,iBAAiB,GAAG,IAAI,CA8J5D"}
|