@wrongstack/core 0.284.1 → 0.286.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-status-tracker.d.ts +74 -0
- package/dist/agent-status-tracker.d.ts.map +1 -0
- package/dist/autophase/auto-phase-planner.d.ts +79 -0
- package/dist/autophase/auto-phase-planner.d.ts.map +1 -0
- package/dist/autophase/auto-phase-runner.d.ts +79 -0
- package/dist/autophase/auto-phase-runner.d.ts.map +1 -0
- package/dist/autophase/checkpoint.d.ts +49 -0
- package/dist/autophase/checkpoint.d.ts.map +1 -0
- package/dist/autophase/index.d.ts +9 -0
- package/dist/autophase/index.d.ts.map +1 -0
- package/dist/autophase/phase-graph-builder.d.ts +46 -0
- package/dist/autophase/phase-graph-builder.d.ts.map +1 -0
- package/dist/autophase/phase-orchestrator.d.ts +150 -0
- package/dist/autophase/phase-orchestrator.d.ts.map +1 -0
- package/dist/autophase/phase-store.d.ts +29 -0
- package/dist/autophase/phase-store.d.ts.map +1 -0
- package/dist/autophase/types.d.ts +329 -0
- package/dist/autophase/types.d.ts.map +1 -0
- package/dist/boot.d.ts +73 -0
- package/dist/boot.d.ts.map +1 -0
- package/dist/coordination/adaptive-concurrency.d.ts +63 -0
- package/dist/coordination/adaptive-concurrency.d.ts.map +1 -0
- package/dist/coordination/agent-bridge.d.ts +24 -0
- package/dist/coordination/agent-bridge.d.ts.map +1 -0
- package/dist/coordination/agent-monitor.d.ts +129 -0
- package/dist/coordination/agent-monitor.d.ts.map +1 -0
- package/dist/coordination/agent-subagent-runner.d.ts +74 -0
- package/dist/coordination/agent-subagent-runner.d.ts.map +1 -0
- package/dist/coordination/agents/agent-prompts.d.ts +2 -0
- package/dist/coordination/agents/agent-prompts.d.ts.map +1 -0
- package/dist/coordination/agents/index.d.ts +35 -0
- package/dist/coordination/agents/index.d.ts.map +1 -0
- package/dist/coordination/agents/phase1-discovery.d.ts +4 -0
- package/dist/coordination/agents/phase1-discovery.d.ts.map +1 -0
- package/dist/coordination/agents/phase2-planning.d.ts +4 -0
- package/dist/coordination/agents/phase2-planning.d.ts.map +1 -0
- package/dist/coordination/agents/phase3-build.d.ts +4 -0
- package/dist/coordination/agents/phase3-build.d.ts.map +1 -0
- package/dist/coordination/agents/phase3-techstack.d.ts +13 -0
- package/dist/coordination/agents/phase3-techstack.d.ts.map +1 -0
- package/dist/coordination/agents/phase4-verify.d.ts +4 -0
- package/dist/coordination/agents/phase4-verify.d.ts.map +1 -0
- package/dist/coordination/agents/phase5-review.d.ts +4 -0
- package/dist/coordination/agents/phase5-review.d.ts.map +1 -0
- package/dist/coordination/agents/phase6-domain.d.ts +4 -0
- package/dist/coordination/agents/phase6-domain.d.ts.map +1 -0
- package/dist/coordination/agents/phase7-knowledge.d.ts +4 -0
- package/dist/coordination/agents/phase7-knowledge.d.ts.map +1 -0
- package/dist/coordination/agents/phase8-delivery.d.ts +4 -0
- package/dist/coordination/agents/phase8-delivery.d.ts.map +1 -0
- package/dist/coordination/agents/phase9-meta.d.ts +4 -0
- package/dist/coordination/agents/phase9-meta.d.ts.map +1 -0
- package/dist/coordination/agents/types.d.ts +79 -0
- package/dist/coordination/agents/types.d.ts.map +1 -0
- package/dist/coordination/agents.d.ts +8 -0
- package/dist/coordination/agents.d.ts.map +1 -0
- package/dist/coordination/auto-extend.d.ts +46 -0
- package/dist/coordination/auto-extend.d.ts.map +1 -0
- package/dist/coordination/autonomous-brain.d.ts +152 -0
- package/dist/coordination/autonomous-brain.d.ts.map +1 -0
- package/dist/coordination/autonomous-coordinator.d.ts +243 -0
- package/dist/coordination/autonomous-coordinator.d.ts.map +1 -0
- package/dist/coordination/brain-ledger.d.ts +142 -0
- package/dist/coordination/brain-ledger.d.ts.map +1 -0
- package/dist/coordination/brain-monitor.d.ts +103 -0
- package/dist/coordination/brain-monitor.d.ts.map +1 -0
- package/dist/coordination/brain.d.ts +147 -0
- package/dist/coordination/brain.d.ts.map +1 -0
- package/dist/coordination/change-manager.d.ts +151 -0
- package/dist/coordination/change-manager.d.ts.map +1 -0
- package/dist/coordination/checkpoint-wiring.d.ts +61 -0
- package/dist/coordination/checkpoint-wiring.d.ts.map +1 -0
- package/dist/coordination/collab-bus.d.ts +132 -0
- package/dist/coordination/collab-bus.d.ts.map +1 -0
- package/dist/coordination/collab-debug.d.ts +302 -0
- package/dist/coordination/collab-debug.d.ts.map +1 -0
- package/dist/coordination/commit-safety.d.ts +72 -0
- package/dist/coordination/commit-safety.d.ts.map +1 -0
- package/dist/coordination/consensus-protocol.d.ts +106 -0
- package/dist/coordination/consensus-protocol.d.ts.map +1 -0
- package/dist/coordination/coordinator/error-classifier.d.ts +15 -0
- package/dist/coordination/coordinator/error-classifier.d.ts.map +1 -0
- package/dist/coordination/delegate-tool.d.ts +101 -0
- package/dist/coordination/delegate-tool.d.ts.map +1 -0
- package/dist/coordination/dep-watcher-bridge.d.ts +47 -0
- package/dist/coordination/dep-watcher-bridge.d.ts.map +1 -0
- package/dist/coordination/dep-watcher.d.ts +74 -0
- package/dist/coordination/dep-watcher.d.ts.map +1 -0
- package/dist/coordination/director/director-errors.d.ts +29 -0
- package/dist/coordination/director/director-errors.d.ts.map +1 -0
- package/dist/coordination/director-construction.d.ts +90 -0
- package/dist/coordination/director-construction.d.ts.map +1 -0
- package/dist/coordination/director-prompts.d.ts +119 -0
- package/dist/coordination/director-prompts.d.ts.map +1 -0
- package/dist/coordination/director-session.d.ts +68 -0
- package/dist/coordination/director-session.d.ts.map +1 -0
- package/dist/coordination/director-tools.d.ts +65 -0
- package/dist/coordination/director-tools.d.ts.map +1 -0
- package/dist/coordination/director.d.ts +802 -0
- package/dist/coordination/director.d.ts.map +1 -0
- package/dist/coordination/dispatcher.d.ts +82 -0
- package/dist/coordination/dispatcher.d.ts.map +1 -0
- package/dist/coordination/file-author-tracker.d.ts +76 -0
- package/dist/coordination/file-author-tracker.d.ts.map +1 -0
- package/dist/coordination/fleet-bus.d.ts +122 -0
- package/dist/coordination/fleet-bus.d.ts.map +1 -0
- package/dist/coordination/fleet-event-validation.d.ts +10 -0
- package/dist/coordination/fleet-event-validation.d.ts.map +1 -0
- package/dist/coordination/fleet-manager.d.ts +234 -0
- package/dist/coordination/fleet-manager.d.ts.map +1 -0
- package/dist/coordination/fleet-spawn.d.ts +102 -0
- package/dist/coordination/fleet-spawn.d.ts.map +1 -0
- package/dist/coordination/fleet-status-tool.d.ts +36 -0
- package/dist/coordination/fleet-status-tool.d.ts.map +1 -0
- package/dist/coordination/fleet-supervisor.d.ts +157 -0
- package/dist/coordination/fleet-supervisor.d.ts.map +1 -0
- package/dist/coordination/fleet.d.ts +96 -0
- package/dist/coordination/fleet.d.ts.map +1 -0
- package/dist/coordination/global-mailbox.d.ts +295 -0
- package/dist/coordination/global-mailbox.d.ts.map +1 -0
- package/dist/coordination/icoordinator.d.ts +97 -0
- package/dist/coordination/icoordinator.d.ts.map +1 -0
- package/dist/coordination/ifleet-manager.d.ts +177 -0
- package/dist/coordination/ifleet-manager.d.ts.map +1 -0
- package/dist/coordination/in-memory-transport.d.ts +12 -0
- package/dist/coordination/in-memory-transport.d.ts.map +1 -0
- package/dist/coordination/index.d.ts +79 -2587
- package/dist/coordination/index.d.ts.map +1 -0
- package/dist/coordination/index.js +2262 -673
- package/dist/coordination/index.js.map +7 -1
- package/dist/coordination/knowledge-graph.d.ts +229 -0
- package/dist/coordination/knowledge-graph.d.ts.map +1 -0
- package/dist/coordination/large-answer-store.d.ts +61 -0
- package/dist/coordination/large-answer-store.d.ts.map +1 -0
- package/dist/coordination/mail-tools.d.ts +34 -0
- package/dist/coordination/mail-tools.d.ts.map +1 -0
- package/dist/coordination/mailbox-actions.d.ts +67 -0
- package/dist/coordination/mailbox-actions.d.ts.map +1 -0
- package/dist/coordination/mailbox-constants.d.ts +64 -0
- package/dist/coordination/mailbox-constants.d.ts.map +1 -0
- package/dist/coordination/mailbox-events.d.ts +32 -0
- package/dist/coordination/mailbox-events.d.ts.map +1 -0
- package/dist/coordination/mailbox-health.d.ts +131 -0
- package/dist/coordination/mailbox-health.d.ts.map +1 -0
- package/dist/coordination/mailbox-hooks.d.ts +55 -0
- package/dist/coordination/mailbox-hooks.d.ts.map +1 -0
- package/dist/coordination/mailbox-message-codec.d.ts +8 -0
- package/dist/coordination/mailbox-message-codec.d.ts.map +1 -0
- package/dist/coordination/mailbox-tool.d.ts +75 -0
- package/dist/coordination/mailbox-tool.d.ts.map +1 -0
- package/dist/{mailbox-types-BGZWrYTJ.d.ts → coordination/mailbox-types.d.ts} +125 -26
- package/dist/coordination/mailbox-types.d.ts.map +1 -0
- package/dist/coordination/mailbox.d.ts +88 -0
- package/dist/coordination/mailbox.d.ts.map +1 -0
- package/dist/coordination/model-matrix.d.ts +98 -0
- package/dist/coordination/model-matrix.d.ts.map +1 -0
- package/dist/coordination/multi-agent-coordinator.d.ts +202 -0
- package/dist/coordination/multi-agent-coordinator.d.ts.map +1 -0
- package/dist/coordination/null-fleet-bus.d.ts +10 -0
- package/dist/coordination/null-fleet-bus.d.ts.map +1 -0
- package/dist/coordination/package-author-tracker.d.ts +87 -0
- package/dist/coordination/package-author-tracker.d.ts.map +1 -0
- package/dist/coordination/package-outdated-watcher.d.ts +83 -0
- package/dist/coordination/package-outdated-watcher.d.ts.map +1 -0
- package/dist/coordination/single-instance-mailbox.d.ts +154 -0
- package/dist/coordination/single-instance-mailbox.d.ts.map +1 -0
- package/dist/coordination/spawn-budget.d.ts +6 -0
- package/dist/coordination/spawn-budget.d.ts.map +1 -0
- package/dist/coordination/subagent-budget.d.ts +323 -0
- package/dist/coordination/subagent-budget.d.ts.map +1 -0
- package/dist/coordination/subagent-nicknames.d.ts +42 -0
- package/dist/coordination/subagent-nicknames.d.ts.map +1 -0
- package/dist/coordination/subagent-result-tool.d.ts +20 -0
- package/dist/coordination/subagent-result-tool.d.ts.map +1 -0
- package/dist/coordination/task-auctioneer.d.ts +143 -0
- package/dist/coordination/task-auctioneer.d.ts.map +1 -0
- package/dist/coordination/task-dag.d.ts +147 -0
- package/dist/coordination/task-dag.d.ts.map +1 -0
- package/dist/coordination/techstack-mailbox-consumer.d.ts +50 -0
- package/dist/coordination/techstack-mailbox-consumer.d.ts.map +1 -0
- package/dist/coordination/transport.d.ts +2 -0
- package/dist/coordination/transport.d.ts.map +1 -0
- package/dist/coordination/worktree-task-runner.d.ts +45 -0
- package/dist/coordination/worktree-task-runner.d.ts.map +1 -0
- package/dist/core/agent-internals.d.ts +41 -0
- package/dist/core/agent-internals.d.ts.map +1 -0
- package/dist/core/agent-loop.d.ts +18 -0
- package/dist/core/agent-loop.d.ts.map +1 -0
- package/dist/core/agent-response.d.ts +21 -0
- package/dist/core/agent-response.d.ts.map +1 -0
- package/dist/core/agent-tools.d.ts +21 -0
- package/dist/core/agent-tools.d.ts.map +1 -0
- package/dist/core/agent-types.d.ts +95 -0
- package/dist/core/agent-types.d.ts.map +1 -0
- package/dist/core/agent.d.ts +54 -0
- package/dist/core/agent.d.ts.map +1 -0
- package/dist/core/btw.d.ts +40 -0
- package/dist/core/btw.d.ts.map +1 -0
- package/dist/core/context.d.ts +269 -0
- package/dist/core/context.d.ts.map +1 -0
- package/dist/core/continue-intent.d.ts +92 -0
- package/dist/core/continue-intent.d.ts.map +1 -0
- package/dist/core/continue-to-next-iteration.d.ts +96 -0
- package/dist/core/continue-to-next-iteration.d.ts.map +1 -0
- package/dist/core/conversation-state.d.ts +96 -0
- package/dist/core/conversation-state.d.ts.map +1 -0
- package/dist/core/fallback-model.d.ts +94 -0
- package/dist/core/fallback-model.d.ts.map +1 -0
- package/dist/core/fleet-pulse.d.ts +42 -0
- package/dist/core/fleet-pulse.d.ts.map +1 -0
- package/dist/core/input-builder.d.ts +95 -0
- package/dist/core/input-builder.d.ts.map +1 -0
- package/dist/core/instruction-bundle.d.ts +22 -0
- package/dist/core/instruction-bundle.d.ts.map +1 -0
- package/dist/core/iteration-limit.d.ts +35 -0
- package/dist/core/iteration-limit.d.ts.map +1 -0
- package/dist/core/mailbox-loop.d.ts +63 -0
- package/dist/core/mailbox-loop.d.ts.map +1 -0
- package/dist/core/modes/brief.d.ts +2 -0
- package/dist/core/modes/brief.d.ts.map +1 -0
- package/dist/core/modes/default.d.ts +8 -0
- package/dist/core/modes/default.d.ts.map +1 -0
- package/dist/core/modes/teach.d.ts +2 -0
- package/dist/core/modes/teach.d.ts.map +1 -0
- package/dist/core/provider-runner.d.ts +24 -0
- package/dist/core/provider-runner.d.ts.map +1 -0
- package/dist/core/queued-messages.d.ts +55 -0
- package/dist/core/queued-messages.d.ts.map +1 -0
- package/dist/core/run-env.d.ts +49 -0
- package/dist/core/run-env.d.ts.map +1 -0
- package/dist/core/streaming-response-builder.d.ts +78 -0
- package/dist/core/streaming-response-builder.d.ts.map +1 -0
- package/dist/core/system-prompt-builder.d.ts +213 -0
- package/dist/core/system-prompt-builder.d.ts.map +1 -0
- package/dist/defaults/index.d.ts +68 -158
- package/dist/defaults/index.d.ts.map +1 -0
- package/dist/defaults/index.js +2061 -1300
- package/dist/defaults/index.js.map +7 -1
- package/dist/execution/auto-compaction-middleware.d.ts +123 -0
- package/dist/execution/auto-compaction-middleware.d.ts.map +1 -0
- package/dist/execution/autonomous-runner.d.ts +61 -0
- package/dist/execution/autonomous-runner.d.ts.map +1 -0
- package/dist/execution/autonomy-brain.d.ts +151 -0
- package/dist/execution/autonomy-brain.d.ts.map +1 -0
- package/dist/execution/autonomy-prompt-contributor.d.ts +39 -0
- package/dist/execution/autonomy-prompt-contributor.d.ts.map +1 -0
- package/dist/execution/brain-chain.d.ts +53 -0
- package/dist/execution/brain-chain.d.ts.map +1 -0
- package/dist/execution/brain-evaluation.d.ts +66 -0
- package/dist/execution/brain-evaluation.d.ts.map +1 -0
- package/dist/execution/brain-runtime.d.ts +171 -0
- package/dist/execution/brain-runtime.d.ts.map +1 -0
- package/dist/execution/compaction-core.d.ts +103 -0
- package/dist/execution/compaction-core.d.ts.map +1 -0
- package/dist/execution/compactor.d.ts +56 -0
- package/dist/execution/compactor.d.ts.map +1 -0
- package/dist/execution/council-brain.d.ts +79 -0
- package/dist/execution/council-brain.d.ts.map +1 -0
- package/dist/execution/design-color.d.ts +31 -0
- package/dist/execution/design-color.d.ts.map +1 -0
- package/dist/execution/design-detect.d.ts +96 -0
- package/dist/execution/design-detect.d.ts.map +1 -0
- package/dist/execution/design-kit-loader.d.ts +53 -0
- package/dist/execution/design-kit-loader.d.ts.map +1 -0
- package/dist/execution/design-materialize.d.ts +32 -0
- package/dist/execution/design-materialize.d.ts.map +1 -0
- package/dist/execution/design-project-store.d.ts +57 -0
- package/dist/execution/design-project-store.d.ts.map +1 -0
- package/dist/execution/design-verify.d.ts +44 -0
- package/dist/execution/design-verify.d.ts.map +1 -0
- package/dist/execution/error-handler.d.ts +34 -0
- package/dist/execution/error-handler.d.ts.map +1 -0
- package/dist/{parallel-eternal-engine-HUrtePLd.d.ts → execution/eternal-autonomy.d.ts} +22 -225
- package/dist/execution/eternal-autonomy.d.ts.map +1 -0
- package/dist/execution/goal-preamble.d.ts +2 -0
- package/dist/execution/goal-preamble.d.ts.map +1 -0
- package/dist/execution/index.d.ts +25 -180
- package/dist/execution/index.d.ts.map +1 -0
- package/dist/execution/index.js +1748 -490
- package/dist/execution/index.js.map +7 -1
- package/dist/execution/intelligent-compactor.d.ts +85 -0
- package/dist/execution/intelligent-compactor.d.ts.map +1 -0
- package/dist/execution/model-runtime.d.ts +75 -0
- package/dist/execution/model-runtime.d.ts.map +1 -0
- package/dist/execution/parallel-eternal-engine.d.ts +142 -0
- package/dist/execution/parallel-eternal-engine.d.ts.map +1 -0
- package/dist/execution/prompt-enhancer.d.ts +12 -13
- package/dist/execution/prompt-enhancer.d.ts.map +1 -0
- package/dist/execution/prompt-enhancer.js +13 -7
- package/dist/execution/prompt-enhancer.js.map +7 -1
- package/dist/execution/prompt-loader.d.ts +52 -0
- package/dist/execution/prompt-loader.d.ts.map +1 -0
- package/dist/execution/provider-runner-impl.d.ts +14 -0
- package/dist/execution/provider-runner-impl.d.ts.map +1 -0
- package/dist/execution/regex-patterns.d.ts +7 -0
- package/dist/execution/regex-patterns.d.ts.map +1 -0
- package/dist/execution/retry-policy.d.ts +35 -0
- package/dist/execution/retry-policy.d.ts.map +1 -0
- package/dist/execution/selective-compactor.d.ts +94 -0
- package/dist/execution/selective-compactor.d.ts.map +1 -0
- package/dist/execution/skill-loader.d.ts +43 -0
- package/dist/execution/skill-loader.d.ts.map +1 -0
- package/dist/execution/strategy-compactor.d.ts +43 -0
- package/dist/execution/strategy-compactor.d.ts.map +1 -0
- package/dist/execution/tool-executor.d.ts +112 -0
- package/dist/execution/tool-executor.d.ts.map +1 -0
- package/dist/extension/extension-points.d.ts +121 -0
- package/dist/extension/extension-points.d.ts.map +1 -0
- package/dist/extension/index.d.ts +3 -10
- package/dist/extension/index.d.ts.map +1 -0
- package/dist/extension/index.js +59 -5
- package/dist/extension/index.js.map +7 -1
- package/dist/extension/registry.d.ts +86 -0
- package/dist/extension/registry.d.ts.map +1 -0
- package/dist/fleet-notifier.d.ts +28 -0
- package/dist/fleet-notifier.d.ts.map +1 -0
- package/dist/hooks/http-executor.d.ts +11 -0
- package/dist/hooks/http-executor.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/registry.d.ts +71 -0
- package/dist/hooks/registry.d.ts.map +1 -0
- package/dist/hooks/runner.d.ts +65 -0
- package/dist/hooks/runner.d.ts.map +1 -0
- package/dist/hooks/shell-executor.d.ts +33 -0
- package/dist/hooks/shell-executor.d.ts.map +1 -0
- package/dist/hooks/shell-hooks-equal.d.ts +15 -0
- package/dist/hooks/shell-hooks-equal.d.ts.map +1 -0
- package/dist/hq/agent-bridge.d.ts +27 -0
- package/dist/hq/agent-bridge.d.ts.map +1 -0
- package/dist/hq/alerts.d.ts +67 -0
- package/dist/hq/alerts.d.ts.map +1 -0
- package/dist/hq/auth-store.d.ts +179 -0
- package/dist/hq/auth-store.d.ts.map +1 -0
- package/dist/hq/brain-bridge.d.ts +37 -0
- package/dist/hq/brain-bridge.d.ts.map +1 -0
- package/dist/hq/commands.d.ts +122 -0
- package/dist/hq/commands.d.ts.map +1 -0
- package/dist/hq/cost-bridge.d.ts +36 -0
- package/dist/hq/cost-bridge.d.ts.map +1 -0
- package/dist/hq/factory.d.ts +69 -0
- package/dist/hq/factory.d.ts.map +1 -0
- package/dist/hq/fleet-bridge.d.ts +39 -0
- package/dist/hq/fleet-bridge.d.ts.map +1 -0
- package/dist/hq/index.d.ts +18 -816
- package/dist/hq/index.d.ts.map +1 -0
- package/dist/hq/index.js +1043 -192
- package/dist/hq/index.js.map +7 -1
- package/dist/hq/mailbox-mapper.d.ts +27 -0
- package/dist/hq/mailbox-mapper.d.ts.map +1 -0
- package/dist/hq/persistence.d.ts +121 -0
- package/dist/hq/persistence.d.ts.map +1 -0
- package/dist/hq/protocol.d.ts +612 -0
- package/dist/hq/protocol.d.ts.map +1 -0
- package/dist/hq/publisher.d.ts +181 -0
- package/dist/hq/publisher.d.ts.map +1 -0
- package/dist/hq/redaction.d.ts +30 -0
- package/dist/hq/redaction.d.ts.map +1 -0
- package/dist/hq/session-bridge.d.ts +29 -0
- package/dist/hq/session-bridge.d.ts.map +1 -0
- package/dist/hq/tool-bridge.d.ts +41 -0
- package/dist/hq/tool-bridge.d.ts.map +1 -0
- package/dist/hq/transcript-mapper.d.ts +36 -0
- package/dist/hq/transcript-mapper.d.ts.map +1 -0
- package/dist/hq/worktree-bridge.d.ts +34 -0
- package/dist/hq/worktree-bridge.d.ts.map +1 -0
- package/dist/index.d.ts +114 -2872
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6104 -2737
- package/dist/index.js.map +7 -1
- package/dist/infrastructure/context-manager.d.ts +92 -0
- package/dist/infrastructure/context-manager.d.ts.map +1 -0
- package/dist/infrastructure/index.d.ts +6 -64
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/infrastructure/index.js +39 -12
- package/dist/infrastructure/index.js.map +7 -1
- package/dist/infrastructure/logger.d.ts +99 -0
- package/dist/infrastructure/logger.d.ts.map +1 -0
- package/dist/infrastructure/mcp-servers.d.ts +83 -0
- package/dist/infrastructure/mcp-servers.d.ts.map +1 -0
- package/dist/{path-resolver-CMS5307d.d.ts → infrastructure/path-resolver.d.ts} +3 -5
- package/dist/infrastructure/path-resolver.d.ts.map +1 -0
- package/dist/infrastructure/token-counter.d.ts +57 -0
- package/dist/infrastructure/token-counter.d.ts.map +1 -0
- package/dist/kernel/container.d.ts +84 -0
- package/dist/kernel/container.d.ts.map +1 -0
- package/dist/{events-Bgnh43r9.d.ts → kernel/events.d.ts} +134 -210
- package/dist/kernel/events.d.ts.map +1 -0
- package/dist/kernel/index.d.ts +6 -107
- package/dist/kernel/index.d.ts.map +1 -0
- package/dist/kernel/index.js +56 -4
- package/dist/kernel/index.js.map +7 -1
- package/dist/kernel/pipeline.d.ts +105 -0
- package/dist/kernel/pipeline.d.ts.map +1 -0
- package/dist/kernel/run-controller.d.ts +55 -0
- package/dist/kernel/run-controller.d.ts.map +1 -0
- package/dist/kernel/tokens.d.ts +53 -0
- package/dist/kernel/tokens.d.ts.map +1 -0
- package/dist/mailbox-attach.d.ts +27 -0
- package/dist/mailbox-attach.d.ts.map +1 -0
- package/dist/middleware/collab-pause.d.ts +73 -0
- package/dist/middleware/collab-pause.d.ts.map +1 -0
- package/dist/models/codex-catalog.d.ts +41 -0
- package/dist/models/codex-catalog.d.ts.map +1 -0
- package/dist/models/index.d.ts +8 -163
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +150 -51
- package/dist/models/index.js.map +7 -1
- package/dist/models/llm-selector.d.ts +47 -0
- package/dist/models/llm-selector.d.ts.map +1 -0
- package/dist/models/mode-store.d.ts +22 -0
- package/dist/models/mode-store.d.ts.map +1 -0
- package/dist/models/model-intelligence.d.ts +56 -0
- package/dist/models/model-intelligence.d.ts.map +1 -0
- package/dist/models/model-router.d.ts +100 -0
- package/dist/models/model-router.d.ts.map +1 -0
- package/dist/models/models-registry.d.ts +106 -0
- package/dist/models/models-registry.d.ts.map +1 -0
- package/dist/models/provider-model-resolve.d.ts +69 -0
- package/dist/models/provider-model-resolve.d.ts.map +1 -0
- package/dist/observability/event-bridge.d.ts +10 -0
- package/dist/observability/event-bridge.d.ts.map +1 -0
- package/dist/observability/health.d.ts +18 -0
- package/dist/observability/health.d.ts.map +1 -0
- package/dist/observability/index.d.ts +9 -354
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +37 -23
- package/dist/observability/index.js.map +7 -1
- package/dist/observability/metrics.d.ts +26 -0
- package/dist/observability/metrics.d.ts.map +1 -0
- package/dist/observability/otel-tracer.d.ts +41 -0
- package/dist/observability/otel-tracer.d.ts.map +1 -0
- package/dist/observability/otlp-metrics.d.ts +111 -0
- package/dist/observability/otlp-metrics.d.ts.map +1 -0
- package/dist/observability/otlp-traces.d.ts +95 -0
- package/dist/observability/otlp-traces.d.ts.map +1 -0
- package/dist/observability/prometheus.d.ts +49 -0
- package/dist/observability/prometheus.d.ts.map +1 -0
- package/dist/observability/tracer.d.ts +9 -0
- package/dist/observability/tracer.d.ts.map +1 -0
- package/dist/plugin/api.d.ts +226 -0
- package/dist/plugin/api.d.ts.map +1 -0
- package/dist/plugin/loader.d.ts +73 -0
- package/dist/plugin/loader.d.ts.map +1 -0
- package/dist/plugins/chimera-plugin.d.ts +37 -0
- package/dist/plugins/chimera-plugin.d.ts.map +1 -0
- package/dist/plugins/prompts-plugin.d.ts +26 -0
- package/dist/plugins/prompts-plugin.d.ts.map +1 -0
- package/dist/plugins/security-plugin.d.ts +19 -0
- package/dist/plugins/security-plugin.d.ts.map +1 -0
- package/dist/plugins/skills-plugin.d.ts +42 -0
- package/dist/plugins/skills-plugin.d.ts.map +1 -0
- package/dist/plugins/sync-plugin.d.ts +22 -0
- package/dist/plugins/sync-plugin.d.ts.map +1 -0
- package/dist/prompts/index.d.ts +3 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/prompt-installer.d.ts +50 -0
- package/dist/prompts/prompt-installer.d.ts.map +1 -0
- package/dist/prompts/prompt-manifest-store.d.ts +18 -0
- package/dist/prompts/prompt-manifest-store.d.ts.map +1 -0
- package/dist/registry/provider-registry.d.ts +51 -0
- package/dist/registry/provider-registry.d.ts.map +1 -0
- package/dist/registry/slash-command-registry.d.ts +61 -0
- package/dist/registry/slash-command-registry.d.ts.map +1 -0
- package/dist/registry/tool-registry.d.ts +154 -0
- package/dist/registry/tool-registry.d.ts.map +1 -0
- package/dist/replay/hash.d.ts +31 -0
- package/dist/replay/hash.d.ts.map +1 -0
- package/dist/replay/replay-provider-runner.d.ts +53 -0
- package/dist/replay/replay-provider-runner.d.ts.map +1 -0
- package/dist/{index-CbyuOE5y.d.ts → security/capabilities.d.ts} +31 -34
- package/dist/security/capabilities.d.ts.map +1 -0
- package/dist/security/config-secrets.d.ts +25 -0
- package/dist/security/config-secrets.d.ts.map +1 -0
- package/dist/security/index.d.ts +7 -8
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +354 -401
- package/dist/security/index.js.map +7 -1
- package/dist/security/permission-policy-schema.d.ts +77 -0
- package/dist/security/permission-policy-schema.d.ts.map +1 -0
- package/dist/security/permission-policy.d.ts +158 -0
- package/dist/security/permission-policy.d.ts.map +1 -0
- package/dist/security/secret-scrubber.d.ts +14 -0
- package/dist/security/secret-scrubber.d.ts.map +1 -0
- package/dist/security/secret-vault.d.ts +96 -0
- package/dist/security/secret-vault.d.ts.map +1 -0
- package/dist/security/yolo-risk.d.ts +11 -0
- package/dist/security/yolo-risk.d.ts.map +1 -0
- package/dist/{session-registry-Dvg7i_IA.d.ts → session-registry.d.ts} +8 -9
- package/dist/session-registry.d.ts.map +1 -0
- package/dist/skills/foreign-sources.d.ts +59 -0
- package/dist/skills/foreign-sources.d.ts.map +1 -0
- package/dist/skills/frontmatter.d.ts +44 -0
- package/dist/skills/frontmatter.d.ts.map +1 -0
- package/dist/skills/github-fetcher.d.ts +38 -0
- package/dist/skills/github-fetcher.d.ts.map +1 -0
- package/dist/skills/index.d.ts +11 -582
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +81 -43
- package/dist/skills/index.js.map +7 -1
- package/dist/skills/limits.d.ts +92 -0
- package/dist/skills/limits.d.ts.map +1 -0
- package/dist/skills/manifest-store.d.ts +42 -0
- package/dist/skills/manifest-store.d.ts.map +1 -0
- package/dist/skills/registry/github-direct-adapter.d.ts +17 -0
- package/dist/skills/registry/github-direct-adapter.d.ts.map +1 -0
- package/dist/skills/registry/registry-adapter.d.ts +84 -0
- package/dist/skills/registry/registry-adapter.d.ts.map +1 -0
- package/dist/skills/registry/skills-sh-adapter.d.ts +13 -0
- package/dist/skills/registry/skills-sh-adapter.d.ts.map +1 -0
- package/dist/skills/skill-generator.d.ts +82 -0
- package/dist/skills/skill-generator.d.ts.map +1 -0
- package/dist/skills/skill-installer.d.ts +124 -0
- package/dist/skills/skill-installer.d.ts.map +1 -0
- package/dist/storage/annotations-store.d.ts +118 -0
- package/dist/storage/annotations-store.d.ts.map +1 -0
- package/dist/storage/attachment-store.d.ts +31 -0
- package/dist/storage/attachment-store.d.ts.map +1 -0
- package/dist/storage/cloud-sync.d.ts +44 -0
- package/dist/storage/cloud-sync.d.ts.map +1 -0
- package/dist/storage/completed-work-checkpoint.d.ts +11 -0
- package/dist/storage/completed-work-checkpoint.d.ts.map +1 -0
- package/dist/storage/config-loader.d.ts +114 -0
- package/dist/storage/config-loader.d.ts.map +1 -0
- package/dist/storage/config-migration.d.ts +87 -0
- package/dist/storage/config-migration.d.ts.map +1 -0
- package/dist/storage/config-store.d.ts +22 -0
- package/dist/storage/config-store.d.ts.map +1 -0
- package/dist/{director-state-CMS_bMs4.d.ts → storage/director-state.d.ts} +28 -8
- package/dist/storage/director-state.d.ts.map +1 -0
- package/dist/storage/file-session-writer.d.ts +169 -0
- package/dist/storage/file-session-writer.d.ts.map +1 -0
- package/dist/{goal-store-Datpp-ar.d.ts → storage/goal-store.d.ts} +26 -19
- package/dist/storage/goal-store.d.ts.map +1 -0
- package/dist/storage/index.d.ts +39 -1031
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +783 -443
- package/dist/storage/index.js.map +7 -1
- package/dist/storage/input-history-store.d.ts +56 -0
- package/dist/storage/input-history-store.d.ts.map +1 -0
- package/dist/storage/memory-backend.d.ts +66 -0
- package/dist/storage/memory-backend.d.ts.map +1 -0
- package/dist/storage/memory-consolidator.d.ts +50 -0
- package/dist/storage/memory-consolidator.d.ts.map +1 -0
- package/dist/storage/memory-graph-backend.d.ts +117 -0
- package/dist/storage/memory-graph-backend.d.ts.map +1 -0
- package/dist/storage/memory-store.d.ts +119 -0
- package/dist/storage/memory-store.d.ts.map +1 -0
- package/dist/storage/plan-store.d.ts +78 -0
- package/dist/storage/plan-store.d.ts.map +1 -0
- package/dist/storage/plan-templates.d.ts +21 -0
- package/dist/storage/plan-templates.d.ts.map +1 -0
- package/dist/storage/prompt-store.d.ts +37 -0
- package/dist/storage/prompt-store.d.ts.map +1 -0
- package/dist/storage/prompt-usage-store.d.ts +29 -0
- package/dist/storage/prompt-usage-store.d.ts.map +1 -0
- package/dist/storage/provider-config-watcher.d.ts +34 -0
- package/dist/storage/provider-config-watcher.d.ts.map +1 -0
- package/dist/storage/queue-store.d.ts +41 -0
- package/dist/storage/queue-store.d.ts.map +1 -0
- package/dist/storage/recovery-lock.d.ts +79 -0
- package/dist/storage/recovery-lock.d.ts.map +1 -0
- package/dist/storage/replay-log-store.d.ts +97 -0
- package/dist/storage/replay-log-store.d.ts.map +1 -0
- package/dist/storage/session-analyzer.d.ts +48 -0
- package/dist/storage/session-analyzer.d.ts.map +1 -0
- package/dist/storage/session-checkpoint-cas.d.ts +37 -0
- package/dist/storage/session-checkpoint-cas.d.ts.map +1 -0
- package/dist/{session-event-bridge-D_z_mBwk.d.ts → storage/session-event-bridge.d.ts} +14 -15
- package/dist/storage/session-event-bridge.d.ts.map +1 -0
- package/dist/storage/session-helpers.d.ts +9 -0
- package/dist/storage/session-helpers.d.ts.map +1 -0
- package/dist/storage/session-id.d.ts +18 -0
- package/dist/storage/session-id.d.ts.map +1 -0
- package/dist/storage/session-reader.d.ts +21 -0
- package/dist/storage/session-reader.d.ts.map +1 -0
- package/dist/storage/session-recovery.d.ts +93 -0
- package/dist/storage/session-recovery.d.ts.map +1 -0
- package/dist/storage/session-resume-validation.d.ts +6 -0
- package/dist/storage/session-resume-validation.d.ts.map +1 -0
- package/dist/storage/session-rewinder.d.ts +21 -0
- package/dist/storage/session-rewinder.d.ts.map +1 -0
- package/dist/storage/session-store.d.ts +219 -0
- package/dist/storage/session-store.d.ts.map +1 -0
- package/dist/storage/session-summary.d.ts +12 -0
- package/dist/storage/session-summary.d.ts.map +1 -0
- package/dist/storage/session-tool-call-ends.d.ts +5 -0
- package/dist/storage/session-tool-call-ends.d.ts.map +1 -0
- package/dist/storage/storage-concurrency.d.ts +2 -0
- package/dist/storage/storage-concurrency.d.ts.map +1 -0
- package/dist/storage/task-store.d.ts +33 -0
- package/dist/storage/task-store.d.ts.map +1 -0
- package/dist/storage/todos-checkpoint.d.ts +39 -0
- package/dist/storage/todos-checkpoint.d.ts.map +1 -0
- package/dist/storage/tool-audit-log.d.ts +141 -0
- package/dist/storage/tool-audit-log.d.ts.map +1 -0
- package/dist/tasking/index.d.ts +3 -124
- package/dist/tasking/index.d.ts.map +1 -0
- package/dist/tasking/index.js +57 -4
- package/dist/tasking/index.js.map +7 -1
- package/dist/tasking/task-store.d.ts +22 -0
- package/dist/tasking/task-store.d.ts.map +1 -0
- package/dist/tasking/task-tracker.d.ts +102 -0
- package/dist/tasking/task-tracker.d.ts.map +1 -0
- package/dist/tools/index.d.ts +2 -59
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +93 -14
- package/dist/tools/index.js.map +7 -1
- package/dist/tools/mcp-control.d.ts +53 -0
- package/dist/tools/mcp-control.d.ts.map +1 -0
- package/dist/tools/mcp-use.d.ts +24 -0
- package/dist/tools/mcp-use.d.ts.map +1 -0
- package/dist/types/agent-bridge.d.ts +42 -0
- package/dist/types/agent-bridge.d.ts.map +1 -0
- package/dist/types/attachment.d.ts +54 -0
- package/dist/types/attachment.d.ts.map +1 -0
- package/dist/types/autonomy.d.ts +5 -0
- package/dist/types/autonomy.d.ts.map +1 -0
- package/dist/types/blocks.d.ts +76 -0
- package/dist/types/blocks.d.ts.map +1 -0
- package/dist/{compactor-DQLL4HTo.d.ts → types/compactor.d.ts} +5 -7
- package/dist/types/compactor.d.ts.map +1 -0
- package/dist/{config-MRqn1V-u.d.ts → types/config.d.ts} +344 -355
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/context-evidence.d.ts +68 -0
- package/dist/types/context-evidence.d.ts.map +1 -0
- package/dist/types/context-window.d.ts +35 -0
- package/dist/types/context-window.d.ts.map +1 -0
- package/dist/{default-config-B79_gJYv.d.ts → types/default-config.d.ts} +10 -11
- package/dist/types/default-config.d.ts.map +1 -0
- package/dist/types/design-kit.d.ts +91 -0
- package/dist/types/design-kit.d.ts.map +1 -0
- package/dist/{retry-policy-CQ7KwXJa.d.ts → types/error-handler.d.ts} +5 -12
- package/dist/types/error-handler.d.ts.map +1 -0
- package/dist/types/errors.d.ts +277 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/hooks.d.ts +167 -0
- package/dist/types/hooks.d.ts.map +1 -0
- package/dist/types/index.d.ts +40 -244
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +101 -12
- package/dist/types/index.js.map +7 -1
- package/dist/{input-reader-E-ffP2ee.d.ts → types/input-reader.d.ts} +3 -4
- package/dist/types/input-reader.d.ts.map +1 -0
- package/dist/{logger-B63L5bTg.d.ts → types/logger.d.ts} +3 -4
- package/dist/types/logger.d.ts.map +1 -0
- package/dist/types/memory.d.ts +89 -0
- package/dist/types/memory.d.ts.map +1 -0
- package/dist/types/messages.d.ts +24 -0
- package/dist/types/messages.d.ts.map +1 -0
- package/dist/types/mode-prompts.d.ts +2 -0
- package/dist/types/mode-prompts.d.ts.map +1 -0
- package/dist/{mode-CZlO9iU1.d.ts → types/mode.d.ts} +6 -7
- package/dist/types/mode.d.ts.map +1 -0
- package/dist/types/models-registry.d.ts +105 -0
- package/dist/types/models-registry.d.ts.map +1 -0
- package/dist/types/multi-agent.d.ts +443 -0
- package/dist/types/multi-agent.d.ts.map +1 -0
- package/dist/{observability-D-HZN_mF.d.ts → types/observability.d.ts} +17 -13
- package/dist/types/observability.d.ts.map +1 -0
- package/dist/{path-resolver-CPRj4bFY.d.ts → types/path-resolver.d.ts} +2 -3
- package/dist/types/path-resolver.d.ts.map +1 -0
- package/dist/{permission-ByDKXEcG.d.ts → types/permission.d.ts} +8 -9
- package/dist/types/permission.d.ts.map +1 -0
- package/dist/types/plugin.d.ts +385 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/prompt-registry.d.ts +81 -0
- package/dist/types/prompt-registry.d.ts.map +1 -0
- package/dist/{prompt-DLd35n4Q.d.ts → types/prompt.d.ts} +14 -15
- package/dist/types/prompt.d.ts.map +1 -0
- package/dist/{provider-runner-ChL-kVg6.d.ts → types/provider-runner.d.ts} +9 -10
- package/dist/types/provider-runner.d.ts.map +1 -0
- package/dist/types/provider.d.ts +387 -0
- package/dist/types/provider.d.ts.map +1 -0
- package/dist/types/renderer.d.ts +23 -0
- package/dist/types/renderer.d.ts.map +1 -0
- package/dist/types/retry-policy.d.ts +7 -0
- package/dist/types/retry-policy.d.ts.map +1 -0
- package/dist/types/secret-scrubber.d.ts +5 -0
- package/dist/types/secret-scrubber.d.ts.map +1 -0
- package/dist/{secret-vault-BAKpgFw_.d.ts → types/secret-vault.d.ts} +13 -7
- package/dist/types/secret-vault.d.ts.map +1 -0
- package/dist/{selector-D8O6B_Rm.d.ts → types/selector.d.ts} +4 -6
- package/dist/types/selector.d.ts.map +1 -0
- package/dist/types/session-reader.d.ts +81 -0
- package/dist/types/session-reader.d.ts.map +1 -0
- package/dist/{session-rewinder-C9HnMkhP.d.ts → types/session-rewinder.d.ts} +5 -6
- package/dist/types/session-rewinder.d.ts.map +1 -0
- package/dist/types/session.d.ts +650 -0
- package/dist/types/session.d.ts.map +1 -0
- package/dist/types/side-effect.d.ts +34 -0
- package/dist/types/side-effect.d.ts.map +1 -0
- package/dist/{skill-DHniprNl.d.ts → types/skill.d.ts} +4 -5
- package/dist/types/skill.d.ts.map +1 -0
- package/dist/types/slash-command.d.ts +59 -0
- package/dist/types/slash-command.d.ts.map +1 -0
- package/dist/types/spec.d.ts +77 -0
- package/dist/types/spec.d.ts.map +1 -0
- package/dist/types/system-prompt-contributor.d.ts +20 -0
- package/dist/types/system-prompt-contributor.d.ts.map +1 -0
- package/dist/types/system-prompt.d.ts +51 -0
- package/dist/types/system-prompt.d.ts.map +1 -0
- package/dist/{task-graph-CH3acNQ7.d.ts → types/task-graph.d.ts} +21 -22
- package/dist/types/task-graph.d.ts.map +1 -0
- package/dist/types/token-counter.d.ts +42 -0
- package/dist/types/token-counter.d.ts.map +1 -0
- package/dist/types/tool-executor.d.ts +133 -0
- package/dist/types/tool-executor.d.ts.map +1 -0
- package/dist/types/tool-markers.d.ts +23 -0
- package/dist/types/tool-markers.d.ts.map +1 -0
- package/dist/types/tool.d.ts +252 -0
- package/dist/types/tool.d.ts.map +1 -0
- package/dist/types/utility-types.d.ts +31 -0
- package/dist/types/utility-types.d.ts.map +1 -0
- package/dist/utils/assert-never.d.ts +14 -0
- package/dist/utils/assert-never.d.ts.map +1 -0
- package/dist/utils/atomic-write.d.ts +12 -0
- package/dist/utils/atomic-write.d.ts.map +1 -0
- package/dist/utils/child-env.d.ts +67 -0
- package/dist/utils/child-env.d.ts.map +1 -0
- package/dist/utils/color.d.ts +20 -0
- package/dist/utils/color.d.ts.map +1 -0
- package/dist/utils/config-json.d.ts +14 -0
- package/dist/utils/config-json.d.ts.map +1 -0
- package/dist/utils/context-evidence.d.ts +47 -0
- package/dist/utils/context-evidence.d.ts.map +1 -0
- package/dist/utils/deep-merge.d.ts +64 -0
- package/dist/utils/deep-merge.d.ts.map +1 -0
- package/dist/utils/diff.d.ts +11 -0
- package/dist/utils/diff.d.ts.map +1 -0
- package/dist/utils/error.d.ts +2 -3
- package/dist/utils/error.d.ts.map +1 -0
- package/dist/utils/error.js +3 -3
- package/dist/utils/error.js.map +7 -1
- package/dist/utils/expect-defined.d.ts +2 -3
- package/dist/utils/expect-defined.d.ts.map +1 -0
- package/dist/utils/expect-defined.js +3 -3
- package/dist/utils/expect-defined.js.map +7 -1
- package/dist/utils/glob-expand.d.ts +10 -0
- package/dist/utils/glob-expand.d.ts.map +1 -0
- package/dist/utils/glob-match.d.ts +4 -0
- package/dist/utils/glob-match.d.ts.map +1 -0
- package/dist/utils/incoming-images.d.ts +39 -0
- package/dist/utils/incoming-images.d.ts.map +1 -0
- package/dist/utils/index.d.ts +38 -920
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +323 -36
- package/dist/utils/index.js.map +7 -1
- package/dist/utils/instruction-file.d.ts +3 -0
- package/dist/utils/instruction-file.d.ts.map +1 -0
- package/dist/utils/ip-guard.d.ts +34 -0
- package/dist/utils/ip-guard.d.ts.map +1 -0
- package/dist/utils/json-repair.d.ts +23 -0
- package/dist/utils/json-repair.d.ts.map +1 -0
- package/dist/utils/json-schema-validate.d.ts +42 -0
- package/dist/utils/json-schema-validate.d.ts.map +1 -0
- package/dist/utils/lru-cache.d.ts +29 -0
- package/dist/utils/lru-cache.d.ts.map +1 -0
- package/dist/utils/merge-custom-models.d.ts +12 -0
- package/dist/utils/merge-custom-models.d.ts.map +1 -0
- package/dist/utils/merge-models-payload.d.ts +20 -0
- package/dist/utils/merge-models-payload.d.ts.map +1 -0
- package/dist/utils/message-invariants.d.ts +22 -0
- package/dist/utils/message-invariants.d.ts.map +1 -0
- package/dist/utils/newline-normalize.d.ts +5 -0
- package/dist/utils/newline-normalize.d.ts.map +1 -0
- package/dist/utils/regex-guard.d.ts +21 -0
- package/dist/utils/regex-guard.d.ts.map +1 -0
- package/dist/utils/safe-json.d.ts +31 -0
- package/dist/utils/safe-json.d.ts.map +1 -0
- package/dist/utils/session-scoped-path.d.ts +13 -0
- package/dist/utils/session-scoped-path.d.ts.map +1 -0
- package/dist/utils/sleep.d.ts +5 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/slug.d.ts +13 -0
- package/dist/utils/slug.d.ts.map +1 -0
- package/dist/utils/string.d.ts +9 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/task-format.d.ts +22 -0
- package/dist/utils/task-format.d.ts.map +1 -0
- package/dist/utils/term.d.ts +133 -0
- package/dist/utils/term.d.ts.map +1 -0
- package/dist/utils/todos-format.d.ts +30 -0
- package/dist/utils/todos-format.d.ts.map +1 -0
- package/dist/utils/token-estimate.d.ts +112 -0
- package/dist/utils/token-estimate.d.ts.map +1 -0
- package/dist/utils/tool-description-mode.d.ts +28 -0
- package/dist/utils/tool-description-mode.d.ts.map +1 -0
- package/dist/utils/tool-output-serializer.d.ts +40 -0
- package/dist/utils/tool-output-serializer.d.ts.map +1 -0
- package/dist/utils/tool-result-render-mode.d.ts +55 -0
- package/dist/utils/tool-result-render-mode.d.ts.map +1 -0
- package/dist/utils/tool-subject.d.ts +5 -0
- package/dist/utils/tool-subject.d.ts.map +1 -0
- package/dist/utils/tool-wire-compact.d.ts +28 -0
- package/dist/utils/tool-wire-compact.d.ts.map +1 -0
- package/dist/utils/ulid.d.ts +11 -0
- package/dist/utils/ulid.d.ts.map +1 -0
- package/dist/{wstack-paths-C3K40Qst.d.ts → utils/wstack-paths.d.ts} +7 -8
- package/dist/utils/wstack-paths.d.ts.map +1 -0
- package/dist/worktree/index.d.ts +2 -0
- package/dist/worktree/index.d.ts.map +1 -0
- package/dist/{worktree-manager-DzwxKE35.d.ts → worktree/worktree-manager.d.ts} +32 -17
- package/dist/worktree/worktree-manager.d.ts.map +1 -0
- package/instructions/agents/browser.md +25 -16
- package/instructions/autonomy/active-mission.md +2 -4
- package/instructions/coordination/subagent-baseline.md +16 -2
- package/instructions/leader-after-task.md +3 -1
- package/instructions/sections/tool/common-patterns.md +7 -1
- package/instructions/sections/tool/delegation-full.md +1 -1
- package/instructions/system.md +47 -0
- package/package.json +4 -5
- package/skills/docker-deploy/SKILL.md +1 -1
- package/skills/node-modern/SKILL.md +2 -2
- package/skills/plugin-author/SKILL.md +9 -16
- package/skills/wrongstack-mailbox/SKILL.md +51 -12
- package/dist/dispatcher-types.d-BBeXBQgS.d.ts +0 -66
- package/dist/global-mailbox-sZwyI6CS.d.ts +0 -959
- package/dist/index--Gm41aBJ.d.ts +0 -671
- package/dist/mcp-servers-DEV4s6Ks.d.ts +0 -259
- package/dist/multi-agent-coordinator-4RCRZKjN.d.ts +0 -1770
- package/dist/null-fleet-bus-CFoNVQEK.d.ts +0 -2127
- package/dist/pipeline-DGDyIohT.d.ts +0 -331
- package/dist/provider-model-resolve-o2hHLs79.d.ts +0 -263
- package/dist/secret-scrubber-3MHDDAtm.d.ts +0 -6
- package/dist/secret-vault-DxohkUBc.d.ts +0 -272
- package/dist/session-reader-7Esxrkpw.d.ts +0 -155
- package/dist/task-format-GX0B1mMC.d.ts +0 -23
- package/dist/todos-checkpoint-FY7PjmMx.d.ts +0 -850
- package/dist/tool-BNlnIJvo.d.ts +0 -2190
- package/dist/tool-executor-CckSCM5E.d.ts +0 -906
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import type { Context } from '../core/context.js';
|
|
2
|
+
import type { EventBus } from '../kernel/events.js';
|
|
3
|
+
import type { MiddlewareHandler } from '../kernel/pipeline.js';
|
|
4
|
+
import type { SessionEventBridge } from '../storage/session-event-bridge.js';
|
|
5
|
+
import type { Compactor } from '../types/compactor.js';
|
|
6
|
+
import type { ContextWindowAggressiveOn, ContextWindowPolicy } from '../types/context-window.js';
|
|
7
|
+
export interface ContextWindowBudgetSnapshot {
|
|
8
|
+
maxContext: number;
|
|
9
|
+
inputTokens: number;
|
|
10
|
+
availableInputTokens: number;
|
|
11
|
+
remainingInputTokens: number;
|
|
12
|
+
reservedOutputTokens: number;
|
|
13
|
+
reservedSafetyTokens: number;
|
|
14
|
+
load: number;
|
|
15
|
+
overflowTokens: number;
|
|
16
|
+
}
|
|
17
|
+
export type CompactionFailureMode = 'throw' | 'throw_on_hard' | 'continue';
|
|
18
|
+
export interface AutoCompactionOptions {
|
|
19
|
+
aggressiveOn?: ContextWindowAggressiveOn | undefined;
|
|
20
|
+
events?: EventBus | undefined;
|
|
21
|
+
failureMode?: CompactionFailureMode | undefined;
|
|
22
|
+
policyProvider?: (ctx: Context) => Pick<ContextWindowPolicy, 'thresholds' | 'aggressiveOn'> | null | undefined;
|
|
23
|
+
/** Optional bridge for writing compaction events into the persistent session log. */
|
|
24
|
+
sessionBridge?: SessionEventBridge | undefined;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Pipeline middleware that monitors context token load and automatically
|
|
28
|
+
* triggers compaction when the warn/soft/hard thresholds are crossed.
|
|
29
|
+
* Runs before the next agent iteration.
|
|
30
|
+
*
|
|
31
|
+
* Uses `estimateRequestTokens` for accurate full-request token counting:
|
|
32
|
+
* messages + systemPrompt + toolDefs. This replaces the previous pattern
|
|
33
|
+
* of applying an OVERHEAD_FACTOR to a messages-only estimate.
|
|
34
|
+
*/
|
|
35
|
+
export declare class AutoCompactionMiddleware {
|
|
36
|
+
readonly name = "AutoCompaction";
|
|
37
|
+
private readonly compactor;
|
|
38
|
+
/** Deprecated. Kept for backward compat with tests that pass simpleEstimator. */
|
|
39
|
+
private readonly _estimator?;
|
|
40
|
+
private readonly warnThreshold;
|
|
41
|
+
private readonly softThreshold;
|
|
42
|
+
private readonly hardThreshold;
|
|
43
|
+
/** Writable so model-switch can update the denominator without re-registering the middleware. */
|
|
44
|
+
private _maxContext;
|
|
45
|
+
/**
|
|
46
|
+
* Runtime on/off gate. The middleware is always installed in the pipeline so
|
|
47
|
+
* auto-compaction can be toggled live from the TUI `/settings` picker; when
|
|
48
|
+
* disabled the handler is a pass-through. Defaults to enabled.
|
|
49
|
+
*/
|
|
50
|
+
private _enabled;
|
|
51
|
+
private readonly aggressiveOn;
|
|
52
|
+
private readonly events?;
|
|
53
|
+
private readonly failureMode;
|
|
54
|
+
private readonly policyProvider?;
|
|
55
|
+
private readonly sessionBridge?;
|
|
56
|
+
/**
|
|
57
|
+
* Once a compaction attempt reduces nothing (preserveK protects everything,
|
|
58
|
+
* no oversized tool_results remain to elide), retrying on every iteration
|
|
59
|
+
* just spams `compaction.fired` events without making progress. We remember
|
|
60
|
+
* the no-op and skip until either the pressure level escalates or context
|
|
61
|
+
* has grown by at least this many tokens since the failed attempt.
|
|
62
|
+
*/
|
|
63
|
+
private static readonly NOOP_RETRY_DELTA_TOKENS;
|
|
64
|
+
/** Tracks the most recent no-op attempt so we can avoid re-firing per turn. */
|
|
65
|
+
private lastNoopAttempt;
|
|
66
|
+
/**
|
|
67
|
+
* Cached token estimate from the last handler() invocation. When the
|
|
68
|
+
* message count and tool count haven't changed since the last estimate
|
|
69
|
+
* (autonomous idle loops), we skip the expensive O(n) token estimation
|
|
70
|
+
* and reuse this value. Reset to -1 when the context changes.
|
|
71
|
+
*/
|
|
72
|
+
private _cachedTokens;
|
|
73
|
+
private _cachedMsgCount;
|
|
74
|
+
private _cachedToolCount;
|
|
75
|
+
/**
|
|
76
|
+
* @param compactor Compactor to use for compaction.
|
|
77
|
+
* @param maxContext Provider's max context window in tokens.
|
|
78
|
+
* @param _estimator Deprecated parameter kept for backward compatibility.
|
|
79
|
+
* The middleware now uses `estimateRequestTokens` internally
|
|
80
|
+
* for accurate full-request token counting (messages +
|
|
81
|
+
* systemPrompt + toolDefs).
|
|
82
|
+
* @param thresholds Threshold fractions (0-1) of maxContext.
|
|
83
|
+
* @param opts Optional behavior. By default, failures at the
|
|
84
|
+
* hard threshold throw AGENT_CONTEXT_OVERFLOW so
|
|
85
|
+
* the agent does not continue into a likely
|
|
86
|
+
* provider context overflow. Warn/soft failures
|
|
87
|
+
* still emit compaction.failed and continue.
|
|
88
|
+
*/
|
|
89
|
+
constructor(compactor: Compactor, maxContext: number, _estimator: (ctx: Context) => number, thresholds: {
|
|
90
|
+
warn: number;
|
|
91
|
+
soft: number;
|
|
92
|
+
hard: number;
|
|
93
|
+
}, optsOrAggressiveOn?: AutoCompactionOptions | ContextWindowAggressiveOn, events?: EventBus | undefined);
|
|
94
|
+
/** Allow callers (e.g. model-switch in WebUI) to update the context window
|
|
95
|
+
* denominator when the active model changes. */
|
|
96
|
+
setMaxContext(maxContext: number): void;
|
|
97
|
+
/** Whether auto-compaction is currently active. */
|
|
98
|
+
get enabled(): boolean;
|
|
99
|
+
/** Toggle auto-compaction on a live session (TUI `/settings`). When disabled
|
|
100
|
+
* the middleware passes every iteration straight through without estimating
|
|
101
|
+
* tokens or compacting. */
|
|
102
|
+
setEnabled(enabled: boolean): void;
|
|
103
|
+
handler(): MiddlewareHandler<Context>;
|
|
104
|
+
/**
|
|
105
|
+
* H1: try to read a pre-computed token total from `ctx.lastRequestTokens`
|
|
106
|
+
* (set by the agent loop's pre-flight or its restash in emitContextPct).
|
|
107
|
+
* Returns the uncalibrated total when the stash is valid for the current
|
|
108
|
+
* context shape (positive number, and the message count it was computed
|
|
109
|
+
* at matches the current one — otherwise tool results have been appended
|
|
110
|
+
* since and the value is stale). Returns null when missing or stale so
|
|
111
|
+
* the caller falls back to a fresh walk.
|
|
112
|
+
*/
|
|
113
|
+
private tryStashedTokens;
|
|
114
|
+
/**
|
|
115
|
+
* Returns true when the previous compaction at the same or higher pressure
|
|
116
|
+
* level reduced nothing and context has not grown materially since. Prevents
|
|
117
|
+
* a stuck preserveK window from spamming compaction events every iteration.
|
|
118
|
+
*/
|
|
119
|
+
private shouldSkipNoopRetry;
|
|
120
|
+
private recordAttempt;
|
|
121
|
+
private compact;
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=auto-compaction-middleware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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AAM,GAAG,IAAI,CAEtC;IAED,mDAAmD;IACnD,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;gCAE4B;IAC5B,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAEjC;IAED,OAAO,IAAI,iBAAiB,CAAC,OAAO,CAAC,CA6GpC;IAED;;;;;;;;OAQG;IACH,OAAO,CAAC,gBAAgB;IAgBxB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,aAAa;YAYP,OAAO;CA0HtB"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Agent, RunResult } from '../core/agent.js';
|
|
2
|
+
import type { Context } from '../core/context.js';
|
|
3
|
+
import type { Logger } from '../types/logger.js';
|
|
4
|
+
import type { DoneCondition } from '../types/multi-agent.js';
|
|
5
|
+
type AutonomousResult = RunResult & {
|
|
6
|
+
toolCalls: number;
|
|
7
|
+
reason?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
export interface DoneCheckResult {
|
|
10
|
+
done: boolean;
|
|
11
|
+
reason?: string | undefined;
|
|
12
|
+
iterations: number;
|
|
13
|
+
toolCalls: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class DoneConditionChecker {
|
|
16
|
+
private readonly condition;
|
|
17
|
+
private readonly compiledRegex;
|
|
18
|
+
private readonly logger;
|
|
19
|
+
constructor(condition: DoneCondition, opts?: {
|
|
20
|
+
logger?: Logger | undefined;
|
|
21
|
+
});
|
|
22
|
+
check(state: {
|
|
23
|
+
iterations: number;
|
|
24
|
+
toolCalls: number;
|
|
25
|
+
lastOutput?: string | undefined;
|
|
26
|
+
}): DoneCheckResult;
|
|
27
|
+
}
|
|
28
|
+
export interface AutonomousRunnerOptions {
|
|
29
|
+
agent: Agent;
|
|
30
|
+
context: Context;
|
|
31
|
+
doneCondition: DoneCondition;
|
|
32
|
+
iterationTimeoutMs?: number | undefined;
|
|
33
|
+
onIteration?: (state: {
|
|
34
|
+
iteration: number | undefined;
|
|
35
|
+
toolCalls: number;
|
|
36
|
+
}) => void;
|
|
37
|
+
onDone?: (((result: AutonomousResult) => void)) | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* When true and `doneCondition.type === 'directive'`, the runner
|
|
40
|
+
* runs the agent with `autonomousContinue: true` so the agent loop
|
|
41
|
+
* handles its own [continue]/[done] markers internally (no outer
|
|
42
|
+
* re-invocation needed). The runner still provides iteration/timeouts.
|
|
43
|
+
*/
|
|
44
|
+
enableAutonomousContinue?: boolean | undefined;
|
|
45
|
+
/** Logger for structured warnings. Falls back to console.warn when omitted. */
|
|
46
|
+
logger?: Logger | undefined;
|
|
47
|
+
}
|
|
48
|
+
export declare class AutonomousRunner {
|
|
49
|
+
private readonly opts;
|
|
50
|
+
private iterations;
|
|
51
|
+
private toolCalls;
|
|
52
|
+
private lastOutput?;
|
|
53
|
+
private stopped;
|
|
54
|
+
private readonly doneChecker;
|
|
55
|
+
constructor(opts: AutonomousRunnerOptions);
|
|
56
|
+
run(): Promise<AutonomousResult>;
|
|
57
|
+
private runLoop;
|
|
58
|
+
stop(): void;
|
|
59
|
+
}
|
|
60
|
+
export {};
|
|
61
|
+
//# sourceMappingURL=autonomous-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autonomous-runner.d.ts","sourceRoot":"","sources":["../../src/execution/autonomous-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAI7D,KAAK,gBAAgB,GAAG,SAAS,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AA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AAU,CAAK;IACvB,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,UAAU,CAAC,CAAqB;IACxC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAuB;IAEnD,YAA6B,IAAI,EAAE,uBAAuB,EAEzD;IAEK,GAAG,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAgCrC;YAEa,OAAO;IA6GrB,IAAI,IAAI,IAAI,CAEX;CACF"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AutonomyBrain — a self-driving decision layer for autonomous workflows.
|
|
3
|
+
*
|
|
4
|
+
* Unlike the standard BrainArbiter which asks the human when uncertain,
|
|
5
|
+
* AutonomyBrain makes decisions autonomously within configured risk
|
|
6
|
+
* boundaries, keeping the system running unattended. It uses the session
|
|
7
|
+
* LLM to evaluate situations and produce decisions.
|
|
8
|
+
*
|
|
9
|
+
* ## Identity
|
|
10
|
+
* The AutonomyBrain is NOT the main agent. It is a dedicated decision
|
|
11
|
+
* engine with a single purpose: evaluate blocked/stuck situations in
|
|
12
|
+
* autonomous workflows and decide whether to continue, pivot, or stop.
|
|
13
|
+
*
|
|
14
|
+
* ## Decision Flow
|
|
15
|
+
* 1. RISK GATE — if request risk > maxAutoRisk, auto-deny
|
|
16
|
+
* 2. HEURISTIC — fast pattern-match for common situations (deadlock, retry-exhausted)
|
|
17
|
+
* 3. LLM EVALUATION — complex decisions (goal completion, conflict resolution)
|
|
18
|
+
*
|
|
19
|
+
* ## Decision Logging
|
|
20
|
+
* Every decision is emitted via `onDecision` callback with a human-readable
|
|
21
|
+
* summary suitable for chat history and journal entries.
|
|
22
|
+
*
|
|
23
|
+
* Usage:
|
|
24
|
+
* const brain = createAutonomyBrain({
|
|
25
|
+
* provider, model, maxAutoRisk: 'high',
|
|
26
|
+
* onDecision: (summary) => journal.push(summary),
|
|
27
|
+
* });
|
|
28
|
+
*/
|
|
29
|
+
import type { Provider } from '../types/provider.js';
|
|
30
|
+
import type { BrainArbiter, BrainDecision, BrainDecisionRequest } from '../coordination/brain.js';
|
|
31
|
+
/** One (provider, model) pair the Brain may call for a decision. */
|
|
32
|
+
export interface BrainLlmTarget {
|
|
33
|
+
provider: Provider;
|
|
34
|
+
model: string;
|
|
35
|
+
/** Display label for logs/status (e.g. "anthropic/claude-haiku"). */
|
|
36
|
+
label?: string | undefined;
|
|
37
|
+
}
|
|
38
|
+
export interface AutonomyBrainOptions {
|
|
39
|
+
/** LLM provider for decision-making. Ignored when `targets` is non-empty. */
|
|
40
|
+
provider?: Provider | undefined;
|
|
41
|
+
/** Model to use for decisions (should be fast + cheap). Ignored when `targets` is non-empty. */
|
|
42
|
+
model?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Ordered LLM pool. With `strategy: 'fallback'` (default) the first target
|
|
45
|
+
* is primary and later ones are tried in order when a call fails/times
|
|
46
|
+
* out; with 'round-robin' successive decisions rotate the starting target.
|
|
47
|
+
* At least one of `targets` / (`provider` + `model`) must be provided.
|
|
48
|
+
*/
|
|
49
|
+
targets?: BrainLlmTarget[] | undefined;
|
|
50
|
+
/** Pool selection strategy. Default 'fallback'. */
|
|
51
|
+
strategy?: 'fallback' | 'round-robin' | undefined;
|
|
52
|
+
/** Maximum risk level the brain will auto-decide. Default: 'high'.
|
|
53
|
+
* 'low' — only auto-decide low-risk questions
|
|
54
|
+
* 'medium' — auto-decide low/medium
|
|
55
|
+
* 'high' — auto-decide low/medium/high
|
|
56
|
+
* 'all' — auto-decide everything (including critical)
|
|
57
|
+
*/
|
|
58
|
+
maxAutoRisk?: 'low' | 'medium' | 'high' | 'all' | undefined;
|
|
59
|
+
/** Timeout for each decision call (ms). Default: 15_000. */
|
|
60
|
+
decisionTimeoutMs?: number | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Decision-history digest for the LLM prompt (typically
|
|
63
|
+
* `BrainDecisionLedger.digestFor`): how similar past decisions went and
|
|
64
|
+
* how they turned out. Appended to the user message when non-empty.
|
|
65
|
+
*/
|
|
66
|
+
getDecisionDigest?: ((request: BrainDecisionRequest) => string | undefined) | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Called after every decision with a human-readable summary.
|
|
69
|
+
* Use this to log decisions into chat history, journal, or status line.
|
|
70
|
+
* Example: "🧠 Brain: skipped deadlocked tasks → continuing with phase 3/5"
|
|
71
|
+
*/
|
|
72
|
+
onDecision?: ((summary: string, decision: BrainDecision, request: BrainDecisionRequest) => void) | undefined;
|
|
73
|
+
}
|
|
74
|
+
/** Runtime-adjustable autonomy ceiling for the tiered brain. */
|
|
75
|
+
export type BrainAutoRisk = 'off' | 'low' | 'medium' | 'high' | 'all';
|
|
76
|
+
export interface TieredBrainArbiterOptions {
|
|
77
|
+
/** Fast deterministic policy layer (DefaultBrainArbiter). Consulted first. */
|
|
78
|
+
policy: BrainArbiter;
|
|
79
|
+
/** LLM-backed autonomous layer (createAutonomyBrain). Consulted when the
|
|
80
|
+
* policy layer would escalate to the human and the request's risk is
|
|
81
|
+
* within the live ceiling. */
|
|
82
|
+
autonomous?: BrainArbiter | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Live autonomy ceiling — read on EVERY decision so `/brain risk <level>`
|
|
85
|
+
* changes take effect immediately. 'off' disables the autonomous layer
|
|
86
|
+
* entirely (everything the policy can't answer goes to the human).
|
|
87
|
+
*/
|
|
88
|
+
getMaxAutoRisk?: (() => BrainAutoRisk) | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Multi-LLM council (createCouncilBrainArbiter). When present, requests at
|
|
91
|
+
* or above the council risk floor are decided by the council INSTEAD of
|
|
92
|
+
* the single-LLM layer. Council answers AND denies are terminal — a panel
|
|
93
|
+
* that considered the question and refused is a real decision, not a
|
|
94
|
+
* failure. Only `ask_human` (quorum not met / judge unavailable) falls
|
|
95
|
+
* through to the escalation tier.
|
|
96
|
+
*/
|
|
97
|
+
council?: BrainArbiter | undefined;
|
|
98
|
+
/** Live council risk floor. Default 'high'. Read on every decision. */
|
|
99
|
+
getCouncilMinRisk?: (() => 'medium' | 'high' | 'critical') | undefined;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The standard Brain positioning: policy first, LLM/council second,
|
|
103
|
+
* escalation last.
|
|
104
|
+
*
|
|
105
|
+
* 1. POLICY — deterministic DefaultBrainArbiter (low-risk fast path,
|
|
106
|
+
* fallback semantics). Denies and option-backed answers pass through
|
|
107
|
+
* untouched. A fallback-produced `continue` answer (no optionId, the
|
|
108
|
+
* request declared `fallback: 'continue'`) is only PROVISIONAL: it
|
|
109
|
+
* means "nobody could decide", not "this is the right call", so the
|
|
110
|
+
* LLM tier still gets consulted within the ceiling. Historically it
|
|
111
|
+
* short-circuited here, which meant e.g. goal-completion checks never
|
|
112
|
+
* reached the LLM at all.
|
|
113
|
+
* 2. COUNCIL — requests at/above the council floor (default 'high') are
|
|
114
|
+
* decided by the multi-LLM council when one is wired.
|
|
115
|
+
* 3. LLM — everything else within the live ceiling goes to the
|
|
116
|
+
* single-LLM autonomous brain. Only a real `answer` short-circuits;
|
|
117
|
+
* denials/failures fall through.
|
|
118
|
+
* 4. ESCALATION — anything left escalates. Callers wrap this in
|
|
119
|
+
* `EscalationRoutingBrainArbiter` (interactive prompt or headless
|
|
120
|
+
* terminal policy) or the legacy `HumanEscalatingBrainArbiter`.
|
|
121
|
+
*/
|
|
122
|
+
export declare function createTieredBrainArbiter(opts: TieredBrainArbiterOptions): BrainArbiter;
|
|
123
|
+
/**
|
|
124
|
+
* Create a self-driving brain that makes autonomous decisions.
|
|
125
|
+
* Never asks the human — within its risk boundary it answers, above it denies.
|
|
126
|
+
*/
|
|
127
|
+
export declare function createAutonomyBrain(opts: AutonomyBrainOptions): BrainArbiter;
|
|
128
|
+
/**
|
|
129
|
+
* Format a decision as a human-readable one-liner for chat history.
|
|
130
|
+
*/
|
|
131
|
+
export declare function formatDecisionSummary(decision: BrainDecision, request: BrainDecisionRequest): string;
|
|
132
|
+
/**
|
|
133
|
+
* Render a decision request as the user message for a Brain LLM call.
|
|
134
|
+
* Shared by the single-LLM tier and every council voter so all of them see
|
|
135
|
+
* the same question/context/options shape.
|
|
136
|
+
*/
|
|
137
|
+
export declare function buildBrainUserMessage(request: BrainDecisionRequest): string;
|
|
138
|
+
/** Append a decision-history digest to a Brain user message (shared shape). */
|
|
139
|
+
export declare function withDecisionDigest(user: string, digest: string | undefined): string;
|
|
140
|
+
/**
|
|
141
|
+
* One Brain LLM call against a single target. Throws on transport failure,
|
|
142
|
+
* timeout, or abort — callers own the pool/fallback semantics.
|
|
143
|
+
*/
|
|
144
|
+
export declare function completeBrainLlm(target: BrainLlmTarget, input: {
|
|
145
|
+
system: string;
|
|
146
|
+
user: string;
|
|
147
|
+
timeoutMs: number;
|
|
148
|
+
maxTokens?: number | undefined;
|
|
149
|
+
}): Promise<string>;
|
|
150
|
+
export declare function parseOptionDecision(rawText: string, options: NonNullable<BrainDecisionRequest['options']>): BrainDecision | null;
|
|
151
|
+
//# sourceMappingURL=autonomy-brain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autonomy-brain.d.ts","sourceRoot":"","sources":["../../src/execution/autonomy-brain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAIlG,oEAAoE;AACpE,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,oBAAoB;IACnC,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAChC,gGAAgG;IAChG,KAA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YAAY,CA0CtF;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,oBAAoB,GAAG,YAAY,CAkD5E;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAmBR;AAiED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,CAgB3E;AAED,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAGnF;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GACzF,OAAO,CAAC,MAAM,CAAC,CAYjB;AAmED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,WAAW,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,GACpD,aAAa,GAAG,IAAI,CAuCtB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* System-prompt contributor that surfaces eternal-autonomy state to the
|
|
3
|
+
* model on every turn.
|
|
4
|
+
*
|
|
5
|
+
* Why this exists: when the engine drives a long-running loop, the
|
|
6
|
+
* per-iteration directive carries the rules. But the directive is a USER
|
|
7
|
+
* message — it scrolls out of working memory after a few compactions and
|
|
8
|
+
* the model forgets it's in autonomy mode (forgets `[GOAL_COMPLETE]`,
|
|
9
|
+
* forgets the todo-state protocol, forgets the no-confirmation rule).
|
|
10
|
+
* Injecting the same anchor as a CACHED system-prompt block solves that
|
|
11
|
+
* — the rules sit next to the identity layer and survive compactions.
|
|
12
|
+
*
|
|
13
|
+
* Block is tagged `ephemeral` so its content (journal tail, iteration
|
|
14
|
+
* counter) changes each turn without invalidating the upstream prefix
|
|
15
|
+
* cache.
|
|
16
|
+
*/
|
|
17
|
+
import type { SystemPromptContributor } from '../types/system-prompt-contributor.js';
|
|
18
|
+
export interface AutonomyPromptContributorOptions {
|
|
19
|
+
/** Absolute path to the project's `goal.json`. */
|
|
20
|
+
goalPath: string;
|
|
21
|
+
/**
|
|
22
|
+
* Gating function. The contributor consults this on every build and
|
|
23
|
+
* returns an empty array when `false` — without this, the block would
|
|
24
|
+
* leak into interactive runs that happen to have a goal on disk and
|
|
25
|
+
* teach the model loop-control markers it shouldn't emit.
|
|
26
|
+
*
|
|
27
|
+
* Typical wiring: enable while `eternal` or `eternal-parallel` autonomy is active.
|
|
28
|
+
*/
|
|
29
|
+
enabled: () => boolean;
|
|
30
|
+
/** Number of journal entries to include in the recent-tail block. Default 5. */
|
|
31
|
+
journalTailSize?: number | undefined;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Build a contributor that renders the autonomy-state system block.
|
|
35
|
+
* Returns `[]` when disabled, no goal exists, or the goal has been
|
|
36
|
+
* completed/abandoned — all silent fast-paths.
|
|
37
|
+
*/
|
|
38
|
+
export declare function makeAutonomyPromptContributor(opts: AutonomyPromptContributorOptions): SystemPromptContributor;
|
|
39
|
+
//# sourceMappingURL=autonomy-prompt-contributor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autonomy-prompt-contributor.d.ts","sourceRoot":"","sources":["../../src/execution/autonomy-prompt-contributor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAOrF,MAAM,WAAW,gCAAgC;IAC/C,kDAAkD;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;OAOG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC;IACvB,gFAAgF;IAChF,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,gCAAgC,GACrC,uBAAuB,CA+CzB"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brain tier assembly — turns `Config.brain` into the concrete LLM tiers
|
|
3
|
+
* (single-LLM pool + optional multi-LLM council) that
|
|
4
|
+
* `createTieredBrainArbiter` composes. Shared by every host that wires a
|
|
5
|
+
* Brain (CLI/TUI in `wiring/brain-and-orchestration.ts`, the standalone
|
|
6
|
+
* WebUI server in `backend-services.ts`) so the config surface behaves
|
|
7
|
+
* identically everywhere.
|
|
8
|
+
*
|
|
9
|
+
* Hosts differ only in HOW a provider id becomes a `Provider` instance, so
|
|
10
|
+
* that is the one injected dependency (`resolveProvider`). Unresolvable
|
|
11
|
+
* pool/council entries are skipped — one bad ref never takes the Brain down.
|
|
12
|
+
*
|
|
13
|
+
* @module brain-chain
|
|
14
|
+
*/
|
|
15
|
+
import type { BrainArbiter, BrainDecisionRequest } from '../coordination/brain.js';
|
|
16
|
+
import type { BrainConfig } from '../types/config.js';
|
|
17
|
+
import type { Provider } from '../types/provider.js';
|
|
18
|
+
export interface BrainTierAssemblyOptions {
|
|
19
|
+
/** `config.brain` — undefined assembles the legacy session-model single tier. */
|
|
20
|
+
brainConfig: BrainConfig | undefined;
|
|
21
|
+
/** The session's provider id (`config.provider`). */
|
|
22
|
+
defaultProviderId: string;
|
|
23
|
+
/** Live session provider — read per decision so `/setmodel` switches apply. */
|
|
24
|
+
sessionProvider: () => Provider;
|
|
25
|
+
/** Live session model id — read per decision. */
|
|
26
|
+
sessionModel: () => string;
|
|
27
|
+
/**
|
|
28
|
+
* Resolve a NON-default provider id to a Provider instance. May throw or
|
|
29
|
+
* return null; the entry is then skipped.
|
|
30
|
+
*/
|
|
31
|
+
resolveProvider: (providerId: string, model: string) => Provider | null;
|
|
32
|
+
/**
|
|
33
|
+
* Decision-history digest (typically `BrainDecisionLedger.digestFor`) —
|
|
34
|
+
* injected into both the single-LLM and council prompts so the Brain
|
|
35
|
+
* learns from the outcomes of its past similar decisions.
|
|
36
|
+
*/
|
|
37
|
+
getDecisionDigest?: ((request: BrainDecisionRequest) => string | undefined) | undefined;
|
|
38
|
+
}
|
|
39
|
+
export interface BrainTierAssembly {
|
|
40
|
+
/** Single-LLM tier for `TieredBrainArbiterOptions.autonomous`. */
|
|
41
|
+
autonomous: BrainArbiter;
|
|
42
|
+
/** Council tier for `TieredBrainArbiterOptions.council` (undefined = disabled). */
|
|
43
|
+
council: BrainArbiter | undefined;
|
|
44
|
+
/** Live council risk floor for `TieredBrainArbiterOptions.getCouncilMinRisk`. */
|
|
45
|
+
getCouncilMinRisk: () => 'medium' | 'high' | 'critical';
|
|
46
|
+
/** Human-readable pool labels for status surfaces; empty = session model. */
|
|
47
|
+
poolLabels: string[];
|
|
48
|
+
/** Human-readable council seat labels; empty = council disabled. */
|
|
49
|
+
councilLabels: string[];
|
|
50
|
+
}
|
|
51
|
+
/** Assemble the LLM tiers of the Brain chain from `Config.brain`. */
|
|
52
|
+
export declare function assembleBrainTiers(opts: BrainTierAssemblyOptions): BrainTierAssembly;
|
|
53
|
+
//# sourceMappingURL=brain-chain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brain-chain.d.ts","sourceRoot":"","sources":["../../src/execution/brain-chain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEnF,OAAO,KAAK,EAAE,WAAW,EAAmB,MAAM,oBAAoB,CAAC;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAWrD,MAAM,WAAW,wBAAwB;IACvC,iFAAiF;IACjF,WAAW,EAAE,WAAW,GAAG,SAAS,CAAC;IACrC,qDAAqD;IACrD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,+EAA+E;IAC/E,eAAe,EAAE,MAAM,QAAQ,CAAC;IAChC,iDAAiD;IACjD,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B;;;OAGG;IACH,eAAe,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,QAAQ,GAAG,IAAI,CAAC;IACxE;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,oBAAoB,KAAK,MAAM,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC;CACzF;AAED,MAAM,WAAW,iBAAiB;IAChC,kEAAkE;IAClE,UAAU,EAAE,YAAY,CAAC;IACzB,mFAAmF;IACnF,OAAO,EAAE,YAAY,GAAG,SAAS,CAAC;IAClC,iFAAiF;IACjF,iBAAiB,EAAE,MAAM,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IACxD,6EAA6E;IAC7E,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,oEAAoE;IACpE,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,qEAAqE;AACrE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,wBAAwB,GAAG,iBAAiB,CAqGpF"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { BrainArbiter, BrainDecision, BrainDecisionRequest } from '../coordination/brain.js';
|
|
2
|
+
export declare const BRAIN_EVALUATION_CASE_VERSION: 1;
|
|
3
|
+
export interface BrainEvaluationExpectations {
|
|
4
|
+
/** Restrict the accepted decision variants for this case. */
|
|
5
|
+
allowedDecisionTypes?: BrainDecision['type'][] | undefined;
|
|
6
|
+
/** Exact option ids that may be selected. Every id must exist in the request. */
|
|
7
|
+
allowedOptionIds?: string[] | undefined;
|
|
8
|
+
/** Options that represent an unsafe allowance and must fail the case. */
|
|
9
|
+
unsafeOptionIds?: string[] | undefined;
|
|
10
|
+
/** Require an answer to carry an exact option id. */
|
|
11
|
+
requireOptionId?: boolean | undefined;
|
|
12
|
+
/** Whether ask_human is acceptable rather than an unnecessary escalation. */
|
|
13
|
+
allowEscalation?: boolean | undefined;
|
|
14
|
+
}
|
|
15
|
+
/** Versioned, JSON-serializable fixture for side-effect-free Brain evaluation. */
|
|
16
|
+
export interface BrainEvaluationCaseV1 {
|
|
17
|
+
version: typeof BRAIN_EVALUATION_CASE_VERSION;
|
|
18
|
+
id: string;
|
|
19
|
+
description?: string | undefined;
|
|
20
|
+
request: BrainDecisionRequest;
|
|
21
|
+
expectations?: BrainEvaluationExpectations | undefined;
|
|
22
|
+
}
|
|
23
|
+
export type BrainEvaluationFailureCode = 'invalid_fixture' | 'arbiter_error' | 'unexpected_decision_type' | 'invalid_option_id' | 'missing_option_id' | 'disallowed_option_id' | 'unsafe_option_id' | 'unexpected_escalation';
|
|
24
|
+
export interface BrainEvaluationFailure {
|
|
25
|
+
code: BrainEvaluationFailureCode;
|
|
26
|
+
message: string;
|
|
27
|
+
}
|
|
28
|
+
export interface BrainEvaluationCaseResult {
|
|
29
|
+
caseId: string;
|
|
30
|
+
passed: boolean;
|
|
31
|
+
decision?: BrainDecision | undefined;
|
|
32
|
+
failures: BrainEvaluationFailure[];
|
|
33
|
+
latencyMs: number;
|
|
34
|
+
}
|
|
35
|
+
export interface BrainEvaluationMetrics {
|
|
36
|
+
totalCases: number;
|
|
37
|
+
passedCases: number;
|
|
38
|
+
failedCases: number;
|
|
39
|
+
optionDecisionCount: number;
|
|
40
|
+
invalidOptionCount: number;
|
|
41
|
+
validOptionRate: number;
|
|
42
|
+
unsafeAllowanceCount: number;
|
|
43
|
+
unnecessaryEscalationCount: number;
|
|
44
|
+
averageLatencyMs: number;
|
|
45
|
+
}
|
|
46
|
+
export interface BrainEvaluationReport {
|
|
47
|
+
version: typeof BRAIN_EVALUATION_CASE_VERSION;
|
|
48
|
+
results: BrainEvaluationCaseResult[];
|
|
49
|
+
metrics: BrainEvaluationMetrics;
|
|
50
|
+
}
|
|
51
|
+
export type BrainEvaluationCaseValidation = {
|
|
52
|
+
ok: true;
|
|
53
|
+
value: BrainEvaluationCaseV1;
|
|
54
|
+
} | {
|
|
55
|
+
ok: false;
|
|
56
|
+
diagnostics: string[];
|
|
57
|
+
};
|
|
58
|
+
/** Validate a fixture loaded from JSON before any arbiter is invoked. */
|
|
59
|
+
export declare function validateBrainEvaluationCase(value: unknown): BrainEvaluationCaseValidation;
|
|
60
|
+
/**
|
|
61
|
+
* Replay evaluation fixtures through a Brain arbiter without applying the
|
|
62
|
+
* returned decisions. The runner has no dispatch, terminate, permission, or
|
|
63
|
+
* tool-execution callback, so a result can only be measured and reported.
|
|
64
|
+
*/
|
|
65
|
+
export declare function runBrainEvaluation(arbiter: BrainArbiter, cases: readonly unknown[]): Promise<BrainEvaluationReport>;
|
|
66
|
+
//# sourceMappingURL=brain-evaluation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brain-evaluation.d.ts","sourceRoot":"","sources":["../../src/execution/brain-evaluation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAElG,eAAO,MAAM,6BAA6B,EAAG,CAAU,CAAC;AAExD,MAAM,WAAW,2BAA2B;IAC1C,6DAA6D;IAC7D,oBAAoB,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAC;IAC3D,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACxC,yEAAyE;IACzE,eAAe,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACvC,qDAAqD;IACrD,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,6EAA6E;IAC7E,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACvC;AAED,kFAAkF;AAClF,MAAM,WAAW,qBAAqB;IACpC,O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