@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
package/dist/hq/index.d.ts
CHANGED
|
@@ -1,816 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* Scrub a free-text preview field and truncate it to a maximum length so
|
|
20
|
-
* it is safe to embed in HQ event envelopes and broadcast to browsers
|
|
21
|
-
* without leaking secrets or running away on unbounded input.
|
|
22
|
-
*
|
|
23
|
-
* Returns `undefined` when the input is empty or non-string. Truncation
|
|
24
|
-
* suffix is `"…[truncated:N]"` where N is the number of dropped chars.
|
|
25
|
-
*/
|
|
26
|
-
declare function scrubAndTruncateHqPreview(value: unknown, maxLength?: number): string | undefined;
|
|
27
|
-
declare function redactHqValue<T>(value: T, options?: HqRedactOptions): HqRedactionResult<T>;
|
|
28
|
-
declare function redactHqEvent<TPayload>(event: HqEventEnvelope<TPayload>, options?: HqRedactOptions): HqRedactionResult<HqEventEnvelope<TPayload>>;
|
|
29
|
-
declare function summarizeHqToolArgs(value: unknown, options?: HqRedactOptions): unknown;
|
|
30
|
-
|
|
31
|
-
interface HqPublisherEnvConfig {
|
|
32
|
-
url: string;
|
|
33
|
-
token?: string;
|
|
34
|
-
enabled?: boolean;
|
|
35
|
-
rawContent?: boolean;
|
|
36
|
-
projectAlias?: string;
|
|
37
|
-
/**
|
|
38
|
-
* Same-machine auto-discovery mode: no explicit URL was configured, so the
|
|
39
|
-
* publisher should re-resolve the endpoint from `<dataDir>/runtime.json`
|
|
40
|
-
* (+ the first client token in `auth.json`) before every connect attempt.
|
|
41
|
-
* This lets every client on the machine attach to a `wstack --hq` that is
|
|
42
|
-
* already running, starts later, or restarts on a different port.
|
|
43
|
-
*/
|
|
44
|
-
discover?: boolean;
|
|
45
|
-
/** Resolved HQ data dir the discovery reads from. */
|
|
46
|
-
dataDir?: string;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Discover a locally running `wstack --hq` endpoint: reads the runtime
|
|
50
|
-
* marker (pid-liveness-checked) and the first client token. Returns
|
|
51
|
-
* `undefined` when no live HQ is advertised on this machine.
|
|
52
|
-
*/
|
|
53
|
-
declare function discoverLocalHqEndpoint(options?: {
|
|
54
|
-
dataDir?: string | undefined;
|
|
55
|
-
env?: NodeJS.ProcessEnv | undefined;
|
|
56
|
-
}): {
|
|
57
|
-
url: string;
|
|
58
|
-
token?: string | undefined;
|
|
59
|
-
} | undefined;
|
|
60
|
-
declare function resolveHqConfigFromEnv(env?: NodeJS.ProcessEnv): HqPublisherEnvConfig | undefined;
|
|
61
|
-
declare function resolveHqConfig(options?: {
|
|
62
|
-
env?: NodeJS.ProcessEnv | undefined;
|
|
63
|
-
config?: HqClientConfig | undefined;
|
|
64
|
-
}): HqPublisherEnvConfig | undefined;
|
|
65
|
-
interface CreateHqPublisherOptions {
|
|
66
|
-
clientKind: HqClientIdentity['kind'];
|
|
67
|
-
projectRoot: string;
|
|
68
|
-
projectName?: string;
|
|
69
|
-
machineId?: string;
|
|
70
|
-
hostnameOverride?: string;
|
|
71
|
-
socketFactory?: HqSocketFactory;
|
|
72
|
-
config?: HqPublisherEnvConfig;
|
|
73
|
-
appConfig?: {
|
|
74
|
-
hq?: HqClientConfig | undefined;
|
|
75
|
-
} | undefined;
|
|
76
|
-
redactionPolicy?: Partial<HqRedactionPolicy>;
|
|
77
|
-
/** Forwarded to the HqPublisher constructor (Phase 4 control plane). */
|
|
78
|
-
capabilities?: readonly HqClientCapability[];
|
|
79
|
-
/** Forwarded to the HqPublisher constructor (Phase 4 control plane). */
|
|
80
|
-
onCommand?: HqPublisherCommandHandler;
|
|
81
|
-
/** Dormant discovery re-check interval override (tests / tight loops). */
|
|
82
|
-
discoveryPollMs?: number;
|
|
83
|
-
}
|
|
84
|
-
declare function createHqPublisherFromEnv(options: CreateHqPublisherOptions): HqPublisher | undefined;
|
|
85
|
-
interface CreateGlobalMailboxOptions {
|
|
86
|
-
projectDir: string;
|
|
87
|
-
events?: EventBus;
|
|
88
|
-
hqPublisher?: HqPublisher;
|
|
89
|
-
}
|
|
90
|
-
declare function createGlobalMailbox(options: CreateGlobalMailboxOptions): GlobalMailbox;
|
|
91
|
-
|
|
92
|
-
/** Current auth-file schema version. Bump on breaking shape changes. */
|
|
93
|
-
declare const HQ_AUTH_FILE_VERSION: 1;
|
|
94
|
-
/** Default HQ data directory: `~/.wrongstack/hq` (honors WRONGSTACK_HOME). */
|
|
95
|
-
declare function defaultHqDataDir(): string;
|
|
96
|
-
/**
|
|
97
|
-
* Resolve an HQ data directory from an optional override.
|
|
98
|
-
*
|
|
99
|
-
* Resolution order:
|
|
100
|
-
* 1. Explicit `override` (from `--data-dir`) — resolved against
|
|
101
|
-
* `process.cwd()` if relative.
|
|
102
|
-
* 2. `WRONGSTACK_HQ_DATA_DIR` env var (same resolution rules).
|
|
103
|
-
* 3. `defaultHqDataDir()` — `~/.wrongstack/hq`.
|
|
104
|
-
*
|
|
105
|
-
* The env var exists so tests (and sandboxed runs) can redirect HQ state
|
|
106
|
-
* away from the real user home without threading a CLI flag everywhere.
|
|
107
|
-
*/
|
|
108
|
-
declare function resolveHqDataDir(override?: string, env?: NodeJS.ProcessEnv): string;
|
|
109
|
-
/**
|
|
110
|
-
* A generic HQ-issued token. Used for both browser tokens (validated on
|
|
111
|
-
* `/ws/browser`) and client tokens (validated on `/ws/client`). The two
|
|
112
|
-
* are stored in separate lists so a browser-only token cannot be replayed
|
|
113
|
-
* against the client channel and vice versa.
|
|
114
|
-
*
|
|
115
|
-
* `capabilities` scopes what a token may do. When absent the token is
|
|
116
|
-
* unrestricted (backward-compat with tokens minted before Phase 3). Known
|
|
117
|
-
* capability strings:
|
|
118
|
-
* - `control.enqueue` — browser token may enqueue commands to clients
|
|
119
|
-
* - `control.execute` — client token may execute `run-command` commands
|
|
120
|
-
* - `telemetry.publish` — client token may publish telemetry
|
|
121
|
-
*/
|
|
122
|
-
interface HqToken {
|
|
123
|
-
id: string;
|
|
124
|
-
token: string;
|
|
125
|
-
label?: string;
|
|
126
|
-
createdAt: string;
|
|
127
|
-
lastUsedAt?: string;
|
|
128
|
-
/**
|
|
129
|
-
* Optional capability scope. When absent, the token is unrestricted
|
|
130
|
-
* (backward-compat). When present, only the listed capabilities are
|
|
131
|
-
* granted.
|
|
132
|
-
*/
|
|
133
|
-
capabilities?: string[];
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Check whether a token grants a capability. A token with no `capabilities`
|
|
137
|
-
* field is unrestricted (backward-compat). Otherwise the capability must be
|
|
138
|
-
* explicitly listed.
|
|
139
|
-
*/
|
|
140
|
-
declare function tokenHasCapability(token: HqToken | undefined, capability: string): boolean;
|
|
141
|
-
/**
|
|
142
|
-
* Alias kept for backward-compat with Phase 3 callers/tests. New code
|
|
143
|
-
* should prefer `HqToken`.
|
|
144
|
-
*/
|
|
145
|
-
type HqBrowserToken = HqToken;
|
|
146
|
-
/** On-disk shape of `<dataDir>/auth.json`. */
|
|
147
|
-
interface HqRuntimeFile {
|
|
148
|
-
url: string;
|
|
149
|
-
updatedAt: string;
|
|
150
|
-
pid?: number;
|
|
151
|
-
}
|
|
152
|
-
interface HqAuthFile {
|
|
153
|
-
version: typeof HQ_AUTH_FILE_VERSION;
|
|
154
|
-
updatedAt: string;
|
|
155
|
-
/**
|
|
156
|
-
* Operator-configured redaction policy override. When present, the HQ
|
|
157
|
-
* server applies these settings AFTER any publisher-declared policy —
|
|
158
|
-
* i.e. the operator can always tighten, never loosen.
|
|
159
|
-
*/
|
|
160
|
-
redactionPolicy?: Partial<HqRedactionPolicy>;
|
|
161
|
-
/** Browser tokens — validated on `/ws/browser` upgrades (Phase 3). */
|
|
162
|
-
browserTokens?: HqToken[];
|
|
163
|
-
/** Client tokens — validated on `/ws/client` upgrades (Phase 4). */
|
|
164
|
-
clientTokens?: HqToken[];
|
|
165
|
-
}
|
|
166
|
-
/** An empty auth file — what a brand-new HQ install starts with. */
|
|
167
|
-
declare function emptyHqAuthFile(): HqAuthFile;
|
|
168
|
-
/** Path to `auth.json` under the given data directory. */
|
|
169
|
-
declare function hqAuthFilePath(dataDir: string): string;
|
|
170
|
-
/** Path to the best-effort runtime endpoint marker under the given data directory. */
|
|
171
|
-
declare function hqRuntimeFilePath(dataDir: string): string;
|
|
172
|
-
declare function writeHqRuntimeFile(dataDir: string, file: Omit<HqRuntimeFile, 'updatedAt'>): Promise<void>;
|
|
173
|
-
declare function readHqRuntimeFileSync(dataDir: string): HqRuntimeFile | undefined;
|
|
174
|
-
/**
|
|
175
|
-
* Read `auth.json` from disk. Returns `emptyHqAuthFile()` when:
|
|
176
|
-
* - the file does not exist (ENOENT), or
|
|
177
|
-
* - the file cannot be parsed (the `warn` callback surfaces the error).
|
|
178
|
-
*
|
|
179
|
-
* Never throws for routine I/O — a missing or corrupt auth file should not
|
|
180
|
-
* prevent the HQ server from starting. The operator can recover by editing
|
|
181
|
-
* or deleting the file.
|
|
182
|
-
*/
|
|
183
|
-
declare function readHqAuthFile(dataDir: string, opts?: {
|
|
184
|
-
warn?: (msg: string) => void;
|
|
185
|
-
}): Promise<HqAuthFile>;
|
|
186
|
-
/**
|
|
187
|
-
* Write `auth.json` atomically with mode 0o600. Creates the data directory
|
|
188
|
-
* if needed. Throws on I/O failure — callers (CLI commands) should surface
|
|
189
|
-
* the error to the operator.
|
|
190
|
-
*/
|
|
191
|
-
declare function writeHqAuthFile(dataDir: string, file: HqAuthFile): Promise<void>;
|
|
192
|
-
interface EnsureHqFirstRunAuthResult {
|
|
193
|
-
authFile: HqAuthFile;
|
|
194
|
-
created: boolean;
|
|
195
|
-
browserToken?: HqToken;
|
|
196
|
-
clientToken?: HqToken;
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Ensure a brand-new HQ data directory has the auth required for safe
|
|
200
|
-
* first-run operation. Only a missing auth.json is bootstrapped; an existing
|
|
201
|
-
* file, including one with empty token arrays, is treated as operator intent.
|
|
202
|
-
*/
|
|
203
|
-
declare function ensureHqFirstRunAuthFile(dataDir: string, opts?: {
|
|
204
|
-
warn?: (msg: string) => void;
|
|
205
|
-
}): Promise<EnsureHqFirstRunAuthResult>;
|
|
206
|
-
/**
|
|
207
|
-
* Load → mutate → write. The mutator receives the current file (or an empty
|
|
208
|
-
* one) and returns the next file. Use this for any read-modify-write cycle
|
|
209
|
-
* to avoid clobbering concurrent edits from another CLI invocation.
|
|
210
|
-
*
|
|
211
|
-
* Note: this does NOT take a file lock. HQ auth edits are rare (operator
|
|
212
|
-
* running `wstack --hq-token add` etc.) and the atomic rename protects
|
|
213
|
-
* against torn writes; a race between two concurrent edits would be
|
|
214
|
-
* last-write-wins, which is acceptable for this low-frequency file.
|
|
215
|
-
*/
|
|
216
|
-
declare function mutateHqAuthFile(dataDir: string, mutator: (current: HqAuthFile) => HqAuthFile | Promise<HqAuthFile>, opts?: {
|
|
217
|
-
warn?: (msg: string) => void;
|
|
218
|
-
}): Promise<HqAuthFile>;
|
|
219
|
-
/**
|
|
220
|
-
* Mint a fresh token. Used for both browser and client tokens; the caller
|
|
221
|
-
* decides which list to append to.
|
|
222
|
-
*/
|
|
223
|
-
declare function mintHqToken(label?: string): HqToken;
|
|
224
|
-
/**
|
|
225
|
-
* Backward-compat alias for `mintHqToken`. Phase 3 callers/tests use this.
|
|
226
|
-
*/
|
|
227
|
-
declare const mintHqBrowserToken: typeof mintHqToken;
|
|
228
|
-
/**
|
|
229
|
-
* Watch `auth.json` for changes and invoke `onChange` with the freshly-read
|
|
230
|
-
* file. Returns a `close()` function that stops watching.
|
|
231
|
-
*
|
|
232
|
-
* The watcher debounces events (default 200ms) because most editors do a
|
|
233
|
-
* tmp+rename dance that emits multiple events. On any read failure (file
|
|
234
|
-
* deleted, corrupt, etc.) the `warn` callback is invoked with the same
|
|
235
|
-
* semantics as `readHqAuthFile`; the watcher stays active so a future
|
|
236
|
-
* valid write re-triggers the callback.
|
|
237
|
-
*
|
|
238
|
-
* Notes:
|
|
239
|
-
* - `fs.watch` is best-effort across platforms. On some network
|
|
240
|
-
* filesystems events may not fire; the operator must restart the server
|
|
241
|
-
* to pick up changes in that case.
|
|
242
|
-
* - The watcher polls the parent directory (not the file itself) so that
|
|
243
|
-
* atomic rename events surface reliably.
|
|
244
|
-
*/
|
|
245
|
-
declare function watchHqAuthFile(dataDir: string, onChange: (file: HqAuthFile) => void, opts?: {
|
|
246
|
-
warn?: (msg: string) => void;
|
|
247
|
-
debounceMs?: number;
|
|
248
|
-
}): {
|
|
249
|
-
close: () => void;
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* AgentMonitorEventBridge — forwards local agent timeline and status events
|
|
254
|
-
* to the HQ publisher as structured HQ event envelopes, so the HQ browser
|
|
255
|
-
* dashboard sees real-time agent conversation streams.
|
|
256
|
-
*/
|
|
257
|
-
|
|
258
|
-
type HqAgentEventPublisher = (envelope: HqEventEnvelope) => void;
|
|
259
|
-
interface AgentMonitorEventBridgeOptions {
|
|
260
|
-
/** Local EventBus emitting agent.timeline.* and agent.status_changed events. */
|
|
261
|
-
events: EventBus;
|
|
262
|
-
/** Client/project identifiers for HQ envelope authorship. */
|
|
263
|
-
clientId: string;
|
|
264
|
-
projectId: string;
|
|
265
|
-
/**
|
|
266
|
-
* Publish callback — called with each HQ event envelope. Wire this to
|
|
267
|
-
* your HQ publisher's `send()` or queue method when connected.
|
|
268
|
-
* When null (no HQ connection), events are silently dropped.
|
|
269
|
-
*/
|
|
270
|
-
publish?: HqAgentEventPublisher | undefined;
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Start forwarding agent monitoring events to HQ. Returns a disposer that
|
|
274
|
-
* unsubscribes all listeners — call on shutdown.
|
|
275
|
-
*/
|
|
276
|
-
declare function startAgentMonitorEventBridge(opts: AgentMonitorEventBridgeOptions): () => void;
|
|
277
|
-
|
|
278
|
-
interface SessionTelemetryBridgeOptions {
|
|
279
|
-
publisher: HqPublisher;
|
|
280
|
-
/** Local bus carrying `session.agents_updated`. When omitted, snapshots
|
|
281
|
-
* still publish (with empty/last-known agents) and the transcript still
|
|
282
|
-
* streams from disk. */
|
|
283
|
-
events?: EventBus | undefined;
|
|
284
|
-
sessionId: string;
|
|
285
|
-
projectRoot: string;
|
|
286
|
-
projectName?: string | undefined;
|
|
287
|
-
/** Override the global root used to resolve the session JSONL path. */
|
|
288
|
-
globalRoot?: string | undefined;
|
|
289
|
-
/** Last-known agents to publish immediately before the next bus update. */
|
|
290
|
-
initialAgents?: readonly TrackedAgentSnapshot[] | undefined;
|
|
291
|
-
gitBranch?: string | undefined;
|
|
292
|
-
startedAt?: string | undefined;
|
|
293
|
-
/** Snapshot republish interval (also refreshes lastActivity). Default 2500ms. */
|
|
294
|
-
snapshotIntervalMs?: number | undefined;
|
|
295
|
-
/** Transcript tail poll interval. Default 1200ms. */
|
|
296
|
-
transcriptIntervalMs?: number | undefined;
|
|
297
|
-
now?: (() => string) | undefined;
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* Start streaming this surface's session telemetry to HQ. Returns a disposer
|
|
301
|
-
* that stops both streams and publishes a final `session.ended`.
|
|
302
|
-
*/
|
|
303
|
-
declare function startSessionTelemetryBridge(opts: SessionTelemetryBridgeOptions): () => void;
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
* FleetTelemetryBridge — forwards local multi-agent coordinator stats to the
|
|
307
|
-
* HQ publisher as `fleet.snapshot` envelopes, so the command center can render
|
|
308
|
-
* a global fleet roll-up (queued/completed/failed tasks, per-subagent status,
|
|
309
|
-
* fleet cost) across every connected machine.
|
|
310
|
-
*
|
|
311
|
-
* Source: the `coordinator.stats` EventBus event (originating on the FleetBus
|
|
312
|
-
* and re-emitted onto the host EventBus by `fleet/host.ts`). All payload
|
|
313
|
-
* fields are plain serializable data — no closures, no decoupled relay needed.
|
|
314
|
-
*
|
|
315
|
-
* The snapshot is republished on every `coordinator.stats` change (hash-dedup,
|
|
316
|
-
* mirroring {@link startSessionTelemetryBridge}) so the HQ browser sees live
|
|
317
|
-
* fleet counters without polling.
|
|
318
|
-
*
|
|
319
|
-
* @module hq/fleet-bridge
|
|
320
|
-
*/
|
|
321
|
-
|
|
322
|
-
interface FleetTelemetryBridgeOptions {
|
|
323
|
-
/** Local EventBus emitting `coordinator.stats` (host EventBus after the FleetBus hop). */
|
|
324
|
-
events: EventBus;
|
|
325
|
-
/** HQ publisher to forward envelopes to. */
|
|
326
|
-
publisher: HqPublisher;
|
|
327
|
-
/** Coordinator run id — identifies this fleet instance. Falls back to a stable per-session id. */
|
|
328
|
-
runId: string;
|
|
329
|
-
/** Optional sessionId to tag envelopes with. */
|
|
330
|
-
sessionId?: string;
|
|
331
|
-
/** Override `now()` for deterministic tests. */
|
|
332
|
-
now?: () => string;
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* Start forwarding coordinator stats to HQ. Returns a disposer that
|
|
336
|
-
* unsubscribes the listener — call on shutdown.
|
|
337
|
-
*/
|
|
338
|
-
declare function startFleetTelemetryBridge(opts: FleetTelemetryBridgeOptions): () => void;
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* BrainTelemetryBridge — forwards local Brain (decision layer) events to the
|
|
342
|
-
* HQ publisher as `brain.event` envelopes, so the command center can observe
|
|
343
|
-
* decision requests, answers, denials, ask-human escalations, and
|
|
344
|
-
* self-activated interventions across every connected machine.
|
|
345
|
-
*
|
|
346
|
-
* Source: the `brain.*` EventBus events emitted by `ObservableBrainArbiter`
|
|
347
|
-
* (`coordination/brain.ts`) and `BrainMonitor` (`coordination/brain-monitor.ts`).
|
|
348
|
-
* All payloads are plain serializable data (request id, question, source, risk,
|
|
349
|
-
* decision kind, rationale) — no closures, no decoupled relay needed.
|
|
350
|
-
*
|
|
351
|
-
* The webui `setup-events.ts` already forwards these verbatim to its browser;
|
|
352
|
-
* this bridge does the same for the cross-machine HQ plane.
|
|
353
|
-
*
|
|
354
|
-
* @module hq/brain-bridge
|
|
355
|
-
*/
|
|
356
|
-
|
|
357
|
-
interface BrainTelemetryBridgeOptions {
|
|
358
|
-
/** Local EventBus emitting `brain.*` events. */
|
|
359
|
-
events: EventBus;
|
|
360
|
-
/** HQ publisher to forward envelopes to. */
|
|
361
|
-
publisher: HqPublisher;
|
|
362
|
-
/** Optional sessionId to tag envelopes with. */
|
|
363
|
-
sessionId?: string;
|
|
364
|
-
/** Override `now()` for deterministic tests. */
|
|
365
|
-
now?: () => string;
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* Start forwarding brain events to HQ. Returns a disposer that unsubscribes
|
|
369
|
-
* all listeners — call on shutdown.
|
|
370
|
-
*/
|
|
371
|
-
declare function startBrainTelemetryBridge(opts: BrainTelemetryBridgeOptions): () => void;
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
* WorktreeTelemetryBridge — forwards local git-worktree lifecycle events to
|
|
375
|
-
* the HQ publisher as `worktree.event` envelopes, so the command center can
|
|
376
|
-
* render live build phase swim-lanes / DAG across every connected machine.
|
|
377
|
-
*
|
|
378
|
-
* Source: the `worktree.*` EventBus events emitted by `WorktreeManager`
|
|
379
|
-
* (`worktree/worktree-manager.ts`): allocated, committed, merged, conflict,
|
|
380
|
-
* released, failed. All payload fields are plain serializable data
|
|
381
|
-
* (handleId, ownerId, branch, diff stats, conflict files) — no closures, no
|
|
382
|
-
* decoupled relay needed.
|
|
383
|
-
*
|
|
384
|
-
* @module hq/worktree-bridge
|
|
385
|
-
*/
|
|
386
|
-
|
|
387
|
-
interface WorktreeTelemetryBridgeOptions {
|
|
388
|
-
/** Local EventBus emitting `worktree.*` events. */
|
|
389
|
-
events: EventBus;
|
|
390
|
-
/** HQ publisher to forward envelopes to. */
|
|
391
|
-
publisher: HqPublisher;
|
|
392
|
-
/** Optional sessionId to tag envelopes with. */
|
|
393
|
-
sessionId?: string;
|
|
394
|
-
/** Override `now()` for deterministic tests. */
|
|
395
|
-
now?: () => string;
|
|
396
|
-
}
|
|
397
|
-
/**
|
|
398
|
-
* Start forwarding worktree lifecycle events to HQ. Returns a disposer that
|
|
399
|
-
* unsubscribes all listeners — call on shutdown.
|
|
400
|
-
*/
|
|
401
|
-
declare function startWorktreeTelemetryBridge(opts: WorktreeTelemetryBridgeOptions): () => void;
|
|
402
|
-
|
|
403
|
-
/**
|
|
404
|
-
* ToolTelemetryBridge — forwards local tool execution events to the HQ
|
|
405
|
-
* publisher as `tool.started` and `tool.completed` envelopes, so the command
|
|
406
|
-
* center can surface live tool activity (what's running, durations, success
|
|
407
|
-
* rates) across every connected machine.
|
|
408
|
-
*
|
|
409
|
-
* Sources:
|
|
410
|
-
* - `tool.started` (EventBus) → `tool.started` envelope. Raw tool input is
|
|
411
|
-
* summarized via {@link summarizeHqToolArgs} so no secrets or oversized
|
|
412
|
-
* payloads leak to the HQ browser.
|
|
413
|
-
* - `tool.executed` (EventBus) → `tool.completed` envelope (carries the
|
|
414
|
-
* richer post-execution signal: duration, ok/error, output bytes).
|
|
415
|
-
*
|
|
416
|
-
* All payload fields are plain serializable data — no closures. The
|
|
417
|
-
* `tool.started.input` raw args are the only sensitive surface and are
|
|
418
|
-
* reduced to a summary before publishing.
|
|
419
|
-
*
|
|
420
|
-
* @module hq/tool-bridge
|
|
421
|
-
*/
|
|
422
|
-
|
|
423
|
-
interface ToolTelemetryBridgeOptions {
|
|
424
|
-
/** Local EventBus emitting `tool.started` and `tool.executed` events. */
|
|
425
|
-
events: EventBus;
|
|
426
|
-
/** HQ publisher to forward envelopes to. */
|
|
427
|
-
publisher: HqPublisher;
|
|
428
|
-
/** Project root for path redaction in tool input summaries. */
|
|
429
|
-
projectRoot?: string;
|
|
430
|
-
/** Optional sessionId to tag envelopes with. */
|
|
431
|
-
sessionId?: string;
|
|
432
|
-
/** Override `now()` for deterministic tests. */
|
|
433
|
-
now?: () => string;
|
|
434
|
-
}
|
|
435
|
-
/**
|
|
436
|
-
* Start forwarding tool execution events to HQ. Returns a disposer that
|
|
437
|
-
* unsubscribes all listeners — call on shutdown.
|
|
438
|
-
*/
|
|
439
|
-
declare function startToolTelemetryBridge(opts: ToolTelemetryBridgeOptions): () => void;
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* CostTelemetryBridge — forwards local token/cost accounting events to the HQ
|
|
443
|
-
* publisher as `session.usage` envelopes, giving the command center the
|
|
444
|
-
* granular per-call cost signal it needs to render live cost trends and
|
|
445
|
-
* roll-ups across every connected machine.
|
|
446
|
-
*
|
|
447
|
-
* Source: the `token.accounted` EventBus event, emitted by the TokenCounter
|
|
448
|
-
* (`infrastructure/token-counter.ts`) after every provider call. The payload
|
|
449
|
-
* is plain serializable data (usage counts + a cost breakdown) — no closures.
|
|
450
|
-
*
|
|
451
|
-
* This is the high-frequency cost feed; HQ's persistence layer (Phase 2)
|
|
452
|
-
* time-buckets these into trend series.
|
|
453
|
-
*
|
|
454
|
-
* @module hq/cost-bridge
|
|
455
|
-
*/
|
|
456
|
-
|
|
457
|
-
interface CostTelemetryBridgeOptions {
|
|
458
|
-
/** Local EventBus emitting `token.accounted`. */
|
|
459
|
-
events: EventBus;
|
|
460
|
-
/** HQ publisher to forward envelopes to. */
|
|
461
|
-
publisher: HqPublisher;
|
|
462
|
-
/** Optional sessionId to tag envelopes with (overrides the event's, when set). */
|
|
463
|
-
sessionId?: string;
|
|
464
|
-
/** Override `now()` for deterministic tests. */
|
|
465
|
-
now?: () => string;
|
|
466
|
-
}
|
|
467
|
-
/**
|
|
468
|
-
* Start forwarding token/cost events to HQ. Returns a disposer that
|
|
469
|
-
* unsubscribes the listener — call on shutdown.
|
|
470
|
-
*/
|
|
471
|
-
declare function startCostTelemetryBridge(opts: CostTelemetryBridgeOptions): () => void;
|
|
472
|
-
|
|
473
|
-
interface HqEventLogOptions {
|
|
474
|
-
dataDir: string;
|
|
475
|
-
maxLines?: number;
|
|
476
|
-
rotateKeep?: number;
|
|
477
|
-
}
|
|
478
|
-
/**
|
|
479
|
-
* Append-only JSONL event log. Every received event envelope is appended to
|
|
480
|
-
* `events.jsonl`; when the file exceeds `maxLines` it is rotated under a file
|
|
481
|
-
* lock to keep only the most recent `rotateKeep` lines.
|
|
482
|
-
*
|
|
483
|
-
* Writes are serialized through a FIFO chain so concurrent appends never
|
|
484
|
-
* interleave. All operations are best-effort: a rejected append resolves
|
|
485
|
-
* (never rejects) and the caller's `await` never breaks the server loop.
|
|
486
|
-
*/
|
|
487
|
-
declare class HqEventLog {
|
|
488
|
-
private readonly filePath;
|
|
489
|
-
private readonly maxLines;
|
|
490
|
-
private readonly rotateKeep;
|
|
491
|
-
private writeChain;
|
|
492
|
-
private lineCount;
|
|
493
|
-
private counted;
|
|
494
|
-
constructor(opts: HqEventLogOptions);
|
|
495
|
-
/** Append an event envelope as one JSON line. Best-effort, never rejects. */
|
|
496
|
-
append(event: HqEventEnvelope): void;
|
|
497
|
-
/** Resolves once all queued appends have settled. For tests. */
|
|
498
|
-
drain(): Promise<void>;
|
|
499
|
-
private appendInternal;
|
|
500
|
-
private rotate;
|
|
501
|
-
private countLines;
|
|
502
|
-
/**
|
|
503
|
-
* Read the most recent `limit` events, optionally filtered by envelope
|
|
504
|
-
* `type`. Newest first. Returns `[]` if the file doesn't exist yet.
|
|
505
|
-
*/
|
|
506
|
-
recent(limit: number, typeFilter?: string): Promise<HqEventEnvelope[]>;
|
|
507
|
-
/** Initialize the line count cache from disk (call once at boot). */
|
|
508
|
-
hydrate(): Promise<void>;
|
|
509
|
-
}
|
|
510
|
-
interface HqSnapshotStoreOptions {
|
|
511
|
-
dataDir: string;
|
|
512
|
-
}
|
|
513
|
-
/**
|
|
514
|
-
* Atomic checkpoint of the latest snapshot, written to `snapshot.json`.
|
|
515
|
-
* The HQ server writes on every debounced broadcast and reads on boot to
|
|
516
|
-
* re-seed its in-memory state. Best-effort, never rejects.
|
|
517
|
-
*/
|
|
518
|
-
declare class HqSnapshotStore {
|
|
519
|
-
private readonly filePath;
|
|
520
|
-
private writeChain;
|
|
521
|
-
constructor(opts: HqSnapshotStoreOptions);
|
|
522
|
-
/** Persist a snapshot. Best-effort, never rejects. */
|
|
523
|
-
save(snapshot: HqSnapshot): void;
|
|
524
|
-
/** Resolves once all queued saves have settled. For tests. */
|
|
525
|
-
drain(): Promise<void>;
|
|
526
|
-
/** Read the last persisted snapshot, or `null` if none. */
|
|
527
|
-
load(): Promise<HqSnapshot | null>;
|
|
528
|
-
}
|
|
529
|
-
interface HqTimeseriesSample {
|
|
530
|
-
/** Bucket start (epoch ms, floored to the bucket width). */
|
|
531
|
-
ts: number;
|
|
532
|
-
/** Total cost (USD) accumulated in this bucket. */
|
|
533
|
-
costUsd: number;
|
|
534
|
-
/** Total input tokens in this bucket. */
|
|
535
|
-
inputTokens: number;
|
|
536
|
-
/** Total output tokens in this bucket. */
|
|
537
|
-
outputTokens: number;
|
|
538
|
-
/** Number of tool executions in this bucket. */
|
|
539
|
-
toolCalls: number;
|
|
540
|
-
/** Snapshot of active agents at bucket close (last-write per bucket). */
|
|
541
|
-
activeAgents?: number;
|
|
542
|
-
}
|
|
543
|
-
interface HqTimeseriesStoreOptions {
|
|
544
|
-
dataDir: string;
|
|
545
|
-
/** Bucket width in ms. Default 5 minutes. */
|
|
546
|
-
bucketMs?: number;
|
|
547
|
-
/** How many buckets to retain. Default 2016 (1 week of 5-min buckets). */
|
|
548
|
-
maxBuckets?: number;
|
|
549
|
-
}
|
|
550
|
-
/**
|
|
551
|
-
* Time-bucketed cost + activity samples for trend charts. Each {@link record}
|
|
552
|
-
* call folds a cost/tool signal into the current bucket; {@link flush} writes
|
|
553
|
-
* the accumulated buckets to `timeseries.jsonl` (append under lock) and prunes
|
|
554
|
-
* to `maxBuckets`.
|
|
555
|
-
*
|
|
556
|
-
* The store keeps an in-memory ring of buckets for cheap reads; {@link load}
|
|
557
|
-
* rehydrates them on boot.
|
|
558
|
-
*/
|
|
559
|
-
declare class HqTimeseriesStore {
|
|
560
|
-
private readonly filePath;
|
|
561
|
-
private readonly bucketMs;
|
|
562
|
-
private readonly maxBuckets;
|
|
563
|
-
private readonly buckets;
|
|
564
|
-
private flushChain;
|
|
565
|
-
constructor(opts: HqTimeseriesStoreOptions);
|
|
566
|
-
private bucketStart;
|
|
567
|
-
/** Fold a cost/tool signal into the current bucket. Best-effort. */
|
|
568
|
-
record(signal: {
|
|
569
|
-
ts?: number;
|
|
570
|
-
costUsd?: number;
|
|
571
|
-
inputTokens?: number;
|
|
572
|
-
outputTokens?: number;
|
|
573
|
-
toolCalls?: number;
|
|
574
|
-
activeAgents?: number;
|
|
575
|
-
}): void;
|
|
576
|
-
/** Persist accumulated buckets to disk (append under lock), prune to maxBuckets. */
|
|
577
|
-
flush(): void;
|
|
578
|
-
/** Resolves once all queued flushes have settled. For tests. */
|
|
579
|
-
drain(): Promise<void>;
|
|
580
|
-
private flushInternal;
|
|
581
|
-
/** Read buckets within `[since, now]`, oldest-first. */
|
|
582
|
-
read(sinceMs?: number): Promise<HqTimeseriesSample[]>;
|
|
583
|
-
/** Rehydrate buckets from disk (deduped, latest-per-bucket wins). */
|
|
584
|
-
load(): Promise<void>;
|
|
585
|
-
}
|
|
586
|
-
interface HqPersistence {
|
|
587
|
-
eventLog: HqEventLog;
|
|
588
|
-
snapshotStore: HqSnapshotStore;
|
|
589
|
-
timeseries: HqTimeseriesStore;
|
|
590
|
-
}
|
|
591
|
-
declare function createHqPersistence(dataDir: string): HqPersistence;
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
* HQ control-plane command definitions — typed payloads for the commands the
|
|
595
|
-
* HQ dashboard can enqueue to connected machines (Phase 3+ of the HQ command
|
|
596
|
-
* center). These are carried over the existing `HqQueuedCommand` wire shape
|
|
597
|
-
* (`{commandId, type, payload, …}`) whose `type`/`payload` were previously
|
|
598
|
-
* type-erased. This module gives them a discriminated union for type-safe
|
|
599
|
-
* dispatch on the client side (Phase 4).
|
|
600
|
-
*
|
|
601
|
-
* Security model: `run-command` (raw shell) is gated by a per-token
|
|
602
|
-
* `control.execute` capability AND an operator opt-in; the other four commands
|
|
603
|
-
* route through the agent's own decision loop / mailbox and inherit their
|
|
604
|
-
* existing guardrails. See `docs/plans/hq-command-center-2026-07.md`.
|
|
605
|
-
*
|
|
606
|
-
* @module hq/commands
|
|
607
|
-
*/
|
|
608
|
-
|
|
609
|
-
/** HQ_COMMAND_TYPES — the full set of recognized command `type` strings. */
|
|
610
|
-
declare const HQ_COMMAND_TYPES: readonly ["steer", "btw", "queue", "abort", "spawn", "broadcast", "run-command"];
|
|
611
|
-
type HqCommandType = (typeof HQ_COMMAND_TYPES)[number];
|
|
612
|
-
/** Inject a steer text into a target agent's conversation. */
|
|
613
|
-
interface HqSteerCommand {
|
|
614
|
-
type: 'steer';
|
|
615
|
-
/** Target agent address: a unique id (`leader@<tag>`), an alias (`leader`), or `*` for all. */
|
|
616
|
-
to: string;
|
|
617
|
-
subject: string;
|
|
618
|
-
body: string;
|
|
619
|
-
priority?: 'low' | 'normal' | 'high';
|
|
620
|
-
}
|
|
621
|
-
/**
|
|
622
|
-
* Post a non-urgent FYI (`btw`) into a target agent's mailbox. Unlike a steer,
|
|
623
|
-
* a btw is absorbed as context — it does not demand the agent change course.
|
|
624
|
-
* Same wire shape as steer; only the emitted mailbox `type` differs.
|
|
625
|
-
*/
|
|
626
|
-
interface HqBtwCommand {
|
|
627
|
-
type: 'btw';
|
|
628
|
-
/** Target agent address: a unique id (`leader@<tag>`), an alias (`leader`), or `*` for all. */
|
|
629
|
-
to: string;
|
|
630
|
-
subject: string;
|
|
631
|
-
body: string;
|
|
632
|
-
priority?: 'low' | 'normal' | 'high';
|
|
633
|
-
}
|
|
634
|
-
/**
|
|
635
|
-
* Queue a prompt/note (`queue`) for a target agent. Delivered as a plain
|
|
636
|
-
* `note` mailbox message the agent picks up before its next step — used when
|
|
637
|
-
* the prompt should wait its turn rather than steer the current operation.
|
|
638
|
-
*/
|
|
639
|
-
interface HqQueueCommand {
|
|
640
|
-
type: 'queue';
|
|
641
|
-
/** Target agent address: a unique id (`leader@<tag>`), an alias (`leader`), or `*` for all. */
|
|
642
|
-
to: string;
|
|
643
|
-
subject: string;
|
|
644
|
-
body: string;
|
|
645
|
-
priority?: 'low' | 'normal' | 'high';
|
|
646
|
-
}
|
|
647
|
-
/** Abort a running agent run or fleet. */
|
|
648
|
-
interface HqAbortCommand {
|
|
649
|
-
type: 'abort';
|
|
650
|
-
/** `'leader'` aborts the session leader; a subagentId aborts one agent; `'fleet'` stops all. */
|
|
651
|
-
target: 'leader' | 'fleet' | string;
|
|
652
|
-
}
|
|
653
|
-
/** Spawn a subagent of the given role. */
|
|
654
|
-
interface HqSpawnCommand {
|
|
655
|
-
type: 'spawn';
|
|
656
|
-
role: string;
|
|
657
|
-
/** Optional task description for dispatch routing. */
|
|
658
|
-
task?: string;
|
|
659
|
-
maxIterations?: number;
|
|
660
|
-
}
|
|
661
|
-
/** Broadcast a mailbox message to all agents on the target's project. */
|
|
662
|
-
interface HqBroadcastCommand {
|
|
663
|
-
type: 'broadcast';
|
|
664
|
-
subject: string;
|
|
665
|
-
body: string;
|
|
666
|
-
priority?: 'low' | 'normal' | 'high';
|
|
667
|
-
}
|
|
668
|
-
/** Run a shell command on the target machine. GATED by `control.execute`. */
|
|
669
|
-
interface HqRunCommandCommand {
|
|
670
|
-
type: 'run-command';
|
|
671
|
-
command: string;
|
|
672
|
-
/** Optional working directory (defaults to the agent's project root). */
|
|
673
|
-
cwd?: string;
|
|
674
|
-
}
|
|
675
|
-
type HqCommand = HqSteerCommand | HqBtwCommand | HqQueueCommand | HqAbortCommand | HqSpawnCommand | HqBroadcastCommand | HqRunCommandCommand;
|
|
676
|
-
/**
|
|
677
|
-
* Validate that an inbound `HqQueuedCommand` has a recognized `type` and a
|
|
678
|
-
* minimally well-formed payload. Returns the narrowed command on success, or
|
|
679
|
-
* `null` when the command should be rejected.
|
|
680
|
-
*
|
|
681
|
-
* This is a shape check, not a security gate — capability enforcement happens
|
|
682
|
-
* at enqueue time (browser token must have `control.enqueue`) and at execute
|
|
683
|
-
* time (`run-command` requires `control.execute`).
|
|
684
|
-
*/
|
|
685
|
-
declare function validateHqCommand(queued: HqQueuedCommand): HqCommand | null;
|
|
686
|
-
interface HqCommandAuditEntry {
|
|
687
|
-
commandId: string;
|
|
688
|
-
type: HqCommandType;
|
|
689
|
-
clientId: string;
|
|
690
|
-
/** Who enqueued the command (browser token id, or 'anonymous' in open mode). */
|
|
691
|
-
enqueuedBy: string;
|
|
692
|
-
enqueuedAt: string;
|
|
693
|
-
status: 'queued' | 'delivered' | 'acked';
|
|
694
|
-
/** Ack status when the client has responded. */
|
|
695
|
-
ackStatus?: 'accepted' | 'completed' | 'failed' | 'rejected';
|
|
696
|
-
ackMessage?: string;
|
|
697
|
-
ackedAt?: string;
|
|
698
|
-
}
|
|
699
|
-
/**
|
|
700
|
-
* In-memory command audit ring. Capped; the Phase 2 persistence layer can
|
|
701
|
-
* sink entries to disk when wired (future). For now this gives the server a
|
|
702
|
-
* queryable history for `/api/commands` and snapshot enrichment.
|
|
703
|
-
*/
|
|
704
|
-
declare class HqCommandAuditLog {
|
|
705
|
-
private readonly entries;
|
|
706
|
-
private readonly max;
|
|
707
|
-
constructor(max?: number);
|
|
708
|
-
record(entry: HqCommandAuditEntry): void;
|
|
709
|
-
update(commandId: string, patch: Partial<HqCommandAuditEntry>): void;
|
|
710
|
-
recent(limit?: number): HqCommandAuditEntry[];
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
/**
|
|
714
|
-
* HQ alerting engine — evaluates the current snapshot against a set of
|
|
715
|
-
* operator-configurable rules and emits `hq.alert` messages when a threshold
|
|
716
|
-
* is crossed. Mirrors the BrainMonitor's self-activation logic (tool-failure
|
|
717
|
-
* streaks, error storms) but at the fleet-wide command-center scope.
|
|
718
|
-
*
|
|
719
|
-
* Rules are evaluated on a periodic tick (default 15s, unref'd) against the
|
|
720
|
-
* latest in-memory snapshot. Deduplication prevents alert storms: a rule that
|
|
721
|
-
* is still firing is not re-emitted until it clears (state machine per rule).
|
|
722
|
-
*
|
|
723
|
-
* @module hq/alerts
|
|
724
|
-
*/
|
|
725
|
-
|
|
726
|
-
/** Severity levels for alerts, mirroring {@link HqAlertMessage}. */
|
|
727
|
-
type HqAlertSeverity = HqAlertMessage['severity'];
|
|
728
|
-
interface HqAlert {
|
|
729
|
-
id: string;
|
|
730
|
-
ruleId: string;
|
|
731
|
-
severity: HqAlertSeverity;
|
|
732
|
-
message: string;
|
|
733
|
-
/** Epoch ms when the alert first fired in its current episode. */
|
|
734
|
-
firstFiredAt: number;
|
|
735
|
-
/** Epoch ms of the most recent evaluation that confirmed the alert. */
|
|
736
|
-
lastFiredAt: number;
|
|
737
|
-
}
|
|
738
|
-
interface HqAlertRuleConfig {
|
|
739
|
-
/** Maximum cost (USD) across the whole fleet before alerting. Default 50. */
|
|
740
|
-
costThresholdUsd?: number;
|
|
741
|
-
/** Seconds of silence from ALL machines before a stale alert fires. Default 120. */
|
|
742
|
-
staleMachineSeconds?: number;
|
|
743
|
-
/** Minimum number of active agents before concurrency alert fires. Default: disabled (0). */
|
|
744
|
-
maxAgents?: number;
|
|
745
|
-
}
|
|
746
|
-
/**
|
|
747
|
-
* In-memory alert state. Tracks which rules are currently firing so the same
|
|
748
|
-
* alert is not re-emitted every tick — only state transitions (cleared →
|
|
749
|
-
* firing) emit. Optionally persists to disk via a callback.
|
|
750
|
-
*/
|
|
751
|
-
declare class HqAlertEngine {
|
|
752
|
-
private readonly active;
|
|
753
|
-
private readonly history;
|
|
754
|
-
private readonly maxHistory;
|
|
755
|
-
private timer;
|
|
756
|
-
private readonly onAlert;
|
|
757
|
-
constructor(opts: {
|
|
758
|
-
onAlert: (alert: HqAlert) => void;
|
|
759
|
-
maxHistory?: number;
|
|
760
|
-
});
|
|
761
|
-
/**
|
|
762
|
-
* Evaluate all rules against the snapshot. Emits (via the `onAlert`
|
|
763
|
-
* callback) only for rules that newly transition to firing. Clears rules
|
|
764
|
-
* that are no longer firing. Returns the list of newly-fired alerts.
|
|
765
|
-
*/
|
|
766
|
-
evaluate(snapshot: HqSnapshot | null, config?: HqAlertRuleConfig, now?: number): HqAlert[];
|
|
767
|
-
/** Currently-active (firing) alerts. */
|
|
768
|
-
activeAlerts(): HqAlert[];
|
|
769
|
-
/** Historical alerts (newest-last), capped at maxHistory. */
|
|
770
|
-
recentAlerts(limit?: number): HqAlert[];
|
|
771
|
-
/**
|
|
772
|
-
* Start periodic evaluation against a snapshot getter. The timer is
|
|
773
|
-
* unref'd so it never keeps the process alive. Returns a disposer.
|
|
774
|
-
*/
|
|
775
|
-
startPeriodic(getSnapshot: () => HqSnapshot | null, config?: HqAlertRuleConfig | (() => HqAlertRuleConfig | undefined), intervalMs?: number): () => void;
|
|
776
|
-
}
|
|
777
|
-
/** Map an internal {@link HqAlert} to the wire {@link HqAlertMessage}. */
|
|
778
|
-
declare function toAlertMessage(alert: HqAlert): HqAlertMessage;
|
|
779
|
-
|
|
780
|
-
/**
|
|
781
|
-
* Transcript mapper — converts raw session JSONL events into the canonical
|
|
782
|
-
* {@link HqTranscriptEntry} shape used by HQ for full chat-history rendering.
|
|
783
|
-
*
|
|
784
|
-
* On-disk reality (see `types/session.ts` + `core/agent-tools.ts`):
|
|
785
|
-
* - A tool CALL (with its arguments) is NOT a standalone event — it is a
|
|
786
|
-
* `tool_use` content block inside the assistant's `llm_response`.
|
|
787
|
-
* - The tool RESULT is a separate `tool_result` event carrying the matching
|
|
788
|
-
* `id`.
|
|
789
|
-
* So we extract each `tool_use` block as a tool entry (args) at the assistant's
|
|
790
|
-
* position, then merge the later `tool_result` (matched by `id`) INTO that same
|
|
791
|
-
* entry — giving one box per tool (args + result) in strict chronological order.
|
|
792
|
-
*
|
|
793
|
-
* @module hq/transcript-mapper
|
|
794
|
-
*/
|
|
795
|
-
|
|
796
|
-
/**
|
|
797
|
-
* Map a single raw JSONL session event to zero or more transcript entries.
|
|
798
|
-
* An `llm_response` can yield an assistant text entry PLUS one tool entry per
|
|
799
|
-
* embedded `tool_use` block.
|
|
800
|
-
*/
|
|
801
|
-
declare function mapSessionEventToEntries(ev: Record<string, unknown>): HqTranscriptEntry[];
|
|
802
|
-
/**
|
|
803
|
-
* Merge each tool result into its matching args entry (by `toolUseId`),
|
|
804
|
-
* keeping the args entry's chronological position. Results with no matching
|
|
805
|
-
* args entry are kept as their own entries. Mutates/keeps order; pure w.r.t.
|
|
806
|
-
* input ordering.
|
|
807
|
-
*/
|
|
808
|
-
declare function mergeToolResults(flat: readonly HqTranscriptEntry[]): HqTranscriptEntry[];
|
|
809
|
-
/**
|
|
810
|
-
* Map + merge an array of raw JSONL events into the final transcript-entry
|
|
811
|
-
* list: strict chronological order, with each tool's args and result combined
|
|
812
|
-
* into a single entry.
|
|
813
|
-
*/
|
|
814
|
-
declare function buildTranscriptFromEvents(events: Iterable<Record<string, unknown>>): HqTranscriptEntry[];
|
|
815
|
-
|
|
816
|
-
export { type AgentMonitorEventBridgeOptions, type BrainTelemetryBridgeOptions, type CostTelemetryBridgeOptions, type CreateGlobalMailboxOptions, type CreateHqPublisherOptions, type EnsureHqFirstRunAuthResult, type FleetTelemetryBridgeOptions, HQ_AUTH_FILE_VERSION, HQ_COMMAND_TYPES, type HqAbortCommand, type HqAgentEventPublisher, type HqAlert, HqAlertEngine, HqAlertMessage, type HqAlertRuleConfig, type HqAlertSeverity, type HqAuthFile, type HqBroadcastCommand, type HqBrowserToken, type HqBtwCommand, HqClientCapability, HqClientIdentity, type HqCommand, type HqCommandAuditEntry, HqCommandAuditLog, type HqCommandType, HqEventEnvelope, HqEventLog, type HqEventLogOptions, type HqPersistence, HqPublisher, HqPublisherCommandHandler, type HqPublisherEnvConfig, type HqQueueCommand, HqQueuedCommand, type HqRedactOptions, HqRedactionPolicy, type HqRedactionResult, type HqRunCommandCommand, type HqRuntimeFile, HqSnapshot, HqSnapshotStore, type HqSnapshotStoreOptions, HqSocketFactory, type HqSpawnCommand, type HqSteerCommand, type HqTimeseriesSample, HqTimeseriesStore, type HqTimeseriesStoreOptions, type HqToken, HqTranscriptEntry, type SessionTelemetryBridgeOptions, type ToolTelemetryBridgeOptions, type WorktreeTelemetryBridgeOptions, buildTranscriptFromEvents, createGlobalMailbox, createHqPersistence, createHqPublisherFromEnv, defaultHqDataDir, discoverLocalHqEndpoint, emptyHqAuthFile, ensureHqFirstRunAuthFile, hqAuthFilePath, hqRuntimeFilePath, mapSessionEventToEntries, mergeToolResults, mintHqBrowserToken, mintHqToken, mutateHqAuthFile, readHqAuthFile, readHqRuntimeFileSync, redactHqEvent, redactHqValue, resolveHqConfig, resolveHqConfigFromEnv, resolveHqDataDir, scrubAndTruncateHqPreview, startAgentMonitorEventBridge, startBrainTelemetryBridge, startCostTelemetryBridge, startFleetTelemetryBridge, startSessionTelemetryBridge, startToolTelemetryBridge, startWorktreeTelemetryBridge, summarizeHqToolArgs, toAlertMessage, tokenHasCapability, validateHqCommand, watchHqAuthFile, writeHqAuthFile, writeHqRuntimeFile };
|
|
1
|
+
export * from './protocol.js';
|
|
2
|
+
export * from './redaction.js';
|
|
3
|
+
export * from './mailbox-mapper.js';
|
|
4
|
+
export * from './publisher.js';
|
|
5
|
+
export * from './factory.js';
|
|
6
|
+
export * from './auth-store.js';
|
|
7
|
+
export * from './agent-bridge.js';
|
|
8
|
+
export * from './session-bridge.js';
|
|
9
|
+
export * from './fleet-bridge.js';
|
|
10
|
+
export * from './brain-bridge.js';
|
|
11
|
+
export * from './worktree-bridge.js';
|
|
12
|
+
export * from './tool-bridge.js';
|
|
13
|
+
export * from './cost-bridge.js';
|
|
14
|
+
export * from './persistence.js';
|
|
15
|
+
export * from './commands.js';
|
|
16
|
+
export * from './alerts.js';
|
|
17
|
+
export * from './transcript-mapper.js';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|