@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
|
@@ -1,850 +0,0 @@
|
|
|
1
|
-
import { A as AttachmentStore, a as AddAttachmentInput, b as AttachmentRef, c as Attachment } from './session-reader-7Esxrkpw.js';
|
|
2
|
-
import { i as ContentBlock, u as ConversationState, k as SessionStore, S as SessionEvent, j as SessionMetadata, b as SessionWriter, v as SessionForkOptions, F as ForkedSession, W as WorkspaceCheckpointRef, w as WorkspaceMaterializationResult, x as ResumedSession, y as SessionData, z as SessionSummary, A as TodoItem } from './tool-BNlnIJvo.js';
|
|
3
|
-
import { E as EventBus, M as MemoryScope, b as MemoryEntry, c as MemoryStore, d as MemoryRelevanceContext, S as ScoredEntry } from './events-Bgnh43r9.js';
|
|
4
|
-
import { j as Config, l as ConfigLoader, m as SyncConfig, n as ConfigStore } from './config-MRqn1V-u.js';
|
|
5
|
-
import { S as SecretVault } from './secret-vault-BAKpgFw_.js';
|
|
6
|
-
import { W as WstackPaths } from './wstack-paths-C3K40Qst.js';
|
|
7
|
-
import { S as SecretScrubber } from './secret-scrubber-3MHDDAtm.js';
|
|
8
|
-
|
|
9
|
-
interface AttachmentStoreOptions {
|
|
10
|
-
/**
|
|
11
|
-
* Directory for spooling payloads larger than `spoolThresholdBytes`.
|
|
12
|
-
* When omitted, all payloads stay in memory.
|
|
13
|
-
*/
|
|
14
|
-
spoolDir?: string | undefined;
|
|
15
|
-
spoolThresholdBytes?: number | undefined;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* In-memory attachment store with optional disk spool. Placeholder syntax
|
|
19
|
-
* is `[<kind> #<seq>]` (seq-keyed) or `[file:<path>]` (path-keyed) where kind
|
|
20
|
-
* is `pasted` / `image` / `file`. Unknown placeholders are passed through
|
|
21
|
-
* as-is so users can write that literal text without losing it.
|
|
22
|
-
*/
|
|
23
|
-
declare class DefaultAttachmentStore implements AttachmentStore {
|
|
24
|
-
private readonly items;
|
|
25
|
-
private readonly refs;
|
|
26
|
-
private nextSeq;
|
|
27
|
-
private readonly spoolDir;
|
|
28
|
-
private readonly spoolThreshold;
|
|
29
|
-
constructor(opts?: AttachmentStoreOptions);
|
|
30
|
-
add(input: AddAttachmentInput): Promise<AttachmentRef>;
|
|
31
|
-
get(id: string): Promise<Attachment | undefined>;
|
|
32
|
-
list(): AttachmentRef[];
|
|
33
|
-
expand(text: string): Promise<ContentBlock[]>;
|
|
34
|
-
clear(): Promise<void>;
|
|
35
|
-
private toBlock;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* A single config source. Higher priority wins in merges.
|
|
40
|
-
* Sources are applied in priority order (lowest first), so a source
|
|
41
|
-
* with priority=10 overrides one with priority=1.
|
|
42
|
-
*/
|
|
43
|
-
interface ConfigSource {
|
|
44
|
-
/** Unique name for debugging and error messages. */
|
|
45
|
-
name: string;
|
|
46
|
-
/** Lower numbers merge first, higher numbers override lower. Default: 50. */
|
|
47
|
-
priority?: number | undefined;
|
|
48
|
-
/**
|
|
49
|
-
* Read the raw config patch. Return an empty object if unavailable.
|
|
50
|
-
* Errors are surfaced but do not abort loading — the source is skipped.
|
|
51
|
-
*/
|
|
52
|
-
read(): Promise<Partial<Config>>;
|
|
53
|
-
}
|
|
54
|
-
interface ConfigLoaderOptions {
|
|
55
|
-
paths: WstackPaths;
|
|
56
|
-
strict?: boolean | undefined;
|
|
57
|
-
vault?: SecretVault | undefined;
|
|
58
|
-
/** Extra sources merged after the built-in layers. */
|
|
59
|
-
sources?: ConfigSource[] | undefined;
|
|
60
|
-
events?: EventBus;
|
|
61
|
-
traceId?: string;
|
|
62
|
-
}
|
|
63
|
-
declare class DefaultConfigLoader implements ConfigLoader {
|
|
64
|
-
private readonly paths;
|
|
65
|
-
private readonly strict;
|
|
66
|
-
private readonly vault;
|
|
67
|
-
private readonly extraSources;
|
|
68
|
-
private readonly events;
|
|
69
|
-
private readonly traceId;
|
|
70
|
-
private readonly jsonCache;
|
|
71
|
-
constructor(opts: ConfigLoaderOptions);
|
|
72
|
-
load(opts?: {
|
|
73
|
-
cliFlags?: Partial<Config> | undefined;
|
|
74
|
-
cwd?: string | undefined;
|
|
75
|
-
}): Promise<Config>;
|
|
76
|
-
private ensureGlobalDefaults;
|
|
77
|
-
/**
|
|
78
|
-
* Persist a sync config to ~/.wrongstack/sync.json, with the token encrypted
|
|
79
|
-
* by the vault (if provided). The file is isolated from the main config
|
|
80
|
-
* hierarchy to prevent accidental commits.
|
|
81
|
-
*/
|
|
82
|
-
persistSyncConfig(cfg: SyncConfig): Promise<void>;
|
|
83
|
-
/**
|
|
84
|
-
* Read ~/.wrongstack/sync.json (encrypted GitHub token storage) and decrypt
|
|
85
|
-
* the token if a vault is available. Returns null if the file doesn't exist.
|
|
86
|
-
* This is separate from main config loading because sync.json is intentionally
|
|
87
|
-
* isolated — it should never be part of project-local or env-driven config.
|
|
88
|
-
*/
|
|
89
|
-
loadSyncConfig(): Promise<SyncConfig | null>;
|
|
90
|
-
private readJson;
|
|
91
|
-
private validateBehavior;
|
|
92
|
-
private validateIdentity;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* L2-D: Config version migration framework. Pure functions, decoupled
|
|
97
|
-
* from disk/CLI — caller passes a parsed JSON object and gets back the
|
|
98
|
-
* up-to-date `Config` shape (or a structured error explaining why
|
|
99
|
-
* migration failed).
|
|
100
|
-
*
|
|
101
|
-
* Migrations are registered as `{ from, to, migrate }` triples and run
|
|
102
|
-
* sequentially. Each migration is independently testable. Adding a new
|
|
103
|
-
* version means appending one migration; existing user configs are
|
|
104
|
-
* upgraded in place at load time.
|
|
105
|
-
*/
|
|
106
|
-
interface MigrationContext {
|
|
107
|
-
/**
|
|
108
|
-
* Original on-disk version of the input. Migrations may use this to
|
|
109
|
-
* decide between in-place patches and rewrites.
|
|
110
|
-
*/
|
|
111
|
-
fromVersion: number;
|
|
112
|
-
/**
|
|
113
|
-
* Set when the migration writes back to disk. Callers persist the
|
|
114
|
-
* migrated config when this is true so the user doesn't see the same
|
|
115
|
-
* migration banner on every boot.
|
|
116
|
-
*/
|
|
117
|
-
shouldPersist: boolean;
|
|
118
|
-
}
|
|
119
|
-
interface ConfigMigration {
|
|
120
|
-
/** Version of the input this migration accepts. */
|
|
121
|
-
from: number;
|
|
122
|
-
/** Version of the output it produces. */
|
|
123
|
-
to: number;
|
|
124
|
-
/** Pure transform — no I/O. */
|
|
125
|
-
migrate(input: Record<string, unknown>, ctx: MigrationContext): Record<string, unknown>;
|
|
126
|
-
/** Optional human-readable description for migration logs / banners. */
|
|
127
|
-
describe?: string | undefined;
|
|
128
|
-
}
|
|
129
|
-
interface MigrationResult {
|
|
130
|
-
/** Final config (still typed as `unknown`-keyed — caller validates). */
|
|
131
|
-
config: Record<string, unknown>;
|
|
132
|
-
/** Ordered list of `from→to` versions that ran. */
|
|
133
|
-
applied: string[];
|
|
134
|
-
/** True when at least one migration produced changes worth persisting. */
|
|
135
|
-
shouldPersist: boolean;
|
|
136
|
-
}
|
|
137
|
-
declare class ConfigMigrationError extends Error {
|
|
138
|
-
readonly fromVersion: number;
|
|
139
|
-
readonly targetVersion: number;
|
|
140
|
-
readonly missingStep: number | null;
|
|
141
|
-
constructor(opts: {
|
|
142
|
-
message: string;
|
|
143
|
-
fromVersion: number;
|
|
144
|
-
targetVersion: number;
|
|
145
|
-
missingStep: number | null;
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Run registered migrations until the input reaches `targetVersion`.
|
|
150
|
-
*
|
|
151
|
-
* Resolution rules:
|
|
152
|
-
* 1. If `input.version === targetVersion`, no migrations run; `shouldPersist`
|
|
153
|
-
* is false.
|
|
154
|
-
* 2. Otherwise walk the migration chain from `input.version` upward,
|
|
155
|
-
* picking the migration whose `from` matches the current version.
|
|
156
|
-
* 3. Stop when `current.version === targetVersion`.
|
|
157
|
-
* 4. If no migration matches at some point, throw `ConfigMigrationError`
|
|
158
|
-
* with the missing step recorded for diagnostics.
|
|
159
|
-
*
|
|
160
|
-
* Migrations may be downward (e.g. for staged rollouts), but `targetVersion`
|
|
161
|
-
* must be reachable strictly via the registered chain — there's no implicit
|
|
162
|
-
* "skip" or transitive resolution.
|
|
163
|
-
*/
|
|
164
|
-
declare function runConfigMigrations(input: Record<string, unknown>, targetVersion: number, migrations: readonly ConfigMigration[]): MigrationResult;
|
|
165
|
-
/**
|
|
166
|
-
* Default empty migration registry. Real migrations are appended as new
|
|
167
|
-
* Config versions are introduced. Example (when v2 lands):
|
|
168
|
-
*
|
|
169
|
-
* export const CONFIG_MIGRATIONS: readonly ConfigMigration[] = [
|
|
170
|
-
* {
|
|
171
|
-
* from: 1, to: 2, describe: 'rename `apiKey` → `auth.apiKey`',
|
|
172
|
-
* migrate(cfg) {
|
|
173
|
-
* const apiKey = cfg.apiKey;
|
|
174
|
-
* delete cfg.apiKey;
|
|
175
|
-
* return { ...cfg, auth: { ...(cfg.auth ?? {}), apiKey } };
|
|
176
|
-
* },
|
|
177
|
-
* },
|
|
178
|
-
* ];
|
|
179
|
-
*/
|
|
180
|
-
declare const DEFAULT_CONFIG_MIGRATIONS: readonly ConfigMigration[];
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Reference implementation of `ConfigStore`. Stores a single frozen Config
|
|
184
|
-
* and notifies watchers synchronously on every update. Updates use a deep
|
|
185
|
-
* clone so callers can mutate their `partial` argument freely without
|
|
186
|
-
* tainting state.
|
|
187
|
-
*
|
|
188
|
-
* For the CLI: instantiate once at boot, pass the store (not the Config)
|
|
189
|
-
* to subsystems that care about runtime changes (provider switching,
|
|
190
|
-
* extension reload).
|
|
191
|
-
*/
|
|
192
|
-
declare class DefaultConfigStore implements ConfigStore {
|
|
193
|
-
private current;
|
|
194
|
-
private watchers;
|
|
195
|
-
constructor(initial: Config);
|
|
196
|
-
get(): Readonly<Config>;
|
|
197
|
-
getSection<K extends keyof Config>(key: K): Readonly<Config[K]>;
|
|
198
|
-
getExtension(pluginName: string): Readonly<Record<string, unknown>>;
|
|
199
|
-
update(partial: Partial<Config>): Readonly<Config>;
|
|
200
|
-
watch(cb: (next: Readonly<Config>, prev: Readonly<Config>) => void): () => void;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
interface MemoryBackend {
|
|
204
|
-
readonly kind: string;
|
|
205
|
-
remember(scope: MemoryScope, entry: MemoryEntry, filePath: string): Promise<void>;
|
|
206
|
-
forget(scope: MemoryScope, query: string, filePath: string): Promise<number>;
|
|
207
|
-
readAll(scope: MemoryScope, filePath: string): Promise<string>;
|
|
208
|
-
list(scope: MemoryScope, filePath: string, limit?: number | undefined): Promise<MemoryEntry[]>;
|
|
209
|
-
search(scope: MemoryScope, query: string, filePath: string, limit?: number | undefined): Promise<MemoryEntry[]>;
|
|
210
|
-
/** Find memories related to the given text via graph traversal. Optional — falls back to search. */
|
|
211
|
-
findRelated?(scope: MemoryScope, filePath: string, text: string, limit: number): Promise<MemoryEntry[]>;
|
|
212
|
-
clear(scope: MemoryScope, filePath: string): Promise<void>;
|
|
213
|
-
consolidate(scope: MemoryScope, filePath: string): Promise<number>;
|
|
214
|
-
}
|
|
215
|
-
interface FileMemoryBackendOptions {
|
|
216
|
-
paths: WstackPaths;
|
|
217
|
-
}
|
|
218
|
-
declare class FileMemoryBackend implements MemoryBackend {
|
|
219
|
-
readonly kind = "file";
|
|
220
|
-
private readonly files;
|
|
221
|
-
/** Cache of parsed entries per file path. */
|
|
222
|
-
private readonly entryCache;
|
|
223
|
-
/** Inverted index per file path. */
|
|
224
|
-
private readonly indexCache;
|
|
225
|
-
/** File mtime cache for invalidation. */
|
|
226
|
-
private readonly mtimeCache;
|
|
227
|
-
constructor(opts: FileMemoryBackendOptions);
|
|
228
|
-
private resolveFile;
|
|
229
|
-
private getMtime;
|
|
230
|
-
private invalidateCache;
|
|
231
|
-
/**
|
|
232
|
-
* Load (and cache) the parsed entries for a file. Callers that have already
|
|
233
|
-
* stat'd the file this tick (e.g. `getIndex`) can pass the known `mtime` to
|
|
234
|
-
* avoid a redundant `fs.stat` — otherwise it's fetched here.
|
|
235
|
-
*/
|
|
236
|
-
private loadEntries;
|
|
237
|
-
private getIndex;
|
|
238
|
-
remember(scope: MemoryScope, entry: MemoryEntry, filePath: string): Promise<void>;
|
|
239
|
-
forget(scope: MemoryScope, query: string, filePath: string): Promise<number>;
|
|
240
|
-
readAll(scope: MemoryScope, filePath: string): Promise<string>;
|
|
241
|
-
list(scope: MemoryScope, filePath: string, limit?: number): Promise<MemoryEntry[]>;
|
|
242
|
-
search(scope: MemoryScope, query: string, filePath: string, limit?: number): Promise<MemoryEntry[]>;
|
|
243
|
-
clear(scope: MemoryScope, filePath: string): Promise<void>;
|
|
244
|
-
consolidate(scope: MemoryScope, filePath: string): Promise<number>;
|
|
245
|
-
}
|
|
246
|
-
declare function parseEntries(raw: string, scope?: MemoryScope): MemoryEntry[];
|
|
247
|
-
|
|
248
|
-
interface MemoryStoreOptions {
|
|
249
|
-
paths: WstackPaths;
|
|
250
|
-
/**
|
|
251
|
-
* Optional event bus — when provided, mutations emit events so plugins
|
|
252
|
-
* and other subsystems can react to memory changes.
|
|
253
|
-
*/
|
|
254
|
-
events?: EventBus | undefined;
|
|
255
|
-
/**
|
|
256
|
-
* Storage backend. Defaults to FileMemoryBackend when omitted.
|
|
257
|
-
* Plugins can register a custom backend (graph, semantic, vector)
|
|
258
|
-
* via the DI container to override storage behavior.
|
|
259
|
-
*/
|
|
260
|
-
backend?: MemoryBackend | undefined;
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* Three scopes:
|
|
264
|
-
* project-agents → <project>/.wrongstack/AGENTS.md (committed)
|
|
265
|
-
* project-memory → ~/.wrongstack/projects/<hash>/memory.md (per-project agent notes)
|
|
266
|
-
* user-memory → ~/.wrongstack/memory.md (global personal memory)
|
|
267
|
-
*/
|
|
268
|
-
declare class DefaultMemoryStore implements MemoryStore {
|
|
269
|
-
private readonly files;
|
|
270
|
-
private readonly events?;
|
|
271
|
-
private traceId?;
|
|
272
|
-
private readonly backend;
|
|
273
|
-
/**
|
|
274
|
-
* Per-scope serialization queue. `remember` / `forget` / `consolidate` /
|
|
275
|
-
* `clear` are read-modify-write against a single file; without a lock,
|
|
276
|
-
* two concurrent calls on the same scope can read the same baseline and
|
|
277
|
-
* the later write silently drops the earlier entry. We chain each
|
|
278
|
-
* mutation onto the prior promise for the same scope so they run in
|
|
279
|
-
* issue order. Different scopes still proceed in parallel.
|
|
280
|
-
*
|
|
281
|
-
* The chain tracks only the last pending write. If a write fails, its
|
|
282
|
-
* error is caught and swallowed so the chain stays alive for subsequent
|
|
283
|
-
* calls. The error is stored in `writeErrors` so callers can learn about
|
|
284
|
-
* it on the next read operation.
|
|
285
|
-
*/
|
|
286
|
-
private readonly writeChain;
|
|
287
|
-
/** Last write error per scope — surfaced as warnings on the next readAll(). */
|
|
288
|
-
private readonly writeErrors;
|
|
289
|
-
/**
|
|
290
|
-
* When the global root is a temporary directory (opencode, CI sandboxes),
|
|
291
|
-
* memory files are also mirrored to the project tree so they survive
|
|
292
|
-
* session cleanup. The primary path stays in the temp root for isolation;
|
|
293
|
-
* this backup ensures memory is never lost.
|
|
294
|
-
*/
|
|
295
|
-
private readonly persistBackup;
|
|
296
|
-
private readonly backupDir;
|
|
297
|
-
/**
|
|
298
|
-
* Per-scope tracked byte sizes — incremented on `remember()`, decremented on
|
|
299
|
-
* `forget()`, recalculated after `consolidate()`. Eliminates the redundant
|
|
300
|
-
* readAll() call that previously checked the file size after every write.
|
|
301
|
-
*/
|
|
302
|
-
private readonly _trackedByteSizes;
|
|
303
|
-
/** Result cache for scoreRelevant() — keyed by scope + context hash, TTL 30s. */
|
|
304
|
-
private readonly _scoreCache;
|
|
305
|
-
/**
|
|
306
|
-
* Per-entry cached lowercase strings — lazily allocated once and reused
|
|
307
|
-
* across scoreRelevant() calls so repeated scoring of the same entries skips
|
|
308
|
-
* re-lowercasing. Keyed by entry object identity; cleared (set to null) on
|
|
309
|
-
* every mutation (remember/forget/consolidate/clear) via invalidateScoreCaches().
|
|
310
|
-
*/
|
|
311
|
-
private _cachedLower;
|
|
312
|
-
constructor(opts: MemoryStoreOptions);
|
|
313
|
-
/** Expose the backend for plugin introspection and advanced queries. */
|
|
314
|
-
getBackend(): MemoryBackend;
|
|
315
|
-
private runSerialized;
|
|
316
|
-
/**
|
|
317
|
-
* Recalculate the tracked byte size for a scope by re-reading the file and
|
|
318
|
-
* summing the serialized byte length of each line. Called after consolidate()
|
|
319
|
-
* (which modifies the file) to keep the tracker accurate.
|
|
320
|
-
*/
|
|
321
|
-
private _recalcTrackedByteSize;
|
|
322
|
-
readAll(): Promise<string>;
|
|
323
|
-
read(scope: MemoryScope): Promise<string>;
|
|
324
|
-
/**
|
|
325
|
-
* List entries from a scope, newest first. Delegates to the backend
|
|
326
|
-
* so graph/semantic backends can return enriched or filtered results.
|
|
327
|
-
*/
|
|
328
|
-
list(scope?: MemoryScope, limit?: number): Promise<MemoryEntry[]>;
|
|
329
|
-
/**
|
|
330
|
-
* Find memories related to the given text via graph traversal.
|
|
331
|
-
* Falls back to content search when no graph backend is available.
|
|
332
|
-
*/
|
|
333
|
-
findRelated(text: string, scope?: MemoryScope, limit?: number): Promise<MemoryEntry[]>;
|
|
334
|
-
search(query: string, scope?: MemoryScope, limit?: number): Promise<MemoryEntry[]>;
|
|
335
|
-
remember(text: string, scope?: MemoryScope, metadata?: Omit<Partial<MemoryEntry>, 'scope' | 'text' | 'ts'>): Promise<void>;
|
|
336
|
-
/**
|
|
337
|
-
* Drop the relevance caches after a mutation. Both the per-context score
|
|
338
|
-
* cache and the per-entry lowercase cache are keyed on entry objects that a
|
|
339
|
-
* mutation invalidates, so they must be cleared together when entries change.
|
|
340
|
-
*/
|
|
341
|
-
private invalidateScoreCaches;
|
|
342
|
-
/**
|
|
343
|
-
* Score and rank memories by relevance to the current context.
|
|
344
|
-
* Returns entries with score >= MIN_RELEVANCE_SCORE, sorted highest first.
|
|
345
|
-
*/
|
|
346
|
-
scoreRelevant(ctx: MemoryRelevanceContext, scope?: MemoryScope, limit?: number): Promise<ScoredEntry[]>;
|
|
347
|
-
forget(query: string, scope?: MemoryScope): Promise<number>;
|
|
348
|
-
consolidate(scope: MemoryScope): Promise<void>;
|
|
349
|
-
clear(scope?: MemoryScope): Promise<void>;
|
|
350
|
-
/**
|
|
351
|
-
* Return a new MemoryStore proxy that carries `traceId` on every storage
|
|
352
|
-
* event. The original store is left unchanged — callers that need a
|
|
353
|
-
* trace-decorated view (e.g. session-run tools) receive the proxy while
|
|
354
|
-
* the singleton remains trace-free for boot-time use.
|
|
355
|
-
*
|
|
356
|
-
* The proxy implements the full `MemoryStore` interface; all other
|
|
357
|
-
* properties (backend, etc.) are delegated to the original store.
|
|
358
|
-
*/
|
|
359
|
-
withTraceId(traceId: string): MemoryStore;
|
|
360
|
-
private mirrorBackup;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
/**
|
|
364
|
-
* Plan items are the strategic counterpart to todos. Where `ctx.todos`
|
|
365
|
-
* is the moment-to-moment task board the LLM mutates per-turn, a plan
|
|
366
|
-
* captures the higher-level approach — the steps the user (or LLM)
|
|
367
|
-
* laid out before any work began.
|
|
368
|
-
*
|
|
369
|
-
* Plans persist by default (per session) so a resumed session can show
|
|
370
|
-
* "you were on step 3 of 5". Todos are derived/transient. Both can
|
|
371
|
-
* coexist: think roadmap (plan) vs. sprint board (todos).
|
|
372
|
-
*/
|
|
373
|
-
interface PlanItem {
|
|
374
|
-
id: string;
|
|
375
|
-
title: string;
|
|
376
|
-
/** Optional longer-form context or rationale. */
|
|
377
|
-
details?: string | undefined;
|
|
378
|
-
status: 'open' | 'in_progress' | 'done';
|
|
379
|
-
createdAt: string;
|
|
380
|
-
updatedAt: string;
|
|
381
|
-
}
|
|
382
|
-
interface PlanFile {
|
|
383
|
-
version: 1;
|
|
384
|
-
sessionId: string;
|
|
385
|
-
title?: string | undefined;
|
|
386
|
-
updatedAt: string;
|
|
387
|
-
items: PlanItem[];
|
|
388
|
-
}
|
|
389
|
-
declare function loadPlan(filePath: string, events?: EventBus): Promise<PlanFile | null>;
|
|
390
|
-
/**
|
|
391
|
-
* Persist a plan. Returns `true` on success, `false` if the write failed
|
|
392
|
-
* (still emits `storage.error` + warns — it does NOT throw, so callers that
|
|
393
|
-
* treat a lost plan-save as non-fatal keep working). `mutatePlan` inspects the
|
|
394
|
-
* result and throws so the plan TOOL can report `ok:false` instead of falsely
|
|
395
|
-
* claiming the plan was persisted.
|
|
396
|
-
*/
|
|
397
|
-
declare function savePlan(filePath: string, plan: PlanFile, events?: EventBus): Promise<boolean>;
|
|
398
|
-
/** Create a new PlanFile when none exists on disk. */
|
|
399
|
-
declare function emptyPlan(sessionId: string, title?: string): PlanFile;
|
|
400
|
-
declare function addPlanItem(plan: PlanFile, title: string, details?: string | undefined): {
|
|
401
|
-
plan: PlanFile;
|
|
402
|
-
item: PlanItem;
|
|
403
|
-
};
|
|
404
|
-
declare function removePlanItem(plan: PlanFile, idOrIndex: string): PlanFile;
|
|
405
|
-
declare function setPlanItemStatus(plan: PlanFile, idOrIndex: string, status: PlanItem['status']): PlanFile;
|
|
406
|
-
declare function clearPlan(plan: PlanFile): PlanFile;
|
|
407
|
-
/** Render the plan as a short markdown-ish string suitable for slash output. */
|
|
408
|
-
declare function formatPlan(plan: PlanFile): string;
|
|
409
|
-
/**
|
|
410
|
-
* Promote a plan item to a set of todo items.
|
|
411
|
-
* The plan item is marked 'in_progress' (if not already done) and its
|
|
412
|
-
* title + details become the first todo; additional subtasks are appended.
|
|
413
|
-
* Returns the derived todo list so the caller can pass it to `todoTool`
|
|
414
|
-
* or `ctx.state.replaceTodos()`.
|
|
415
|
-
*/
|
|
416
|
-
declare function deriveTodosFromPlanItem(plan: PlanFile, idOrIndex: string, subtasks?: string[] | undefined): {
|
|
417
|
-
plan: PlanFile;
|
|
418
|
-
todos: Array<{
|
|
419
|
-
id: string;
|
|
420
|
-
content: string;
|
|
421
|
-
status: 'pending' | 'in_progress' | 'completed';
|
|
422
|
-
activeForm?: string | undefined;
|
|
423
|
-
promotedFromPlan?: string | undefined;
|
|
424
|
-
}>;
|
|
425
|
-
} | null;
|
|
426
|
-
/**
|
|
427
|
-
* Load, modify, and save the plan file under a file-level lock.
|
|
428
|
-
* Prevents races from parallel tool invocations (e.g. batch_tool_use).
|
|
429
|
-
*/
|
|
430
|
-
declare function mutatePlan(filePath: string, sessionId: string, fn: (plan: PlanFile) => PlanFile | Promise<PlanFile>): Promise<PlanFile>;
|
|
431
|
-
/**
|
|
432
|
-
* Optional: attach a state-listener so meta operations (storing a plan
|
|
433
|
-
* id on ctx.meta) trigger a save. Currently a stub — plans don't live
|
|
434
|
-
* on Context, but this keeps the API surface symmetric with the todos
|
|
435
|
-
* checkpoint so future refactors can flip plans into Context if needed.
|
|
436
|
-
*/
|
|
437
|
-
declare function attachPlanCheckpoint(_state: ConversationState, _filePath: string, _sessionId: string): () => void;
|
|
438
|
-
|
|
439
|
-
/**
|
|
440
|
-
* Plan templates — pre-defined plan skeletons for common workflows.
|
|
441
|
-
*
|
|
442
|
-
* Templates are stored in-memory (no disk I/O). Users instantiate them
|
|
443
|
-
* via `/plan template use <name>` or `planTool(action: 'template_use')`.
|
|
444
|
-
* Each template is a function that returns an array of item titles, so
|
|
445
|
-
* dynamic content (dates, project names) can be injected later.
|
|
446
|
-
*/
|
|
447
|
-
interface PlanTemplate {
|
|
448
|
-
name: string;
|
|
449
|
-
description: string;
|
|
450
|
-
category: 'development' | 'release' | 'maintenance' | 'infrastructure';
|
|
451
|
-
items: Array<{
|
|
452
|
-
title: string;
|
|
453
|
-
details?: string | undefined;
|
|
454
|
-
}>;
|
|
455
|
-
}
|
|
456
|
-
declare function listPlanTemplates(): PlanTemplate[];
|
|
457
|
-
declare function getPlanTemplate(name: string): PlanTemplate | undefined;
|
|
458
|
-
declare function formatPlanTemplates(): string;
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* The persisted form of a single queued user message. The TUI's
|
|
462
|
-
* in-memory QueueItem has a render id; that's pure UI bookkeeping, so
|
|
463
|
-
* we drop it when serializing — fresh ids are assigned on rehydrate.
|
|
464
|
-
*/
|
|
465
|
-
interface PersistedQueueItem {
|
|
466
|
-
displayText: string;
|
|
467
|
-
blocks: ContentBlock[];
|
|
468
|
-
}
|
|
469
|
-
/**
|
|
470
|
-
* Side-file storage for a session's pending input queue. Lives at
|
|
471
|
-
* `<sessionDir>/queue.json` next to the attachment spool. Reads are
|
|
472
|
-
* tolerant (missing/malformed file → empty array); writes are atomic
|
|
473
|
-
* (tmp + rename) so a crash mid-write can never leave a partial file
|
|
474
|
-
* the next launch would choke on.
|
|
475
|
-
*
|
|
476
|
-
* The contract is "snapshot replacement": every mutation hands the
|
|
477
|
-
* full queue and we rewrite the file. The queue is small (rarely more
|
|
478
|
-
* than a handful of messages), so this is cheaper than delta logging
|
|
479
|
-
* and avoids the replay complexity.
|
|
480
|
-
*/
|
|
481
|
-
declare class QueueStore {
|
|
482
|
-
private readonly file;
|
|
483
|
-
private readonly events;
|
|
484
|
-
private readonly traceId;
|
|
485
|
-
constructor(opts: {
|
|
486
|
-
dir: string;
|
|
487
|
-
events?: EventBus;
|
|
488
|
-
traceId?: string;
|
|
489
|
-
});
|
|
490
|
-
write(items: PersistedQueueItem[]): Promise<void>;
|
|
491
|
-
read(): Promise<PersistedQueueItem[]>;
|
|
492
|
-
clear(): Promise<void>;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
/**
|
|
496
|
-
* Per-project lockfile used for crash detection. The CLI writes one of
|
|
497
|
-
* these alongside the session JSONLs (`<projectSessions>/active.json`)
|
|
498
|
-
* when an interactive run starts, and deletes it on clean exit. If we
|
|
499
|
-
* find one on the next launch whose owning PID is dead (or whose host
|
|
500
|
-
* doesn't match), we know the previous run was killed mid-flight and
|
|
501
|
-
* the session it was writing to is a recovery candidate.
|
|
502
|
-
*
|
|
503
|
-
* The lockfile is intentionally per-project (already isolated by
|
|
504
|
-
* `wpaths.projectSessions`), so two TUIs in two different repos do not
|
|
505
|
-
* fight each other.
|
|
506
|
-
*/
|
|
507
|
-
interface RecoveryLockOptions {
|
|
508
|
-
/** Directory the lockfile lives in. Usually `wpaths.projectSessions`. */
|
|
509
|
-
dir: string;
|
|
510
|
-
/** This process's PID. Default: `process.pid`. */
|
|
511
|
-
pid?: number | undefined;
|
|
512
|
-
/** Hostname recorded for the lock. Default: `os.hostname()`. */
|
|
513
|
-
hostname?: string | undefined;
|
|
514
|
-
/** Locks older than this are considered orphaned (disk wiped, etc.). Default 24h. */
|
|
515
|
-
maxAgeMs?: number | undefined;
|
|
516
|
-
/** Used to check whether the abandoned session was actually closed cleanly. */
|
|
517
|
-
sessionStore?: SessionStore | undefined;
|
|
518
|
-
/**
|
|
519
|
-
* Override the PID-liveness probe. Default: `process.kill(pid, 0)` —
|
|
520
|
-
* succeeds (or throws EPERM) when the PID is alive, throws ESRCH when
|
|
521
|
-
* it is gone. Tests inject a deterministic stub.
|
|
522
|
-
*/
|
|
523
|
-
isPidAlive?: (((pid: number) => boolean)) | undefined;
|
|
524
|
-
}
|
|
525
|
-
interface AbandonedSession {
|
|
526
|
-
sessionId: string;
|
|
527
|
-
pid: number;
|
|
528
|
-
startedAt: string;
|
|
529
|
-
/** Lockfile age in ms at the time of the check. */
|
|
530
|
-
ageMs: number;
|
|
531
|
-
/** Number of messages already on disk for this session. */
|
|
532
|
-
messageCount: number;
|
|
533
|
-
}
|
|
534
|
-
declare class RecoveryLock {
|
|
535
|
-
private readonly file;
|
|
536
|
-
private readonly pid;
|
|
537
|
-
private readonly hostname;
|
|
538
|
-
private readonly maxAgeMs;
|
|
539
|
-
private readonly sessionStore?;
|
|
540
|
-
private readonly probe;
|
|
541
|
-
constructor(opts: RecoveryLockOptions);
|
|
542
|
-
/**
|
|
543
|
-
* Examine the lockfile and decide whether it represents an abandoned
|
|
544
|
-
* session. Returns `null` if the file is missing, points to a live
|
|
545
|
-
* instance, references a clean-closed session, is too old, or is
|
|
546
|
-
* malformed. Otherwise returns enough detail to prompt the user.
|
|
547
|
-
*
|
|
548
|
-
* Important: this is a read-only check. We never delete an active
|
|
549
|
-
* lock from here — if another wstack instance is alive, the caller
|
|
550
|
-
* should bail or run with a fresh session instead.
|
|
551
|
-
*/
|
|
552
|
-
checkAbandoned(): Promise<AbandonedSession | null>;
|
|
553
|
-
/**
|
|
554
|
-
* Claim the lock for the given session. Uses exclusive-create (`O_EXCL`)
|
|
555
|
-
* to detect whether another process acquired the lock between our
|
|
556
|
-
* `checkAbandoned()` call and now. If the file already exists, it means
|
|
557
|
-
* another process won the race and we throw instead of silently
|
|
558
|
-
* overwriting their recovery record.
|
|
559
|
-
*
|
|
560
|
-
* The caller MUST have already called `checkAbandoned()` and handled its
|
|
561
|
-
* null return before calling this.
|
|
562
|
-
*/
|
|
563
|
-
write(sessionId: string): Promise<void>;
|
|
564
|
-
/**
|
|
565
|
-
* Release the lock. Idempotent — silently succeeds if the file is
|
|
566
|
-
* already gone (e.g. someone else cleared it, or the directory was
|
|
567
|
-
* wiped).
|
|
568
|
-
*/
|
|
569
|
-
clear(): Promise<void>;
|
|
570
|
-
private readLock;
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
interface QueryFilter {
|
|
574
|
-
eventTypes?: string[] | undefined;
|
|
575
|
-
toolNames?: string[] | undefined;
|
|
576
|
-
timeRange?: {
|
|
577
|
-
start: string;
|
|
578
|
-
end: string;
|
|
579
|
-
} | undefined;
|
|
580
|
-
}
|
|
581
|
-
interface ModeChange {
|
|
582
|
-
ts: string;
|
|
583
|
-
from: string;
|
|
584
|
-
to: string;
|
|
585
|
-
}
|
|
586
|
-
interface TaskSummary {
|
|
587
|
-
taskId: string;
|
|
588
|
-
title: string;
|
|
589
|
-
status: string;
|
|
590
|
-
createdAt: string;
|
|
591
|
-
completedAt?: string | undefined;
|
|
592
|
-
}
|
|
593
|
-
interface SessionAnalysis {
|
|
594
|
-
sessionId: string;
|
|
595
|
-
totalDuration: number;
|
|
596
|
-
toolUsageCount: Record<string, number>;
|
|
597
|
-
errorCount: number;
|
|
598
|
-
modeChanges: ModeChange[];
|
|
599
|
-
tasks: TaskSummary[];
|
|
600
|
-
}
|
|
601
|
-
declare class SessionAnalyzer {
|
|
602
|
-
analyze(events: SessionEvent[]): SessionAnalysis;
|
|
603
|
-
query(events: SessionEvent[], filter: QueryFilter): SessionEvent[];
|
|
604
|
-
private calcDuration;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
interface SessionStoreOptions {
|
|
608
|
-
dir: string;
|
|
609
|
-
/**
|
|
610
|
-
* Active project root used to revalidate persisted file-observation hashes
|
|
611
|
-
* during resume. Omit for stores that only inspect/archive transcripts.
|
|
612
|
-
*/
|
|
613
|
-
projectRoot?: string | undefined;
|
|
614
|
-
/** Optional EventBus for emitting session diagnostics. */
|
|
615
|
-
events?: EventBus | undefined;
|
|
616
|
-
/**
|
|
617
|
-
* Optional secret scrubber. When set, `user_input` and `llm_response` event
|
|
618
|
-
* content is scrubbed before being persisted to the JSONL log and the
|
|
619
|
-
* summary sidecar — so a secret a user pastes or the model echoes does not
|
|
620
|
-
* sit in cleartext on disk (and does not ride along in history cloud-sync).
|
|
621
|
-
* Tool output is already scrubbed upstream by the executor; this closes the
|
|
622
|
-
* conversation-turn gap (finding F-06).
|
|
623
|
-
*/
|
|
624
|
-
secretScrubber?: SecretScrubber | undefined;
|
|
625
|
-
/**
|
|
626
|
-
* Optional guard consulted by {@link DefaultSessionStore.delete} before
|
|
627
|
-
* removing a session. Returns `true` if the session is currently in use by
|
|
628
|
-
* any live process (e.g. it is the active session of another terminal, TUI,
|
|
629
|
-
* or WebUI in this project). The store ALWAYS also checks `active.json`
|
|
630
|
-
* directly; this callback widens the check to cross-process live sessions
|
|
631
|
-
* via the SessionRegistry. When omitted, only the `active.json` check runs.
|
|
632
|
-
* Resolves to a human-readable reason when in use, or `null` when safe.
|
|
633
|
-
*/
|
|
634
|
-
isSessionInUse?: ((sessionId: string) => Promise<string | null>) | undefined;
|
|
635
|
-
}
|
|
636
|
-
declare class DefaultSessionStore implements SessionStore {
|
|
637
|
-
private readonly dir;
|
|
638
|
-
private readonly events?;
|
|
639
|
-
private readonly secretScrubber?;
|
|
640
|
-
private readonly projectRoot?;
|
|
641
|
-
private readonly checkpointCas?;
|
|
642
|
-
private readonly isSessionInUse?;
|
|
643
|
-
/**
|
|
644
|
-
* In-memory cache for load() results, keyed by session ID. The cache is
|
|
645
|
-
* invalidated when the file's mtimeMs or size changes (indicating the
|
|
646
|
-
* file was written to). This eliminates redundant full-file reads and
|
|
647
|
-
* JSON parses when the same session is loaded multiple times within the
|
|
648
|
-
* store's lifetime (e.g., webui session detail views, list() fallbacks).
|
|
649
|
-
*
|
|
650
|
-
* Max size is capped to prevent unbounded memory growth in long-running
|
|
651
|
-
* processes. When the limit is reached, the oldest entry is evicted.
|
|
652
|
-
*/
|
|
653
|
-
private readonly _loadCache;
|
|
654
|
-
private _indexCache;
|
|
655
|
-
private readonly shardManifestCache;
|
|
656
|
-
private static readonly LOAD_CACHE_MAX_ENTRIES;
|
|
657
|
-
private static readonly LIST_SCAN_CONCURRENCY;
|
|
658
|
-
constructor(opts: SessionStoreOptions);
|
|
659
|
-
/**
|
|
660
|
-
* Clear the load() cache. Useful for testing or when the caller knows
|
|
661
|
-
* the file has changed externally (e.g., another process wrote to it).
|
|
662
|
-
*/
|
|
663
|
-
clearLoadCache(sessionId?: string): void;
|
|
664
|
-
private emitRead;
|
|
665
|
-
private emitWrite;
|
|
666
|
-
private emitError;
|
|
667
|
-
/** Absolute path to the session index file. */
|
|
668
|
-
private get indexFile();
|
|
669
|
-
/** Join session ID to its absolute path within the store directory. */
|
|
670
|
-
private sessionPath;
|
|
671
|
-
private shardManifestPath;
|
|
672
|
-
private shardKeyForSessionId;
|
|
673
|
-
private invalidateShardManifestBySessionId;
|
|
674
|
-
/**
|
|
675
|
-
* Ensure the directory implied by the session ID exists. When the ID
|
|
676
|
-
* contains a date prefix like `2026-06-06/...`, this creates the date
|
|
677
|
-
* subdirectory so sessions group naturally by day.
|
|
678
|
-
*/
|
|
679
|
-
private ensureShardDir;
|
|
680
|
-
create(meta: Omit<SessionMetadata, 'startedAt'>): Promise<SessionWriter>;
|
|
681
|
-
fork(id: string, opts?: SessionForkOptions): Promise<ForkedSession>;
|
|
682
|
-
materializeWorkspaceCheckpoint(checkpoint: WorkspaceCheckpointRef, targetRoot: string): Promise<WorkspaceMaterializationResult>;
|
|
683
|
-
resume(id: string): Promise<ResumedSession>;
|
|
684
|
-
load(id: string): Promise<SessionData>;
|
|
685
|
-
/**
|
|
686
|
-
* Fast-path loader that skips message reconstruction and adjacency repair.
|
|
687
|
-
*
|
|
688
|
-
* Use this for callers that only need the raw event stream + session
|
|
689
|
-
* metadata — e.g. session listers, analytics, audit, and the TUI's
|
|
690
|
-
* "events only" views. It avoids the message array build and
|
|
691
|
-
* repairToolUseAdjacency cost on large session files (a long agent
|
|
692
|
-
* run can have 50k+ events; rebuilding messages is O(events) and
|
|
693
|
-
* allocates per-block, so skipping it is a meaningful win).
|
|
694
|
-
*
|
|
695
|
-
* The returned data.messages is an empty array; data.toolCallEnds
|
|
696
|
-
* is computed from the raw events. usage is the sum across all
|
|
697
|
-
* llm_response events — same as full load().
|
|
698
|
-
*/
|
|
699
|
-
loadEventsOnly(id: string): Promise<SessionData>;
|
|
700
|
-
private loadInternal;
|
|
701
|
-
/**
|
|
702
|
-
* Streaming search over a session's JSONL. Walks the file once, parses
|
|
703
|
-
* each event lazily, and yields only the events that match `predicate`.
|
|
704
|
-
* Stops as soon as `opts.limit` matches are collected.
|
|
705
|
-
*
|
|
706
|
-
* Why this exists: `load()` parses the entire file into memory and
|
|
707
|
-
* rebuilds `messages`/`toolCallEnds` for every caller. `search()` only
|
|
708
|
-
* needs to know which events contain matching text — a per-line
|
|
709
|
-
* predicate is enough. The full parse work (and the `_loadCache` poll)
|
|
710
|
-
* is wasted in that case.
|
|
711
|
-
*
|
|
712
|
-
* Memory: O(hits) regardless of file size. Disk: one linear scan,
|
|
713
|
-
* terminated at `limit` if the caller asked for one.
|
|
714
|
-
*
|
|
715
|
-
* Errors: missing file yields []. Corrupt lines are skipped (same
|
|
716
|
-
* policy as `load()`). Aborting via `signal` rejects with `AbortError`.
|
|
717
|
-
*/
|
|
718
|
-
searchEvents(id: string, predicate: (event: SessionEvent, eventIndex: number, ts: string) => boolean, opts?: {
|
|
719
|
-
limit?: number | undefined;
|
|
720
|
-
signal?: AbortSignal | undefined;
|
|
721
|
-
}): Promise<Array<{
|
|
722
|
-
event: SessionEvent;
|
|
723
|
-
eventIndex: number;
|
|
724
|
-
ts: string;
|
|
725
|
-
}>>;
|
|
726
|
-
list(limit?: number): Promise<SessionSummary[]>;
|
|
727
|
-
/**
|
|
728
|
-
* List sessions matching filter criteria, using the cached index.
|
|
729
|
-
* Filters are applied BEFORE sorting and slicing, so the caller gets
|
|
730
|
-
* exactly `limit` matching sessions — not a slice of a larger fetch.
|
|
731
|
-
*
|
|
732
|
-
* This avoids the DefaultSessionReader pattern of fetching 1000 sessions
|
|
733
|
-
* then linear-filtering: the index is already in memory (readIndex
|
|
734
|
-
* caches it), and the filter runs over the cached array without any
|
|
735
|
-
* additional disk I/O.
|
|
736
|
-
*/
|
|
737
|
-
listFiltered(criteria: {
|
|
738
|
-
since?: string | undefined;
|
|
739
|
-
until?: string | undefined;
|
|
740
|
-
provider?: string | undefined;
|
|
741
|
-
model?: string | undefined;
|
|
742
|
-
minTokens?: number | undefined;
|
|
743
|
-
titleContains?: string | undefined;
|
|
744
|
-
limit?: number | undefined;
|
|
745
|
-
}): Promise<SessionSummary[]>;
|
|
746
|
-
private indexAppendCount;
|
|
747
|
-
private static readonly COMPACT_EVERY;
|
|
748
|
-
/** Append a session summary to the index. */
|
|
749
|
-
private appendToIndex;
|
|
750
|
-
/** Append a tombstone entry for a deleted session. */
|
|
751
|
-
private writeTombstone;
|
|
752
|
-
/**
|
|
753
|
-
* Compact the index: read all entries, drop tombstones, deduplicate
|
|
754
|
-
* (keep latest per session), and rewrite atomically. Acquires the index
|
|
755
|
-
* file lock so a concurrent append (this process or another wstack in the
|
|
756
|
-
* same project) can't be overwritten by the rewrite.
|
|
757
|
-
*/
|
|
758
|
-
private compactIndex;
|
|
759
|
-
/**
|
|
760
|
-
* Lock-free compaction body. The caller MUST already hold the index file
|
|
761
|
-
* lock (via withFileLock(this.indexFile, ...)). Uses atomicWrite for the
|
|
762
|
-
* rewrite so the temp file gets a random suffix (no collision between two
|
|
763
|
-
* compactions) and the Windows transient-EPERM rename retry.
|
|
764
|
-
*/
|
|
765
|
-
private compactIndexInner;
|
|
766
|
-
/**
|
|
767
|
-
* Read the index file and return deduplicated session summaries.
|
|
768
|
-
* Entries with a matching tombstone are filtered out.
|
|
769
|
-
* Returns empty array when the index doesn't exist or is corrupt.
|
|
770
|
-
*/
|
|
771
|
-
private readIndex;
|
|
772
|
-
/**
|
|
773
|
-
* Rebuild the index from disk by scanning all sessions and writing a
|
|
774
|
-
* fresh _index.jsonl. Useful after manual cleanup or index corruption.
|
|
775
|
-
*/
|
|
776
|
-
rebuildIndex(): Promise<number>;
|
|
777
|
-
private listFromDirectoryScan;
|
|
778
|
-
private collectShardKeys;
|
|
779
|
-
private readOrBuildShardManifest;
|
|
780
|
-
private collectSessionFilesInShard;
|
|
781
|
-
private collectSessionFiles;
|
|
782
|
-
/** Recursively collect session IDs from date-shard subdirectories.
|
|
783
|
-
* IDs include the date-prefix path (e.g. "2026-06-06/17-46-57Z_…").
|
|
784
|
-
* Skips `.jsonl`/`.summary.json` root files, dot-files, and
|
|
785
|
-
* sub-directories that belong to fleet/subagent sessions. */
|
|
786
|
-
private collectSessionIds;
|
|
787
|
-
private summaryFor;
|
|
788
|
-
private readSummaryManifest;
|
|
789
|
-
private summaryHeaderFor;
|
|
790
|
-
/**
|
|
791
|
-
* Delete a session and all associated files: JSONL, summary, plan/todos
|
|
792
|
-
* sidecars, and the session directory (fleet.json, shared/, subagents/).
|
|
793
|
-
*
|
|
794
|
-
* Individual file deletions are best-effort (logged as structured warnings),
|
|
795
|
-
* but a tombstone is always written so readIndex() filters this session out.
|
|
796
|
-
* If the session directory itself can't be removed, the error is surfaced
|
|
797
|
-
* to the caller so prune() can report it.
|
|
798
|
-
*/
|
|
799
|
-
private deleteSession;
|
|
800
|
-
/**
|
|
801
|
-
* Read the session id currently marked active in `active.json`, or `null`
|
|
802
|
-
* when the lock is absent/unreadable. Shared by {@link delete} and
|
|
803
|
-
* {@link prune} to avoid clobbering a session a live process is writing to.
|
|
804
|
-
*/
|
|
805
|
-
private readActiveSessionId;
|
|
806
|
-
delete(id: string): Promise<void>;
|
|
807
|
-
rename(id: string, name: string): Promise<SessionSummary>;
|
|
808
|
-
prune(maxAgeDays?: number): Promise<number>;
|
|
809
|
-
clearHistory(id: string): Promise<void>;
|
|
810
|
-
private summarize;
|
|
811
|
-
private iterSessionEvents;
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
/**
|
|
815
|
-
* On-disk checkpoint for `ctx.todos`. Written atomically every time the
|
|
816
|
-
* todo list changes, read once on session resume. This is the missing
|
|
817
|
-
* piece that lets `wstack resume <id>` rehydrate where the previous run
|
|
818
|
-
* stopped instead of starting with an empty board.
|
|
819
|
-
*
|
|
820
|
-
* Schema is intentionally small — a single JSON object so a future
|
|
821
|
-
* format bump is easy. The `version` field is the only contract; the
|
|
822
|
-
* shape under `todos` mirrors `TodoItem` so reading is a straight assign.
|
|
823
|
-
*/
|
|
824
|
-
interface TodosCheckpointFile {
|
|
825
|
-
version: 1;
|
|
826
|
-
sessionId: string;
|
|
827
|
-
updatedAt: string;
|
|
828
|
-
todos: TodoItem[];
|
|
829
|
-
}
|
|
830
|
-
type TodosCheckpointDetach = () => Promise<void>;
|
|
831
|
-
/** Read a checkpoint from disk. Returns null when the file doesn't
|
|
832
|
-
* exist or is corrupt — callers treat both cases as "no prior state".
|
|
833
|
-
*/
|
|
834
|
-
declare function loadTodosCheckpoint(filePath: string, events?: EventBus, traceId?: string): Promise<TodoItem[] | null>;
|
|
835
|
-
/** Write the checkpoint atomically. Best-effort: a write failure is
|
|
836
|
-
* logged but does not throw — losing one checkpoint shouldn't bring
|
|
837
|
-
* down the agent run.
|
|
838
|
-
*/
|
|
839
|
-
declare function saveTodosCheckpoint(filePath: string, sessionId: string, todos: readonly TodoItem[], events?: EventBus, traceId?: string): Promise<void>;
|
|
840
|
-
/**
|
|
841
|
-
* Subscribe a `ConversationState` so every `todos_replaced` mutation
|
|
842
|
-
* triggers an atomic write to disk. Returns the unsubscribe function.
|
|
843
|
-
*
|
|
844
|
-
* Writes are debounced by 150ms so a flurry of edits (e.g. the LLM
|
|
845
|
-
* marking three items done in the same tool call) coalesces into one
|
|
846
|
-
* disk hit.
|
|
847
|
-
*/
|
|
848
|
-
declare function attachTodosCheckpoint(state: ConversationState, filePath: string, sessionId: string, events?: EventBus, traceId?: string): TodosCheckpointDetach;
|
|
849
|
-
|
|
850
|
-
export { type AbandonedSession as A, getPlanTemplate as B, type ConfigLoaderOptions as C, DEFAULT_CONFIG_MIGRATIONS as D, listPlanTemplates as E, FileMemoryBackend as F, loadPlan as G, loadTodosCheckpoint as H, mutatePlan as I, parseEntries as J, removePlanItem as K, runConfigMigrations as L, type MemoryBackend as M, savePlan as N, saveTodosCheckpoint as O, type PersistedQueueItem as P, QueueStore as Q, RecoveryLock as R, SessionAnalyzer as S, type TodosCheckpointFile as T, setPlanItemStatus as U, type AttachmentStoreOptions as a, type ConfigMigration as b, ConfigMigrationError as c, type ConfigSource as d, DefaultAttachmentStore as e, DefaultConfigLoader as f, DefaultConfigStore as g, DefaultMemoryStore as h, DefaultSessionStore as i, type FileMemoryBackendOptions as j, type MemoryStoreOptions as k, type MigrationContext as l, type MigrationResult as m, type PlanFile as n, type PlanItem as o, type PlanTemplate as p, type RecoveryLockOptions as q, type SessionStoreOptions as r, addPlanItem as s, attachPlanCheckpoint as t, attachTodosCheckpoint as u, clearPlan as v, deriveTodosFromPlanItem as w, emptyPlan as x, formatPlan as y, formatPlanTemplates as z };
|