@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,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChangeManager — autonomous code change lifecycle management.
|
|
3
|
+
*
|
|
4
|
+
* Manages the full lifecycle of proposed code changes:
|
|
5
|
+
* PROPOSE → REVIEW (consensus) → APPLY → VERIFY → (ROLLBACK on failure)
|
|
6
|
+
*
|
|
7
|
+
* The manager does NOT write files directly — it publishes change nodes to the
|
|
8
|
+
* KnowledgeGraph and uses the ConsensusProtocol for approvals. File mutations
|
|
9
|
+
* are performed by agents acting on approved change nodes.
|
|
10
|
+
*
|
|
11
|
+
* Quality gates run automatically before approval:
|
|
12
|
+
* - Tests must pass (or be explicitly waived)
|
|
13
|
+
* - TypeScript must compile
|
|
14
|
+
* - No new critical/high security findings
|
|
15
|
+
* - Lint must pass (or be explicitly ignored)
|
|
16
|
+
*
|
|
17
|
+
* Rollback: on failure detection, the manager can propose a rollback change
|
|
18
|
+
* that reverses the applied change. Rollback changes also go through consensus.
|
|
19
|
+
*
|
|
20
|
+
* @module change-manager
|
|
21
|
+
*/
|
|
22
|
+
import type { ChangeNode, QualityGateResult } from './knowledge-graph.js';
|
|
23
|
+
import type { KnowledgeGraph } from './knowledge-graph.js';
|
|
24
|
+
import type { ConsensusProtocol } from './consensus-protocol.js';
|
|
25
|
+
import type { FleetBus } from './fleet-bus.js';
|
|
26
|
+
export interface ChangeFile {
|
|
27
|
+
path: string;
|
|
28
|
+
action: 'create' | 'modify' | 'delete';
|
|
29
|
+
/** For modify: unified diff string */
|
|
30
|
+
diff?: string;
|
|
31
|
+
/** For create/modify: full file content */
|
|
32
|
+
content?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ChangeProposal {
|
|
35
|
+
title: string;
|
|
36
|
+
description: string;
|
|
37
|
+
files: ChangeFile[];
|
|
38
|
+
proposedBy: string;
|
|
39
|
+
satisfiesGoals: string[];
|
|
40
|
+
tags: string[];
|
|
41
|
+
/** Quality gate waivers (e.g., ['no-tests', 'lint-errors']) */
|
|
42
|
+
waivers?: string[];
|
|
43
|
+
/** Skip consensus vote (for automated/internal refactors only) */
|
|
44
|
+
skipVote?: boolean;
|
|
45
|
+
}
|
|
46
|
+
export interface ApplyResult {
|
|
47
|
+
changeId: string;
|
|
48
|
+
success: boolean;
|
|
49
|
+
appliedAt: string;
|
|
50
|
+
filesTouched: string[];
|
|
51
|
+
verificationResult?: QualityGateResult;
|
|
52
|
+
rollbackChangeId?: string | undefined;
|
|
53
|
+
error?: string | undefined;
|
|
54
|
+
}
|
|
55
|
+
export interface RollbackResult {
|
|
56
|
+
originalChangeId: string;
|
|
57
|
+
rollbackChangeId: string;
|
|
58
|
+
success: boolean;
|
|
59
|
+
rolledBackAt: string;
|
|
60
|
+
error?: string;
|
|
61
|
+
}
|
|
62
|
+
/** Quality checks performed before applying a change. */
|
|
63
|
+
export interface QualityGateChecks {
|
|
64
|
+
runTests: boolean;
|
|
65
|
+
runTypecheck: boolean;
|
|
66
|
+
runLint: boolean;
|
|
67
|
+
runSecurityScan: boolean;
|
|
68
|
+
checkTestCoverage: boolean;
|
|
69
|
+
minCoveragePercent?: number;
|
|
70
|
+
}
|
|
71
|
+
export interface ChangeManagerOptions {
|
|
72
|
+
graph: KnowledgeGraph;
|
|
73
|
+
consensus: ConsensusProtocol;
|
|
74
|
+
fleet?: FleetBus | undefined;
|
|
75
|
+
checks?: Partial<QualityGateChecks> | undefined;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Default quality gate: tests + typecheck + security scan.
|
|
79
|
+
* Lint and coverage are informational warnings, not blockers.
|
|
80
|
+
*/
|
|
81
|
+
export declare const DEFAULT_QUALITY_CHECKS: QualityGateChecks;
|
|
82
|
+
/**
|
|
83
|
+
* ChangeManager orchestrates the full change lifecycle.
|
|
84
|
+
*
|
|
85
|
+
* ## Workflow
|
|
86
|
+
* ```
|
|
87
|
+
* propose() → knowledge graph (proposed)
|
|
88
|
+
* → consensus.vote() (approved/rejected)
|
|
89
|
+
* → apply() → knowledge graph (applied)
|
|
90
|
+
* → verify() → on failure: proposeRollback()
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
export declare class ChangeManager {
|
|
94
|
+
private readonly graph;
|
|
95
|
+
private readonly consensus;
|
|
96
|
+
private readonly fleet?;
|
|
97
|
+
private readonly checks;
|
|
98
|
+
/** Track applied changes for rollback lookup. */
|
|
99
|
+
private readonly appliedChanges;
|
|
100
|
+
constructor(opts: ChangeManagerOptions);
|
|
101
|
+
/**
|
|
102
|
+
* Propose a new code change. Creates a ChangeNode in the knowledge graph.
|
|
103
|
+
* Does NOT automatically initiate voting — call `submitForReview()` for that.
|
|
104
|
+
*/
|
|
105
|
+
propose(input: ChangeProposal): Promise<ChangeNode>;
|
|
106
|
+
/**
|
|
107
|
+
* Submit an approved change for application.
|
|
108
|
+
* Returns the change node — actual file mutations are performed by agents
|
|
109
|
+
* acting on this node's data from the knowledge graph.
|
|
110
|
+
*/
|
|
111
|
+
submitForReview(changeId: string): Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Apply an approved change. Updates the change node to 'applied'.
|
|
114
|
+
* Agents should watch for 'applied' status and perform the actual file mutations.
|
|
115
|
+
*/
|
|
116
|
+
markApplied(changeId: string, appliedAt: string): Promise<ChangeNode | null>;
|
|
117
|
+
/**
|
|
118
|
+
* Mark a change as applied and trigger rollback for any satisfied goal
|
|
119
|
+
* that turns out to be broken.
|
|
120
|
+
*/
|
|
121
|
+
markAppliedWithVerification(changeId: string, verify: () => Promise<QualityGateResult>): Promise<ApplyResult>;
|
|
122
|
+
/**
|
|
123
|
+
* Propose a rollback for an applied change. Creates a new change that
|
|
124
|
+
* reverses the original. Goes through full consensus.
|
|
125
|
+
*/
|
|
126
|
+
proposeRollback(appliedChangeId: string, reason: string): Promise<ChangeNode | null>;
|
|
127
|
+
/**
|
|
128
|
+
* Mark a change as rolled back.
|
|
129
|
+
*/
|
|
130
|
+
markRolledBack(changeId: string, rolledBackAt: string): Promise<ChangeNode | null>;
|
|
131
|
+
getPendingReviews(): ChangeNode[];
|
|
132
|
+
getAppliedChanges(): ChangeNode[];
|
|
133
|
+
getChange(id: string): ChangeNode | undefined;
|
|
134
|
+
getChangesForGoal(goalId: string): ChangeNode[];
|
|
135
|
+
/**
|
|
136
|
+
* Run quality gate checks. This is informational — actual test/lint/typecheck
|
|
137
|
+
* execution is done by agents spawned for this purpose. This method stores
|
|
138
|
+
* the result in the change node.
|
|
139
|
+
*/
|
|
140
|
+
private _runQualityGate;
|
|
141
|
+
/**
|
|
142
|
+
* Update quality gate result for a change. Called by verify agents
|
|
143
|
+
* after running their checks.
|
|
144
|
+
*/
|
|
145
|
+
updateQualityGate(changeId: string, checkName: string, result: {
|
|
146
|
+
passed: boolean;
|
|
147
|
+
detail?: string;
|
|
148
|
+
}): Promise<void>;
|
|
149
|
+
private _emit;
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=change-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-manager.d.ts","sourceRoot":"","sources":["../../src/coordination/change-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACvC,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,E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-state.js';
|
|
2
|
+
import type { TaskResult } from '../types/multi-agent.js';
|
|
3
|
+
import type { SessionWriter } from '../types/session.js';
|
|
4
|
+
/**
|
|
5
|
+
* Narrow interface the helpers in this file need from the Director.
|
|
6
|
+
* Kept here (instead of importing the full Director class) to avoid a
|
|
7
|
+
* circular import: director.ts re-exports the helpers.
|
|
8
|
+
*/
|
|
9
|
+
export interface DirectorCheckpointHost {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly manifestPath?: string | undefined;
|
|
12
|
+
readonly manifestDebounceMs: number;
|
|
13
|
+
readonly stateCheckpoint: DirectorStateCheckpoint | null;
|
|
14
|
+
readonly sessionWriter: SessionWriter | null;
|
|
15
|
+
readonly usage: {
|
|
16
|
+
snapshot(): unknown;
|
|
17
|
+
};
|
|
18
|
+
/** The set of { subagentId, taskIds, ... } manifest rows. */
|
|
19
|
+
readonly manifestEntries: Map<string, unknown>;
|
|
20
|
+
/** Final status of completed tasks, indexed by taskId. */
|
|
21
|
+
readonly completed: Map<string, TaskResult>;
|
|
22
|
+
/**
|
|
23
|
+
* Called from async failure paths in the manifest writer — when the
|
|
24
|
+
* debounced flush or atomic write fails. Implementations funnel
|
|
25
|
+
* through `process.emitWarning` so the director can be torn down
|
|
26
|
+
* even when manifests are unwritable.
|
|
27
|
+
*/
|
|
28
|
+
logShutdownError(phase: string, err: unknown): void;
|
|
29
|
+
}
|
|
30
|
+
/** Best-effort session-writer append. Swallows failures — the director
|
|
31
|
+
* must not break a fleet run because the session JSONL handle closed. */
|
|
32
|
+
export declare function appendSessionEvent(host: DirectorCheckpointHost, event: Parameters<SessionWriter['append']>[0]): Promise<void>;
|
|
33
|
+
/** Debounced manifest writer. A burst of spawn/assign/complete events
|
|
34
|
+
* collapses into one write. Set `manifestDebounceMs` to 0 to write
|
|
35
|
+
* synchronously (no debounce); set to negative to disable entirely.
|
|
36
|
+
*
|
|
37
|
+
* Returns the new `setTimeout` handle (or `null` if no timer was
|
|
38
|
+
* scheduled) so the caller can cancel it on shutdown. */
|
|
39
|
+
export declare function scheduleManifest(host: DirectorCheckpointHost): NodeJS.Timeout | null;
|
|
40
|
+
/**
|
|
41
|
+
* Write the fleet manifest to `manifestPath`. Returns the path written
|
|
42
|
+
* or null when no path was configured. Captures every spawn + its
|
|
43
|
+
* assigned tasks — paired with per-subagent JSONLs, this is enough to
|
|
44
|
+
* replay an entire director run.
|
|
45
|
+
*/
|
|
46
|
+
export declare function writeManifest(host: DirectorCheckpointHost): Promise<string | null>;
|
|
47
|
+
/** Push a snapshot into the on-disk checkpoint (delegated). */
|
|
48
|
+
export declare function setCheckpointState(host: DirectorCheckpointHost, snapshot: DirectorStateSnapshot): void;
|
|
49
|
+
/**
|
|
50
|
+
* Attempt to acquire the checkpoint lock. Must be called before
|
|
51
|
+
* resuming — if another director process is alive, this returns
|
|
52
|
+
* false and the caller should not proceed with the resume.
|
|
53
|
+
*/
|
|
54
|
+
export declare function acquireCheckpointLock(host: DirectorCheckpointHost): Promise<boolean>;
|
|
55
|
+
/**
|
|
56
|
+
* Resume from a prior checkpoint snapshot (loaded via
|
|
57
|
+
* `loadDirectorState()`). Re-attach to the fleet mid-flight so
|
|
58
|
+
* subsequent spawn/assign calls update the checkpoint normally.
|
|
59
|
+
*/
|
|
60
|
+
export declare function resumeFromCheckpoint(host: DirectorCheckpointHost, snapshot: DirectorStateSnapshot): void;
|
|
61
|
+
//# sourceMappingURL=checkpoint-wiring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkpoint-wiring.d.ts","sourceRoot":"","sources":["../../src/coordination/checkpoint-wiring.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD;;;;GAIG;AACH,MAAM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AC,OAAO,CAAC,CAE1F;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,sBAAsB,EAC5B,QAAQ,EAAE,qBAAqB,GAC9B,IAAI,CAEN"}
|
|
@@ -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
|
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