@wrongstack/core 0.284.0 → 0.285.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-status-tracker.d.ts +74 -0
- package/dist/agent-status-tracker.d.ts.map +1 -0
- package/dist/autophase/auto-phase-planner.d.ts +79 -0
- package/dist/autophase/auto-phase-planner.d.ts.map +1 -0
- package/dist/autophase/auto-phase-runner.d.ts +79 -0
- package/dist/autophase/auto-phase-runner.d.ts.map +1 -0
- package/dist/autophase/checkpoint.d.ts +49 -0
- package/dist/autophase/checkpoint.d.ts.map +1 -0
- package/dist/autophase/index.d.ts +9 -0
- package/dist/autophase/index.d.ts.map +1 -0
- package/dist/autophase/phase-graph-builder.d.ts +46 -0
- package/dist/autophase/phase-graph-builder.d.ts.map +1 -0
- package/dist/autophase/phase-orchestrator.d.ts +150 -0
- package/dist/autophase/phase-orchestrator.d.ts.map +1 -0
- package/dist/autophase/phase-store.d.ts +29 -0
- package/dist/autophase/phase-store.d.ts.map +1 -0
- package/dist/autophase/types.d.ts +329 -0
- package/dist/autophase/types.d.ts.map +1 -0
- package/dist/boot.d.ts +73 -0
- package/dist/boot.d.ts.map +1 -0
- package/dist/coordination/adaptive-concurrency.d.ts +63 -0
- package/dist/coordination/adaptive-concurrency.d.ts.map +1 -0
- package/dist/coordination/agent-bridge.d.ts +24 -0
- package/dist/coordination/agent-bridge.d.ts.map +1 -0
- package/dist/coordination/agent-monitor.d.ts +100 -0
- package/dist/coordination/agent-monitor.d.ts.map +1 -0
- package/dist/coordination/agent-subagent-runner.d.ts +74 -0
- package/dist/coordination/agent-subagent-runner.d.ts.map +1 -0
- package/dist/coordination/agents/agent-prompts.d.ts +2 -0
- package/dist/coordination/agents/agent-prompts.d.ts.map +1 -0
- package/dist/coordination/agents/index.d.ts +35 -0
- package/dist/coordination/agents/index.d.ts.map +1 -0
- package/dist/coordination/agents/phase1-discovery.d.ts +4 -0
- package/dist/coordination/agents/phase1-discovery.d.ts.map +1 -0
- package/dist/coordination/agents/phase2-planning.d.ts +4 -0
- package/dist/coordination/agents/phase2-planning.d.ts.map +1 -0
- package/dist/coordination/agents/phase3-build.d.ts +4 -0
- package/dist/coordination/agents/phase3-build.d.ts.map +1 -0
- package/dist/coordination/agents/phase3-techstack.d.ts +13 -0
- package/dist/coordination/agents/phase3-techstack.d.ts.map +1 -0
- package/dist/coordination/agents/phase4-verify.d.ts +4 -0
- package/dist/coordination/agents/phase4-verify.d.ts.map +1 -0
- package/dist/coordination/agents/phase5-review.d.ts +4 -0
- package/dist/coordination/agents/phase5-review.d.ts.map +1 -0
- package/dist/coordination/agents/phase6-domain.d.ts +4 -0
- package/dist/coordination/agents/phase6-domain.d.ts.map +1 -0
- package/dist/coordination/agents/phase7-knowledge.d.ts +4 -0
- package/dist/coordination/agents/phase7-knowledge.d.ts.map +1 -0
- package/dist/coordination/agents/phase8-delivery.d.ts +4 -0
- package/dist/coordination/agents/phase8-delivery.d.ts.map +1 -0
- package/dist/coordination/agents/phase9-meta.d.ts +4 -0
- package/dist/coordination/agents/phase9-meta.d.ts.map +1 -0
- package/dist/coordination/agents/types.d.ts +79 -0
- package/dist/coordination/agents/types.d.ts.map +1 -0
- package/dist/coordination/agents.d.ts +8 -0
- package/dist/coordination/agents.d.ts.map +1 -0
- package/dist/coordination/auto-extend.d.ts +46 -0
- package/dist/coordination/auto-extend.d.ts.map +1 -0
- package/dist/coordination/autonomous-brain.d.ts +154 -0
- package/dist/coordination/autonomous-brain.d.ts.map +1 -0
- package/dist/coordination/autonomous-coordinator.d.ts +239 -0
- package/dist/coordination/autonomous-coordinator.d.ts.map +1 -0
- package/dist/coordination/brain-monitor.d.ts +74 -0
- package/dist/coordination/brain-monitor.d.ts.map +1 -0
- package/dist/coordination/brain.d.ts +104 -0
- package/dist/coordination/brain.d.ts.map +1 -0
- package/dist/coordination/change-manager.d.ts +151 -0
- package/dist/coordination/change-manager.d.ts.map +1 -0
- package/dist/coordination/checkpoint-wiring.d.ts +61 -0
- package/dist/coordination/checkpoint-wiring.d.ts.map +1 -0
- package/dist/coordination/collab-bus.d.ts +132 -0
- package/dist/coordination/collab-bus.d.ts.map +1 -0
- package/dist/coordination/collab-debug.d.ts +302 -0
- package/dist/coordination/collab-debug.d.ts.map +1 -0
- package/dist/coordination/commit-safety.d.ts +72 -0
- package/dist/coordination/commit-safety.d.ts.map +1 -0
- package/dist/coordination/consensus-protocol.d.ts +106 -0
- package/dist/coordination/consensus-protocol.d.ts.map +1 -0
- package/dist/coordination/coordinator/error-classifier.d.ts +15 -0
- package/dist/coordination/coordinator/error-classifier.d.ts.map +1 -0
- package/dist/coordination/delegate-tool.d.ts +101 -0
- package/dist/coordination/delegate-tool.d.ts.map +1 -0
- package/dist/coordination/dep-watcher-bridge.d.ts +47 -0
- package/dist/coordination/dep-watcher-bridge.d.ts.map +1 -0
- package/dist/coordination/dep-watcher.d.ts +74 -0
- package/dist/coordination/dep-watcher.d.ts.map +1 -0
- package/dist/coordination/director/director-errors.d.ts +29 -0
- package/dist/coordination/director/director-errors.d.ts.map +1 -0
- package/dist/coordination/director-construction.d.ts +90 -0
- package/dist/coordination/director-construction.d.ts.map +1 -0
- package/dist/coordination/director-prompts.d.ts +119 -0
- package/dist/coordination/director-prompts.d.ts.map +1 -0
- package/dist/coordination/director-session.d.ts +68 -0
- package/dist/coordination/director-session.d.ts.map +1 -0
- package/dist/coordination/director-tools.d.ts +65 -0
- package/dist/coordination/director-tools.d.ts.map +1 -0
- package/dist/coordination/director.d.ts +802 -0
- package/dist/coordination/director.d.ts.map +1 -0
- package/dist/coordination/dispatcher.d.ts +82 -0
- package/dist/coordination/dispatcher.d.ts.map +1 -0
- package/dist/coordination/file-author-tracker.d.ts +76 -0
- package/dist/coordination/file-author-tracker.d.ts.map +1 -0
- package/dist/coordination/fleet-bus.d.ts +122 -0
- package/dist/coordination/fleet-bus.d.ts.map +1 -0
- package/dist/coordination/fleet-event-validation.d.ts +10 -0
- package/dist/coordination/fleet-event-validation.d.ts.map +1 -0
- package/dist/coordination/fleet-manager.d.ts +234 -0
- package/dist/coordination/fleet-manager.d.ts.map +1 -0
- package/dist/coordination/fleet-spawn.d.ts +102 -0
- package/dist/coordination/fleet-spawn.d.ts.map +1 -0
- package/dist/coordination/fleet-status-tool.d.ts +36 -0
- package/dist/coordination/fleet-status-tool.d.ts.map +1 -0
- package/dist/coordination/fleet-supervisor.d.ts +157 -0
- package/dist/coordination/fleet-supervisor.d.ts.map +1 -0
- package/dist/coordination/fleet.d.ts +96 -0
- package/dist/coordination/fleet.d.ts.map +1 -0
- package/dist/coordination/global-mailbox.d.ts +234 -0
- package/dist/coordination/global-mailbox.d.ts.map +1 -0
- package/dist/coordination/icoordinator.d.ts +97 -0
- package/dist/coordination/icoordinator.d.ts.map +1 -0
- package/dist/coordination/ifleet-manager.d.ts +177 -0
- package/dist/coordination/ifleet-manager.d.ts.map +1 -0
- package/dist/coordination/in-memory-transport.d.ts +12 -0
- package/dist/coordination/in-memory-transport.d.ts.map +1 -0
- package/dist/coordination/index.d.ts +78 -2587
- package/dist/coordination/index.d.ts.map +1 -0
- package/dist/coordination/index.js +739 -254
- package/dist/coordination/index.js.map +7 -1
- package/dist/coordination/knowledge-graph.d.ts +217 -0
- package/dist/coordination/knowledge-graph.d.ts.map +1 -0
- package/dist/coordination/large-answer-store.d.ts +61 -0
- package/dist/coordination/large-answer-store.d.ts.map +1 -0
- package/dist/coordination/mail-tools.d.ts +34 -0
- package/dist/coordination/mail-tools.d.ts.map +1 -0
- package/dist/coordination/mailbox-actions.d.ts +68 -0
- package/dist/coordination/mailbox-actions.d.ts.map +1 -0
- package/dist/coordination/mailbox-health.d.ts +131 -0
- package/dist/coordination/mailbox-health.d.ts.map +1 -0
- package/dist/coordination/mailbox-hooks.d.ts +55 -0
- package/dist/coordination/mailbox-hooks.d.ts.map +1 -0
- package/dist/coordination/mailbox-tool.d.ts +75 -0
- package/dist/coordination/mailbox-tool.d.ts.map +1 -0
- package/dist/{mailbox-types-BGZWrYTJ.d.ts → coordination/mailbox-types.d.ts} +37 -22
- package/dist/coordination/mailbox-types.d.ts.map +1 -0
- package/dist/coordination/mailbox.d.ts +69 -0
- package/dist/coordination/mailbox.d.ts.map +1 -0
- package/dist/coordination/model-matrix.d.ts +98 -0
- package/dist/coordination/model-matrix.d.ts.map +1 -0
- package/dist/coordination/multi-agent-coordinator.d.ts +202 -0
- package/dist/coordination/multi-agent-coordinator.d.ts.map +1 -0
- package/dist/coordination/null-fleet-bus.d.ts +10 -0
- package/dist/coordination/null-fleet-bus.d.ts.map +1 -0
- package/dist/coordination/package-author-tracker.d.ts +87 -0
- package/dist/coordination/package-author-tracker.d.ts.map +1 -0
- package/dist/coordination/package-outdated-watcher.d.ts +83 -0
- package/dist/coordination/package-outdated-watcher.d.ts.map +1 -0
- package/dist/coordination/single-instance-mailbox.d.ts +154 -0
- package/dist/coordination/single-instance-mailbox.d.ts.map +1 -0
- package/dist/coordination/spawn-budget.d.ts +6 -0
- package/dist/coordination/spawn-budget.d.ts.map +1 -0
- package/dist/coordination/subagent-budget.d.ts +323 -0
- package/dist/coordination/subagent-budget.d.ts.map +1 -0
- package/dist/coordination/subagent-nicknames.d.ts +42 -0
- package/dist/coordination/subagent-nicknames.d.ts.map +1 -0
- package/dist/coordination/subagent-result-tool.d.ts +20 -0
- package/dist/coordination/subagent-result-tool.d.ts.map +1 -0
- package/dist/coordination/task-auctioneer.d.ts +143 -0
- package/dist/coordination/task-auctioneer.d.ts.map +1 -0
- package/dist/coordination/task-dag.d.ts +147 -0
- package/dist/coordination/task-dag.d.ts.map +1 -0
- package/dist/coordination/techstack-mailbox-consumer.d.ts +50 -0
- package/dist/coordination/techstack-mailbox-consumer.d.ts.map +1 -0
- package/dist/coordination/transport.d.ts +2 -0
- package/dist/coordination/transport.d.ts.map +1 -0
- package/dist/coordination/worktree-task-runner.d.ts +45 -0
- package/dist/coordination/worktree-task-runner.d.ts.map +1 -0
- package/dist/core/agent-internals.d.ts +41 -0
- package/dist/core/agent-internals.d.ts.map +1 -0
- package/dist/core/agent-loop.d.ts +18 -0
- package/dist/core/agent-loop.d.ts.map +1 -0
- package/dist/core/agent-response.d.ts +21 -0
- package/dist/core/agent-response.d.ts.map +1 -0
- package/dist/core/agent-tools.d.ts +21 -0
- package/dist/core/agent-tools.d.ts.map +1 -0
- package/dist/core/agent-types.d.ts +95 -0
- package/dist/core/agent-types.d.ts.map +1 -0
- package/dist/core/agent.d.ts +54 -0
- package/dist/core/agent.d.ts.map +1 -0
- package/dist/core/btw.d.ts +40 -0
- package/dist/core/btw.d.ts.map +1 -0
- package/dist/core/context.d.ts +269 -0
- package/dist/core/context.d.ts.map +1 -0
- package/dist/core/continue-intent.d.ts +92 -0
- package/dist/core/continue-intent.d.ts.map +1 -0
- package/dist/core/continue-to-next-iteration.d.ts +96 -0
- package/dist/core/continue-to-next-iteration.d.ts.map +1 -0
- package/dist/core/conversation-state.d.ts +96 -0
- package/dist/core/conversation-state.d.ts.map +1 -0
- package/dist/core/fallback-model.d.ts +94 -0
- package/dist/core/fallback-model.d.ts.map +1 -0
- package/dist/core/fleet-pulse.d.ts +42 -0
- package/dist/core/fleet-pulse.d.ts.map +1 -0
- package/dist/core/input-builder.d.ts +95 -0
- package/dist/core/input-builder.d.ts.map +1 -0
- package/dist/core/instruction-bundle.d.ts +22 -0
- package/dist/core/instruction-bundle.d.ts.map +1 -0
- package/dist/core/iteration-limit.d.ts +35 -0
- package/dist/core/iteration-limit.d.ts.map +1 -0
- package/dist/core/mailbox-loop.d.ts +63 -0
- package/dist/core/mailbox-loop.d.ts.map +1 -0
- package/dist/core/modes/brief.d.ts +2 -0
- package/dist/core/modes/brief.d.ts.map +1 -0
- package/dist/core/modes/default.d.ts +8 -0
- package/dist/core/modes/default.d.ts.map +1 -0
- package/dist/core/modes/teach.d.ts +2 -0
- package/dist/core/modes/teach.d.ts.map +1 -0
- package/dist/core/provider-runner.d.ts +24 -0
- package/dist/core/provider-runner.d.ts.map +1 -0
- package/dist/core/queued-messages.d.ts +55 -0
- package/dist/core/queued-messages.d.ts.map +1 -0
- package/dist/core/run-env.d.ts +49 -0
- package/dist/core/run-env.d.ts.map +1 -0
- package/dist/core/streaming-response-builder.d.ts +78 -0
- package/dist/core/streaming-response-builder.d.ts.map +1 -0
- package/dist/core/system-prompt-builder.d.ts +213 -0
- package/dist/core/system-prompt-builder.d.ts.map +1 -0
- package/dist/defaults/index.d.ts +68 -158
- package/dist/defaults/index.d.ts.map +1 -0
- package/dist/defaults/index.js +1257 -819
- package/dist/defaults/index.js.map +7 -1
- package/dist/execution/auto-compaction-middleware.d.ts +123 -0
- package/dist/execution/auto-compaction-middleware.d.ts.map +1 -0
- package/dist/execution/autonomous-runner.d.ts +55 -0
- package/dist/execution/autonomous-runner.d.ts.map +1 -0
- package/dist/execution/autonomy-brain.d.ts +90 -0
- package/dist/execution/autonomy-brain.d.ts.map +1 -0
- package/dist/execution/autonomy-prompt-contributor.d.ts +39 -0
- package/dist/execution/autonomy-prompt-contributor.d.ts.map +1 -0
- package/dist/execution/compaction-core.d.ts +103 -0
- package/dist/execution/compaction-core.d.ts.map +1 -0
- package/dist/execution/compactor.d.ts +56 -0
- package/dist/execution/compactor.d.ts.map +1 -0
- package/dist/execution/design-color.d.ts +31 -0
- package/dist/execution/design-color.d.ts.map +1 -0
- package/dist/execution/design-detect.d.ts +96 -0
- package/dist/execution/design-detect.d.ts.map +1 -0
- package/dist/execution/design-kit-loader.d.ts +53 -0
- package/dist/execution/design-kit-loader.d.ts.map +1 -0
- package/dist/execution/design-materialize.d.ts +32 -0
- package/dist/execution/design-materialize.d.ts.map +1 -0
- package/dist/execution/design-project-store.d.ts +57 -0
- package/dist/execution/design-project-store.d.ts.map +1 -0
- package/dist/execution/design-verify.d.ts +44 -0
- package/dist/execution/design-verify.d.ts.map +1 -0
- package/dist/execution/error-handler.d.ts +34 -0
- package/dist/execution/error-handler.d.ts.map +1 -0
- package/dist/{parallel-eternal-engine-HUrtePLd.d.ts → execution/eternal-autonomy.d.ts} +10 -225
- package/dist/execution/eternal-autonomy.d.ts.map +1 -0
- package/dist/execution/goal-preamble.d.ts +2 -0
- package/dist/execution/goal-preamble.d.ts.map +1 -0
- package/dist/execution/index.d.ts +21 -180
- package/dist/execution/index.d.ts.map +1 -0
- package/dist/execution/index.js +465 -180
- package/dist/execution/index.js.map +7 -1
- package/dist/execution/intelligent-compactor.d.ts +85 -0
- package/dist/execution/intelligent-compactor.d.ts.map +1 -0
- package/dist/execution/model-runtime.d.ts +75 -0
- package/dist/execution/model-runtime.d.ts.map +1 -0
- package/dist/execution/parallel-eternal-engine.d.ts +130 -0
- package/dist/execution/parallel-eternal-engine.d.ts.map +1 -0
- package/dist/execution/prompt-enhancer.d.ts +12 -13
- package/dist/execution/prompt-enhancer.d.ts.map +1 -0
- package/dist/execution/prompt-enhancer.js +13 -7
- package/dist/execution/prompt-enhancer.js.map +7 -1
- package/dist/execution/prompt-loader.d.ts +52 -0
- package/dist/execution/prompt-loader.d.ts.map +1 -0
- package/dist/execution/provider-runner-impl.d.ts +14 -0
- package/dist/execution/provider-runner-impl.d.ts.map +1 -0
- package/dist/execution/regex-patterns.d.ts +7 -0
- package/dist/execution/regex-patterns.d.ts.map +1 -0
- package/dist/execution/retry-policy.d.ts +35 -0
- package/dist/execution/retry-policy.d.ts.map +1 -0
- package/dist/execution/selective-compactor.d.ts +94 -0
- package/dist/execution/selective-compactor.d.ts.map +1 -0
- package/dist/execution/skill-loader.d.ts +43 -0
- package/dist/execution/skill-loader.d.ts.map +1 -0
- package/dist/execution/strategy-compactor.d.ts +43 -0
- package/dist/execution/strategy-compactor.d.ts.map +1 -0
- package/dist/execution/tool-executor.d.ts +112 -0
- package/dist/execution/tool-executor.d.ts.map +1 -0
- package/dist/extension/extension-points.d.ts +121 -0
- package/dist/extension/extension-points.d.ts.map +1 -0
- package/dist/extension/index.d.ts +3 -10
- package/dist/extension/index.d.ts.map +1 -0
- package/dist/extension/index.js +59 -5
- package/dist/extension/index.js.map +7 -1
- package/dist/extension/registry.d.ts +86 -0
- package/dist/extension/registry.d.ts.map +1 -0
- package/dist/fleet-notifier.d.ts +28 -0
- package/dist/fleet-notifier.d.ts.map +1 -0
- package/dist/hooks/http-executor.d.ts +11 -0
- package/dist/hooks/http-executor.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/registry.d.ts +71 -0
- package/dist/hooks/registry.d.ts.map +1 -0
- package/dist/hooks/runner.d.ts +65 -0
- package/dist/hooks/runner.d.ts.map +1 -0
- package/dist/hooks/shell-executor.d.ts +33 -0
- package/dist/hooks/shell-executor.d.ts.map +1 -0
- package/dist/hooks/shell-hooks-equal.d.ts +15 -0
- package/dist/hooks/shell-hooks-equal.d.ts.map +1 -0
- package/dist/hq/agent-bridge.d.ts +27 -0
- package/dist/hq/agent-bridge.d.ts.map +1 -0
- package/dist/hq/alerts.d.ts +67 -0
- package/dist/hq/alerts.d.ts.map +1 -0
- package/dist/hq/auth-store.d.ts +161 -0
- package/dist/hq/auth-store.d.ts.map +1 -0
- package/dist/hq/brain-bridge.d.ts +37 -0
- package/dist/hq/brain-bridge.d.ts.map +1 -0
- package/dist/hq/commands.d.ts +122 -0
- package/dist/hq/commands.d.ts.map +1 -0
- package/dist/hq/cost-bridge.d.ts +36 -0
- package/dist/hq/cost-bridge.d.ts.map +1 -0
- package/dist/hq/factory.d.ts +66 -0
- package/dist/hq/factory.d.ts.map +1 -0
- package/dist/hq/fleet-bridge.d.ts +39 -0
- package/dist/hq/fleet-bridge.d.ts.map +1 -0
- package/dist/hq/index.d.ts +18 -816
- package/dist/hq/index.d.ts.map +1 -0
- package/dist/hq/index.js +417 -122
- package/dist/hq/index.js.map +7 -1
- package/dist/hq/mailbox-mapper.d.ts +27 -0
- package/dist/hq/mailbox-mapper.d.ts.map +1 -0
- package/dist/hq/persistence.d.ts +121 -0
- package/dist/hq/persistence.d.ts.map +1 -0
- package/dist/hq/protocol.d.ts +560 -0
- package/dist/hq/protocol.d.ts.map +1 -0
- package/dist/hq/publisher.d.ts +177 -0
- package/dist/hq/publisher.d.ts.map +1 -0
- package/dist/hq/redaction.d.ts +30 -0
- package/dist/hq/redaction.d.ts.map +1 -0
- package/dist/hq/session-bridge.d.ts +29 -0
- package/dist/hq/session-bridge.d.ts.map +1 -0
- package/dist/hq/tool-bridge.d.ts +41 -0
- package/dist/hq/tool-bridge.d.ts.map +1 -0
- package/dist/hq/transcript-mapper.d.ts +36 -0
- package/dist/hq/transcript-mapper.d.ts.map +1 -0
- package/dist/hq/worktree-bridge.d.ts +34 -0
- package/dist/hq/worktree-bridge.d.ts.map +1 -0
- package/dist/index.d.ts +108 -2872
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2724 -1344
- package/dist/index.js.map +7 -1
- package/dist/infrastructure/context-manager.d.ts +92 -0
- package/dist/infrastructure/context-manager.d.ts.map +1 -0
- package/dist/infrastructure/index.d.ts +6 -64
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/infrastructure/index.js +39 -12
- package/dist/infrastructure/index.js.map +7 -1
- package/dist/infrastructure/logger.d.ts +99 -0
- package/dist/infrastructure/logger.d.ts.map +1 -0
- package/dist/infrastructure/mcp-servers.d.ts +83 -0
- package/dist/infrastructure/mcp-servers.d.ts.map +1 -0
- package/dist/{path-resolver-CMS5307d.d.ts → infrastructure/path-resolver.d.ts} +3 -5
- package/dist/infrastructure/path-resolver.d.ts.map +1 -0
- package/dist/infrastructure/token-counter.d.ts +57 -0
- package/dist/infrastructure/token-counter.d.ts.map +1 -0
- package/dist/kernel/container.d.ts +84 -0
- package/dist/kernel/container.d.ts.map +1 -0
- package/dist/{events-Bgnh43r9.d.ts → kernel/events.d.ts} +112 -206
- package/dist/kernel/events.d.ts.map +1 -0
- package/dist/kernel/index.d.ts +6 -107
- package/dist/kernel/index.d.ts.map +1 -0
- package/dist/kernel/index.js +56 -4
- package/dist/kernel/index.js.map +7 -1
- package/dist/kernel/pipeline.d.ts +105 -0
- package/dist/kernel/pipeline.d.ts.map +1 -0
- package/dist/kernel/run-controller.d.ts +55 -0
- package/dist/kernel/run-controller.d.ts.map +1 -0
- package/dist/kernel/tokens.d.ts +53 -0
- package/dist/kernel/tokens.d.ts.map +1 -0
- package/dist/mailbox-attach.d.ts +27 -0
- package/dist/mailbox-attach.d.ts.map +1 -0
- package/dist/middleware/collab-pause.d.ts +73 -0
- package/dist/middleware/collab-pause.d.ts.map +1 -0
- package/dist/models/codex-catalog.d.ts +41 -0
- package/dist/models/codex-catalog.d.ts.map +1 -0
- package/dist/models/index.d.ts +8 -163
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +150 -51
- package/dist/models/index.js.map +7 -1
- package/dist/models/llm-selector.d.ts +47 -0
- package/dist/models/llm-selector.d.ts.map +1 -0
- package/dist/models/mode-store.d.ts +22 -0
- package/dist/models/mode-store.d.ts.map +1 -0
- package/dist/models/model-intelligence.d.ts +56 -0
- package/dist/models/model-intelligence.d.ts.map +1 -0
- package/dist/models/model-router.d.ts +100 -0
- package/dist/models/model-router.d.ts.map +1 -0
- package/dist/models/models-registry.d.ts +106 -0
- package/dist/models/models-registry.d.ts.map +1 -0
- package/dist/models/provider-model-resolve.d.ts +69 -0
- package/dist/models/provider-model-resolve.d.ts.map +1 -0
- package/dist/observability/event-bridge.d.ts +10 -0
- package/dist/observability/event-bridge.d.ts.map +1 -0
- package/dist/observability/health.d.ts +18 -0
- package/dist/observability/health.d.ts.map +1 -0
- package/dist/observability/index.d.ts +9 -354
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +21 -8
- package/dist/observability/index.js.map +7 -1
- package/dist/observability/metrics.d.ts +26 -0
- package/dist/observability/metrics.d.ts.map +1 -0
- package/dist/observability/otel-tracer.d.ts +41 -0
- package/dist/observability/otel-tracer.d.ts.map +1 -0
- package/dist/observability/otlp-metrics.d.ts +111 -0
- package/dist/observability/otlp-metrics.d.ts.map +1 -0
- package/dist/observability/otlp-traces.d.ts +95 -0
- package/dist/observability/otlp-traces.d.ts.map +1 -0
- package/dist/observability/prometheus.d.ts +49 -0
- package/dist/observability/prometheus.d.ts.map +1 -0
- package/dist/observability/tracer.d.ts +9 -0
- package/dist/observability/tracer.d.ts.map +1 -0
- package/dist/plugin/api.d.ts +226 -0
- package/dist/plugin/api.d.ts.map +1 -0
- package/dist/plugin/loader.d.ts +73 -0
- package/dist/plugin/loader.d.ts.map +1 -0
- package/dist/plugins/chimera-plugin.d.ts +37 -0
- package/dist/plugins/chimera-plugin.d.ts.map +1 -0
- package/dist/plugins/git-plugin.d.ts +15 -0
- package/dist/plugins/git-plugin.d.ts.map +1 -0
- package/dist/plugins/observability-plugin.d.ts +19 -0
- package/dist/plugins/observability-plugin.d.ts.map +1 -0
- package/dist/plugins/plan-plugin.d.ts +16 -0
- package/dist/plugins/plan-plugin.d.ts.map +1 -0
- package/dist/plugins/prompts-plugin.d.ts +26 -0
- package/dist/plugins/prompts-plugin.d.ts.map +1 -0
- package/dist/plugins/security-plugin.d.ts +19 -0
- package/dist/plugins/security-plugin.d.ts.map +1 -0
- package/dist/plugins/skills-plugin.d.ts +42 -0
- package/dist/plugins/skills-plugin.d.ts.map +1 -0
- package/dist/plugins/sync-plugin.d.ts +22 -0
- package/dist/plugins/sync-plugin.d.ts.map +1 -0
- package/dist/prompts/index.d.ts +3 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/prompt-installer.d.ts +50 -0
- package/dist/prompts/prompt-installer.d.ts.map +1 -0
- package/dist/prompts/prompt-manifest-store.d.ts +18 -0
- package/dist/prompts/prompt-manifest-store.d.ts.map +1 -0
- package/dist/registry/provider-registry.d.ts +51 -0
- package/dist/registry/provider-registry.d.ts.map +1 -0
- package/dist/registry/slash-command-registry.d.ts +61 -0
- package/dist/registry/slash-command-registry.d.ts.map +1 -0
- package/dist/registry/tool-registry.d.ts +154 -0
- package/dist/registry/tool-registry.d.ts.map +1 -0
- package/dist/replay/hash.d.ts +31 -0
- package/dist/replay/hash.d.ts.map +1 -0
- package/dist/replay/replay-provider-runner.d.ts +53 -0
- package/dist/replay/replay-provider-runner.d.ts.map +1 -0
- package/dist/{index-CbyuOE5y.d.ts → security/capabilities.d.ts} +31 -34
- package/dist/security/capabilities.d.ts.map +1 -0
- package/dist/security/config-secrets.d.ts +25 -0
- package/dist/security/config-secrets.d.ts.map +1 -0
- package/dist/security/index.d.ts +6 -8
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +102 -381
- package/dist/security/index.js.map +7 -1
- package/dist/security/permission-policy.d.ts +153 -0
- package/dist/security/permission-policy.d.ts.map +1 -0
- package/dist/security/secret-scrubber.d.ts +14 -0
- package/dist/security/secret-scrubber.d.ts.map +1 -0
- package/dist/security/secret-vault.d.ts +87 -0
- package/dist/security/secret-vault.d.ts.map +1 -0
- package/dist/security/yolo-risk.d.ts +11 -0
- package/dist/security/yolo-risk.d.ts.map +1 -0
- package/dist/{session-registry-Dvg7i_IA.d.ts → session-registry.d.ts} +8 -9
- package/dist/session-registry.d.ts.map +1 -0
- package/dist/skills/foreign-sources.d.ts +59 -0
- package/dist/skills/foreign-sources.d.ts.map +1 -0
- package/dist/skills/frontmatter.d.ts +44 -0
- package/dist/skills/frontmatter.d.ts.map +1 -0
- package/dist/skills/github-fetcher.d.ts +38 -0
- package/dist/skills/github-fetcher.d.ts.map +1 -0
- package/dist/skills/index.d.ts +11 -582
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +81 -43
- package/dist/skills/index.js.map +7 -1
- package/dist/skills/limits.d.ts +92 -0
- package/dist/skills/limits.d.ts.map +1 -0
- package/dist/skills/manifest-store.d.ts +42 -0
- package/dist/skills/manifest-store.d.ts.map +1 -0
- package/dist/skills/registry/github-direct-adapter.d.ts +17 -0
- package/dist/skills/registry/github-direct-adapter.d.ts.map +1 -0
- package/dist/skills/registry/registry-adapter.d.ts +84 -0
- package/dist/skills/registry/registry-adapter.d.ts.map +1 -0
- package/dist/skills/registry/skills-sh-adapter.d.ts +13 -0
- package/dist/skills/registry/skills-sh-adapter.d.ts.map +1 -0
- package/dist/skills/skill-generator.d.ts +82 -0
- package/dist/skills/skill-generator.d.ts.map +1 -0
- package/dist/skills/skill-installer.d.ts +124 -0
- package/dist/skills/skill-installer.d.ts.map +1 -0
- package/dist/storage/annotations-store.d.ts +118 -0
- package/dist/storage/annotations-store.d.ts.map +1 -0
- package/dist/storage/attachment-store.d.ts +31 -0
- package/dist/storage/attachment-store.d.ts.map +1 -0
- package/dist/storage/cloud-sync.d.ts +44 -0
- package/dist/storage/cloud-sync.d.ts.map +1 -0
- package/dist/storage/completed-work-checkpoint.d.ts +11 -0
- package/dist/storage/completed-work-checkpoint.d.ts.map +1 -0
- package/dist/storage/config-loader.d.ts +104 -0
- package/dist/storage/config-loader.d.ts.map +1 -0
- package/dist/storage/config-migration.d.ts +87 -0
- package/dist/storage/config-migration.d.ts.map +1 -0
- package/dist/storage/config-store.d.ts +22 -0
- package/dist/storage/config-store.d.ts.map +1 -0
- package/dist/{director-state-CMS_bMs4.d.ts → storage/director-state.d.ts} +28 -8
- package/dist/storage/director-state.d.ts.map +1 -0
- package/dist/storage/file-session-writer.d.ts +169 -0
- package/dist/storage/file-session-writer.d.ts.map +1 -0
- package/dist/{goal-store-Datpp-ar.d.ts → storage/goal-store.d.ts} +26 -19
- package/dist/storage/goal-store.d.ts.map +1 -0
- package/dist/storage/index.d.ts +39 -1031
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +655 -300
- package/dist/storage/index.js.map +7 -1
- package/dist/storage/input-history-store.d.ts +56 -0
- package/dist/storage/input-history-store.d.ts.map +1 -0
- package/dist/storage/memory-backend.d.ts +66 -0
- package/dist/storage/memory-backend.d.ts.map +1 -0
- package/dist/storage/memory-consolidator.d.ts +50 -0
- package/dist/storage/memory-consolidator.d.ts.map +1 -0
- package/dist/storage/memory-graph-backend.d.ts +117 -0
- package/dist/storage/memory-graph-backend.d.ts.map +1 -0
- package/dist/storage/memory-store.d.ts +119 -0
- package/dist/storage/memory-store.d.ts.map +1 -0
- package/dist/storage/plan-store.d.ts +78 -0
- package/dist/storage/plan-store.d.ts.map +1 -0
- package/dist/storage/plan-templates.d.ts +21 -0
- package/dist/storage/plan-templates.d.ts.map +1 -0
- package/dist/storage/prompt-store.d.ts +37 -0
- package/dist/storage/prompt-store.d.ts.map +1 -0
- package/dist/storage/prompt-usage-store.d.ts +29 -0
- package/dist/storage/prompt-usage-store.d.ts.map +1 -0
- package/dist/storage/provider-config-watcher.d.ts +34 -0
- package/dist/storage/provider-config-watcher.d.ts.map +1 -0
- package/dist/storage/queue-store.d.ts +37 -0
- package/dist/storage/queue-store.d.ts.map +1 -0
- package/dist/storage/recovery-lock.d.ts +79 -0
- package/dist/storage/recovery-lock.d.ts.map +1 -0
- package/dist/storage/replay-log-store.d.ts +97 -0
- package/dist/storage/replay-log-store.d.ts.map +1 -0
- package/dist/storage/session-analyzer.d.ts +48 -0
- package/dist/storage/session-analyzer.d.ts.map +1 -0
- package/dist/storage/session-checkpoint-cas.d.ts +37 -0
- package/dist/storage/session-checkpoint-cas.d.ts.map +1 -0
- package/dist/{session-event-bridge-D_z_mBwk.d.ts → storage/session-event-bridge.d.ts} +14 -15
- package/dist/storage/session-event-bridge.d.ts.map +1 -0
- package/dist/storage/session-helpers.d.ts +9 -0
- package/dist/storage/session-helpers.d.ts.map +1 -0
- package/dist/storage/session-id.d.ts +18 -0
- package/dist/storage/session-id.d.ts.map +1 -0
- package/dist/storage/session-reader.d.ts +21 -0
- package/dist/storage/session-reader.d.ts.map +1 -0
- package/dist/storage/session-recovery.d.ts +93 -0
- package/dist/storage/session-recovery.d.ts.map +1 -0
- package/dist/storage/session-resume-validation.d.ts +6 -0
- package/dist/storage/session-resume-validation.d.ts.map +1 -0
- package/dist/storage/session-rewinder.d.ts +21 -0
- package/dist/storage/session-rewinder.d.ts.map +1 -0
- package/dist/storage/session-store.d.ts +210 -0
- package/dist/storage/session-store.d.ts.map +1 -0
- package/dist/storage/session-summary.d.ts +12 -0
- package/dist/storage/session-summary.d.ts.map +1 -0
- package/dist/storage/session-tool-call-ends.d.ts +5 -0
- package/dist/storage/session-tool-call-ends.d.ts.map +1 -0
- package/dist/storage/storage-concurrency.d.ts +2 -0
- package/dist/storage/storage-concurrency.d.ts.map +1 -0
- package/dist/storage/task-store.d.ts +33 -0
- package/dist/storage/task-store.d.ts.map +1 -0
- package/dist/storage/todos-checkpoint.d.ts +39 -0
- package/dist/storage/todos-checkpoint.d.ts.map +1 -0
- package/dist/storage/tool-audit-log.d.ts +141 -0
- package/dist/storage/tool-audit-log.d.ts.map +1 -0
- package/dist/tasking/index.d.ts +3 -124
- package/dist/tasking/index.d.ts.map +1 -0
- package/dist/tasking/index.js +57 -4
- package/dist/tasking/index.js.map +7 -1
- package/dist/tasking/task-store.d.ts +22 -0
- package/dist/tasking/task-store.d.ts.map +1 -0
- package/dist/tasking/task-tracker.d.ts +102 -0
- package/dist/tasking/task-tracker.d.ts.map +1 -0
- package/dist/tools/index.d.ts +2 -59
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +93 -14
- package/dist/tools/index.js.map +7 -1
- package/dist/tools/mcp-control.d.ts +53 -0
- package/dist/tools/mcp-control.d.ts.map +1 -0
- package/dist/tools/mcp-use.d.ts +24 -0
- package/dist/tools/mcp-use.d.ts.map +1 -0
- package/dist/types/agent-bridge.d.ts +42 -0
- package/dist/types/agent-bridge.d.ts.map +1 -0
- package/dist/types/attachment.d.ts +54 -0
- package/dist/types/attachment.d.ts.map +1 -0
- package/dist/types/autonomy.d.ts +5 -0
- package/dist/types/autonomy.d.ts.map +1 -0
- package/dist/types/blocks.d.ts +76 -0
- package/dist/types/blocks.d.ts.map +1 -0
- package/dist/{compactor-DQLL4HTo.d.ts → types/compactor.d.ts} +5 -7
- package/dist/types/compactor.d.ts.map +1 -0
- package/dist/{config-MRqn1V-u.d.ts → types/config.d.ts} +135 -354
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/context-evidence.d.ts +68 -0
- package/dist/types/context-evidence.d.ts.map +1 -0
- package/dist/types/context-window.d.ts +35 -0
- package/dist/types/context-window.d.ts.map +1 -0
- package/dist/{default-config-B79_gJYv.d.ts → types/default-config.d.ts} +10 -11
- package/dist/types/default-config.d.ts.map +1 -0
- package/dist/types/design-kit.d.ts +91 -0
- package/dist/types/design-kit.d.ts.map +1 -0
- package/dist/{retry-policy-CQ7KwXJa.d.ts → types/error-handler.d.ts} +5 -12
- package/dist/types/error-handler.d.ts.map +1 -0
- package/dist/types/errors.d.ts +277 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/hooks.d.ts +167 -0
- package/dist/types/hooks.d.ts.map +1 -0
- package/dist/types/index.d.ts +40 -244
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +90 -12
- package/dist/types/index.js.map +7 -1
- package/dist/{input-reader-E-ffP2ee.d.ts → types/input-reader.d.ts} +3 -4
- package/dist/types/input-reader.d.ts.map +1 -0
- package/dist/{logger-B63L5bTg.d.ts → types/logger.d.ts} +3 -4
- package/dist/types/logger.d.ts.map +1 -0
- package/dist/types/memory.d.ts +89 -0
- package/dist/types/memory.d.ts.map +1 -0
- package/dist/types/messages.d.ts +24 -0
- package/dist/types/messages.d.ts.map +1 -0
- package/dist/types/mode-prompts.d.ts +2 -0
- package/dist/types/mode-prompts.d.ts.map +1 -0
- package/dist/{mode-CZlO9iU1.d.ts → types/mode.d.ts} +6 -7
- package/dist/types/mode.d.ts.map +1 -0
- package/dist/types/models-registry.d.ts +105 -0
- package/dist/types/models-registry.d.ts.map +1 -0
- package/dist/types/multi-agent.d.ts +435 -0
- package/dist/types/multi-agent.d.ts.map +1 -0
- package/dist/{observability-D-HZN_mF.d.ts → types/observability.d.ts} +12 -13
- package/dist/types/observability.d.ts.map +1 -0
- package/dist/{path-resolver-CPRj4bFY.d.ts → types/path-resolver.d.ts} +2 -3
- package/dist/types/path-resolver.d.ts.map +1 -0
- package/dist/{permission-ByDKXEcG.d.ts → types/permission.d.ts} +8 -9
- package/dist/types/permission.d.ts.map +1 -0
- package/dist/types/plugin.d.ts +385 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/prompt-registry.d.ts +81 -0
- package/dist/types/prompt-registry.d.ts.map +1 -0
- package/dist/{prompt-DLd35n4Q.d.ts → types/prompt.d.ts} +14 -15
- package/dist/types/prompt.d.ts.map +1 -0
- package/dist/{provider-runner-ChL-kVg6.d.ts → types/provider-runner.d.ts} +9 -10
- package/dist/types/provider-runner.d.ts.map +1 -0
- package/dist/types/provider.d.ts +387 -0
- package/dist/types/provider.d.ts.map +1 -0
- package/dist/types/renderer.d.ts +23 -0
- package/dist/types/renderer.d.ts.map +1 -0
- package/dist/types/retry-policy.d.ts +7 -0
- package/dist/types/retry-policy.d.ts.map +1 -0
- package/dist/types/secret-scrubber.d.ts +5 -0
- package/dist/types/secret-scrubber.d.ts.map +1 -0
- package/dist/{secret-vault-BAKpgFw_.d.ts → types/secret-vault.d.ts} +13 -7
- package/dist/types/secret-vault.d.ts.map +1 -0
- package/dist/{selector-D8O6B_Rm.d.ts → types/selector.d.ts} +4 -6
- package/dist/types/selector.d.ts.map +1 -0
- package/dist/types/session-reader.d.ts +81 -0
- package/dist/types/session-reader.d.ts.map +1 -0
- package/dist/{session-rewinder-C9HnMkhP.d.ts → types/session-rewinder.d.ts} +5 -6
- package/dist/types/session-rewinder.d.ts.map +1 -0
- package/dist/types/session.d.ts +650 -0
- package/dist/types/session.d.ts.map +1 -0
- package/dist/types/side-effect.d.ts +34 -0
- package/dist/types/side-effect.d.ts.map +1 -0
- package/dist/{skill-DHniprNl.d.ts → types/skill.d.ts} +4 -5
- package/dist/types/skill.d.ts.map +1 -0
- package/dist/types/slash-command.d.ts +59 -0
- package/dist/types/slash-command.d.ts.map +1 -0
- package/dist/types/spec.d.ts +77 -0
- package/dist/types/spec.d.ts.map +1 -0
- package/dist/types/system-prompt-contributor.d.ts +20 -0
- package/dist/types/system-prompt-contributor.d.ts.map +1 -0
- package/dist/types/system-prompt.d.ts +51 -0
- package/dist/types/system-prompt.d.ts.map +1 -0
- package/dist/{task-graph-CH3acNQ7.d.ts → types/task-graph.d.ts} +21 -22
- package/dist/types/task-graph.d.ts.map +1 -0
- package/dist/types/token-counter.d.ts +42 -0
- package/dist/types/token-counter.d.ts.map +1 -0
- package/dist/types/tool-executor.d.ts +133 -0
- package/dist/types/tool-executor.d.ts.map +1 -0
- package/dist/types/tool-markers.d.ts +23 -0
- package/dist/types/tool-markers.d.ts.map +1 -0
- package/dist/types/tool.d.ts +245 -0
- package/dist/types/tool.d.ts.map +1 -0
- package/dist/types/utility-types.d.ts +31 -0
- package/dist/types/utility-types.d.ts.map +1 -0
- package/dist/utils/assert-never.d.ts +14 -0
- package/dist/utils/assert-never.d.ts.map +1 -0
- package/dist/utils/atomic-write.d.ts +12 -0
- package/dist/utils/atomic-write.d.ts.map +1 -0
- package/dist/utils/child-env.d.ts +67 -0
- package/dist/utils/child-env.d.ts.map +1 -0
- package/dist/utils/color.d.ts +20 -0
- package/dist/utils/color.d.ts.map +1 -0
- package/dist/utils/config-json.d.ts +14 -0
- package/dist/utils/config-json.d.ts.map +1 -0
- package/dist/utils/context-evidence.d.ts +47 -0
- package/dist/utils/context-evidence.d.ts.map +1 -0
- package/dist/utils/deep-merge.d.ts +64 -0
- package/dist/utils/deep-merge.d.ts.map +1 -0
- package/dist/utils/diff.d.ts +11 -0
- package/dist/utils/diff.d.ts.map +1 -0
- package/dist/utils/error.d.ts +2 -3
- package/dist/utils/error.d.ts.map +1 -0
- package/dist/utils/error.js +3 -3
- package/dist/utils/error.js.map +7 -1
- package/dist/utils/expect-defined.d.ts +2 -3
- package/dist/utils/expect-defined.d.ts.map +1 -0
- package/dist/utils/expect-defined.js +3 -3
- package/dist/utils/expect-defined.js.map +7 -1
- package/dist/utils/glob-expand.d.ts +10 -0
- package/dist/utils/glob-expand.d.ts.map +1 -0
- package/dist/utils/glob-match.d.ts +4 -0
- package/dist/utils/glob-match.d.ts.map +1 -0
- package/dist/utils/index.d.ts +37 -920
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +242 -33
- package/dist/utils/index.js.map +7 -1
- package/dist/utils/instruction-file.d.ts +3 -0
- package/dist/utils/instruction-file.d.ts.map +1 -0
- package/dist/utils/ip-guard.d.ts +34 -0
- package/dist/utils/ip-guard.d.ts.map +1 -0
- package/dist/utils/json-repair.d.ts +23 -0
- package/dist/utils/json-repair.d.ts.map +1 -0
- package/dist/utils/json-schema-validate.d.ts +42 -0
- package/dist/utils/json-schema-validate.d.ts.map +1 -0
- package/dist/utils/lru-cache.d.ts +29 -0
- package/dist/utils/lru-cache.d.ts.map +1 -0
- package/dist/utils/merge-custom-models.d.ts +12 -0
- package/dist/utils/merge-custom-models.d.ts.map +1 -0
- package/dist/utils/merge-models-payload.d.ts +20 -0
- package/dist/utils/merge-models-payload.d.ts.map +1 -0
- package/dist/utils/message-invariants.d.ts +22 -0
- package/dist/utils/message-invariants.d.ts.map +1 -0
- package/dist/utils/newline-normalize.d.ts +5 -0
- package/dist/utils/newline-normalize.d.ts.map +1 -0
- package/dist/utils/regex-guard.d.ts +21 -0
- package/dist/utils/regex-guard.d.ts.map +1 -0
- package/dist/utils/safe-json.d.ts +31 -0
- package/dist/utils/safe-json.d.ts.map +1 -0
- package/dist/utils/session-scoped-path.d.ts +13 -0
- package/dist/utils/session-scoped-path.d.ts.map +1 -0
- package/dist/utils/sleep.d.ts +5 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/slug.d.ts +13 -0
- package/dist/utils/slug.d.ts.map +1 -0
- package/dist/utils/string.d.ts +9 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/task-format.d.ts +22 -0
- package/dist/utils/task-format.d.ts.map +1 -0
- package/dist/utils/term.d.ts +133 -0
- package/dist/utils/term.d.ts.map +1 -0
- package/dist/utils/todos-format.d.ts +30 -0
- package/dist/utils/todos-format.d.ts.map +1 -0
- package/dist/utils/token-estimate.d.ts +112 -0
- package/dist/utils/token-estimate.d.ts.map +1 -0
- package/dist/utils/tool-description-mode.d.ts +28 -0
- package/dist/utils/tool-description-mode.d.ts.map +1 -0
- package/dist/utils/tool-output-serializer.d.ts +40 -0
- package/dist/utils/tool-output-serializer.d.ts.map +1 -0
- package/dist/utils/tool-result-render-mode.d.ts +55 -0
- package/dist/utils/tool-result-render-mode.d.ts.map +1 -0
- package/dist/utils/tool-subject.d.ts +5 -0
- package/dist/utils/tool-subject.d.ts.map +1 -0
- package/dist/utils/tool-wire-compact.d.ts +28 -0
- package/dist/utils/tool-wire-compact.d.ts.map +1 -0
- package/dist/utils/ulid.d.ts +11 -0
- package/dist/utils/ulid.d.ts.map +1 -0
- package/dist/{wstack-paths-C3K40Qst.d.ts → utils/wstack-paths.d.ts} +7 -8
- package/dist/utils/wstack-paths.d.ts.map +1 -0
- package/dist/worktree/index.d.ts +2 -0
- package/dist/worktree/index.d.ts.map +1 -0
- package/dist/{worktree-manager-DzwxKE35.d.ts → worktree/worktree-manager.d.ts} +19 -13
- package/dist/worktree/worktree-manager.d.ts.map +1 -0
- package/instructions/autonomy/active-mission.md +2 -4
- package/instructions/sections/tool/delegation-full.md +1 -1
- package/package.json +4 -5
- package/skills/node-modern/SKILL.md +2 -2
- package/skills/plugin-author/SKILL.md +9 -16
- package/dist/dispatcher-types.d-BBeXBQgS.d.ts +0 -66
- package/dist/global-mailbox-sZwyI6CS.d.ts +0 -959
- package/dist/index--Gm41aBJ.d.ts +0 -671
- package/dist/mcp-servers-DEV4s6Ks.d.ts +0 -259
- package/dist/multi-agent-coordinator-4RCRZKjN.d.ts +0 -1770
- package/dist/null-fleet-bus-CFoNVQEK.d.ts +0 -2127
- package/dist/pipeline-DGDyIohT.d.ts +0 -331
- package/dist/provider-model-resolve-o2hHLs79.d.ts +0 -263
- package/dist/secret-scrubber-3MHDDAtm.d.ts +0 -6
- package/dist/secret-vault-DxohkUBc.d.ts +0 -272
- package/dist/session-reader-7Esxrkpw.d.ts +0 -155
- package/dist/task-format-GX0B1mMC.d.ts +0 -23
- package/dist/todos-checkpoint-FY7PjmMx.d.ts +0 -850
- package/dist/tool-BNlnIJvo.d.ts +0 -2190
- package/dist/tool-executor-CckSCM5E.d.ts +0 -906
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,1031 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*/
|
|
41
|
-
declare function migratePromptEntry(raw: unknown): PromptEntry | null;
|
|
42
|
-
/**
|
|
43
|
-
* DefaultPromptStore — file-per-prompt JSON in a single directory (the global
|
|
44
|
-
* `~/.wrongstack/prompts` by default, or a layer dir the loader passes in).
|
|
45
|
-
* Reads tolerate legacy v1 files via `migratePromptEntry`; writes always emit
|
|
46
|
-
* the current v2 schema.
|
|
47
|
-
*/
|
|
48
|
-
declare class DefaultPromptStore implements PromptStore {
|
|
49
|
-
private readonly dir;
|
|
50
|
-
constructor(pathsOrDir: WstackPaths | string);
|
|
51
|
-
list(): Promise<PromptEntry[]>;
|
|
52
|
-
get(id: string): Promise<PromptEntry | null>;
|
|
53
|
-
save(entry: PromptEntry): Promise<void>;
|
|
54
|
-
delete(id: string): Promise<boolean>;
|
|
55
|
-
find(query: string): Promise<PromptEntry[]>;
|
|
56
|
-
/** Create a new v2 entry and return it. Does NOT persist — call save() afterwards. */
|
|
57
|
-
createNew(title: string, content: string, tags?: string[], extra?: Partial<Omit<PromptEntry, 'id' | 'title' | 'content' | 'tags' | 'createdAt' | 'updatedAt'>>): PromptEntry;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
interface PromptUsage {
|
|
61
|
-
count: number;
|
|
62
|
-
lastUsedAt: string;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Tracks how often each prompt is inserted, keyed by slug, in a single JSON
|
|
66
|
-
* file (`~/.wrongstack/prompt-usage.json`). Kept SEPARATE from the prompt
|
|
67
|
-
* entries so usage can be recorded for read-only builtin prompts without
|
|
68
|
-
* copy-on-writing them into the user layer. Surfaces "recent / most-used"
|
|
69
|
-
* views and a gentle search-ranking boost.
|
|
70
|
-
*/
|
|
71
|
-
declare class PromptUsageStore {
|
|
72
|
-
private readonly file;
|
|
73
|
-
constructor(file: string);
|
|
74
|
-
load(): Promise<Record<string, PromptUsage>>;
|
|
75
|
-
record(slug: string, at?: string): Promise<PromptUsage>;
|
|
76
|
-
get(slug: string): Promise<PromptUsage | undefined>;
|
|
77
|
-
/** Slugs ordered by most-recently-used (then by count), capped at `limit`. */
|
|
78
|
-
recent(limit?: number): Promise<{
|
|
79
|
-
slug: string;
|
|
80
|
-
usage: PromptUsage;
|
|
81
|
-
}[]>;
|
|
82
|
-
/** Slugs ordered by usage count (then recency), capped at `limit`. */
|
|
83
|
-
top(limit?: number): Promise<{
|
|
84
|
-
slug: string;
|
|
85
|
-
usage: PromptUsage;
|
|
86
|
-
}[]>;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* ReplayLogStore — sidecar store for deterministic-replay support
|
|
91
|
-
* (idea #2 from IDEAS.md). One JSONL file per session, recording
|
|
92
|
-
* every provider request/response pair so the same agent loop can
|
|
93
|
-
* be re-run later with frozen API responses.
|
|
94
|
-
*
|
|
95
|
-
* Why a sidecar (not the session JSONL)?
|
|
96
|
-
*
|
|
97
|
-
* Same reason as `AnnotationsStore` — the session log is
|
|
98
|
-
* event-sourced and append-only; a provider request payload can be
|
|
99
|
-
* tens of kilobytes (especially with long conversation history),
|
|
100
|
-
* and we want replay to be opt-in (recorded only when the user
|
|
101
|
-
* runs with `--replay` or a future equivalent). Mixing it into
|
|
102
|
-
* the event log would inflate every read for replay-irrelevant
|
|
103
|
-
* paths.
|
|
104
|
-
*
|
|
105
|
-
* File layout: `sessionScopedPath(dir, sessionId, '.replay.jsonl')`,
|
|
106
|
-
* one entry per line.
|
|
107
|
-
* Each entry: `{ hash, ts, request, response }`. The `hash` is
|
|
108
|
-
* computed via `hashRequest` so lookups are O(1) by hash.
|
|
109
|
-
*
|
|
110
|
-
* Concurrency: per-session write queue (same pattern as
|
|
111
|
-
* `AnnotationsStore`). Reads are lock-free; the write chain makes
|
|
112
|
-
* the append + rehash sequence atomic.
|
|
113
|
-
*/
|
|
114
|
-
interface ReplayEntry {
|
|
115
|
-
hash: string;
|
|
116
|
-
ts: string;
|
|
117
|
-
request: Request;
|
|
118
|
-
response: Response;
|
|
119
|
-
}
|
|
120
|
-
interface ReplayLogStoreOptions {
|
|
121
|
-
/** Root sessions directory used with `sessionScopedPath(..., '.replay.jsonl')`. */
|
|
122
|
-
dir: string;
|
|
123
|
-
/**
|
|
124
|
-
* Cap on the number of entries per session. When a `record` would
|
|
125
|
-
* push the file beyond this, the oldest entries are evicted (LRU
|
|
126
|
-
* by insertion order). Set to `Infinity` to disable rotation.
|
|
127
|
-
* Defaults to 1000 — a single LLM call averages ~5KB serialized
|
|
128
|
-
* (messages + tools + response), so 1000 entries is ~5MB per
|
|
129
|
-
* session which is a reasonable upper bound.
|
|
130
|
-
*/
|
|
131
|
-
maxEntries?: number | undefined;
|
|
132
|
-
events?: EventBus;
|
|
133
|
-
traceId?: string;
|
|
134
|
-
}
|
|
135
|
-
declare class ReplayLogStore {
|
|
136
|
-
private readonly dir;
|
|
137
|
-
private readonly events;
|
|
138
|
-
private readonly traceId;
|
|
139
|
-
private readonly writeChains;
|
|
140
|
-
/** Per-session hash → on-disk location, with lazy entry hydration. */
|
|
141
|
-
private readonly cache;
|
|
142
|
-
/** Per-session entry count on disk, to detect when compaction is needed. */
|
|
143
|
-
private readonly diskCount;
|
|
144
|
-
private readonly maxEntries;
|
|
145
|
-
constructor(opts: ReplayLogStoreOptions);
|
|
146
|
-
/**
|
|
147
|
-
* Record a request/response pair. Idempotent on hash: a second
|
|
148
|
-
* `record` for the same hash is a no-op (the existing entry wins).
|
|
149
|
-
* Returns the hash.
|
|
150
|
-
*/
|
|
151
|
-
record(input: {
|
|
152
|
-
sessionId: string;
|
|
153
|
-
request: Request;
|
|
154
|
-
response: Response;
|
|
155
|
-
}): Promise<string>;
|
|
156
|
-
/**
|
|
157
|
-
* Look up an entry by hash. Returns `null` when the request has
|
|
158
|
-
* not been recorded for this session. O(1) after the first call
|
|
159
|
-
* per session (in-memory cache).
|
|
160
|
-
*/
|
|
161
|
-
lookup(sessionId: string, hash: string): Promise<ReplayEntry | null>;
|
|
162
|
-
/** All recorded entries for a session, in insertion order. */
|
|
163
|
-
load(sessionId: string): Promise<ReplayEntry[]>;
|
|
164
|
-
/**
|
|
165
|
-
* List every session id that has a replay log in the store dir.
|
|
166
|
-
* Returns an array of `{ sessionId, entryCount, path }` sorted
|
|
167
|
-
* by sessionId for stable output. Used by `wstack replay --list`.
|
|
168
|
-
*/
|
|
169
|
-
list(): Promise<Array<{
|
|
170
|
-
sessionId: string;
|
|
171
|
-
entryCount: number;
|
|
172
|
-
path: string;
|
|
173
|
-
}>>;
|
|
174
|
-
private filePath;
|
|
175
|
-
private countEntries;
|
|
176
|
-
private parseReplayLine;
|
|
177
|
-
private readAll;
|
|
178
|
-
private writeAll;
|
|
179
|
-
private ensureCache;
|
|
180
|
-
private hydrateEntry;
|
|
181
|
-
private enqueue;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
interface CheckpointGitResult {
|
|
185
|
-
code: number;
|
|
186
|
-
stdout: string;
|
|
187
|
-
stderr: string;
|
|
188
|
-
/** Set when the runner discarded output after its safety limit. */
|
|
189
|
-
stdoutTruncated?: boolean | undefined;
|
|
190
|
-
stderrTruncated?: boolean | undefined;
|
|
191
|
-
}
|
|
192
|
-
interface SessionCheckpointCasOptions {
|
|
193
|
-
rootDir: string;
|
|
194
|
-
projectRoot: string;
|
|
195
|
-
runGit?: ((args: string[], cwd: string) => Promise<CheckpointGitResult>) | undefined;
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Content-addressed workspace checkpoint store.
|
|
199
|
-
*
|
|
200
|
-
* A manifest references a Git base tree plus CAS blobs for every changed or
|
|
201
|
-
* untracked, non-ignored path. Applying it to a checkout at the same baseHead
|
|
202
|
-
* reproduces the checkpoint without touching the parent working tree.
|
|
203
|
-
*/
|
|
204
|
-
declare class SessionCheckpointCas {
|
|
205
|
-
private readonly rootDir;
|
|
206
|
-
private readonly projectRoot;
|
|
207
|
-
private readonly runGit;
|
|
208
|
-
constructor(opts: SessionCheckpointCasOptions);
|
|
209
|
-
capture(_sessionId: string, _promptIndex: number): Promise<WorkspaceCheckpointRef | undefined>;
|
|
210
|
-
materialize(checkpoint: WorkspaceCheckpointRef, targetRoot: string): Promise<WorkspaceMaterializationResult>;
|
|
211
|
-
private objectPath;
|
|
212
|
-
private manifestPath;
|
|
213
|
-
private putBlob;
|
|
214
|
-
private putManifest;
|
|
215
|
-
private readBlob;
|
|
216
|
-
private loadManifest;
|
|
217
|
-
private safeOutputPath;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* @deprecated Legacy helper kept for callers that still need filename-safe
|
|
222
|
-
* labels. New session ids are opaque and do not include model/provider names.
|
|
223
|
-
*/
|
|
224
|
-
declare function sanitizeModel(model: string): string;
|
|
225
|
-
/**
|
|
226
|
-
* Generate a session ID in the format:
|
|
227
|
-
* `YYYY-MM-DD/sess_<ULID>`
|
|
228
|
-
*
|
|
229
|
-
* Examples:
|
|
230
|
-
* `2026-06-06/sess_01JX2S9V7T5M6N7P8Q9R0STXVW`
|
|
231
|
-
*
|
|
232
|
-
* The date prefix becomes a subdirectory so sessions group naturally by day.
|
|
233
|
-
* The leaf is an opaque sortable id; provider/model names belong in metadata,
|
|
234
|
-
* not file paths. Older IDs that contain model/provider text remain readable.
|
|
235
|
-
*/
|
|
236
|
-
declare function generateSessionId(startedAt: string, _model?: string): string;
|
|
237
|
-
|
|
238
|
-
interface GraphNode {
|
|
239
|
-
id: string;
|
|
240
|
-
entry: MemoryEntry;
|
|
241
|
-
firstSeen: string;
|
|
242
|
-
count: number;
|
|
243
|
-
/** Extracted metadata for fast lookup. */
|
|
244
|
-
type?: MemoryEntry['type'] | undefined;
|
|
245
|
-
tags?: string[] | undefined;
|
|
246
|
-
priority?: MemoryEntry['priority'] | undefined;
|
|
247
|
-
}
|
|
248
|
-
interface GraphEdge {
|
|
249
|
-
from: string;
|
|
250
|
-
to: string;
|
|
251
|
-
/** Why these nodes are related. */
|
|
252
|
-
relation: 'co_occurring' | 'similar' | 'same_turn' | 'explicit';
|
|
253
|
-
weight: number;
|
|
254
|
-
ts: string;
|
|
255
|
-
}
|
|
256
|
-
interface GraphMemoryBackendOptions extends FileMemoryBackendOptions {
|
|
257
|
-
/**
|
|
258
|
-
* Path to the graph metadata file (edges + node metadata).
|
|
259
|
-
* Defaults to `<projectDir>/memory-graph.json`.
|
|
260
|
-
*/
|
|
261
|
-
graphPath?: string | undefined;
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Graph-based memory backend that tracks relationships between entries.
|
|
265
|
-
* Builds on top of FileMemoryBackend — entries are still persisted as
|
|
266
|
-
* markdown bullets, but the graph layer adds:
|
|
267
|
-
*
|
|
268
|
-
* - Co-occurrence edges (entries from the same remember() batch)
|
|
269
|
-
* - Content similarity edges (simple Jaccard on word overlap)
|
|
270
|
-
* - Turn-based edges (entries created in the same LLM turn)
|
|
271
|
-
* - Graph traversal queries (find related memories)
|
|
272
|
-
*
|
|
273
|
-
* The graph metadata persists to `<projectDir>/memory-graph.json`.
|
|
274
|
-
*/
|
|
275
|
-
declare class GraphMemoryBackend implements MemoryBackend {
|
|
276
|
-
readonly kind = "graph";
|
|
277
|
-
private readonly file;
|
|
278
|
-
private readonly graphFile;
|
|
279
|
-
private nodes;
|
|
280
|
-
private edges;
|
|
281
|
-
private loadedScope;
|
|
282
|
-
private loaded;
|
|
283
|
-
/**
|
|
284
|
-
* Inverted index for O(1) term → node lookup during search.
|
|
285
|
-
* Built incrementally on remember/forget, rebuilt on loadGraph if absent.
|
|
286
|
-
* Maps lowercase term (min 3 chars) → Set of node IDs containing that term.
|
|
287
|
-
*/
|
|
288
|
-
private invertedIndex;
|
|
289
|
-
/** Minimum term length to index — avoids noise from 1-2 char fragments. */
|
|
290
|
-
private static readonly MIN_TERM_LEN;
|
|
291
|
-
/**
|
|
292
|
-
* Promise that resolves when the current in-flight _saveGraph completes.
|
|
293
|
-
* Tests call flush() to await this before deleting the backend or its temp dir.
|
|
294
|
-
* Each save operation chains onto the previous one so concurrent saves are serialised.
|
|
295
|
-
*/
|
|
296
|
-
private _saveDone;
|
|
297
|
-
constructor(opts: GraphMemoryBackendOptions);
|
|
298
|
-
remember(scope: MemoryScope, entry: MemoryEntry, filePath: string): Promise<void>;
|
|
299
|
-
forget(scope: MemoryScope, query: string, filePath: string): Promise<number>;
|
|
300
|
-
readAll(scope: MemoryScope, filePath: string): Promise<string>;
|
|
301
|
-
list(scope: MemoryScope, filePath: string, limit?: number): Promise<MemoryEntry[]>;
|
|
302
|
-
search(scope: MemoryScope, query: string, _filePath: string, limit?: number): Promise<MemoryEntry[]>;
|
|
303
|
-
clear(scope: MemoryScope, filePath: string): Promise<void>;
|
|
304
|
-
consolidate(scope: MemoryScope, filePath: string): Promise<number>;
|
|
305
|
-
/**
|
|
306
|
-
* Find memories related to the given entry, ordered by edge weight.
|
|
307
|
-
*/
|
|
308
|
-
findRelated(scope: MemoryScope, _filePath: string, entryText: string, limit?: number): Promise<MemoryEntry[]>;
|
|
309
|
-
/**
|
|
310
|
-
* Get all edges for visualization or traversal.
|
|
311
|
-
*/
|
|
312
|
-
getGraph(): {
|
|
313
|
-
nodes: GraphNode[];
|
|
314
|
-
edges: GraphEdge[];
|
|
315
|
-
};
|
|
316
|
-
private nodeId;
|
|
317
|
-
private loadGraph;
|
|
318
|
-
/** Fire-and-forget graph persistence. Named _saveGraph to signal it must not be awaited. */
|
|
319
|
-
private _saveGraph;
|
|
320
|
-
/**
|
|
321
|
-
* Wait for all in-flight _saveGraph operations to complete.
|
|
322
|
-
* Call this before deleting the backend or its temp directory.
|
|
323
|
-
*/
|
|
324
|
-
flush(): Promise<void>;
|
|
325
|
-
/**
|
|
326
|
-
* Build the inverted index from all currently loaded nodes.
|
|
327
|
-
* Called on loadGraph() to reconstruct the index after loading from disk.
|
|
328
|
-
*/
|
|
329
|
-
private buildInvertedIndex;
|
|
330
|
-
/**
|
|
331
|
-
* Index a node in the inverted index. Adds the node's ID to all term entries.
|
|
332
|
-
*/
|
|
333
|
-
private indexNode;
|
|
334
|
-
/**
|
|
335
|
-
* Remove a node's terms from the inverted index before deleting it.
|
|
336
|
-
* Used in forget() and when updating existing nodes.
|
|
337
|
-
*/
|
|
338
|
-
private removeNodeFromIndex;
|
|
339
|
-
/**
|
|
340
|
-
* Update an existing node's entries in the inverted index.
|
|
341
|
-
* Removes old terms and adds new ones.
|
|
342
|
-
*/
|
|
343
|
-
private updateNodeIndex;
|
|
344
|
-
/**
|
|
345
|
-
* Extract searchable terms from a memory entry.
|
|
346
|
-
* Returns lowercase words from text (min length) and full tag strings.
|
|
347
|
-
*/
|
|
348
|
-
private extractTerms;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
interface ConsolidationOp {
|
|
352
|
-
action: 'add' | 'edit' | 'delete';
|
|
353
|
-
/** For add: the fact to remember. For edit: the new text replacing the old. */
|
|
354
|
-
text?: string | undefined;
|
|
355
|
-
/** For edit/delete: the query to match existing entries. */
|
|
356
|
-
query?: string | undefined;
|
|
357
|
-
/** Memory type for categorization. */
|
|
358
|
-
type?: string | undefined;
|
|
359
|
-
/** Tags for grouping. */
|
|
360
|
-
tags?: string[] | undefined;
|
|
361
|
-
/** Priority level. */
|
|
362
|
-
priority?: string | undefined;
|
|
363
|
-
}
|
|
364
|
-
interface MemoryConsolidatorOptions {
|
|
365
|
-
memoryStore: MemoryStore;
|
|
366
|
-
/**
|
|
367
|
-
* Provider used for the consolidation LLM call. Uses the session's
|
|
368
|
-
* provider by default.
|
|
369
|
-
*/
|
|
370
|
-
provider?: Provider | undefined;
|
|
371
|
-
/**
|
|
372
|
-
* Model override for the consolidation call. Uses the session's model
|
|
373
|
-
* by default. A smaller/faster model is recommended (e.g. haiku, flash).
|
|
374
|
-
*/
|
|
375
|
-
model?: string | undefined;
|
|
376
|
-
/**
|
|
377
|
-
* Minimum session iterations before consolidation fires.
|
|
378
|
-
* Sessions shorter than this are skipped (default 2).
|
|
379
|
-
*/
|
|
380
|
-
minIterations?: number | undefined;
|
|
381
|
-
/**
|
|
382
|
-
* Maximum memory entries to include in the prompt as context.
|
|
383
|
-
*/
|
|
384
|
-
maxExistingEntries?: number | undefined;
|
|
385
|
-
}
|
|
386
|
-
declare class SessionMemoryConsolidator implements AgentExtension {
|
|
387
|
-
name: string;
|
|
388
|
-
owner: string;
|
|
389
|
-
private readonly memoryStore;
|
|
390
|
-
private readonly provider?;
|
|
391
|
-
private readonly model?;
|
|
392
|
-
private readonly minIterations;
|
|
393
|
-
private readonly maxExistingEntries;
|
|
394
|
-
constructor(opts: MemoryConsolidatorOptions);
|
|
395
|
-
afterRun: AfterRunHook;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
/**
|
|
399
|
-
* A decrypted snapshot of the credential-bearing slice of `config.json`.
|
|
400
|
-
* `providers` is always present (empty object when the file has none);
|
|
401
|
-
* `apiKey`/`baseUrl` are the top-level fallbacks a provider inherits when its
|
|
402
|
-
* saved entry omits them.
|
|
403
|
-
*/
|
|
404
|
-
interface ProviderConfigSnapshot {
|
|
405
|
-
providers: Record<string, ProviderConfig>;
|
|
406
|
-
apiKey?: string;
|
|
407
|
-
baseUrl?: string;
|
|
408
|
-
/** Display language (Config.uiLocale), surfaced so a cross-process change
|
|
409
|
-
* (e.g. the desktop shell) propagates to running webui instances. */
|
|
410
|
-
uiLocale?: string;
|
|
411
|
-
}
|
|
412
|
-
interface WatchProviderConfigOptions {
|
|
413
|
-
/** Surface non-fatal read/parse/decrypt issues. */
|
|
414
|
-
warn?: (msg: string) => void;
|
|
415
|
-
/** Coalesce bursts of fs events (default 200ms). */
|
|
416
|
-
debounceMs?: number;
|
|
417
|
-
}
|
|
418
|
-
/**
|
|
419
|
-
* Watch `configPath` for credential changes and invoke `onChange` with a
|
|
420
|
-
* freshly-decrypted snapshot whenever the `providers`/`apiKey`/`baseUrl` slice
|
|
421
|
-
* actually changes. Returns a `close()` that stops watching.
|
|
422
|
-
*
|
|
423
|
-
* The initial on-disk state is read once to seed the no-op guard but does NOT
|
|
424
|
-
* fire `onChange` — only subsequent changes do.
|
|
425
|
-
*/
|
|
426
|
-
declare function watchProviderConfig(configPath: string, vault: SecretVault, onChange: (snapshot: ProviderConfigSnapshot) => void, opts?: WatchProviderConfigOptions): {
|
|
427
|
-
close: () => void;
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* L2-B: AnnotationsStore — sidecar storage for collaboration annotations
|
|
432
|
-
* (Phase 2 of idea #13 from IDEAS.md).
|
|
433
|
-
*
|
|
434
|
-
* Why a sidecar file, not the session JSONL?
|
|
435
|
-
*
|
|
436
|
-
* The session log is an event-sourced append-only journal
|
|
437
|
-
* (`packages/core/src/types/session.ts` invariant: events are
|
|
438
|
-
* append-only, with `truncateToCheckpoint` only as an explicit
|
|
439
|
-
* rewind). Mixing in human-typed annotations would break that
|
|
440
|
-
* invariant — the user's note about "this rm looks dangerous"
|
|
441
|
-
* is not part of the agent's event history; it is meta-commentary
|
|
442
|
-
* on the history.
|
|
443
|
-
*
|
|
444
|
-
* So we keep annotations in a sibling file: one JSON document per
|
|
445
|
-
* session, resolved with `sessionScopedPath(sessionDir, sessionId,
|
|
446
|
-
* '.annotations.json')`. The shape is a simple versioned array,
|
|
447
|
-
* written atomically.
|
|
448
|
-
*
|
|
449
|
-
* Concurrency model:
|
|
450
|
-
*
|
|
451
|
-
* The store uses a per-session Promise chain to serialize writes.
|
|
452
|
-
* Multiple annotators adding notes at the same time will queue,
|
|
453
|
-
* not race. The atomic write itself is the second line of
|
|
454
|
-
* defense (in case the chain is bypassed — e.g. two processes
|
|
455
|
-
* pointing at the same dir).
|
|
456
|
-
*/
|
|
457
|
-
/** Wire/storage shape for one annotation. */
|
|
458
|
-
interface Annotation {
|
|
459
|
-
/** Stable id (UUIDv4-ish). Referenced by resolve/delete. */
|
|
460
|
-
id: string;
|
|
461
|
-
/** Session this annotation belongs to. */
|
|
462
|
-
sessionId: string;
|
|
463
|
-
/** Index into the session event log the annotation refers to. */
|
|
464
|
-
atEventIndex: number;
|
|
465
|
-
/** Participant id of the annotator (matches WSCollabParticipantJoined.participantId). */
|
|
466
|
-
authorId: string;
|
|
467
|
-
/** Human-readable role label snapshot for display (e.g. "annotator"). */
|
|
468
|
-
authorRole: 'annotator';
|
|
469
|
-
/** The note itself. Trimmed, capped at `MAX_TEXT_LENGTH` on add. */
|
|
470
|
-
text: string;
|
|
471
|
-
/** ISO timestamp of creation. */
|
|
472
|
-
createdAt: string;
|
|
473
|
-
/** Resolved state. Annotations start unresolved. */
|
|
474
|
-
resolved: boolean;
|
|
475
|
-
/** ISO timestamp when resolved (if resolved). */
|
|
476
|
-
resolvedAt?: string | undefined;
|
|
477
|
-
/** Participant id of the resolver (if resolved). */
|
|
478
|
-
resolvedBy?: string | undefined;
|
|
479
|
-
}
|
|
480
|
-
interface AnnotationsStoreOptions {
|
|
481
|
-
/** Root sessions directory used with `sessionScopedPath(..., '.annotations.json')`. */
|
|
482
|
-
dir: string;
|
|
483
|
-
events?: EventBus;
|
|
484
|
-
traceId?: string;
|
|
485
|
-
}
|
|
486
|
-
declare class AnnotationsStore {
|
|
487
|
-
private readonly dir;
|
|
488
|
-
private readonly events;
|
|
489
|
-
private readonly traceId;
|
|
490
|
-
/** Per-session write queue. Created lazily on first add. */
|
|
491
|
-
private readonly writeChains;
|
|
492
|
-
constructor(opts: AnnotationsStoreOptions);
|
|
493
|
-
/**
|
|
494
|
-
* Return all annotations for `sessionId` in insertion order
|
|
495
|
-
* (oldest first). Returns an empty array when no file exists
|
|
496
|
-
* yet (the normal case for a fresh session) and also degrades
|
|
497
|
-
* gracefully to `[]` on a read error (permissions, corruption) —
|
|
498
|
-
* the failure is still surfaced via a `storage.read` event so it
|
|
499
|
-
* never silently hides I/O problems from observers.
|
|
500
|
-
*/
|
|
501
|
-
list(sessionId: string): Promise<Annotation[]>;
|
|
502
|
-
/**
|
|
503
|
-
* Convenience: only unresolved annotations, newest first — the
|
|
504
|
-
* common UI rendering for "what still needs attention?".
|
|
505
|
-
*/
|
|
506
|
-
listOpen(sessionId: string): Promise<Annotation[]>;
|
|
507
|
-
/**
|
|
508
|
-
* Add a new annotation. Returns the persisted record (with id
|
|
509
|
-
* and timestamps filled in). Throws when `text` is empty or
|
|
510
|
-
* exceeds `MAX_TEXT_LENGTH`.
|
|
511
|
-
*/
|
|
512
|
-
add(input: {
|
|
513
|
-
sessionId: string;
|
|
514
|
-
atEventIndex: number;
|
|
515
|
-
authorId: string;
|
|
516
|
-
text: string;
|
|
517
|
-
}): Promise<Annotation>;
|
|
518
|
-
/**
|
|
519
|
-
* Mark an annotation as resolved. Returns the updated record, or
|
|
520
|
-
* `null` if no annotation with that id exists in this session.
|
|
521
|
-
* Idempotent: resolving an already-resolved annotation refreshes
|
|
522
|
-
* `resolvedAt` / `resolvedBy` to the latest call.
|
|
523
|
-
*/
|
|
524
|
-
resolve(input: {
|
|
525
|
-
sessionId: string;
|
|
526
|
-
annotationId: string;
|
|
527
|
-
resolvedBy: string;
|
|
528
|
-
}): Promise<Annotation | null>;
|
|
529
|
-
private filePath;
|
|
530
|
-
private readFile;
|
|
531
|
-
private writeFile;
|
|
532
|
-
/**
|
|
533
|
-
* Serialize writes per-sessionId. We chain promises instead of
|
|
534
|
-
* using a Mutex class so the contract is obvious from the
|
|
535
|
-
* call-site: `enqueue(sid, fn)` runs `fn` after every prior
|
|
536
|
-
* enqueue for `sid` has settled.
|
|
537
|
-
*/
|
|
538
|
-
private enqueue;
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
/**
|
|
542
|
-
* Idea #1 from IDEAS.md — Stateful Session Recovery.
|
|
543
|
-
*
|
|
544
|
-
* `SessionRecovery` is the read-side companion to the in-flight
|
|
545
|
-
* marker mechanism. When the agent loop is running, it writes an
|
|
546
|
-
* `in_flight_start` event at the current point in the log. On
|
|
547
|
-
* clean shutdown, a matching `in_flight_end` follows. Provider and
|
|
548
|
-
* tool events may legitimately appear after the start marker, so
|
|
549
|
-
* recovery finds the latest lifecycle boundary rather than assuming
|
|
550
|
-
* the marker is literally the last JSONL record.
|
|
551
|
-
*
|
|
552
|
-
* Detection is diagnostic only. Normal session resume reconstructs the
|
|
553
|
-
* conversation by replaying persisted JSONL events; it must not blindly
|
|
554
|
-
* re-execute tool calls after a crash. `recover()` exposes the tail after the
|
|
555
|
-
* last checkpoint so callers can explain which persisted work was in flight.
|
|
556
|
-
*
|
|
557
|
-
* Concurrency: pure read; no writes. Safe to call from multiple
|
|
558
|
-
* processes simultaneously.
|
|
559
|
-
*/
|
|
560
|
-
interface StaleSession {
|
|
561
|
-
sessionId: string;
|
|
562
|
-
/** Path to the JSONL log. */
|
|
563
|
-
path: string;
|
|
564
|
-
/** Last event ts (the in_flight_start timestamp). */
|
|
565
|
-
lastEventTs: string;
|
|
566
|
-
/** Context the agent was working on when it died. */
|
|
567
|
-
context: string;
|
|
568
|
-
/** Total events in the log. */
|
|
569
|
-
eventCount: number;
|
|
570
|
-
}
|
|
571
|
-
interface RecoveryPlan {
|
|
572
|
-
sessionId: string;
|
|
573
|
-
/** True if the session is stale (has a dangling in_flight_start). */
|
|
574
|
-
stale: boolean;
|
|
575
|
-
/** The last `checkpoint` event before the un-replayed work, or null. */
|
|
576
|
-
lastCheckpoint: SessionEvent | null;
|
|
577
|
-
/** All persisted events after the last checkpoint (diagnostic in-flight tail). */
|
|
578
|
-
pendingEvents: SessionEvent[];
|
|
579
|
-
/** The dangling in_flight_start event, if any. */
|
|
580
|
-
inFlightStart: SessionEvent | null;
|
|
581
|
-
/** Free-form context the agent was working on, if any. */
|
|
582
|
-
context: string | null;
|
|
583
|
-
}
|
|
584
|
-
/**
|
|
585
|
-
* Result of `SessionRecovery.recover(sessionId)`. Distinct from
|
|
586
|
-
* `StaleSession`: a session is "stale" if its latest lifecycle
|
|
587
|
-
* boundary is an open marker, but a "recovery plan" can also be generated for
|
|
588
|
-
* clean sessions whose last checkpoint is older than the
|
|
589
|
-
* conversation history (e.g. a user-initiated "rewind to last
|
|
590
|
-
* good state" flow). This is a diagnostic plan, not authorization to replay
|
|
591
|
-
* external side effects.
|
|
592
|
-
*/
|
|
593
|
-
declare class SessionRecovery {
|
|
594
|
-
private readonly dir;
|
|
595
|
-
/**
|
|
596
|
-
* Scan a session log and return a `StaleSession` if and only if the newest
|
|
597
|
-
* lifecycle boundary is an `in_flight_start` without a later
|
|
598
|
-
* `in_flight_end`/`session_end`. Ordinary provider/tool events after the
|
|
599
|
-
* marker do not make the session clean. Returns `null` when:
|
|
600
|
-
* - the log does not exist;
|
|
601
|
-
* - the log is empty;
|
|
602
|
-
* - the latest lifecycle boundary is `in_flight_end` or `session_end`;
|
|
603
|
-
* - there is no lifecycle boundary (legacy/pre-marker log).
|
|
604
|
-
*
|
|
605
|
-
* The reverse scanner is chunked and line-aware. It can cross arbitrarily
|
|
606
|
-
* large JSONL records (for example a large tool result) without imposing a
|
|
607
|
-
* fixed tail-size correctness limit. Clean logs normally return after the
|
|
608
|
-
* first chunk; stale logs continue counting lines so `eventCount` remains
|
|
609
|
-
* the documented total rather than a tail-only approximation.
|
|
610
|
-
*/
|
|
611
|
-
detectStale(sessionId: string): Promise<StaleSession | null>;
|
|
612
|
-
/**
|
|
613
|
-
* Generate a recovery plan for a session. The plan describes
|
|
614
|
-
* the persisted tail after the last checkpoint, plus the dangling in-flight
|
|
615
|
-
* marker if present. SessionStore.resume() independently reconstructs state
|
|
616
|
-
* from the journal and does not re-run these events as commands.
|
|
617
|
-
*
|
|
618
|
-
* Returns a non-null plan for ANY session that has at least
|
|
619
|
-
* one event after a checkpoint (or, for legacy sessions, at
|
|
620
|
-
* least one event). Pure read; no mutation.
|
|
621
|
-
*/
|
|
622
|
-
recover(sessionId: string): Promise<RecoveryPlan | null>;
|
|
623
|
-
/**
|
|
624
|
-
* List every stale session in a directory. Returns an array
|
|
625
|
-
* (possibly empty) sorted by `lastEventTs` descending — most
|
|
626
|
-
* recent crash first.
|
|
627
|
-
*/
|
|
628
|
-
listResumable(): Promise<StaleSession[]>;
|
|
629
|
-
private filePath;
|
|
630
|
-
constructor(dir: string);
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
/**
|
|
634
|
-
* ToolAuditLog — idea #9 from IDEAS.md.
|
|
635
|
-
*
|
|
636
|
-
* Tamper-evident audit trail for tool calls. Every tool_use /
|
|
637
|
-
* tool_result pair is appended to a sidecar JSONL with a chained
|
|
638
|
-
* SHA-256 — each entry's `prevHash` is the prior entry's `hash`,
|
|
639
|
-
* so any post-hoc modification of a single line breaks the chain
|
|
640
|
-
* from that point forward.
|
|
641
|
-
*
|
|
642
|
-
* Why a sidecar (not the session JSONL)?
|
|
643
|
-
* Same reason as `AnnotationsStore` and `ReplayLogStore`: the
|
|
644
|
-
* session log is an event-sourced journal. Mixing in a hash
|
|
645
|
-
* chain would inflate every read and tightly couple the
|
|
646
|
-
* integrity check to the event format. Sidecar keeps both
|
|
647
|
-
* concerns orthogonal.
|
|
648
|
-
*
|
|
649
|
-
* What "tamper-evident" means here:
|
|
650
|
-
* - The hash covers the full serialized entry: tool name, id,
|
|
651
|
-
* input, output, timestamp, author. Changing any byte
|
|
652
|
-
* changes the hash.
|
|
653
|
-
* - The chain is sequential — a verifier walks the file in
|
|
654
|
-
* order, recomputing each hash, and checks `prevHash`
|
|
655
|
-
* matches the previous entry's `hash`.
|
|
656
|
-
* - Any insertion, deletion, or modification of a single
|
|
657
|
-
* entry surfaces as a "chain broken at entry N" verdict.
|
|
658
|
-
*
|
|
659
|
-
* What it does NOT defend against:
|
|
660
|
-
* - An attacker who rewrites the whole file consistently.
|
|
661
|
-
* For that you'd need an external anchor (signing key,
|
|
662
|
-
* transparency log, etc.) — out of scope for Phase 1.
|
|
663
|
-
* - The agent itself misbehaving; this is post-hoc audit, not
|
|
664
|
-
* real-time enforcement. Use `PermissionPolicy` for that.
|
|
665
|
-
*
|
|
666
|
-
* File layout: `sessionScopedPath(dir, sessionId, '.audit.jsonl')`,
|
|
667
|
-
* one entry per line. The chain starts with a `genesis` entry whose
|
|
668
|
-
* `prevHash` is all zeros.
|
|
669
|
-
*/
|
|
670
|
-
interface AuditEntry {
|
|
671
|
-
/** Monotonic index (0-based). */
|
|
672
|
-
index: number;
|
|
673
|
-
/** UUID for cross-referencing with logs. */
|
|
674
|
-
id: string;
|
|
675
|
-
/** ISO timestamp. */
|
|
676
|
-
ts: string;
|
|
677
|
-
/** Hash of the previous entry (or all-zeros for the genesis entry). */
|
|
678
|
-
prevHash: string;
|
|
679
|
-
/** Hash of this entry's content (sha256 over the canonical JSON). */
|
|
680
|
-
hash: string;
|
|
681
|
-
toolName: string;
|
|
682
|
-
toolUseId: string;
|
|
683
|
-
input: unknown;
|
|
684
|
-
output: unknown;
|
|
685
|
-
isError: boolean;
|
|
686
|
-
}
|
|
687
|
-
type VerifyResult = {
|
|
688
|
-
ok: true;
|
|
689
|
-
entries: number;
|
|
690
|
-
} | {
|
|
691
|
-
ok: false;
|
|
692
|
-
brokenAt: number;
|
|
693
|
-
reason: string;
|
|
694
|
-
};
|
|
695
|
-
interface ToolAuditLogOptions {
|
|
696
|
-
/** Root sessions directory used with `sessionScopedPath(..., '.audit.jsonl')`. */
|
|
697
|
-
dir: string;
|
|
698
|
-
/**
|
|
699
|
-
* Flush the file system cache to disk every N writes per session.
|
|
700
|
-
* Default 100. Lower values = better crash durability, more I/O overhead.
|
|
701
|
-
* Set to `Infinity` to disable periodic fsync (fastest, but highest data-loss risk).
|
|
702
|
-
*/
|
|
703
|
-
fsyncEvery?: number | undefined;
|
|
704
|
-
events?: EventBus;
|
|
705
|
-
traceId?: string;
|
|
706
|
-
}
|
|
707
|
-
declare class ToolAuditLog {
|
|
708
|
-
private readonly dir;
|
|
709
|
-
private readonly events;
|
|
710
|
-
private readonly traceId;
|
|
711
|
-
/** In-memory cache of the last entry's hash (per session), to compute chains efficiently. */
|
|
712
|
-
private readonly tailHash;
|
|
713
|
-
/** In-memory counter for entry indices — avoids re-reading the file on every write. */
|
|
714
|
-
private readonly tailIndex;
|
|
715
|
-
/**
|
|
716
|
-
* File mtime+size recorded after our last write, per session. Used to
|
|
717
|
-
* detect cross-process writes (session handoff, recovery) that would
|
|
718
|
-
* invalidate the in-memory tail cache: if the stat no longer matches
|
|
719
|
-
* we re-read the file to re-establish the chain tip before appending.
|
|
720
|
-
*/
|
|
721
|
-
private readonly tailStat;
|
|
722
|
-
/** Tracks writes since last fsync, per session. */
|
|
723
|
-
private readonly unSyncedWrites;
|
|
724
|
-
private readonly writeChains;
|
|
725
|
-
private readonly fsyncEvery;
|
|
726
|
-
constructor(opts: ToolAuditLogOptions);
|
|
727
|
-
/**
|
|
728
|
-
* Append a tool call/result pair to the chain. Returns the
|
|
729
|
-
* resulting entry. Idempotency is not guaranteed — if you
|
|
730
|
-
* record the same tool_use twice you get two entries. That's
|
|
731
|
-
* intentional: the audit log is a record, not a cache.
|
|
732
|
-
*/
|
|
733
|
-
record(input: {
|
|
734
|
-
sessionId: string;
|
|
735
|
-
toolName: string;
|
|
736
|
-
toolUseId: string;
|
|
737
|
-
input: unknown;
|
|
738
|
-
output: unknown;
|
|
739
|
-
isError: boolean;
|
|
740
|
-
}): Promise<AuditEntry>;
|
|
741
|
-
/**
|
|
742
|
-
* Resolve the chain tip (previous hash + next index) for an append.
|
|
743
|
-
* Uses the in-memory `tailHash`/`tailIndex` cache when the file's
|
|
744
|
-
* stat matches our last known write; falls back to a full read on
|
|
745
|
-
* cache miss or when an external writer has extended the file.
|
|
746
|
-
*/
|
|
747
|
-
private _resolveChainTip;
|
|
748
|
-
/**
|
|
749
|
-
* Walk the chain and verify every entry's hash and prevHash.
|
|
750
|
-
* Returns a structured verdict — never throws.
|
|
751
|
-
*/
|
|
752
|
-
verify(sessionId: string): Promise<VerifyResult>;
|
|
753
|
-
/** All entries for a session, in insertion order. */
|
|
754
|
-
load(sessionId: string): Promise<AuditEntry[]>;
|
|
755
|
-
private filePath;
|
|
756
|
-
private readAll;
|
|
757
|
-
/**
|
|
758
|
-
* Tracks writes since last fsync and triggers periodic fsync.
|
|
759
|
-
* Called after each O(1) append to maintain the same durability
|
|
760
|
-
* guarantees as the old writeAll approach.
|
|
761
|
-
*/
|
|
762
|
-
private _trackUnsynced;
|
|
763
|
-
/**
|
|
764
|
-
* Explicitly sync the file to disk. Called automatically every
|
|
765
|
-
* `fsyncEvery` writes, and available for callers who want to
|
|
766
|
-
* force a sync before closing or during graceful shutdown.
|
|
767
|
-
*/
|
|
768
|
-
flush(sessionId: string): Promise<void>;
|
|
769
|
-
private sync;
|
|
770
|
-
private enqueue;
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
/**
|
|
774
|
-
* AgentStatusTracker — subscribes to EventBus events and keeps the
|
|
775
|
-
* SessionRegistry updated with live agent status.
|
|
776
|
-
*
|
|
777
|
-
* Created once per process during boot. Listens for:
|
|
778
|
-
* - agent.run.started / agent.run.completed → agent status changes
|
|
779
|
-
* - tool.started / tool.executed → current tool tracking
|
|
780
|
-
* - brain.ask_human → waiting_user status
|
|
781
|
-
* - fleet events (subagent spawn/start/done) → agent entries
|
|
782
|
-
*
|
|
783
|
-
* @module agent-status-tracker
|
|
784
|
-
*/
|
|
785
|
-
|
|
786
|
-
interface AgentStatusTrackerOptions {
|
|
787
|
-
events: EventBus;
|
|
788
|
-
registry: SessionRegistry;
|
|
789
|
-
/** Session id whose live agent state is mirrored by this tracker. */
|
|
790
|
-
sessionId?: string | (() => string | undefined) | undefined;
|
|
791
|
-
/** Leader agent name shown in the registry. Default: "leader". */
|
|
792
|
-
leaderName?: string | undefined;
|
|
793
|
-
/**
|
|
794
|
-
* Best-effort callback fired after each registry write settles. Used to nudge
|
|
795
|
-
* local WebUI servers (FleetNotifier) so cross-process status reaches the map
|
|
796
|
-
* without waiting on their file-watch/poll. Never block or throw.
|
|
797
|
-
*/
|
|
798
|
-
onUpdate?: (() => void) | undefined;
|
|
799
|
-
}
|
|
800
|
-
declare class AgentStatusTracker {
|
|
801
|
-
private readonly events;
|
|
802
|
-
private readonly registry;
|
|
803
|
-
private readonly sessionId;
|
|
804
|
-
private readonly leaderName;
|
|
805
|
-
private agents;
|
|
806
|
-
private lastAgents;
|
|
807
|
-
private leaderStatus;
|
|
808
|
-
private leaderCurrentTool;
|
|
809
|
-
private leaderIterations;
|
|
810
|
-
private leaderToolCalls;
|
|
811
|
-
private leaderCostUsd;
|
|
812
|
-
private leaderTokensIn;
|
|
813
|
-
private leaderTokensOut;
|
|
814
|
-
private leaderCtxPct;
|
|
815
|
-
private leaderModel;
|
|
816
|
-
private leaderPartialText;
|
|
817
|
-
private leaderStartedAt;
|
|
818
|
-
private unsubscribers;
|
|
819
|
-
private readonly onUpdate;
|
|
820
|
-
private sweepTimer;
|
|
821
|
-
private partialTimer;
|
|
822
|
-
constructor(opts: AgentStatusTrackerOptions);
|
|
823
|
-
/** Current full agent list (leader + subagents) as of the last flush. */
|
|
824
|
-
getAgents(): AgentEntry[];
|
|
825
|
-
start(): void;
|
|
826
|
-
stop(): void;
|
|
827
|
-
/**
|
|
828
|
-
* Coalesce streamed-text flushes: at most one registry write per
|
|
829
|
-
* {@link PARTIAL_FLUSH_THROTTLE_MS} while text streams in, so per-token
|
|
830
|
-
* deltas never thrash the cross-process registry file.
|
|
831
|
-
*/
|
|
832
|
-
private schedulePartialFlush;
|
|
833
|
-
/**
|
|
834
|
-
* Remove subagents that have been finished (idle/error) for longer than
|
|
835
|
-
* {@link AGENT_REAP_MS}. Running / streaming / waiting_user agents are kept
|
|
836
|
-
* regardless of age — only *not-working* agents are reaped.
|
|
837
|
-
*/
|
|
838
|
-
private sweep;
|
|
839
|
-
private flush;
|
|
840
|
-
private currentSessionId;
|
|
841
|
-
private acceptsSession;
|
|
842
|
-
private markLeaderStarted;
|
|
843
|
-
private captureLeaderContext;
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
interface FleetNotifierOptions {
|
|
847
|
-
/** WrongStack global dir (`~/.wrongstack`) holding `webui-instances.json`. */
|
|
848
|
-
baseDir: string;
|
|
849
|
-
/** This process's project root — only WebUIs on the same project are pinged. */
|
|
850
|
-
projectRoot: string;
|
|
851
|
-
/** This process's pid, so a WebUI never pings itself. */
|
|
852
|
-
selfPid?: number | undefined;
|
|
853
|
-
/** Injectable POST for tests. Defaults to a timed `fetch`. */
|
|
854
|
-
post?: ((url: string) => Promise<void>) | undefined;
|
|
855
|
-
}
|
|
856
|
-
declare class FleetNotifier {
|
|
857
|
-
private readonly baseDir;
|
|
858
|
-
private readonly projectRoot;
|
|
859
|
-
private readonly selfPid;
|
|
860
|
-
private readonly doPost;
|
|
861
|
-
private cache;
|
|
862
|
-
private timer;
|
|
863
|
-
private disposed;
|
|
864
|
-
constructor(opts: FleetNotifierOptions);
|
|
865
|
-
/** Coalesced, best-effort nudge. Safe to call on every status change. */
|
|
866
|
-
notify(): void;
|
|
867
|
-
/** Resolve same-project WebUI ping URLs (cached briefly). Exposed for tests. */
|
|
868
|
-
endpoints(): Promise<string[]>;
|
|
869
|
-
dispose(): void;
|
|
870
|
-
private flush;
|
|
871
|
-
private discover;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
interface SessionRewinderOptions {
|
|
875
|
-
sessionsDir: string;
|
|
876
|
-
/** The project root directory; used to validate rewind targets stay inside it. */
|
|
877
|
-
projectRoot: string;
|
|
878
|
-
}
|
|
879
|
-
/**
|
|
880
|
-
* Rewind engine that reads session JSONL files and reverts file system
|
|
881
|
-
* changes to any previous checkpoint.
|
|
882
|
-
*/
|
|
883
|
-
declare class DefaultSessionRewinder implements SessionRewinder {
|
|
884
|
-
private readonly sessionsDir;
|
|
885
|
-
private readonly projectRoot;
|
|
886
|
-
constructor(sessionsDir: string, projectRoot: string);
|
|
887
|
-
private sessionFile;
|
|
888
|
-
listCheckpoints(sessionId: string): Promise<CheckpointInfo[]>;
|
|
889
|
-
rewindToCheckpoint(sessionId: string, checkpointIndex: number): Promise<RewindResultExtended>;
|
|
890
|
-
rewindLastN(sessionId: string, n: number): Promise<RewindResultExtended>;
|
|
891
|
-
rewindToStart(sessionId: string): Promise<RewindResultExtended>;
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
interface CompletedWorkCheckpointFile {
|
|
895
|
-
version: 1;
|
|
896
|
-
sessionId: string;
|
|
897
|
-
updatedAt: string;
|
|
898
|
-
completedWork: CompletedWorkEvidence[];
|
|
899
|
-
}
|
|
900
|
-
declare function loadCompletedWorkCheckpoint(filePath: string, events?: EventBus, traceId?: string): Promise<CompletedWorkEvidence[] | null>;
|
|
901
|
-
declare function saveCompletedWorkCheckpoint(filePath: string, sessionId: string, completedWork: readonly CompletedWorkEvidence[], events?: EventBus, traceId?: string): Promise<void>;
|
|
902
|
-
|
|
903
|
-
interface TaskFile {
|
|
904
|
-
version: 1;
|
|
905
|
-
sessionId: string;
|
|
906
|
-
updatedAt: string;
|
|
907
|
-
tasks: TaskItem[];
|
|
908
|
-
}
|
|
909
|
-
declare function emptyTaskFile(sessionId: string): TaskFile;
|
|
910
|
-
/** Read the task file. Returns null when the file doesn't exist. */
|
|
911
|
-
declare function loadTasks(filePath: string, events?: EventBus, traceId?: string): Promise<TaskFile | null>;
|
|
912
|
-
/**
|
|
913
|
-
* Write the task file atomically. Prefer `mutateTasks` for read-modify-write
|
|
914
|
-
* cycles — this low-level function does NOT acquire a lock.
|
|
915
|
-
*/
|
|
916
|
-
/**
|
|
917
|
-
* Persist the task file. Returns `true` on success, `false` if the write
|
|
918
|
-
* failed (still emits `storage.error` + warns — does NOT throw). `mutateTasks`
|
|
919
|
-
* inspects the result and throws so the task TOOL can report `ok:false`
|
|
920
|
-
* instead of falsely claiming the tasks were saved.
|
|
921
|
-
*/
|
|
922
|
-
declare function saveTasks(filePath: string, tasks: TaskFile, events?: EventBus, traceId?: string): Promise<boolean>;
|
|
923
|
-
/**
|
|
924
|
-
* Load, modify, and save the task file under a file-level lock.
|
|
925
|
-
* `fn` receives the current TaskFile (or a fresh empty one) and must
|
|
926
|
-
* return the mutated TaskFile (mutating in-place is fine — the returned
|
|
927
|
-
* reference is what gets saved).
|
|
928
|
-
*
|
|
929
|
-
* This is the primary API for any code path that reads *and then writes*
|
|
930
|
-
* the task file — it prevents races from parallel `batch_tool_use` calls.
|
|
931
|
-
*/
|
|
932
|
-
declare function mutateTasks(filePath: string, sessionId: string, fn: (file: TaskFile) => TaskFile | Promise<TaskFile>, events?: EventBus, traceId?: string): Promise<TaskFile>;
|
|
933
|
-
|
|
934
|
-
declare const INPUT_HISTORY_DEFAULT_MAX = 100;
|
|
935
|
-
/**
|
|
936
|
-
* Per-project TUI prompt input history.
|
|
937
|
-
*
|
|
938
|
-
* Backed by a single JSON file at `~/.wrongstack/projects/<slug>/input-
|
|
939
|
-
* history.json`. Entries are newest-first, capped at `maxEntries`. Before
|
|
940
|
-
* any entry is written to disk it is passed through a `SecretScrubber` and
|
|
941
|
-
* dropped if it still contains a redacted marker — leaking a pasted API
|
|
942
|
-
* key into a history file would be a real incident, so the scrubber is
|
|
943
|
-
* mandatory, not optional.
|
|
944
|
-
*
|
|
945
|
-
* The store is intentionally small and synchronous-ish (load once at TUI
|
|
946
|
-
* boot, save debounced on change). It mirrors PromptUsageStore's shape so
|
|
947
|
-
* the two read as a family.
|
|
948
|
-
*/
|
|
949
|
-
declare class InputHistoryStore {
|
|
950
|
-
private readonly file;
|
|
951
|
-
private readonly scrubber;
|
|
952
|
-
private readonly maxEntries;
|
|
953
|
-
/**
|
|
954
|
-
* @param file Absolute path to the per-project input-history.json.
|
|
955
|
-
* @param scrubber SecretScrubber used to filter secrets before write.
|
|
956
|
-
* @param maxEntries Cap on the number of entries persisted. Default 100.
|
|
957
|
-
*/
|
|
958
|
-
constructor(file: string, scrubber: SecretScrubber, maxEntries?: number);
|
|
959
|
-
/**
|
|
960
|
-
* Load the persisted entries. Missing or corrupt file → empty list
|
|
961
|
-
* (never throws — history is best-effort).
|
|
962
|
-
*/
|
|
963
|
-
load(): Promise<string[]>;
|
|
964
|
-
/**
|
|
965
|
-
* Persist `entries` to disk after scrubbing each one. Entries that still
|
|
966
|
-
* contain a redaction marker AFTER scrubbing are dropped — a half-scrubbed
|
|
967
|
-
* prompt like "export API_KEY=***REDACTED***" is useless as history and
|
|
968
|
-
* keeping it risks confusing the agent. Dedup is the caller's job (the
|
|
969
|
-
* reducer already dedups); this method only scrubs, caps, and writes.
|
|
970
|
-
*/
|
|
971
|
-
save(entries: string[]): Promise<void>;
|
|
972
|
-
/** Truncate the file to an empty entry list (used by /clear). */
|
|
973
|
-
clear(): Promise<void>;
|
|
974
|
-
/**
|
|
975
|
-
* Run each entry through the scrubber and drop any that still contain a
|
|
976
|
-
* redaction marker. Internal so the test suite can pin the policy.
|
|
977
|
-
*/
|
|
978
|
-
private scrubAndFilter;
|
|
979
|
-
/**
|
|
980
|
-
* Heuristic: did the scrubber actually redact anything? DefaultSecretScrubber
|
|
981
|
-
* replaces matches with "***REDACTED***", so a residual marker means a secret
|
|
982
|
-
* was detected. Subclasses of SecretScrubber that use a different sentinel
|
|
983
|
-
* can be accommodated by widening this check in the future; for now the
|
|
984
|
-
* marker check covers the shipped scrubber.
|
|
985
|
-
*/
|
|
986
|
-
private looksRedacted;
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
declare const ALL_SYNC_CATEGORIES: SyncCategory[];
|
|
990
|
-
interface SyncResult {
|
|
991
|
-
ok: boolean;
|
|
992
|
-
action: 'push' | 'pull';
|
|
993
|
-
categories: SyncCategory[];
|
|
994
|
-
committedAt?: string | undefined;
|
|
995
|
-
message: string;
|
|
996
|
-
}
|
|
997
|
-
/**
|
|
998
|
-
* CloudSync — push/pull user-selected ~/.wrongstack categories to a
|
|
999
|
-
* private GitHub repo. No git CLI needed; uses GitHub REST API via fetch.
|
|
1000
|
-
* The token is stored encrypted via SecretVault (field named `githubToken`
|
|
1001
|
-
* so the vault walker picks it up automatically).
|
|
1002
|
-
*/
|
|
1003
|
-
declare class CloudSync {
|
|
1004
|
-
private readonly paths;
|
|
1005
|
-
private readonly getConfig;
|
|
1006
|
-
private readonly setConfig;
|
|
1007
|
-
private readonly statePath;
|
|
1008
|
-
private state;
|
|
1009
|
-
constructor(paths: WstackPaths, getConfig: () => SyncConfig | null, setConfig: (c: SyncConfig) => Promise<void>);
|
|
1010
|
-
status(): Promise<string>;
|
|
1011
|
-
enable(_repo: string, _categories: SyncCategory[]): Promise<string>;
|
|
1012
|
-
disable(): Promise<string>;
|
|
1013
|
-
push(token: string): Promise<SyncResult>;
|
|
1014
|
-
pull(token: string): Promise<SyncResult>;
|
|
1015
|
-
hasLocalChanges(): Promise<boolean>;
|
|
1016
|
-
loadState(): Promise<void>;
|
|
1017
|
-
private githubFetch;
|
|
1018
|
-
private getRef;
|
|
1019
|
-
private updateRef;
|
|
1020
|
-
private getCommit;
|
|
1021
|
-
private getTreeEntries;
|
|
1022
|
-
private createCommit;
|
|
1023
|
-
private createGitTree;
|
|
1024
|
-
private getBlob;
|
|
1025
|
-
private buildLocalTree;
|
|
1026
|
-
private hashLocalCategories;
|
|
1027
|
-
private categoryToPath;
|
|
1028
|
-
private walkDir;
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
export { ALL_SYNC_CATEGORIES, AgentEntry, AgentStatusTracker, type AgentStatusTrackerOptions, type Annotation, AnnotationsStore, type AnnotationsStoreOptions, type AuditEntry, type CheckpointGitResult, CloudSync, type CompletedWorkCheckpointFile, type ConsolidationOp, DefaultPromptStore, DefaultSessionRewinder, FileMemoryBackendOptions, FleetNotifier, type FleetNotifierOptions, GraphMemoryBackend, type GraphMemoryBackendOptions, INPUT_HISTORY_DEFAULT_MAX, InputHistoryStore, MemoryBackend, type MemoryConsolidatorOptions, PromptEntry, type PromptStore, type PromptUsage, PromptUsageStore, type ProviderConfigSnapshot, type RecoveryPlan, type ReplayEntry, ReplayLogStore, type ReplayLogStoreOptions, SessionCheckpointCas, type SessionCheckpointCasOptions, SessionMemoryConsolidator, SessionRecovery, SessionRegistry, type SessionRewinderOptions, type StaleSession, SyncCategory, SyncConfig, type SyncResult, type TaskFile, ToolAuditLog, type ToolAuditLogOptions, type VerifyResult, type WatchProviderConfigOptions, emptyTaskFile, generateSessionId, loadCompletedWorkCheckpoint, loadTasks, migratePromptEntry, mutateTasks, promptChecksum, sanitizeModel, saveCompletedWorkCheckpoint, saveTasks, watchProviderConfig };
|
|
1
|
+
export { DefaultSessionStore, type SessionStoreOptions, } from './session-store.js';
|
|
2
|
+
export { SessionCheckpointCas, type CheckpointGitResult, type SessionCheckpointCasOptions, } from './session-checkpoint-cas.js';
|
|
3
|
+
export { generateSessionId, sanitizeModel } from './session-id.js';
|
|
4
|
+
export { QueueStore, type PersistedQueueItem, } from './queue-store.js';
|
|
5
|
+
export { DefaultAttachmentStore, type AttachmentStoreOptions, } from './attachment-store.js';
|
|
6
|
+
export { DefaultMemoryStore, type MemoryStoreOptions, } from './memory-store.js';
|
|
7
|
+
export { FileMemoryBackend, type FileMemoryBackendOptions, type MemoryBackend, parseEntries, } from './memory-backend.js';
|
|
8
|
+
export { GraphMemoryBackend, type GraphMemoryBackendOptions, } from './memory-graph-backend.js';
|
|
9
|
+
export { SessionMemoryConsolidator, type MemoryConsolidatorOptions, type ConsolidationOp, } from './memory-consolidator.js';
|
|
10
|
+
export { DefaultConfigStore } from './config-store.js';
|
|
11
|
+
export { watchProviderConfig, type ProviderConfigSnapshot, type WatchProviderConfigOptions, } from './provider-config-watcher.js';
|
|
12
|
+
export { DefaultConfigLoader, type ConfigLoaderOptions, type ConfigSource, } from './config-loader.js';
|
|
13
|
+
export { runConfigMigrations, ConfigMigrationError, DEFAULT_CONFIG_MIGRATIONS, type ConfigMigration, type MigrationContext, type MigrationResult, } from './config-migration.js';
|
|
14
|
+
export { RecoveryLock, type RecoveryLockOptions, type AbandonedSession, } from './recovery-lock.js';
|
|
15
|
+
export { DefaultSessionReader } from './session-reader.js';
|
|
16
|
+
export type { SessionReader, DefaultSessionReaderOptions } from '../types/session-reader.js';
|
|
17
|
+
export { AnnotationsStore, type Annotation, type AnnotationsStoreOptions, } from './annotations-store.js';
|
|
18
|
+
export { ReplayLogStore, type ReplayEntry, type ReplayLogStoreOptions, } from './replay-log-store.js';
|
|
19
|
+
export { SessionRecovery, type StaleSession, type RecoveryPlan, } from './session-recovery.js';
|
|
20
|
+
export { ToolAuditLog, type AuditEntry, type ToolAuditLogOptions, type VerifyResult, } from './tool-audit-log.js';
|
|
21
|
+
export { SessionAnalyzer } from './session-analyzer.js';
|
|
22
|
+
export { SessionRegistry, getSessionRegistry, hasSessionRegistry, type SessionRegistryEntry, type AgentEntry, type AgentLiveStatus, type SessionLiveStatus, } from '../session-registry.js';
|
|
23
|
+
export { AgentStatusTracker, type AgentStatusTrackerOptions, } from '../agent-status-tracker.js';
|
|
24
|
+
export { FleetNotifier, type FleetNotifierOptions, } from '../fleet-notifier.js';
|
|
25
|
+
export { DefaultSessionRewinder, type SessionRewinderOptions, } from './session-rewinder.js';
|
|
26
|
+
export { attachTodosCheckpoint, loadTodosCheckpoint, saveTodosCheckpoint, type TodosCheckpointFile, } from './todos-checkpoint.js';
|
|
27
|
+
export { loadCompletedWorkCheckpoint, saveCompletedWorkCheckpoint, type CompletedWorkCheckpointFile, } from './completed-work-checkpoint.js';
|
|
28
|
+
export { attachPlanCheckpoint, loadPlan, savePlan, emptyPlan, addPlanItem, removePlanItem, setPlanItemStatus, clearPlan, formatPlan, deriveTodosFromPlanItem, mutatePlan, type PlanItem, type PlanFile, } from './plan-store.js';
|
|
29
|
+
export { listPlanTemplates, getPlanTemplate, formatPlanTemplates, type PlanTemplate, } from './plan-templates.js';
|
|
30
|
+
export { loadTasks, saveTasks, emptyTaskFile, mutateTasks, type TaskFile, } from './task-store.js';
|
|
31
|
+
export { DirectorStateCheckpoint, loadDirectorState, type DirectorStateSnapshot, type DirectorTaskState, type DirectorSubagentState, } from './director-state.js';
|
|
32
|
+
export { loadGoal, saveGoal, emptyGoal, appendJournal, formatGoal, setProgress, recordProgress, parseProgressFromText, goalFilePath, summarizeUsage, MAX_JOURNAL_ENTRIES, MAX_PROGRESS_HISTORY, type GoalFile, type JournalEntry, type ProgressSnapshot, } from './goal-store.js';
|
|
33
|
+
export { DefaultPromptStore, migratePromptEntry, promptChecksum, type PromptStore, type PromptEntry, } from './prompt-store.js';
|
|
34
|
+
export { PromptUsageStore, type PromptUsage } from './prompt-usage-store.js';
|
|
35
|
+
export { InputHistoryStore, INPUT_HISTORY_DEFAULT_MAX, } from './input-history-store.js';
|
|
36
|
+
export { CloudSync, type SyncResult, ALL_SYNC_CATEGORIES, } from './cloud-sync.js';
|
|
37
|
+
export { createSessionEventBridge, resolveAuditLevel, resolveSessionLoggingConfig, type SessionEventBridge, type AuditLevel, type SessionEventBridgeOptions, type SessionSamplingOptions, type ToolProgressSamplingOptions, CORE_RECONSTRUCT_EVENTS, STANDARD_AUDIT_EVENTS, } from './session-event-bridge.js';
|
|
38
|
+
export type { SyncConfig, SyncCategory } from '../types/config.js';
|
|
39
|
+
//# sourceMappingURL=index.d.ts.map
|