@wrongstack/core 0.284.1 → 0.285.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-status-tracker.d.ts +74 -0
- package/dist/agent-status-tracker.d.ts.map +1 -0
- package/dist/autophase/auto-phase-planner.d.ts +79 -0
- package/dist/autophase/auto-phase-planner.d.ts.map +1 -0
- package/dist/autophase/auto-phase-runner.d.ts +79 -0
- package/dist/autophase/auto-phase-runner.d.ts.map +1 -0
- package/dist/autophase/checkpoint.d.ts +49 -0
- package/dist/autophase/checkpoint.d.ts.map +1 -0
- package/dist/autophase/index.d.ts +9 -0
- package/dist/autophase/index.d.ts.map +1 -0
- package/dist/autophase/phase-graph-builder.d.ts +46 -0
- package/dist/autophase/phase-graph-builder.d.ts.map +1 -0
- package/dist/autophase/phase-orchestrator.d.ts +150 -0
- package/dist/autophase/phase-orchestrator.d.ts.map +1 -0
- package/dist/autophase/phase-store.d.ts +29 -0
- package/dist/autophase/phase-store.d.ts.map +1 -0
- package/dist/autophase/types.d.ts +329 -0
- package/dist/autophase/types.d.ts.map +1 -0
- package/dist/boot.d.ts +73 -0
- package/dist/boot.d.ts.map +1 -0
- package/dist/coordination/adaptive-concurrency.d.ts +63 -0
- package/dist/coordination/adaptive-concurrency.d.ts.map +1 -0
- package/dist/coordination/agent-bridge.d.ts +24 -0
- package/dist/coordination/agent-bridge.d.ts.map +1 -0
- package/dist/coordination/agent-monitor.d.ts +100 -0
- package/dist/coordination/agent-monitor.d.ts.map +1 -0
- package/dist/coordination/agent-subagent-runner.d.ts +74 -0
- package/dist/coordination/agent-subagent-runner.d.ts.map +1 -0
- package/dist/coordination/agents/agent-prompts.d.ts +2 -0
- package/dist/coordination/agents/agent-prompts.d.ts.map +1 -0
- package/dist/coordination/agents/index.d.ts +35 -0
- package/dist/coordination/agents/index.d.ts.map +1 -0
- package/dist/coordination/agents/phase1-discovery.d.ts +4 -0
- package/dist/coordination/agents/phase1-discovery.d.ts.map +1 -0
- package/dist/coordination/agents/phase2-planning.d.ts +4 -0
- package/dist/coordination/agents/phase2-planning.d.ts.map +1 -0
- package/dist/coordination/agents/phase3-build.d.ts +4 -0
- package/dist/coordination/agents/phase3-build.d.ts.map +1 -0
- package/dist/coordination/agents/phase3-techstack.d.ts +13 -0
- package/dist/coordination/agents/phase3-techstack.d.ts.map +1 -0
- package/dist/coordination/agents/phase4-verify.d.ts +4 -0
- package/dist/coordination/agents/phase4-verify.d.ts.map +1 -0
- package/dist/coordination/agents/phase5-review.d.ts +4 -0
- package/dist/coordination/agents/phase5-review.d.ts.map +1 -0
- package/dist/coordination/agents/phase6-domain.d.ts +4 -0
- package/dist/coordination/agents/phase6-domain.d.ts.map +1 -0
- package/dist/coordination/agents/phase7-knowledge.d.ts +4 -0
- package/dist/coordination/agents/phase7-knowledge.d.ts.map +1 -0
- package/dist/coordination/agents/phase8-delivery.d.ts +4 -0
- package/dist/coordination/agents/phase8-delivery.d.ts.map +1 -0
- package/dist/coordination/agents/phase9-meta.d.ts +4 -0
- package/dist/coordination/agents/phase9-meta.d.ts.map +1 -0
- package/dist/coordination/agents/types.d.ts +79 -0
- package/dist/coordination/agents/types.d.ts.map +1 -0
- package/dist/coordination/agents.d.ts +8 -0
- package/dist/coordination/agents.d.ts.map +1 -0
- package/dist/coordination/auto-extend.d.ts +46 -0
- package/dist/coordination/auto-extend.d.ts.map +1 -0
- package/dist/coordination/autonomous-brain.d.ts +154 -0
- package/dist/coordination/autonomous-brain.d.ts.map +1 -0
- package/dist/coordination/autonomous-coordinator.d.ts +239 -0
- package/dist/coordination/autonomous-coordinator.d.ts.map +1 -0
- package/dist/coordination/brain-monitor.d.ts +74 -0
- package/dist/coordination/brain-monitor.d.ts.map +1 -0
- package/dist/coordination/brain.d.ts +104 -0
- package/dist/coordination/brain.d.ts.map +1 -0
- package/dist/coordination/change-manager.d.ts +151 -0
- package/dist/coordination/change-manager.d.ts.map +1 -0
- package/dist/coordination/checkpoint-wiring.d.ts +61 -0
- package/dist/coordination/checkpoint-wiring.d.ts.map +1 -0
- package/dist/coordination/collab-bus.d.ts +132 -0
- package/dist/coordination/collab-bus.d.ts.map +1 -0
- package/dist/coordination/collab-debug.d.ts +302 -0
- package/dist/coordination/collab-debug.d.ts.map +1 -0
- package/dist/coordination/commit-safety.d.ts +72 -0
- package/dist/coordination/commit-safety.d.ts.map +1 -0
- package/dist/coordination/consensus-protocol.d.ts +106 -0
- package/dist/coordination/consensus-protocol.d.ts.map +1 -0
- package/dist/coordination/coordinator/error-classifier.d.ts +15 -0
- package/dist/coordination/coordinator/error-classifier.d.ts.map +1 -0
- package/dist/coordination/delegate-tool.d.ts +101 -0
- package/dist/coordination/delegate-tool.d.ts.map +1 -0
- package/dist/coordination/dep-watcher-bridge.d.ts +47 -0
- package/dist/coordination/dep-watcher-bridge.d.ts.map +1 -0
- package/dist/coordination/dep-watcher.d.ts +74 -0
- package/dist/coordination/dep-watcher.d.ts.map +1 -0
- package/dist/coordination/director/director-errors.d.ts +29 -0
- package/dist/coordination/director/director-errors.d.ts.map +1 -0
- package/dist/coordination/director-construction.d.ts +90 -0
- package/dist/coordination/director-construction.d.ts.map +1 -0
- package/dist/coordination/director-prompts.d.ts +119 -0
- package/dist/coordination/director-prompts.d.ts.map +1 -0
- package/dist/coordination/director-session.d.ts +68 -0
- package/dist/coordination/director-session.d.ts.map +1 -0
- package/dist/coordination/director-tools.d.ts +65 -0
- package/dist/coordination/director-tools.d.ts.map +1 -0
- package/dist/coordination/director.d.ts +802 -0
- package/dist/coordination/director.d.ts.map +1 -0
- package/dist/coordination/dispatcher.d.ts +82 -0
- package/dist/coordination/dispatcher.d.ts.map +1 -0
- package/dist/coordination/file-author-tracker.d.ts +76 -0
- package/dist/coordination/file-author-tracker.d.ts.map +1 -0
- package/dist/coordination/fleet-bus.d.ts +122 -0
- package/dist/coordination/fleet-bus.d.ts.map +1 -0
- package/dist/coordination/fleet-event-validation.d.ts +10 -0
- package/dist/coordination/fleet-event-validation.d.ts.map +1 -0
- package/dist/coordination/fleet-manager.d.ts +234 -0
- package/dist/coordination/fleet-manager.d.ts.map +1 -0
- package/dist/coordination/fleet-spawn.d.ts +102 -0
- package/dist/coordination/fleet-spawn.d.ts.map +1 -0
- package/dist/coordination/fleet-status-tool.d.ts +36 -0
- package/dist/coordination/fleet-status-tool.d.ts.map +1 -0
- package/dist/coordination/fleet-supervisor.d.ts +157 -0
- package/dist/coordination/fleet-supervisor.d.ts.map +1 -0
- package/dist/coordination/fleet.d.ts +96 -0
- package/dist/coordination/fleet.d.ts.map +1 -0
- package/dist/coordination/global-mailbox.d.ts +234 -0
- package/dist/coordination/global-mailbox.d.ts.map +1 -0
- package/dist/coordination/icoordinator.d.ts +97 -0
- package/dist/coordination/icoordinator.d.ts.map +1 -0
- package/dist/coordination/ifleet-manager.d.ts +177 -0
- package/dist/coordination/ifleet-manager.d.ts.map +1 -0
- package/dist/coordination/in-memory-transport.d.ts +12 -0
- package/dist/coordination/in-memory-transport.d.ts.map +1 -0
- package/dist/coordination/index.d.ts +78 -2587
- package/dist/coordination/index.d.ts.map +1 -0
- package/dist/coordination/index.js +739 -254
- package/dist/coordination/index.js.map +7 -1
- package/dist/coordination/knowledge-graph.d.ts +217 -0
- package/dist/coordination/knowledge-graph.d.ts.map +1 -0
- package/dist/coordination/large-answer-store.d.ts +61 -0
- package/dist/coordination/large-answer-store.d.ts.map +1 -0
- package/dist/coordination/mail-tools.d.ts +34 -0
- package/dist/coordination/mail-tools.d.ts.map +1 -0
- package/dist/coordination/mailbox-actions.d.ts +68 -0
- package/dist/coordination/mailbox-actions.d.ts.map +1 -0
- package/dist/coordination/mailbox-health.d.ts +131 -0
- package/dist/coordination/mailbox-health.d.ts.map +1 -0
- package/dist/coordination/mailbox-hooks.d.ts +55 -0
- package/dist/coordination/mailbox-hooks.d.ts.map +1 -0
- package/dist/coordination/mailbox-tool.d.ts +75 -0
- package/dist/coordination/mailbox-tool.d.ts.map +1 -0
- package/dist/{mailbox-types-BGZWrYTJ.d.ts → coordination/mailbox-types.d.ts} +37 -22
- package/dist/coordination/mailbox-types.d.ts.map +1 -0
- package/dist/coordination/mailbox.d.ts +69 -0
- package/dist/coordination/mailbox.d.ts.map +1 -0
- package/dist/coordination/model-matrix.d.ts +98 -0
- package/dist/coordination/model-matrix.d.ts.map +1 -0
- package/dist/coordination/multi-agent-coordinator.d.ts +202 -0
- package/dist/coordination/multi-agent-coordinator.d.ts.map +1 -0
- package/dist/coordination/null-fleet-bus.d.ts +10 -0
- package/dist/coordination/null-fleet-bus.d.ts.map +1 -0
- package/dist/coordination/package-author-tracker.d.ts +87 -0
- package/dist/coordination/package-author-tracker.d.ts.map +1 -0
- package/dist/coordination/package-outdated-watcher.d.ts +83 -0
- package/dist/coordination/package-outdated-watcher.d.ts.map +1 -0
- package/dist/coordination/single-instance-mailbox.d.ts +154 -0
- package/dist/coordination/single-instance-mailbox.d.ts.map +1 -0
- package/dist/coordination/spawn-budget.d.ts +6 -0
- package/dist/coordination/spawn-budget.d.ts.map +1 -0
- package/dist/coordination/subagent-budget.d.ts +323 -0
- package/dist/coordination/subagent-budget.d.ts.map +1 -0
- package/dist/coordination/subagent-nicknames.d.ts +42 -0
- package/dist/coordination/subagent-nicknames.d.ts.map +1 -0
- package/dist/coordination/subagent-result-tool.d.ts +20 -0
- package/dist/coordination/subagent-result-tool.d.ts.map +1 -0
- package/dist/coordination/task-auctioneer.d.ts +143 -0
- package/dist/coordination/task-auctioneer.d.ts.map +1 -0
- package/dist/coordination/task-dag.d.ts +147 -0
- package/dist/coordination/task-dag.d.ts.map +1 -0
- package/dist/coordination/techstack-mailbox-consumer.d.ts +50 -0
- package/dist/coordination/techstack-mailbox-consumer.d.ts.map +1 -0
- package/dist/coordination/transport.d.ts +2 -0
- package/dist/coordination/transport.d.ts.map +1 -0
- package/dist/coordination/worktree-task-runner.d.ts +45 -0
- package/dist/coordination/worktree-task-runner.d.ts.map +1 -0
- package/dist/core/agent-internals.d.ts +41 -0
- package/dist/core/agent-internals.d.ts.map +1 -0
- package/dist/core/agent-loop.d.ts +18 -0
- package/dist/core/agent-loop.d.ts.map +1 -0
- package/dist/core/agent-response.d.ts +21 -0
- package/dist/core/agent-response.d.ts.map +1 -0
- package/dist/core/agent-tools.d.ts +21 -0
- package/dist/core/agent-tools.d.ts.map +1 -0
- package/dist/core/agent-types.d.ts +95 -0
- package/dist/core/agent-types.d.ts.map +1 -0
- package/dist/core/agent.d.ts +54 -0
- package/dist/core/agent.d.ts.map +1 -0
- package/dist/core/btw.d.ts +40 -0
- package/dist/core/btw.d.ts.map +1 -0
- package/dist/core/context.d.ts +269 -0
- package/dist/core/context.d.ts.map +1 -0
- package/dist/core/continue-intent.d.ts +92 -0
- package/dist/core/continue-intent.d.ts.map +1 -0
- package/dist/core/continue-to-next-iteration.d.ts +96 -0
- package/dist/core/continue-to-next-iteration.d.ts.map +1 -0
- package/dist/core/conversation-state.d.ts +96 -0
- package/dist/core/conversation-state.d.ts.map +1 -0
- package/dist/core/fallback-model.d.ts +94 -0
- package/dist/core/fallback-model.d.ts.map +1 -0
- package/dist/core/fleet-pulse.d.ts +42 -0
- package/dist/core/fleet-pulse.d.ts.map +1 -0
- package/dist/core/input-builder.d.ts +95 -0
- package/dist/core/input-builder.d.ts.map +1 -0
- package/dist/core/instruction-bundle.d.ts +22 -0
- package/dist/core/instruction-bundle.d.ts.map +1 -0
- package/dist/core/iteration-limit.d.ts +35 -0
- package/dist/core/iteration-limit.d.ts.map +1 -0
- package/dist/core/mailbox-loop.d.ts +63 -0
- package/dist/core/mailbox-loop.d.ts.map +1 -0
- package/dist/core/modes/brief.d.ts +2 -0
- package/dist/core/modes/brief.d.ts.map +1 -0
- package/dist/core/modes/default.d.ts +8 -0
- package/dist/core/modes/default.d.ts.map +1 -0
- package/dist/core/modes/teach.d.ts +2 -0
- package/dist/core/modes/teach.d.ts.map +1 -0
- package/dist/core/provider-runner.d.ts +24 -0
- package/dist/core/provider-runner.d.ts.map +1 -0
- package/dist/core/queued-messages.d.ts +55 -0
- package/dist/core/queued-messages.d.ts.map +1 -0
- package/dist/core/run-env.d.ts +49 -0
- package/dist/core/run-env.d.ts.map +1 -0
- package/dist/core/streaming-response-builder.d.ts +78 -0
- package/dist/core/streaming-response-builder.d.ts.map +1 -0
- package/dist/core/system-prompt-builder.d.ts +213 -0
- package/dist/core/system-prompt-builder.d.ts.map +1 -0
- package/dist/defaults/index.d.ts +68 -158
- package/dist/defaults/index.d.ts.map +1 -0
- package/dist/defaults/index.js +1257 -819
- package/dist/defaults/index.js.map +7 -1
- package/dist/execution/auto-compaction-middleware.d.ts +123 -0
- package/dist/execution/auto-compaction-middleware.d.ts.map +1 -0
- package/dist/execution/autonomous-runner.d.ts +55 -0
- package/dist/execution/autonomous-runner.d.ts.map +1 -0
- package/dist/execution/autonomy-brain.d.ts +90 -0
- package/dist/execution/autonomy-brain.d.ts.map +1 -0
- package/dist/execution/autonomy-prompt-contributor.d.ts +39 -0
- package/dist/execution/autonomy-prompt-contributor.d.ts.map +1 -0
- package/dist/execution/compaction-core.d.ts +103 -0
- package/dist/execution/compaction-core.d.ts.map +1 -0
- package/dist/execution/compactor.d.ts +56 -0
- package/dist/execution/compactor.d.ts.map +1 -0
- package/dist/execution/design-color.d.ts +31 -0
- package/dist/execution/design-color.d.ts.map +1 -0
- package/dist/execution/design-detect.d.ts +96 -0
- package/dist/execution/design-detect.d.ts.map +1 -0
- package/dist/execution/design-kit-loader.d.ts +53 -0
- package/dist/execution/design-kit-loader.d.ts.map +1 -0
- package/dist/execution/design-materialize.d.ts +32 -0
- package/dist/execution/design-materialize.d.ts.map +1 -0
- package/dist/execution/design-project-store.d.ts +57 -0
- package/dist/execution/design-project-store.d.ts.map +1 -0
- package/dist/execution/design-verify.d.ts +44 -0
- package/dist/execution/design-verify.d.ts.map +1 -0
- package/dist/execution/error-handler.d.ts +34 -0
- package/dist/execution/error-handler.d.ts.map +1 -0
- package/dist/{parallel-eternal-engine-HUrtePLd.d.ts → execution/eternal-autonomy.d.ts} +10 -225
- package/dist/execution/eternal-autonomy.d.ts.map +1 -0
- package/dist/execution/goal-preamble.d.ts +2 -0
- package/dist/execution/goal-preamble.d.ts.map +1 -0
- package/dist/execution/index.d.ts +21 -180
- package/dist/execution/index.d.ts.map +1 -0
- package/dist/execution/index.js +465 -180
- package/dist/execution/index.js.map +7 -1
- package/dist/execution/intelligent-compactor.d.ts +85 -0
- package/dist/execution/intelligent-compactor.d.ts.map +1 -0
- package/dist/execution/model-runtime.d.ts +75 -0
- package/dist/execution/model-runtime.d.ts.map +1 -0
- package/dist/execution/parallel-eternal-engine.d.ts +130 -0
- package/dist/execution/parallel-eternal-engine.d.ts.map +1 -0
- package/dist/execution/prompt-enhancer.d.ts +12 -13
- package/dist/execution/prompt-enhancer.d.ts.map +1 -0
- package/dist/execution/prompt-enhancer.js +13 -7
- package/dist/execution/prompt-enhancer.js.map +7 -1
- package/dist/execution/prompt-loader.d.ts +52 -0
- package/dist/execution/prompt-loader.d.ts.map +1 -0
- package/dist/execution/provider-runner-impl.d.ts +14 -0
- package/dist/execution/provider-runner-impl.d.ts.map +1 -0
- package/dist/execution/regex-patterns.d.ts +7 -0
- package/dist/execution/regex-patterns.d.ts.map +1 -0
- package/dist/execution/retry-policy.d.ts +35 -0
- package/dist/execution/retry-policy.d.ts.map +1 -0
- package/dist/execution/selective-compactor.d.ts +94 -0
- package/dist/execution/selective-compactor.d.ts.map +1 -0
- package/dist/execution/skill-loader.d.ts +43 -0
- package/dist/execution/skill-loader.d.ts.map +1 -0
- package/dist/execution/strategy-compactor.d.ts +43 -0
- package/dist/execution/strategy-compactor.d.ts.map +1 -0
- package/dist/execution/tool-executor.d.ts +112 -0
- package/dist/execution/tool-executor.d.ts.map +1 -0
- package/dist/extension/extension-points.d.ts +121 -0
- package/dist/extension/extension-points.d.ts.map +1 -0
- package/dist/extension/index.d.ts +3 -10
- package/dist/extension/index.d.ts.map +1 -0
- package/dist/extension/index.js +59 -5
- package/dist/extension/index.js.map +7 -1
- package/dist/extension/registry.d.ts +86 -0
- package/dist/extension/registry.d.ts.map +1 -0
- package/dist/fleet-notifier.d.ts +28 -0
- package/dist/fleet-notifier.d.ts.map +1 -0
- package/dist/hooks/http-executor.d.ts +11 -0
- package/dist/hooks/http-executor.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/registry.d.ts +71 -0
- package/dist/hooks/registry.d.ts.map +1 -0
- package/dist/hooks/runner.d.ts +65 -0
- package/dist/hooks/runner.d.ts.map +1 -0
- package/dist/hooks/shell-executor.d.ts +33 -0
- package/dist/hooks/shell-executor.d.ts.map +1 -0
- package/dist/hooks/shell-hooks-equal.d.ts +15 -0
- package/dist/hooks/shell-hooks-equal.d.ts.map +1 -0
- package/dist/hq/agent-bridge.d.ts +27 -0
- package/dist/hq/agent-bridge.d.ts.map +1 -0
- package/dist/hq/alerts.d.ts +67 -0
- package/dist/hq/alerts.d.ts.map +1 -0
- package/dist/hq/auth-store.d.ts +161 -0
- package/dist/hq/auth-store.d.ts.map +1 -0
- package/dist/hq/brain-bridge.d.ts +37 -0
- package/dist/hq/brain-bridge.d.ts.map +1 -0
- package/dist/hq/commands.d.ts +122 -0
- package/dist/hq/commands.d.ts.map +1 -0
- package/dist/hq/cost-bridge.d.ts +36 -0
- package/dist/hq/cost-bridge.d.ts.map +1 -0
- package/dist/hq/factory.d.ts +66 -0
- package/dist/hq/factory.d.ts.map +1 -0
- package/dist/hq/fleet-bridge.d.ts +39 -0
- package/dist/hq/fleet-bridge.d.ts.map +1 -0
- package/dist/hq/index.d.ts +18 -816
- package/dist/hq/index.d.ts.map +1 -0
- package/dist/hq/index.js +417 -122
- package/dist/hq/index.js.map +7 -1
- package/dist/hq/mailbox-mapper.d.ts +27 -0
- package/dist/hq/mailbox-mapper.d.ts.map +1 -0
- package/dist/hq/persistence.d.ts +121 -0
- package/dist/hq/persistence.d.ts.map +1 -0
- package/dist/hq/protocol.d.ts +560 -0
- package/dist/hq/protocol.d.ts.map +1 -0
- package/dist/hq/publisher.d.ts +177 -0
- package/dist/hq/publisher.d.ts.map +1 -0
- package/dist/hq/redaction.d.ts +30 -0
- package/dist/hq/redaction.d.ts.map +1 -0
- package/dist/hq/session-bridge.d.ts +29 -0
- package/dist/hq/session-bridge.d.ts.map +1 -0
- package/dist/hq/tool-bridge.d.ts +41 -0
- package/dist/hq/tool-bridge.d.ts.map +1 -0
- package/dist/hq/transcript-mapper.d.ts +36 -0
- package/dist/hq/transcript-mapper.d.ts.map +1 -0
- package/dist/hq/worktree-bridge.d.ts +34 -0
- package/dist/hq/worktree-bridge.d.ts.map +1 -0
- package/dist/index.d.ts +108 -2872
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2724 -1344
- package/dist/index.js.map +7 -1
- package/dist/infrastructure/context-manager.d.ts +92 -0
- package/dist/infrastructure/context-manager.d.ts.map +1 -0
- package/dist/infrastructure/index.d.ts +6 -64
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/infrastructure/index.js +39 -12
- package/dist/infrastructure/index.js.map +7 -1
- package/dist/infrastructure/logger.d.ts +99 -0
- package/dist/infrastructure/logger.d.ts.map +1 -0
- package/dist/infrastructure/mcp-servers.d.ts +83 -0
- package/dist/infrastructure/mcp-servers.d.ts.map +1 -0
- package/dist/{path-resolver-CMS5307d.d.ts → infrastructure/path-resolver.d.ts} +3 -5
- package/dist/infrastructure/path-resolver.d.ts.map +1 -0
- package/dist/infrastructure/token-counter.d.ts +57 -0
- package/dist/infrastructure/token-counter.d.ts.map +1 -0
- package/dist/kernel/container.d.ts +84 -0
- package/dist/kernel/container.d.ts.map +1 -0
- package/dist/{events-Bgnh43r9.d.ts → kernel/events.d.ts} +112 -206
- package/dist/kernel/events.d.ts.map +1 -0
- package/dist/kernel/index.d.ts +6 -107
- package/dist/kernel/index.d.ts.map +1 -0
- package/dist/kernel/index.js +56 -4
- package/dist/kernel/index.js.map +7 -1
- package/dist/kernel/pipeline.d.ts +105 -0
- package/dist/kernel/pipeline.d.ts.map +1 -0
- package/dist/kernel/run-controller.d.ts +55 -0
- package/dist/kernel/run-controller.d.ts.map +1 -0
- package/dist/kernel/tokens.d.ts +53 -0
- package/dist/kernel/tokens.d.ts.map +1 -0
- package/dist/mailbox-attach.d.ts +27 -0
- package/dist/mailbox-attach.d.ts.map +1 -0
- package/dist/middleware/collab-pause.d.ts +73 -0
- package/dist/middleware/collab-pause.d.ts.map +1 -0
- package/dist/models/codex-catalog.d.ts +41 -0
- package/dist/models/codex-catalog.d.ts.map +1 -0
- package/dist/models/index.d.ts +8 -163
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +150 -51
- package/dist/models/index.js.map +7 -1
- package/dist/models/llm-selector.d.ts +47 -0
- package/dist/models/llm-selector.d.ts.map +1 -0
- package/dist/models/mode-store.d.ts +22 -0
- package/dist/models/mode-store.d.ts.map +1 -0
- package/dist/models/model-intelligence.d.ts +56 -0
- package/dist/models/model-intelligence.d.ts.map +1 -0
- package/dist/models/model-router.d.ts +100 -0
- package/dist/models/model-router.d.ts.map +1 -0
- package/dist/models/models-registry.d.ts +106 -0
- package/dist/models/models-registry.d.ts.map +1 -0
- package/dist/models/provider-model-resolve.d.ts +69 -0
- package/dist/models/provider-model-resolve.d.ts.map +1 -0
- package/dist/observability/event-bridge.d.ts +10 -0
- package/dist/observability/event-bridge.d.ts.map +1 -0
- package/dist/observability/health.d.ts +18 -0
- package/dist/observability/health.d.ts.map +1 -0
- package/dist/observability/index.d.ts +9 -354
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +21 -8
- package/dist/observability/index.js.map +7 -1
- package/dist/observability/metrics.d.ts +26 -0
- package/dist/observability/metrics.d.ts.map +1 -0
- package/dist/observability/otel-tracer.d.ts +41 -0
- package/dist/observability/otel-tracer.d.ts.map +1 -0
- package/dist/observability/otlp-metrics.d.ts +111 -0
- package/dist/observability/otlp-metrics.d.ts.map +1 -0
- package/dist/observability/otlp-traces.d.ts +95 -0
- package/dist/observability/otlp-traces.d.ts.map +1 -0
- package/dist/observability/prometheus.d.ts +49 -0
- package/dist/observability/prometheus.d.ts.map +1 -0
- package/dist/observability/tracer.d.ts +9 -0
- package/dist/observability/tracer.d.ts.map +1 -0
- package/dist/plugin/api.d.ts +226 -0
- package/dist/plugin/api.d.ts.map +1 -0
- package/dist/plugin/loader.d.ts +73 -0
- package/dist/plugin/loader.d.ts.map +1 -0
- package/dist/plugins/chimera-plugin.d.ts +37 -0
- package/dist/plugins/chimera-plugin.d.ts.map +1 -0
- package/dist/plugins/git-plugin.d.ts +15 -0
- package/dist/plugins/git-plugin.d.ts.map +1 -0
- package/dist/plugins/observability-plugin.d.ts +19 -0
- package/dist/plugins/observability-plugin.d.ts.map +1 -0
- package/dist/plugins/plan-plugin.d.ts +16 -0
- package/dist/plugins/plan-plugin.d.ts.map +1 -0
- package/dist/plugins/prompts-plugin.d.ts +26 -0
- package/dist/plugins/prompts-plugin.d.ts.map +1 -0
- package/dist/plugins/security-plugin.d.ts +19 -0
- package/dist/plugins/security-plugin.d.ts.map +1 -0
- package/dist/plugins/skills-plugin.d.ts +42 -0
- package/dist/plugins/skills-plugin.d.ts.map +1 -0
- package/dist/plugins/sync-plugin.d.ts +22 -0
- package/dist/plugins/sync-plugin.d.ts.map +1 -0
- package/dist/prompts/index.d.ts +3 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/prompt-installer.d.ts +50 -0
- package/dist/prompts/prompt-installer.d.ts.map +1 -0
- package/dist/prompts/prompt-manifest-store.d.ts +18 -0
- package/dist/prompts/prompt-manifest-store.d.ts.map +1 -0
- package/dist/registry/provider-registry.d.ts +51 -0
- package/dist/registry/provider-registry.d.ts.map +1 -0
- package/dist/registry/slash-command-registry.d.ts +61 -0
- package/dist/registry/slash-command-registry.d.ts.map +1 -0
- package/dist/registry/tool-registry.d.ts +154 -0
- package/dist/registry/tool-registry.d.ts.map +1 -0
- package/dist/replay/hash.d.ts +31 -0
- package/dist/replay/hash.d.ts.map +1 -0
- package/dist/replay/replay-provider-runner.d.ts +53 -0
- package/dist/replay/replay-provider-runner.d.ts.map +1 -0
- package/dist/{index-CbyuOE5y.d.ts → security/capabilities.d.ts} +31 -34
- package/dist/security/capabilities.d.ts.map +1 -0
- package/dist/security/config-secrets.d.ts +25 -0
- package/dist/security/config-secrets.d.ts.map +1 -0
- package/dist/security/index.d.ts +6 -8
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +102 -381
- package/dist/security/index.js.map +7 -1
- package/dist/security/permission-policy.d.ts +153 -0
- package/dist/security/permission-policy.d.ts.map +1 -0
- package/dist/security/secret-scrubber.d.ts +14 -0
- package/dist/security/secret-scrubber.d.ts.map +1 -0
- package/dist/security/secret-vault.d.ts +87 -0
- package/dist/security/secret-vault.d.ts.map +1 -0
- package/dist/security/yolo-risk.d.ts +11 -0
- package/dist/security/yolo-risk.d.ts.map +1 -0
- package/dist/{session-registry-Dvg7i_IA.d.ts → session-registry.d.ts} +8 -9
- package/dist/session-registry.d.ts.map +1 -0
- package/dist/skills/foreign-sources.d.ts +59 -0
- package/dist/skills/foreign-sources.d.ts.map +1 -0
- package/dist/skills/frontmatter.d.ts +44 -0
- package/dist/skills/frontmatter.d.ts.map +1 -0
- package/dist/skills/github-fetcher.d.ts +38 -0
- package/dist/skills/github-fetcher.d.ts.map +1 -0
- package/dist/skills/index.d.ts +11 -582
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +81 -43
- package/dist/skills/index.js.map +7 -1
- package/dist/skills/limits.d.ts +92 -0
- package/dist/skills/limits.d.ts.map +1 -0
- package/dist/skills/manifest-store.d.ts +42 -0
- package/dist/skills/manifest-store.d.ts.map +1 -0
- package/dist/skills/registry/github-direct-adapter.d.ts +17 -0
- package/dist/skills/registry/github-direct-adapter.d.ts.map +1 -0
- package/dist/skills/registry/registry-adapter.d.ts +84 -0
- package/dist/skills/registry/registry-adapter.d.ts.map +1 -0
- package/dist/skills/registry/skills-sh-adapter.d.ts +13 -0
- package/dist/skills/registry/skills-sh-adapter.d.ts.map +1 -0
- package/dist/skills/skill-generator.d.ts +82 -0
- package/dist/skills/skill-generator.d.ts.map +1 -0
- package/dist/skills/skill-installer.d.ts +124 -0
- package/dist/skills/skill-installer.d.ts.map +1 -0
- package/dist/storage/annotations-store.d.ts +118 -0
- package/dist/storage/annotations-store.d.ts.map +1 -0
- package/dist/storage/attachment-store.d.ts +31 -0
- package/dist/storage/attachment-store.d.ts.map +1 -0
- package/dist/storage/cloud-sync.d.ts +44 -0
- package/dist/storage/cloud-sync.d.ts.map +1 -0
- package/dist/storage/completed-work-checkpoint.d.ts +11 -0
- package/dist/storage/completed-work-checkpoint.d.ts.map +1 -0
- package/dist/storage/config-loader.d.ts +104 -0
- package/dist/storage/config-loader.d.ts.map +1 -0
- package/dist/storage/config-migration.d.ts +87 -0
- package/dist/storage/config-migration.d.ts.map +1 -0
- package/dist/storage/config-store.d.ts +22 -0
- package/dist/storage/config-store.d.ts.map +1 -0
- package/dist/{director-state-CMS_bMs4.d.ts → storage/director-state.d.ts} +28 -8
- package/dist/storage/director-state.d.ts.map +1 -0
- package/dist/storage/file-session-writer.d.ts +169 -0
- package/dist/storage/file-session-writer.d.ts.map +1 -0
- package/dist/{goal-store-Datpp-ar.d.ts → storage/goal-store.d.ts} +26 -19
- package/dist/storage/goal-store.d.ts.map +1 -0
- package/dist/storage/index.d.ts +39 -1031
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +655 -300
- package/dist/storage/index.js.map +7 -1
- package/dist/storage/input-history-store.d.ts +56 -0
- package/dist/storage/input-history-store.d.ts.map +1 -0
- package/dist/storage/memory-backend.d.ts +66 -0
- package/dist/storage/memory-backend.d.ts.map +1 -0
- package/dist/storage/memory-consolidator.d.ts +50 -0
- package/dist/storage/memory-consolidator.d.ts.map +1 -0
- package/dist/storage/memory-graph-backend.d.ts +117 -0
- package/dist/storage/memory-graph-backend.d.ts.map +1 -0
- package/dist/storage/memory-store.d.ts +119 -0
- package/dist/storage/memory-store.d.ts.map +1 -0
- package/dist/storage/plan-store.d.ts +78 -0
- package/dist/storage/plan-store.d.ts.map +1 -0
- package/dist/storage/plan-templates.d.ts +21 -0
- package/dist/storage/plan-templates.d.ts.map +1 -0
- package/dist/storage/prompt-store.d.ts +37 -0
- package/dist/storage/prompt-store.d.ts.map +1 -0
- package/dist/storage/prompt-usage-store.d.ts +29 -0
- package/dist/storage/prompt-usage-store.d.ts.map +1 -0
- package/dist/storage/provider-config-watcher.d.ts +34 -0
- package/dist/storage/provider-config-watcher.d.ts.map +1 -0
- package/dist/storage/queue-store.d.ts +37 -0
- package/dist/storage/queue-store.d.ts.map +1 -0
- package/dist/storage/recovery-lock.d.ts +79 -0
- package/dist/storage/recovery-lock.d.ts.map +1 -0
- package/dist/storage/replay-log-store.d.ts +97 -0
- package/dist/storage/replay-log-store.d.ts.map +1 -0
- package/dist/storage/session-analyzer.d.ts +48 -0
- package/dist/storage/session-analyzer.d.ts.map +1 -0
- package/dist/storage/session-checkpoint-cas.d.ts +37 -0
- package/dist/storage/session-checkpoint-cas.d.ts.map +1 -0
- package/dist/{session-event-bridge-D_z_mBwk.d.ts → storage/session-event-bridge.d.ts} +14 -15
- package/dist/storage/session-event-bridge.d.ts.map +1 -0
- package/dist/storage/session-helpers.d.ts +9 -0
- package/dist/storage/session-helpers.d.ts.map +1 -0
- package/dist/storage/session-id.d.ts +18 -0
- package/dist/storage/session-id.d.ts.map +1 -0
- package/dist/storage/session-reader.d.ts +21 -0
- package/dist/storage/session-reader.d.ts.map +1 -0
- package/dist/storage/session-recovery.d.ts +93 -0
- package/dist/storage/session-recovery.d.ts.map +1 -0
- package/dist/storage/session-resume-validation.d.ts +6 -0
- package/dist/storage/session-resume-validation.d.ts.map +1 -0
- package/dist/storage/session-rewinder.d.ts +21 -0
- package/dist/storage/session-rewinder.d.ts.map +1 -0
- package/dist/storage/session-store.d.ts +210 -0
- package/dist/storage/session-store.d.ts.map +1 -0
- package/dist/storage/session-summary.d.ts +12 -0
- package/dist/storage/session-summary.d.ts.map +1 -0
- package/dist/storage/session-tool-call-ends.d.ts +5 -0
- package/dist/storage/session-tool-call-ends.d.ts.map +1 -0
- package/dist/storage/storage-concurrency.d.ts +2 -0
- package/dist/storage/storage-concurrency.d.ts.map +1 -0
- package/dist/storage/task-store.d.ts +33 -0
- package/dist/storage/task-store.d.ts.map +1 -0
- package/dist/storage/todos-checkpoint.d.ts +39 -0
- package/dist/storage/todos-checkpoint.d.ts.map +1 -0
- package/dist/storage/tool-audit-log.d.ts +141 -0
- package/dist/storage/tool-audit-log.d.ts.map +1 -0
- package/dist/tasking/index.d.ts +3 -124
- package/dist/tasking/index.d.ts.map +1 -0
- package/dist/tasking/index.js +57 -4
- package/dist/tasking/index.js.map +7 -1
- package/dist/tasking/task-store.d.ts +22 -0
- package/dist/tasking/task-store.d.ts.map +1 -0
- package/dist/tasking/task-tracker.d.ts +102 -0
- package/dist/tasking/task-tracker.d.ts.map +1 -0
- package/dist/tools/index.d.ts +2 -59
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +93 -14
- package/dist/tools/index.js.map +7 -1
- package/dist/tools/mcp-control.d.ts +53 -0
- package/dist/tools/mcp-control.d.ts.map +1 -0
- package/dist/tools/mcp-use.d.ts +24 -0
- package/dist/tools/mcp-use.d.ts.map +1 -0
- package/dist/types/agent-bridge.d.ts +42 -0
- package/dist/types/agent-bridge.d.ts.map +1 -0
- package/dist/types/attachment.d.ts +54 -0
- package/dist/types/attachment.d.ts.map +1 -0
- package/dist/types/autonomy.d.ts +5 -0
- package/dist/types/autonomy.d.ts.map +1 -0
- package/dist/types/blocks.d.ts +76 -0
- package/dist/types/blocks.d.ts.map +1 -0
- package/dist/{compactor-DQLL4HTo.d.ts → types/compactor.d.ts} +5 -7
- package/dist/types/compactor.d.ts.map +1 -0
- package/dist/{config-MRqn1V-u.d.ts → types/config.d.ts} +135 -354
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/context-evidence.d.ts +68 -0
- package/dist/types/context-evidence.d.ts.map +1 -0
- package/dist/types/context-window.d.ts +35 -0
- package/dist/types/context-window.d.ts.map +1 -0
- package/dist/{default-config-B79_gJYv.d.ts → types/default-config.d.ts} +10 -11
- package/dist/types/default-config.d.ts.map +1 -0
- package/dist/types/design-kit.d.ts +91 -0
- package/dist/types/design-kit.d.ts.map +1 -0
- package/dist/{retry-policy-CQ7KwXJa.d.ts → types/error-handler.d.ts} +5 -12
- package/dist/types/error-handler.d.ts.map +1 -0
- package/dist/types/errors.d.ts +277 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/hooks.d.ts +167 -0
- package/dist/types/hooks.d.ts.map +1 -0
- package/dist/types/index.d.ts +40 -244
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +90 -12
- package/dist/types/index.js.map +7 -1
- package/dist/{input-reader-E-ffP2ee.d.ts → types/input-reader.d.ts} +3 -4
- package/dist/types/input-reader.d.ts.map +1 -0
- package/dist/{logger-B63L5bTg.d.ts → types/logger.d.ts} +3 -4
- package/dist/types/logger.d.ts.map +1 -0
- package/dist/types/memory.d.ts +89 -0
- package/dist/types/memory.d.ts.map +1 -0
- package/dist/types/messages.d.ts +24 -0
- package/dist/types/messages.d.ts.map +1 -0
- package/dist/types/mode-prompts.d.ts +2 -0
- package/dist/types/mode-prompts.d.ts.map +1 -0
- package/dist/{mode-CZlO9iU1.d.ts → types/mode.d.ts} +6 -7
- package/dist/types/mode.d.ts.map +1 -0
- package/dist/types/models-registry.d.ts +105 -0
- package/dist/types/models-registry.d.ts.map +1 -0
- package/dist/types/multi-agent.d.ts +435 -0
- package/dist/types/multi-agent.d.ts.map +1 -0
- package/dist/{observability-D-HZN_mF.d.ts → types/observability.d.ts} +12 -13
- package/dist/types/observability.d.ts.map +1 -0
- package/dist/{path-resolver-CPRj4bFY.d.ts → types/path-resolver.d.ts} +2 -3
- package/dist/types/path-resolver.d.ts.map +1 -0
- package/dist/{permission-ByDKXEcG.d.ts → types/permission.d.ts} +8 -9
- package/dist/types/permission.d.ts.map +1 -0
- package/dist/types/plugin.d.ts +385 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/prompt-registry.d.ts +81 -0
- package/dist/types/prompt-registry.d.ts.map +1 -0
- package/dist/{prompt-DLd35n4Q.d.ts → types/prompt.d.ts} +14 -15
- package/dist/types/prompt.d.ts.map +1 -0
- package/dist/{provider-runner-ChL-kVg6.d.ts → types/provider-runner.d.ts} +9 -10
- package/dist/types/provider-runner.d.ts.map +1 -0
- package/dist/types/provider.d.ts +387 -0
- package/dist/types/provider.d.ts.map +1 -0
- package/dist/types/renderer.d.ts +23 -0
- package/dist/types/renderer.d.ts.map +1 -0
- package/dist/types/retry-policy.d.ts +7 -0
- package/dist/types/retry-policy.d.ts.map +1 -0
- package/dist/types/secret-scrubber.d.ts +5 -0
- package/dist/types/secret-scrubber.d.ts.map +1 -0
- package/dist/{secret-vault-BAKpgFw_.d.ts → types/secret-vault.d.ts} +13 -7
- package/dist/types/secret-vault.d.ts.map +1 -0
- package/dist/{selector-D8O6B_Rm.d.ts → types/selector.d.ts} +4 -6
- package/dist/types/selector.d.ts.map +1 -0
- package/dist/types/session-reader.d.ts +81 -0
- package/dist/types/session-reader.d.ts.map +1 -0
- package/dist/{session-rewinder-C9HnMkhP.d.ts → types/session-rewinder.d.ts} +5 -6
- package/dist/types/session-rewinder.d.ts.map +1 -0
- package/dist/types/session.d.ts +650 -0
- package/dist/types/session.d.ts.map +1 -0
- package/dist/types/side-effect.d.ts +34 -0
- package/dist/types/side-effect.d.ts.map +1 -0
- package/dist/{skill-DHniprNl.d.ts → types/skill.d.ts} +4 -5
- package/dist/types/skill.d.ts.map +1 -0
- package/dist/types/slash-command.d.ts +59 -0
- package/dist/types/slash-command.d.ts.map +1 -0
- package/dist/types/spec.d.ts +77 -0
- package/dist/types/spec.d.ts.map +1 -0
- package/dist/types/system-prompt-contributor.d.ts +20 -0
- package/dist/types/system-prompt-contributor.d.ts.map +1 -0
- package/dist/types/system-prompt.d.ts +51 -0
- package/dist/types/system-prompt.d.ts.map +1 -0
- package/dist/{task-graph-CH3acNQ7.d.ts → types/task-graph.d.ts} +21 -22
- package/dist/types/task-graph.d.ts.map +1 -0
- package/dist/types/token-counter.d.ts +42 -0
- package/dist/types/token-counter.d.ts.map +1 -0
- package/dist/types/tool-executor.d.ts +133 -0
- package/dist/types/tool-executor.d.ts.map +1 -0
- package/dist/types/tool-markers.d.ts +23 -0
- package/dist/types/tool-markers.d.ts.map +1 -0
- package/dist/types/tool.d.ts +245 -0
- package/dist/types/tool.d.ts.map +1 -0
- package/dist/types/utility-types.d.ts +31 -0
- package/dist/types/utility-types.d.ts.map +1 -0
- package/dist/utils/assert-never.d.ts +14 -0
- package/dist/utils/assert-never.d.ts.map +1 -0
- package/dist/utils/atomic-write.d.ts +12 -0
- package/dist/utils/atomic-write.d.ts.map +1 -0
- package/dist/utils/child-env.d.ts +67 -0
- package/dist/utils/child-env.d.ts.map +1 -0
- package/dist/utils/color.d.ts +20 -0
- package/dist/utils/color.d.ts.map +1 -0
- package/dist/utils/config-json.d.ts +14 -0
- package/dist/utils/config-json.d.ts.map +1 -0
- package/dist/utils/context-evidence.d.ts +47 -0
- package/dist/utils/context-evidence.d.ts.map +1 -0
- package/dist/utils/deep-merge.d.ts +64 -0
- package/dist/utils/deep-merge.d.ts.map +1 -0
- package/dist/utils/diff.d.ts +11 -0
- package/dist/utils/diff.d.ts.map +1 -0
- package/dist/utils/error.d.ts +2 -3
- package/dist/utils/error.d.ts.map +1 -0
- package/dist/utils/error.js +3 -3
- package/dist/utils/error.js.map +7 -1
- package/dist/utils/expect-defined.d.ts +2 -3
- package/dist/utils/expect-defined.d.ts.map +1 -0
- package/dist/utils/expect-defined.js +3 -3
- package/dist/utils/expect-defined.js.map +7 -1
- package/dist/utils/glob-expand.d.ts +10 -0
- package/dist/utils/glob-expand.d.ts.map +1 -0
- package/dist/utils/glob-match.d.ts +4 -0
- package/dist/utils/glob-match.d.ts.map +1 -0
- package/dist/utils/index.d.ts +37 -920
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +242 -33
- package/dist/utils/index.js.map +7 -1
- package/dist/utils/instruction-file.d.ts +3 -0
- package/dist/utils/instruction-file.d.ts.map +1 -0
- package/dist/utils/ip-guard.d.ts +34 -0
- package/dist/utils/ip-guard.d.ts.map +1 -0
- package/dist/utils/json-repair.d.ts +23 -0
- package/dist/utils/json-repair.d.ts.map +1 -0
- package/dist/utils/json-schema-validate.d.ts +42 -0
- package/dist/utils/json-schema-validate.d.ts.map +1 -0
- package/dist/utils/lru-cache.d.ts +29 -0
- package/dist/utils/lru-cache.d.ts.map +1 -0
- package/dist/utils/merge-custom-models.d.ts +12 -0
- package/dist/utils/merge-custom-models.d.ts.map +1 -0
- package/dist/utils/merge-models-payload.d.ts +20 -0
- package/dist/utils/merge-models-payload.d.ts.map +1 -0
- package/dist/utils/message-invariants.d.ts +22 -0
- package/dist/utils/message-invariants.d.ts.map +1 -0
- package/dist/utils/newline-normalize.d.ts +5 -0
- package/dist/utils/newline-normalize.d.ts.map +1 -0
- package/dist/utils/regex-guard.d.ts +21 -0
- package/dist/utils/regex-guard.d.ts.map +1 -0
- package/dist/utils/safe-json.d.ts +31 -0
- package/dist/utils/safe-json.d.ts.map +1 -0
- package/dist/utils/session-scoped-path.d.ts +13 -0
- package/dist/utils/session-scoped-path.d.ts.map +1 -0
- package/dist/utils/sleep.d.ts +5 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/slug.d.ts +13 -0
- package/dist/utils/slug.d.ts.map +1 -0
- package/dist/utils/string.d.ts +9 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/task-format.d.ts +22 -0
- package/dist/utils/task-format.d.ts.map +1 -0
- package/dist/utils/term.d.ts +133 -0
- package/dist/utils/term.d.ts.map +1 -0
- package/dist/utils/todos-format.d.ts +30 -0
- package/dist/utils/todos-format.d.ts.map +1 -0
- package/dist/utils/token-estimate.d.ts +112 -0
- package/dist/utils/token-estimate.d.ts.map +1 -0
- package/dist/utils/tool-description-mode.d.ts +28 -0
- package/dist/utils/tool-description-mode.d.ts.map +1 -0
- package/dist/utils/tool-output-serializer.d.ts +40 -0
- package/dist/utils/tool-output-serializer.d.ts.map +1 -0
- package/dist/utils/tool-result-render-mode.d.ts +55 -0
- package/dist/utils/tool-result-render-mode.d.ts.map +1 -0
- package/dist/utils/tool-subject.d.ts +5 -0
- package/dist/utils/tool-subject.d.ts.map +1 -0
- package/dist/utils/tool-wire-compact.d.ts +28 -0
- package/dist/utils/tool-wire-compact.d.ts.map +1 -0
- package/dist/utils/ulid.d.ts +11 -0
- package/dist/utils/ulid.d.ts.map +1 -0
- package/dist/{wstack-paths-C3K40Qst.d.ts → utils/wstack-paths.d.ts} +7 -8
- package/dist/utils/wstack-paths.d.ts.map +1 -0
- package/dist/worktree/index.d.ts +2 -0
- package/dist/worktree/index.d.ts.map +1 -0
- package/dist/{worktree-manager-DzwxKE35.d.ts → worktree/worktree-manager.d.ts} +19 -13
- package/dist/worktree/worktree-manager.d.ts.map +1 -0
- package/instructions/autonomy/active-mission.md +2 -4
- package/instructions/sections/tool/delegation-full.md +1 -1
- package/package.json +4 -5
- package/skills/node-modern/SKILL.md +2 -2
- package/skills/plugin-author/SKILL.md +9 -16
- package/dist/dispatcher-types.d-BBeXBQgS.d.ts +0 -66
- package/dist/global-mailbox-sZwyI6CS.d.ts +0 -959
- package/dist/index--Gm41aBJ.d.ts +0 -671
- package/dist/mcp-servers-DEV4s6Ks.d.ts +0 -259
- package/dist/multi-agent-coordinator-4RCRZKjN.d.ts +0 -1770
- package/dist/null-fleet-bus-CFoNVQEK.d.ts +0 -2127
- package/dist/pipeline-DGDyIohT.d.ts +0 -331
- package/dist/provider-model-resolve-o2hHLs79.d.ts +0 -263
- package/dist/secret-scrubber-3MHDDAtm.d.ts +0 -6
- package/dist/secret-vault-DxohkUBc.d.ts +0 -272
- package/dist/session-reader-7Esxrkpw.d.ts +0 -155
- package/dist/task-format-GX0B1mMC.d.ts +0 -23
- package/dist/todos-checkpoint-FY7PjmMx.d.ts +0 -850
- package/dist/tool-BNlnIJvo.d.ts +0 -2190
- package/dist/tool-executor-CckSCM5E.d.ts +0 -906
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cross-provider fallback model extension.
|
|
3
|
+
*
|
|
4
|
+
* Lives in core so EVERY agent surface can reuse it: the CLI leader, the CLI
|
|
5
|
+
* director/host subagent factory, and the runtime light subagent factory (used
|
|
6
|
+
* by standalone SDD runs). It wraps the provider runner and, when the active
|
|
7
|
+
* model 429s / overloads / stream-hangs, rotates through a fallback chain. The
|
|
8
|
+
* chain is recomputed from live config every turn, so changes take effect
|
|
9
|
+
* without a restart; an empty chain makes the wrapper a no-op.
|
|
10
|
+
*
|
|
11
|
+
* Moved here from `@wrongstack/cli` (it only ever depended on core types) so the
|
|
12
|
+
* runtime light factory can wire fallbacks for SDD worker subagents.
|
|
13
|
+
*/
|
|
14
|
+
import type { AgentExtension } from '../extension/extension-points.js';
|
|
15
|
+
import type { EventBus } from '../kernel/events.js';
|
|
16
|
+
import type { Config } from '../types/config.js';
|
|
17
|
+
import type { Logger } from '../types/logger.js';
|
|
18
|
+
import { type Provider } from '../types/provider.js';
|
|
19
|
+
export interface FallbackModelDeps {
|
|
20
|
+
/** Returns the live config (re-read each turn so `/model` switches are honored). */
|
|
21
|
+
getConfig: () => Config;
|
|
22
|
+
/**
|
|
23
|
+
* Builds a credential-resolved Provider for a provider id (alias-resolved),
|
|
24
|
+
* WITHOUT persisting anything to config/configStore. Supplied by the boot
|
|
25
|
+
* path, which shares this with the `/model` switch logic. May be async — the
|
|
26
|
+
* subagent host resolves a provider's real context window asynchronously.
|
|
27
|
+
*/
|
|
28
|
+
buildProvider: (providerId: string, modelId?: string | undefined) => Provider | Promise<Provider>;
|
|
29
|
+
/**
|
|
30
|
+
* Called after the active model changes (a fallback hop or the primary
|
|
31
|
+
* restore) so the host can refresh the auto-compaction / context-window
|
|
32
|
+
* denominator — important when a fallback crosses to a smaller-window model.
|
|
33
|
+
*/
|
|
34
|
+
onModelSwitch?: (providerId: string, modelId: string) => void | Promise<void>;
|
|
35
|
+
events: EventBus;
|
|
36
|
+
/** Optional — warnings about un-buildable fallback providers. */
|
|
37
|
+
logger?: Logger | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Base cooldown after the configured primary fails with a fallback-worthy
|
|
40
|
+
* error. While active, `beforeRun` leaves the context on the working fallback
|
|
41
|
+
* instead of retrying the primary at the start of every turn. Default: 60s.
|
|
42
|
+
* Set 0 to preserve the legacy "probe primary every turn" behavior.
|
|
43
|
+
*/
|
|
44
|
+
primaryCooldownMs?: number | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Maximum exponential cooldown for repeated failed primary probes. Default:
|
|
47
|
+
* 10 minutes. Ignored when `primaryCooldownMs` is 0.
|
|
48
|
+
*/
|
|
49
|
+
primaryCooldownMaxMs?: number | undefined;
|
|
50
|
+
/** Test hook for deterministic cooldown assertions. */
|
|
51
|
+
now?: (() => number) | undefined;
|
|
52
|
+
}
|
|
53
|
+
interface ModelRef {
|
|
54
|
+
provider?: string | undefined;
|
|
55
|
+
model: string;
|
|
56
|
+
}
|
|
57
|
+
/** Parse a fallback entry: `model`, `provider/model`, or `provider model`. */
|
|
58
|
+
export declare function parseModelRef(ref: string): ModelRef;
|
|
59
|
+
export declare function formatModelRef(ref: ModelRef, defaultProvider?: string | undefined): string;
|
|
60
|
+
export declare function normalizeModelRef(ref: string, defaultProvider?: string | undefined): string;
|
|
61
|
+
export declare function fallbackProfileChain(config: Config, profileName: string | undefined): string[];
|
|
62
|
+
/**
|
|
63
|
+
* Derive a fallback chain from the configured providers when the user has not
|
|
64
|
+
* set an explicit `fallbackModels` list. Picks declared models from every
|
|
65
|
+
* keyed provider — same-provider alternatives first (same key, cheapest
|
|
66
|
+
* failover), then cross-provider — excluding the active leader model. Returns
|
|
67
|
+
* `[]` when nothing usable is configured (e.g. providers with no `models`
|
|
68
|
+
* list), in which case the extension is a no-op.
|
|
69
|
+
*/
|
|
70
|
+
export declare function smartDefaultFallbackChain(config: Config): string[];
|
|
71
|
+
/**
|
|
72
|
+
* The effective fallback chain for a turn: the explicit `fallbackModels` list
|
|
73
|
+
* when non-empty, otherwise the smart default (unless `fallbackAuto` is off).
|
|
74
|
+
*/
|
|
75
|
+
export declare function effectiveFallbackChain(config: Config): string[];
|
|
76
|
+
/**
|
|
77
|
+
* Build the cross-provider fallback extension. Always returns an extension —
|
|
78
|
+
* the effective chain (`effectiveFallbackChain`) is recomputed every turn from
|
|
79
|
+
* the live config, so a chain that is empty at boot but populated later (via
|
|
80
|
+
* `/fallback add` or the smart default kicking in once a key is added) takes
|
|
81
|
+
* effect WITHOUT a restart. An empty chain makes the wrapper a no-op (it just
|
|
82
|
+
* rethrows the original error).
|
|
83
|
+
*
|
|
84
|
+
* Mechanism (see plan): wraps the provider runner. The inner runner already
|
|
85
|
+
* applies the per-model retry policy (backoff, up to 5 tries for 429), so the
|
|
86
|
+
* fallback only engages AFTER the active model's own retries are exhausted.
|
|
87
|
+
* Because the wrapper resolves within a single provider call, it does not
|
|
88
|
+
* consume the agent loop's `recoveryRetries` budget — chains longer than two
|
|
89
|
+
* entries work. `beforeRun` keeps the last working fallback while the primary
|
|
90
|
+
* is cooling down, then restores the configured primary for a half-open probe.
|
|
91
|
+
*/
|
|
92
|
+
export declare function createFallbackModelExtension(deps: FallbackModelDeps): AgentExtension;
|
|
93
|
+
export {};
|
|
94
|
+
//# sourceMappingURL=fallback-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fallback-model.d.ts","sourceRoot":"","sources":["../../src/core/fallback-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAA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AE,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAG3F;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,CAI9F;AAgDD;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAqClE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAa/D;AAiDD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,iBAAiB,GAAG,cAAc,CAuIpF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* fleet-pulse — pure formatter for the periodic peer-status digest.
|
|
3
|
+
*
|
|
4
|
+
* Every agent on a project (leader and fleet subagents alike) periodically
|
|
5
|
+
* gets a compact "[FLEET PULSE]" block folded into its conversation so it
|
|
6
|
+
* knows what its peers are doing — who is running what task, who went
|
|
7
|
+
* idle, who finished. This is the push half of peer awareness (the pull
|
|
8
|
+
* half is the `fleet_status` tool).
|
|
9
|
+
*
|
|
10
|
+
* This module is data-in/text-out only: it never touches the mailbox or
|
|
11
|
+
* the filesystem, so core/ stays free of runtime coordination/ imports
|
|
12
|
+
* (architecture Rule 3 — same posture as mailbox-loop.ts). The composition
|
|
13
|
+
* glue that feeds it live `MailboxAgentStatus[]` lives in
|
|
14
|
+
* ../mailbox-attach.ts (`attachFleetPulse`).
|
|
15
|
+
*
|
|
16
|
+
* @module fleet-pulse
|
|
17
|
+
*/
|
|
18
|
+
import type { MailboxAgentStatus } from '../coordination/mailbox-types.js';
|
|
19
|
+
export interface FleetPulseOptions {
|
|
20
|
+
/** This agent's own mailbox id — excluded from the digest. */
|
|
21
|
+
selfId: string;
|
|
22
|
+
/** Max peers listed (rest summarized as "+N more"). Default 15. */
|
|
23
|
+
maxAgents?: number | undefined;
|
|
24
|
+
/** Hard cap on total digest characters. Default 900. */
|
|
25
|
+
maxChars?: number | undefined;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Stable signature over the fields that matter to a reader — used by the
|
|
29
|
+
* caller to skip re-injection when nothing meaningful changed since the
|
|
30
|
+
* last pulse. Deliberately excludes counters (iterations/toolCalls) and
|
|
31
|
+
* timestamps: those tick constantly and would defeat the dedup.
|
|
32
|
+
*/
|
|
33
|
+
export declare function fleetPulseSignature(statuses: MailboxAgentStatus[]): string;
|
|
34
|
+
/**
|
|
35
|
+
* Build the digest block, or `null` when there is nothing worth saying
|
|
36
|
+
* (no online peers besides self). The caller owns cadence and dedup.
|
|
37
|
+
*/
|
|
38
|
+
export declare function buildFleetPulseBlock(statuses: MailboxAgentStatus[], opts: FleetPulseOptions): {
|
|
39
|
+
type: 'text';
|
|
40
|
+
text: string;
|
|
41
|
+
} | null;
|
|
42
|
+
//# sourceMappingURL=fleet-pulse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fleet-pulse.d.ts","sourceRoot":"","sources":["../../src/core/fleet-pulse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,WAAW,iBAAiB;IAChC,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAMD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAK1E;AAiBD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,kBAAkB,EAAE,EAC9B,IAAI,EAAE,iBAAiB,GACtB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAgCvC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { AddAttachmentInput, AttachmentRef, AttachmentStore } from '../types/attachment.js';
|
|
2
|
+
import type { ContentBlock } from '../types/blocks.js';
|
|
3
|
+
export interface InputBuilderOptions {
|
|
4
|
+
store: AttachmentStore;
|
|
5
|
+
/**
|
|
6
|
+
* Pastes ≥ this many lines collapse to a `[pasted #N]` placeholder.
|
|
7
|
+
* Default: 8 lines.
|
|
8
|
+
*/
|
|
9
|
+
pasteLineThreshold?: number | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Pastes ≥ this many characters collapse to a placeholder regardless of
|
|
12
|
+
* line count. Default: 2000 chars.
|
|
13
|
+
*/
|
|
14
|
+
pasteCharThreshold?: number | undefined;
|
|
15
|
+
}
|
|
16
|
+
export interface InputBuilderEvent {
|
|
17
|
+
/** Current display string (with placeholders, before submit). */
|
|
18
|
+
display: string;
|
|
19
|
+
refs: AttachmentRef[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* UI-agnostic accumulator for user input. The frontend (CLI/TUI) feeds in:
|
|
23
|
+
* - typed text via `appendText()`
|
|
24
|
+
* - large pastes via `appendPaste()` → returns placeholder string
|
|
25
|
+
* - image paste via `appendImage()` → returns placeholder string
|
|
26
|
+
* - file refs (`@path`) via `appendFile()` → returns placeholder string
|
|
27
|
+
*
|
|
28
|
+
* On `submit()` the builder runs the display string through AttachmentStore.expand()
|
|
29
|
+
* and returns the final ContentBlock[] ready for `agent.run()`.
|
|
30
|
+
*
|
|
31
|
+
* The builder does not know what a "line" or "key" is — that is the
|
|
32
|
+
* frontend's job. It only operates on strings and byte payloads.
|
|
33
|
+
*/
|
|
34
|
+
export declare class InputBuilder {
|
|
35
|
+
private readonly store;
|
|
36
|
+
private readonly pasteLineThreshold;
|
|
37
|
+
private readonly pasteCharThreshold;
|
|
38
|
+
private display;
|
|
39
|
+
private readonly refs;
|
|
40
|
+
constructor(opts: InputBuilderOptions);
|
|
41
|
+
get text(): string;
|
|
42
|
+
get attachments(): AttachmentRef[];
|
|
43
|
+
get isEmpty(): boolean;
|
|
44
|
+
appendText(text: string): void;
|
|
45
|
+
/**
|
|
46
|
+
* Decide whether a chunk of pasted text is "big" enough to collapse.
|
|
47
|
+
* If yes, store it and append a placeholder. If no, inline it.
|
|
48
|
+
* Returns the placeholder string actually appended (or `null` if inlined).
|
|
49
|
+
*/
|
|
50
|
+
appendPaste(text: string): Promise<string | null>;
|
|
51
|
+
/**
|
|
52
|
+
* Always collapses to `[image #N]` — images are never inlined.
|
|
53
|
+
* `dataBase64` is the raw base64 payload (no data: prefix).
|
|
54
|
+
*/
|
|
55
|
+
appendImage(dataBase64: string, mediaType: string): Promise<string>;
|
|
56
|
+
appendFile(input: AddAttachmentInput): Promise<string>;
|
|
57
|
+
/**
|
|
58
|
+
* Register-only variant of `appendPaste`. Always stores the paste and
|
|
59
|
+
* returns the inline `[pasted #N, L lines]` token WITHOUT mutating
|
|
60
|
+
* `display` — the caller (TUI) owns its own editable buffer as the single
|
|
61
|
+
* source of truth, inserts the token there, and expands the buffer at
|
|
62
|
+
* submit. The collapse decision is the caller's (it gates this call); use
|
|
63
|
+
* `wouldCollapse()` for that.
|
|
64
|
+
*/
|
|
65
|
+
registerPaste(text: string): Promise<string>;
|
|
66
|
+
/**
|
|
67
|
+
* Register-only variant of `appendImage` — see `registerPaste`. Returns a
|
|
68
|
+
* seq-keyed `[image #N, LABEL]` token; does not touch `display`.
|
|
69
|
+
*/
|
|
70
|
+
registerImage(dataBase64: string, mediaType: string): Promise<string>;
|
|
71
|
+
/**
|
|
72
|
+
* Register-only variant of `appendFile` — see `registerPaste`. Returns a
|
|
73
|
+
* path-keyed `[file:<path>]` token (resolved by path at expand time); does
|
|
74
|
+
* not touch `display`. The path is read from `meta.filename` (falling back
|
|
75
|
+
* to `meta.label`).
|
|
76
|
+
*/
|
|
77
|
+
registerFile(input: AddAttachmentInput): Promise<string>;
|
|
78
|
+
/**
|
|
79
|
+
* Whether `appendPaste(text)` would collapse the text to a placeholder
|
|
80
|
+
* (rather than inlining it). Lets a frontend decide where to route a paste
|
|
81
|
+
* — e.g. collapsed pastes become a pill, while inlined ones can be shown
|
|
82
|
+
* in the editable input row — without calling `appendPaste` first (which
|
|
83
|
+
* mutates the display buffer).
|
|
84
|
+
*/
|
|
85
|
+
wouldCollapse(text: string): boolean;
|
|
86
|
+
/** Reset display and ref list. Does NOT clear the store itself. */
|
|
87
|
+
reset(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Resolve the current display string into ContentBlock[]. Empty
|
|
90
|
+
* input returns an empty array — caller decides what to do.
|
|
91
|
+
*/
|
|
92
|
+
submit(): Promise<ContentBlock[]>;
|
|
93
|
+
private shouldCollapse;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=input-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-builder.d.ts","sourceRoot":"","sources":["../../src/core/input-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACjG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,eAAe,CAAC;IACvB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC;AAED,MAAM,WAAW,iBAAiB;IAChC,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,aAAa,EAAE,CAAC;CACvB;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;IACxC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| undefined;
|
|
3
|
+
leaderAfterTask?: string | undefined;
|
|
4
|
+
}
|
|
5
|
+
export interface InstructionBundle {
|
|
6
|
+
version?: number | undefined;
|
|
7
|
+
system?: SystemInstructionBundle | undefined;
|
|
8
|
+
sections?: Record<string, string> | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface InstructionBundlePaths {
|
|
11
|
+
/** Bundled instruction directory. Defaults to `<@wrongstack/core>/instructions`. */
|
|
12
|
+
bundledDir?: string | undefined;
|
|
13
|
+
/** User-global override directory, e.g. `~/.wrongstack/instructions`. */
|
|
14
|
+
globalDir?: string | undefined;
|
|
15
|
+
/** Project override directory, e.g. `<project>/.wrongstack/instructions`. */
|
|
16
|
+
projectDir?: string | undefined;
|
|
17
|
+
/** Extra override JSON files applied after projectDir, in order. */
|
|
18
|
+
files?: readonly string[] | undefined;
|
|
19
|
+
}
|
|
20
|
+
export declare function loadInstructionBundle(paths: InstructionBundlePaths | undefined): Promise<InstructionBundle>;
|
|
21
|
+
export declare function mergeInstructionBundle(base: InstructionBundle, override: InstructionBundle): InstructionBundle;
|
|
22
|
+
//# sourceMappingURL=instruction-bundle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instruction-bundle.d.ts","sourceRoot":"","sources":["../../src/core/instruction-bundle.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,uBAAuB,GAAG,SAAS,CAAC;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;CAC/C;AAED,MAAM,WAAW,sBAAsB;IACrC,oFAAoF;IACpF,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,oEAAoE;IACpE,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;CACvC;AAED,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,sBAAsB,GAAG,SAAS,GACxC,OAAO,CAAC,iBAAiB,CAAC,CAe5B;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,iBAAiB,EACvB,QAAQ,EAAE,iBAAiB,GAC1B,iBAAiB,CAanB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { EventBus } from '../kernel/events.js';
|
|
2
|
+
export interface RequestLimitExtensionOptions {
|
|
3
|
+
events: EventBus;
|
|
4
|
+
sessionId?: string | undefined;
|
|
5
|
+
currentIterations: number;
|
|
6
|
+
currentLimit: number;
|
|
7
|
+
/** When true (default), auto-grant 100 extra after giving listeners a tick to deny. */
|
|
8
|
+
autoExtend: boolean;
|
|
9
|
+
/** Timeout in ms before falling back to "0 extra" if no listener responds. */
|
|
10
|
+
timeoutMs?: number | undefined;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Emit `iteration.limit_reached` and wait for a listener to grant or
|
|
14
|
+
* deny. Resolves with the number of extra iterations to grant (0 = stop).
|
|
15
|
+
* When `autoExtend` is true the listener gets a `setImmediate` window to
|
|
16
|
+
* react; otherwise the resolution stays open until the timer fires.
|
|
17
|
+
*
|
|
18
|
+
* Listener contract — **important for `autoExtend: true` callers**:
|
|
19
|
+
*
|
|
20
|
+
* - `grant(extra)` and `deny()` must be invoked **synchronously** from
|
|
21
|
+
* the event listener (or earlier than the next `setImmediate` tick).
|
|
22
|
+
* The auto-grant path resolves to 100 inside `setImmediate`, so any
|
|
23
|
+
* async work between receiving the event and calling grant/deny will
|
|
24
|
+
* lose the race and the auto-grant wins.
|
|
25
|
+
*
|
|
26
|
+
* - If you need to make an async decision (await a confirm dialog,
|
|
27
|
+
* query a remote policy), pass `autoExtend: false`. The promise will
|
|
28
|
+
* stay pending until the listener calls grant/deny or `timeoutMs`
|
|
29
|
+
* fires (default 30s).
|
|
30
|
+
*
|
|
31
|
+
* - Multiple listeners are allowed but the first to call grant/deny
|
|
32
|
+
* wins; subsequent calls are no-ops.
|
|
33
|
+
*/
|
|
34
|
+
export declare function requestLimitExtension(opts: RequestLimitExtensionOptions): Promise<number>;
|
|
35
|
+
//# sourceMappingURL=iteration-limit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iteration-limit.d.ts","sourceRoot":"","sources":["../../src/core/iteration-limit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,QAAQ,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,uFAAuF;IACvF,UAAU,EAAE,OAAO,CAAC;IACpB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,4BAA4B,GAAG,OAAO,CAAC,MAAM,CAAC,CA+CzF"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mailbox-loop — Agent-loop integration for mailbox checking.
|
|
3
|
+
*
|
|
4
|
+
* Integrates the inter-agent mailbox into the agent's iteration cycle.
|
|
5
|
+
* Before each LLM call, checks for unread messages from subagents and other
|
|
6
|
+
* agents. ALL message types are injected inline so the leader sees and acts
|
|
7
|
+
* on them even when mid-task — subagent results, asks, assigns, and
|
|
8
|
+
* steer/btw are all folded into the conversation with a call to action.
|
|
9
|
+
*
|
|
10
|
+
* Uses the project-level GlobalMailbox for cross-session communication.
|
|
11
|
+
*
|
|
12
|
+
* @module mailbox-loop
|
|
13
|
+
*/
|
|
14
|
+
import type { Mailbox, MailboxMessage } from '../coordination/mailbox-types.js';
|
|
15
|
+
export interface MailboxLoopOptions {
|
|
16
|
+
mailbox: Mailbox;
|
|
17
|
+
/**
|
|
18
|
+
* The agent's globally unique mailbox identity (e.g. `leader@a1b2c3d4`,
|
|
19
|
+
* session-bound). Read receipts are recorded under this id, so two
|
|
20
|
+
* sessions whose leaders share a base name never consume each other's
|
|
21
|
+
* receipts. Pass a GETTER when the identity can change at runtime (an
|
|
22
|
+
* in-process session swap moves the leader onto a new session tag).
|
|
23
|
+
*/
|
|
24
|
+
agentId: string | (() => string);
|
|
25
|
+
/**
|
|
26
|
+
* Additional addresses this agent also answers to — typically the bare
|
|
27
|
+
* base id (`leader`). Lets other agents (and humans) address "leader"
|
|
28
|
+
* without knowing the session tag; every live leader session receives it.
|
|
29
|
+
*/
|
|
30
|
+
aliases?: string[] | undefined;
|
|
31
|
+
/** Optional delivery predicate applied before dedup/read receipts. */
|
|
32
|
+
include?: ((message: MailboxMessage) => boolean) | undefined;
|
|
33
|
+
/** Mark returned messages as read. Defaults to true for normal delivery. */
|
|
34
|
+
ack?: boolean | undefined;
|
|
35
|
+
}
|
|
36
|
+
export declare function createMailboxChecker(opts: MailboxLoopOptions): () => Promise<MailboxMessage[]>;
|
|
37
|
+
export declare function buildMailboxBtwAwarenessBlock(messages: MailboxMessage[]): {
|
|
38
|
+
type: 'text';
|
|
39
|
+
text: string;
|
|
40
|
+
};
|
|
41
|
+
export declare function buildMailboxBlock(messages: MailboxMessage[]): {
|
|
42
|
+
type: 'text';
|
|
43
|
+
text: string;
|
|
44
|
+
};
|
|
45
|
+
/** Result of an inject pass — signals an out-of-band control request. */
|
|
46
|
+
export interface MailboxInjectResult {
|
|
47
|
+
/** A fresh `control:interrupt` message asked this agent to stop. */
|
|
48
|
+
interrupt: boolean;
|
|
49
|
+
/** Operator-supplied reason for the interrupt, if any. */
|
|
50
|
+
interruptReason?: string | undefined;
|
|
51
|
+
}
|
|
52
|
+
export declare function injectPendingMailboxMessages(checkMailbox: () => Promise<MailboxMessage[]>, foldFn: (block: {
|
|
53
|
+
type: 'text';
|
|
54
|
+
text: string;
|
|
55
|
+
}) => void, a: {
|
|
56
|
+
events: {
|
|
57
|
+
emit: (type: string, payload: unknown) => void;
|
|
58
|
+
};
|
|
59
|
+
logger: {
|
|
60
|
+
debug?: (...args: unknown[]) => void;
|
|
61
|
+
};
|
|
62
|
+
}): Promise<MailboxInjectResult>;
|
|
63
|
+
//# sourceMappingURL=mailbox-loop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mailbox-loop.d.ts","sourceRoot":"","sources":["../../src/core/mailbox-loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGhF,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;IACjC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC/B,sEAAsE;IACtE,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC;IAC7D,4EAA4E;IAC5E,GAAG,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC3B;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,kBAAkB,GACvB,MAAM,OAAO,CAAC,cAAc,EAAE,CAAC,CAsEjC;AAgBD,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAuBxG;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAwE5F;AAOD,yEAAyE;AACzE,MAAM,WAAW,mBAAmB;IAClC,oEAAoE;IACpE,SAAS,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED,wBAAsB,4BAA4B,CAChD,YAAY,EAAE,MAAM,OAAO,CAAC,cAAc,EAAE,CAAC,EAC7C,MAAM,EAAE,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,KAAK,IAAI,EACvD,CAAC,EAAE;IAAE,MAAM,EAAE;QAAE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;KAAE,CAAC;IAAC,MAAM,EAAE;QAAE,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;KAAE,CAAA;CAAE,GAClH,OAAO,CAAC,mBAAmB,CAAC,CAyC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brief.d.ts","sourceRoot":"","sources":["../../../src/core/modes/brief.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,QAA6B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const PROMPT: string;
|
|
2
|
+
/**
|
|
3
|
+
* Leader-only after-task affordances. The full text lives in
|
|
4
|
+
* `packages/core/instructions/leader-after-task.md` so prompt wording can be
|
|
5
|
+
* overridden without editing TypeScript.
|
|
6
|
+
*/
|
|
7
|
+
export declare const LEADER_AFTER_TASK_PROMPT: string;
|
|
8
|
+
//# sourceMappingURL=default.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/core/modes/default.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,QAA0C,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,QAAqD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teach.d.ts","sourceRoot":"","sources":["../../../src/core/modes/teach.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,QAA6B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { EventBus } from '../kernel/events.js';
|
|
2
|
+
import type { Logger } from '../types/logger.js';
|
|
3
|
+
import type { Tracer } from '../types/observability.js';
|
|
4
|
+
import type { Provider, Request, Response } from '../types/provider.js';
|
|
5
|
+
import type { RetryPolicy } from '../types/retry-policy.js';
|
|
6
|
+
import type { Context } from './context.js';
|
|
7
|
+
export interface RunProviderOptions {
|
|
8
|
+
provider: Provider;
|
|
9
|
+
request: Request;
|
|
10
|
+
signal: AbortSignal;
|
|
11
|
+
ctx: Context;
|
|
12
|
+
events: EventBus;
|
|
13
|
+
retry: RetryPolicy;
|
|
14
|
+
logger: Logger;
|
|
15
|
+
tracer?: Tracer | undefined;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Call a provider with the retry policy applied. Emits `provider.retry`
|
|
19
|
+
* before each retry and `provider.error` once when the retries are
|
|
20
|
+
* exhausted. Streaming providers route through the streaming-response
|
|
21
|
+
* builder so deltas reach the renderer.
|
|
22
|
+
*/
|
|
23
|
+
export declare function runProviderWithRetry(opts: RunProviderOptions): Promise<Response>;
|
|
24
|
+
//# sourceMappingURL=provider-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-runner.d.ts","sourceRoot":"","sources":["../../src/core/provider-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAc5C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;IACpB,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,QAAQ,CAAC;IACjB,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAsHtF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Queue awareness — let the running agent *see* messages the user typed
|
|
3
|
+
* while it was busy, without delivering them early.
|
|
4
|
+
*
|
|
5
|
+
* The TUI queues plain messages typed mid-run and replays them as real user
|
|
6
|
+
* turns after the run finishes (the queue drainer in app.tsx). That keeps
|
|
7
|
+
* turn-taking clean, but the model is blind to the backlog: a queued message
|
|
8
|
+
* may invalidate the current approach, add a constraint, or just be a
|
|
9
|
+
* "by the way" note the user expected the agent to notice.
|
|
10
|
+
*
|
|
11
|
+
* Unlike `/btw` (a consume-once note channel, {@link ./btw.ts}), this is a
|
|
12
|
+
* SNAPSHOT channel: the host mirrors the queue's current contents onto the
|
|
13
|
+
* live `Context` on every queue mutation (enqueue, /queue delete, /queue
|
|
14
|
+
* clear, dequeue-for-delivery). At each iteration boundary the agent loop
|
|
15
|
+
* asks "did the snapshot change since the model last saw it?" and, if so,
|
|
16
|
+
* injects an informational block listing the pending messages. The queue
|
|
17
|
+
* itself is untouched — every queued message still arrives later as its own
|
|
18
|
+
* user turn.
|
|
19
|
+
*
|
|
20
|
+
* Deliberate quietness: when the queue transitions to empty (cleared by the
|
|
21
|
+
* user, drained between runs, or dropped by steering/abort) the snapshot is
|
|
22
|
+
* marked seen WITHOUT injecting a "queue is now empty" block. The empty
|
|
23
|
+
* transition usually happens at run boundaries where such a notice is stale
|
|
24
|
+
* noise; the cost is that a mid-run `/queue clear` isn't announced, which is
|
|
25
|
+
* safe because the block's framing already tells the model the queue may
|
|
26
|
+
* change and the authoritative messages arrive as future turns.
|
|
27
|
+
*/
|
|
28
|
+
import type { Context } from './context.js';
|
|
29
|
+
/**
|
|
30
|
+
* Mirror the host's pending-message queue onto the context. Call on every
|
|
31
|
+
* queue mutation with the FULL current queue (head first) — not a delta.
|
|
32
|
+
* Blank entries are dropped; the head-most {@link MAX_ITEMS} are kept since
|
|
33
|
+
* the head is what arrives first.
|
|
34
|
+
*/
|
|
35
|
+
export declare function setQueuedMessagesSnapshot(ctx: Context, texts: string[]): void;
|
|
36
|
+
/** Current snapshot (previews), without affecting seen-state. */
|
|
37
|
+
export declare function peekQueuedMessages(ctx: Context): string[];
|
|
38
|
+
/**
|
|
39
|
+
* Called by the agent loop at each iteration boundary. Returns the queued
|
|
40
|
+
* messages to surface when the snapshot changed since the model last saw it,
|
|
41
|
+
* or `null` when there is nothing new to say. Marks the snapshot seen either
|
|
42
|
+
* way, so the same state is never injected twice. An empty snapshot is
|
|
43
|
+
* acknowledged silently (see module comment).
|
|
44
|
+
*/
|
|
45
|
+
export declare function consumeQueuedMessagesUpdate(ctx: Context): string[] | null;
|
|
46
|
+
/**
|
|
47
|
+
* Format the awareness block. Framing goals: (1) the model must NOT treat
|
|
48
|
+
* the listed messages as instructions to execute now — they each arrive as
|
|
49
|
+
* their own turn later; (2) it SHOULD let them influence in-flight decisions
|
|
50
|
+
* (a queued message may invalidate the current approach or be a /btw-style
|
|
51
|
+
* note); (3) the list is a full replacement of any earlier notice, so a
|
|
52
|
+
* shrunken list implicitly communicates deletions.
|
|
53
|
+
*/
|
|
54
|
+
export declare function buildQueuedMessagesBlock(items: string[]): string;
|
|
55
|
+
//# sourceMappingURL=queued-messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queued-messages.d.ts","sourceRoot":"","sources":["../../src/core/queued-messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAmC5C;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAS7E;AAED,iEAAiE;AACjE,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,EAAE,CAEzD;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,EAAE,GAAG,IAAI,CAUzE;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAchE"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { TextBlock } from '../types/blocks.js';
|
|
2
|
+
import type { Provider } from '../types/provider.js';
|
|
3
|
+
import type { SessionWriter } from '../types/session.js';
|
|
4
|
+
import type { TokenCounter } from '../types/token-counter.js';
|
|
5
|
+
import type { Tool } from '../types/tool.js';
|
|
6
|
+
import type { Context } from './context.js';
|
|
7
|
+
/**
|
|
8
|
+
* Immutable run environment — the set-once dependencies for an agent run.
|
|
9
|
+
*
|
|
10
|
+
* `Context` today doubles as both a DI bag (provider, session, tokenCounter,
|
|
11
|
+
* cwd, …) and a mutable state container (messages, todos, meta). That makes
|
|
12
|
+
* it hard to test (every test reconstructs the full bag) and easy to abuse
|
|
13
|
+
* (any tool can swap the provider mid-run).
|
|
14
|
+
*
|
|
15
|
+
* `RunEnv` is the immutable half: a read-only projection that subsystems
|
|
16
|
+
* can hold instead of the whole `Context`. It's a view, not a copy — pulling
|
|
17
|
+
* a `RunEnv` from a `Context` is O(1) and reflects the same underlying
|
|
18
|
+
* references. The opposite direction (set things on Context) still works,
|
|
19
|
+
* and `extractRunEnv` rebuilds the view if you need a snapshot.
|
|
20
|
+
*
|
|
21
|
+
* Migration path: new APIs accept `RunEnv` instead of `Context` when they
|
|
22
|
+
* only need read access. Existing APIs continue to accept `Context` until
|
|
23
|
+
* a full split is scheduled.
|
|
24
|
+
*/
|
|
25
|
+
export interface RunEnv {
|
|
26
|
+
readonly provider: Provider;
|
|
27
|
+
readonly session: SessionWriter;
|
|
28
|
+
readonly signal: AbortSignal;
|
|
29
|
+
readonly tokenCounter: TokenCounter;
|
|
30
|
+
readonly cwd: string;
|
|
31
|
+
readonly projectRoot: string;
|
|
32
|
+
/** Mutable working directory — starts as `cwd`. */
|
|
33
|
+
readonly workingDir: string;
|
|
34
|
+
readonly model: string;
|
|
35
|
+
readonly systemPrompt: readonly TextBlock[];
|
|
36
|
+
readonly tools: readonly Tool[];
|
|
37
|
+
readonly agentId: string;
|
|
38
|
+
readonly agentName: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Build a `RunEnv` view from a Context. The returned object is a shallow
|
|
42
|
+
* frozen view — mutations to `Context` are visible (it's the same
|
|
43
|
+
* references), but the view itself can't be mutated.
|
|
44
|
+
*
|
|
45
|
+
* Use this in subsystems that want to declare "I only need read access to
|
|
46
|
+
* the env" without rewriting their signature to accept the full Context.
|
|
47
|
+
*/
|
|
48
|
+
export declare function extractRunEnv(ctx: Context): RunEnv;
|
|
49
|
+
//# sourceM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/events.js';
|
|
2
|
+
import type { Logger } from '../types/logger.js';
|
|
3
|
+
import type { Provider, Request, Response } from '../types/provider.js';
|
|
4
|
+
import type { Context } from './context.js';
|
|
5
|
+
interface ThinkingEntry {
|
|
6
|
+
textBuf: string;
|
|
7
|
+
signature?: string | undefined;
|
|
8
|
+
providerMeta?: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
interface StreamingState {
|
|
11
|
+
model: string;
|
|
12
|
+
stopReason: Response['stopReason'];
|
|
13
|
+
usage: Response['usage'];
|
|
14
|
+
textBuffers: string[];
|
|
15
|
+
currentTextIndex: number;
|
|
16
|
+
tools: Map<string, {
|
|
17
|
+
name: string;
|
|
18
|
+
partial: string;
|
|
19
|
+
input?: unknown | undefined;
|
|
20
|
+
providerMeta?: Record<string, unknown>;
|
|
21
|
+
}>;
|
|
22
|
+
thinking: ThinkingEntry[];
|
|
23
|
+
currentThinkingIndex: number;
|
|
24
|
+
blockOrder: Array<{
|
|
25
|
+
kind: 'text';
|
|
26
|
+
idx: number;
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'tool';
|
|
29
|
+
id: string;
|
|
30
|
+
} | {
|
|
31
|
+
kind: 'thinking';
|
|
32
|
+
idx: number;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
export declare function buildResponse(state: StreamingState): Response;
|
|
36
|
+
export declare function createStreamingState(model: string): StreamingState;
|
|
37
|
+
export declare function handleMessageStart(state: StreamingState, model: string): void;
|
|
38
|
+
export declare function handleContentBlockStart(state: StreamingState, ev: {
|
|
39
|
+
kind?: string | undefined;
|
|
40
|
+
id?: string | undefined;
|
|
41
|
+
name?: string | undefined;
|
|
42
|
+
providerMeta?: Record<string, unknown>;
|
|
43
|
+
}): void;
|
|
44
|
+
export declare function handleContentBlockStop(state: StreamingState, ev: {
|
|
45
|
+
index?: number | undefined;
|
|
46
|
+
}): void;
|
|
47
|
+
export declare function handleTextDelta(state: StreamingState, text: string): void;
|
|
48
|
+
export declare function handleToolUseStart(state: StreamingState, ev: {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
}): void;
|
|
52
|
+
export declare function handleToolUseInputDelta(state: StreamingState, ev: {
|
|
53
|
+
id: string;
|
|
54
|
+
partial: string;
|
|
55
|
+
}): void;
|
|
56
|
+
export declare function safeJsonOrRaw(s: string): unknown;
|
|
57
|
+
export declare function handleToolUseStop(state: StreamingState, ev: {
|
|
58
|
+
id: string;
|
|
59
|
+
input?: unknown | undefined;
|
|
60
|
+
providerMeta?: Record<string, unknown>;
|
|
61
|
+
}): void;
|
|
62
|
+
/**
|
|
63
|
+
* Open a fresh thinking block. Providers that don't pre-announce blocks
|
|
64
|
+
* (e.g. OpenAI/DeepSeek) can call this lazily on the first reasoning delta.
|
|
65
|
+
*/
|
|
66
|
+
export declare function handleThinkingStart(state: StreamingState, ev: {
|
|
67
|
+
providerMeta?: Record<string, unknown>;
|
|
68
|
+
}): void;
|
|
69
|
+
export declare function handleThinkingDelta(state: StreamingState, text: string): void;
|
|
70
|
+
export declare function handleThinkingSignature(state: StreamingState, signature: string): void;
|
|
71
|
+
export declare function handleThinkingStop(state: StreamingState): void;
|
|
72
|
+
export declare function handleMessageStop(state: StreamingState, ev: {
|
|
73
|
+
stopReason?: Response['stopReason'] | undefined;
|
|
74
|
+
usage?: Response['usage'] | undefined;
|
|
75
|
+
}): void;
|
|
76
|
+
export declare function streamProviderToResponse(provider: Provider, req: Request, signal: AbortSignal, ctx: Context, events: EventBus, logger: Logger): Promise<Response>;
|
|
77
|
+
export {};
|
|
78
|
+
//# sourceMappingURL=streaming-response-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming-response-builder.d.ts","sourceRoot":"","sources":["../../src/core/streaming-response-builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC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