@wrongstack/core 0.284.0 → 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
|
@@ -1,906 +0,0 @@
|
|
|
1
|
-
import { d as Context, c as Request, P as Provider, h as ProviderError, g as Tool, B as ToolUseBlock, D as ToolResultBlock } from './tool-BNlnIJvo.js';
|
|
2
|
-
import { E as EventBus } from './events-Bgnh43r9.js';
|
|
3
|
-
import { M as MiddlewareHandler, b as Middleware } from './pipeline-DGDyIohT.js';
|
|
4
|
-
import { S as SessionEventBridge } from './session-event-bridge-D_z_mBwk.js';
|
|
5
|
-
import { C as Compactor, a as CompactReport } from './compactor-DQLL4HTo.js';
|
|
6
|
-
import { o as ContextWindowAggressiveOn, p as ContextWindowPolicy, M as ModelsRegistry, j as Config } from './config-MRqn1V-u.js';
|
|
7
|
-
import { A as Agent, c as DoneCondition } from './multi-agent-coordinator-4RCRZKjN.js';
|
|
8
|
-
import { f as RunResult, S as SystemPromptContributor, A as AgentPipelines, T as ToolCallPipelinePayload, U as UserInputPayload, g as ToolExecutorOptions, h as ToolExecutorStrategy, i as ToolBatchResult } from './index--Gm41aBJ.js';
|
|
9
|
-
import { D as DesignStack, a as DesignStudioState, b as DesignKitLoader, c as DesignKitManifest, d as DesignKitEntry, e as DesignKitTokens } from './parallel-eternal-engine-HUrtePLd.js';
|
|
10
|
-
import { E as ErrorHandler, a as RecoveryDecision, R as RetryPolicy } from './retry-policy-CQ7KwXJa.js';
|
|
11
|
-
import { M as MessageSelector } from './selector-D8O6B_Rm.js';
|
|
12
|
-
import { S as SkillLoader, a as SkillManifest, b as SkillEntry } from './skill-DHniprNl.js';
|
|
13
|
-
import { W as WstackPaths } from './wstack-paths-C3K40Qst.js';
|
|
14
|
-
import { P as PromptLoader, a as PromptEntry, b as PromptSearchOptions, c as PromptCategoryCount } from './prompt-DLd35n4Q.js';
|
|
15
|
-
|
|
16
|
-
interface ContextWindowBudgetSnapshot {
|
|
17
|
-
maxContext: number;
|
|
18
|
-
inputTokens: number;
|
|
19
|
-
availableInputTokens: number;
|
|
20
|
-
remainingInputTokens: number;
|
|
21
|
-
reservedOutputTokens: number;
|
|
22
|
-
reservedSafetyTokens: number;
|
|
23
|
-
load: number;
|
|
24
|
-
overflowTokens: number;
|
|
25
|
-
}
|
|
26
|
-
type CompactionFailureMode = 'throw' | 'throw_on_hard' | 'continue';
|
|
27
|
-
interface AutoCompactionOptions {
|
|
28
|
-
aggressiveOn?: ContextWindowAggressiveOn | undefined;
|
|
29
|
-
events?: EventBus | undefined;
|
|
30
|
-
failureMode?: CompactionFailureMode | undefined;
|
|
31
|
-
policyProvider?: (ctx: Context) => Pick<ContextWindowPolicy, 'thresholds' | 'aggressiveOn'> | null | undefined;
|
|
32
|
-
/** Optional bridge for writing compaction events into the persistent session log. */
|
|
33
|
-
sessionBridge?: SessionEventBridge | undefined;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Pipeline middleware that monitors context token load and automatically
|
|
37
|
-
* triggers compaction when the warn/soft/hard thresholds are crossed.
|
|
38
|
-
* Runs before the next agent iteration.
|
|
39
|
-
*
|
|
40
|
-
* Uses `estimateRequestTokens` for accurate full-request token counting:
|
|
41
|
-
* messages + systemPrompt + toolDefs. This replaces the previous pattern
|
|
42
|
-
* of applying an OVERHEAD_FACTOR to a messages-only estimate.
|
|
43
|
-
*/
|
|
44
|
-
declare class AutoCompactionMiddleware {
|
|
45
|
-
readonly name = "AutoCompaction";
|
|
46
|
-
private readonly compactor;
|
|
47
|
-
/** Deprecated. Kept for backward compat with tests that pass simpleEstimator. */
|
|
48
|
-
private readonly _estimator?;
|
|
49
|
-
private readonly warnThreshold;
|
|
50
|
-
private readonly softThreshold;
|
|
51
|
-
private readonly hardThreshold;
|
|
52
|
-
/** Writable so model-switch can update the denominator without re-registering the middleware. */
|
|
53
|
-
private _maxContext;
|
|
54
|
-
/**
|
|
55
|
-
* Runtime on/off gate. The middleware is always installed in the pipeline so
|
|
56
|
-
* auto-compaction can be toggled live from the TUI `/settings` picker; when
|
|
57
|
-
* disabled the handler is a pass-through. Defaults to enabled.
|
|
58
|
-
*/
|
|
59
|
-
private _enabled;
|
|
60
|
-
private readonly aggressiveOn;
|
|
61
|
-
private readonly events?;
|
|
62
|
-
private readonly failureMode;
|
|
63
|
-
private readonly policyProvider?;
|
|
64
|
-
private readonly sessionBridge?;
|
|
65
|
-
/**
|
|
66
|
-
* Once a compaction attempt reduces nothing (preserveK protects everything,
|
|
67
|
-
* no oversized tool_results remain to elide), retrying on every iteration
|
|
68
|
-
* just spams `compaction.fired` events without making progress. We remember
|
|
69
|
-
* the no-op and skip until either the pressure level escalates or context
|
|
70
|
-
* has grown by at least this many tokens since the failed attempt.
|
|
71
|
-
*/
|
|
72
|
-
private static readonly NOOP_RETRY_DELTA_TOKENS;
|
|
73
|
-
/** Tracks the most recent no-op attempt so we can avoid re-firing per turn. */
|
|
74
|
-
private lastNoopAttempt;
|
|
75
|
-
/**
|
|
76
|
-
* Cached token estimate from the last handler() invocation. When the
|
|
77
|
-
* message count and tool count haven't changed since the last estimate
|
|
78
|
-
* (autonomous idle loops), we skip the expensive O(n) token estimation
|
|
79
|
-
* and reuse this value. Reset to -1 when the context changes.
|
|
80
|
-
*/
|
|
81
|
-
private _cachedTokens;
|
|
82
|
-
private _cachedMsgCount;
|
|
83
|
-
private _cachedToolCount;
|
|
84
|
-
/**
|
|
85
|
-
* @param compactor Compactor to use for compaction.
|
|
86
|
-
* @param maxContext Provider's max context window in tokens.
|
|
87
|
-
* @param _estimator Deprecated parameter kept for backward compatibility.
|
|
88
|
-
* The middleware now uses `estimateRequestTokens` internally
|
|
89
|
-
* for accurate full-request token counting (messages +
|
|
90
|
-
* systemPrompt + toolDefs).
|
|
91
|
-
* @param thresholds Threshold fractions (0-1) of maxContext.
|
|
92
|
-
* @param opts Optional behavior. By default, failures at the
|
|
93
|
-
* hard threshold throw AGENT_CONTEXT_OVERFLOW so
|
|
94
|
-
* the agent does not continue into a likely
|
|
95
|
-
* provider context overflow. Warn/soft failures
|
|
96
|
-
* still emit compaction.failed and continue.
|
|
97
|
-
*/
|
|
98
|
-
constructor(compactor: Compactor, maxContext: number, _estimator: (ctx: Context) => number, thresholds: {
|
|
99
|
-
warn: number;
|
|
100
|
-
soft: number;
|
|
101
|
-
hard: number;
|
|
102
|
-
}, optsOrAggressiveOn?: AutoCompactionOptions | ContextWindowAggressiveOn, events?: EventBus | undefined);
|
|
103
|
-
/** Allow callers (e.g. model-switch in WebUI) to update the context window
|
|
104
|
-
* denominator when the active model changes. */
|
|
105
|
-
setMaxContext(maxContext: number): void;
|
|
106
|
-
/** Whether auto-compaction is currently active. */
|
|
107
|
-
get enabled(): boolean;
|
|
108
|
-
/** Toggle auto-compaction on a live session (TUI `/settings`). When disabled
|
|
109
|
-
* the middleware passes every iteration straight through without estimating
|
|
110
|
-
* tokens or compacting. */
|
|
111
|
-
setEnabled(enabled: boolean): void;
|
|
112
|
-
handler(): MiddlewareHandler<Context>;
|
|
113
|
-
/**
|
|
114
|
-
* H1: try to read a pre-computed token total from `ctx.lastRequestTokens`
|
|
115
|
-
* (set by the agent loop's pre-flight or its restash in emitContextPct).
|
|
116
|
-
* Returns the uncalibrated total when the stash is valid for the current
|
|
117
|
-
* context shape (positive number, and the message count it was computed
|
|
118
|
-
* at matches the current one — otherwise tool results have been appended
|
|
119
|
-
* since and the value is stale). Returns null when missing or stale so
|
|
120
|
-
* the caller falls back to a fresh walk.
|
|
121
|
-
*/
|
|
122
|
-
private tryStashedTokens;
|
|
123
|
-
/**
|
|
124
|
-
* Returns true when the previous compaction at the same or higher pressure
|
|
125
|
-
* level reduced nothing and context has not grown materially since. Prevents
|
|
126
|
-
* a stuck preserveK window from spamming compaction events every iteration.
|
|
127
|
-
*/
|
|
128
|
-
private shouldSkipNoopRetry;
|
|
129
|
-
private recordAttempt;
|
|
130
|
-
private compact;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
type AutonomousResult = RunResult & {
|
|
134
|
-
toolCalls: number;
|
|
135
|
-
reason?: string | undefined;
|
|
136
|
-
};
|
|
137
|
-
interface DoneCheckResult {
|
|
138
|
-
done: boolean;
|
|
139
|
-
reason?: string | undefined;
|
|
140
|
-
iterations: number;
|
|
141
|
-
toolCalls: number;
|
|
142
|
-
}
|
|
143
|
-
declare class DoneConditionChecker {
|
|
144
|
-
private readonly condition;
|
|
145
|
-
private readonly compiledRegex;
|
|
146
|
-
constructor(condition: DoneCondition);
|
|
147
|
-
check(state: {
|
|
148
|
-
iterations: number;
|
|
149
|
-
toolCalls: number;
|
|
150
|
-
lastOutput?: string | undefined;
|
|
151
|
-
}): DoneCheckResult;
|
|
152
|
-
}
|
|
153
|
-
interface AutonomousRunnerOptions {
|
|
154
|
-
agent: Agent;
|
|
155
|
-
context: Context;
|
|
156
|
-
doneCondition: DoneCondition;
|
|
157
|
-
iterationTimeoutMs?: number | undefined;
|
|
158
|
-
onIteration?: (state: {
|
|
159
|
-
iteration: number | undefined;
|
|
160
|
-
toolCalls: number;
|
|
161
|
-
}) => void;
|
|
162
|
-
onDone?: (((result: AutonomousResult) => void)) | undefined;
|
|
163
|
-
/**
|
|
164
|
-
* When true and `doneCondition.type === 'directive'`, the runner
|
|
165
|
-
* runs the agent with `autonomousContinue: true` so the agent loop
|
|
166
|
-
* handles its own [continue]/[done] markers internally (no outer
|
|
167
|
-
* re-invocation needed). The runner still provides iteration/timeouts.
|
|
168
|
-
*/
|
|
169
|
-
enableAutonomousContinue?: boolean | undefined;
|
|
170
|
-
}
|
|
171
|
-
declare class AutonomousRunner {
|
|
172
|
-
private readonly opts;
|
|
173
|
-
private iterations;
|
|
174
|
-
private toolCalls;
|
|
175
|
-
private lastOutput?;
|
|
176
|
-
private stopped;
|
|
177
|
-
private readonly doneChecker;
|
|
178
|
-
constructor(opts: AutonomousRunnerOptions);
|
|
179
|
-
run(): Promise<AutonomousResult>;
|
|
180
|
-
private runLoop;
|
|
181
|
-
stop(): void;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* System-prompt contributor that surfaces eternal-autonomy state to the
|
|
186
|
-
* model on every turn.
|
|
187
|
-
*
|
|
188
|
-
* Why this exists: when the engine drives a long-running loop, the
|
|
189
|
-
* per-iteration directive carries the rules. But the directive is a USER
|
|
190
|
-
* message — it scrolls out of working memory after a few compactions and
|
|
191
|
-
* the model forgets it's in autonomy mode (forgets `[GOAL_COMPLETE]`,
|
|
192
|
-
* forgets the todo-state protocol, forgets the no-confirmation rule).
|
|
193
|
-
* Injecting the same anchor as a CACHED system-prompt block solves that
|
|
194
|
-
* — the rules sit next to the identity layer and survive compactions.
|
|
195
|
-
*
|
|
196
|
-
* Block is tagged `ephemeral` so its content (journal tail, iteration
|
|
197
|
-
* counter) changes each turn without invalidating the upstream prefix
|
|
198
|
-
* cache.
|
|
199
|
-
*/
|
|
200
|
-
|
|
201
|
-
interface AutonomyPromptContributorOptions {
|
|
202
|
-
/** Absolute path to the project's `goal.json`. */
|
|
203
|
-
goalPath: string;
|
|
204
|
-
/**
|
|
205
|
-
* Gating function. The contributor consults this on every build and
|
|
206
|
-
* returns an empty array when `false` — without this, the block would
|
|
207
|
-
* leak into interactive runs that happen to have a goal on disk and
|
|
208
|
-
* teach the model loop-control markers it shouldn't emit.
|
|
209
|
-
*
|
|
210
|
-
* Typical wiring: enable while `eternal` or `eternal-parallel` autonomy is active.
|
|
211
|
-
*/
|
|
212
|
-
enabled: () => boolean;
|
|
213
|
-
/** Number of journal entries to include in the recent-tail block. Default 5. */
|
|
214
|
-
journalTailSize?: number | undefined;
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* Build a contributor that renders the autonomy-state system block.
|
|
218
|
-
* Returns `[]` when disabled, no goal exists, or the goal has been
|
|
219
|
-
* completed/abandoned — all silent fast-paths.
|
|
220
|
-
*/
|
|
221
|
-
declare function makeAutonomyPromptContributor(opts: AutonomyPromptContributorOptions): SystemPromptContributor;
|
|
222
|
-
|
|
223
|
-
interface CompactorOptions {
|
|
224
|
-
preserveK?: number | undefined;
|
|
225
|
-
eliseThreshold?: number | undefined;
|
|
226
|
-
/**
|
|
227
|
-
* Enable content-aware digest mode. When true, `collapseAncientTurns` uses
|
|
228
|
-
* `buildSmartDigest` which scores messages by importance: critical content
|
|
229
|
-
* (errors, corrections, decisions) is kept verbatim; normal exchanges get
|
|
230
|
-
* first-sentence summaries; large tool outputs and repeated failures are
|
|
231
|
-
* aggressively compressed. Defaults to false (lossless digest).
|
|
232
|
-
*/
|
|
233
|
-
smart?: boolean | undefined;
|
|
234
|
-
/**
|
|
235
|
-
* @deprecated Ignored. Token estimation is centralized in
|
|
236
|
-
* `compaction-core`/`token-estimate` so all compactors and the context-pressure
|
|
237
|
-
* monitor agree on one number. Kept only for backward-compatible call sites.
|
|
238
|
-
*/
|
|
239
|
-
estimator?: (((text: string) => number)) | undefined;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
declare class HybridCompactor implements Compactor {
|
|
243
|
-
private readonly preserveK;
|
|
244
|
-
private readonly eliseThreshold;
|
|
245
|
-
private readonly smart;
|
|
246
|
-
constructor(opts?: CompactorOptions);
|
|
247
|
-
compact(ctx: Context, opts?: {
|
|
248
|
-
aggressive?: boolean | undefined;
|
|
249
|
-
}): Promise<CompactReport>;
|
|
250
|
-
/**
|
|
251
|
-
* Estimate the full API request token count: messages + systemPrompt + toolDefs.
|
|
252
|
-
* This is the accurate figure for context-window pressure monitoring.
|
|
253
|
-
*/
|
|
254
|
-
private estimateFullRequest;
|
|
255
|
-
/**
|
|
256
|
-
* Lossless rule-based collapse of ancient turns into a single digest message.
|
|
257
|
-
*
|
|
258
|
-
* Preserves ALL textual content of the collapsed range — user instructions,
|
|
259
|
-
* assistant decisions/conclusions, and any prior digests (chained forward so
|
|
260
|
-
* the digest stays lossless across repeated compactions). Only `tool_use` /
|
|
261
|
-
* `tool_result` protocol blocks are dropped and replaced with a count marker;
|
|
262
|
-
* their full payload already lives in the session log. No sub-LLM call.
|
|
263
|
-
*
|
|
264
|
-
* Returns the token savings and the digest text (for audit logging).
|
|
265
|
-
*/
|
|
266
|
-
private collapseAncientTurns;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* Design Studio detection + injection middleware.
|
|
271
|
-
*
|
|
272
|
-
* The system prompt is built ONCE per session (boot / project-switch), so a
|
|
273
|
-
* system-prompt contributor cannot react to "the model just started building a
|
|
274
|
-
* UI" mid-session. Instead, detection and injection ride the per-turn pipelines:
|
|
275
|
-
*
|
|
276
|
-
* - userInput middleware → detect UI intent in the user's message
|
|
277
|
-
* - toolCall middleware → detect a frontend file being written
|
|
278
|
-
* (both set `ctx.meta.designStudio`)
|
|
279
|
-
* - request middleware → on every turn, read `ctx.meta.designStudio` and
|
|
280
|
-
* append an ephemeral block to `req.system`: the kit menu (until a kit is
|
|
281
|
-
* chosen) or a one-line adherence reminder (once chosen).
|
|
282
|
-
*
|
|
283
|
-
* Keeping the heavy kit body out of this path — the model loads it on demand via
|
|
284
|
-
* the `design` tool — is what keeps per-turn token cost low.
|
|
285
|
-
*/
|
|
286
|
-
|
|
287
|
-
declare function getDesignState(ctx: {
|
|
288
|
-
meta: Record<string, unknown>;
|
|
289
|
-
}): DesignStudioState | undefined;
|
|
290
|
-
/** Mark Design Studio active and merge in detected signals/stack. */
|
|
291
|
-
declare function activateDesign(ctx: {
|
|
292
|
-
meta: Record<string, unknown>;
|
|
293
|
-
}, signals: string[], stack?: DesignStack): DesignStudioState;
|
|
294
|
-
/** Record the kit the model/user committed to. */
|
|
295
|
-
declare function setActiveKit(ctx: {
|
|
296
|
-
meta: Record<string, unknown>;
|
|
297
|
-
}, kitId: string, stack?: DesignStack, overrides?: Record<string, string> | undefined): void;
|
|
298
|
-
/** Merge color/token overrides into the live state (used by `design set`). */
|
|
299
|
-
declare function setDesignOverrides(ctx: {
|
|
300
|
-
meta: Record<string, unknown>;
|
|
301
|
-
}, overrides: Record<string, string>): void;
|
|
302
|
-
/** Clear the active kit (e.g. `/design off`), leaving detection state intact. */
|
|
303
|
-
declare function clearActiveKit(ctx: {
|
|
304
|
-
meta: Record<string, unknown>;
|
|
305
|
-
}): void;
|
|
306
|
-
/**
|
|
307
|
-
* Inspect user text for UI/design intent. Returns the strongest stack hint and
|
|
308
|
-
* the matched signals, or `null` when nothing UI-ish was found.
|
|
309
|
-
*/
|
|
310
|
-
declare function detectFrontendIntent(text: string): {
|
|
311
|
-
stack?: DesignStack;
|
|
312
|
-
signals: string[];
|
|
313
|
-
} | null;
|
|
314
|
-
/** Detect whether a written/edited file path is a frontend file. */
|
|
315
|
-
declare function detectFrontendFile(filePath: string): {
|
|
316
|
-
stack?: DesignStack;
|
|
317
|
-
} | null;
|
|
318
|
-
/** userInput middleware: detect UI intent from the user's message. */
|
|
319
|
-
declare function makeDesignDetectUserInputMiddleware(): Middleware<UserInputPayload>;
|
|
320
|
-
/** toolCall middleware: detect frontend file writes/edits. */
|
|
321
|
-
declare function makeDesignDetectToolCallMiddleware(): Middleware<ToolCallPipelinePayload>;
|
|
322
|
-
/**
|
|
323
|
-
* toolCall middleware: after a frontend file is written/edited AND a kit is
|
|
324
|
-
* pinned, scan the file for off-palette colors and append a non-blocking
|
|
325
|
-
* warning to the tool result. This makes adherence PASSIVE — the model is
|
|
326
|
-
* nudged toward kit tokens the moment it drifts, without anyone running
|
|
327
|
-
* `design verify` by hand. Best-effort: any failure leaves the result untouched.
|
|
328
|
-
*/
|
|
329
|
-
declare function makeDesignVerifyToolCallMiddleware(): Middleware<ToolCallPipelinePayload>;
|
|
330
|
-
/**
|
|
331
|
-
* request middleware: per-turn, inject the kit menu (until a kit is chosen) or a
|
|
332
|
-
* compact adherence reminder (once chosen). No-op when Design Studio is inactive.
|
|
333
|
-
*
|
|
334
|
-
* Closes over the live `Context` because the `request` pipeline payload is just
|
|
335
|
-
* the `Request` — it carries no ctx. `req.system` shares the array reference
|
|
336
|
-
* with `ctx.systemPrompt`, so we return a NEW array rather than mutating it.
|
|
337
|
-
*/
|
|
338
|
-
declare function makeDesignStudioRequestMiddleware(deps: {
|
|
339
|
-
ctx: Context;
|
|
340
|
-
loader: DesignKitLoader;
|
|
341
|
-
enabled?: () => boolean;
|
|
342
|
-
}): Middleware<Request>;
|
|
343
|
-
/**
|
|
344
|
-
* Install the Design Studio per-turn middleware onto an agent's pipelines.
|
|
345
|
-
* Shared by every host (CLI/TUI + both WebUI servers) so auto-detection behaves
|
|
346
|
-
* identically everywhere. All three are PREPENDED:
|
|
347
|
-
* - detection runs first so a short-circuiting middleware can't suppress it;
|
|
348
|
-
* - the request injector must sit ahead of `ModelRuntimeSettings`, which does
|
|
349
|
-
* not call `next` and would otherwise end the chain before us.
|
|
350
|
-
*
|
|
351
|
-
* The `design` tool and `/design` command are wired separately (builtin pack +
|
|
352
|
-
* slash registry); this only installs the activation behavior.
|
|
353
|
-
*/
|
|
354
|
-
declare function installDesignStudioMiddleware(deps: {
|
|
355
|
-
pipelines: AgentPipelines;
|
|
356
|
-
ctx: Context;
|
|
357
|
-
/** When false, nothing is installed (tool + /design stay manual). */
|
|
358
|
-
enabled?: boolean | undefined;
|
|
359
|
-
}): void;
|
|
360
|
-
|
|
361
|
-
interface DesignKitLoaderOptions {
|
|
362
|
-
/** <project>/.wrongstack/design-kits */
|
|
363
|
-
inProjectDir: string;
|
|
364
|
-
/** ~/.wrongstack/design-kits */
|
|
365
|
-
globalDir: string;
|
|
366
|
-
/** Bundled kits shipped with @wrongstack/core (packages/core/design-kits). */
|
|
367
|
-
bundledDir?: string | undefined;
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
* Discovery order (highest priority first; later layers are shadowed by name):
|
|
371
|
-
* 1. Project-committed: <project>/.wrongstack/design-kits/
|
|
372
|
-
* 2. User-global: ~/.wrongstack/design-kits/
|
|
373
|
-
* 3. Bundled with build: packages/core/design-kits/
|
|
374
|
-
*
|
|
375
|
-
* The `_foundations` directory is a reserved kit id holding the mandatory
|
|
376
|
-
* cross-cutting baseline; it is excluded from the selectable menu.
|
|
377
|
-
*/
|
|
378
|
-
declare class DefaultDesignKitLoader implements DesignKitLoader {
|
|
379
|
-
private readonly dirs;
|
|
380
|
-
private cache?;
|
|
381
|
-
private readonly bodyCache;
|
|
382
|
-
private readonly tokenCache;
|
|
383
|
-
constructor(opts: DesignKitLoaderOptions);
|
|
384
|
-
list(): Promise<DesignKitManifest[]>;
|
|
385
|
-
/** Selectable kits only (excludes the reserved `_foundations` entry). */
|
|
386
|
-
private selectable;
|
|
387
|
-
listEntries(): Promise<DesignKitEntry[]>;
|
|
388
|
-
find(id: string): Promise<DesignKitManifest | undefined>;
|
|
389
|
-
menuText(): Promise<string>;
|
|
390
|
-
readBody(id: string, stack?: DesignStack): Promise<string>;
|
|
391
|
-
readTokens(id: string): Promise<DesignKitTokens | undefined>;
|
|
392
|
-
foundationsText(stack?: DesignStack): Promise<string>;
|
|
393
|
-
invalidateCache(): void;
|
|
394
|
-
}
|
|
395
|
-
/**
|
|
396
|
-
* Resolve the bundled `design-kits/` directory shipped alongside this module.
|
|
397
|
-
* The directory is a sibling of `src/` (dev) and `dist/` (built), so we probe a
|
|
398
|
-
* few candidate depths relative to the compiled module location and return the
|
|
399
|
-
* first that exists. Returns `undefined` if none is found (treated as "no
|
|
400
|
-
* bundled kits this run").
|
|
401
|
-
*/
|
|
402
|
-
declare function resolveBundledDesignKitsDir(): string | undefined;
|
|
403
|
-
/**
|
|
404
|
-
* Memoized per-project loader. Used by the `design` tool and the Design Studio
|
|
405
|
-
* middleware/slash-command so they share one cached instance without threading
|
|
406
|
-
* the loader through every boot path. The loader is a pure disk reader (no
|
|
407
|
-
* injected services), so a module-level memo is safe.
|
|
408
|
-
*/
|
|
409
|
-
declare function getDesignKitLoader(projectRoot: string): DefaultDesignKitLoader;
|
|
410
|
-
/** Test helper — clears the per-project loader memo. */
|
|
411
|
-
declare function _resetDesignKitLoaderMemo(): void;
|
|
412
|
-
|
|
413
|
-
/**
|
|
414
|
-
* Project-local Design Studio store — a gitignored `<project>/.design/` directory
|
|
415
|
-
* that persists design DECISIONS and project-specific design RULES across
|
|
416
|
-
* sessions, separate from the committed `.wrongstack/design-kits/` (shared
|
|
417
|
-
* custom kits). Layout:
|
|
418
|
-
*
|
|
419
|
-
* .design/.gitignore `*` — self-ignores so the dir is untracked in ANY repo
|
|
420
|
-
* .design/rules.md project design rules (always injected when UI work is active)
|
|
421
|
-
* .design/active.json { kit, stack } — the pinned kit, restored on session start
|
|
422
|
-
* .design/decisions.md append-only log of kit choices (timestamp · kit · stack · via)
|
|
423
|
-
*
|
|
424
|
-
* All writes are best-effort: a failure here must never break the tool, slash
|
|
425
|
-
* command, or a turn.
|
|
426
|
-
*/
|
|
427
|
-
declare function designProjectDir(projectRoot: string): string;
|
|
428
|
-
/** Read `.design/rules.md` (or RULES.md / design.md). Cached per project root. */
|
|
429
|
-
declare function loadProjectDesignRules(projectRoot: string): Promise<string | undefined>;
|
|
430
|
-
/**
|
|
431
|
-
* User color/token overrides. Keys are token names (`primary`, `bg`, …) applied
|
|
432
|
-
* to BOTH themes, or theme-scoped (`light.primary`, `dark.bg`). Values are any
|
|
433
|
-
* token string (OKLCH/hex). These override kit `tokens.json` everywhere tokens
|
|
434
|
-
* are consumed — the `use` snapshot, `materialize`, and `verify`.
|
|
435
|
-
*/
|
|
436
|
-
type DesignOverrides = Record<string, string>;
|
|
437
|
-
interface PersistedActiveKit {
|
|
438
|
-
kit: string;
|
|
439
|
-
stack?: string | undefined;
|
|
440
|
-
overrides?: DesignOverrides | undefined;
|
|
441
|
-
}
|
|
442
|
-
/** Read the persisted active kit from `.design/active.json`, if any. */
|
|
443
|
-
declare function loadActiveKit(projectRoot: string): Promise<PersistedActiveKit | undefined>;
|
|
444
|
-
/**
|
|
445
|
-
* Apply token overrides onto a kit's light/dark token sets. A bare key
|
|
446
|
-
* (`primary`) is applied to both themes; a scoped key (`light.bg`/`dark.bg`)
|
|
447
|
-
* only to that theme. Returns NEW objects — never mutates the input.
|
|
448
|
-
*/
|
|
449
|
-
declare function applyTokenOverrides<T extends {
|
|
450
|
-
light?: Record<string, string> | undefined;
|
|
451
|
-
dark?: Record<string, string> | undefined;
|
|
452
|
-
}>(tokens: T, overrides: DesignOverrides | undefined): T;
|
|
453
|
-
/**
|
|
454
|
-
* Persist a kit choice: update `active.json` and append to `decisions.md`.
|
|
455
|
-
* `isoTime` is passed in so callers control the timestamp (and tests stay
|
|
456
|
-
* deterministic). Best-effort — swallows all errors.
|
|
457
|
-
*/
|
|
458
|
-
declare function recordKitChoice(projectRoot: string, kit: string, stack: string | undefined, source: string, isoTime: string, overrides?: DesignOverrides | undefined): Promise<void>;
|
|
459
|
-
/**
|
|
460
|
-
* Merge color/token overrides into `active.json` WITHOUT changing the pinned
|
|
461
|
-
* kit (used by `design set primary=…`). Returns the merged override map, or
|
|
462
|
-
* undefined if there is no active kit to attach them to. Best-effort on write.
|
|
463
|
-
*/
|
|
464
|
-
declare function recordOverrides(projectRoot: string, patch: DesignOverrides, isoTime: string): Promise<DesignOverrides | undefined>;
|
|
465
|
-
/** Clear the persisted active kit (e.g. `/design off`). Best-effort. */
|
|
466
|
-
declare function clearPersistedActiveKit(projectRoot: string): Promise<void>;
|
|
467
|
-
/** Test helper — clears the rules cache. */
|
|
468
|
-
declare function _resetDesignRulesCache(): void;
|
|
469
|
-
|
|
470
|
-
/**
|
|
471
|
-
* Tiered error recovery strategies.
|
|
472
|
-
* Each strategy is attempted in order until one returns a decision.
|
|
473
|
-
*/
|
|
474
|
-
interface RecoveryStrategy {
|
|
475
|
-
/** Human-readable label for logs. */
|
|
476
|
-
label: string;
|
|
477
|
-
/** Optional compactor for context_overflow recovery. */
|
|
478
|
-
compactor?: Compactor | undefined;
|
|
479
|
-
/** Returns an explicit recovery decision, or null to fall through. */
|
|
480
|
-
attempt: (err: unknown, ctx: Context) => Promise<RecoveryDecision | null>;
|
|
481
|
-
}
|
|
482
|
-
/**
|
|
483
|
-
* Builds the ordered list of recovery strategies used by DefaultErrorHandler.
|
|
484
|
-
* Exported so callers can customise or extend the strategy chain.
|
|
485
|
-
*/
|
|
486
|
-
declare function buildRecoveryStrategies(opts?: {
|
|
487
|
-
compactor?: Compactor | undefined;
|
|
488
|
-
modelsRegistry?: ModelsRegistry | undefined;
|
|
489
|
-
getConfig?: (() => Config) | undefined;
|
|
490
|
-
}): RecoveryStrategy[];
|
|
491
|
-
declare const DEFAULT_RECOVERY_STRATEGIES: RecoveryStrategy[];
|
|
492
|
-
declare class DefaultErrorHandler implements ErrorHandler {
|
|
493
|
-
private readonly strategies;
|
|
494
|
-
constructor(strategies?: RecoveryStrategy[]);
|
|
495
|
-
classify(err: unknown): ReturnType<ErrorHandler['classify']>;
|
|
496
|
-
recover(err: unknown, ctx: Context): Promise<RecoveryDecision | null>;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
declare function buildGoalPreamble(goal: string, deliverables?: string[]): string;
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* Options for IntelligentCompactor.
|
|
503
|
-
*/
|
|
504
|
-
interface IntelligentCompactorOptions {
|
|
505
|
-
/** Provider to use for LLM-assisted summarization. Required. */
|
|
506
|
-
provider: Provider;
|
|
507
|
-
/** Fraction of maxContext that triggers a warning (default 0.6). */
|
|
508
|
-
warnThreshold?: number | undefined;
|
|
509
|
-
/** Fraction of maxContext that triggers soft compaction (default 0.75). */
|
|
510
|
-
softThreshold?: number | undefined;
|
|
511
|
-
/** Fraction of maxContext that triggers hard compaction (default 0.9). */
|
|
512
|
-
hardThreshold?: number | undefined;
|
|
513
|
-
/** Max context window in tokens (used only for threshold fraction math). */
|
|
514
|
-
maxContext?: number | undefined;
|
|
515
|
-
/** How many recent (user+assistant) pairs to always preserve (default 4). */
|
|
516
|
-
preserveK?: number | undefined;
|
|
517
|
-
/** Token threshold below which tool results are not elided (default 500). */
|
|
518
|
-
eliseThreshold?: number | undefined;
|
|
519
|
-
/** System prompt for the summarizer sub-LLM. */
|
|
520
|
-
summarizerPrompt?: string | undefined;
|
|
521
|
-
/**
|
|
522
|
-
* Model ID to use for summarization. When not set, the same model as the
|
|
523
|
-
* agent is used (which risks cascading failure on context overflow). Set to
|
|
524
|
-
* a fast/cheap configured model for resilience.
|
|
525
|
-
*/
|
|
526
|
-
summarizerModel?: string | undefined;
|
|
527
|
-
}
|
|
528
|
-
/**
|
|
529
|
-
* IntelligentCompactor uses an LLM to:
|
|
530
|
-
* - Analyze message importance and preserve critical context
|
|
531
|
-
* - Generate semantic summaries for old message ranges
|
|
532
|
-
* - Make intelligent decisions about what to compact
|
|
533
|
-
*
|
|
534
|
-
* It builds on the shared `compaction-core` elision/boundary primitives and
|
|
535
|
-
* adds LLM-assisted summarization on top. When the summarizer call fails it
|
|
536
|
-
* falls back to the same lossless rule-based digest used by HybridCompactor.
|
|
537
|
-
*/
|
|
538
|
-
declare class IntelligentCompactor implements Compactor {
|
|
539
|
-
private readonly provider;
|
|
540
|
-
private readonly warnThreshold;
|
|
541
|
-
private readonly softThreshold;
|
|
542
|
-
private readonly hardThreshold;
|
|
543
|
-
private readonly maxContext;
|
|
544
|
-
private readonly preserveK;
|
|
545
|
-
private readonly eliseThreshold;
|
|
546
|
-
private readonly summarizerPrompt;
|
|
547
|
-
private readonly summarizerModel?;
|
|
548
|
-
constructor(opts: IntelligentCompactorOptions);
|
|
549
|
-
compact(ctx: Context, opts?: {
|
|
550
|
-
aggressive?: boolean | undefined;
|
|
551
|
-
}): Promise<CompactReport>;
|
|
552
|
-
/**
|
|
553
|
-
* Estimate the full API request token count: messages + systemPrompt + toolDefs.
|
|
554
|
-
* This is the accurate figure for context-window pressure monitoring.
|
|
555
|
-
*/
|
|
556
|
-
private estimateFullRequest;
|
|
557
|
-
/** Run shared tool-result elision and commit through ConversationState. */
|
|
558
|
-
private elide;
|
|
559
|
-
private summarizeAncientTurns;
|
|
560
|
-
private callSummarizer;
|
|
561
|
-
private messagesToText;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
declare class DefaultRetryPolicy implements RetryPolicy {
|
|
565
|
-
shouldRetry(err: Error | ProviderError, attempt: number): boolean;
|
|
566
|
-
maxAttempts(err: Error | ProviderError): number;
|
|
567
|
-
/**
|
|
568
|
-
* Compute the retry delay.
|
|
569
|
-
*
|
|
570
|
-
* Precedence:
|
|
571
|
-
* 1. If `err` is a `ProviderError` with a populated
|
|
572
|
-
* `body.retryAfterMs`, honour it — clamped into
|
|
573
|
-
* [0, MAX_RETRY_AFTER_MS]. The provider told us exactly when
|
|
574
|
-
* to come back; we should listen.
|
|
575
|
-
* 2. Otherwise fall through to the exponential-with-jitter
|
|
576
|
-
* schedule (`1000 * 2^attempt + jitter`, capped at 30s).
|
|
577
|
-
*
|
|
578
|
-
* `err` is optional for back-compat with the existing interface;
|
|
579
|
-
* callers should pass it whenever available.
|
|
580
|
-
*/
|
|
581
|
-
delayMs(attempt: number, err?: Error | ProviderError): number;
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* Options for SelectiveCompactor — the most configurable compactor.
|
|
586
|
-
*/
|
|
587
|
-
interface SelectiveCompactorOptions {
|
|
588
|
-
/** Provider for LLM calls (selector + summarizer). Required. */
|
|
589
|
-
provider: Provider;
|
|
590
|
-
/** Selector for LLM-driven importance analysis. */
|
|
591
|
-
selector?: MessageSelector | undefined;
|
|
592
|
-
/** Fraction of maxContext that triggers a warning (default 0.6). */
|
|
593
|
-
warnThreshold?: number | undefined;
|
|
594
|
-
/** Fraction of maxContext that triggers soft compaction (default 0.75). */
|
|
595
|
-
softThreshold?: number | undefined;
|
|
596
|
-
/** Fraction of maxContext that triggers hard compaction (default 0.9). */
|
|
597
|
-
hardThreshold?: number | undefined;
|
|
598
|
-
/** Max context window in tokens (used for threshold fraction math). */
|
|
599
|
-
maxContext?: number | undefined;
|
|
600
|
-
/** How many recent (user+assistant) pairs to always preserve (default 4). */
|
|
601
|
-
preserveK?: number | undefined;
|
|
602
|
-
/** Token threshold below which tool results are not elided (default 500). */
|
|
603
|
-
eliseThreshold?: number | undefined;
|
|
604
|
-
/** Model for selector LLM calls (default: same as provider default). */
|
|
605
|
-
selectorModel?: string | undefined;
|
|
606
|
-
/** Max output tokens for the selector LLM call (default: 1024). */
|
|
607
|
-
selectorMaxOutputTokens?: number | undefined;
|
|
608
|
-
/** Summarizer model for collapsed ranges (default: same as selectorModel). */
|
|
609
|
-
summarizerModel?: string | undefined;
|
|
610
|
-
/** Prompt for the summarizer sub-LLM. */
|
|
611
|
-
summarizerPrompt?: string | undefined;
|
|
612
|
-
}
|
|
613
|
-
/**
|
|
614
|
-
* SelectiveCompactor uses an LLM-driven MessageSelector to make
|
|
615
|
-
* surgical decisions about which message ranges to keep vs collapse.
|
|
616
|
-
*
|
|
617
|
-
* Compared to HybridCompactor / IntelligentCompactor:
|
|
618
|
-
* - HybridCompactor: rule-based (preserveK + elision), no LLM calls
|
|
619
|
-
* - IntelligentCompactor: LLM summarization but no structured selection
|
|
620
|
-
* - SelectiveCompactor: full LLM-driven selection + optional summarization
|
|
621
|
-
*/
|
|
622
|
-
declare class SelectiveCompactor implements Compactor {
|
|
623
|
-
private readonly provider;
|
|
624
|
-
private readonly selector;
|
|
625
|
-
private readonly warnThreshold;
|
|
626
|
-
private readonly softThreshold;
|
|
627
|
-
private readonly hardThreshold;
|
|
628
|
-
private readonly maxContext;
|
|
629
|
-
private readonly preserveK;
|
|
630
|
-
private readonly eliseThreshold;
|
|
631
|
-
private readonly summarizerModel;
|
|
632
|
-
private readonly summarizerPrompt;
|
|
633
|
-
constructor(opts: SelectiveCompactorOptions);
|
|
634
|
-
compact(ctx: Context, opts?: {
|
|
635
|
-
aggressive?: boolean | undefined;
|
|
636
|
-
}): Promise<CompactReport>;
|
|
637
|
-
/**
|
|
638
|
-
* Estimate the full API request token count: messages + systemPrompt + toolDefs.
|
|
639
|
-
* This is the accurate figure for context-window pressure monitoring.
|
|
640
|
-
*/
|
|
641
|
-
private estimateFullRequest;
|
|
642
|
-
private repairProtocolAdjacency;
|
|
643
|
-
/**
|
|
644
|
-
* Run the LLM selector to decide what to keep vs collapse.
|
|
645
|
-
* Returns the token savings achieved.
|
|
646
|
-
*/
|
|
647
|
-
private runSelector;
|
|
648
|
-
/**
|
|
649
|
-
* Execute a SelectorResult plan: collapse/remove ranges and
|
|
650
|
-
* insert summaries where the selector provided them.
|
|
651
|
-
*/
|
|
652
|
-
private executePlan;
|
|
653
|
-
private summarizeRange;
|
|
654
|
-
private messagePreview;
|
|
655
|
-
/**
|
|
656
|
-
* Fallback when selector fails: aggressively trim from the oldest end
|
|
657
|
-
* until we hit targetBudget.
|
|
658
|
-
*/
|
|
659
|
-
private aggressiveRecencyTrim;
|
|
660
|
-
private computeTargetBudget;
|
|
661
|
-
private eliseOldToolResults;
|
|
662
|
-
private hasTextContent;
|
|
663
|
-
/**
|
|
664
|
-
* Estimate message-array tokens via the shared `estimateMessages` primitive
|
|
665
|
-
* so SelectiveCompactor's before/after/load figures agree with the
|
|
666
|
-
* middleware threshold math and the other compactors. Previously this used a
|
|
667
|
-
* private `ceil(len/3.5)` walk that diverged from the calibrated shared
|
|
668
|
-
* estimator, causing the selective `load`/`targetBudget` comparison to mix
|
|
669
|
-
* two incompatible token scales.
|
|
670
|
-
*/
|
|
671
|
-
private estimateTokens;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
interface SkillLoaderOptions {
|
|
675
|
-
paths: WstackPaths;
|
|
676
|
-
bundledDir?: string | undefined;
|
|
677
|
-
/** Read foreign `.claude/skills` dirs (project + user). Default `true`. */
|
|
678
|
-
readClaudeSkills?: boolean | undefined;
|
|
679
|
-
/** Scan other agents' skill dirs (codex/cursor/agents/qwen/trae/…). Default `true` (all); `string[]` restricts, `false` disables. */
|
|
680
|
-
foreignSources?: boolean | string[] | undefined;
|
|
681
|
-
/** Extra skill directories to scan (lowest priority, before bundled). */
|
|
682
|
-
extraDirs?: string[] | undefined;
|
|
683
|
-
}
|
|
684
|
-
/**
|
|
685
|
-
* Discovery order (we walk highest priority first and skip names already
|
|
686
|
-
* seen, so earlier layers shadow later ones):
|
|
687
|
-
* 1. Project-committed: <project>/.wrongstack/skills/
|
|
688
|
-
* 2. Project foreign: <project>/.claude/skills/ (opt-out)
|
|
689
|
-
* 3. Project foreign: <project>/.{codex,cursor,agents,…}/skills/
|
|
690
|
-
* 4. User-global: ~/.wrongstack/skills/
|
|
691
|
-
* 5. User foreign: ~/.claude/skills/ (opt-out)
|
|
692
|
-
* 6. User foreign: ~/.{codex,cursor,agents,…}/skills/
|
|
693
|
-
* 7. Extra dirs: config.skills.extraDirs (user config only)
|
|
694
|
-
* 8. Bundled with build: packages/core/skills/
|
|
695
|
-
*
|
|
696
|
-
* The `.claude/*` layers let skills authored for other coding agents (Claude
|
|
697
|
-
* Code, Codex, Gemini, `asm`, `gh skill`) be used without copying. They are
|
|
698
|
-
* read-only — the installer never writes there.
|
|
699
|
-
*/
|
|
700
|
-
declare class DefaultSkillLoader implements SkillLoader {
|
|
701
|
-
private readonly dirs;
|
|
702
|
-
private cache?;
|
|
703
|
-
private entriesCache?;
|
|
704
|
-
private readonly bodyCache;
|
|
705
|
-
constructor(opts: SkillLoaderOptions);
|
|
706
|
-
list(): Promise<SkillManifest[]>;
|
|
707
|
-
find(name: string): Promise<SkillManifest | undefined>;
|
|
708
|
-
manifestText(): Promise<string>;
|
|
709
|
-
listEntries(): Promise<SkillEntry[]>;
|
|
710
|
-
invalidateCache(): void;
|
|
711
|
-
readBody(name: string): Promise<string>;
|
|
712
|
-
readSaveBody(name: string): Promise<string>;
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
interface PromptLoaderOptions {
|
|
716
|
-
paths: WstackPaths;
|
|
717
|
-
/** Directory containing the bundled dataset (`data/prompts`), if shipped. */
|
|
718
|
-
bundledDir?: string | undefined;
|
|
719
|
-
}
|
|
720
|
-
/**
|
|
721
|
-
* DefaultPromptLoader — read-side view over the three prompt layers, merged and
|
|
722
|
-
* de-duplicated by `slug`. Mirrors `DefaultSkillLoader`.
|
|
723
|
-
*
|
|
724
|
-
* Discovery order (higher priority shadows lower by slug):
|
|
725
|
-
* 1. Project-committed: <project>/.wrongstack/prompts/ (writable, source 'project')
|
|
726
|
-
* 2. User-global: ~/.wrongstack/prompts/ (writable, source 'user'/'synced')
|
|
727
|
-
* 3. Bundled with build: <core>/data/prompts/prompts/** (read-only, source 'builtin')
|
|
728
|
-
*
|
|
729
|
-
* Writes go to the user layer by default (or the project layer when
|
|
730
|
-
* `scope:'project'`). Favoriting/editing a builtin copies it down into the user
|
|
731
|
-
* layer (copy-on-write) so the read-only dataset is never mutated.
|
|
732
|
-
*/
|
|
733
|
-
declare class DefaultPromptLoader implements PromptLoader {
|
|
734
|
-
private readonly projectStore?;
|
|
735
|
-
private readonly userStore?;
|
|
736
|
-
private readonly builtinDir?;
|
|
737
|
-
private cache?;
|
|
738
|
-
private builtinCache?;
|
|
739
|
-
constructor(opts: PromptLoaderOptions);
|
|
740
|
-
list(): Promise<PromptEntry[]>;
|
|
741
|
-
find(slugOrId: string): Promise<PromptEntry | undefined>;
|
|
742
|
-
search(query: string, opts?: PromptSearchOptions): Promise<PromptEntry[]>;
|
|
743
|
-
categories(): Promise<PromptCategoryCount[]>;
|
|
744
|
-
save(entry: PromptEntry, opts?: {
|
|
745
|
-
scope?: 'user' | 'project';
|
|
746
|
-
}): Promise<void>;
|
|
747
|
-
delete(slugOrId: string): Promise<boolean>;
|
|
748
|
-
setFavorite(slugOrId: string, favorite: boolean): Promise<PromptEntry | undefined>;
|
|
749
|
-
invalidateCache(): void;
|
|
750
|
-
private readBuiltin;
|
|
751
|
-
}
|
|
752
|
-
/**
|
|
753
|
-
* Fill a prompt's `{{variable}}` placeholders with `values`. Unknown
|
|
754
|
-
* placeholders are left intact unless a declared variable supplies a `default`.
|
|
755
|
-
* Returns the rendered string, any required variables left unfilled
|
|
756
|
-
* (`missing`), and any supplied values outside a variable's declared `enum`
|
|
757
|
-
* (`invalid`).
|
|
758
|
-
*/
|
|
759
|
-
declare function renderPrompt(entry: PromptEntry, values?: Record<string, string>): {
|
|
760
|
-
text: string;
|
|
761
|
-
missing: string[];
|
|
762
|
-
invalid: string[];
|
|
763
|
-
};
|
|
764
|
-
|
|
765
|
-
type CompactorStrategy = 'hybrid' | 'intelligent' | 'selective';
|
|
766
|
-
interface StrategyCompactorOptions {
|
|
767
|
-
/** Which compactor to use. Defaults to 'hybrid' (lossless, no LLM). */
|
|
768
|
-
strategy?: CompactorStrategy | string | undefined;
|
|
769
|
-
/** Recent user/assistant pairs to always preserve. */
|
|
770
|
-
preserveK?: number | undefined;
|
|
771
|
-
/** Token threshold below which tool results are not elided. */
|
|
772
|
-
eliseThreshold?: number | undefined;
|
|
773
|
-
/**
|
|
774
|
-
* Enable content-aware smart digest for 'hybrid' strategy. When true,
|
|
775
|
-
* collapsed ancient turns use buildSmartDigest: critical content (errors,
|
|
776
|
-
* corrections, decisions) stays verbatim; normal exchanges get first-sentence
|
|
777
|
-
* summaries; noise (repeated failures, large tool outputs) is aggressively
|
|
778
|
-
* compressed. Defaults to false (lossless digest).
|
|
779
|
-
*/
|
|
780
|
-
smart?: boolean | undefined;
|
|
781
|
-
/** Model used by the LLM-backed strategies for summarization/selection. */
|
|
782
|
-
summarizerModel?: string | undefined;
|
|
783
|
-
/** Max output tokens for the selector LLM call in 'selective' strategy (default: 1024). */
|
|
784
|
-
selectorMaxOutputTokens?: number | undefined;
|
|
785
|
-
/**
|
|
786
|
-
* Legacy shortcut for `strategy: 'selective'`. When `strategy` is unset (or
|
|
787
|
-
* 'hybrid') and this is true, the selective (LLM-driven) compactor is used.
|
|
788
|
-
* An explicit `strategy` always wins.
|
|
789
|
-
*/
|
|
790
|
-
llmSelector?: boolean | undefined;
|
|
791
|
-
}
|
|
792
|
-
/**
|
|
793
|
-
* Build the compactor named by `config.context.strategy`.
|
|
794
|
-
*
|
|
795
|
-
* - `hybrid` (default): lossless rule-based — no provider needed.
|
|
796
|
-
* - `intelligent` / `selective`: LLM-backed. These need a `provider`, which is
|
|
797
|
-
* only known per-run, so we return a thin wrapper that resolves the concrete
|
|
798
|
-
* compactor from `ctx` at `compact()`-time. This deliberately avoids the
|
|
799
|
-
* container/provider construction-ordering problem: `TOKENS.Compactor` is
|
|
800
|
-
* resolved (and memoized) before `context.provider` exists, but `ctx.provider`
|
|
801
|
-
* is always present once a run is actually compacting. If no provider is
|
|
802
|
-
* available at compact-time the wrapper degrades to the lossless hybrid rules
|
|
803
|
-
* rather than failing.
|
|
804
|
-
*/
|
|
805
|
-
declare function createStrategyCompactor(opts?: StrategyCompactorOptions): Compactor;
|
|
806
|
-
|
|
807
|
-
declare class ToolExecutor {
|
|
808
|
-
private readonly registry;
|
|
809
|
-
private opts;
|
|
810
|
-
/** Minimum gap between coalesced `partial_output` tool.progress emits. */
|
|
811
|
-
static readonly PROGRESS_EMIT_INTERVAL_MS = 100;
|
|
812
|
-
/** Max chars of accumulated stream text carried per coalesced emit (tail). */
|
|
813
|
-
static readonly PROGRESS_TAIL_CHARS = 16384;
|
|
814
|
-
/** Max chars of the head (beginning of output) kept alongside the tail. */
|
|
815
|
-
static readonly PROGRESS_HEAD_CHARS = 16384;
|
|
816
|
-
private readonly serializer;
|
|
817
|
-
private readonly iterationTimeoutMs;
|
|
818
|
-
private readonly maxToolTimeoutMs;
|
|
819
|
-
constructor(registry: {
|
|
820
|
-
get(name: string): Tool | undefined;
|
|
821
|
-
list(): Tool[];
|
|
822
|
-
}, opts: ToolExecutorOptions);
|
|
823
|
-
/**
|
|
824
|
-
* Clear the interactive confirm awaiter so the executor returns
|
|
825
|
-
* `ToolConfirmPendingResult` instead of blocking on stdin. Used by
|
|
826
|
-
* the CLI to switch from inline prompts (REPL) to event-driven
|
|
827
|
-
* confirmation (TUI) at runtime.
|
|
828
|
-
*/
|
|
829
|
-
clearConfirmAwaiter(): void;
|
|
830
|
-
/**
|
|
831
|
-
* Push the tool's per-tool result-render mode into the renderer as the
|
|
832
|
-
* next-result render mode. The config key is `tools.resultRenderMode[name]`
|
|
833
|
-
* — independent of the LLM-side `descriptionMode` so the two can be
|
|
834
|
-
* toggled separately (`/tool read desc simple` vs `/tool read result
|
|
835
|
-
* simple`). Defaults to `extend` when no entry is set.
|
|
836
|
-
*
|
|
837
|
-
* The hint is one-shot: the renderer consumes it on the next
|
|
838
|
-
* `writeToolResult` call so an unset follow-up doesn't inherit a
|
|
839
|
-
* previous tool's mode. Safe no-op when the renderer doesn't implement
|
|
840
|
-
* `setResultRenderMode` (e.g. headless/test renderers).
|
|
841
|
-
*/
|
|
842
|
-
private hintRenderMode;
|
|
843
|
-
private toolLogBase;
|
|
844
|
-
private logToolSuccess;
|
|
845
|
-
private logToolFailure;
|
|
846
|
-
/**
|
|
847
|
-
* Execute a batch of tool uses using the configured strategy.
|
|
848
|
-
* Returns the execution results and the remaining output budget.
|
|
849
|
-
*/
|
|
850
|
-
executeBatch(toolUses: ToolUseBlock[], ctx: Context, strategy: ToolExecutorStrategy): Promise<ToolBatchResult>;
|
|
851
|
-
/**
|
|
852
|
-
* Execute a single tool with timeout, permission check, and output capping.
|
|
853
|
-
* Emits `tool.started` via the injected EventBus (if any) right before
|
|
854
|
-
* invoking the tool — closes the observability gap between "model decided
|
|
855
|
-
* to call a tool" and "tool.executed".
|
|
856
|
-
*/
|
|
857
|
-
executeTool(tool: Tool, use: ToolUseBlock, ctx: Context, budget: number): Promise<{
|
|
858
|
-
block: ToolResultBlock;
|
|
859
|
-
bytes: number;
|
|
860
|
-
}>;
|
|
861
|
-
/**
|
|
862
|
-
* Async "produce" phase: run the tool, serialize, scrub, and spill an
|
|
863
|
-
* oversized output to a disk artifact. Returns the pre-cap text. This is
|
|
864
|
-
* the long-running, concurrency-safe part — it touches NO shared budget
|
|
865
|
-
* state, so multiple invocations can run in parallel without racing.
|
|
866
|
-
*
|
|
867
|
-
* The `budgetHint` only gates the disk-spill threshold (a heuristic for
|
|
868
|
-
* "is this output large enough to persist"); it is NOT the output cap.
|
|
869
|
-
* The authoritative cap is applied synchronously in settleToolOutput()
|
|
870
|
-
* against the live budget.
|
|
871
|
-
*/
|
|
872
|
-
private produceToolOutput;
|
|
873
|
-
/**
|
|
874
|
-
* Synchronous "settle" phase: enforce the output cap against the CURRENT
|
|
875
|
-
* budget, render, and build the result block. This MUST stay synchronous
|
|
876
|
-
* (no awaits) so that, in the parallel/smart strategies, two tools settling
|
|
877
|
-
* one after another against the shared closure budget can't interleave a
|
|
878
|
-
* stale read with a write. The first to settle consumes its bytes; the next
|
|
879
|
-
* settles against the reduced budget; once the budget hits 0, enforceCap
|
|
880
|
-
* truncates — making the per-iteration cap genuinely CUMULATIVE across
|
|
881
|
-
* parallel tools instead of degrading into a per-tool cap.
|
|
882
|
-
*/
|
|
883
|
-
private settleToolOutput;
|
|
884
|
-
private runWithTimeout;
|
|
885
|
-
/** Best-effort tool cleanup; never let it mask the original error. */
|
|
886
|
-
private runToolCleanup;
|
|
887
|
-
private runStreamedTool;
|
|
888
|
-
private unknownToolResult;
|
|
889
|
-
private malformedInputResult;
|
|
890
|
-
private deniedResult;
|
|
891
|
-
private blockedByHookResult;
|
|
892
|
-
/**
|
|
893
|
-
* Subtract a string-content result's UTF-8 byte length from the
|
|
894
|
-
* iteration output budget. Used for synthesized results (unknown tool,
|
|
895
|
-
* validation error, blocked, threw) where the content is a small
|
|
896
|
-
* string built in the executor. The success path no longer goes
|
|
897
|
-
* through here — `executeTool` carries the exact byte count it spent
|
|
898
|
-
* in its return value, derived from `enforceCap`'s `newBudget`.
|
|
899
|
-
*
|
|
900
|
-
* Floors the result at 0 to match the pre-fix `decrementBudget`
|
|
901
|
-
* semantics (over-budget spends don't underflow the running total).
|
|
902
|
-
*/
|
|
903
|
-
private budgetForString;
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
export { DEFAULT_RECOVERY_STRATEGIES as $, AutoCompactionMiddleware as A, detectFrontendIntent as B, type CompactorOptions as C, DefaultDesignKitLoader as D, getDesignKitLoader as E, getDesignState as F, installDesignStudioMiddleware as G, HybridCompactor as H, IntelligentCompactor as I, loadActiveKit as J, loadProjectDesignRules as K, makeAutonomyPromptContributor as L, makeDesignDetectToolCallMiddleware as M, makeDesignDetectUserInputMiddleware as N, makeDesignStudioRequestMiddleware as O, type PersistedActiveKit as P, makeDesignVerifyToolCallMiddleware as Q, recordKitChoice as R, SelectiveCompactor as S, ToolExecutor as T, recordOverrides as U, renderPrompt as V, resolveBundledDesignKitsDir as W, setActiveKit as X, setDesignOverrides as Y, type ContextWindowBudgetSnapshot as Z, _resetDesignKitLoaderMemo as _, AutonomousRunner as a, type RecoveryStrategy as a0, buildRecoveryStrategies as a1, type AutonomousRunnerOptions as b, type AutonomyPromptContributorOptions as c, type CompactorStrategy as d, DefaultErrorHandler as e, DefaultPromptLoader as f, DefaultRetryPolicy as g, DefaultSkillLoader as h, type DesignKitLoaderOptions as i, type DesignOverrides as j, type DoneCheckResult as k, DoneConditionChecker as l, type IntelligentCompactorOptions as m, type PromptLoaderOptions as n, type SelectiveCompactorOptions as o, type SkillLoaderOptions as p, type StrategyCompactorOptions as q, _resetDesignRulesCache as r, activateDesign as s, applyTokenOverrides as t, buildGoalPreamble as u, clearActiveKit as v, clearPersistedActiveKit as w, createStrategyCompactor as x, designProjectDir as y, detectFrontendFile as z };
|