@wrongstack/core 0.284.1 → 0.286.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-status-tracker.d.ts +74 -0
- package/dist/agent-status-tracker.d.ts.map +1 -0
- package/dist/autophase/auto-phase-planner.d.ts +79 -0
- package/dist/autophase/auto-phase-planner.d.ts.map +1 -0
- package/dist/autophase/auto-phase-runner.d.ts +79 -0
- package/dist/autophase/auto-phase-runner.d.ts.map +1 -0
- package/dist/autophase/checkpoint.d.ts +49 -0
- package/dist/autophase/checkpoint.d.ts.map +1 -0
- package/dist/autophase/index.d.ts +9 -0
- package/dist/autophase/index.d.ts.map +1 -0
- package/dist/autophase/phase-graph-builder.d.ts +46 -0
- package/dist/autophase/phase-graph-builder.d.ts.map +1 -0
- package/dist/autophase/phase-orchestrator.d.ts +150 -0
- package/dist/autophase/phase-orchestrator.d.ts.map +1 -0
- package/dist/autophase/phase-store.d.ts +29 -0
- package/dist/autophase/phase-store.d.ts.map +1 -0
- package/dist/autophase/types.d.ts +329 -0
- package/dist/autophase/types.d.ts.map +1 -0
- package/dist/boot.d.ts +73 -0
- package/dist/boot.d.ts.map +1 -0
- package/dist/coordination/adaptive-concurrency.d.ts +63 -0
- package/dist/coordination/adaptive-concurrency.d.ts.map +1 -0
- package/dist/coordination/agent-bridge.d.ts +24 -0
- package/dist/coordination/agent-bridge.d.ts.map +1 -0
- package/dist/coordination/agent-monitor.d.ts +129 -0
- package/dist/coordination/agent-monitor.d.ts.map +1 -0
- package/dist/coordination/agent-subagent-runner.d.ts +74 -0
- package/dist/coordination/agent-subagent-runner.d.ts.map +1 -0
- package/dist/coordination/agents/agent-prompts.d.ts +2 -0
- package/dist/coordination/agents/agent-prompts.d.ts.map +1 -0
- package/dist/coordination/agents/index.d.ts +35 -0
- package/dist/coordination/agents/index.d.ts.map +1 -0
- package/dist/coordination/agents/phase1-discovery.d.ts +4 -0
- package/dist/coordination/agents/phase1-discovery.d.ts.map +1 -0
- package/dist/coordination/agents/phase2-planning.d.ts +4 -0
- package/dist/coordination/agents/phase2-planning.d.ts.map +1 -0
- package/dist/coordination/agents/phase3-build.d.ts +4 -0
- package/dist/coordination/agents/phase3-build.d.ts.map +1 -0
- package/dist/coordination/agents/phase3-techstack.d.ts +13 -0
- package/dist/coordination/agents/phase3-techstack.d.ts.map +1 -0
- package/dist/coordination/agents/phase4-verify.d.ts +4 -0
- package/dist/coordination/agents/phase4-verify.d.ts.map +1 -0
- package/dist/coordination/agents/phase5-review.d.ts +4 -0
- package/dist/coordination/agents/phase5-review.d.ts.map +1 -0
- package/dist/coordination/agents/phase6-domain.d.ts +4 -0
- package/dist/coordination/agents/phase6-domain.d.ts.map +1 -0
- package/dist/coordination/agents/phase7-knowledge.d.ts +4 -0
- package/dist/coordination/agents/phase7-knowledge.d.ts.map +1 -0
- package/dist/coordination/agents/phase8-delivery.d.ts +4 -0
- package/dist/coordination/agents/phase8-delivery.d.ts.map +1 -0
- package/dist/coordination/agents/phase9-meta.d.ts +4 -0
- package/dist/coordination/agents/phase9-meta.d.ts.map +1 -0
- package/dist/coordination/agents/types.d.ts +79 -0
- package/dist/coordination/agents/types.d.ts.map +1 -0
- package/dist/coordination/agents.d.ts +8 -0
- package/dist/coordination/agents.d.ts.map +1 -0
- package/dist/coordination/auto-extend.d.ts +46 -0
- package/dist/coordination/auto-extend.d.ts.map +1 -0
- package/dist/coordination/autonomous-brain.d.ts +152 -0
- package/dist/coordination/autonomous-brain.d.ts.map +1 -0
- package/dist/coordination/autonomous-coordinator.d.ts +243 -0
- package/dist/coordination/autonomous-coordinator.d.ts.map +1 -0
- package/dist/coordination/brain-ledger.d.ts +142 -0
- package/dist/coordination/brain-ledger.d.ts.map +1 -0
- package/dist/coordination/brain-monitor.d.ts +103 -0
- package/dist/coordination/brain-monitor.d.ts.map +1 -0
- package/dist/coordination/brain.d.ts +147 -0
- package/dist/coordination/brain.d.ts.map +1 -0
- package/dist/coordination/change-manager.d.ts +151 -0
- package/dist/coordination/change-manager.d.ts.map +1 -0
- package/dist/coordination/checkpoint-wiring.d.ts +61 -0
- package/dist/coordination/checkpoint-wiring.d.ts.map +1 -0
- package/dist/coordination/collab-bus.d.ts +132 -0
- package/dist/coordination/collab-bus.d.ts.map +1 -0
- package/dist/coordination/collab-debug.d.ts +302 -0
- package/dist/coordination/collab-debug.d.ts.map +1 -0
- package/dist/coordination/commit-safety.d.ts +72 -0
- package/dist/coordination/commit-safety.d.ts.map +1 -0
- package/dist/coordination/consensus-protocol.d.ts +106 -0
- package/dist/coordination/consensus-protocol.d.ts.map +1 -0
- package/dist/coordination/coordinator/error-classifier.d.ts +15 -0
- package/dist/coordination/coordinator/error-classifier.d.ts.map +1 -0
- package/dist/coordination/delegate-tool.d.ts +101 -0
- package/dist/coordination/delegate-tool.d.ts.map +1 -0
- package/dist/coordination/dep-watcher-bridge.d.ts +47 -0
- package/dist/coordination/dep-watcher-bridge.d.ts.map +1 -0
- package/dist/coordination/dep-watcher.d.ts +74 -0
- package/dist/coordination/dep-watcher.d.ts.map +1 -0
- package/dist/coordination/director/director-errors.d.ts +29 -0
- package/dist/coordination/director/director-errors.d.ts.map +1 -0
- package/dist/coordination/director-construction.d.ts +90 -0
- package/dist/coordination/director-construction.d.ts.map +1 -0
- package/dist/coordination/director-prompts.d.ts +119 -0
- package/dist/coordination/director-prompts.d.ts.map +1 -0
- package/dist/coordination/director-session.d.ts +68 -0
- package/dist/coordination/director-session.d.ts.map +1 -0
- package/dist/coordination/director-tools.d.ts +65 -0
- package/dist/coordination/director-tools.d.ts.map +1 -0
- package/dist/coordination/director.d.ts +802 -0
- package/dist/coordination/director.d.ts.map +1 -0
- package/dist/coordination/dispatcher.d.ts +82 -0
- package/dist/coordination/dispatcher.d.ts.map +1 -0
- package/dist/coordination/file-author-tracker.d.ts +76 -0
- package/dist/coordination/file-author-tracker.d.ts.map +1 -0
- package/dist/coordination/fleet-bus.d.ts +122 -0
- package/dist/coordination/fleet-bus.d.ts.map +1 -0
- package/dist/coordination/fleet-event-validation.d.ts +10 -0
- package/dist/coordination/fleet-event-validation.d.ts.map +1 -0
- package/dist/coordination/fleet-manager.d.ts +234 -0
- package/dist/coordination/fleet-manager.d.ts.map +1 -0
- package/dist/coordination/fleet-spawn.d.ts +102 -0
- package/dist/coordination/fleet-spawn.d.ts.map +1 -0
- package/dist/coordination/fleet-status-tool.d.ts +36 -0
- package/dist/coordination/fleet-status-tool.d.ts.map +1 -0
- package/dist/coordination/fleet-supervisor.d.ts +157 -0
- package/dist/coordination/fleet-supervisor.d.ts.map +1 -0
- package/dist/coordination/fleet.d.ts +96 -0
- package/dist/coordination/fleet.d.ts.map +1 -0
- package/dist/coordination/global-mailbox.d.ts +295 -0
- package/dist/coordination/global-mailbox.d.ts.map +1 -0
- package/dist/coordination/icoordinator.d.ts +97 -0
- package/dist/coordination/icoordinator.d.ts.map +1 -0
- package/dist/coordination/ifleet-manager.d.ts +177 -0
- package/dist/coordination/ifleet-manager.d.ts.map +1 -0
- package/dist/coordination/in-memory-transport.d.ts +12 -0
- package/dist/coordination/in-memory-transport.d.ts.map +1 -0
- package/dist/coordination/index.d.ts +79 -2587
- package/dist/coordination/index.d.ts.map +1 -0
- package/dist/coordination/index.js +2262 -673
- package/dist/coordination/index.js.map +7 -1
- package/dist/coordination/knowledge-graph.d.ts +229 -0
- package/dist/coordination/knowledge-graph.d.ts.map +1 -0
- package/dist/coordination/large-answer-store.d.ts +61 -0
- package/dist/coordination/large-answer-store.d.ts.map +1 -0
- package/dist/coordination/mail-tools.d.ts +34 -0
- package/dist/coordination/mail-tools.d.ts.map +1 -0
- package/dist/coordination/mailbox-actions.d.ts +67 -0
- package/dist/coordination/mailbox-actions.d.ts.map +1 -0
- package/dist/coordination/mailbox-constants.d.ts +64 -0
- package/dist/coordination/mailbox-constants.d.ts.map +1 -0
- package/dist/coordination/mailbox-events.d.ts +32 -0
- package/dist/coordination/mailbox-events.d.ts.map +1 -0
- package/dist/coordination/mailbox-health.d.ts +131 -0
- package/dist/coordination/mailbox-health.d.ts.map +1 -0
- package/dist/coordination/mailbox-hooks.d.ts +55 -0
- package/dist/coordination/mailbox-hooks.d.ts.map +1 -0
- package/dist/coordination/mailbox-message-codec.d.ts +8 -0
- package/dist/coordination/mailbox-message-codec.d.ts.map +1 -0
- package/dist/coordination/mailbox-tool.d.ts +75 -0
- package/dist/coordination/mailbox-tool.d.ts.map +1 -0
- package/dist/{mailbox-types-BGZWrYTJ.d.ts → coordination/mailbox-types.d.ts} +125 -26
- package/dist/coordination/mailbox-types.d.ts.map +1 -0
- package/dist/coordination/mailbox.d.ts +88 -0
- package/dist/coordination/mailbox.d.ts.map +1 -0
- package/dist/coordination/model-matrix.d.ts +98 -0
- package/dist/coordination/model-matrix.d.ts.map +1 -0
- package/dist/coordination/multi-agent-coordinator.d.ts +202 -0
- package/dist/coordination/multi-agent-coordinator.d.ts.map +1 -0
- package/dist/coordination/null-fleet-bus.d.ts +10 -0
- package/dist/coordination/null-fleet-bus.d.ts.map +1 -0
- package/dist/coordination/package-author-tracker.d.ts +87 -0
- package/dist/coordination/package-author-tracker.d.ts.map +1 -0
- package/dist/coordination/package-outdated-watcher.d.ts +83 -0
- package/dist/coordination/package-outdated-watcher.d.ts.map +1 -0
- package/dist/coordination/single-instance-mailbox.d.ts +154 -0
- package/dist/coordination/single-instance-mailbox.d.ts.map +1 -0
- package/dist/coordination/spawn-budget.d.ts +6 -0
- package/dist/coordination/spawn-budget.d.ts.map +1 -0
- package/dist/coordination/subagent-budget.d.ts +323 -0
- package/dist/coordination/subagent-budget.d.ts.map +1 -0
- package/dist/coordination/subagent-nicknames.d.ts +42 -0
- package/dist/coordination/subagent-nicknames.d.ts.map +1 -0
- package/dist/coordination/subagent-result-tool.d.ts +20 -0
- package/dist/coordination/subagent-result-tool.d.ts.map +1 -0
- package/dist/coordination/task-auctioneer.d.ts +143 -0
- package/dist/coordination/task-auctioneer.d.ts.map +1 -0
- package/dist/coordination/task-dag.d.ts +147 -0
- package/dist/coordination/task-dag.d.ts.map +1 -0
- package/dist/coordination/techstack-mailbox-consumer.d.ts +50 -0
- package/dist/coordination/techstack-mailbox-consumer.d.ts.map +1 -0
- package/dist/coordination/transport.d.ts +2 -0
- package/dist/coordination/transport.d.ts.map +1 -0
- package/dist/coordination/worktree-task-runner.d.ts +45 -0
- package/dist/coordination/worktree-task-runner.d.ts.map +1 -0
- package/dist/core/agent-internals.d.ts +41 -0
- package/dist/core/agent-internals.d.ts.map +1 -0
- package/dist/core/agent-loop.d.ts +18 -0
- package/dist/core/agent-loop.d.ts.map +1 -0
- package/dist/core/agent-response.d.ts +21 -0
- package/dist/core/agent-response.d.ts.map +1 -0
- package/dist/core/agent-tools.d.ts +21 -0
- package/dist/core/agent-tools.d.ts.map +1 -0
- package/dist/core/agent-types.d.ts +95 -0
- package/dist/core/agent-types.d.ts.map +1 -0
- package/dist/core/agent.d.ts +54 -0
- package/dist/core/agent.d.ts.map +1 -0
- package/dist/core/btw.d.ts +40 -0
- package/dist/core/btw.d.ts.map +1 -0
- package/dist/core/context.d.ts +269 -0
- package/dist/core/context.d.ts.map +1 -0
- package/dist/core/continue-intent.d.ts +92 -0
- package/dist/core/continue-intent.d.ts.map +1 -0
- package/dist/core/continue-to-next-iteration.d.ts +96 -0
- package/dist/core/continue-to-next-iteration.d.ts.map +1 -0
- package/dist/core/conversation-state.d.ts +96 -0
- package/dist/core/conversation-state.d.ts.map +1 -0
- package/dist/core/fallback-model.d.ts +94 -0
- package/dist/core/fallback-model.d.ts.map +1 -0
- package/dist/core/fleet-pulse.d.ts +42 -0
- package/dist/core/fleet-pulse.d.ts.map +1 -0
- package/dist/core/input-builder.d.ts +95 -0
- package/dist/core/input-builder.d.ts.map +1 -0
- package/dist/core/instruction-bundle.d.ts +22 -0
- package/dist/core/instruction-bundle.d.ts.map +1 -0
- package/dist/core/iteration-limit.d.ts +35 -0
- package/dist/core/iteration-limit.d.ts.map +1 -0
- package/dist/core/mailbox-loop.d.ts +63 -0
- package/dist/core/mailbox-loop.d.ts.map +1 -0
- package/dist/core/modes/brief.d.ts +2 -0
- package/dist/core/modes/brief.d.ts.map +1 -0
- package/dist/core/modes/default.d.ts +8 -0
- package/dist/core/modes/default.d.ts.map +1 -0
- package/dist/core/modes/teach.d.ts +2 -0
- package/dist/core/modes/teach.d.ts.map +1 -0
- package/dist/core/provider-runner.d.ts +24 -0
- package/dist/core/provider-runner.d.ts.map +1 -0
- package/dist/core/queued-messages.d.ts +55 -0
- package/dist/core/queued-messages.d.ts.map +1 -0
- package/dist/core/run-env.d.ts +49 -0
- package/dist/core/run-env.d.ts.map +1 -0
- package/dist/core/streaming-response-builder.d.ts +78 -0
- package/dist/core/streaming-response-builder.d.ts.map +1 -0
- package/dist/core/system-prompt-builder.d.ts +213 -0
- package/dist/core/system-prompt-builder.d.ts.map +1 -0
- package/dist/defaults/index.d.ts +68 -158
- package/dist/defaults/index.d.ts.map +1 -0
- package/dist/defaults/index.js +2061 -1300
- package/dist/defaults/index.js.map +7 -1
- package/dist/execution/auto-compaction-middleware.d.ts +123 -0
- package/dist/execution/auto-compaction-middleware.d.ts.map +1 -0
- package/dist/execution/autonomous-runner.d.ts +61 -0
- package/dist/execution/autonomous-runner.d.ts.map +1 -0
- package/dist/execution/autonomy-brain.d.ts +151 -0
- package/dist/execution/autonomy-brain.d.ts.map +1 -0
- package/dist/execution/autonomy-prompt-contributor.d.ts +39 -0
- package/dist/execution/autonomy-prompt-contributor.d.ts.map +1 -0
- package/dist/execution/brain-chain.d.ts +53 -0
- package/dist/execution/brain-chain.d.ts.map +1 -0
- package/dist/execution/brain-evaluation.d.ts +66 -0
- package/dist/execution/brain-evaluation.d.ts.map +1 -0
- package/dist/execution/brain-runtime.d.ts +171 -0
- package/dist/execution/brain-runtime.d.ts.map +1 -0
- package/dist/execution/compaction-core.d.ts +103 -0
- package/dist/execution/compaction-core.d.ts.map +1 -0
- package/dist/execution/compactor.d.ts +56 -0
- package/dist/execution/compactor.d.ts.map +1 -0
- package/dist/execution/council-brain.d.ts +79 -0
- package/dist/execution/council-brain.d.ts.map +1 -0
- package/dist/execution/design-color.d.ts +31 -0
- package/dist/execution/design-color.d.ts.map +1 -0
- package/dist/execution/design-detect.d.ts +96 -0
- package/dist/execution/design-detect.d.ts.map +1 -0
- package/dist/execution/design-kit-loader.d.ts +53 -0
- package/dist/execution/design-kit-loader.d.ts.map +1 -0
- package/dist/execution/design-materialize.d.ts +32 -0
- package/dist/execution/design-materialize.d.ts.map +1 -0
- package/dist/execution/design-project-store.d.ts +57 -0
- package/dist/execution/design-project-store.d.ts.map +1 -0
- package/dist/execution/design-verify.d.ts +44 -0
- package/dist/execution/design-verify.d.ts.map +1 -0
- package/dist/execution/error-handler.d.ts +34 -0
- package/dist/execution/error-handler.d.ts.map +1 -0
- package/dist/{parallel-eternal-engine-HUrtePLd.d.ts → execution/eternal-autonomy.d.ts} +22 -225
- package/dist/execution/eternal-autonomy.d.ts.map +1 -0
- package/dist/execution/goal-preamble.d.ts +2 -0
- package/dist/execution/goal-preamble.d.ts.map +1 -0
- package/dist/execution/index.d.ts +25 -180
- package/dist/execution/index.d.ts.map +1 -0
- package/dist/execution/index.js +1748 -490
- package/dist/execution/index.js.map +7 -1
- package/dist/execution/intelligent-compactor.d.ts +85 -0
- package/dist/execution/intelligent-compactor.d.ts.map +1 -0
- package/dist/execution/model-runtime.d.ts +75 -0
- package/dist/execution/model-runtime.d.ts.map +1 -0
- package/dist/execution/parallel-eternal-engine.d.ts +142 -0
- package/dist/execution/parallel-eternal-engine.d.ts.map +1 -0
- package/dist/execution/prompt-enhancer.d.ts +12 -13
- package/dist/execution/prompt-enhancer.d.ts.map +1 -0
- package/dist/execution/prompt-enhancer.js +13 -7
- package/dist/execution/prompt-enhancer.js.map +7 -1
- package/dist/execution/prompt-loader.d.ts +52 -0
- package/dist/execution/prompt-loader.d.ts.map +1 -0
- package/dist/execution/provider-runner-impl.d.ts +14 -0
- package/dist/execution/provider-runner-impl.d.ts.map +1 -0
- package/dist/execution/regex-patterns.d.ts +7 -0
- package/dist/execution/regex-patterns.d.ts.map +1 -0
- package/dist/execution/retry-policy.d.ts +35 -0
- package/dist/execution/retry-policy.d.ts.map +1 -0
- package/dist/execution/selective-compactor.d.ts +94 -0
- package/dist/execution/selective-compactor.d.ts.map +1 -0
- package/dist/execution/skill-loader.d.ts +43 -0
- package/dist/execution/skill-loader.d.ts.map +1 -0
- package/dist/execution/strategy-compactor.d.ts +43 -0
- package/dist/execution/strategy-compactor.d.ts.map +1 -0
- package/dist/execution/tool-executor.d.ts +112 -0
- package/dist/execution/tool-executor.d.ts.map +1 -0
- package/dist/extension/extension-points.d.ts +121 -0
- package/dist/extension/extension-points.d.ts.map +1 -0
- package/dist/extension/index.d.ts +3 -10
- package/dist/extension/index.d.ts.map +1 -0
- package/dist/extension/index.js +59 -5
- package/dist/extension/index.js.map +7 -1
- package/dist/extension/registry.d.ts +86 -0
- package/dist/extension/registry.d.ts.map +1 -0
- package/dist/fleet-notifier.d.ts +28 -0
- package/dist/fleet-notifier.d.ts.map +1 -0
- package/dist/hooks/http-executor.d.ts +11 -0
- package/dist/hooks/http-executor.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/registry.d.ts +71 -0
- package/dist/hooks/registry.d.ts.map +1 -0
- package/dist/hooks/runner.d.ts +65 -0
- package/dist/hooks/runner.d.ts.map +1 -0
- package/dist/hooks/shell-executor.d.ts +33 -0
- package/dist/hooks/shell-executor.d.ts.map +1 -0
- package/dist/hooks/shell-hooks-equal.d.ts +15 -0
- package/dist/hooks/shell-hooks-equal.d.ts.map +1 -0
- package/dist/hq/agent-bridge.d.ts +27 -0
- package/dist/hq/agent-bridge.d.ts.map +1 -0
- package/dist/hq/alerts.d.ts +67 -0
- package/dist/hq/alerts.d.ts.map +1 -0
- package/dist/hq/auth-store.d.ts +179 -0
- package/dist/hq/auth-store.d.ts.map +1 -0
- package/dist/hq/brain-bridge.d.ts +37 -0
- package/dist/hq/brain-bridge.d.ts.map +1 -0
- package/dist/hq/commands.d.ts +122 -0
- package/dist/hq/commands.d.ts.map +1 -0
- package/dist/hq/cost-bridge.d.ts +36 -0
- package/dist/hq/cost-bridge.d.ts.map +1 -0
- package/dist/hq/factory.d.ts +69 -0
- package/dist/hq/factory.d.ts.map +1 -0
- package/dist/hq/fleet-bridge.d.ts +39 -0
- package/dist/hq/fleet-bridge.d.ts.map +1 -0
- package/dist/hq/index.d.ts +18 -816
- package/dist/hq/index.d.ts.map +1 -0
- package/dist/hq/index.js +1043 -192
- package/dist/hq/index.js.map +7 -1
- package/dist/hq/mailbox-mapper.d.ts +27 -0
- package/dist/hq/mailbox-mapper.d.ts.map +1 -0
- package/dist/hq/persistence.d.ts +121 -0
- package/dist/hq/persistence.d.ts.map +1 -0
- package/dist/hq/protocol.d.ts +612 -0
- package/dist/hq/protocol.d.ts.map +1 -0
- package/dist/hq/publisher.d.ts +181 -0
- package/dist/hq/publisher.d.ts.map +1 -0
- package/dist/hq/redaction.d.ts +30 -0
- package/dist/hq/redaction.d.ts.map +1 -0
- package/dist/hq/session-bridge.d.ts +29 -0
- package/dist/hq/session-bridge.d.ts.map +1 -0
- package/dist/hq/tool-bridge.d.ts +41 -0
- package/dist/hq/tool-bridge.d.ts.map +1 -0
- package/dist/hq/transcript-mapper.d.ts +36 -0
- package/dist/hq/transcript-mapper.d.ts.map +1 -0
- package/dist/hq/worktree-bridge.d.ts +34 -0
- package/dist/hq/worktree-bridge.d.ts.map +1 -0
- package/dist/index.d.ts +114 -2872
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6104 -2737
- package/dist/index.js.map +7 -1
- package/dist/infrastructure/context-manager.d.ts +92 -0
- package/dist/infrastructure/context-manager.d.ts.map +1 -0
- package/dist/infrastructure/index.d.ts +6 -64
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/infrastructure/index.js +39 -12
- package/dist/infrastructure/index.js.map +7 -1
- package/dist/infrastructure/logger.d.ts +99 -0
- package/dist/infrastructure/logger.d.ts.map +1 -0
- package/dist/infrastructure/mcp-servers.d.ts +83 -0
- package/dist/infrastructure/mcp-servers.d.ts.map +1 -0
- package/dist/{path-resolver-CMS5307d.d.ts → infrastructure/path-resolver.d.ts} +3 -5
- package/dist/infrastructure/path-resolver.d.ts.map +1 -0
- package/dist/infrastructure/token-counter.d.ts +57 -0
- package/dist/infrastructure/token-counter.d.ts.map +1 -0
- package/dist/kernel/container.d.ts +84 -0
- package/dist/kernel/container.d.ts.map +1 -0
- package/dist/{events-Bgnh43r9.d.ts → kernel/events.d.ts} +134 -210
- package/dist/kernel/events.d.ts.map +1 -0
- package/dist/kernel/index.d.ts +6 -107
- package/dist/kernel/index.d.ts.map +1 -0
- package/dist/kernel/index.js +56 -4
- package/dist/kernel/index.js.map +7 -1
- package/dist/kernel/pipeline.d.ts +105 -0
- package/dist/kernel/pipeline.d.ts.map +1 -0
- package/dist/kernel/run-controller.d.ts +55 -0
- package/dist/kernel/run-controller.d.ts.map +1 -0
- package/dist/kernel/tokens.d.ts +53 -0
- package/dist/kernel/tokens.d.ts.map +1 -0
- package/dist/mailbox-attach.d.ts +27 -0
- package/dist/mailbox-attach.d.ts.map +1 -0
- package/dist/middleware/collab-pause.d.ts +73 -0
- package/dist/middleware/collab-pause.d.ts.map +1 -0
- package/dist/models/codex-catalog.d.ts +41 -0
- package/dist/models/codex-catalog.d.ts.map +1 -0
- package/dist/models/index.d.ts +8 -163
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +150 -51
- package/dist/models/index.js.map +7 -1
- package/dist/models/llm-selector.d.ts +47 -0
- package/dist/models/llm-selector.d.ts.map +1 -0
- package/dist/models/mode-store.d.ts +22 -0
- package/dist/models/mode-store.d.ts.map +1 -0
- package/dist/models/model-intelligence.d.ts +56 -0
- package/dist/models/model-intelligence.d.ts.map +1 -0
- package/dist/models/model-router.d.ts +100 -0
- package/dist/models/model-router.d.ts.map +1 -0
- package/dist/models/models-registry.d.ts +106 -0
- package/dist/models/models-registry.d.ts.map +1 -0
- package/dist/models/provider-model-resolve.d.ts +69 -0
- package/dist/models/provider-model-resolve.d.ts.map +1 -0
- package/dist/observability/event-bridge.d.ts +10 -0
- package/dist/observability/event-bridge.d.ts.map +1 -0
- package/dist/observability/health.d.ts +18 -0
- package/dist/observability/health.d.ts.map +1 -0
- package/dist/observability/index.d.ts +9 -354
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +37 -23
- package/dist/observability/index.js.map +7 -1
- package/dist/observability/metrics.d.ts +26 -0
- package/dist/observability/metrics.d.ts.map +1 -0
- package/dist/observability/otel-tracer.d.ts +41 -0
- package/dist/observability/otel-tracer.d.ts.map +1 -0
- package/dist/observability/otlp-metrics.d.ts +111 -0
- package/dist/observability/otlp-metrics.d.ts.map +1 -0
- package/dist/observability/otlp-traces.d.ts +95 -0
- package/dist/observability/otlp-traces.d.ts.map +1 -0
- package/dist/observability/prometheus.d.ts +49 -0
- package/dist/observability/prometheus.d.ts.map +1 -0
- package/dist/observability/tracer.d.ts +9 -0
- package/dist/observability/tracer.d.ts.map +1 -0
- package/dist/plugin/api.d.ts +226 -0
- package/dist/plugin/api.d.ts.map +1 -0
- package/dist/plugin/loader.d.ts +73 -0
- package/dist/plugin/loader.d.ts.map +1 -0
- package/dist/plugins/chimera-plugin.d.ts +37 -0
- package/dist/plugins/chimera-plugin.d.ts.map +1 -0
- package/dist/plugins/prompts-plugin.d.ts +26 -0
- package/dist/plugins/prompts-plugin.d.ts.map +1 -0
- package/dist/plugins/security-plugin.d.ts +19 -0
- package/dist/plugins/security-plugin.d.ts.map +1 -0
- package/dist/plugins/skills-plugin.d.ts +42 -0
- package/dist/plugins/skills-plugin.d.ts.map +1 -0
- package/dist/plugins/sync-plugin.d.ts +22 -0
- package/dist/plugins/sync-plugin.d.ts.map +1 -0
- package/dist/prompts/index.d.ts +3 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/prompt-installer.d.ts +50 -0
- package/dist/prompts/prompt-installer.d.ts.map +1 -0
- package/dist/prompts/prompt-manifest-store.d.ts +18 -0
- package/dist/prompts/prompt-manifest-store.d.ts.map +1 -0
- package/dist/registry/provider-registry.d.ts +51 -0
- package/dist/registry/provider-registry.d.ts.map +1 -0
- package/dist/registry/slash-command-registry.d.ts +61 -0
- package/dist/registry/slash-command-registry.d.ts.map +1 -0
- package/dist/registry/tool-registry.d.ts +154 -0
- package/dist/registry/tool-registry.d.ts.map +1 -0
- package/dist/replay/hash.d.ts +31 -0
- package/dist/replay/hash.d.ts.map +1 -0
- package/dist/replay/replay-provider-runner.d.ts +53 -0
- package/dist/replay/replay-provider-runner.d.ts.map +1 -0
- package/dist/{index-CbyuOE5y.d.ts → security/capabilities.d.ts} +31 -34
- package/dist/security/capabilities.d.ts.map +1 -0
- package/dist/security/config-secrets.d.ts +25 -0
- package/dist/security/config-secrets.d.ts.map +1 -0
- package/dist/security/index.d.ts +7 -8
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +354 -401
- package/dist/security/index.js.map +7 -1
- package/dist/security/permission-policy-schema.d.ts +77 -0
- package/dist/security/permission-policy-schema.d.ts.map +1 -0
- package/dist/security/permission-policy.d.ts +158 -0
- package/dist/security/permission-policy.d.ts.map +1 -0
- package/dist/security/secret-scrubber.d.ts +14 -0
- package/dist/security/secret-scrubber.d.ts.map +1 -0
- package/dist/security/secret-vault.d.ts +96 -0
- package/dist/security/secret-vault.d.ts.map +1 -0
- package/dist/security/yolo-risk.d.ts +11 -0
- package/dist/security/yolo-risk.d.ts.map +1 -0
- package/dist/{session-registry-Dvg7i_IA.d.ts → session-registry.d.ts} +8 -9
- package/dist/session-registry.d.ts.map +1 -0
- package/dist/skills/foreign-sources.d.ts +59 -0
- package/dist/skills/foreign-sources.d.ts.map +1 -0
- package/dist/skills/frontmatter.d.ts +44 -0
- package/dist/skills/frontmatter.d.ts.map +1 -0
- package/dist/skills/github-fetcher.d.ts +38 -0
- package/dist/skills/github-fetcher.d.ts.map +1 -0
- package/dist/skills/index.d.ts +11 -582
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +81 -43
- package/dist/skills/index.js.map +7 -1
- package/dist/skills/limits.d.ts +92 -0
- package/dist/skills/limits.d.ts.map +1 -0
- package/dist/skills/manifest-store.d.ts +42 -0
- package/dist/skills/manifest-store.d.ts.map +1 -0
- package/dist/skills/registry/github-direct-adapter.d.ts +17 -0
- package/dist/skills/registry/github-direct-adapter.d.ts.map +1 -0
- package/dist/skills/registry/registry-adapter.d.ts +84 -0
- package/dist/skills/registry/registry-adapter.d.ts.map +1 -0
- package/dist/skills/registry/skills-sh-adapter.d.ts +13 -0
- package/dist/skills/registry/skills-sh-adapter.d.ts.map +1 -0
- package/dist/skills/skill-generator.d.ts +82 -0
- package/dist/skills/skill-generator.d.ts.map +1 -0
- package/dist/skills/skill-installer.d.ts +124 -0
- package/dist/skills/skill-installer.d.ts.map +1 -0
- package/dist/storage/annotations-store.d.ts +118 -0
- package/dist/storage/annotations-store.d.ts.map +1 -0
- package/dist/storage/attachment-store.d.ts +31 -0
- package/dist/storage/attachment-store.d.ts.map +1 -0
- package/dist/storage/cloud-sync.d.ts +44 -0
- package/dist/storage/cloud-sync.d.ts.map +1 -0
- package/dist/storage/completed-work-checkpoint.d.ts +11 -0
- package/dist/storage/completed-work-checkpoint.d.ts.map +1 -0
- package/dist/storage/config-loader.d.ts +114 -0
- package/dist/storage/config-loader.d.ts.map +1 -0
- package/dist/storage/config-migration.d.ts +87 -0
- package/dist/storage/config-migration.d.ts.map +1 -0
- package/dist/storage/config-store.d.ts +22 -0
- package/dist/storage/config-store.d.ts.map +1 -0
- package/dist/{director-state-CMS_bMs4.d.ts → storage/director-state.d.ts} +28 -8
- package/dist/storage/director-state.d.ts.map +1 -0
- package/dist/storage/file-session-writer.d.ts +169 -0
- package/dist/storage/file-session-writer.d.ts.map +1 -0
- package/dist/{goal-store-Datpp-ar.d.ts → storage/goal-store.d.ts} +26 -19
- package/dist/storage/goal-store.d.ts.map +1 -0
- package/dist/storage/index.d.ts +39 -1031
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +783 -443
- package/dist/storage/index.js.map +7 -1
- package/dist/storage/input-history-store.d.ts +56 -0
- package/dist/storage/input-history-store.d.ts.map +1 -0
- package/dist/storage/memory-backend.d.ts +66 -0
- package/dist/storage/memory-backend.d.ts.map +1 -0
- package/dist/storage/memory-consolidator.d.ts +50 -0
- package/dist/storage/memory-consolidator.d.ts.map +1 -0
- package/dist/storage/memory-graph-backend.d.ts +117 -0
- package/dist/storage/memory-graph-backend.d.ts.map +1 -0
- package/dist/storage/memory-store.d.ts +119 -0
- package/dist/storage/memory-store.d.ts.map +1 -0
- package/dist/storage/plan-store.d.ts +78 -0
- package/dist/storage/plan-store.d.ts.map +1 -0
- package/dist/storage/plan-templates.d.ts +21 -0
- package/dist/storage/plan-templates.d.ts.map +1 -0
- package/dist/storage/prompt-store.d.ts +37 -0
- package/dist/storage/prompt-store.d.ts.map +1 -0
- package/dist/storage/prompt-usage-store.d.ts +29 -0
- package/dist/storage/prompt-usage-store.d.ts.map +1 -0
- package/dist/storage/provider-config-watcher.d.ts +34 -0
- package/dist/storage/provider-config-watcher.d.ts.map +1 -0
- package/dist/storage/queue-store.d.ts +41 -0
- package/dist/storage/queue-store.d.ts.map +1 -0
- package/dist/storage/recovery-lock.d.ts +79 -0
- package/dist/storage/recovery-lock.d.ts.map +1 -0
- package/dist/storage/replay-log-store.d.ts +97 -0
- package/dist/storage/replay-log-store.d.ts.map +1 -0
- package/dist/storage/session-analyzer.d.ts +48 -0
- package/dist/storage/session-analyzer.d.ts.map +1 -0
- package/dist/storage/session-checkpoint-cas.d.ts +37 -0
- package/dist/storage/session-checkpoint-cas.d.ts.map +1 -0
- package/dist/{session-event-bridge-D_z_mBwk.d.ts → storage/session-event-bridge.d.ts} +14 -15
- package/dist/storage/session-event-bridge.d.ts.map +1 -0
- package/dist/storage/session-helpers.d.ts +9 -0
- package/dist/storage/session-helpers.d.ts.map +1 -0
- package/dist/storage/session-id.d.ts +18 -0
- package/dist/storage/session-id.d.ts.map +1 -0
- package/dist/storage/session-reader.d.ts +21 -0
- package/dist/storage/session-reader.d.ts.map +1 -0
- package/dist/storage/session-recovery.d.ts +93 -0
- package/dist/storage/session-recovery.d.ts.map +1 -0
- package/dist/storage/session-resume-validation.d.ts +6 -0
- package/dist/storage/session-resume-validation.d.ts.map +1 -0
- package/dist/storage/session-rewinder.d.ts +21 -0
- package/dist/storage/session-rewinder.d.ts.map +1 -0
- package/dist/storage/session-store.d.ts +219 -0
- package/dist/storage/session-store.d.ts.map +1 -0
- package/dist/storage/session-summary.d.ts +12 -0
- package/dist/storage/session-summary.d.ts.map +1 -0
- package/dist/storage/session-tool-call-ends.d.ts +5 -0
- package/dist/storage/session-tool-call-ends.d.ts.map +1 -0
- package/dist/storage/storage-concurrency.d.ts +2 -0
- package/dist/storage/storage-concurrency.d.ts.map +1 -0
- package/dist/storage/task-store.d.ts +33 -0
- package/dist/storage/task-store.d.ts.map +1 -0
- package/dist/storage/todos-checkpoint.d.ts +39 -0
- package/dist/storage/todos-checkpoint.d.ts.map +1 -0
- package/dist/storage/tool-audit-log.d.ts +141 -0
- package/dist/storage/tool-audit-log.d.ts.map +1 -0
- package/dist/tasking/index.d.ts +3 -124
- package/dist/tasking/index.d.ts.map +1 -0
- package/dist/tasking/index.js +57 -4
- package/dist/tasking/index.js.map +7 -1
- package/dist/tasking/task-store.d.ts +22 -0
- package/dist/tasking/task-store.d.ts.map +1 -0
- package/dist/tasking/task-tracker.d.ts +102 -0
- package/dist/tasking/task-tracker.d.ts.map +1 -0
- package/dist/tools/index.d.ts +2 -59
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +93 -14
- package/dist/tools/index.js.map +7 -1
- package/dist/tools/mcp-control.d.ts +53 -0
- package/dist/tools/mcp-control.d.ts.map +1 -0
- package/dist/tools/mcp-use.d.ts +24 -0
- package/dist/tools/mcp-use.d.ts.map +1 -0
- package/dist/types/agent-bridge.d.ts +42 -0
- package/dist/types/agent-bridge.d.ts.map +1 -0
- package/dist/types/attachment.d.ts +54 -0
- package/dist/types/attachment.d.ts.map +1 -0
- package/dist/types/autonomy.d.ts +5 -0
- package/dist/types/autonomy.d.ts.map +1 -0
- package/dist/types/blocks.d.ts +76 -0
- package/dist/types/blocks.d.ts.map +1 -0
- package/dist/{compactor-DQLL4HTo.d.ts → types/compactor.d.ts} +5 -7
- package/dist/types/compactor.d.ts.map +1 -0
- package/dist/{config-MRqn1V-u.d.ts → types/config.d.ts} +344 -355
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/context-evidence.d.ts +68 -0
- package/dist/types/context-evidence.d.ts.map +1 -0
- package/dist/types/context-window.d.ts +35 -0
- package/dist/types/context-window.d.ts.map +1 -0
- package/dist/{default-config-B79_gJYv.d.ts → types/default-config.d.ts} +10 -11
- package/dist/types/default-config.d.ts.map +1 -0
- package/dist/types/design-kit.d.ts +91 -0
- package/dist/types/design-kit.d.ts.map +1 -0
- package/dist/{retry-policy-CQ7KwXJa.d.ts → types/error-handler.d.ts} +5 -12
- package/dist/types/error-handler.d.ts.map +1 -0
- package/dist/types/errors.d.ts +277 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/hooks.d.ts +167 -0
- package/dist/types/hooks.d.ts.map +1 -0
- package/dist/types/index.d.ts +40 -244
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +101 -12
- package/dist/types/index.js.map +7 -1
- package/dist/{input-reader-E-ffP2ee.d.ts → types/input-reader.d.ts} +3 -4
- package/dist/types/input-reader.d.ts.map +1 -0
- package/dist/{logger-B63L5bTg.d.ts → types/logger.d.ts} +3 -4
- package/dist/types/logger.d.ts.map +1 -0
- package/dist/types/memory.d.ts +89 -0
- package/dist/types/memory.d.ts.map +1 -0
- package/dist/types/messages.d.ts +24 -0
- package/dist/types/messages.d.ts.map +1 -0
- package/dist/types/mode-prompts.d.ts +2 -0
- package/dist/types/mode-prompts.d.ts.map +1 -0
- package/dist/{mode-CZlO9iU1.d.ts → types/mode.d.ts} +6 -7
- package/dist/types/mode.d.ts.map +1 -0
- package/dist/types/models-registry.d.ts +105 -0
- package/dist/types/models-registry.d.ts.map +1 -0
- package/dist/types/multi-agent.d.ts +443 -0
- package/dist/types/multi-agent.d.ts.map +1 -0
- package/dist/{observability-D-HZN_mF.d.ts → types/observability.d.ts} +17 -13
- package/dist/types/observability.d.ts.map +1 -0
- package/dist/{path-resolver-CPRj4bFY.d.ts → types/path-resolver.d.ts} +2 -3
- package/dist/types/path-resolver.d.ts.map +1 -0
- package/dist/{permission-ByDKXEcG.d.ts → types/permission.d.ts} +8 -9
- package/dist/types/permission.d.ts.map +1 -0
- package/dist/types/plugin.d.ts +385 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/prompt-registry.d.ts +81 -0
- package/dist/types/prompt-registry.d.ts.map +1 -0
- package/dist/{prompt-DLd35n4Q.d.ts → types/prompt.d.ts} +14 -15
- package/dist/types/prompt.d.ts.map +1 -0
- package/dist/{provider-runner-ChL-kVg6.d.ts → types/provider-runner.d.ts} +9 -10
- package/dist/types/provider-runner.d.ts.map +1 -0
- package/dist/types/provider.d.ts +387 -0
- package/dist/types/provider.d.ts.map +1 -0
- package/dist/types/renderer.d.ts +23 -0
- package/dist/types/renderer.d.ts.map +1 -0
- package/dist/types/retry-policy.d.ts +7 -0
- package/dist/types/retry-policy.d.ts.map +1 -0
- package/dist/types/secret-scrubber.d.ts +5 -0
- package/dist/types/secret-scrubber.d.ts.map +1 -0
- package/dist/{secret-vault-BAKpgFw_.d.ts → types/secret-vault.d.ts} +13 -7
- package/dist/types/secret-vault.d.ts.map +1 -0
- package/dist/{selector-D8O6B_Rm.d.ts → types/selector.d.ts} +4 -6
- package/dist/types/selector.d.ts.map +1 -0
- package/dist/types/session-reader.d.ts +81 -0
- package/dist/types/session-reader.d.ts.map +1 -0
- package/dist/{session-rewinder-C9HnMkhP.d.ts → types/session-rewinder.d.ts} +5 -6
- package/dist/types/session-rewinder.d.ts.map +1 -0
- package/dist/types/session.d.ts +650 -0
- package/dist/types/session.d.ts.map +1 -0
- package/dist/types/side-effect.d.ts +34 -0
- package/dist/types/side-effect.d.ts.map +1 -0
- package/dist/{skill-DHniprNl.d.ts → types/skill.d.ts} +4 -5
- package/dist/types/skill.d.ts.map +1 -0
- package/dist/types/slash-command.d.ts +59 -0
- package/dist/types/slash-command.d.ts.map +1 -0
- package/dist/types/spec.d.ts +77 -0
- package/dist/types/spec.d.ts.map +1 -0
- package/dist/types/system-prompt-contributor.d.ts +20 -0
- package/dist/types/system-prompt-contributor.d.ts.map +1 -0
- package/dist/types/system-prompt.d.ts +51 -0
- package/dist/types/system-prompt.d.ts.map +1 -0
- package/dist/{task-graph-CH3acNQ7.d.ts → types/task-graph.d.ts} +21 -22
- package/dist/types/task-graph.d.ts.map +1 -0
- package/dist/types/token-counter.d.ts +42 -0
- package/dist/types/token-counter.d.ts.map +1 -0
- package/dist/types/tool-executor.d.ts +133 -0
- package/dist/types/tool-executor.d.ts.map +1 -0
- package/dist/types/tool-markers.d.ts +23 -0
- package/dist/types/tool-markers.d.ts.map +1 -0
- package/dist/types/tool.d.ts +252 -0
- package/dist/types/tool.d.ts.map +1 -0
- package/dist/types/utility-types.d.ts +31 -0
- package/dist/types/utility-types.d.ts.map +1 -0
- package/dist/utils/assert-never.d.ts +14 -0
- package/dist/utils/assert-never.d.ts.map +1 -0
- package/dist/utils/atomic-write.d.ts +12 -0
- package/dist/utils/atomic-write.d.ts.map +1 -0
- package/dist/utils/child-env.d.ts +67 -0
- package/dist/utils/child-env.d.ts.map +1 -0
- package/dist/utils/color.d.ts +20 -0
- package/dist/utils/color.d.ts.map +1 -0
- package/dist/utils/config-json.d.ts +14 -0
- package/dist/utils/config-json.d.ts.map +1 -0
- package/dist/utils/context-evidence.d.ts +47 -0
- package/dist/utils/context-evidence.d.ts.map +1 -0
- package/dist/utils/deep-merge.d.ts +64 -0
- package/dist/utils/deep-merge.d.ts.map +1 -0
- package/dist/utils/diff.d.ts +11 -0
- package/dist/utils/diff.d.ts.map +1 -0
- package/dist/utils/error.d.ts +2 -3
- package/dist/utils/error.d.ts.map +1 -0
- package/dist/utils/error.js +3 -3
- package/dist/utils/error.js.map +7 -1
- package/dist/utils/expect-defined.d.ts +2 -3
- package/dist/utils/expect-defined.d.ts.map +1 -0
- package/dist/utils/expect-defined.js +3 -3
- package/dist/utils/expect-defined.js.map +7 -1
- package/dist/utils/glob-expand.d.ts +10 -0
- package/dist/utils/glob-expand.d.ts.map +1 -0
- package/dist/utils/glob-match.d.ts +4 -0
- package/dist/utils/glob-match.d.ts.map +1 -0
- package/dist/utils/incoming-images.d.ts +39 -0
- package/dist/utils/incoming-images.d.ts.map +1 -0
- package/dist/utils/index.d.ts +38 -920
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +323 -36
- package/dist/utils/index.js.map +7 -1
- package/dist/utils/instruction-file.d.ts +3 -0
- package/dist/utils/instruction-file.d.ts.map +1 -0
- package/dist/utils/ip-guard.d.ts +34 -0
- package/dist/utils/ip-guard.d.ts.map +1 -0
- package/dist/utils/json-repair.d.ts +23 -0
- package/dist/utils/json-repair.d.ts.map +1 -0
- package/dist/utils/json-schema-validate.d.ts +42 -0
- package/dist/utils/json-schema-validate.d.ts.map +1 -0
- package/dist/utils/lru-cache.d.ts +29 -0
- package/dist/utils/lru-cache.d.ts.map +1 -0
- package/dist/utils/merge-custom-models.d.ts +12 -0
- package/dist/utils/merge-custom-models.d.ts.map +1 -0
- package/dist/utils/merge-models-payload.d.ts +20 -0
- package/dist/utils/merge-models-payload.d.ts.map +1 -0
- package/dist/utils/message-invariants.d.ts +22 -0
- package/dist/utils/message-invariants.d.ts.map +1 -0
- package/dist/utils/newline-normalize.d.ts +5 -0
- package/dist/utils/newline-normalize.d.ts.map +1 -0
- package/dist/utils/regex-guard.d.ts +21 -0
- package/dist/utils/regex-guard.d.ts.map +1 -0
- package/dist/utils/safe-json.d.ts +31 -0
- package/dist/utils/safe-json.d.ts.map +1 -0
- package/dist/utils/session-scoped-path.d.ts +13 -0
- package/dist/utils/session-scoped-path.d.ts.map +1 -0
- package/dist/utils/sleep.d.ts +5 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/slug.d.ts +13 -0
- package/dist/utils/slug.d.ts.map +1 -0
- package/dist/utils/string.d.ts +9 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/task-format.d.ts +22 -0
- package/dist/utils/task-format.d.ts.map +1 -0
- package/dist/utils/term.d.ts +133 -0
- package/dist/utils/term.d.ts.map +1 -0
- package/dist/utils/todos-format.d.ts +30 -0
- package/dist/utils/todos-format.d.ts.map +1 -0
- package/dist/utils/token-estimate.d.ts +112 -0
- package/dist/utils/token-estimate.d.ts.map +1 -0
- package/dist/utils/tool-description-mode.d.ts +28 -0
- package/dist/utils/tool-description-mode.d.ts.map +1 -0
- package/dist/utils/tool-output-serializer.d.ts +40 -0
- package/dist/utils/tool-output-serializer.d.ts.map +1 -0
- package/dist/utils/tool-result-render-mode.d.ts +55 -0
- package/dist/utils/tool-result-render-mode.d.ts.map +1 -0
- package/dist/utils/tool-subject.d.ts +5 -0
- package/dist/utils/tool-subject.d.ts.map +1 -0
- package/dist/utils/tool-wire-compact.d.ts +28 -0
- package/dist/utils/tool-wire-compact.d.ts.map +1 -0
- package/dist/utils/ulid.d.ts +11 -0
- package/dist/utils/ulid.d.ts.map +1 -0
- package/dist/{wstack-paths-C3K40Qst.d.ts → utils/wstack-paths.d.ts} +7 -8
- package/dist/utils/wstack-paths.d.ts.map +1 -0
- package/dist/worktree/index.d.ts +2 -0
- package/dist/worktree/index.d.ts.map +1 -0
- package/dist/{worktree-manager-DzwxKE35.d.ts → worktree/worktree-manager.d.ts} +32 -17
- package/dist/worktree/worktree-manager.d.ts.map +1 -0
- package/instructions/agents/browser.md +25 -16
- package/instructions/autonomy/active-mission.md +2 -4
- package/instructions/coordination/subagent-baseline.md +16 -2
- package/instructions/leader-after-task.md +3 -1
- package/instructions/sections/tool/common-patterns.md +7 -1
- package/instructions/sections/tool/delegation-full.md +1 -1
- package/instructions/system.md +47 -0
- package/package.json +4 -5
- package/skills/docker-deploy/SKILL.md +1 -1
- package/skills/node-modern/SKILL.md +2 -2
- package/skills/plugin-author/SKILL.md +9 -16
- package/skills/wrongstack-mailbox/SKILL.md +51 -12
- package/dist/dispatcher-types.d-BBeXBQgS.d.ts +0 -66
- package/dist/global-mailbox-sZwyI6CS.d.ts +0 -959
- package/dist/index--Gm41aBJ.d.ts +0 -671
- package/dist/mcp-servers-DEV4s6Ks.d.ts +0 -259
- package/dist/multi-agent-coordinator-4RCRZKjN.d.ts +0 -1770
- package/dist/null-fleet-bus-CFoNVQEK.d.ts +0 -2127
- package/dist/pipeline-DGDyIohT.d.ts +0 -331
- package/dist/provider-model-resolve-o2hHLs79.d.ts +0 -263
- package/dist/secret-scrubber-3MHDDAtm.d.ts +0 -6
- package/dist/secret-vault-DxohkUBc.d.ts +0 -272
- package/dist/session-reader-7Esxrkpw.d.ts +0 -155
- package/dist/task-format-GX0B1mMC.d.ts +0 -23
- package/dist/todos-checkpoint-FY7PjmMx.d.ts +0 -850
- package/dist/tool-BNlnIJvo.d.ts +0 -2190
- package/dist/tool-executor-CckSCM5E.d.ts +0 -906
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import type { Context } from '../core/context.js';
|
|
2
|
+
export type Permission = 'auto' | 'confirm' | 'deny';
|
|
3
|
+
/**
|
|
4
|
+
* Risk tier for tools in UI/audit surfaces. YOLO auto-approves non-denied
|
|
5
|
+
* calls regardless of risk tier; when YOLO is off, risk can inform prompts.
|
|
6
|
+
*
|
|
7
|
+
* - `safe` — read-only, no side effects (read, glob, grep, etc.)
|
|
8
|
+
* - `standard` — non-destructive writes and mutations (write, edit, safe shell commands)
|
|
9
|
+
* - `destructive` — irreversible or broadside effects (recursive deletes, db drops, etc.)
|
|
10
|
+
*/
|
|
11
|
+
export type RiskTier = 'safe' | 'standard' | 'destructive';
|
|
12
|
+
/**
|
|
13
|
+
* Icon identifiers for tools — each UI (WebUI/TUI/REPL) maps these to its own icon library.
|
|
14
|
+
* Add the icon directly on each Tool so all UIs consume the same canonical value.
|
|
15
|
+
*/
|
|
16
|
+
export type ToolIconId = 'file' | 'edit' | 'search' | 'folder' | 'terminal' | 'web' | 'git' | 'tree' | 'code' | 'test' | 'package' | 'document' | 'scaffold' | 'todo' | 'plan' | 'task' | 'meta' | 'index' | 'json' | 'diff' | 'logs' | 'settings' | 'fallback';
|
|
17
|
+
export interface JSONSchema {
|
|
18
|
+
type?: string | undefined;
|
|
19
|
+
properties?: Record<string, JSONSchema>;
|
|
20
|
+
required?: string[] | undefined;
|
|
21
|
+
items?: JSONSchema | undefined;
|
|
22
|
+
enum?: unknown[] | undefined;
|
|
23
|
+
description?: string | undefined;
|
|
24
|
+
[k: string]: unknown;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Tool progress event — yielded by `Tool.executeStream` to give the UI
|
|
28
|
+
* something to render while a long-running tool works. The executor
|
|
29
|
+
* publishes each event via EventBus as `tool.progress` so the TUI, logger,
|
|
30
|
+
* and observability layer can consume them uniformly.
|
|
31
|
+
*
|
|
32
|
+
* Keep events small. They are buffered through the EventBus synchronously
|
|
33
|
+
* and rendered on the main thread.
|
|
34
|
+
*/
|
|
35
|
+
export interface ToolProgressEvent {
|
|
36
|
+
/**
|
|
37
|
+
* - `log` — verbose informational message (e.g. "scanning…")
|
|
38
|
+
* - `warning` — non-fatal issue (e.g. "skipped X due to ENOENT")
|
|
39
|
+
* - `metric` — numeric data (e.g. files scanned so far)
|
|
40
|
+
* - `file_changed` — a tool that mutates the workspace announces a write
|
|
41
|
+
* - `partial_output` — stream of textual output (bash stdout, fetch body)
|
|
42
|
+
*/
|
|
43
|
+
type: 'log' | 'warning' | 'metric' | 'file_changed' | 'partial_output';
|
|
44
|
+
text?: string | undefined;
|
|
45
|
+
data?: Record<string, unknown>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Terminal event for `executeStream`. The output must match the tool's
|
|
49
|
+
* declared output type — the executor unwraps `output` and treats it like
|
|
50
|
+
* a normal `execute` return value.
|
|
51
|
+
*/
|
|
52
|
+
export interface ToolFinalEvent<O> {
|
|
53
|
+
type: 'final';
|
|
54
|
+
output: O;
|
|
55
|
+
}
|
|
56
|
+
export type ToolStreamEvent<O = unknown> = ToolProgressEvent | ToolFinalEvent<O>;
|
|
57
|
+
export interface Tool<I = unknown, O = unknown> {
|
|
58
|
+
name: string;
|
|
59
|
+
description: string;
|
|
60
|
+
/**
|
|
61
|
+
* Pre-computed token estimate for this tool's definition (name +
|
|
62
|
+
* description + JSON-serialized inputSchema). Set by ToolRegistry on
|
|
63
|
+
* registration; consumed by estimateToolDefTokens / estimateRequestTokens
|
|
64
|
+
* to skip redundant JSON.stringify on every context-pressure check.
|
|
65
|
+
*/
|
|
66
|
+
_estDefTokens?: number | undefined;
|
|
67
|
+
usageHint?: string | undefined;
|
|
68
|
+
/** Structured guidance for choosing between similar tools. */
|
|
69
|
+
selection?: {
|
|
70
|
+
/** A concise boundary where this tool should not be selected. */
|
|
71
|
+
doNotUseWhen: string;
|
|
72
|
+
/** Tool names the model should prefer for that boundary. */
|
|
73
|
+
useInstead?: readonly string[] | undefined;
|
|
74
|
+
} | undefined;
|
|
75
|
+
/** Optional category for grouping in help lists and system prompts. */
|
|
76
|
+
category?: string | undefined;
|
|
77
|
+
inputSchema: JSONSchema;
|
|
78
|
+
permission: Permission;
|
|
79
|
+
mutating: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Risk tier for selective YOLO gating. When YOLO is active, clearly
|
|
82
|
+
* destructive calls still emit `confirm`. Defaults to `standard` when
|
|
83
|
+
* omitted — callers should always check `riskTier` after the basic
|
|
84
|
+
* permission decision.
|
|
85
|
+
*/
|
|
86
|
+
riskTier?: RiskTier | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Input-field name that the permission policy should match trust rules
|
|
89
|
+
* against. Without this, the policy falls back to a heuristic
|
|
90
|
+
* (`command` / `path` / `url` / `name`) that can collide across tools —
|
|
91
|
+
* e.g. an HTTP tool whose `path` means "request path" would be checked
|
|
92
|
+
* against filesystem-path trust rules. Set explicitly to avoid the
|
|
93
|
+
* cross-tool subject collision.
|
|
94
|
+
*
|
|
95
|
+
* The named field's value must be a string at runtime; non-string values
|
|
96
|
+
* fall back to the heuristic.
|
|
97
|
+
*/
|
|
98
|
+
subjectKey?: string | undefined;
|
|
99
|
+
maxOutputBytes?: number | undefined;
|
|
100
|
+
timeoutMs?: number | undefined;
|
|
101
|
+
/**
|
|
102
|
+
* The tool owns its timeout/idle policy and only needs the executor to
|
|
103
|
+
* propagate the parent abort signal. Use this sparingly for orchestration
|
|
104
|
+
* tools such as `delegate` that already enforce a heartbeat-aware timeout;
|
|
105
|
+
* otherwise the executor's fixed max-tool timeout can kill healthy work.
|
|
106
|
+
*/
|
|
107
|
+
managesOwnTimeout?: boolean | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* Hint for the TUI spinner — does NOT affect actual timeout enforcement.
|
|
110
|
+
* Use `timeoutMs` for hard limits. Leave undefined when duration varies
|
|
111
|
+
* unpredictably.
|
|
112
|
+
*/
|
|
113
|
+
estimatedDurationMs?: number | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Declarative security capabilities granted by this tool.
|
|
116
|
+
*
|
|
117
|
+
* Examples: "shell.arbitrary", "fs.write", "fs.write.outside-project",
|
|
118
|
+
* "net.outbound", "mcp.proxy", "subagent.spawn", "config.mutate".
|
|
119
|
+
*
|
|
120
|
+
* These are used by permission policies (especially subagent guards) and
|
|
121
|
+
* future capability-based allowlists. Prefer well-known values over ad-hoc strings.
|
|
122
|
+
*
|
|
123
|
+
* This field is optional for backward compatibility. Tools without it are
|
|
124
|
+
* treated conservatively by guards.
|
|
125
|
+
*/
|
|
126
|
+
capabilities?: readonly string[] | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* Icon identifier for this tool — consumed by all UIs (WebUI/TUI/REPL) to
|
|
129
|
+
* render a tool-specific icon instead of a generic fallback.
|
|
130
|
+
* Each UI maps this id to its own icon library.
|
|
131
|
+
*/
|
|
132
|
+
icon?: ToolIconId | undefined;
|
|
133
|
+
execute(input: I, ctx: Context, opts: {
|
|
134
|
+
signal: AbortSignal;
|
|
135
|
+
}): Promise<O>;
|
|
136
|
+
/**
|
|
137
|
+
* Optional cross-field validation hook. Called by the executor AFTER
|
|
138
|
+
* JSON Schema validation passes and AFTER PreToolUse hooks may have
|
|
139
|
+
* rewritten the input, but BEFORE permission checks and execution.
|
|
140
|
+
*
|
|
141
|
+
* Use this for invariants the JSON Schema cannot express — e.g.
|
|
142
|
+
* `old_string !== new_string` in edit, or `end > start` in a range tool.
|
|
143
|
+
* Return an array of validation errors (empty = valid). The executor
|
|
144
|
+
* surfaces them to the model just like schema validation errors, so the
|
|
145
|
+
* model can self-correct without the tool's `execute()` running.
|
|
146
|
+
*
|
|
147
|
+
* P3 #16 (before-release.md): tools that implement cross-field checks
|
|
148
|
+
* inside `execute()` can migrate them here for earlier rejection and
|
|
149
|
+
* consistent error formatting.
|
|
150
|
+
*/
|
|
151
|
+
validate?(input: I): string[];
|
|
152
|
+
/**
|
|
153
|
+
* Optional streaming variant. When defined, the executor prefers this
|
|
154
|
+
* over `execute` — yielded events become `tool.progress` EventBus events
|
|
155
|
+
* and the terminal `final` event provides the output. Tools that don't
|
|
156
|
+
* have intermediate state shouldn't implement this; the default `execute`
|
|
157
|
+
* path is more efficient.
|
|
158
|
+
*/
|
|
159
|
+
executeStream?(input: I, ctx: Context, opts: {
|
|
160
|
+
signal: AbortSignal;
|
|
161
|
+
}): AsyncIterable<ToolStreamEvent<O>>;
|
|
162
|
+
/**
|
|
163
|
+
* Optional teardown hook fired by the executor when the tool's run is
|
|
164
|
+
* aborted (signal triggered). Errors thrown here are swallowed so they
|
|
165
|
+
* never mask the originating failure.
|
|
166
|
+
*
|
|
167
|
+
* **When to use `cleanup` vs `ctx.registerAbortHook`:**
|
|
168
|
+
*
|
|
169
|
+
* - Use `cleanup` for resources **owned by the tool author** that are
|
|
170
|
+
* established at execute-time: child processes spawned by the tool,
|
|
171
|
+
* file handles opened by the tool, network connections initiated by
|
|
172
|
+
* the tool. The lifecycle is co-located with the tool definition, so
|
|
173
|
+
* readers see the resource and its teardown in one place.
|
|
174
|
+
*
|
|
175
|
+
* ```ts
|
|
176
|
+
* async execute(input, ctx, opts) {
|
|
177
|
+
* const child = spawn(...);
|
|
178
|
+
* // … tool work …
|
|
179
|
+
* },
|
|
180
|
+
* async cleanup(_input, _ctx) {
|
|
181
|
+
* // best-effort kill of any child still running
|
|
182
|
+
* }
|
|
183
|
+
* ```
|
|
184
|
+
*
|
|
185
|
+
* - Use `ctx.registerAbortHook` for **context-scoped teardown** registered
|
|
186
|
+
* dynamically inside `execute`: when the tool delegates to a library
|
|
187
|
+
* that needs cancellation, or when the resource is created lazily
|
|
188
|
+
* somewhere down the call stack and the natural cleanup point isn't
|
|
189
|
+
* at the tool boundary. The hook fires when the **agent run** ends,
|
|
190
|
+
* not when this specific tool call aborts.
|
|
191
|
+
*
|
|
192
|
+
* ```ts
|
|
193
|
+
* async execute(input, ctx, opts) {
|
|
194
|
+
* const handle = openHelper();
|
|
195
|
+
* ctx.registerAbortHook(() => handle.dispose());
|
|
196
|
+
* // … work …
|
|
197
|
+
* }
|
|
198
|
+
* ```
|
|
199
|
+
*
|
|
200
|
+
* If both are registered for the same resource, `cleanup` fires first
|
|
201
|
+
* (on tool abort) and the abort-hook fires after on the wider run abort.
|
|
202
|
+
* Avoid double-free by gating one on the other's effect, or pick a single
|
|
203
|
+
* teardown channel per resource.
|
|
204
|
+
*/
|
|
205
|
+
cleanup?(input: I, ctx: Context): Promise<void>;
|
|
206
|
+
/**
|
|
207
|
+
* Optional custom output serializer. When present, the executor's output
|
|
208
|
+
* serializer calls this INSTEAD of the central `renderToolObject()` switch
|
|
209
|
+
* — the tool owns its own pretty-printing.
|
|
210
|
+
*
|
|
211
|
+
* Return a string representation of the output that the model will see in
|
|
212
|
+
* its tool_result block. The serializer applies the iteration output cap
|
|
213
|
+
* AFTER this runs, so don't worry about truncation.
|
|
214
|
+
*
|
|
215
|
+
* P3 #21 (before-release.md): `renderToolObject()` is a god function with
|
|
216
|
+
* 30+ per-tool branches, far from each tool's definition. New tools that
|
|
217
|
+
* want custom output no longer need to add a branch there — they implement
|
|
218
|
+
* this method instead. Existing branches stay until migrated incrementally.
|
|
219
|
+
*/
|
|
220
|
+
serialize?(output: O, input: I): string;
|
|
221
|
+
}
|
|
222
|
+
export interface ToolCallContext {
|
|
223
|
+
tool: Tool;
|
|
224
|
+
input: unknown;
|
|
225
|
+
callId: string;
|
|
226
|
+
ctx: Context;
|
|
227
|
+
signal: AbortSignal;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Error categories for tool execution failures.
|
|
231
|
+
* Used by the executor to classify errors and determine retry strategy.
|
|
232
|
+
*/
|
|
233
|
+
export declare enum ToolErrorCategory {
|
|
234
|
+
TRANSIENT = "transient",// ETIMEDOUT, ECONNRESET, network timeout, HTTP 429/503
|
|
235
|
+
NOT_FOUND = "not_found",// ENOENT, ENOTDIR, HTTP 404
|
|
236
|
+
PERMISSION = "permission",// EACCES, EPERM, HTTP 401/403
|
|
237
|
+
VALIDATION = "validation",// schema validation error, HTTP 400
|
|
238
|
+
FATAL = "fatal"
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Structured tool error information for the LLM and retry logic.
|
|
242
|
+
*/
|
|
243
|
+
export interface ToolErrorInfo {
|
|
244
|
+
readonly category: ToolErrorCategory;
|
|
245
|
+
/** Whether the operation can be retried automatically. */
|
|
246
|
+
readonly retryable: boolean;
|
|
247
|
+
/** User-facing message describing the error. */
|
|
248
|
+
readonly userMessage: string;
|
|
249
|
+
/** Optional technical detail for debugging. */
|
|
250
|
+
readonly detail?: string;
|
|
251
|
+
}
|
|
252
|
+
//# sourceMappingURL=tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/types/tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAErD;;;;;;;GAOG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,aAAa,CAAC;AAE3D;;;GAGG;AACH,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,KAAK,GACL,KAAK,GACL,MAAM,GACN,MAAM,GACN,MAAM,GACN,SAAS,GACT,UAAU,GACV,UAAU,GACV,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,MAAM,GACN,UAAU,GACV,UAAU,CAAC;AAEf,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAChC,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,IAAI,EAAE,KAAK,GAAG,SAAS,GAAG,QAAQ,GAAG,cAAc,GAAG,gBAAgB,CAAC;IACvE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,CAAC,CAAC;CACX;AAED,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,OAAO,IAAI,iBAAiB,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;AAEjF,MAAM,WAAW,IAAI,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,8DAA8D;IAC9D,SAAS,CAAC,EAAE;QACV,iEAAiE;QACjE,YAAY,EAAE,MAAM,CAAC;QACrB,4DAA4D;QAC5D,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;KAC5C,GAAG,SAAS,CAAC;IACd,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,WAAW,EAAE,UAAU,CAAC;IACxB,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAChC;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACxC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEzC;;;;;;;;;;;OAWG;IACH,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAC7C;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC9B,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE;QAAE,MAAM,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3E;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC;IAC9B;;;;;;OAMG;IACH,aAAa,CAAC,CACZ,KAAK,EAAE,CAAC,EACR,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE;QAAE,MAAM,EAAE,WAAW,CAAA;KAAE,GAC5B,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACH,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC;CACzC;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;CACrB;AAED;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B,SAAS,cAAc,CAAE,uDAAuD;IAChF,SAAS,cAAc,CAAE,4BAA4B;IACrD,UAAU,eAAe,CAAE,8BAA8B;IACzD,UAAU,eAAe,CAAE,oCAAoC;IAC/D,KAAK,UAAU;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,0DAA0D;IAC1D,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,gDAAgD;IAChD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,+CAA+C;IAC/C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared type-level utilities used across WrongStack packages.
|
|
3
|
+
*
|
|
4
|
+
* These are pure type helpers with no runtime footprint. They solve
|
|
5
|
+
* recurring TypeScript pattern problems that the standard library
|
|
6
|
+
* types (Pick, Omit, Partial, etc.) don't handle well — particularly
|
|
7
|
+
* around discriminated unions and distribution.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Distributive version of the built-in {@link Omit}.
|
|
11
|
+
*
|
|
12
|
+
* **Why this exists:** The standard `Omit<T, K>` is defined as
|
|
13
|
+
* `Pick<T, Exclude<keyof T, K>>`. When `T` is a discriminated union,
|
|
14
|
+
* `keyof T` returns the *intersection* of all members' keys — not
|
|
15
|
+
* what you want. `Omit<{ a: 1 } | { b: 2 }, 'id'>` collapses to `{}`.
|
|
16
|
+
*
|
|
17
|
+
* `DistributiveOmit` forces distribution over each union member via
|
|
18
|
+
* a conditional type (`T extends unknown`), yielding the expected
|
|
19
|
+
* result: `Omit<{ a: 1 }, 'id'> | Omit<{ b: 2 }, 'id'>`.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* type Entry = { id: number; kind: 'user'; text: string }
|
|
24
|
+
* | { id: number; kind: 'tool'; name: string };
|
|
25
|
+
*
|
|
26
|
+
* type Broken = Omit<Entry, 'id'>; // {}
|
|
27
|
+
* type Working = DistributiveOmit<Entry, 'id'>; // { kind: 'user'; text } | { kind: 'tool'; name }
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export type DistributiveOmit<T, K extends string | number | symbol> = T extends unknown ? Omit<T, K> : never;
|
|
31
|
+
//# sourceMappingURL=utility-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility-types.d.ts","sourceRoot":"","sources":["../../src/types/utility-types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,OAAO,GACnF,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACV,KAAK,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exhaustiveness check for discriminated union switches.
|
|
3
|
+
* Place in the `default` branch of a switch over a union type
|
|
4
|
+
* to get a compile-time error when a new variant is added.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* switch (block.type) {
|
|
8
|
+
* case 'text': return renderText(block);
|
|
9
|
+
* case 'tool_use': return renderToolUse(block);
|
|
10
|
+
* default: return assertNever(block);
|
|
11
|
+
* }
|
|
12
|
+
*/
|
|
13
|
+
export declare function assertNever(x: never, message?: string): never;
|
|
14
|
+
//# sourceMappingURL=assert-never.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert-never.d.ts","sourceRoot":"","sources":["../../src/utils/assert-never.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAM7D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface AtomicWriteOptions {
|
|
2
|
+
mode?: number | undefined;
|
|
3
|
+
encoding?: BufferEncoding | undefined;
|
|
4
|
+
}
|
|
5
|
+
export interface FileLockOptions {
|
|
6
|
+
timeoutMs?: number | undefined;
|
|
7
|
+
staleMs?: number | undefined;
|
|
8
|
+
}
|
|
9
|
+
export declare function atomicWrite(targetPath: string, content: string | Uint8Array, opts?: AtomicWriteOptions): Promise<void>;
|
|
10
|
+
export declare function ensureDir(dir: string): Promise<void>;
|
|
11
|
+
export declare function withFileLock<T>(targetPath: string, fn: () => Promise<T>, opts?: FileLockOptions): Promise<T>;
|
|
12
|
+
//# sourceMappingURL=atomic-write.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atomic-write.d.ts","sourceRoot":"","sources":["../../src/utils/atomic-write.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;CACvC;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED,wBAAsB,WAAW,CAC/B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,GAAG,UAAU,EAC5B,IAAI,GAAE,kBAAuB,GAC5B,OAAO,CAAC,IAAI,CAAC,CA4Df;AAED,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1D;AAED,wBAAsB,YAAY,CAAC,CAAC,EAClC,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,IAAI,GAAE,eAAoB,GACzB,OAAO,CAAC,CAAC,CAAC,CA0DZ"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build a sanitized child-process environment.
|
|
3
|
+
*
|
|
4
|
+
* The bash/exec tools and MCP stdio transports execute LLM-generated or
|
|
5
|
+
* configured commands. The parent process carries provider API keys
|
|
6
|
+
* (ANTHROPIC_API_KEY, OPENAI_API_KEY, ...), VCS tokens (GITHUB_TOKEN),
|
|
7
|
+
* and cloud credentials. Forwarding those to a child is an exfiltration
|
|
8
|
+
* vector even with `permission: 'confirm'` — a compromised MCP server
|
|
9
|
+
* or a cleverly composed shell pipeline can leak secrets.
|
|
10
|
+
*
|
|
11
|
+
* Strategy: copy a small, explicit allowlist of variables that real builds
|
|
12
|
+
* need, then copy anything else that does NOT look secret-bearing. This
|
|
13
|
+
* preserves user-friendly behavior (locale, terminal, npm config) while
|
|
14
|
+
* blocking the obvious leak channels. Two value-side guards back up the
|
|
15
|
+
* name-based filter:
|
|
16
|
+
* - any value carrying an embedded URI credential (`scheme://user:pass@host`,
|
|
17
|
+
* e.g. `DATABASE_URL`/`REDIS_URL`/`*_DSN`) is dropped (WS-01);
|
|
18
|
+
* - `NODE_OPTIONS` is forwarded but with module-preload directives
|
|
19
|
+
* (`--require`/`--import`/`--loader`) stripped so a parent-set value can't
|
|
20
|
+
* inject code into node children (WS-02).
|
|
21
|
+
*
|
|
22
|
+
* Override with `WRONGSTACK_CHILD_ENV_PASSTHROUGH=1` to forward the full
|
|
23
|
+
* parent environment unchanged (opt-in for advanced users who understand
|
|
24
|
+
* the risk).
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Strip module-preload directives from a `NODE_OPTIONS` value while preserving
|
|
28
|
+
* benign flags (`--no-warnings`, `--max-old-space-size=…`, etc.). Handles both
|
|
29
|
+
* the `--require=./x.js` and space-separated `--require ./x.js` forms. Returns
|
|
30
|
+
* the sanitized string (possibly empty).
|
|
31
|
+
*/
|
|
32
|
+
export declare function sanitizeNodeOptions(value: string): string;
|
|
33
|
+
export interface BuildChildEnvOptions {
|
|
34
|
+
/** Session ID to inject as WRONGSTACK_SESSION_ID. */
|
|
35
|
+
sessionId?: string | undefined;
|
|
36
|
+
/** Additional env vars to merge (takes priority over filtered parent env). */
|
|
37
|
+
extra?: NodeJS.ProcessEnv | undefined;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Commit identity applied to every git-touching child process via the
|
|
41
|
+
* `GIT_AUTHOR_*` / `GIT_COMMITTER_*` env vars. Env-var identity outranks
|
|
42
|
+
* every `git config` layer (repo/global/system), so commits made by any
|
|
43
|
+
* tool (git tool, bash/exec, worktree manager, plugins) carry this
|
|
44
|
+
* name/email without touching the user's git config — hand-made commits
|
|
45
|
+
* in a normal terminal are unaffected.
|
|
46
|
+
*/
|
|
47
|
+
export interface GitIdentity {
|
|
48
|
+
name?: string | undefined;
|
|
49
|
+
email?: string | undefined;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Set (or clear with `null`) the git commit identity injected by
|
|
53
|
+
* `buildChildEnv()`. Wired at boot from the user-level `config.git.identity`
|
|
54
|
+
* (the config loader strips `git` from repo-committed in-project configs —
|
|
55
|
+
* identity spoofing must not be repo-controllable) and re-applied at runtime
|
|
56
|
+
* by the `/gitid` slash command.
|
|
57
|
+
*/
|
|
58
|
+
export declare function configureChildEnvGitIdentity(identity: GitIdentity | null | undefined): void;
|
|
59
|
+
/** Current configured git identity, or null when none is set. */
|
|
60
|
+
export declare function getChildEnvGitIdentity(): Readonly<GitIdentity> | null;
|
|
61
|
+
/**
|
|
62
|
+
* Build a filtered child-process environment suitable for bash, exec, and
|
|
63
|
+
* MCP server subprocesses. Strips API keys, tokens, and other credentials
|
|
64
|
+
* while preserving system/tooling variables.
|
|
65
|
+
*/
|
|
66
|
+
export declare function buildChildEnv(optsOrSessionId?: BuildChildEnvOptions | string): NodeJS.ProcessEnv;
|
|
67
|
+
//# sourceMappingURL=child-env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"child-env.d.ts","sourceRoot":"","sources":["../../src/utils/child-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AA8FH;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAazD;AAED,MAAM,WAAW,oBAAoB;IACnC,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC,UAAU,GAAG,SAAS,CAAC;CACvC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAID;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAI3F;AAED,iEAAiE;AACjE,wBAAgB,sBAAsB,IAAI,QAAQ,CAAC,WAAW,CAAC,GAAG,IAAI,CAErE;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,eAAe,CAAC,EAAE,oBAAoB,GAAG,MAAM,GAAG,MAAM,CAAC,UAAU,CAkHhG"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const color: {
|
|
2
|
+
reset: (s: string) => string;
|
|
3
|
+
bold: (s: string) => string;
|
|
4
|
+
dim: (s: string) => string;
|
|
5
|
+
italic: (s: string) => string;
|
|
6
|
+
underline: (s: string) => string;
|
|
7
|
+
red: (s: string) => string;
|
|
8
|
+
green: (s: string) => string;
|
|
9
|
+
yellow: (s: string) => string;
|
|
10
|
+
blue: (s: string) => string;
|
|
11
|
+
magenta: (s: string) => string;
|
|
12
|
+
cyan: (s: string) => string;
|
|
13
|
+
gray: (s: string) => string;
|
|
14
|
+
amber: (s: string) => string;
|
|
15
|
+
pink: (s: string) => string;
|
|
16
|
+
bgRed: (s: string) => string;
|
|
17
|
+
bgGreen: (s: string) => string;
|
|
18
|
+
};
|
|
19
|
+
export declare function stripAnsi(s: string): string;
|
|
20
|
+
//# sourceMappingURL=color.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/utils/color.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,KAAK;IAChB,KAAK,MAJD,MAAM,KAAG,MAAM;IAKnB,IAAI;IACJ,GAAG;IACH,MAAM;IACN,SAAS;IACT,GAAG;IACH,KAAK;IACL,MAAM;IACN,IAAI;IACJ,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;IACL,OAAO;CACR,CAAC;AAEF,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type JsonObject = Record<string, unknown>;
|
|
2
|
+
export type JsonPathSegment = string | number;
|
|
3
|
+
export type JsonPath = readonly JsonPathSegment[];
|
|
4
|
+
export declare function readJsonObjectFile(filePath: string): Promise<JsonObject>;
|
|
5
|
+
export declare function jsonObjectFileExists(filePath: string): Promise<boolean>;
|
|
6
|
+
export declare function writeJsonObjectFile(filePath: string, value: JsonObject): Promise<void>;
|
|
7
|
+
export declare function updateJsonObjectFile(filePath: string, mutator: (config: JsonObject) => void | JsonObject | Promise<void | JsonObject>): Promise<JsonObject>;
|
|
8
|
+
export declare function getJsonPath(root: unknown, path: JsonPath): unknown;
|
|
9
|
+
export declare function setJsonPath(root: JsonObject, path: JsonPath, value: unknown): JsonObject;
|
|
10
|
+
export declare function removeJsonPath(root: JsonObject, path: JsonPath): boolean;
|
|
11
|
+
export declare function setJsonPathInFile(filePath: string, path: JsonPath, value: unknown): Promise<JsonObject>;
|
|
12
|
+
export declare function removeJsonPathInFile(filePath: string, path: JsonPath): Promise<JsonObject>;
|
|
13
|
+
export declare function isJsonObject(value: unknown): value is JsonObject;
|
|
14
|
+
//# sourceMappingURL=config-json.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-json.d.ts","sourceRoot":"","sources":["../../src/utils/config-json.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACjD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,CAAC;AAC9C,MAAM,MAAM,QAAQ,GAAG,SAAS,eAAe,EAAE,CAAC;AAElD,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAO9E;AAED,wBAAsB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO7E;AAED,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5F;AAED,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,GAAG,UAAU,GAAG,OAAO,CAAC,IAAI,GAAG,UAAU,CAAC,GAC9E,OAAO,CAAC,UAAU,CAAC,CAMrB;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAYlE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,GAAG,UAAU,CAexF;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAYxE;AAED,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAE7G;AAED,wBAAsB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAIhG;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Context } from '../core/context.js';
|
|
2
|
+
import type { TextBlock } from '../types/blocks.js';
|
|
3
|
+
import type { CompletedWorkEvidence, CompletedWorkSource, ContextEvidenceState, ToolOutputMetadata } from '../types/context-evidence.js';
|
|
4
|
+
export declare function createContextEvidenceState(): ContextEvidenceState;
|
|
5
|
+
export interface RecordToolOutputEvidenceInput {
|
|
6
|
+
toolUseId: string;
|
|
7
|
+
toolName: string;
|
|
8
|
+
input: unknown;
|
|
9
|
+
content: string;
|
|
10
|
+
ok: boolean;
|
|
11
|
+
outputBytes?: number | undefined;
|
|
12
|
+
outputTokens?: number | undefined;
|
|
13
|
+
outputLines?: number | undefined;
|
|
14
|
+
}
|
|
15
|
+
export declare function recordUserIntentEvidence(ctx: Context, text: string): void;
|
|
16
|
+
export declare function recordToolOutputEvidence(ctx: Context, input: RecordToolOutputEvidenceInput): ToolOutputMetadata;
|
|
17
|
+
export declare function markAssistantReferencedEvidence(ctx: Context, text: string): void;
|
|
18
|
+
export declare function buildContextEvidenceDigest(ctx: Context): string;
|
|
19
|
+
export declare function repeatedReadPressure(ctx: Context): number;
|
|
20
|
+
/** Marker prefixing the ledger's system-prompt block (also used to find/replace it). */
|
|
21
|
+
export declare const COMPLETED_WORK_LEDGER_MARKER = "[completed_work_ledger]";
|
|
22
|
+
export interface RecordCompletedWorkInput {
|
|
23
|
+
/** Stable dedupe key, e.g. `task:<id>` — re-completion updates in place. */
|
|
24
|
+
key: string;
|
|
25
|
+
source: CompletedWorkSource;
|
|
26
|
+
summary: string;
|
|
27
|
+
/** Optional pointer to proof (test run, commit hash, file path). */
|
|
28
|
+
evidence?: string | undefined;
|
|
29
|
+
/** Epoch ms; defaults to now. */
|
|
30
|
+
completedAt?: number | undefined;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Append one finished unit of work to the session ledger. The provider request
|
|
34
|
+
* composer renders this state as a volatile tail block; the stable system-prompt
|
|
35
|
+
* prefix is never mutated here.
|
|
36
|
+
*/
|
|
37
|
+
export declare function recordCompletedWorkEvidence(ctx: Context, input: RecordCompletedWorkInput): CompletedWorkEvidence;
|
|
38
|
+
/** Render the ledger's system-prompt block text (marker + newest entries). */
|
|
39
|
+
export declare function formatCompletedWorkLedger(items: readonly CompletedWorkEvidence[]): string;
|
|
40
|
+
/** Build the current volatile completed-work block without mutating the prompt. */
|
|
41
|
+
export declare function buildCompletedWorkLedgerBlock(ctx: Context): TextBlock | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated Volatile state must be composed at request time. Kept as a
|
|
44
|
+
* compatibility no-op for embedders importing the old helper.
|
|
45
|
+
*/
|
|
46
|
+
export declare function syncCompletedWorkLedgerBlock(_ctx: Context): void;
|
|
47
|
+
//# sourceMappingURL=context-evidence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-evidence.d.ts","sourceRoot":"","sources":["../../src/utils/context-evidence.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,8BAA8B,CAAC;AAgBtC,wBAAgB,0BAA0B,IAAI,oBAAoB,CAWjE;AAED,MAAM,WAAW,6BAA6B;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,OAAO,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAED,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CASzE;AAED,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,6BAA6B,GACnC,kBAAkB,CAqDpB;AAED,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAyBhF;AAED,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAgE/D;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAEzD;AAoBD,wFAAwF;AACxF,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AAEtE,MAAM,WAAW,wBAAwB;IACvC,4EAA4E;IAC5E,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,mBAAmB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,wBAAwB,GAC9B,qBAAqB,CAiBvB;AAED,8EAA8E;AAC9E,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,SAAS,qBAAqB,EAAE,GAAG,MAAM,CAYzF;AAED,mFAAmF;AACnF,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAQjF;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAEhE"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deep merge utility — safely merges nested objects with configurable
|
|
3
|
+
* conflict resolution, array merging, and prototype-pollution guarding.
|
|
4
|
+
*
|
|
5
|
+
* Used by:
|
|
6
|
+
* - config-loader (config layer merging with primitive-array concatenation)
|
|
7
|
+
* - secret-vault (config patching)
|
|
8
|
+
* - json-path (json_merge tool with prefer-base / prefer-patch semantics)
|
|
9
|
+
*
|
|
10
|
+
* @module utils/deep-merge
|
|
11
|
+
*/
|
|
12
|
+
export declare const FORBIDDEN_PROTO_KEYS: Set<string>;
|
|
13
|
+
/** True when every element is a primitive or null (no nested objects/arrays). */
|
|
14
|
+
export declare function isPrimitiveArray(a: unknown[]): boolean;
|
|
15
|
+
export interface DeepMergeOptions {
|
|
16
|
+
/**
|
|
17
|
+
* Which side wins on collision for scalars and arrays.
|
|
18
|
+
*
|
|
19
|
+
* - `'prefer-patch'` (default): patch value replaces base value.
|
|
20
|
+
* - `'prefer-base'`: base value is kept, patch value is ignored.
|
|
21
|
+
*/
|
|
22
|
+
conflictResolution?: 'prefer-base' | 'prefer-patch';
|
|
23
|
+
/**
|
|
24
|
+
* How to handle array values.
|
|
25
|
+
*
|
|
26
|
+
* - `'replace'` (default): patch array replaces base array entirely.
|
|
27
|
+
* - `'concat-primitives'`: when both values are primitive arrays,
|
|
28
|
+
* they are concatenated and deduped (via Set). Non-primitive
|
|
29
|
+
* arrays still replace the base wholesale.
|
|
30
|
+
*/
|
|
31
|
+
arrayMode?: 'replace' | 'concat-primitives';
|
|
32
|
+
/**
|
|
33
|
+
* Skip prototype-pollution keys (`__proto__`, `constructor`, etc.).
|
|
34
|
+
* Enabled by default. Only disable when you control both inputs
|
|
35
|
+
* and the keyset (e.g. when merging trusted JSON schemas).
|
|
36
|
+
*/
|
|
37
|
+
protectProto?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Optional callback fired when a non-primitive (object) array is
|
|
40
|
+
* replaced wholesale (only relevant with `arrayMode: 'concat-primitives'`).
|
|
41
|
+
* Receives the key name, existing array length, and patch array length.
|
|
42
|
+
* Used by config-loader for debug logging.
|
|
43
|
+
*/
|
|
44
|
+
onNonPrimitiveArrayReplace?: (key: string, existingLen: number, patchLen: number) => void;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Recursively merge `patch` into `base`, returning a new object.
|
|
48
|
+
*
|
|
49
|
+
* - Nested plain objects are merged recursively.
|
|
50
|
+
* - Arrays are handled per `options.arrayMode`.
|
|
51
|
+
* - Scalar collisions are resolved per `options.conflictResolution`.
|
|
52
|
+
* - `null` and non-object values in `patch` replace the base value
|
|
53
|
+
* (unless `conflictResolution` is `'prefer-base'`).
|
|
54
|
+
* - Keys in `base` that are absent from `patch` are preserved.
|
|
55
|
+
* - `FORBIDDEN_PROTO_KEYS` are skipped in the patch (unless
|
|
56
|
+
* `options.protectProto` is set to `false`).
|
|
57
|
+
*
|
|
58
|
+
* The function is generic over `T extends Record<string, unknown>` for
|
|
59
|
+
* callers that pass typed config objects, but the runtime signature
|
|
60
|
+
* also accepts `unknown` inputs (used by the json-path plugin).
|
|
61
|
+
*/
|
|
62
|
+
export declare function deepMerge<T extends Record<string, unknown>>(base: T, patch: Record<string, unknown>, options?: DeepMergeOptions): T;
|
|
63
|
+
export declare function deepMerge(base: unknown, patch: unknown, options?: DeepMergeOptions): unknown;
|
|
64
|
+
//# sourceMappingURL=deep-merge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deep-merge.d.ts","sourceRoot":"","sources":["../../src/utils/deep-merge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,eAAO,MAAM,oBAAoB,aAQ/B,CAAC;AAMH,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,OAAO,CAEtD;AAMD,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,aAAa,GAAG,cAAc,CAAC;IAEpD;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,mBAAmB,CAAC;IAE5C;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;;OAKG;IACH,0BAA0B,CAAC,EAAE,CAC3B,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,KACb,IAAI,CAAC;CACX;AAMD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACzD,IAAI,EAAE,CAAC,EACP,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,CAAC,EAAE,gBAAgB,GACzB,CAAC,CAAC;AAEL,wBAAgB,SAAS,CACvB,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,OAAO,EACd,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Myers diff with unified-format output. No external dependencies.
|
|
3
|
+
* Operates on arrays of lines (newline-terminated or stripped).
|
|
4
|
+
*/
|
|
5
|
+
export interface UnifiedDiffOptions {
|
|
6
|
+
context?: number | undefined;
|
|
7
|
+
fromFile?: string | undefined;
|
|
8
|
+
toFile?: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare function unifiedDiff(oldText: string, newText: string, opts?: UnifiedDiffOptions): string;
|
|
11
|
+
//# sourceMappingURL=diff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/utils/diff.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA6FH,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,kBAAuB,GAC5B,MAAM,CA4ER"}
|
package/dist/utils/error.d.ts
CHANGED
|
@@ -2,6 +2,5 @@
|
|
|
2
2
|
* Converts an unknown error value to a human-readable string.
|
|
3
3
|
* Used in 40+ files across the codebase to normalize error messaging.
|
|
4
4
|
*/
|
|
5
|
-
declare function toErrorMessage(err: unknown): string;
|
|
6
|
-
|
|
7
|
-
export { toErrorMessage };
|
|
5
|
+
export declare function toErrorMessage(err: unknown): string;
|
|
6
|
+
//# sourceMappingURL=error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/utils/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAEnD"}
|
package/dist/utils/error.js
CHANGED
package/dist/utils/error.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/error.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Converts an unknown error value to a human-readable string.\n * Used in 40+ files across the codebase to normalize error messaging.\n */\nexport function toErrorMessage(err: unknown): string {\n return err instanceof Error ? err.message : String(err);\n}\n"],
|
|
5
|
+
"mappings": ";AAIO,SAAS,eAAe,KAAsB;AACnD,SAAO,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AACxD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -2,6 +2,5 @@
|
|
|
2
2
|
* Useful after optional chaining and indexed access when the
|
|
3
3
|
* control flow guarantees the value exists but TypeScript can't
|
|
4
4
|
* prove it (e.g. after a check on a related field). */
|
|
5
|
-
declare function expectDefined<T>(value: T | null | undefined, label?: string): T;
|
|
6
|
-
|
|
7
|
-
export { expectDefined };
|
|
5
|
+
export declare function expectDefined<T>(value: T | null | undefined, label?: string): T;
|
|
6
|
+
//# sourceMappingURL=expect-defined.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expect-defined.d.ts","sourceRoot":"","sources":["../../src/utils/expect-defined.ts"],"names":[],"mappings":"AAAA;;;wDAGwD;AACxD,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,CAO/E"}
|