@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,229 @@
|
|
|
1
|
+
export type NodeType = 'fact' | 'goal' | 'decision' | 'change' | 'vote';
|
|
2
|
+
export type FactCategory = 'bug' | 'refactor' | 'security' | 'test' | 'perf' | 'deps' | 'architecture' | 'quality';
|
|
3
|
+
export type GoalStatus = 'pending' | 'in_progress' | 'blocked' | 'done' | 'failed';
|
|
4
|
+
export type GoalPriority = 'critical' | 'high' | 'medium' | 'low';
|
|
5
|
+
export type ChangeStatus = 'proposed' | 'approved' | 'rejected' | 'applied' | 'rolled_back';
|
|
6
|
+
export type VoteValue = 'approve' | 'reject' | 'abstain';
|
|
7
|
+
export type DecisionType = 'spawn' | 'assign' | 'approve_change' | 'reject_change' | 'escalate' | 'rollback' | 'merge_results';
|
|
8
|
+
export interface FactNode {
|
|
9
|
+
id: string;
|
|
10
|
+
type: 'fact';
|
|
11
|
+
category: FactCategory;
|
|
12
|
+
subject: string;
|
|
13
|
+
detail: string;
|
|
14
|
+
file?: string;
|
|
15
|
+
line?: number;
|
|
16
|
+
severity?: 'critical' | 'high' | 'medium' | 'low';
|
|
17
|
+
discoveredBy: string;
|
|
18
|
+
discoveredAt: string;
|
|
19
|
+
tags: string[];
|
|
20
|
+
/** Stable key — dedup facts about the same subject */
|
|
21
|
+
key: string;
|
|
22
|
+
/** References to other nodes this fact relates to */
|
|
23
|
+
related: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface GoalNode {
|
|
26
|
+
id: string;
|
|
27
|
+
type: 'goal';
|
|
28
|
+
title: string;
|
|
29
|
+
description: string;
|
|
30
|
+
status: GoalStatus;
|
|
31
|
+
priority: GoalPriority;
|
|
32
|
+
assignee?: string;
|
|
33
|
+
blockedBy: string[];
|
|
34
|
+
dependsOn: string[];
|
|
35
|
+
createdBy: string;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
updatedAt: string;
|
|
38
|
+
tags: string[];
|
|
39
|
+
/** Sub-goals spawned from this goal */
|
|
40
|
+
children: string[];
|
|
41
|
+
/** The top-level goal this belongs to (for hierarchy) */
|
|
42
|
+
parentGoal?: string;
|
|
43
|
+
result?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface DecisionNode {
|
|
46
|
+
id: string;
|
|
47
|
+
type: 'decision';
|
|
48
|
+
decisionType: DecisionType;
|
|
49
|
+
question: string;
|
|
50
|
+
options: {
|
|
51
|
+
id: string;
|
|
52
|
+
label: string;
|
|
53
|
+
risk?: string;
|
|
54
|
+
}[];
|
|
55
|
+
chosen: string;
|
|
56
|
+
rationale: string;
|
|
57
|
+
madeBy: string;
|
|
58
|
+
madeAt: string;
|
|
59
|
+
context?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface ChangeNode {
|
|
62
|
+
id: string;
|
|
63
|
+
type: 'change';
|
|
64
|
+
title: string;
|
|
65
|
+
description: string;
|
|
66
|
+
files: {
|
|
67
|
+
path: string;
|
|
68
|
+
action: 'create' | 'modify' | 'delete';
|
|
69
|
+
}[];
|
|
70
|
+
status: ChangeStatus;
|
|
71
|
+
proposedBy: string;
|
|
72
|
+
proposedAt: string;
|
|
73
|
+
approvedBy: string[];
|
|
74
|
+
rejectedBy: string[];
|
|
75
|
+
appliedAt?: string;
|
|
76
|
+
rolledBackAt?: string;
|
|
77
|
+
rollbackReason?: string;
|
|
78
|
+
votes: VoteRecord[];
|
|
79
|
+
qualityGate: QualityGateResult;
|
|
80
|
+
/** Goals satisfied by this change */
|
|
81
|
+
satisfiesGoals: string[];
|
|
82
|
+
}
|
|
83
|
+
export interface VoteRecord {
|
|
84
|
+
agentId: string;
|
|
85
|
+
agentName: string;
|
|
86
|
+
value: VoteValue;
|
|
87
|
+
rationale?: string | undefined;
|
|
88
|
+
votedAt: string;
|
|
89
|
+
}
|
|
90
|
+
export interface QualityGateResult {
|
|
91
|
+
passed: boolean;
|
|
92
|
+
checks: QualityCheck[];
|
|
93
|
+
}
|
|
94
|
+
export interface QualityCheck {
|
|
95
|
+
name: string;
|
|
96
|
+
passed: boolean;
|
|
97
|
+
detail?: string;
|
|
98
|
+
}
|
|
99
|
+
export interface VoteNode {
|
|
100
|
+
id: string;
|
|
101
|
+
type: 'vote';
|
|
102
|
+
changeId: string;
|
|
103
|
+
voterId: string;
|
|
104
|
+
voterName: string;
|
|
105
|
+
value: VoteValue;
|
|
106
|
+
rationale?: string;
|
|
107
|
+
votedAt: string;
|
|
108
|
+
}
|
|
109
|
+
export type GraphNode = FactNode | GoalNode | DecisionNode | ChangeNode | VoteNode;
|
|
110
|
+
export interface GraphSubscription {
|
|
111
|
+
id: string;
|
|
112
|
+
agentId: string;
|
|
113
|
+
/** JSONPath-like filter */
|
|
114
|
+
filter: NodeFilter;
|
|
115
|
+
/** Channel for this specific subscription */
|
|
116
|
+
channel: string;
|
|
117
|
+
}
|
|
118
|
+
export interface NodeFilter {
|
|
119
|
+
type?: NodeType;
|
|
120
|
+
category?: FactCategory;
|
|
121
|
+
status?: GoalStatus | ChangeStatus;
|
|
122
|
+
tags?: string[];
|
|
123
|
+
assignee?: string;
|
|
124
|
+
discoveredBy?: string;
|
|
125
|
+
proposedBy?: string;
|
|
126
|
+
/** Only nodes added after this timestamp */
|
|
127
|
+
since?: string;
|
|
128
|
+
}
|
|
129
|
+
export declare class KnowledgeGraph {
|
|
130
|
+
private readonly nodes;
|
|
131
|
+
private readonly index;
|
|
132
|
+
private readonly subs;
|
|
133
|
+
private readonly pendingDeliveries;
|
|
134
|
+
private readonly filePath;
|
|
135
|
+
private readonly graphFilePath;
|
|
136
|
+
private readonly maxNodes;
|
|
137
|
+
/**
|
|
138
|
+
* Stable per-node insertion sequence. `nodes` (a Map) preserves insertion
|
|
139
|
+
* order even across `update()` (Map.set on an existing key keeps its slot),
|
|
140
|
+
* but the type index's `Set<string>` does NOT — `update()` removes then
|
|
141
|
+
* re-adds a node's id, moving it to the set's tail. Index-routed queries sort
|
|
142
|
+
* by this sequence so they return nodes in creation order, matching the old
|
|
143
|
+
* `nodes.values()` scan that callers like decision-history `slice(-10)` rely on.
|
|
144
|
+
*/
|
|
145
|
+
private readonly seq;
|
|
146
|
+
private seqCounter;
|
|
147
|
+
/** Assign a stable insertion sequence the first time a node id is seen. */
|
|
148
|
+
private _trackSeq;
|
|
149
|
+
/** Exposed for unit-testing only: read current index contents. */
|
|
150
|
+
getIndex(): ReadonlyMap<string, ReadonlySet<string>>;
|
|
151
|
+
constructor(sessionDir: string, maxNodes?: number);
|
|
152
|
+
/**
|
|
153
|
+
* Add a node. Fires to all matching subscriptions synchronously.
|
|
154
|
+
* Returns the node with its assigned id.
|
|
155
|
+
*/
|
|
156
|
+
add(node: Omit<GraphNode, 'id'>): Promise<GraphNode>;
|
|
157
|
+
/** Update an existing node by id. Returns updated node or null if not found. */
|
|
158
|
+
update(id: string, patch: Partial<GraphNode>): Promise<GraphNode | null>;
|
|
159
|
+
/**
|
|
160
|
+
* True when the node is in a terminal / settled state — no future mutations
|
|
161
|
+
* are expected. Such nodes are the first to be evicted when the in-memory
|
|
162
|
+
* cap is reached. The JSONL file on disk retains the full history.
|
|
163
|
+
*/
|
|
164
|
+
private static _isTerminal;
|
|
165
|
+
/**
|
|
166
|
+
* Evict oldest terminal-state nodes when the in-memory cap is exceeded.
|
|
167
|
+
* The JSONL file is the authoritative record; eviction only affects memory.
|
|
168
|
+
*/
|
|
169
|
+
private _prune;
|
|
170
|
+
get(id: string): GraphNode | undefined;
|
|
171
|
+
getAll(filter?: NodeFilter): GraphNode[];
|
|
172
|
+
getGoals(filter?: Partial<{
|
|
173
|
+
status: GoalStatus;
|
|
174
|
+
assignee: string;
|
|
175
|
+
priority: GoalPriority;
|
|
176
|
+
}>): GoalNode[];
|
|
177
|
+
getFacts(filter?: Partial<{
|
|
178
|
+
category: FactCategory;
|
|
179
|
+
severity: string;
|
|
180
|
+
}>): FactNode[];
|
|
181
|
+
getChanges(filter?: Partial<{
|
|
182
|
+
status: ChangeStatus;
|
|
183
|
+
}>): ChangeNode[];
|
|
184
|
+
getOpenGoals(): GoalNode[];
|
|
185
|
+
getTopLevelGoals(): GoalNode[];
|
|
186
|
+
getBlockedGoals(): GoalNode[];
|
|
187
|
+
getPendingChanges(): ChangeNode[];
|
|
188
|
+
getDecisions(since?: string): DecisionNode[];
|
|
189
|
+
searchFacts(query: string): FactNode[];
|
|
190
|
+
getRelatedFacts(factId: string): FactNode[];
|
|
191
|
+
/**
|
|
192
|
+
* Subscribe to nodes matching a filter. Returns a channel id that can be
|
|
193
|
+
* used to poll for new nodes since the last check.
|
|
194
|
+
*/
|
|
195
|
+
subscribe(agentId: string, filter: NodeFilter): string;
|
|
196
|
+
/**
|
|
197
|
+
* Poll for new nodes delivered to a channel since last check.
|
|
198
|
+
* Clears the delivery buffer after reading.
|
|
199
|
+
*/
|
|
200
|
+
poll(channel: string): GraphNode[];
|
|
201
|
+
unsubscribe(channel: string): void;
|
|
202
|
+
/**
|
|
203
|
+
* Create a quality gate result. Call this when a change is being proposed
|
|
204
|
+
* so the change node carries the gate result.
|
|
205
|
+
*/
|
|
206
|
+
static makeQualityGate(checks: {
|
|
207
|
+
name: string;
|
|
208
|
+
passed: boolean;
|
|
209
|
+
detail?: string;
|
|
210
|
+
}[]): QualityGateResult;
|
|
211
|
+
/** Pure: compute the set of index keys a node would belong to. */
|
|
212
|
+
private _indexKeys;
|
|
213
|
+
/** Mutate the index: add a node's id to every set for the given keys. */
|
|
214
|
+
private _addToIndex;
|
|
215
|
+
/** Remove a node's id from all index sets for the given keys. */
|
|
216
|
+
private _removeFromIndex;
|
|
217
|
+
private _matches;
|
|
218
|
+
private _deliver;
|
|
219
|
+
private _persist;
|
|
220
|
+
private _append;
|
|
221
|
+
/** Rebuild in-memory state from the log file. Call on startup. */
|
|
222
|
+
load(): Promise<void>;
|
|
223
|
+
/** Snapshot for serialization. */
|
|
224
|
+
snapshot(): {
|
|
225
|
+
nodes: GraphNode[];
|
|
226
|
+
subs: number;
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
//# sourceMappingURL=knowledge-graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge-graph.d.ts","sourceRoot":"","sources":["../../src/coordination/knowledge-graph.ts"],"names":[],"mappings":"AA0BA,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;AAExE,MAAM,MAAM,YAAY,GACpB,KAAK,GACL,UAAU,GACV,UAAU,GACV,MAAM,GACN,MAAM,GACN,MAAM,GACN,cAAc,GACd,SAAS,CAAC;AAEd,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,MAAM,GA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,GAC3D,iBAAiB,CAEnB;IAID,kEAAkE;IAClE,OAAO,CAAC,UAAU;IAgClB,yEAAyE;IACzE,OAAO,CAAC,WAAW;IAQnB,iEAAiE;IACjE,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,QAAQ;IAoBhB,OAAO,CAAC,QAAQ;YASF,QAAQ;YAQR,OAAO;IAQrB,kEAAkE;IAC5D,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CA0B1B;IAED,kCAAkC;IAClC,QAAQ,IAAI;QAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAK/C;CACF"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LargeAnswerStore — prevents `ask_subagent` results from bloating the
|
|
3
|
+
* director's context window.
|
|
4
|
+
*
|
|
5
|
+
* Problem: `ask_subagent` returns full subagent responses as tool_result
|
|
6
|
+
* content. A single response can be 10-50K+ tokens. When the director
|
|
7
|
+
* calls `ask` multiple times, these accumulate in ctx.messages and can
|
|
8
|
+
* push context pressure past 100%, causing provider overflow errors or
|
|
9
|
+
* silent quality degradation.
|
|
10
|
+
*
|
|
11
|
+
* Solution: responses above `sizeThreshold` chars are stored here
|
|
12
|
+
* (in-memory Map keyed by stable id). The tool result returns only a
|
|
13
|
+
* compact summary + the store key. Callers retrieve the full result
|
|
14
|
+
* via `retrieveAnswer(key)` when they need it.
|
|
15
|
+
*
|
|
16
|
+
* The store is scoped to a single Director.run() lifecycle.
|
|
17
|
+
* It is NOT persisted — if the process crashes the results are lost,
|
|
18
|
+
* which is acceptable since the subagent already finished and the
|
|
19
|
+
* summary is in context.
|
|
20
|
+
*/
|
|
21
|
+
export interface AnswerEntry {
|
|
22
|
+
key: string;
|
|
23
|
+
value: unknown;
|
|
24
|
+
size: number;
|
|
25
|
+
storedAt: number;
|
|
26
|
+
}
|
|
27
|
+
export declare class LargeAnswerStore {
|
|
28
|
+
/**
|
|
29
|
+
* Responses above this size (in characters) are stored out-of-context.
|
|
30
|
+
* Below this, the full answer is returned inline (no overhead).
|
|
31
|
+
* Default: 2000 chars ≈ 400-600 tokens.
|
|
32
|
+
*/
|
|
33
|
+
readonly sizeThreshold: number;
|
|
34
|
+
private readonly store;
|
|
35
|
+
constructor(sizeThreshold?: number);
|
|
36
|
+
/**
|
|
37
|
+
* Store a value, returning a summary + key for inline use.
|
|
38
|
+
* If the value is below sizeThreshold, returns it as-is (no store entry).
|
|
39
|
+
*/
|
|
40
|
+
storeAnswer(value: unknown): {
|
|
41
|
+
key?: string | undefined;
|
|
42
|
+
summary: string;
|
|
43
|
+
inline: boolean;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Retrieve a previously stored answer by its key.
|
|
47
|
+
* Returns undefined if the key is unknown or the store was cleared.
|
|
48
|
+
*/
|
|
49
|
+
retrieveAnswer(key: string): unknown | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Check if a key exists in the store.
|
|
52
|
+
*/
|
|
53
|
+
hasAnswer(key: string): boolean;
|
|
54
|
+
/** Number of stored entries. */
|
|
55
|
+
get size(): number;
|
|
56
|
+
/** Total characters stored. */
|
|
57
|
+
get totalChars(): number;
|
|
58
|
+
/** Clear all stored entries. Call at the end of a director run. */
|
|
59
|
+
clear(): void;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=large-answer-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"large-answer-store.d.ts","sourceRoot":"","sources":["../../src/coordination/large-answer-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,gBAAgB;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAE/B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkC;IAExD,YAAY,aAAa,SAAO,EAE/B;IAED;;;OAGG;IACH,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG;QAAE,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CA4B1F;IAED;;;OAGG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAE/C;IAED;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE9B;IAED,gCAAgC;IAChC,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,+BAA+B;IAC/B,IAAI,UAAU,IAAI,MAAM,CAIvB;IAED,mEAAmE;IACnE,KAAK,IAAI,IAAI,CAEZ;CACF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mail-tools — thin, high-affordance wrappers over the project mailbox.
|
|
3
|
+
*
|
|
4
|
+
* These are the PREFERRED mailbox tools for agents. The multi-action `mailbox`
|
|
5
|
+
* tool is the low-level power surface for advanced queries and agent status;
|
|
6
|
+
* `mail_send` and `mail_inbox` exist because explicit verbs ("send a mail",
|
|
7
|
+
* "read my inbox") are what makes agents USE the mailbox autonomously — a model
|
|
8
|
+
* reaches for `mail_send` mid-task far more readily than for
|
|
9
|
+
* `mailbox action=send ...`.
|
|
10
|
+
*
|
|
11
|
+
* mail_send — message one agent (`to: "leader@a1b2c3d4"`), every leader
|
|
12
|
+
* (`to: "leader"`), or everyone (`to: "*"`)
|
|
13
|
+
* mail_inbox — read unread mail (unique id + base alias + broadcasts),
|
|
14
|
+
* marking it read so it isn't re-injected next iteration
|
|
15
|
+
*
|
|
16
|
+
* Both share the identity convention with the agent-loop checker
|
|
17
|
+
* (`<base>@<sessionTag>`, see mailbox-attach) via `resolveMailboxIdentity`.
|
|
18
|
+
*
|
|
19
|
+
* @module mail-tools
|
|
20
|
+
*/
|
|
21
|
+
import type { EventBus } from '../kernel/events.js';
|
|
22
|
+
import type { Tool } from '../types/tool.js';
|
|
23
|
+
import { type MailboxResolver } from './mailbox-tool.js';
|
|
24
|
+
export interface MailToolsOptions {
|
|
25
|
+
/** How to obtain a Mailbox given the execution Context (tests). */
|
|
26
|
+
resolveMailbox?: MailboxResolver | undefined;
|
|
27
|
+
/** Project dir for the shared mailbox. Prefer wpaths.projectDir. */
|
|
28
|
+
projectDir?: string | undefined;
|
|
29
|
+
/** EventBus for mailbox.agent_registered / heartbeat surface events. */
|
|
30
|
+
events?: EventBus | undefined;
|
|
31
|
+
}
|
|
32
|
+
export declare function makeMailSendTool(opts?: MailToolsOptions): Tool;
|
|
33
|
+
export declare function makeMailInboxTool(opts?: MailToolsOptions): Tool;
|
|
34
|
+
//# sourceMappingURL=mail-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mail-tools.d.ts","sourceRoot":"","sources":["../../src/coordination/mail-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAK7C,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,gBAAgB;IAC/B,mEAAmE;IACnE,cAAc,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;IAC7C,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,wEAAwE;IACxE,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CAC/B;AA4BD,wBAAgB,gBAAgB,CAAC,IAAI,GAAE,gBAAqB,GAAG,IAAI,CAyElE;AAED,wBAAgB,iBAAiB,CAAC,IAAI,GAAE,gBAAqB,GAAG,IAAI,CAiGnE"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mailbox message action helpers.
|
|
3
|
+
*
|
|
4
|
+
* Declares the {@link MailboxMessageAction} union (the verb that a user
|
|
5
|
+
* or agent issues against a single message) and the per-action input
|
|
6
|
+
* shapes. The implementations live on `GlobalMailbox`:
|
|
7
|
+
* - `mark-read` / `acknowledge` / `reopen` → {@link GlobalMailbox.ack}
|
|
8
|
+
* / {@link GlobalMailbox.ackMany}
|
|
9
|
+
* - `soft-delete` → {@link GlobalMailbox.softDelete}
|
|
10
|
+
* - `restore` → {@link GlobalMailbox.restore}
|
|
11
|
+
*
|
|
12
|
+
* Keeping the verb+input types in their own file means the WebUI client
|
|
13
|
+
* and the server route handlers can import them independently of the
|
|
14
|
+
* `GlobalMailbox` implementation, and a future "message actions" CLI
|
|
15
|
+
* subcommand only has to add one verb to a single place.
|
|
16
|
+
*/
|
|
17
|
+
import type { MailboxAckInput, MailboxMessage } from './mailbox-types.js';
|
|
18
|
+
/**
|
|
19
|
+
* High-level verbs the WebUI/server route handlers expose. The
|
|
20
|
+
* mapping to underlying `MailboxAckInput` is straightforward:
|
|
21
|
+
* - `mark-read` → `ack({ read: true, completed: false })`
|
|
22
|
+
* - `acknowledge`→ `ack({ read: true, completed: true })`
|
|
23
|
+
* - `reopen` → `ack({ read: false, completed: false })`
|
|
24
|
+
* - `soft-delete`→ not an `ack` — a separate `Mailbox.softDelete()`
|
|
25
|
+
* that flips `deletedAt` to "now" (recoverable) and is filtered
|
|
26
|
+
* out of the default `query()`.
|
|
27
|
+
* - `restore` → the inverse of `soft-delete`. Undoes a
|
|
28
|
+
* `softDelete` by clearing `deletedAt`.
|
|
29
|
+
*/
|
|
30
|
+
export type MailboxMessageAction = 'mark-read' | 'acknowledge' | 'reopen' | 'soft-delete' | 'restore';
|
|
31
|
+
/** Per-action request body sent from the WebUI → server route. */
|
|
32
|
+
export interface MailboxActionInput {
|
|
33
|
+
action: MailboxMessageAction;
|
|
34
|
+
mailId: string;
|
|
35
|
+
/** Acting agent / user. Required by the server to stamp
|
|
36
|
+
* `readBy` / `completedBy`. */
|
|
37
|
+
readerId: string;
|
|
38
|
+
/** Optional human note (e.g. "triaged — will follow up"). */
|
|
39
|
+
note?: string | undefined;
|
|
40
|
+
/** Optional idempotency key so retried requests don't double-apply
|
|
41
|
+
* the action. Phase 4 wires this through to the CLI. */
|
|
42
|
+
requestId?: string | undefined;
|
|
43
|
+
}
|
|
44
|
+
/** Per-action response. Echoes the action + the resulting message
|
|
45
|
+
* state so the UI can reconcile optimistic updates. */
|
|
46
|
+
export interface MailboxActionResult {
|
|
47
|
+
action: MailboxMessageAction;
|
|
48
|
+
mailId: string;
|
|
49
|
+
/** Updated message snapshot. `null` if the message was already in
|
|
50
|
+
* the target state (e.g. `mark-read` on a message the user has
|
|
51
|
+
* already read) — the WebUI can ignore the result in that case. */
|
|
52
|
+
message: MailboxMessage | null;
|
|
53
|
+
/** True if the action actually mutated state; false if it was a
|
|
54
|
+
* no-op. Lets the WebUI decide whether to update its local copy. */
|
|
55
|
+
changed: boolean;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Convert a high-level action into the underlying
|
|
59
|
+
* {@link MailboxAckInput} the existing `GlobalMailbox.ack` already
|
|
60
|
+
* supports. `soft-delete` and `restore` do NOT go through `ack` —
|
|
61
|
+
* the caller must dispatch them to `GlobalMailbox.softDelete` /
|
|
62
|
+
* `GlobalMailbox.restore` instead. This helper returns `null` for
|
|
63
|
+
* those two so the type signature forces the caller to handle them
|
|
64
|
+
* separately.
|
|
65
|
+
*/
|
|
66
|
+
export declare function actionToAckInput(action: Exclude<MailboxMessageAction, 'soft-delete' | 'restore'>, input: MailboxActionInput): MailboxAckInput;
|
|
67
|
+
//# sourceMappingURL=mailbox-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mailbox-actions.d.ts","sourceRoot":"","sources":["../../src/coordination/mailbox-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAE1E;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,oBAAoB,GAC5B,WAAW,GACX,aAAa,GACb,QAAQ,GACR,aAAa,GACb,SAAS,CAAC;AAEd,kEAAkE;AAClE,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf;oCACgC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;6DACyD;IACzD,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED;wDACwD;AACxD,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf;;wEAEoE;IACpE,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/B;yEACqE;IACrE,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,OAAO,CAAC,oBAAoB,EAAE,aAAa,GAAG,SAAS,CAAC,EAChE,KAAK,EAAE,kBAAkB,GACxB,eAAe,CASjB"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized constants for the mailbox system.
|
|
3
|
+
*
|
|
4
|
+
* Previously these magic numbers were scattered across global-mailbox.ts,
|
|
5
|
+
* mailbox-attach.ts, mailbox-hooks.ts, and mailbox-health.ts. Keeping them
|
|
6
|
+
* in one place ensures every surface agrees on timeouts, intervals, and
|
|
7
|
+
* thresholds — and makes tuning a single-file change.
|
|
8
|
+
*
|
|
9
|
+
* @module mailbox-constants
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Agents without a heartbeat for this long are no longer live and are removed
|
|
13
|
+
* from the registry. Presence registries are not history stores: retaining an
|
|
14
|
+
* offline row makes dead agents and shadow workers look actionable in HQ.
|
|
15
|
+
*/
|
|
16
|
+
export declare const AGENT_STALE_MS = 60000;
|
|
17
|
+
/** Clients without a heartbeat for this long are considered offline. */
|
|
18
|
+
export declare const CLIENT_STALE_MS = 60000;
|
|
19
|
+
/** Heartbeat updates are throttled to at most this interval (per agent/client). */
|
|
20
|
+
export declare const HEARTBEAT_THROTTLE_MS = 5000;
|
|
21
|
+
/**
|
|
22
|
+
* How long a read may be served from the in-process registry cache before
|
|
23
|
+
* re-reading the shared file. Kept well below HEARTBEAT_THROTTLE_MS so
|
|
24
|
+
* cross-process registrations become visible promptly.
|
|
25
|
+
*/
|
|
26
|
+
export declare const REGISTRY_CACHE_TTL_MS = 2000;
|
|
27
|
+
/** JSONL line separator. */
|
|
28
|
+
export declare const LINE_SEPARATOR = "\n";
|
|
29
|
+
/**
|
|
30
|
+
* Soft cap on the in-memory message cache. The cache mirrors the JSONL
|
|
31
|
+
* message file; under normal load it stays well under this. If a pathological
|
|
32
|
+
* mailbox exceeds the cap we fall back to reading from disk rather than
|
|
33
|
+
* holding an unbounded buffer in memory.
|
|
34
|
+
*/
|
|
35
|
+
export declare const MESSAGE_CACHE_MAX_ENTRIES = 10000;
|
|
36
|
+
/** Background mailbox awareness polling interval (cross-process fallback). */
|
|
37
|
+
export declare const MAILBOX_AWARENESS_INTERVAL_MS = 30000;
|
|
38
|
+
/** Agent heartbeat interval in the attach layer. */
|
|
39
|
+
export declare const MAILBOX_HEARTBEAT_INTERVAL_MS = 30000;
|
|
40
|
+
/** Min interval between registry reads for the fleet pulse digest. */
|
|
41
|
+
export declare const PULSE_MIN_READ_INTERVAL_MS = 30000;
|
|
42
|
+
/**
|
|
43
|
+
* Interval at which the background auto-compaction sweep runs.
|
|
44
|
+
* Default: every 5 minutes.
|
|
45
|
+
*/
|
|
46
|
+
export declare const AUTO_COMPACT_INTERVAL_MS = 300000;
|
|
47
|
+
/**
|
|
48
|
+
* Messages that have been read by ALL currently-online agents are eligible
|
|
49
|
+
* for auto-removal after this many milliseconds since the last read.
|
|
50
|
+
* Default: 10 minutes.
|
|
51
|
+
*/
|
|
52
|
+
export declare const AUTO_COMPACT_READ_MAX_AGE_MS = 600000;
|
|
53
|
+
/**
|
|
54
|
+
* Messages whose TTL (time-to-live) has expired are eligible for auto-removal.
|
|
55
|
+
* When a message has `expiresAt` set and that timestamp is in the past, the
|
|
56
|
+
* next compaction sweep drops it. Default TTL for messages without an explicit
|
|
57
|
+
* `expiresAt`: 24 hours.
|
|
58
|
+
*/
|
|
59
|
+
export declare const AUTO_COMPACT_DEFAULT_TTL_MS = 86400000;
|
|
60
|
+
/** Maximum requests per minute from a single external agent (bearer token). */
|
|
61
|
+
export declare const HTTP_RATE_LIMIT_PER_MINUTE = 120;
|
|
62
|
+
/** Window size for the sliding-window rate limiter. */
|
|
63
|
+
export declare const HTTP_RATE_LIMIT_WINDOW_MS = 60000;
|
|
64
|
+
//# sourceMappingURL=mailbox-constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mailbox-constants.d.ts","sourceRoot":"","sources":["../../src/coordination/mailbox-constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;GAIG;AACH,eAAO,MAAM,cAAc,QAAS,CAAC;AAErC,wEAAwE;AACxE,eAAO,MAAM,eAAe,QAAS,CAAC;AAEtC,mFAAmF;AACnF,eAAO,MAAM,qBAAqB,OAAQ,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,OAAQ,CAAC;AAE3C,4BAA4B;AAC5B,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAIhD,8EAA8E;AAC9E,eAAO,MAAM,6BAA6B,QAAS,CAAC;AAEpD,oDAAoD;AACpD,eAAO,MAAM,6BAA6B,QAAS,CAAC;AAEpD,sEAAsE;AACtE,eAAO,MAAM,0BAA0B,QAAS,CAAC;AAIjD;;;GAGG;AACH,eAAO,MAAM,wBAAwB,SAAU,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,SAAU,CAAC;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,WAAa,CAAC;AAItD,+EAA+E;AAC/E,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAE9C,uDAAuD;AACvD,eAAO,MAAM,yBAAyB,QAAS,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MailboxEventEmitter — minimal pub/sub for real-time push to SSE clients.
|
|
3
|
+
*
|
|
4
|
+
* The HTTP bridge uses this to push `send`/`ack`/`delete` events to
|
|
5
|
+
* connected SSE clients without requiring them to poll. Each event is a
|
|
6
|
+
* shallow copy of the relevant data (message id, action, timestamp) —
|
|
7
|
+
* never the full mailbox state.
|
|
8
|
+
*
|
|
9
|
+
* The emitter is intentionally simple: a Set of listeners, add/remove,
|
|
10
|
+
* and emit. No buffering, no replay — if a client connects after a send,
|
|
11
|
+
* it won't receive past events (it should query first to catch up).
|
|
12
|
+
*
|
|
13
|
+
* @module mailbox-events
|
|
14
|
+
*/
|
|
15
|
+
export type MailboxEventType = 'message.sent' | 'message.acked' | 'message.deleted' | 'message.restored';
|
|
16
|
+
export interface MailboxEvent {
|
|
17
|
+
type: MailboxEventType;
|
|
18
|
+
messageId: string;
|
|
19
|
+
from?: string | undefined;
|
|
20
|
+
to?: string | undefined;
|
|
21
|
+
timestamp: string;
|
|
22
|
+
}
|
|
23
|
+
export type MailboxEventListener = (event: MailboxEvent) => void;
|
|
24
|
+
export declare class MailboxEventEmitter {
|
|
25
|
+
private listeners;
|
|
26
|
+
subscribe(fn: MailboxEventListener): () => void;
|
|
27
|
+
emit(event: MailboxEvent): void;
|
|
28
|
+
/** Number of active subscribers (for observability / metrics). */
|
|
29
|
+
get subscriberCount(): number;
|
|
30
|
+
clear(): void;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=mailbox-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mailbox-events.d.ts","sourceRoot":"","sources":["../../src/coordination/mailbox-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,eAAe,GAAG,iBAAiB,GAAG,kBAAkB,CAAC;AAEzG,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,gBAAgB,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;AAEjE,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,SAAS,CAAmC;IAEpD,SAAS,CAAC,EAAE,EAAE,oBAAoB,GAAG,MAAM,IAAI,CAG9C;IAED,IAAI,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAK9B;IAED,kEAAkE;IAClE,IAAI,eAAe,IAAI,MAAM,CAE5B;IAED,KAAK,IAAI,IAAI,CAEZ;CACF"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MailboxHealthWatchdog — probes the mailbox HTTP bridge and posts a
|
|
3
|
+
* status message when it goes down.
|
|
4
|
+
*
|
|
5
|
+
* Designed to be embedded inside the WrongStack REPL/TUI/WebUI process —
|
|
6
|
+
* NOT a standalone agent. WrongStack has its own cross-agent
|
|
7
|
+
* coordination channel, so the cheapest reliable signal is "ask the
|
|
8
|
+
* bridge if it's alive, and if it's not, tell the rest of the team
|
|
9
|
+
* via the same channel the bridge exposes."
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
*
|
|
13
|
+
* const mailbox = new GlobalMailbox(projectDir);
|
|
14
|
+
* const watchdog = new MailboxHealthWatchdog({
|
|
15
|
+
* mailbox,
|
|
16
|
+
* url: 'http://127.0.0.1:7788',
|
|
17
|
+
* probeIntervalMs: 15_000,
|
|
18
|
+
* onAlert: (event) => console.warn(event),
|
|
19
|
+
* });
|
|
20
|
+
* await watchdog.start();
|
|
21
|
+
* // ...later...
|
|
22
|
+
* await watchdog.stop();
|
|
23
|
+
*
|
|
24
|
+
* The watchdog is a passive observer: it does NOT start the bridge.
|
|
25
|
+
* Starting the bridge is the user's job (`wstack mailbox serve` or
|
|
26
|
+
* `/mailbox-serve`). The watchdog then reports on what the user did.
|
|
27
|
+
*/
|
|
28
|
+
import type { GlobalMailbox } from './global-mailbox.js';
|
|
29
|
+
import type { MailboxSendInput } from './mailbox-types.js';
|
|
30
|
+
export interface MailboxHealthWatchdogOptions {
|
|
31
|
+
/** Project mailbox to probe-and-report on. Required. */
|
|
32
|
+
mailbox: GlobalMailbox;
|
|
33
|
+
/** URL of the mailbox bridge (no trailing slash). Required. */
|
|
34
|
+
url: string;
|
|
35
|
+
/** Probe interval in milliseconds. Default: 15_000. */
|
|
36
|
+
probeIntervalMs?: number;
|
|
37
|
+
/** Per-probe timeout in milliseconds. Default: 3_000. */
|
|
38
|
+
probeTimeoutMs?: number;
|
|
39
|
+
/**
|
|
40
|
+
* After this many consecutive failures the watchdog posts an alert.
|
|
41
|
+
* Default: 2 (so a single transient timeout doesn't trigger spam).
|
|
42
|
+
*/
|
|
43
|
+
failureThreshold?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Optional callback for local observability — fired on every state
|
|
46
|
+
* transition. The mailbox post is independent of this callback.
|
|
47
|
+
*/
|
|
48
|
+
onAlert?: ((event: MailboxHealthEvent) => void) | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Agent id used to post the alert message. Default: 'mailbox-bridge-watchdog'.
|
|
51
|
+
*/
|
|
52
|
+
from?: string;
|
|
53
|
+
}
|
|
54
|
+
export type MailboxHealthEvent = {
|
|
55
|
+
kind: 'probe-failed';
|
|
56
|
+
status?: number;
|
|
57
|
+
error?: string;
|
|
58
|
+
} | {
|
|
59
|
+
kind: 'alert-posted';
|
|
60
|
+
consecutiveFailures: number;
|
|
61
|
+
} | {
|
|
62
|
+
kind: 'recovery-posted';
|
|
63
|
+
downtimeMs: number;
|
|
64
|
+
} | {
|
|
65
|
+
kind: 'started';
|
|
66
|
+
intervalMs: number;
|
|
67
|
+
} | {
|
|
68
|
+
kind: 'stopped';
|
|
69
|
+
};
|
|
70
|
+
export declare const MAILBOX_HEALTH_DEFAULT_INTERVAL_MS = 15000;
|
|
71
|
+
export declare const MAILBOX_HEALTH_DEFAULT_TIMEOUT_MS = 3000;
|
|
72
|
+
export declare const MAILBOX_HEALTH_DEFAULT_FAILURE_THRESHOLD = 2;
|
|
73
|
+
export declare const MAILBOX_HEALTH_DEFAULT_FROM = "mailbox-bridge-watchdog";
|
|
74
|
+
export declare class MailboxHealthWatchdog {
|
|
75
|
+
private readonly mailbox;
|
|
76
|
+
private readonly url;
|
|
77
|
+
private readonly intervalMs;
|
|
78
|
+
private readonly timeoutMs;
|
|
79
|
+
private readonly failureThreshold;
|
|
80
|
+
private readonly from;
|
|
81
|
+
private readonly onAlert?;
|
|
82
|
+
private timer;
|
|
83
|
+
private consecutiveFailures;
|
|
84
|
+
private downSince;
|
|
85
|
+
private alerting;
|
|
86
|
+
private inFlight;
|
|
87
|
+
private aborted;
|
|
88
|
+
constructor(opts: MailboxHealthWatchdogOptions);
|
|
89
|
+
/** Start probing on `intervalMs`. Idempotent — second call is a no-op. */
|
|
90
|
+
start(): Promise<void>;
|
|
91
|
+
/** Stop probing. Safe to call multiple times. */
|
|
92
|
+
stop(): Promise<void>;
|
|
93
|
+
/** True between start() and stop(). */
|
|
94
|
+
isRunning(): boolean;
|
|
95
|
+
/** Number of consecutive failed probes since the last successful probe. */
|
|
96
|
+
get currentFailureStreak(): number;
|
|
97
|
+
/** True iff the watchdog currently considers the bridge down. */
|
|
98
|
+
isBridgeDown(): boolean;
|
|
99
|
+
private emit;
|
|
100
|
+
private tick;
|
|
101
|
+
private probe;
|
|
102
|
+
private recordSuccess;
|
|
103
|
+
private recordFailure;
|
|
104
|
+
private postDown;
|
|
105
|
+
private postRecovery;
|
|
106
|
+
}
|
|
107
|
+
export interface DownAlertInput {
|
|
108
|
+
from: string;
|
|
109
|
+
url: string;
|
|
110
|
+
consecutiveFailures: number;
|
|
111
|
+
}
|
|
112
|
+
export declare function buildDownAlert(input: DownAlertInput): MailboxSendInput;
|
|
113
|
+
export interface RecoveryAlertInput {
|
|
114
|
+
from: string;
|
|
115
|
+
url: string;
|
|
116
|
+
downtimeMs: number;
|
|
117
|
+
consecutiveFailures: number;
|
|
118
|
+
}
|
|
119
|
+
export declare function buildRecoveryAlert(input: RecoveryAlertInput): MailboxSendInput;
|
|
120
|
+
export interface WatchdogConfig {
|
|
121
|
+
probeIntervalMs: number;
|
|
122
|
+
probeTimeoutMs: number;
|
|
123
|
+
failureThreshold: number;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Throws if the watchdog config is invalid. Called from the
|
|
127
|
+
* MailboxHealthWatchdog constructor so misconfiguration fails fast
|
|
128
|
+
* (at startup), not silently after the first probe.
|
|
129
|
+
*/
|
|
130
|
+
export declare function validateWatchdogOptions(cfg: WatchdogConfig): void;
|
|
131
|
+
//# sourceMappingURL=mailbox-health.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mailbox-health.d.ts","sourceRoot":"","sources":["../../src/coordination/mailbox-health.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBA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