wotann 0.5.0 → 0.5.39
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/agents/background-agent.d.ts.map +1 -1
- package/dist/agents/background-agent.js +2 -1
- package/dist/agents/background-agent.js.map +1 -1
- package/dist/agents/file-scope-policy.d.ts +116 -0
- package/dist/agents/file-scope-policy.d.ts.map +1 -0
- package/dist/agents/file-scope-policy.js +190 -0
- package/dist/agents/file-scope-policy.js.map +1 -0
- package/dist/agents/yaml-manifest.d.ts +125 -0
- package/dist/agents/yaml-manifest.d.ts.map +1 -0
- package/dist/agents/yaml-manifest.js +901 -0
- package/dist/agents/yaml-manifest.js.map +1 -0
- package/dist/auth/login.d.ts +3 -3
- package/dist/auth/login.d.ts.map +1 -1
- package/dist/auth/login.js +80 -23
- package/dist/auth/login.js.map +1 -1
- package/dist/autopilot/completion-oracle.d.ts.map +1 -1
- package/dist/autopilot/completion-oracle.js +3 -1
- package/dist/autopilot/completion-oracle.js.map +1 -1
- package/dist/autopilot/run-manifest.d.ts +90 -0
- package/dist/autopilot/run-manifest.d.ts.map +1 -0
- package/dist/autopilot/run-manifest.js +261 -0
- package/dist/autopilot/run-manifest.js.map +1 -0
- package/dist/browser/adaptive-selectors.d.ts +170 -0
- package/dist/browser/adaptive-selectors.d.ts.map +1 -0
- package/dist/browser/adaptive-selectors.js +317 -0
- package/dist/browser/adaptive-selectors.js.map +1 -0
- package/dist/browser/humanize-input.d.ts +76 -0
- package/dist/browser/humanize-input.d.ts.map +1 -0
- package/dist/browser/humanize-input.js +386 -0
- package/dist/browser/humanize-input.js.map +1 -0
- package/dist/channels/teams.d.ts +41 -19
- package/dist/channels/teams.d.ts.map +1 -1
- package/dist/channels/teams.js +121 -24
- package/dist/channels/teams.js.map +1 -1
- package/dist/channels/terminal-mention.d.ts.map +1 -1
- package/dist/channels/terminal-mention.js +4 -1
- package/dist/channels/terminal-mention.js.map +1 -1
- package/dist/cli/commands/blast-radius.d.ts +47 -0
- package/dist/cli/commands/blast-radius.d.ts.map +1 -0
- package/dist/cli/commands/blast-radius.js +123 -0
- package/dist/cli/commands/blast-radius.js.map +1 -0
- package/dist/cli/commands/evolve.d.ts +92 -0
- package/dist/cli/commands/evolve.d.ts.map +1 -0
- package/dist/cli/commands/evolve.js +336 -0
- package/dist/cli/commands/evolve.js.map +1 -0
- package/dist/cli/commands/learning.d.ts +54 -0
- package/dist/cli/commands/learning.d.ts.map +1 -0
- package/dist/cli/commands/learning.js +380 -0
- package/dist/cli/commands/learning.js.map +1 -0
- package/dist/cli/commands/persona.d.ts +42 -0
- package/dist/cli/commands/persona.d.ts.map +1 -0
- package/dist/cli/commands/persona.js +198 -0
- package/dist/cli/commands/persona.js.map +1 -0
- package/dist/cli/commands/stuck.d.ts.map +1 -1
- package/dist/cli/commands/stuck.js +5 -2
- package/dist/cli/commands/stuck.js.map +1 -1
- package/dist/cli/commands.d.ts.map +1 -1
- package/dist/cli/commands.js +5 -2
- package/dist/cli/commands.js.map +1 -1
- package/dist/cli/orphan-wires/agent-manifest-cmd.d.ts +17 -0
- package/dist/cli/orphan-wires/agent-manifest-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/agent-manifest-cmd.js +99 -0
- package/dist/cli/orphan-wires/agent-manifest-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/arena-cmd.d.ts +26 -0
- package/dist/cli/orphan-wires/arena-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/arena-cmd.js +167 -0
- package/dist/cli/orphan-wires/arena-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/artifact-cmd.d.ts +17 -0
- package/dist/cli/orphan-wires/artifact-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/artifact-cmd.js +175 -0
- package/dist/cli/orphan-wires/artifact-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/demo-cmd.d.ts +25 -0
- package/dist/cli/orphan-wires/demo-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/demo-cmd.js +164 -0
- package/dist/cli/orphan-wires/demo-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/extras-cmd.d.ts +20 -0
- package/dist/cli/orphan-wires/extras-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/extras-cmd.js +289 -0
- package/dist/cli/orphan-wires/extras-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/harness-introspect-cmd.d.ts +15 -0
- package/dist/cli/orphan-wires/harness-introspect-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/harness-introspect-cmd.js +36 -0
- package/dist/cli/orphan-wires/harness-introspect-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/index.d.ts.map +1 -1
- package/dist/cli/orphan-wires/index.js +30 -0
- package/dist/cli/orphan-wires/index.js.map +1 -1
- package/dist/cli/orphan-wires/integrations-cmd.d.ts +38 -0
- package/dist/cli/orphan-wires/integrations-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/integrations-cmd.js +345 -0
- package/dist/cli/orphan-wires/integrations-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/mcp-scaffold-cmd.d.ts +18 -0
- package/dist/cli/orphan-wires/mcp-scaffold-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/mcp-scaffold-cmd.js +127 -0
- package/dist/cli/orphan-wires/mcp-scaffold-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/memory-consolidate-cmd.d.ts +21 -0
- package/dist/cli/orphan-wires/memory-consolidate-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/memory-consolidate-cmd.js +86 -0
- package/dist/cli/orphan-wires/memory-consolidate-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/patch-cmd.d.ts +29 -0
- package/dist/cli/orphan-wires/patch-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/patch-cmd.js +150 -0
- package/dist/cli/orphan-wires/patch-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/redteam-scan-cmd.d.ts +28 -0
- package/dist/cli/orphan-wires/redteam-scan-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/redteam-scan-cmd.js +169 -0
- package/dist/cli/orphan-wires/redteam-scan-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/scrape-adapt-cmd.d.ts +21 -0
- package/dist/cli/orphan-wires/scrape-adapt-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/scrape-adapt-cmd.js +70 -0
- package/dist/cli/orphan-wires/scrape-adapt-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/shell-tier-cmd.d.ts +20 -0
- package/dist/cli/orphan-wires/shell-tier-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/shell-tier-cmd.js +74 -0
- package/dist/cli/orphan-wires/shell-tier-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/sub-recipes-cmd.d.ts +18 -0
- package/dist/cli/orphan-wires/sub-recipes-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/sub-recipes-cmd.js +87 -0
- package/dist/cli/orphan-wires/sub-recipes-cmd.js.map +1 -0
- package/dist/cli/orphan-wires/webapp-test-cmd.d.ts +20 -0
- package/dist/cli/orphan-wires/webapp-test-cmd.d.ts.map +1 -0
- package/dist/cli/orphan-wires/webapp-test-cmd.js +115 -0
- package/dist/cli/orphan-wires/webapp-test-cmd.js.map +1 -0
- package/dist/cli/thin-client.d.ts +17 -10
- package/dist/cli/thin-client.d.ts.map +1 -1
- package/dist/cli/thin-client.js +108 -26
- package/dist/cli/thin-client.js.map +1 -1
- package/dist/computer-use/action-history-compactor.d.ts +92 -0
- package/dist/computer-use/action-history-compactor.d.ts.map +1 -0
- package/dist/computer-use/action-history-compactor.js +204 -0
- package/dist/computer-use/action-history-compactor.js.map +1 -0
- package/dist/computer-use/action-repertoire.d.ts +8 -0
- package/dist/computer-use/action-repertoire.d.ts.map +1 -1
- package/dist/computer-use/action-repertoire.js +19 -0
- package/dist/computer-use/action-repertoire.js.map +1 -1
- package/dist/computer-use/computer-agent.d.ts +232 -2
- package/dist/computer-use/computer-agent.d.ts.map +1 -1
- package/dist/computer-use/computer-agent.js +558 -19
- package/dist/computer-use/computer-agent.js.map +1 -1
- package/dist/computer-use/coordinate-scaling.d.ts +104 -0
- package/dist/computer-use/coordinate-scaling.d.ts.map +1 -0
- package/dist/computer-use/coordinate-scaling.js +175 -0
- package/dist/computer-use/coordinate-scaling.js.map +1 -0
- package/dist/computer-use/driver-contract.d.ts +158 -0
- package/dist/computer-use/driver-contract.d.ts.map +1 -0
- package/dist/computer-use/driver-contract.js +471 -0
- package/dist/computer-use/driver-contract.js.map +1 -0
- package/dist/computer-use/perception-engine.d.ts +39 -0
- package/dist/computer-use/perception-engine.d.ts.map +1 -1
- package/dist/computer-use/perception-engine.js +27 -27
- package/dist/computer-use/perception-engine.js.map +1 -1
- package/dist/computer-use/platform-bindings.d.ts.map +1 -1
- package/dist/computer-use/platform-bindings.js +216 -2
- package/dist/computer-use/platform-bindings.js.map +1 -1
- package/dist/computer-use/safe-execute.d.ts +86 -0
- package/dist/computer-use/safe-execute.d.ts.map +1 -0
- package/dist/computer-use/safe-execute.js +152 -0
- package/dist/computer-use/safe-execute.js.map +1 -0
- package/dist/context/branch-summarization.d.ts +97 -0
- package/dist/context/branch-summarization.d.ts.map +1 -0
- package/dist/context/branch-summarization.js +170 -0
- package/dist/context/branch-summarization.js.map +1 -0
- package/dist/context/compaction.d.ts +16 -1
- package/dist/context/compaction.d.ts.map +1 -1
- package/dist/context/compaction.js +50 -2
- package/dist/context/compaction.js.map +1 -1
- package/dist/context/inspector.d.ts +2 -2
- package/dist/context/inspector.d.ts.map +1 -1
- package/dist/context/inspector.js +4 -3
- package/dist/context/inspector.js.map +1 -1
- package/dist/core/agent-bridge.d.ts.map +1 -1
- package/dist/core/agent-bridge.js +200 -69
- package/dist/core/agent-bridge.js.map +1 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +7 -0
- package/dist/core/config.js.map +1 -1
- package/dist/core/mode-model-preference.d.ts +95 -0
- package/dist/core/mode-model-preference.d.ts.map +1 -0
- package/dist/core/mode-model-preference.js +170 -0
- package/dist/core/mode-model-preference.js.map +1 -0
- package/dist/core/prompt-override.d.ts.map +1 -1
- package/dist/core/prompt-override.js +1 -0
- package/dist/core/prompt-override.js.map +1 -1
- package/dist/core/runtime-intelligence.d.ts +11 -0
- package/dist/core/runtime-intelligence.d.ts.map +1 -1
- package/dist/core/runtime-intelligence.js +18 -3
- package/dist/core/runtime-intelligence.js.map +1 -1
- package/dist/core/runtime-tool-dispatch.js +1 -1
- package/dist/core/runtime-tool-dispatch.js.map +1 -1
- package/dist/core/runtime.d.ts +186 -13
- package/dist/core/runtime.d.ts.map +1 -1
- package/dist/core/runtime.js +717 -228
- package/dist/core/runtime.js.map +1 -1
- package/dist/core/session-rewind.d.ts +67 -0
- package/dist/core/session-rewind.d.ts.map +1 -0
- package/dist/core/session-rewind.js +120 -0
- package/dist/core/session-rewind.js.map +1 -0
- package/dist/core/types.d.ts +19 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/daemon/file-watcher.d.ts +84 -0
- package/dist/daemon/file-watcher.d.ts.map +1 -0
- package/dist/daemon/file-watcher.js +193 -0
- package/dist/daemon/file-watcher.js.map +1 -0
- package/dist/daemon/jsonl-mode.d.ts +11 -0
- package/dist/daemon/jsonl-mode.d.ts.map +1 -0
- package/dist/daemon/jsonl-mode.js +77 -0
- package/dist/daemon/jsonl-mode.js.map +1 -0
- package/dist/daemon/kairos-ipc.d.ts +4 -1
- package/dist/daemon/kairos-ipc.d.ts.map +1 -1
- package/dist/daemon/kairos-ipc.js +38 -22
- package/dist/daemon/kairos-ipc.js.map +1 -1
- package/dist/daemon/kairos-rpc.d.ts +5 -1
- package/dist/daemon/kairos-rpc.d.ts.map +1 -1
- package/dist/daemon/kairos-rpc.js +1262 -114
- package/dist/daemon/kairos-rpc.js.map +1 -1
- package/dist/daemon/kairos.d.ts +35 -4
- package/dist/daemon/kairos.d.ts.map +1 -1
- package/dist/daemon/kairos.js +204 -24
- package/dist/daemon/kairos.js.map +1 -1
- package/dist/daemon/rpc-handlers/intelligence-rpc.d.ts.map +1 -1
- package/dist/daemon/rpc-handlers/intelligence-rpc.js +15 -3
- package/dist/daemon/rpc-handlers/intelligence-rpc.js.map +1 -1
- package/dist/daemon/transport/jsonl.d.ts +7 -0
- package/dist/daemon/transport/jsonl.d.ts.map +1 -0
- package/dist/daemon/transport/jsonl.js +38 -0
- package/dist/daemon/transport/jsonl.js.map +1 -0
- package/dist/daemon/transport/socket-path.d.ts +28 -0
- package/dist/daemon/transport/socket-path.d.ts.map +1 -0
- package/dist/daemon/transport/socket-path.js +36 -0
- package/dist/daemon/transport/socket-path.js.map +1 -0
- package/dist/design/theme-presets.d.ts +77 -0
- package/dist/design/theme-presets.d.ts.map +1 -0
- package/dist/design/theme-presets.js +274 -0
- package/dist/design/theme-presets.js.map +1 -0
- package/dist/desktop/companion-server.d.ts +67 -4
- package/dist/desktop/companion-server.d.ts.map +1 -1
- package/dist/desktop/companion-server.js +617 -70
- package/dist/desktop/companion-server.js.map +1 -1
- package/dist/desktop/web-artifacts-builder.d.ts +108 -0
- package/dist/desktop/web-artifacts-builder.d.ts.map +1 -0
- package/dist/desktop/web-artifacts-builder.js +184 -0
- package/dist/desktop/web-artifacts-builder.js.map +1 -0
- package/dist/hooks/built-in.d.ts.map +1 -1
- package/dist/hooks/built-in.js +15 -10
- package/dist/hooks/built-in.js.map +1 -1
- package/dist/index.js +1301 -167
- package/dist/index.js.map +1 -1
- package/dist/integrations/integration-manifest.d.ts +140 -0
- package/dist/integrations/integration-manifest.d.ts.map +1 -0
- package/dist/integrations/integration-manifest.js +268 -0
- package/dist/integrations/integration-manifest.js.map +1 -0
- package/dist/intelligence/apply-patch-dsl.d.ts +112 -0
- package/dist/intelligence/apply-patch-dsl.d.ts.map +1 -0
- package/dist/intelligence/apply-patch-dsl.js +264 -0
- package/dist/intelligence/apply-patch-dsl.js.map +1 -0
- package/dist/intelligence/apply-patch-executor.d.ts +147 -0
- package/dist/intelligence/apply-patch-executor.d.ts.map +1 -0
- package/dist/intelligence/apply-patch-executor.js +418 -0
- package/dist/intelligence/apply-patch-executor.js.map +1 -0
- package/dist/intelligence/blast-radius.d.ts +67 -0
- package/dist/intelligence/blast-radius.d.ts.map +1 -0
- package/dist/intelligence/blast-radius.js +536 -0
- package/dist/intelligence/blast-radius.js.map +1 -0
- package/dist/intelligence/code-graph.d.ts +58 -7
- package/dist/intelligence/code-graph.d.ts.map +1 -1
- package/dist/intelligence/code-graph.js +347 -16
- package/dist/intelligence/code-graph.js.map +1 -1
- package/dist/intelligence/codebase-health.d.ts.map +1 -1
- package/dist/intelligence/codebase-health.js +4 -3
- package/dist/intelligence/codebase-health.js.map +1 -1
- package/dist/intelligence/codemaps.d.ts +30 -1
- package/dist/intelligence/codemaps.d.ts.map +1 -1
- package/dist/intelligence/codemaps.js +99 -16
- package/dist/intelligence/codemaps.js.map +1 -1
- package/dist/intelligence/consecutive-error-counter.d.ts +89 -0
- package/dist/intelligence/consecutive-error-counter.d.ts.map +1 -0
- package/dist/intelligence/consecutive-error-counter.js +151 -0
- package/dist/intelligence/consecutive-error-counter.js.map +1 -0
- package/dist/intelligence/eval-frameworks/redteam-plugin-catalog.d.ts +87 -0
- package/dist/intelligence/eval-frameworks/redteam-plugin-catalog.d.ts.map +1 -0
- package/dist/intelligence/eval-frameworks/redteam-plugin-catalog.js +882 -0
- package/dist/intelligence/eval-frameworks/redteam-plugin-catalog.js.map +1 -0
- package/dist/intelligence/extractors/mineru.d.ts +108 -0
- package/dist/intelligence/extractors/mineru.d.ts.map +1 -0
- package/dist/intelligence/extractors/mineru.js +352 -0
- package/dist/intelligence/extractors/mineru.js.map +1 -0
- package/dist/intelligence/harness-introspect.d.ts +124 -0
- package/dist/intelligence/harness-introspect.d.ts.map +1 -0
- package/dist/intelligence/harness-introspect.js +349 -0
- package/dist/intelligence/harness-introspect.js.map +1 -0
- package/dist/intelligence/multi-patch-voter.d.ts +59 -1
- package/dist/intelligence/multi-patch-voter.d.ts.map +1 -1
- package/dist/intelligence/multi-patch-voter.js +191 -27
- package/dist/intelligence/multi-patch-voter.js.map +1 -1
- package/dist/intelligence/multimodal-extract.d.ts +44 -0
- package/dist/intelligence/multimodal-extract.d.ts.map +1 -1
- package/dist/intelligence/multimodal-extract.js +40 -1
- package/dist/intelligence/multimodal-extract.js.map +1 -1
- package/dist/intelligence/research-loops/budgeted-research.d.ts +7 -0
- package/dist/intelligence/research-loops/budgeted-research.d.ts.map +1 -1
- package/dist/intelligence/research-loops/budgeted-research.js +18 -0
- package/dist/intelligence/research-loops/budgeted-research.js.map +1 -1
- package/dist/intelligence/research-loops/constraint-guided-explorer.d.ts +124 -0
- package/dist/intelligence/research-loops/constraint-guided-explorer.d.ts.map +1 -0
- package/dist/intelligence/research-loops/constraint-guided-explorer.js +177 -0
- package/dist/intelligence/research-loops/constraint-guided-explorer.js.map +1 -0
- package/dist/intelligence/research-loops/results-collector.d.ts +62 -0
- package/dist/intelligence/research-loops/results-collector.d.ts.map +1 -0
- package/dist/intelligence/research-loops/results-collector.js +128 -0
- package/dist/intelligence/research-loops/results-collector.js.map +1 -0
- package/dist/intelligence/research-loops/results-log.d.ts +94 -0
- package/dist/intelligence/research-loops/results-log.d.ts.map +1 -0
- package/dist/intelligence/research-loops/results-log.js +178 -0
- package/dist/intelligence/research-loops/results-log.js.map +1 -0
- package/dist/intelligence/research-loops/strategies/base-strategy.d.ts +111 -0
- package/dist/intelligence/research-loops/strategies/base-strategy.d.ts.map +1 -0
- package/dist/intelligence/research-loops/strategies/base-strategy.js +72 -0
- package/dist/intelligence/research-loops/strategies/base-strategy.js.map +1 -0
- package/dist/intelligence/research-loops/strategies/dual-confidence.d.ts +57 -0
- package/dist/intelligence/research-loops/strategies/dual-confidence.d.ts.map +1 -0
- package/dist/intelligence/research-loops/strategies/dual-confidence.js +172 -0
- package/dist/intelligence/research-loops/strategies/dual-confidence.js.map +1 -0
- package/dist/intelligence/research-loops/strategies/langgraph-agent.d.ts +68 -0
- package/dist/intelligence/research-loops/strategies/langgraph-agent.d.ts.map +1 -0
- package/dist/intelligence/research-loops/strategies/langgraph-agent.js +221 -0
- package/dist/intelligence/research-loops/strategies/langgraph-agent.js.map +1 -0
- package/dist/intelligence/research-loops/strategies/parallel-constrained.d.ts +42 -0
- package/dist/intelligence/research-loops/strategies/parallel-constrained.d.ts.map +1 -0
- package/dist/intelligence/research-loops/strategies/parallel-constrained.js +132 -0
- package/dist/intelligence/research-loops/strategies/parallel-constrained.js.map +1 -0
- package/dist/intelligence/research-loops/strategies/recursive-decomposition.d.ts +55 -0
- package/dist/intelligence/research-loops/strategies/recursive-decomposition.d.ts.map +1 -0
- package/dist/intelligence/research-loops/strategies/recursive-decomposition.js +187 -0
- package/dist/intelligence/research-loops/strategies/recursive-decomposition.js.map +1 -0
- package/dist/intelligence/research-loops/strategy-registry.d.ts +43 -0
- package/dist/intelligence/research-loops/strategy-registry.d.ts.map +1 -0
- package/dist/intelligence/research-loops/strategy-registry.js +62 -0
- package/dist/intelligence/research-loops/strategy-registry.js.map +1 -0
- package/dist/intelligence/research-strategies.d.ts +133 -0
- package/dist/intelligence/research-strategies.d.ts.map +1 -0
- package/dist/intelligence/research-strategies.js +204 -0
- package/dist/intelligence/research-strategies.js.map +1 -0
- package/dist/lib.d.ts +49 -0
- package/dist/lib.d.ts.map +1 -1
- package/dist/lib.js +133 -0
- package/dist/lib.js.map +1 -1
- package/dist/loop/tool-description-reset.d.ts +113 -0
- package/dist/loop/tool-description-reset.d.ts.map +1 -0
- package/dist/loop/tool-description-reset.js +136 -0
- package/dist/loop/tool-description-reset.js.map +1 -0
- package/dist/lsp/server-registry.d.ts.map +1 -1
- package/dist/lsp/server-registry.js +2 -1
- package/dist/lsp/server-registry.js.map +1 -1
- package/dist/lsp/symbol-operations.d.ts.map +1 -1
- package/dist/lsp/symbol-operations.js +2 -1
- package/dist/lsp/symbol-operations.js.map +1 -1
- package/dist/marketplace/acp-agent-registry.d.ts.map +1 -1
- package/dist/marketplace/acp-agent-registry.js +2 -1
- package/dist/marketplace/acp-agent-registry.js.map +1 -1
- package/dist/marketplace/marketplace-source-git.d.ts +135 -0
- package/dist/marketplace/marketplace-source-git.d.ts.map +1 -0
- package/dist/marketplace/marketplace-source-git.js +211 -0
- package/dist/marketplace/marketplace-source-git.js.map +1 -0
- package/dist/marketplace/registry.d.ts +87 -0
- package/dist/marketplace/registry.d.ts.map +1 -1
- package/dist/marketplace/registry.js +113 -2
- package/dist/marketplace/registry.js.map +1 -1
- package/dist/mcp/chrome-devtools.d.ts +62 -2
- package/dist/mcp/chrome-devtools.d.ts.map +1 -1
- package/dist/mcp/chrome-devtools.js +183 -1
- package/dist/mcp/chrome-devtools.js.map +1 -1
- package/dist/mcp/health-probe.d.ts +1 -0
- package/dist/mcp/health-probe.d.ts.map +1 -1
- package/dist/mcp/health-probe.js +32 -1
- package/dist/mcp/health-probe.js.map +1 -1
- package/dist/mcp/mcp-scaffolder.d.ts +166 -0
- package/dist/mcp/mcp-scaffolder.d.ts.map +1 -0
- package/dist/mcp/mcp-scaffolder.js +526 -0
- package/dist/mcp/mcp-scaffolder.js.map +1 -0
- package/dist/mcp/mcp-server.d.ts.map +1 -1
- package/dist/mcp/mcp-server.js +55 -0
- package/dist/mcp/mcp-server.js.map +1 -1
- package/dist/mcp/memory-mcp.d.ts +163 -0
- package/dist/mcp/memory-mcp.d.ts.map +1 -0
- package/dist/mcp/memory-mcp.js +368 -0
- package/dist/mcp/memory-mcp.js.map +1 -0
- package/dist/mcp/tool-loader.d.ts.map +1 -1
- package/dist/mcp/tool-loader.js +13 -0
- package/dist/mcp/tool-loader.js.map +1 -1
- package/dist/meet/meeting-runtime.d.ts.map +1 -1
- package/dist/meet/meeting-runtime.js +3 -1
- package/dist/meet/meeting-runtime.js.map +1 -1
- package/dist/memory/incremental-indexer.d.ts.map +1 -1
- package/dist/memory/incremental-indexer.js +5 -1
- package/dist/memory/incremental-indexer.js.map +1 -1
- package/dist/memory/qmd-integration.d.ts.map +1 -1
- package/dist/memory/qmd-integration.js +47 -15
- package/dist/memory/qmd-integration.js.map +1 -1
- package/dist/memory/two-phase-consolidator.d.ts +118 -0
- package/dist/memory/two-phase-consolidator.d.ts.map +1 -0
- package/dist/memory/two-phase-consolidator.js +265 -0
- package/dist/memory/two-phase-consolidator.js.map +1 -0
- package/dist/middleware/doom-loop.d.ts +21 -0
- package/dist/middleware/doom-loop.d.ts.map +1 -1
- package/dist/middleware/doom-loop.js +49 -6
- package/dist/middleware/doom-loop.js.map +1 -1
- package/dist/middleware/loop-detection.d.ts +176 -6
- package/dist/middleware/loop-detection.d.ts.map +1 -1
- package/dist/middleware/loop-detection.js +341 -6
- package/dist/middleware/loop-detection.js.map +1 -1
- package/dist/middleware/pipeline.d.ts +9 -1
- package/dist/middleware/pipeline.d.ts.map +1 -1
- package/dist/middleware/pipeline.js +116 -1
- package/dist/middleware/pipeline.js.map +1 -1
- package/dist/middleware/tool-flow-gate.d.ts +20 -0
- package/dist/middleware/tool-flow-gate.d.ts.map +1 -1
- package/dist/middleware/tool-flow-gate.js +93 -0
- package/dist/middleware/tool-flow-gate.js.map +1 -1
- package/dist/mobile/ios-app.d.ts +18 -1
- package/dist/mobile/ios-app.d.ts.map +1 -1
- package/dist/mobile/ios-app.js +108 -8
- package/dist/mobile/ios-app.js.map +1 -1
- package/dist/orchestration/adversarial-cut.d.ts +85 -0
- package/dist/orchestration/adversarial-cut.d.ts.map +1 -0
- package/dist/orchestration/adversarial-cut.js +222 -0
- package/dist/orchestration/adversarial-cut.js.map +1 -0
- package/dist/orchestration/agent-kanban.d.ts +147 -0
- package/dist/orchestration/agent-kanban.d.ts.map +1 -0
- package/dist/orchestration/agent-kanban.js +414 -0
- package/dist/orchestration/agent-kanban.js.map +1 -0
- package/dist/orchestration/autonomous.d.ts +111 -0
- package/dist/orchestration/autonomous.d.ts.map +1 -1
- package/dist/orchestration/autonomous.js +183 -6
- package/dist/orchestration/autonomous.js.map +1 -1
- package/dist/orchestration/elo-tournament.d.ts +90 -0
- package/dist/orchestration/elo-tournament.d.ts.map +1 -0
- package/dist/orchestration/elo-tournament.js +203 -0
- package/dist/orchestration/elo-tournament.js.map +1 -0
- package/dist/orchestration/multi-model-arena.d.ts +138 -0
- package/dist/orchestration/multi-model-arena.d.ts.map +1 -0
- package/dist/orchestration/multi-model-arena.js +298 -0
- package/dist/orchestration/multi-model-arena.js.map +1 -0
- package/dist/orchestration/review-pipeline.d.ts +78 -0
- package/dist/orchestration/review-pipeline.d.ts.map +1 -0
- package/dist/orchestration/review-pipeline.js +202 -0
- package/dist/orchestration/review-pipeline.js.map +1 -0
- package/dist/orchestration/unified-state-thread.d.ts +186 -0
- package/dist/orchestration/unified-state-thread.d.ts.map +1 -0
- package/dist/orchestration/unified-state-thread.js +327 -0
- package/dist/orchestration/unified-state-thread.js.map +1 -0
- package/dist/plugins/manager.d.ts.map +1 -1
- package/dist/plugins/manager.js +2 -1
- package/dist/plugins/manager.js.map +1 -1
- package/dist/prompt/engine.d.ts +7 -0
- package/dist/prompt/engine.d.ts.map +1 -1
- package/dist/prompt/engine.js.map +1 -1
- package/dist/prompt/modules/caveman.d.ts +51 -0
- package/dist/prompt/modules/caveman.d.ts.map +1 -0
- package/dist/prompt/modules/caveman.js +97 -0
- package/dist/prompt/modules/caveman.js.map +1 -0
- package/dist/prompt/modules/index.d.ts +1 -0
- package/dist/prompt/modules/index.d.ts.map +1 -1
- package/dist/prompt/modules/index.js +3 -0
- package/dist/prompt/modules/index.js.map +1 -1
- package/dist/providers/account-pool.d.ts.map +1 -1
- package/dist/providers/account-pool.js +1 -0
- package/dist/providers/account-pool.js.map +1 -1
- package/dist/providers/anthropic-adapter.d.ts.map +1 -1
- package/dist/providers/anthropic-adapter.js +33 -0
- package/dist/providers/anthropic-adapter.js.map +1 -1
- package/dist/providers/cloud-offload/config-loader.d.ts +20 -0
- package/dist/providers/cloud-offload/config-loader.d.ts.map +1 -0
- package/dist/providers/cloud-offload/config-loader.js +148 -0
- package/dist/providers/cloud-offload/config-loader.js.map +1 -0
- package/dist/providers/codex-adapter.d.ts.map +1 -1
- package/dist/providers/codex-adapter.js +136 -4
- package/dist/providers/codex-adapter.js.map +1 -1
- package/dist/providers/discovery.d.ts.map +1 -1
- package/dist/providers/discovery.js +20 -0
- package/dist/providers/discovery.js.map +1 -1
- package/dist/providers/effort-cascade.d.ts +113 -0
- package/dist/providers/effort-cascade.d.ts.map +1 -0
- package/dist/providers/effort-cascade.js +215 -0
- package/dist/providers/effort-cascade.js.map +1 -0
- package/dist/providers/fallback-chain.d.ts.map +1 -1
- package/dist/providers/fallback-chain.js +1 -0
- package/dist/providers/fallback-chain.js.map +1 -1
- package/dist/providers/health-check.d.ts.map +1 -1
- package/dist/providers/health-check.js +8 -0
- package/dist/providers/health-check.js.map +1 -1
- package/dist/providers/model-defaults.d.ts +1 -1
- package/dist/providers/model-defaults.d.ts.map +1 -1
- package/dist/providers/model-defaults.js +13 -1
- package/dist/providers/model-defaults.js.map +1 -1
- package/dist/providers/model-discovery.d.ts.map +1 -1
- package/dist/providers/model-discovery.js +1 -0
- package/dist/providers/model-discovery.js.map +1 -1
- package/dist/providers/ollama-adapter.d.ts.map +1 -1
- package/dist/providers/ollama-adapter.js +21 -1
- package/dist/providers/ollama-adapter.js.map +1 -1
- package/dist/providers/openai-compat-adapter.d.ts.map +1 -1
- package/dist/providers/openai-compat-adapter.js +25 -0
- package/dist/providers/openai-compat-adapter.js.map +1 -1
- package/dist/providers/preset-library.d.ts.map +1 -1
- package/dist/providers/preset-library.js +9 -0
- package/dist/providers/preset-library.js.map +1 -1
- package/dist/providers/provider-service.d.ts.map +1 -1
- package/dist/providers/provider-service.js +40 -1
- package/dist/providers/provider-service.js.map +1 -1
- package/dist/providers/registry.d.ts.map +1 -1
- package/dist/providers/registry.js +7 -0
- package/dist/providers/registry.js.map +1 -1
- package/dist/providers/sticky-rotation.d.ts +100 -0
- package/dist/providers/sticky-rotation.d.ts.map +1 -0
- package/dist/providers/sticky-rotation.js +134 -0
- package/dist/providers/sticky-rotation.js.map +1 -0
- package/dist/providers/tool-parsers/parsers.d.ts.map +1 -1
- package/dist/providers/tool-parsers/parsers.js +17 -4
- package/dist/providers/tool-parsers/parsers.js.map +1 -1
- package/dist/providers/types.d.ts +25 -0
- package/dist/providers/types.d.ts.map +1 -1
- package/dist/recipes/final-output.d.ts +74 -0
- package/dist/recipes/final-output.d.ts.map +1 -0
- package/dist/recipes/final-output.js +232 -0
- package/dist/recipes/final-output.js.map +1 -0
- package/dist/recipes/recipe-loader.d.ts.map +1 -1
- package/dist/recipes/recipe-loader.js +29 -0
- package/dist/recipes/recipe-loader.js.map +1 -1
- package/dist/recipes/recipe-runtime.d.ts.map +1 -1
- package/dist/recipes/recipe-runtime.js +31 -0
- package/dist/recipes/recipe-runtime.js.map +1 -1
- package/dist/recipes/recipe-types.d.ts +28 -0
- package/dist/recipes/recipe-types.d.ts.map +1 -1
- package/dist/recipes/sop-crystallizer.d.ts +90 -0
- package/dist/recipes/sop-crystallizer.d.ts.map +1 -0
- package/dist/recipes/sop-crystallizer.js +238 -0
- package/dist/recipes/sop-crystallizer.js.map +1 -0
- package/dist/recipes/sub-recipe-orchestrator.d.ts +126 -0
- package/dist/recipes/sub-recipe-orchestrator.d.ts.map +1 -0
- package/dist/recipes/sub-recipe-orchestrator.js +225 -0
- package/dist/recipes/sub-recipe-orchestrator.js.map +1 -0
- package/dist/sandbox/extended-backends.d.ts.map +1 -1
- package/dist/sandbox/extended-backends.js +7 -2
- package/dist/sandbox/extended-backends.js.map +1 -1
- package/dist/sandbox/seatbelt-policy.d.ts +132 -0
- package/dist/sandbox/seatbelt-policy.d.ts.map +1 -0
- package/dist/sandbox/seatbelt-policy.js +562 -0
- package/dist/sandbox/seatbelt-policy.js.map +1 -0
- package/dist/sandbox/terminal-backends.d.ts.map +1 -1
- package/dist/sandbox/terminal-backends.js +3 -1
- package/dist/sandbox/terminal-backends.js.map +1 -1
- package/dist/security/auto-mode-ruleset.d.ts +142 -0
- package/dist/security/auto-mode-ruleset.d.ts.map +1 -0
- package/dist/security/auto-mode-ruleset.js +264 -0
- package/dist/security/auto-mode-ruleset.js.map +1 -0
- package/dist/security/bash-arity-policy.d.ts +70 -0
- package/dist/security/bash-arity-policy.d.ts.map +1 -0
- package/dist/security/bash-arity-policy.js +189 -0
- package/dist/security/bash-arity-policy.js.map +1 -0
- package/dist/security/command-sanitizer.d.ts.map +1 -1
- package/dist/security/command-sanitizer.js +24 -0
- package/dist/security/command-sanitizer.js.map +1 -1
- package/dist/security/credential-broker.d.ts +136 -0
- package/dist/security/credential-broker.d.ts.map +1 -0
- package/dist/security/credential-broker.js +284 -0
- package/dist/security/credential-broker.js.map +1 -0
- package/dist/security/invisible-text-sanitizer.d.ts +114 -0
- package/dist/security/invisible-text-sanitizer.d.ts.map +1 -0
- package/dist/security/invisible-text-sanitizer.js +221 -0
- package/dist/security/invisible-text-sanitizer.js.map +1 -0
- package/dist/security/osv-check.d.ts +174 -0
- package/dist/security/osv-check.d.ts.map +1 -0
- package/dist/security/osv-check.js +409 -0
- package/dist/security/osv-check.js.map +1 -0
- package/dist/security/process-hardening.d.ts +114 -0
- package/dist/security/process-hardening.d.ts.map +1 -0
- package/dist/security/process-hardening.js +132 -0
- package/dist/security/process-hardening.js.map +1 -0
- package/dist/security/shell-escalation-tiers.d.ts +73 -0
- package/dist/security/shell-escalation-tiers.d.ts.map +1 -0
- package/dist/security/shell-escalation-tiers.js +439 -0
- package/dist/security/shell-escalation-tiers.js.map +1 -0
- package/dist/session/fork.d.ts +100 -0
- package/dist/session/fork.d.ts.map +1 -0
- package/dist/session/fork.js +223 -0
- package/dist/session/fork.js.map +1 -0
- package/dist/skills/activation-telemetry.d.ts +154 -0
- package/dist/skills/activation-telemetry.d.ts.map +1 -0
- package/dist/skills/activation-telemetry.js +274 -0
- package/dist/skills/activation-telemetry.js.map +1 -0
- package/dist/skills/agentskills-registry.d.ts +12 -1
- package/dist/skills/agentskills-registry.d.ts.map +1 -1
- package/dist/skills/agentskills-registry.js +11 -0
- package/dist/skills/agentskills-registry.js.map +1 -1
- package/dist/skills/description-optimizer.d.ts +101 -0
- package/dist/skills/description-optimizer.d.ts.map +1 -0
- package/dist/skills/description-optimizer.js +304 -0
- package/dist/skills/description-optimizer.js.map +1 -0
- package/dist/skills/history-deduper.d.ts +109 -0
- package/dist/skills/history-deduper.d.ts.map +1 -0
- package/dist/skills/history-deduper.js +222 -0
- package/dist/skills/history-deduper.js.map +1 -0
- package/dist/skills/loader.d.ts.map +1 -1
- package/dist/skills/loader.js +2 -1
- package/dist/skills/loader.js.map +1 -1
- package/dist/skills/skill-source-adapter.d.ts +16 -0
- package/dist/skills/skill-source-adapter.d.ts.map +1 -1
- package/dist/skills/skill-source-adapter.js +0 -0
- package/dist/skills/skill-source-adapter.js.map +1 -1
- package/dist/skills/skill-standard.d.ts +29 -4
- package/dist/skills/skill-standard.d.ts.map +1 -1
- package/dist/skills/skill-standard.js +139 -66
- package/dist/skills/skill-standard.js.map +1 -1
- package/dist/skills/sop-completion-gate.d.ts +137 -0
- package/dist/skills/sop-completion-gate.d.ts.map +1 -0
- package/dist/skills/sop-completion-gate.js +159 -0
- package/dist/skills/sop-completion-gate.js.map +1 -0
- package/dist/skills/sop-template.d.ts +85 -0
- package/dist/skills/sop-template.d.ts.map +1 -0
- package/dist/skills/sop-template.js +106 -0
- package/dist/skills/sop-template.js.map +1 -0
- package/dist/skills/wotann-skills-registry.d.ts +1 -1
- package/dist/skills/wotann-skills-registry.d.ts.map +1 -1
- package/dist/skills/wotann-skills-registry.js +503 -0
- package/dist/skills/wotann-skills-registry.js.map +1 -1
- package/dist/snippets/prompt-corpus.d.ts +10 -0
- package/dist/snippets/prompt-corpus.d.ts.map +1 -0
- package/dist/snippets/prompt-corpus.js +158 -0
- package/dist/snippets/prompt-corpus.js.map +1 -0
- package/dist/snippets/snippet-store.d.ts +27 -0
- package/dist/snippets/snippet-store.d.ts.map +1 -1
- package/dist/snippets/snippet-store.js +109 -6
- package/dist/snippets/snippet-store.js.map +1 -1
- package/dist/storage/sqlite-node-backend.d.ts +47 -36
- package/dist/storage/sqlite-node-backend.d.ts.map +1 -1
- package/dist/storage/sqlite-node-backend.js +250 -94
- package/dist/storage/sqlite-node-backend.js.map +1 -1
- package/dist/testing/webapp-server-lifecycle.d.ts +74 -0
- package/dist/testing/webapp-server-lifecycle.d.ts.map +1 -0
- package/dist/testing/webapp-server-lifecycle.js +272 -0
- package/dist/testing/webapp-server-lifecycle.js.map +1 -0
- package/dist/tools/markitdown-bridge.d.ts +19 -0
- package/dist/tools/markitdown-bridge.d.ts.map +1 -1
- package/dist/tools/markitdown-bridge.js +167 -2
- package/dist/tools/markitdown-bridge.js.map +1 -1
- package/dist/tools/pdf-processor.d.ts.map +1 -1
- package/dist/tools/pdf-processor.js +7 -3
- package/dist/tools/pdf-processor.js.map +1 -1
- package/dist/tools/pptx-processor.d.ts +51 -0
- package/dist/tools/pptx-processor.d.ts.map +1 -0
- package/dist/tools/pptx-processor.js +334 -0
- package/dist/tools/pptx-processor.js.map +1 -0
- package/dist/ui/App.d.ts.map +1 -1
- package/dist/ui/App.js +1661 -149
- package/dist/ui/App.js.map +1 -1
- package/dist/ui/agent-tools.d.ts +60 -0
- package/dist/ui/agent-tools.d.ts.map +1 -0
- package/dist/ui/agent-tools.js +468 -0
- package/dist/ui/agent-tools.js.map +1 -0
- package/dist/ui/alt-buffer-mode.d.ts +68 -0
- package/dist/ui/alt-buffer-mode.d.ts.map +1 -0
- package/dist/ui/alt-buffer-mode.js +114 -0
- package/dist/ui/alt-buffer-mode.js.map +1 -0
- package/dist/ui/alt-buffer.d.ts +57 -10
- package/dist/ui/alt-buffer.d.ts.map +1 -1
- package/dist/ui/alt-buffer.js +54 -12
- package/dist/ui/alt-buffer.js.map +1 -1
- package/dist/ui/components/AgentStatusPanel.d.ts.map +1 -1
- package/dist/ui/components/AgentStatusPanel.js +14 -6
- package/dist/ui/components/AgentStatusPanel.js.map +1 -1
- package/dist/ui/components/AuditLogPanel.js +3 -3
- package/dist/ui/components/AuditLogPanel.js.map +1 -1
- package/dist/ui/components/AutomationsPanel.js +3 -3
- package/dist/ui/components/AutomationsPanel.js.map +1 -1
- package/dist/ui/components/ChatView.d.ts +9 -1
- package/dist/ui/components/ChatView.d.ts.map +1 -1
- package/dist/ui/components/ChatView.js +503 -14
- package/dist/ui/components/ChatView.js.map +1 -1
- package/dist/ui/components/CommandPaletteCommands.d.ts +2 -0
- package/dist/ui/components/CommandPaletteCommands.d.ts.map +1 -1
- package/dist/ui/components/CommandPaletteCommands.js +18 -2
- package/dist/ui/components/CommandPaletteCommands.js.map +1 -1
- package/dist/ui/components/ContextHUD.d.ts.map +1 -1
- package/dist/ui/components/ContextHUD.js +3 -3
- package/dist/ui/components/ContextHUD.js.map +1 -1
- package/dist/ui/components/DispatchInbox.js +3 -3
- package/dist/ui/components/DispatchInbox.js.map +1 -1
- package/dist/ui/components/GdprPanel.d.ts.map +1 -1
- package/dist/ui/components/GdprPanel.js +2 -3
- package/dist/ui/components/GdprPanel.js.map +1 -1
- package/dist/ui/components/HistoryPicker.js +3 -3
- package/dist/ui/components/HistoryPicker.js.map +1 -1
- package/dist/ui/components/ModelPicker.d.ts +9 -6
- package/dist/ui/components/ModelPicker.d.ts.map +1 -1
- package/dist/ui/components/ModelPicker.js +12 -9
- package/dist/ui/components/ModelPicker.js.map +1 -1
- package/dist/ui/components/OptionPicker.js +3 -3
- package/dist/ui/components/OptionPicker.js.map +1 -1
- package/dist/ui/components/PermissionPrompt.js +3 -3
- package/dist/ui/components/PermissionPrompt.js.map +1 -1
- package/dist/ui/components/PromptInput.d.ts.map +1 -1
- package/dist/ui/components/PromptInput.js +65 -10
- package/dist/ui/components/PromptInput.js.map +1 -1
- package/dist/ui/components/ProviderSetupOverlay.d.ts +19 -0
- package/dist/ui/components/ProviderSetupOverlay.d.ts.map +1 -0
- package/dist/ui/components/ProviderSetupOverlay.js +124 -0
- package/dist/ui/components/ProviderSetupOverlay.js.map +1 -0
- package/dist/ui/components/StartupScreen.d.ts.map +1 -1
- package/dist/ui/components/StartupScreen.js +10 -1
- package/dist/ui/components/StartupScreen.js.map +1 -1
- package/dist/ui/components/StatusBar.d.ts.map +1 -1
- package/dist/ui/components/StatusBar.js +3 -3
- package/dist/ui/components/StatusBar.js.map +1 -1
- package/dist/ui/components/TrustPanel.js +3 -3
- package/dist/ui/components/TrustPanel.js.map +1 -1
- package/dist/ui/components/UnifiedStatusBar.d.ts.map +1 -1
- package/dist/ui/components/UnifiedStatusBar.js +76 -5
- package/dist/ui/components/UnifiedStatusBar.js.map +1 -1
- package/dist/ui/computer-action-parser.d.ts +6 -0
- package/dist/ui/computer-action-parser.d.ts.map +1 -0
- package/dist/ui/computer-action-parser.js +119 -0
- package/dist/ui/computer-action-parser.js.map +1 -0
- package/dist/ui/helpers.d.ts +1 -1
- package/dist/ui/helpers.d.ts.map +1 -1
- package/dist/ui/helpers.js +1 -1
- package/dist/ui/helpers.js.map +1 -1
- package/dist/ui/keybindings.d.ts +12 -2
- package/dist/ui/keybindings.d.ts.map +1 -1
- package/dist/ui/keybindings.js +36 -4
- package/dist/ui/keybindings.js.map +1 -1
- package/dist/ui/markdown-stream.d.ts +99 -0
- package/dist/ui/markdown-stream.d.ts.map +1 -0
- package/dist/ui/markdown-stream.js +314 -0
- package/dist/ui/markdown-stream.js.map +1 -0
- package/dist/ui/terminal-keyboard-protocol.d.ts +23 -0
- package/dist/ui/terminal-keyboard-protocol.d.ts.map +1 -0
- package/dist/ui/terminal-keyboard-protocol.js +72 -0
- package/dist/ui/terminal-keyboard-protocol.js.map +1 -0
- package/dist/ui/theme/context.d.ts +39 -0
- package/dist/ui/theme/context.d.ts.map +1 -0
- package/dist/ui/theme/context.js +42 -0
- package/dist/ui/theme/context.js.map +1 -0
- package/dist/utils/platform.d.ts +115 -0
- package/dist/utils/platform.d.ts.map +1 -0
- package/dist/utils/platform.js +146 -0
- package/dist/utils/platform.js.map +1 -0
- package/dist/verification/auto-verify-policy.d.ts +107 -0
- package/dist/verification/auto-verify-policy.d.ts.map +1 -0
- package/dist/verification/auto-verify-policy.js +309 -0
- package/dist/verification/auto-verify-policy.js.map +1 -0
- package/package.json +4 -1
- package/skills/anthropic-finance/audit-spreadsheet.md +165 -0
- package/skills/anthropic-finance/clean-data-xls.md +59 -0
- package/skills/anthropic-finance/competitive-analysis.md +288 -0
- package/skills/anthropic-finance/compliance-rules-engine.md +56 -0
- package/skills/anthropic-finance/dd-checklist.md +126 -0
- package/skills/anthropic-finance/independent-recompute.md +47 -0
- package/skills/anthropic-finance/reconcile-root-cause.md +48 -0
- package/skills/anthropic-finance/roll-forward.md +42 -0
- package/skills/anthropic-finance/untrusted-doc-parse.md +57 -0
- package/skills/anthropic-finance/variance-commentary.md +43 -0
- package/skills/doubt-driven-development.md +95 -0
- package/skills/mattpocock/diagnose.md +126 -0
- package/skills/mattpocock/grill-with-docs.md +97 -0
- package/skills/mattpocock/improve-codebase-architecture.md +80 -0
- package/skills/mattpocock/prototype.md +39 -0
- package/skills/mattpocock/review.md +87 -0
- package/skills/mattpocock/tdd.md +118 -0
- package/skills/mattpocock/zoom-out.md +17 -0
- package/skills/scientific/citation-management/SKILL.md +1113 -0
- package/skills/scientific/citation-management/assets/bibtex_template.bib +264 -0
- package/skills/scientific/citation-management/assets/citation_checklist.md +386 -0
- package/skills/scientific/citation-management/references/bibtex_formatting.md +908 -0
- package/skills/scientific/citation-management/references/citation_validation.md +794 -0
- package/skills/scientific/citation-management/references/google_scholar_search.md +725 -0
- package/skills/scientific/citation-management/references/metadata_extraction.md +870 -0
- package/skills/scientific/citation-management/references/pubmed_search.md +839 -0
- package/skills/scientific/citation-management/scripts/doi_to_bibtex.py +204 -0
- package/skills/scientific/citation-management/scripts/extract_metadata.py +569 -0
- package/skills/scientific/citation-management/scripts/format_bibtex.py +349 -0
- package/skills/scientific/citation-management/scripts/generate_schematic.py +139 -0
- package/skills/scientific/citation-management/scripts/generate_schematic_ai.py +817 -0
- package/skills/scientific/citation-management/scripts/search_google_scholar.py +282 -0
- package/skills/scientific/citation-management/scripts/search_pubmed.py +398 -0
- package/skills/scientific/citation-management/scripts/validate_citations.py +497 -0
- package/skills/scientific/database-lookup/SKILL.md +480 -0
- package/skills/scientific/database-lookup/references/addgene.md +38 -0
- package/skills/scientific/database-lookup/references/alphafold.md +40 -0
- package/skills/scientific/database-lookup/references/alphavantage.md +261 -0
- package/skills/scientific/database-lookup/references/bea.md +409 -0
- package/skills/scientific/database-lookup/references/bindingdb.md +85 -0
- package/skills/scientific/database-lookup/references/biogrid.md +110 -0
- package/skills/scientific/database-lookup/references/bls.md +235 -0
- package/skills/scientific/database-lookup/references/brenda.md +71 -0
- package/skills/scientific/database-lookup/references/cbioportal.md +206 -0
- package/skills/scientific/database-lookup/references/census.md +251 -0
- package/skills/scientific/database-lookup/references/chebi.md +103 -0
- package/skills/scientific/database-lookup/references/chembl.md +80 -0
- package/skills/scientific/database-lookup/references/clinicaltrials.md +77 -0
- package/skills/scientific/database-lookup/references/clinpgx.md +64 -0
- package/skills/scientific/database-lookup/references/clinvar.md +91 -0
- package/skills/scientific/database-lookup/references/cod.md +121 -0
- package/skills/scientific/database-lookup/references/cosmic.md +59 -0
- package/skills/scientific/database-lookup/references/dailymed.md +65 -0
- package/skills/scientific/database-lookup/references/datacommons.md +237 -0
- package/skills/scientific/database-lookup/references/dbsnp.md +143 -0
- package/skills/scientific/database-lookup/references/disgenet.md +52 -0
- package/skills/scientific/database-lookup/references/drugbank.md +54 -0
- package/skills/scientific/database-lookup/references/ecb.md +191 -0
- package/skills/scientific/database-lookup/references/emdb.md +37 -0
- package/skills/scientific/database-lookup/references/ena.md +372 -0
- package/skills/scientific/database-lookup/references/encode.md +47 -0
- package/skills/scientific/database-lookup/references/ensembl.md +539 -0
- package/skills/scientific/database-lookup/references/epa.md +232 -0
- package/skills/scientific/database-lookup/references/eurostat.md +237 -0
- package/skills/scientific/database-lookup/references/fda.md +64 -0
- package/skills/scientific/database-lookup/references/federal-reserve.md +216 -0
- package/skills/scientific/database-lookup/references/fred.md +297 -0
- package/skills/scientific/database-lookup/references/gene-ontology.md +147 -0
- package/skills/scientific/database-lookup/references/geo.md +130 -0
- package/skills/scientific/database-lookup/references/gnomad.md +93 -0
- package/skills/scientific/database-lookup/references/gtex.md +136 -0
- package/skills/scientific/database-lookup/references/gwas-catalog.md +46 -0
- package/skills/scientific/database-lookup/references/hca.md +35 -0
- package/skills/scientific/database-lookup/references/hpo.md +48 -0
- package/skills/scientific/database-lookup/references/human-protein-atlas.md +57 -0
- package/skills/scientific/database-lookup/references/interpro.md +120 -0
- package/skills/scientific/database-lookup/references/jaspar.md +50 -0
- package/skills/scientific/database-lookup/references/kegg.md +78 -0
- package/skills/scientific/database-lookup/references/lincs-l1000.md +68 -0
- package/skills/scientific/database-lookup/references/materials-project.md +123 -0
- package/skills/scientific/database-lookup/references/metabolomics-workbench.md +98 -0
- package/skills/scientific/database-lookup/references/monarch.md +46 -0
- package/skills/scientific/database-lookup/references/mousemine.md +40 -0
- package/skills/scientific/database-lookup/references/nasa-exoplanet-archive.md +112 -0
- package/skills/scientific/database-lookup/references/nasa.md +121 -0
- package/skills/scientific/database-lookup/references/ncbi-gene.md +64 -0
- package/skills/scientific/database-lookup/references/ncbi-protein.md +104 -0
- package/skills/scientific/database-lookup/references/ncbi-taxonomy.md +121 -0
- package/skills/scientific/database-lookup/references/nist.md +105 -0
- package/skills/scientific/database-lookup/references/noaa.md +199 -0
- package/skills/scientific/database-lookup/references/omim.md +114 -0
- package/skills/scientific/database-lookup/references/opentargets.md +459 -0
- package/skills/scientific/database-lookup/references/openweathermap.md +255 -0
- package/skills/scientific/database-lookup/references/pdb.md +121 -0
- package/skills/scientific/database-lookup/references/pride.md +74 -0
- package/skills/scientific/database-lookup/references/pubchem.md +145 -0
- package/skills/scientific/database-lookup/references/quickgo.md +45 -0
- package/skills/scientific/database-lookup/references/reactome.md +140 -0
- package/skills/scientific/database-lookup/references/rummageo.md +32 -0
- package/skills/scientific/database-lookup/references/sdss.md +130 -0
- package/skills/scientific/database-lookup/references/sec-edgar.md +315 -0
- package/skills/scientific/database-lookup/references/simbad.md +131 -0
- package/skills/scientific/database-lookup/references/sra.md +149 -0
- package/skills/scientific/database-lookup/references/string.md +283 -0
- package/skills/scientific/database-lookup/references/tcga-gdc.md +58 -0
- package/skills/scientific/database-lookup/references/treasury.md +215 -0
- package/skills/scientific/database-lookup/references/ucsc-genome.md +135 -0
- package/skills/scientific/database-lookup/references/uniprot.md +283 -0
- package/skills/scientific/database-lookup/references/usgs.md +260 -0
- package/skills/scientific/database-lookup/references/uspto.md +130 -0
- package/skills/scientific/database-lookup/references/who.md +283 -0
- package/skills/scientific/database-lookup/references/worldbank.md +239 -0
- package/skills/scientific/database-lookup/references/zinc.md +202 -0
- package/skills/scientific/hypothesis-generation/SKILL.md +297 -0
- package/skills/scientific/hypothesis-generation/assets/FORMATTING_GUIDE.md +672 -0
- package/skills/scientific/hypothesis-generation/assets/hypothesis_generation.sty +307 -0
- package/skills/scientific/hypothesis-generation/assets/hypothesis_report_template.tex +572 -0
- package/skills/scientific/hypothesis-generation/references/experimental_design_patterns.md +329 -0
- package/skills/scientific/hypothesis-generation/references/hypothesis_quality_criteria.md +198 -0
- package/skills/scientific/hypothesis-generation/references/literature_search_strategies.md +622 -0
- package/skills/scientific/hypothesis-generation/scripts/generate_schematic.py +139 -0
- package/skills/scientific/hypothesis-generation/scripts/generate_schematic_ai.py +817 -0
- package/skills/scientific/literature-review/SKILL.md +699 -0
- package/skills/scientific/literature-review/assets/review_template.md +412 -0
- package/skills/scientific/literature-review/references/citation_styles.md +166 -0
- package/skills/scientific/literature-review/references/database_strategies.md +455 -0
- package/skills/scientific/literature-review/scripts/generate_pdf.py +176 -0
- package/skills/scientific/literature-review/scripts/generate_schematic.py +139 -0
- package/skills/scientific/literature-review/scripts/generate_schematic_ai.py +817 -0
- package/skills/scientific/literature-review/scripts/search_databases.py +303 -0
- package/skills/scientific/literature-review/scripts/verify_citations.py +222 -0
- package/skills/scientific/markdown-mermaid-writing/SKILL.md +327 -0
- package/skills/scientific/markdown-mermaid-writing/assets/examples/example-research-report.md +221 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/architecture.md +108 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/block.md +177 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/c4.md +136 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/class.md +246 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/complex_examples.md +384 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/er.md +222 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/flowchart.md +177 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/gantt.md +138 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/git_graph.md +74 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/kanban.md +107 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/mindmap.md +74 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/packet.md +55 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/pie.md +52 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/quadrant.md +66 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/radar.md +59 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/requirement.md +88 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/sankey.md +71 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/sequence.md +174 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/state.md +150 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/timeline.md +96 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/treemap.md +66 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/user_journey.md +108 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/xy_chart.md +53 -0
- package/skills/scientific/markdown-mermaid-writing/references/diagrams/zenuml.md +71 -0
- package/skills/scientific/markdown-mermaid-writing/references/markdown_style_guide.md +733 -0
- package/skills/scientific/markdown-mermaid-writing/references/mermaid_style_guide.md +458 -0
- package/skills/scientific/markdown-mermaid-writing/templates/decision_record.md +211 -0
- package/skills/scientific/markdown-mermaid-writing/templates/how_to_guide.md +275 -0
- package/skills/scientific/markdown-mermaid-writing/templates/issue.md +303 -0
- package/skills/scientific/markdown-mermaid-writing/templates/kanban.md +223 -0
- package/skills/scientific/markdown-mermaid-writing/templates/presentation.md +312 -0
- package/skills/scientific/markdown-mermaid-writing/templates/project_documentation.md +412 -0
- package/skills/scientific/markdown-mermaid-writing/templates/pull_request.md +319 -0
- package/skills/scientific/markdown-mermaid-writing/templates/research_paper.md +304 -0
- package/skills/scientific/markdown-mermaid-writing/templates/status_report.md +185 -0
- package/skills/scientific/paper-lookup/SKILL.md +193 -0
- package/skills/scientific/paper-lookup/references/arxiv.md +161 -0
- package/skills/scientific/paper-lookup/references/biorxiv.md +118 -0
- package/skills/scientific/paper-lookup/references/core.md +150 -0
- package/skills/scientific/paper-lookup/references/crossref.md +181 -0
- package/skills/scientific/paper-lookup/references/medrxiv.md +104 -0
- package/skills/scientific/paper-lookup/references/openalex.md +174 -0
- package/skills/scientific/paper-lookup/references/pmc.md +152 -0
- package/skills/scientific/paper-lookup/references/pubmed.md +124 -0
- package/skills/scientific/paper-lookup/references/semantic-scholar.md +203 -0
- package/skills/scientific/paper-lookup/references/unpaywall.md +127 -0
- package/skills/scientific/peer-review/SKILL.md +569 -0
- package/skills/scientific/peer-review/references/common_issues.md +552 -0
- package/skills/scientific/peer-review/references/reporting_standards.md +290 -0
- package/skills/scientific/peer-review/scripts/generate_schematic.py +139 -0
- package/skills/scientific/peer-review/scripts/generate_schematic_ai.py +817 -0
- package/skills/scientific/scholar-evaluation/SKILL.md +298 -0
- package/skills/scientific/scholar-evaluation/references/evaluation_framework.md +663 -0
- package/skills/scientific/scholar-evaluation/scripts/calculate_scores.py +378 -0
- package/skills/scientific/scholar-evaluation/scripts/generate_schematic.py +139 -0
- package/skills/scientific/scholar-evaluation/scripts/generate_schematic_ai.py +817 -0
- package/skills/scientific/scientific-brainstorming/SKILL.md +189 -0
- package/skills/scientific/scientific-brainstorming/references/brainstorming_methods.md +326 -0
- package/skills/scientific/scientific-critical-thinking/SKILL.md +570 -0
- package/skills/scientific/scientific-critical-thinking/references/common_biases.md +364 -0
- package/skills/scientific/scientific-critical-thinking/references/evidence_hierarchy.md +484 -0
- package/skills/scientific/scientific-critical-thinking/references/experimental_design.md +496 -0
- package/skills/scientific/scientific-critical-thinking/references/logical_fallacies.md +478 -0
- package/skills/scientific/scientific-critical-thinking/references/scientific_method.md +169 -0
- package/skills/scientific/scientific-critical-thinking/references/statistical_pitfalls.md +506 -0
- package/skills/scientific/scientific-critical-thinking/scripts/generate_schematic.py +139 -0
- package/skills/scientific/scientific-critical-thinking/scripts/generate_schematic_ai.py +817 -0
- package/skills/wotann-imports/incremental-implementation.md +241 -0
- package/skills/wotann-imports/security-threat-model.md +81 -0
- package/skills/wotann-imports/triage.md +103 -0
- package/dist/build/deploy-targets/coolify.d.ts +0 -148
- package/dist/build/deploy-targets/coolify.d.ts.map +0 -1
- package/dist/build/deploy-targets/coolify.js +0 -339
- package/dist/build/deploy-targets/coolify.js.map +0 -1
- package/dist/build/deploy-targets/dokploy.d.ts +0 -139
- package/dist/build/deploy-targets/dokploy.d.ts.map +0 -1
- package/dist/build/deploy-targets/dokploy.js +0 -339
- package/dist/build/deploy-targets/dokploy.js.map +0 -1
- package/dist/claude/hardening/error-handler.d.ts +0 -52
- package/dist/claude/hardening/error-handler.d.ts.map +0 -1
- package/dist/claude/hardening/error-handler.js +0 -158
- package/dist/claude/hardening/error-handler.js.map +0 -1
- package/dist/cli/onboarding.d.ts +0 -34
- package/dist/cli/onboarding.d.ts.map +0 -1
- package/dist/cli/onboarding.js +0 -150
- package/dist/cli/onboarding.js.map +0 -1
- package/dist/core/agent-profiles.d.ts +0 -65
- package/dist/core/agent-profiles.d.ts.map +0 -1
- package/dist/core/agent-profiles.js +0 -137
- package/dist/core/agent-profiles.js.map +0 -1
- package/dist/desktop/supabase-relay.d.ts +0 -86
- package/dist/desktop/supabase-relay.d.ts.map +0 -1
- package/dist/desktop/supabase-relay.js +0 -335
- package/dist/desktop/supabase-relay.js.map +0 -1
- package/dist/intelligence/kg-builder.d.ts +0 -181
- package/dist/intelligence/kg-builder.d.ts.map +0 -1
- package/dist/intelligence/kg-builder.js +0 -807
- package/dist/intelligence/kg-builder.js.map +0 -1
- package/dist/orchestration/jean-orchestrator.d.ts +0 -79
- package/dist/orchestration/jean-orchestrator.d.ts.map +0 -1
- package/dist/orchestration/jean-orchestrator.js +0 -253
- package/dist/orchestration/jean-orchestrator.js.map +0 -1
- package/dist/orchestration/jean-registries/command-registry.d.ts +0 -85
- package/dist/orchestration/jean-registries/command-registry.d.ts.map +0 -1
- package/dist/orchestration/jean-registries/command-registry.js +0 -120
- package/dist/orchestration/jean-registries/command-registry.js.map +0 -1
- package/dist/orchestration/jean-registries/event-registry.d.ts +0 -80
- package/dist/orchestration/jean-registries/event-registry.d.ts.map +0 -1
- package/dist/orchestration/jean-registries/event-registry.js +0 -147
- package/dist/orchestration/jean-registries/event-registry.js.map +0 -1
- package/dist/orchestration/jean-registries/process-registry.d.ts +0 -71
- package/dist/orchestration/jean-registries/process-registry.d.ts.map +0 -1
- package/dist/orchestration/jean-registries/process-registry.js +0 -104
- package/dist/orchestration/jean-registries/process-registry.js.map +0 -1
- package/dist/orchestration/jean-registries/result-registry.d.ts +0 -71
- package/dist/orchestration/jean-registries/result-registry.d.ts.map +0 -1
- package/dist/orchestration/jean-registries/result-registry.js +0 -97
- package/dist/orchestration/jean-registries/result-registry.js.map +0 -1
- package/dist/providers/bedrock-signer.d.ts +0 -23
- package/dist/providers/bedrock-signer.d.ts.map +0 -1
- package/dist/providers/bedrock-signer.js +0 -439
- package/dist/providers/bedrock-signer.js.map +0 -1
- package/dist/providers/harness-profiles.d.ts +0 -70
- package/dist/providers/harness-profiles.d.ts.map +0 -1
- package/dist/providers/harness-profiles.js +0 -210
- package/dist/providers/harness-profiles.js.map +0 -1
- package/dist/providers/vertex-oauth.d.ts +0 -21
- package/dist/providers/vertex-oauth.d.ts.map +0 -1
- package/dist/providers/vertex-oauth.js +0 -393
- package/dist/providers/vertex-oauth.js.map +0 -1
- package/dist/sandbox/backends/cloud-auth.d.ts +0 -50
- package/dist/sandbox/backends/cloud-auth.d.ts.map +0 -1
- package/dist/sandbox/backends/cloud-auth.js +0 -93
- package/dist/sandbox/backends/cloud-auth.js.map +0 -1
- package/dist/security/anti-distillation.d.ts +0 -46
- package/dist/security/anti-distillation.d.ts.map +0 -1
- package/dist/security/anti-distillation.js +0 -358
- package/dist/security/anti-distillation.js.map +0 -1
- package/dist/security/multi-encoding-decoder.d.ts +0 -47
- package/dist/security/multi-encoding-decoder.d.ts.map +0 -1
- package/dist/security/multi-encoding-decoder.js +0 -336
- package/dist/security/multi-encoding-decoder.js.map +0 -1
- package/dist/ui/accessibility.d.ts +0 -157
- package/dist/ui/accessibility.d.ts.map +0 -1
- package/dist/ui/accessibility.js +0 -232
- package/dist/ui/accessibility.js.map +0 -1
- package/dist/ui/animations.d.ts +0 -102
- package/dist/ui/animations.d.ts.map +0 -1
- package/dist/ui/animations.js +0 -277
- package/dist/ui/animations.js.map +0 -1
- package/dist/ui/components/Sparkline.d.ts +0 -81
- package/dist/ui/components/Sparkline.d.ts.map +0 -1
- package/dist/ui/components/Sparkline.js +0 -102
- package/dist/ui/components/Sparkline.js.map +0 -1
- package/dist/ui/input/mouse.d.ts +0 -139
- package/dist/ui/input/mouse.d.ts.map +0 -1
- package/dist/ui/input/mouse.js +0 -239
- package/dist/ui/input/mouse.js.map +0 -1
- package/dist/ui/sound.d.ts +0 -85
- package/dist/ui/sound.d.ts.map +0 -1
- package/dist/ui/sound.js +0 -126
- package/dist/ui/sound.js.map +0 -1
package/dist/core/runtime.js
CHANGED
|
@@ -12,6 +12,56 @@
|
|
|
12
12
|
* - DoomLoop detector monitors for infinite loops
|
|
13
13
|
* - Cost tracker records spend per query
|
|
14
14
|
* - Session management tracks state
|
|
15
|
+
*
|
|
16
|
+
* ── Sibling-module ownership map ────────────────────────────────────
|
|
17
|
+
* The runtime is intentionally large; surface boundaries with the two
|
|
18
|
+
* extracted siblings keep the god-object honest:
|
|
19
|
+
*
|
|
20
|
+
* src/core/runtime-tools.ts (627 LOC)
|
|
21
|
+
* Owns: `buildEffectiveTools()` — assembles the FULL runtime-tool
|
|
22
|
+
* surface (computer_use [narrow], web_fetch, monitor, terminal_run,
|
|
23
|
+
* image_read, tmux_pull, parallel_search, plan_*, find_symbol,
|
|
24
|
+
* find_references, rename_symbol, 36 connector tools, 5 browser
|
|
25
|
+
* tools). Also exports `RUNTIME_TOOL_NAMES`, `isRuntimeTool`,
|
|
26
|
+
* `buildLspToolsForAgent` (Serena-parity LSP bundle), and the
|
|
27
|
+
* connector/browser passthroughs.
|
|
28
|
+
* NOT used by runtime.ts for inline registration — runtime.ts
|
|
29
|
+
* registers a NARROWER set (`computer_use` [rich], `web_fetch`,
|
|
30
|
+
* `plan_*`, aux-tools via dynamic import) because the wider surface
|
|
31
|
+
* advertised by `buildEffectiveTools` would expose tools that have
|
|
32
|
+
* no inline dispatch wiring here. Used directly by:
|
|
33
|
+
* • `tests/unit/connector-tools.test.ts`
|
|
34
|
+
* • `tests/tools/monitor.test.ts`
|
|
35
|
+
* • runtime.ts (only `buildLspToolsForAgent` for the Serena
|
|
36
|
+
* agent-tools bundle used by `lspAgentTools` dispatch path)
|
|
37
|
+
*
|
|
38
|
+
* src/core/runtime-tool-dispatch.ts (1102 LOC)
|
|
39
|
+
* Owns: `dispatchRuntimeTool()` + per-tool handlers (web_fetch,
|
|
40
|
+
* plan_create/list/advance, monitor, find_symbol, find_references,
|
|
41
|
+
* rename_symbol, terminal_run, image_read, tmux_pull,
|
|
42
|
+
* parallel_search) + connector dispatch adapter + ToolTimingTracker
|
|
43
|
+
* + tool-result annotation. The unified `dispatchRuntimeTool`
|
|
44
|
+
* dispatcher is wired into runtime.ts via
|
|
45
|
+
* `dispatchAndSanitizeRuntimeTool()` for the byte-identical 7
|
|
46
|
+
* tools (web_fetch / plan_* / find_symbol / find_references /
|
|
47
|
+
* rename_symbol). The other tool dispatchers (monitor with
|
|
48
|
+
* bespoke `[stdout]`/`[exit]` formatting, terminal_run / image_read
|
|
49
|
+
* / tmux_pull / parallel_search which aren't yet registered, and
|
|
50
|
+
* connector tools which need a registry handle) stay inline in the
|
|
51
|
+
* runtime stream loop because their wiring differs (streaming
|
|
52
|
+
* event format, sandbox gates, or `attemptContentParts` +
|
|
53
|
+
* `streamCheckpointStore` accumulation).
|
|
54
|
+
*
|
|
55
|
+
* ── Why the dispatch IS partially extracted but registration ISN'T ──
|
|
56
|
+
* `runtime-tool-dispatch.ts` produces byte-identical output envelopes
|
|
57
|
+
* for the 7 tools we migrated (`web_fetch` / `plan_*` / `find_symbol` /
|
|
58
|
+
* `find_references` / `rename_symbol`), so substituting it preserves
|
|
59
|
+
* behavior down to the byte. `runtime-tools.ts` registers a strict
|
|
60
|
+
* superset of tools (and uses a narrower `computer_use` schema), so
|
|
61
|
+
* substituting it would change what the model is told it can call —
|
|
62
|
+
* that's behavior change. Until the inline dispatch path is broadened
|
|
63
|
+
* (or `buildEffectiveTools` gains opt-out flags for the extra surface),
|
|
64
|
+
* registration stays inline.
|
|
15
65
|
*/
|
|
16
66
|
import { extractTrackedFilePath } from "./tool-path-extractor.js";
|
|
17
67
|
import { applyBoundToolFilter } from "./runtime/bound-tool-filter.js";
|
|
@@ -33,6 +83,48 @@ function warmupProviderModels(providers) {
|
|
|
33
83
|
fallback: auth.models,
|
|
34
84
|
})));
|
|
35
85
|
}
|
|
86
|
+
export function selectVerifierJudgeAdapter(input) {
|
|
87
|
+
const requested = input.requestedProvider?.trim();
|
|
88
|
+
if (requested) {
|
|
89
|
+
const provider = requested;
|
|
90
|
+
const adapter = input.adapters.get(provider);
|
|
91
|
+
if (adapter) {
|
|
92
|
+
return {
|
|
93
|
+
provider,
|
|
94
|
+
adapter,
|
|
95
|
+
model: input.requestedModel ??
|
|
96
|
+
(provider === input.responseProvider ? input.responseModel : undefined),
|
|
97
|
+
selfJudging: provider === input.responseProvider &&
|
|
98
|
+
(input.requestedModel ?? input.responseModel) === input.responseModel,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
for (const [provider, adapter] of input.adapters.entries()) {
|
|
103
|
+
if (provider !== input.responseProvider) {
|
|
104
|
+
return {
|
|
105
|
+
provider,
|
|
106
|
+
adapter,
|
|
107
|
+
...(input.requestedModel ? { model: input.requestedModel } : {}),
|
|
108
|
+
selfJudging: false,
|
|
109
|
+
...(requested
|
|
110
|
+
? { fallbackReason: `requested verifier provider unavailable: ${requested}` }
|
|
111
|
+
: {}),
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
const responseAdapter = input.adapters.get(input.responseProvider);
|
|
116
|
+
if (!responseAdapter)
|
|
117
|
+
return null;
|
|
118
|
+
return {
|
|
119
|
+
provider: input.responseProvider,
|
|
120
|
+
adapter: responseAdapter,
|
|
121
|
+
model: input.requestedModel ?? input.responseModel,
|
|
122
|
+
selfJudging: (input.requestedModel ?? input.responseModel) === input.responseModel,
|
|
123
|
+
...(requested
|
|
124
|
+
? { fallbackReason: `requested verifier provider unavailable: ${requested}` }
|
|
125
|
+
: {}),
|
|
126
|
+
};
|
|
127
|
+
}
|
|
36
128
|
import { resolveDefaultProvider } from "./default-provider.js";
|
|
37
129
|
import { createProviderInfrastructure, } from "../providers/registry.js";
|
|
38
130
|
import { HookEngine } from "../hooks/engine.js";
|
|
@@ -48,10 +140,10 @@ import { buildStablePrefix } from "../memory/stable-prefix.js";
|
|
|
48
140
|
// before production traffic. Gated on `RuntimeConfig.enablePromptCacheWarmup`
|
|
49
141
|
// (default off) + `WOTANN_PROMPT_CACHE_WARMUP` env var.
|
|
50
142
|
import { warmupCache, } from "../providers/prompt-cache-warmup.js";
|
|
51
|
-
import { DoomLoopDetector } from "../hooks/doom-loop-detector.js";
|
|
52
143
|
import { createDefaultPipeline } from "../middleware/pipeline.js";
|
|
53
144
|
import { assembleSystemPromptParts, wrapPromptWithThinkInCode } from "../prompt/engine.js";
|
|
54
145
|
import { stripIsoTimestampsFromPrompt } from "../prompt/system-prompt.js";
|
|
146
|
+
import { parseCavemanLevel } from "../prompt/modules/caveman.js";
|
|
55
147
|
import { canBypass, executeBypass } from "../utils/wasm-bypass.js";
|
|
56
148
|
import { CostTracker, shouldZeroForSubscription } from "../telemetry/cost-tracker.js";
|
|
57
149
|
import { ToolTimingLogger, ToolTimingBaseline } from "../tools/tool-timing.js";
|
|
@@ -110,6 +202,8 @@ import { AutonomousExecutor } from "../orchestration/autonomous.js";
|
|
|
110
202
|
import { NotificationManager } from "../desktop/notification-manager.js";
|
|
111
203
|
import { ContextSourceInspector } from "../context/inspector.js";
|
|
112
204
|
import { PersonaManager } from "../identity/persona.js";
|
|
205
|
+
import { ReasoningEngine } from "../identity/reasoning-engine.js";
|
|
206
|
+
import { getActivePersonaName } from "../cli/commands/persona.js";
|
|
113
207
|
import { SelfHealingPipeline } from "../orchestration/self-healing-pipeline.js";
|
|
114
208
|
import { LSPManager, SymbolOperations } from "../lsp/symbol-operations.js";
|
|
115
209
|
import { LanguageServerRegistry } from "../lsp/server-registry.js";
|
|
@@ -195,8 +289,9 @@ import { ReflectionBuffer } from "../learning/reflection-buffer.js";
|
|
|
195
289
|
import { WebFetchTool } from "../tools/web-fetch.js";
|
|
196
290
|
import { PlanStore } from "../orchestration/plan-store.js";
|
|
197
291
|
import { spawnMonitor } from "../tools/monitor.js";
|
|
198
|
-
import { MONITOR_MAX_DURATION_MS, MONITOR_MAX_EVENTS_PER_RESULT } from "./runtime-tool-dispatch.js";
|
|
292
|
+
import { MONITOR_MAX_DURATION_MS, MONITOR_MAX_EVENTS_PER_RESULT, dispatchRuntimeTool, } from "./runtime-tool-dispatch.js";
|
|
199
293
|
import { SteeringServer } from "./steering-server.js";
|
|
294
|
+
import { executeDesktopAction } from "../computer-use/platform-bindings.js";
|
|
200
295
|
// ── Wired orphan modules ────────────────────────────────────
|
|
201
296
|
// Orchestration
|
|
202
297
|
import { AutonomousContextManager } from "../orchestration/autonomous-context.js";
|
|
@@ -270,6 +365,141 @@ import { scheduleViaHook as scheduleSessionIngestion, } from "../memory/session-
|
|
|
270
365
|
import { createOmegaLayers } from "../memory/omega-layers.js";
|
|
271
366
|
import { detectSupersession, parseAssertionAsFact } from "../memory/knowledge-update-dynamics.js";
|
|
272
367
|
import { ProgressiveContextLoader, } from "../memory/progressive-context-loader.js";
|
|
368
|
+
function unquoteShellToken(raw) {
|
|
369
|
+
const trimmed = raw.trim();
|
|
370
|
+
if (!trimmed)
|
|
371
|
+
return null;
|
|
372
|
+
const singleQuoted = trimmed.match(/^'([^']*)'$/);
|
|
373
|
+
if (singleQuoted)
|
|
374
|
+
return singleQuoted[1] ?? "";
|
|
375
|
+
const doubleQuoted = trimmed.match(/^"([^"]*)"$/);
|
|
376
|
+
if (doubleQuoted)
|
|
377
|
+
return doubleQuoted[1] ?? "";
|
|
378
|
+
if (/\s/.test(trimmed))
|
|
379
|
+
return null;
|
|
380
|
+
return trimmed;
|
|
381
|
+
}
|
|
382
|
+
function parseSafeOpenCommand(command) {
|
|
383
|
+
const trimmed = command.trim();
|
|
384
|
+
if (/[\r\n;]/.test(trimmed) ||
|
|
385
|
+
trimmed.includes("&&") ||
|
|
386
|
+
trimmed.includes("||") ||
|
|
387
|
+
trimmed.includes("`") ||
|
|
388
|
+
trimmed.includes("$(")) {
|
|
389
|
+
return null;
|
|
390
|
+
}
|
|
391
|
+
const match = trimmed.match(/^open\s+(.+)$/);
|
|
392
|
+
if (!match)
|
|
393
|
+
return null;
|
|
394
|
+
const target = unquoteShellToken(match[1] ?? "");
|
|
395
|
+
if (!target || target.startsWith("-"))
|
|
396
|
+
return null;
|
|
397
|
+
const action = /^https?:\/\//i.test(target) ? "open-url" : "open-path";
|
|
398
|
+
return { action, target };
|
|
399
|
+
}
|
|
400
|
+
function executeSafeBashDesktopCommand(command) {
|
|
401
|
+
const parsed = parseSafeOpenCommand(command);
|
|
402
|
+
if (!parsed) {
|
|
403
|
+
return {
|
|
404
|
+
success: false,
|
|
405
|
+
content: "\n[Bash] Error: remote Bash execution is limited to safe desktop open commands right now.\n",
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
const result = executeDesktopAction({
|
|
409
|
+
action: parsed.action,
|
|
410
|
+
params: parsed.action === "open-url" ? { url: parsed.target } : { path: parsed.target },
|
|
411
|
+
});
|
|
412
|
+
if (!result) {
|
|
413
|
+
return {
|
|
414
|
+
success: false,
|
|
415
|
+
content: `\n[Bash] Error: desktop route ${parsed.action} is not available.\n`,
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
return {
|
|
419
|
+
success: result.success,
|
|
420
|
+
content: `\n[Bash] ${result.output}\n`,
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
function scalarParam(value) {
|
|
424
|
+
if (typeof value === "string")
|
|
425
|
+
return value;
|
|
426
|
+
if (typeof value === "number" || typeof value === "boolean")
|
|
427
|
+
return String(value);
|
|
428
|
+
return undefined;
|
|
429
|
+
}
|
|
430
|
+
function executeComputerUseAction(input) {
|
|
431
|
+
const action = typeof input["action"] === "string" ? input["action"] : "";
|
|
432
|
+
const normalized = action.replace(/_/g, "-");
|
|
433
|
+
const params = {};
|
|
434
|
+
if (normalized === "click") {
|
|
435
|
+
const x = scalarParam(input["x"]);
|
|
436
|
+
const y = scalarParam(input["y"]);
|
|
437
|
+
if (x !== undefined)
|
|
438
|
+
params["x"] = x;
|
|
439
|
+
if (y !== undefined)
|
|
440
|
+
params["y"] = y;
|
|
441
|
+
const button = scalarParam(input["button"]);
|
|
442
|
+
const clicks = scalarParam(input["clicks"]);
|
|
443
|
+
if (button !== undefined)
|
|
444
|
+
params["button"] = button;
|
|
445
|
+
if (clicks !== undefined)
|
|
446
|
+
params["clicks"] = clicks;
|
|
447
|
+
}
|
|
448
|
+
else if (normalized === "type") {
|
|
449
|
+
const text = scalarParam(input["text"]);
|
|
450
|
+
const delay = scalarParam(input["delay"]);
|
|
451
|
+
if (text !== undefined)
|
|
452
|
+
params["text"] = text;
|
|
453
|
+
if (delay !== undefined)
|
|
454
|
+
params["delay"] = delay;
|
|
455
|
+
}
|
|
456
|
+
else if (normalized === "screenshot") {
|
|
457
|
+
const path = scalarParam(input["path"]);
|
|
458
|
+
if (path !== undefined)
|
|
459
|
+
params["path"] = path;
|
|
460
|
+
}
|
|
461
|
+
else if (normalized === "read-screen") {
|
|
462
|
+
const result = executeDesktopAction({ action: "get-active-window", params: {} });
|
|
463
|
+
return {
|
|
464
|
+
success: result?.success ?? false,
|
|
465
|
+
content: `\n[computer_use] Active window: ${result?.output ?? "Unavailable"}\n`,
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
else if (normalized === "open-path") {
|
|
469
|
+
const path = scalarParam(input["path"]);
|
|
470
|
+
if (path !== undefined)
|
|
471
|
+
params["path"] = path;
|
|
472
|
+
}
|
|
473
|
+
else if (normalized === "open-url") {
|
|
474
|
+
const url = scalarParam(input["url"]);
|
|
475
|
+
if (url !== undefined)
|
|
476
|
+
params["url"] = url;
|
|
477
|
+
}
|
|
478
|
+
else if (normalized === "open-app") {
|
|
479
|
+
const app = scalarParam(input["app"]);
|
|
480
|
+
if (app !== undefined)
|
|
481
|
+
params["app"] = app;
|
|
482
|
+
}
|
|
483
|
+
const route = normalized === "screenshot" ||
|
|
484
|
+
normalized === "click" ||
|
|
485
|
+
normalized === "type" ||
|
|
486
|
+
normalized === "open-path" ||
|
|
487
|
+
normalized === "open-url" ||
|
|
488
|
+
normalized === "open-app"
|
|
489
|
+
? normalized
|
|
490
|
+
: "";
|
|
491
|
+
if (!route) {
|
|
492
|
+
return {
|
|
493
|
+
success: false,
|
|
494
|
+
content: `\n[computer_use] Error: unsupported action "${action || "unknown"}"\n`,
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
const result = executeDesktopAction({ action: route, params });
|
|
498
|
+
return {
|
|
499
|
+
success: result?.success ?? false,
|
|
500
|
+
content: `\n[computer_use] ${result?.output ?? `Route ${route} is not available`}\n`,
|
|
501
|
+
};
|
|
502
|
+
}
|
|
273
503
|
// ── Runtime ────────────────────────────────────────────────
|
|
274
504
|
export class WotannRuntime {
|
|
275
505
|
infra = null;
|
|
@@ -287,8 +517,13 @@ export class WotannRuntime {
|
|
|
287
517
|
* `shouldZeroForSubscription(provider, this.providerBilling.get(provider))`.
|
|
288
518
|
*/
|
|
289
519
|
providerBilling = new Map();
|
|
520
|
+
/**
|
|
521
|
+
* Runtime-local provider -> model catalogue captured from provider discovery.
|
|
522
|
+
* This keeps model routing grounded in what the daemon actually discovered
|
|
523
|
+
* instead of treating provider identifiers as model identifiers.
|
|
524
|
+
*/
|
|
525
|
+
providerModelCatalog = new Map();
|
|
290
526
|
hookEngine;
|
|
291
|
-
doomLoop;
|
|
292
527
|
pipeline;
|
|
293
528
|
costTracker;
|
|
294
529
|
/**
|
|
@@ -319,11 +554,28 @@ export class WotannRuntime {
|
|
|
319
554
|
editTracker;
|
|
320
555
|
sessionAnalytics;
|
|
321
556
|
skillRegistry;
|
|
557
|
+
/**
|
|
558
|
+
* Skill activation telemetry sink (per-runtime, not module-global —
|
|
559
|
+
* QB #7). Records every skill activation to a JSONL log so the
|
|
560
|
+
* description-optimizer can mine its corpus from real usage.
|
|
561
|
+
* Lazily constructed on first use to avoid a synchronous import in
|
|
562
|
+
* the hot path of WotannRuntime construction; opt-out via env var.
|
|
563
|
+
*/
|
|
564
|
+
skillTelemetry = null;
|
|
322
565
|
ttsrEngine;
|
|
323
566
|
qmdContext;
|
|
324
567
|
modelPerformanceStore;
|
|
325
568
|
pluginPanels = [];
|
|
326
569
|
memoryStore = null;
|
|
570
|
+
/**
|
|
571
|
+
* Per-session formal reasoning engine (deductive / inductive / abductive).
|
|
572
|
+
* Lazily instantiated when memoryStore is available so conclusions
|
|
573
|
+
* can be persisted to the SQLite layer="reasoning" table. On each
|
|
574
|
+
* user turn, query() feeds the user prompt through `extractPremises`
|
|
575
|
+
* — explicit "I prefer X" / "always Y" patterns build a per-session
|
|
576
|
+
* premise list the downstream prompt assembler can consult.
|
|
577
|
+
*/
|
|
578
|
+
reasoningEngine = null;
|
|
327
579
|
/**
|
|
328
580
|
* Round 8: cross-surface prompt library. Lives in the same .wotann
|
|
329
581
|
* state dir as memory.db so users can back up both with one tar.
|
|
@@ -341,6 +593,18 @@ export class WotannRuntime {
|
|
|
341
593
|
messageIndex = new Map();
|
|
342
594
|
config;
|
|
343
595
|
systemPrompt = "";
|
|
596
|
+
/**
|
|
597
|
+
* Read accessor for the assembled session-level system prompt
|
|
598
|
+
* (basePrompt + bootstrap + local context + user model + cross-device
|
|
599
|
+
* + memory + adaptive section). Lets the TUI's `/sizes` command show
|
|
600
|
+
* users what's actually being sent so they can diagnose slow turns
|
|
601
|
+
* without instrumenting the adapter. Excludes per-turn additions
|
|
602
|
+
* (skill activation, memory activation, reasoning sandwich preamble)
|
|
603
|
+
* — those are layered on at query time.
|
|
604
|
+
*/
|
|
605
|
+
getSystemPrompt() {
|
|
606
|
+
return this.systemPrompt;
|
|
607
|
+
}
|
|
344
608
|
localContextPrompt = "";
|
|
345
609
|
/**
|
|
346
610
|
* P1-B1 per-session bootstrap cache. One instance per runtime; the
|
|
@@ -557,6 +821,9 @@ export class WotannRuntime {
|
|
|
557
821
|
// post-response turn that has non-empty content). Null when verifier
|
|
558
822
|
// is disabled OR when instantiation hasn't happened yet.
|
|
559
823
|
verifierEngine = null;
|
|
824
|
+
// Mutable: setVerifierEnabled() toggles this at runtime so the user
|
|
825
|
+
// can flip the secondary judge on/off via /verifier without restarting
|
|
826
|
+
// WOTANN. Initial value comes from config.enableVerifier or env.
|
|
560
827
|
verifierEnabled;
|
|
561
828
|
// Ring buffer of recent verdicts so the daemon RPC surface
|
|
562
829
|
// (verifier.history / verifier.lastVerdict) can answer "what did the
|
|
@@ -687,8 +954,6 @@ export class WotannRuntime {
|
|
|
687
954
|
// silently returns false).
|
|
688
955
|
this.shadowGit = new ShadowGit(config.workingDir);
|
|
689
956
|
registerBuiltinHooks(this.hookEngine, this.shadowGit);
|
|
690
|
-
// Initialize doom loop detector
|
|
691
|
-
this.doomLoop = new DoomLoopDetector();
|
|
692
957
|
// Initialize middleware pipeline
|
|
693
958
|
this.pipeline = createDefaultPipeline();
|
|
694
959
|
// Initialize cost tracker. Single authoritative source for cost AND
|
|
@@ -786,6 +1051,18 @@ export class WotannRuntime {
|
|
|
786
1051
|
}
|
|
787
1052
|
try {
|
|
788
1053
|
this.memoryStore = new MemoryStore(dbPath);
|
|
1054
|
+
// ReasoningEngine reads + writes the same SQLite store under
|
|
1055
|
+
// layer="reasoning". Instantiate alongside MemoryStore so the
|
|
1056
|
+
// per-turn extractPremises() call has a destination for any
|
|
1057
|
+
// conclusions it derives. Best-effort — failure here does
|
|
1058
|
+
// not break the runtime.
|
|
1059
|
+
try {
|
|
1060
|
+
this.reasoningEngine = new ReasoningEngine(this.memoryStore);
|
|
1061
|
+
}
|
|
1062
|
+
catch (err) {
|
|
1063
|
+
console.warn(`[WOTANN] ReasoningEngine init failed (continuing without inference): ${err instanceof Error ? err.message : String(err)}`);
|
|
1064
|
+
this.reasoningEngine = null;
|
|
1065
|
+
}
|
|
789
1066
|
// V9 T1.3 — auto-attach sqlite-vec backend if the native
|
|
790
1067
|
// extension is loadable. Returns false silently when the
|
|
791
1068
|
// extension or required prebuilt is missing; TEMPR then
|
|
@@ -892,10 +1169,13 @@ export class WotannRuntime {
|
|
|
892
1169
|
// Notification manager: surface task-complete / error / budget-alert
|
|
893
1170
|
// / channel-message / companion-paired events to desktop + iOS.
|
|
894
1171
|
this.notificationManager = new NotificationManager();
|
|
895
|
-
// Context source inspector: shows exactly what's in the context window (Ctrl+
|
|
1172
|
+
// Context source inspector: shows exactly what's in the context window (Ctrl+X)
|
|
896
1173
|
this.contextInspector = new ContextSourceInspector();
|
|
897
|
-
// Persona manager: 8-file bootstrap, dynamic persona stacking
|
|
898
|
-
|
|
1174
|
+
// Persona manager: 8-file bootstrap, dynamic persona stacking.
|
|
1175
|
+
// Path matches prompt/engine.ts loadPersona() so `wotann persona`
|
|
1176
|
+
// CLI, runtime introspection, and the prompt assembler all read
|
|
1177
|
+
// the same `.wotann/personas/` directory.
|
|
1178
|
+
this.personaManager = new PersonaManager(join(config.workingDir, ".wotann"));
|
|
899
1179
|
// Self-healing pipeline singleton: assigned above (pre-AutonomousExecutor
|
|
900
1180
|
// construction) so the executor can share the instance. This anchor
|
|
901
1181
|
// comment preserves the prior "graduated error recovery" docs site.
|
|
@@ -1214,6 +1494,92 @@ export class WotannRuntime {
|
|
|
1214
1494
|
getMcpTier() {
|
|
1215
1495
|
return this.mcpTier;
|
|
1216
1496
|
}
|
|
1497
|
+
refreshProviderModelCatalog(providers) {
|
|
1498
|
+
this.providerModelCatalog.clear();
|
|
1499
|
+
for (const auth of providers) {
|
|
1500
|
+
if (this.providerModelCatalog.has(auth.provider))
|
|
1501
|
+
continue;
|
|
1502
|
+
const models = [
|
|
1503
|
+
...new Set(auth.models.map((m) => m.trim()).filter((m) => this.isConcreteModelId(m))),
|
|
1504
|
+
];
|
|
1505
|
+
this.providerModelCatalog.set(auth.provider, models);
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
async refreshProviderModelCatalogs() {
|
|
1509
|
+
const adapters = this.infra?.adapters;
|
|
1510
|
+
if (!adapters)
|
|
1511
|
+
return {};
|
|
1512
|
+
const refreshed = {};
|
|
1513
|
+
await Promise.all([...adapters.entries()].map(async ([provider, adapter]) => {
|
|
1514
|
+
try {
|
|
1515
|
+
const models = await adapter.listModels();
|
|
1516
|
+
const concrete = [
|
|
1517
|
+
...new Set(models.map((m) => m.trim()).filter((m) => this.isConcreteModelId(m))),
|
|
1518
|
+
];
|
|
1519
|
+
if (concrete.length > 0) {
|
|
1520
|
+
this.providerModelCatalog.set(provider, concrete);
|
|
1521
|
+
refreshed[provider] = concrete;
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
catch {
|
|
1525
|
+
/* Keep the last known model list for this provider. */
|
|
1526
|
+
}
|
|
1527
|
+
}));
|
|
1528
|
+
return refreshed;
|
|
1529
|
+
}
|
|
1530
|
+
isConcreteModelId(model) {
|
|
1531
|
+
if (!model)
|
|
1532
|
+
return false;
|
|
1533
|
+
const trimmed = model.trim();
|
|
1534
|
+
return trimmed.length > 0 && trimmed !== "auto" && trimmed !== "unknown";
|
|
1535
|
+
}
|
|
1536
|
+
isKnownProviderIdentifier(value) {
|
|
1537
|
+
if (!value)
|
|
1538
|
+
return false;
|
|
1539
|
+
if (this.providerModelCatalog.has(value))
|
|
1540
|
+
return true;
|
|
1541
|
+
const available = this.infra?.bridge?.getAvailableProviders?.() ?? [];
|
|
1542
|
+
return available.includes(value);
|
|
1543
|
+
}
|
|
1544
|
+
getDiscoveredModelIds() {
|
|
1545
|
+
const seen = new Set();
|
|
1546
|
+
for (const models of this.providerModelCatalog.values()) {
|
|
1547
|
+
for (const model of models) {
|
|
1548
|
+
if (!seen.has(model))
|
|
1549
|
+
seen.add(model);
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
return [...seen];
|
|
1553
|
+
}
|
|
1554
|
+
providerHasModel(provider, model) {
|
|
1555
|
+
if (!provider || !this.isConcreteModelId(model))
|
|
1556
|
+
return false;
|
|
1557
|
+
const models = this.providerModelCatalog.get(provider);
|
|
1558
|
+
return Boolean(models && models.includes(model));
|
|
1559
|
+
}
|
|
1560
|
+
firstDiscoveredModelForProvider(provider) {
|
|
1561
|
+
if (!provider)
|
|
1562
|
+
return null;
|
|
1563
|
+
const models = this.providerModelCatalog.get(provider);
|
|
1564
|
+
return models?.[0] ?? null;
|
|
1565
|
+
}
|
|
1566
|
+
isModelUsableForProvider(provider, model) {
|
|
1567
|
+
if (!this.isConcreteModelId(model))
|
|
1568
|
+
return false;
|
|
1569
|
+
if (provider && this.providerModelCatalog.has(provider)) {
|
|
1570
|
+
return this.providerHasModel(provider, model);
|
|
1571
|
+
}
|
|
1572
|
+
return !this.isKnownProviderIdentifier(model);
|
|
1573
|
+
}
|
|
1574
|
+
shouldApplyTaskRouterModel(model, provider) {
|
|
1575
|
+
if (!this.isConcreteModelId(model))
|
|
1576
|
+
return false;
|
|
1577
|
+
if (this.isKnownProviderIdentifier(model))
|
|
1578
|
+
return false;
|
|
1579
|
+
if (!provider || provider === "auto")
|
|
1580
|
+
return false;
|
|
1581
|
+
return this.providerHasModel(provider, model);
|
|
1582
|
+
}
|
|
1217
1583
|
/**
|
|
1218
1584
|
* Session-13: per-session Visual Diff Theater for hunk-level review.
|
|
1219
1585
|
* Consumers (CLI `wotann review`, iOS diff viewer) read sessions,
|
|
@@ -1315,7 +1681,7 @@ export class WotannRuntime {
|
|
|
1315
1681
|
// Re-scan the persona dir in case defaults landed after ctor.
|
|
1316
1682
|
// The manager's public API is immutable — we rebuild a sibling
|
|
1317
1683
|
// instance and swap in, preserving the ctor contract.
|
|
1318
|
-
const refreshedPersonas = new PersonaManager(join(this.config.workingDir, ".wotann"
|
|
1684
|
+
const refreshedPersonas = new PersonaManager(join(this.config.workingDir, ".wotann"));
|
|
1319
1685
|
if (refreshedPersonas.getCount() > this.personaManager.getCount()) {
|
|
1320
1686
|
this.personaManager = refreshedPersonas;
|
|
1321
1687
|
}
|
|
@@ -1449,6 +1815,7 @@ export class WotannRuntime {
|
|
|
1449
1815
|
}
|
|
1450
1816
|
// Discover providers
|
|
1451
1817
|
const providers = await discoverProviders();
|
|
1818
|
+
this.refreshProviderModelCatalog(providers);
|
|
1452
1819
|
// Background model-catalog warmup: discoverProviders() returns a
|
|
1453
1820
|
// synchronous list with hardcoded fallbacks (or 5-min cached
|
|
1454
1821
|
// results from prior runs). Kick off live `/v1/models` fetches in
|
|
@@ -1566,9 +1933,11 @@ export class WotannRuntime {
|
|
|
1566
1933
|
// modules read runtime state (provider/model/cost/surfaces/channels)
|
|
1567
1934
|
// and emit only the sections that apply — absent capabilities cost
|
|
1568
1935
|
// zero tokens.
|
|
1936
|
+
const activePersona = getActivePersonaName(join(this.config.workingDir, ".wotann"));
|
|
1569
1937
|
const basePrompt = assembleSystemPromptParts({
|
|
1570
1938
|
workspaceRoot: this.config.workingDir,
|
|
1571
1939
|
mode: "careful",
|
|
1940
|
+
...(activePersona ? { persona: activePersona } : {}),
|
|
1572
1941
|
moduleContext: {
|
|
1573
1942
|
isMinimal: false,
|
|
1574
1943
|
provider: this.session.provider ?? "unknown",
|
|
@@ -1582,6 +1951,9 @@ export class WotannRuntime {
|
|
|
1582
1951
|
sessionCost: 0,
|
|
1583
1952
|
budgetRemaining: 0,
|
|
1584
1953
|
activeChannels: [],
|
|
1954
|
+
// Caveman output-compression — opt-in via WOTANN_CAVEMAN env
|
|
1955
|
+
// (lite|full|ultra|off). Empty when unset → zero token cost.
|
|
1956
|
+
cavemanLevel: parseCavemanLevel(process.env["WOTANN_CAVEMAN"]),
|
|
1585
1957
|
},
|
|
1586
1958
|
});
|
|
1587
1959
|
const modeInstructions = this.modeCycler.getMergedInstructions();
|
|
@@ -1676,14 +2048,13 @@ export class WotannRuntime {
|
|
|
1676
2048
|
* 2. WASM bypass check (skip LLM for deterministic operations)
|
|
1677
2049
|
* 3. Hook engine: UserPromptSubmit
|
|
1678
2050
|
* 4. Middleware pipeline: before (all 16 layers)
|
|
1679
|
-
* 5.
|
|
1680
|
-
* 6.
|
|
1681
|
-
* 7.
|
|
1682
|
-
* 8.
|
|
1683
|
-
* 9.
|
|
1684
|
-
* 10.
|
|
1685
|
-
* 11.
|
|
1686
|
-
* 12. Cost tracking + session update
|
|
2051
|
+
* 5. Intelligence amplification (planning, verification, tool correction)
|
|
2052
|
+
* 6. Reasoning sandwich (asymmetric budget: HIGH plan → LOW exec → HIGH verify)
|
|
2053
|
+
* 7. Provider query via AgentBridge (with fallback chain)
|
|
2054
|
+
* 8. Trace recording
|
|
2055
|
+
* 9. Post-query hooks + middleware
|
|
2056
|
+
* 10. Memory capture (SQLite + semantic index)
|
|
2057
|
+
* 11. Cost tracking + session update
|
|
1687
2058
|
*/
|
|
1688
2059
|
async *query(options) {
|
|
1689
2060
|
// S1-16: attribute errors to the actual targeted provider, falling back
|
|
@@ -1719,6 +2090,26 @@ export class WotannRuntime {
|
|
|
1719
2090
|
catch (err) {
|
|
1720
2091
|
console.warn(`[WotannRuntime] checkDailyBudgetCap failed; allowing query: ${err.message}`);
|
|
1721
2092
|
}
|
|
2093
|
+
// ReasoningEngine — feed every user turn through extractPremises
|
|
2094
|
+
// so the per-session premise pool grows as the user expresses
|
|
2095
|
+
// preferences / decisions / constraints. Side-effect-only: the
|
|
2096
|
+
// engine writes derived conclusions to memoryStore under
|
|
2097
|
+
// layer="reasoning"; never throws into the caller. Wrapped in
|
|
2098
|
+
// try/catch (QB #6) so a regex regression doesn't break the
|
|
2099
|
+
// hot query path.
|
|
2100
|
+
if (this.reasoningEngine && typeof options.prompt === "string" && options.prompt.length > 0) {
|
|
2101
|
+
try {
|
|
2102
|
+
const newPremises = this.reasoningEngine.extractPremises([options.prompt]);
|
|
2103
|
+
if (newPremises.length > 0) {
|
|
2104
|
+
// Periodically promote premises to deductive conclusions.
|
|
2105
|
+
// Cheap — pure in-memory grouping + persistence.
|
|
2106
|
+
this.reasoningEngine.deductiveReason(newPremises);
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
catch (err) {
|
|
2110
|
+
console.warn(`[WotannRuntime] ReasoningEngine premise extraction failed: ${err.message}`);
|
|
2111
|
+
}
|
|
2112
|
+
}
|
|
1722
2113
|
const queryStart = Date.now();
|
|
1723
2114
|
const sessionBeforeQuery = this.session;
|
|
1724
2115
|
this.session = addMessage(this.session, {
|
|
@@ -1797,11 +2188,6 @@ export class WotannRuntime {
|
|
|
1797
2188
|
catch {
|
|
1798
2189
|
// Active memory preprocessing must never block the main query.
|
|
1799
2190
|
}
|
|
1800
|
-
// WallClockBudget: inject time pressure prompt when approaching budget limit
|
|
1801
|
-
const timePressure = this.wallClockBudget.getSystemPromptOverride();
|
|
1802
|
-
if (timePressure) {
|
|
1803
|
-
options = { ...options, prompt: `${timePressure}\n\n${options.prompt}` };
|
|
1804
|
-
}
|
|
1805
2191
|
// UserModel: update profile from each interaction
|
|
1806
2192
|
this.userModelManager.recordExpertise(modeDetection.detectedMode, "intermediate", options.prompt.slice(0, 100));
|
|
1807
2193
|
// Cross-session learner: record this query action
|
|
@@ -1834,7 +2220,7 @@ export class WotannRuntime {
|
|
|
1834
2220
|
if (!options.model || options.model === "auto") {
|
|
1835
2221
|
try {
|
|
1836
2222
|
const routing = this.classifyAndRoute(options.prompt);
|
|
1837
|
-
if (routing.recommendedModel
|
|
2223
|
+
if (this.shouldApplyTaskRouterModel(routing.recommendedModel, options.provider)) {
|
|
1838
2224
|
options = { ...options, model: routing.recommendedModel };
|
|
1839
2225
|
}
|
|
1840
2226
|
}
|
|
@@ -1922,17 +2308,6 @@ export class WotannRuntime {
|
|
|
1922
2308
|
}
|
|
1923
2309
|
// Reset TTSR fire counts for new query
|
|
1924
2310
|
this.ttsrEngine.reset();
|
|
1925
|
-
// ── Step 4: DoomLoop check ──
|
|
1926
|
-
const doomResult = this.doomLoop.record("query", { prompt: options.prompt });
|
|
1927
|
-
if (doomResult.detected) {
|
|
1928
|
-
streamInterruptedReason = `DoomLoop detected (${doomResult.type ?? "repeated"}): Try a different approach.`;
|
|
1929
|
-
yield {
|
|
1930
|
-
type: "error",
|
|
1931
|
-
content: streamInterruptedReason,
|
|
1932
|
-
provider: attributedProvider,
|
|
1933
|
-
};
|
|
1934
|
-
return;
|
|
1935
|
-
}
|
|
1936
2311
|
// ── Step 4.5: Context pressure check + VirtualContext offload ──
|
|
1937
2312
|
// Tiered warnings: 60% info, 80% warning + VirtualContext, 95% critical
|
|
1938
2313
|
const contextBudget = this.contextIntelligence.getBudget();
|
|
@@ -2126,14 +2501,47 @@ export class WotannRuntime {
|
|
|
2126
2501
|
console.warn(`[WotannRuntime] message-queue drain failed; continuing without queued messages: ${err.message}`);
|
|
2127
2502
|
}
|
|
2128
2503
|
const skillActivation = buildSkillActivationPrompt(this.skillRegistry, options.prompt, this.config.workingDir);
|
|
2504
|
+
// Skill-activation telemetry — closes the description-optimizer
|
|
2505
|
+
// loop. Records the chosen skill (if any) plus all considered
|
|
2506
|
+
// candidates so future descriptions can be tuned against real
|
|
2507
|
+
// usage. Disk write is best-effort; failure never aborts the
|
|
2508
|
+
// active query (QB #3 honest stub). Disable via WOTANN_SKILL_TELEMETRY_OFF=1.
|
|
2509
|
+
if (process.env["WOTANN_SKILL_TELEMETRY_OFF"] !== "1") {
|
|
2510
|
+
try {
|
|
2511
|
+
if (!this.skillTelemetry) {
|
|
2512
|
+
const { SkillActivationTelemetry } = await import("../skills/activation-telemetry.js");
|
|
2513
|
+
const { resolveWotannHomeSubdir } = await import("../utils/wotann-home.js");
|
|
2514
|
+
this.skillTelemetry = new SkillActivationTelemetry({
|
|
2515
|
+
path: resolveWotannHomeSubdir("skill-telemetry.jsonl"),
|
|
2516
|
+
});
|
|
2517
|
+
}
|
|
2518
|
+
const winningSkill = skillActivation.names[0] ?? null;
|
|
2519
|
+
await this.skillTelemetry.record({
|
|
2520
|
+
sessionId: this.session.id,
|
|
2521
|
+
prompt: options.prompt,
|
|
2522
|
+
triggered: winningSkill ? { skill: winningSkill, kind: "auto" } : null,
|
|
2523
|
+
candidates: skillActivation.candidates,
|
|
2524
|
+
});
|
|
2525
|
+
}
|
|
2526
|
+
catch (err) {
|
|
2527
|
+
// Telemetry MUST NOT crash the run.
|
|
2528
|
+
console.warn(`[runtime] skill-telemetry record failed: ${err.message}`);
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2129
2531
|
const currentFile = skillActivation.referencedPaths[0];
|
|
2130
2532
|
const memoryActivation = buildMemoryActivationPrompt(this.memoryStore, this.session.id, options.prompt, currentFile);
|
|
2131
|
-
//
|
|
2132
|
-
//
|
|
2133
|
-
//
|
|
2134
|
-
//
|
|
2135
|
-
//
|
|
2136
|
-
//
|
|
2533
|
+
// ── Tool-registration extraction analysis ──────────────────
|
|
2534
|
+
// The extracted `buildEffectiveTools()` in `runtime-tools.ts`
|
|
2535
|
+
// assembles a DIFFERENT surface area from what is registered
|
|
2536
|
+
// inline below — it adds `monitor`, `terminal_run`, `image_read`,
|
|
2537
|
+
// `tmux_pull`, `parallel_search`, the LSP symbol tools, the 36
|
|
2538
|
+
// connector tools, and 5 browser tools, AND it uses a narrower
|
|
2539
|
+
// `computer_use` schema (no open_path/open_url/open_app/button/
|
|
2540
|
+
// clicks). Several of those advertised tools have NO inline
|
|
2541
|
+
// dispatch wiring here; advertising them would let the model
|
|
2542
|
+
// emit calls that fall through silently. So registration stays
|
|
2543
|
+
// inline and the dispatch-side consolidation handles the only
|
|
2544
|
+
// genuine duplication (web_fetch / plan_* / Serena LSP tools).
|
|
2137
2545
|
// ── Register computer_use tool in agent tool schema ──
|
|
2138
2546
|
const computerUseTool = {
|
|
2139
2547
|
name: "computer_use",
|
|
@@ -2143,12 +2551,25 @@ export class WotannRuntime {
|
|
|
2143
2551
|
properties: {
|
|
2144
2552
|
action: {
|
|
2145
2553
|
type: "string",
|
|
2146
|
-
enum: [
|
|
2554
|
+
enum: [
|
|
2555
|
+
"screenshot",
|
|
2556
|
+
"click",
|
|
2557
|
+
"type",
|
|
2558
|
+
"read_screen",
|
|
2559
|
+
"open_path",
|
|
2560
|
+
"open_url",
|
|
2561
|
+
"open_app",
|
|
2562
|
+
],
|
|
2147
2563
|
description: "The action to perform",
|
|
2148
2564
|
},
|
|
2149
2565
|
x: { type: "number", description: "X coordinate for click" },
|
|
2150
2566
|
y: { type: "number", description: "Y coordinate for click" },
|
|
2151
2567
|
text: { type: "string", description: "Text to type" },
|
|
2568
|
+
path: { type: "string", description: "File or folder path to open" },
|
|
2569
|
+
url: { type: "string", description: "URL to open" },
|
|
2570
|
+
app: { type: "string", description: "Application name to activate" },
|
|
2571
|
+
button: { type: "string", description: "Mouse button for click" },
|
|
2572
|
+
clicks: { type: "number", description: "Number of click repetitions" },
|
|
2152
2573
|
},
|
|
2153
2574
|
required: ["action"],
|
|
2154
2575
|
},
|
|
@@ -2396,18 +2817,42 @@ export class WotannRuntime {
|
|
|
2396
2817
|
const taskType = classifyTaskType(options.prompt);
|
|
2397
2818
|
const minCapability = taskType === "code-generation" || taskType === "bug-fix" ? "high" : "medium";
|
|
2398
2819
|
const arbitrageRoute = this.providerArbitrage.findCheapestRoute(options.prompt, minCapability);
|
|
2399
|
-
// Use arbitrage
|
|
2820
|
+
// Use arbitrage only when it can supply a provider/model pair that
|
|
2821
|
+
// exists in the daemon's discovered catalogue. Setting a provider alone
|
|
2822
|
+
// lets a model from another provider leak into the adapter call.
|
|
2823
|
+
const arbitragePair = !options.provider && this.providerHasModel(arbitrageRoute.provider, arbitrageRoute.model)
|
|
2824
|
+
? arbitrageRoute
|
|
2825
|
+
: null;
|
|
2400
2826
|
const arbitrageProvider = options.provider
|
|
2401
2827
|
? (providerForSecurityMode ?? options.provider)
|
|
2402
|
-
: (providerForSecurityMode ??
|
|
2828
|
+
: (providerForSecurityMode ?? arbitragePair?.provider);
|
|
2829
|
+
const arbitrageModel = !options.provider && (!options.model || options.model === "auto")
|
|
2830
|
+
? arbitragePair?.model
|
|
2831
|
+
: undefined;
|
|
2403
2832
|
// ── Step 7: Query with amplified prompt ──
|
|
2833
|
+
// Reasoning-effort plumbing. Without this, every reasoning-tier
|
|
2834
|
+
// adapter (codex/gpt-5.5, anthropic extended thinking, openai
|
|
2835
|
+
// gpt-5/o-series) runs at the SERVER default — for codex/gpt-5.5
|
|
2836
|
+
// that's `xhigh`, which makes "test, who are you?" take 75s.
|
|
2837
|
+
// Forward the runtime's user-facing `/thinking` setting as the
|
|
2838
|
+
// wire-level hint. A caller-supplied options.reasoningEffort
|
|
2839
|
+
// wins (so `/thinking xhigh` overrides the runtime default).
|
|
2840
|
+
const reasoningEffortHint = options.reasoningEffort ??
|
|
2841
|
+
this.thinkingEffort;
|
|
2404
2842
|
const queryOptions = {
|
|
2405
2843
|
...options,
|
|
2406
|
-
|
|
2844
|
+
...(arbitrageModel ? { model: arbitrageModel } : {}),
|
|
2845
|
+
...(arbitrageProvider ? { provider: arbitrageProvider } : {}),
|
|
2846
|
+
// The runtime materializes an auto-routed provider before
|
|
2847
|
+
// calling AgentBridge. Preserve fallback for those auto-routed
|
|
2848
|
+
// calls, but keep explicit user selections sticky unless the
|
|
2849
|
+
// caller opted back in.
|
|
2850
|
+
allowProviderFallback: options.allowProviderFallback ?? !options.provider,
|
|
2407
2851
|
context: conversationContext,
|
|
2408
2852
|
prompt: sanitizedPrompt,
|
|
2409
2853
|
systemPrompt: fullSystemPrompt,
|
|
2410
2854
|
tools: effectiveTools,
|
|
2855
|
+
reasoningEffort: reasoningEffortHint,
|
|
2411
2856
|
...(turboQuantOllamaParams ? { ollamaParams: turboQuantOllamaParams } : {}),
|
|
2412
2857
|
};
|
|
2413
2858
|
// ── Step 7.1: Response cache fast-path ──
|
|
@@ -2490,10 +2935,17 @@ export class WotannRuntime {
|
|
|
2490
2935
|
.join("\n\n"),
|
|
2491
2936
|
};
|
|
2492
2937
|
for await (const chunk of this.infra.bridge.query(attemptQueryOptions)) {
|
|
2938
|
+
const previousResponseProvider = responseProvider;
|
|
2493
2939
|
if (chunk.provider)
|
|
2494
2940
|
responseProvider = chunk.provider;
|
|
2495
|
-
if (chunk.model)
|
|
2941
|
+
if (chunk.model && this.isModelUsableForProvider(responseProvider, chunk.model)) {
|
|
2496
2942
|
responseModel = chunk.model;
|
|
2943
|
+
}
|
|
2944
|
+
else if (chunk.provider &&
|
|
2945
|
+
chunk.provider !== previousResponseProvider &&
|
|
2946
|
+
!this.isModelUsableForProvider(responseProvider, responseModel)) {
|
|
2947
|
+
responseModel = this.firstDiscoveredModelForProvider(responseProvider) ?? "auto";
|
|
2948
|
+
}
|
|
2497
2949
|
if (chunk.type === "tool_use") {
|
|
2498
2950
|
const toolName = chunk.toolName?.toLowerCase() ?? "";
|
|
2499
2951
|
// Wave 4G: count tool-use chunks for the structured turn event.
|
|
@@ -2715,107 +3167,80 @@ export class WotannRuntime {
|
|
|
2715
3167
|
});
|
|
2716
3168
|
};
|
|
2717
3169
|
// ── Tier 2B: Runtime-handled tool execution ──
|
|
2718
|
-
//
|
|
2719
|
-
//
|
|
2720
|
-
//
|
|
2721
|
-
//
|
|
2722
|
-
//
|
|
2723
|
-
//
|
|
2724
|
-
//
|
|
2725
|
-
//
|
|
2726
|
-
//
|
|
2727
|
-
//
|
|
2728
|
-
|
|
2729
|
-
// if (dispatchResult) { yield dispatchResult; continue; }
|
|
2730
|
-
// }
|
|
2731
|
-
if (toolName === "web_fetch" && chunk.toolInput) {
|
|
2732
|
-
const input = chunk.toolInput;
|
|
2733
|
-
const url = String(input["url"] ?? "");
|
|
2734
|
-
const maxLength = typeof input["maxLength"] === "number" ? input["maxLength"] : undefined;
|
|
2735
|
-
let resultContent;
|
|
2736
|
-
try {
|
|
2737
|
-
const result = await this.webFetchTool.fetch(url);
|
|
2738
|
-
const text = maxLength ? result.markdown.slice(0, maxLength) : result.markdown;
|
|
2739
|
-
resultContent = `\n[web_fetch] ${result.title ?? url} (${result.status}): ${text.slice(0, 200)}...\n`;
|
|
2740
|
-
}
|
|
2741
|
-
catch (err) {
|
|
2742
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2743
|
-
resultContent = `\n[web_fetch] Error: ${msg}\n`;
|
|
2744
|
-
}
|
|
2745
|
-
// Session-5: fire ToolResultReceived so ResultInjectionScanner
|
|
2746
|
-
// sees the raw tool output before the model does. Blocked
|
|
2747
|
-
// results are replaced with a sanitised error notice.
|
|
2748
|
-
const sanitised = await this.fireToolResultReceivedHook("web_fetch", resultContent);
|
|
2749
|
-
yield {
|
|
2750
|
-
type: "text",
|
|
2751
|
-
content: sanitised.content,
|
|
2752
|
-
provider: chunk.provider ?? responseProvider,
|
|
2753
|
-
model: chunk.model ?? responseModel,
|
|
2754
|
-
};
|
|
2755
|
-
}
|
|
2756
|
-
if (toolName === "plan_create" && chunk.toolInput && this.planStore) {
|
|
3170
|
+
// The web_fetch / plan_* / find_symbol / find_references /
|
|
3171
|
+
// rename_symbol branches below delegate to
|
|
3172
|
+
// `dispatchAndSanitizeRuntimeTool()`, which calls the
|
|
3173
|
+
// extracted `dispatchRuntimeTool` in `runtime-tool-dispatch.ts`
|
|
3174
|
+
// and routes the result through `fireToolResultReceivedHook`.
|
|
3175
|
+
// bash / computer_use / monitor / lsp-agent-tools remain
|
|
3176
|
+
// inline because they need bespoke wiring
|
|
3177
|
+
// (`attemptContentParts` + `streamCheckpointStore`,
|
|
3178
|
+
// streaming event format, or features the extracted
|
|
3179
|
+
// dispatcher doesn't yet support).
|
|
3180
|
+
if (toolName === "bash" && chunk.toolInput) {
|
|
2757
3181
|
const input = chunk.toolInput;
|
|
2758
|
-
const
|
|
2759
|
-
const
|
|
2760
|
-
|
|
2761
|
-
try {
|
|
2762
|
-
const plan = this.planStore.createPlan(title, description);
|
|
2763
|
-
resultContent = `\n[plan_create] Created plan "${plan.title}" (${plan.id})\n`;
|
|
2764
|
-
}
|
|
2765
|
-
catch (err) {
|
|
2766
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2767
|
-
resultContent = `\n[plan_create] Error: ${msg}\n`;
|
|
2768
|
-
}
|
|
2769
|
-
const sanitised = await this.fireToolResultReceivedHook("plan_create", resultContent);
|
|
3182
|
+
const command = typeof input["command"] === "string" ? input["command"] : "";
|
|
3183
|
+
const result = executeSafeBashDesktopCommand(command);
|
|
3184
|
+
const sanitised = await this.fireToolResultReceivedHook("Bash", result.content);
|
|
2770
3185
|
yield {
|
|
2771
3186
|
type: "text",
|
|
2772
3187
|
content: sanitised.content,
|
|
2773
3188
|
provider: chunk.provider ?? responseProvider,
|
|
2774
3189
|
model: chunk.model ?? responseModel,
|
|
2775
3190
|
};
|
|
3191
|
+
attemptContentParts.push(sanitised.content);
|
|
3192
|
+
streamCheckpointStore.appendText(streamCheckpoint.id, sanitised.content, chunk.provider ?? responseProvider, chunk.model ?? responseModel);
|
|
3193
|
+
recordToolTiming(result.success, result.success ? undefined : sanitised.content);
|
|
3194
|
+
continue;
|
|
2776
3195
|
}
|
|
2777
|
-
if (toolName === "
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
const plans = this.planStore.listPlans();
|
|
2781
|
-
const summary = plans.length === 0
|
|
2782
|
-
? "No active plans."
|
|
2783
|
-
: plans
|
|
2784
|
-
.map((p) => `- ${p.title} (${p.planId}): ${p.completedTasks}/${p.taskCount} tasks`)
|
|
2785
|
-
.join("\n");
|
|
2786
|
-
resultContent = `\n[plan_list]\n${summary}\n`;
|
|
2787
|
-
}
|
|
2788
|
-
catch (err) {
|
|
2789
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2790
|
-
resultContent = `\n[plan_list] Error: ${msg}\n`;
|
|
2791
|
-
}
|
|
2792
|
-
const sanitised = await this.fireToolResultReceivedHook("plan_list", resultContent);
|
|
3196
|
+
if (toolName === "computer_use" && chunk.toolInput) {
|
|
3197
|
+
const result = executeComputerUseAction(chunk.toolInput);
|
|
3198
|
+
const sanitised = await this.fireToolResultReceivedHook("computer_use", result.content);
|
|
2793
3199
|
yield {
|
|
2794
3200
|
type: "text",
|
|
2795
3201
|
content: sanitised.content,
|
|
2796
3202
|
provider: chunk.provider ?? responseProvider,
|
|
2797
3203
|
model: chunk.model ?? responseModel,
|
|
2798
3204
|
};
|
|
3205
|
+
attemptContentParts.push(sanitised.content);
|
|
3206
|
+
streamCheckpointStore.appendText(streamCheckpoint.id, sanitised.content, chunk.provider ?? responseProvider, chunk.model ?? responseModel);
|
|
3207
|
+
recordToolTiming(result.success, result.success ? undefined : sanitised.content);
|
|
3208
|
+
continue;
|
|
2799
3209
|
}
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
3210
|
+
// ── God-object extraction (web_fetch / plan_*) ──
|
|
3211
|
+
// The per-case dispatch for `web_fetch` and the three
|
|
3212
|
+
// `plan_*` tools now delegates to
|
|
3213
|
+
// `dispatchAndSanitizeRuntimeTool`, which calls the
|
|
3214
|
+
// extracted `dispatchRuntimeTool` in `runtime-tool-dispatch.ts`
|
|
3215
|
+
// and threads the result through `fireToolResultReceivedHook`
|
|
3216
|
+
// for virtual-path scrubbing + ResultInjectionScanner.
|
|
3217
|
+
// Output bytes are identical to the previous inline branches.
|
|
3218
|
+
//
|
|
3219
|
+
// Per-tool gating matches the legacy semantics:
|
|
3220
|
+
// - `web_fetch` requires `chunk.toolInput`
|
|
3221
|
+
// - `plan_create`/`plan_advance` require `chunk.toolInput && planStore`
|
|
3222
|
+
// - `plan_list` requires `planStore` only (no toolInput needed)
|
|
3223
|
+
if (toolName === "web_fetch" ||
|
|
3224
|
+
toolName === "plan_create" ||
|
|
3225
|
+
toolName === "plan_list" ||
|
|
3226
|
+
toolName === "plan_advance") {
|
|
3227
|
+
const requiresInput = toolName !== "plan_list";
|
|
3228
|
+
const requiresPlanStore = toolName !== "web_fetch";
|
|
3229
|
+
const hasInput = chunk.toolInput !== undefined && chunk.toolInput !== null;
|
|
3230
|
+
if ((!requiresInput || hasInput) && (!requiresPlanStore || this.planStore !== null)) {
|
|
3231
|
+
const sanitised = await this.dispatchAndSanitizeRuntimeTool(toolName, (chunk.toolInput ?? {}), {
|
|
3232
|
+
responseProvider: chunk.provider ?? responseProvider,
|
|
3233
|
+
responseModel: chunk.model ?? responseModel,
|
|
3234
|
+
}, toolName);
|
|
3235
|
+
if (sanitised) {
|
|
3236
|
+
yield {
|
|
3237
|
+
type: "text",
|
|
3238
|
+
content: sanitised.content,
|
|
3239
|
+
provider: chunk.provider ?? responseProvider,
|
|
3240
|
+
model: chunk.model ?? responseModel,
|
|
3241
|
+
};
|
|
3242
|
+
}
|
|
2811
3243
|
}
|
|
2812
|
-
const sanitised = await this.fireToolResultReceivedHook("plan_advance", resultContent);
|
|
2813
|
-
yield {
|
|
2814
|
-
type: "text",
|
|
2815
|
-
content: sanitised.content,
|
|
2816
|
-
provider: chunk.provider ?? responseProvider,
|
|
2817
|
-
model: chunk.model ?? responseModel,
|
|
2818
|
-
};
|
|
2819
3244
|
}
|
|
2820
3245
|
// ── Session-6: Monitor tool (Claude Code v2.1.98 port) ──
|
|
2821
3246
|
// Wraps a long-running child process so stdout/stderr lines
|
|
@@ -2917,98 +3342,27 @@ export class WotannRuntime {
|
|
|
2917
3342
|
// Exposes workspace-wide symbol search / reference lookup /
|
|
2918
3343
|
// rename refactor as first-class agent tools backed by the
|
|
2919
3344
|
// TypeScript LanguageService via this.lspManager.
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
resultContent = `\n[find_symbol] Error: ${msg}\n`;
|
|
2941
|
-
}
|
|
2942
|
-
}
|
|
2943
|
-
const sanitised = await this.fireToolResultReceivedHook("find_symbol", resultContent);
|
|
2944
|
-
yield {
|
|
2945
|
-
type: "text",
|
|
2946
|
-
content: sanitised.content,
|
|
2947
|
-
provider: chunk.provider ?? responseProvider,
|
|
2948
|
-
model: chunk.model ?? responseModel,
|
|
2949
|
-
};
|
|
2950
|
-
}
|
|
2951
|
-
if (toolName === "find_references" && chunk.toolInput) {
|
|
2952
|
-
const input = chunk.toolInput;
|
|
2953
|
-
const uri = typeof input["uri"] === "string" ? input["uri"] : "";
|
|
2954
|
-
const line = typeof input["line"] === "number" ? input["line"] : -1;
|
|
2955
|
-
const character = typeof input["character"] === "number" ? input["character"] : -1;
|
|
2956
|
-
let resultContent;
|
|
2957
|
-
if (!uri || line < 0 || character < 0) {
|
|
2958
|
-
resultContent = `\n[find_references] Error: requires uri + line + character\n`;
|
|
2959
|
-
}
|
|
2960
|
-
else {
|
|
2961
|
-
try {
|
|
2962
|
-
const refs = await this.symbolOperations.findReferences(uri, {
|
|
2963
|
-
line,
|
|
2964
|
-
character,
|
|
2965
|
-
});
|
|
2966
|
-
const summary = refs
|
|
2967
|
-
.slice(0, 20)
|
|
2968
|
-
.map((r) => ` ${r.uri}`)
|
|
2969
|
-
.join("\n");
|
|
2970
|
-
resultContent = `\n[find_references] ${refs.length} reference(s):\n${summary}\n`;
|
|
2971
|
-
}
|
|
2972
|
-
catch (err) {
|
|
2973
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
2974
|
-
resultContent = `\n[find_references] Error: ${msg}\n`;
|
|
2975
|
-
}
|
|
2976
|
-
}
|
|
2977
|
-
const sanitised = await this.fireToolResultReceivedHook("find_references", resultContent);
|
|
2978
|
-
yield {
|
|
2979
|
-
type: "text",
|
|
2980
|
-
content: sanitised.content,
|
|
2981
|
-
provider: chunk.provider ?? responseProvider,
|
|
2982
|
-
model: chunk.model ?? responseModel,
|
|
2983
|
-
};
|
|
2984
|
-
}
|
|
2985
|
-
if (toolName === "rename_symbol" && chunk.toolInput) {
|
|
2986
|
-
const input = chunk.toolInput;
|
|
2987
|
-
const uri = typeof input["uri"] === "string" ? input["uri"] : "";
|
|
2988
|
-
const line = typeof input["line"] === "number" ? input["line"] : -1;
|
|
2989
|
-
const character = typeof input["character"] === "number" ? input["character"] : -1;
|
|
2990
|
-
const newName = typeof input["newName"] === "string" ? input["newName"] : "";
|
|
2991
|
-
let resultContent;
|
|
2992
|
-
if (!uri || line < 0 || character < 0 || !newName) {
|
|
2993
|
-
resultContent = `\n[rename_symbol] Error: requires uri + line + character + newName\n`;
|
|
2994
|
-
}
|
|
2995
|
-
else {
|
|
2996
|
-
try {
|
|
2997
|
-
const result = await this.symbolOperations.rename(uri, { line, character }, newName);
|
|
2998
|
-
resultContent = `\n[rename_symbol] Renamed: ${result.editsApplied} edit(s) across ${result.filesAffected} file(s)\n`;
|
|
2999
|
-
}
|
|
3000
|
-
catch (err) {
|
|
3001
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
3002
|
-
resultContent = `\n[rename_symbol] Error: ${msg}\n`;
|
|
3003
|
-
}
|
|
3345
|
+
// ── God-object extraction (Serena LSP tools) ──
|
|
3346
|
+
// find_symbol / find_references / rename_symbol delegate to
|
|
3347
|
+
// the extracted `dispatchRuntimeTool` (which calls the same
|
|
3348
|
+
// SymbolOperations methods with identical envelope text).
|
|
3349
|
+
// Output bytes are byte-identical to the legacy inline branches.
|
|
3350
|
+
if (chunk.toolInput &&
|
|
3351
|
+
(toolName === "find_symbol" ||
|
|
3352
|
+
toolName === "find_references" ||
|
|
3353
|
+
toolName === "rename_symbol")) {
|
|
3354
|
+
const sanitised = await this.dispatchAndSanitizeRuntimeTool(toolName, chunk.toolInput, {
|
|
3355
|
+
responseProvider: chunk.provider ?? responseProvider,
|
|
3356
|
+
responseModel: chunk.model ?? responseModel,
|
|
3357
|
+
}, toolName);
|
|
3358
|
+
if (sanitised) {
|
|
3359
|
+
yield {
|
|
3360
|
+
type: "text",
|
|
3361
|
+
content: sanitised.content,
|
|
3362
|
+
provider: chunk.provider ?? responseProvider,
|
|
3363
|
+
model: chunk.model ?? responseModel,
|
|
3364
|
+
};
|
|
3004
3365
|
}
|
|
3005
|
-
const sanitised = await this.fireToolResultReceivedHook("rename_symbol", resultContent);
|
|
3006
|
-
yield {
|
|
3007
|
-
type: "text",
|
|
3008
|
-
content: sanitised.content,
|
|
3009
|
-
provider: chunk.provider ?? responseProvider,
|
|
3010
|
-
model: chunk.model ?? responseModel,
|
|
3011
|
-
};
|
|
3012
3366
|
}
|
|
3013
3367
|
// Wave 4G: log tool-dispatch timing. `success` flag reflects
|
|
3014
3368
|
// whether the tool-result content starts with an error
|
|
@@ -3188,7 +3542,8 @@ export class WotannRuntime {
|
|
|
3188
3542
|
// calls read that history, so we don't need to hold the return.
|
|
3189
3543
|
const filesInContent = fullContent.match(/(?:src|lib|test)\/[\w\-./]+\.\w+/g) ?? [];
|
|
3190
3544
|
this.trajectoryScorer.scoreTurn(fullContent.slice(0, 2000), options.prompt, filesInContent);
|
|
3191
|
-
|
|
3545
|
+
const emitTrajectoryReplan = this.config.enableTrajectoryReplan ?? process.env["WOTANN_TRAJECTORY_REPLAN"] === "1";
|
|
3546
|
+
if (emitTrajectoryReplan && this.trajectoryScorer.shouldForceReplan()) {
|
|
3192
3547
|
yield {
|
|
3193
3548
|
type: "text",
|
|
3194
3549
|
content: `\n[TrajectoryScorer] ${this.trajectoryScorer.analyze().recommendation}\n`,
|
|
@@ -3278,9 +3633,23 @@ export class WotannRuntime {
|
|
|
3278
3633
|
const { createVerifierEngine } = await import("../verification/verifier-engine.js");
|
|
3279
3634
|
const { createJudgeAdapter } = await import("../verification/judge-adapter.js");
|
|
3280
3635
|
const verifierMod = await import("../verification/index.js");
|
|
3281
|
-
const
|
|
3282
|
-
|
|
3283
|
-
|
|
3636
|
+
const judgeSelection = selectVerifierJudgeAdapter({
|
|
3637
|
+
adapters: this.infra.adapters,
|
|
3638
|
+
responseProvider,
|
|
3639
|
+
responseModel,
|
|
3640
|
+
requestedProvider: this.config.verifierProvider ?? process.env["WOTANN_VERIFIER_PROVIDER"],
|
|
3641
|
+
requestedModel: this.config.verifierModel ?? process.env["WOTANN_VERIFIER_MODEL"],
|
|
3642
|
+
});
|
|
3643
|
+
if (judgeSelection) {
|
|
3644
|
+
if (judgeSelection.fallbackReason) {
|
|
3645
|
+
console.warn(`[WOTANN] verifier judge fallback: ${judgeSelection.fallbackReason}`);
|
|
3646
|
+
}
|
|
3647
|
+
if (judgeSelection.selfJudging) {
|
|
3648
|
+
console.warn("[WOTANN] verifier judge is using the response model because no distinct verifier provider/model is available");
|
|
3649
|
+
}
|
|
3650
|
+
const judge = createJudgeAdapter(judgeSelection.adapter, {
|
|
3651
|
+
...(judgeSelection.model ? { model: judgeSelection.model } : {}),
|
|
3652
|
+
});
|
|
3284
3653
|
// Round 63 turn-10: respect WOTANN_VERIFIER_MODE env var
|
|
3285
3654
|
// (set by the CLI --verify flag) to pick the strategy
|
|
3286
3655
|
// preset. Falls through to BALANCED on unknown values.
|
|
@@ -3719,6 +4088,11 @@ export class WotannRuntime {
|
|
|
3719
4088
|
});
|
|
3720
4089
|
// ProviderArbitrage: record outcome for cost-per-quality tracking
|
|
3721
4090
|
const querySuccess = truncationWarning === null && !fullContent.toLowerCase().startsWith("error");
|
|
4091
|
+
if (querySuccess &&
|
|
4092
|
+
responseProvider.length > 0 &&
|
|
4093
|
+
(responseProvider !== this.session.provider || responseModel !== this.session.model)) {
|
|
4094
|
+
this.setActiveProvider(responseProvider, responseModel || this.session.model || "auto");
|
|
4095
|
+
}
|
|
3722
4096
|
this.providerArbitrage.recordOutcome(responseProvider, responseModel, costEntry.cost, querySuccess ? 0.8 : 0.3);
|
|
3723
4097
|
// Session-13: feed ProviderBrain so learning-based routing can
|
|
3724
4098
|
// favour healthier providers on subsequent queries.
|
|
@@ -3871,6 +4245,47 @@ export class WotannRuntime {
|
|
|
3871
4245
|
this.applySafetyOverrides();
|
|
3872
4246
|
return this.modeCycler.getModeName();
|
|
3873
4247
|
}
|
|
4248
|
+
/**
|
|
4249
|
+
* Atomically switch the active provider AND model for subsequent
|
|
4250
|
+
* `query()` calls. Without this hook, the TUI's model picker would
|
|
4251
|
+
* update React state but `this.session.provider` would still point at
|
|
4252
|
+
* the original auth — so e.g. picking codex/gpt-5.5 routed the model
|
|
4253
|
+
* through Anthropic and produced "unknown model" errors. Provider-
|
|
4254
|
+
* agnostic by design: any provider in the registry is acceptable; we
|
|
4255
|
+
* don't gate on a hardcoded list.
|
|
4256
|
+
*
|
|
4257
|
+
* Side effects: re-fits ContextIntelligence to the new provider's
|
|
4258
|
+
* context window, resets the first-turn flag so the new system prompt
|
|
4259
|
+
* gets resent, and emits a status update so observers (cost tracker,
|
|
4260
|
+
* UI status bar) see the switch immediately.
|
|
4261
|
+
*/
|
|
4262
|
+
setActiveProvider(provider, model) {
|
|
4263
|
+
const resolvedModel = this.isModelUsableForProvider(provider, model)
|
|
4264
|
+
? model
|
|
4265
|
+
: (this.firstDiscoveredModelForProvider(provider) ?? "auto");
|
|
4266
|
+
const previousProvider = this.session.provider;
|
|
4267
|
+
const previousModel = this.session.model;
|
|
4268
|
+
if (previousProvider === provider && previousModel === resolvedModel)
|
|
4269
|
+
return;
|
|
4270
|
+
this.session = {
|
|
4271
|
+
...this.session,
|
|
4272
|
+
provider,
|
|
4273
|
+
model: resolvedModel,
|
|
4274
|
+
};
|
|
4275
|
+
// Refit context intelligence to the new provider's context window
|
|
4276
|
+
// and tokenization heuristics. Without this, token-budget warnings
|
|
4277
|
+
// and compaction triggers stay tuned to the old provider.
|
|
4278
|
+
this.contextIntelligence.adaptToProvider(provider, resolvedModel);
|
|
4279
|
+
// Reset first-turn so the system prompt gets resent. Some providers
|
|
4280
|
+
// (codex via the Codex CLI bridge, claude via the Agent SDK bridge)
|
|
4281
|
+
// use the system prompt to wire up their respective harnesses on
|
|
4282
|
+
// every conversation start; failing to resend after a switch leaves
|
|
4283
|
+
// the new bridge unconfigured.
|
|
4284
|
+
this.isFirstTurn = true;
|
|
4285
|
+
// Reasoning sandwich windowing depends on provider thinking-tier
|
|
4286
|
+
// semantics — clear so the next turn is judged fresh.
|
|
4287
|
+
this.reasoningSandwich.reset();
|
|
4288
|
+
}
|
|
3874
4289
|
/**
|
|
3875
4290
|
* Get the current mode name.
|
|
3876
4291
|
*/
|
|
@@ -3878,9 +4293,11 @@ export class WotannRuntime {
|
|
|
3878
4293
|
return this.modeCycler.getModeName();
|
|
3879
4294
|
}
|
|
3880
4295
|
updateSystemPromptForMode() {
|
|
4296
|
+
const activePersona = getActivePersonaName(join(this.config.workingDir, ".wotann"));
|
|
3881
4297
|
const basePrompt = assembleSystemPromptParts({
|
|
3882
4298
|
workspaceRoot: this.config.workingDir,
|
|
3883
4299
|
mode: "careful",
|
|
4300
|
+
...(activePersona ? { persona: activePersona } : {}),
|
|
3884
4301
|
});
|
|
3885
4302
|
const modeInstructions = this.modeCycler.getMergedInstructions();
|
|
3886
4303
|
// Re-render stable prefix so mode changes still see the latest
|
|
@@ -4545,6 +4962,15 @@ export class WotannRuntime {
|
|
|
4545
4962
|
return this.editTracker;
|
|
4546
4963
|
}
|
|
4547
4964
|
// ── Permission Mode Control ────────────────────────────────
|
|
4965
|
+
//
|
|
4966
|
+
// Four modes, ordered by user-interruption:
|
|
4967
|
+
// ask-always → prompt for every tool call (max safety)
|
|
4968
|
+
// smart → prompt for destructive ops only (default)
|
|
4969
|
+
// auto-approve → skip approval prompts, still escalate on errors
|
|
4970
|
+
// autonomous → full agent autonomy. Skip every prompt, retry on
|
|
4971
|
+
// recoverable errors, only break to the user on hard
|
|
4972
|
+
// blocks (auth, missing files, network down). Pairs
|
|
4973
|
+
// with a long-running task where the user is afk.
|
|
4548
4974
|
permissionMode = "smart";
|
|
4549
4975
|
getPermissionMode() {
|
|
4550
4976
|
return this.permissionMode;
|
|
@@ -4552,6 +4978,26 @@ export class WotannRuntime {
|
|
|
4552
4978
|
setPermissionMode(mode) {
|
|
4553
4979
|
this.permissionMode = mode;
|
|
4554
4980
|
}
|
|
4981
|
+
// ── Verifier (Secondary AI Judge) ──────────────────────────
|
|
4982
|
+
//
|
|
4983
|
+
// The verifier is a separate model that audits the primary response
|
|
4984
|
+
// before it lands in the user's chat (Round 63). When enabled, every
|
|
4985
|
+
// streamed completion goes through `verifierEngine.judge(...)` which
|
|
4986
|
+
// returns an AggregateVerdict; if the decision is "fail" or "needs
|
|
4987
|
+
// revision", the runtime can re-prompt the primary or surface the
|
|
4988
|
+
// verdict to the user. Opt-in to limit token cost — verifier doubles
|
|
4989
|
+
// per-turn provider spend. (`isVerifierEnabled()` getter is declared
|
|
4990
|
+
// farther down with the other "is*" status methods; this is the
|
|
4991
|
+
// matching mutator.)
|
|
4992
|
+
setVerifierEnabled(enabled) {
|
|
4993
|
+
this.verifierEnabled = enabled;
|
|
4994
|
+
if (!enabled) {
|
|
4995
|
+
// Drop the lazy-instantiated engine on disable so a re-enable
|
|
4996
|
+
// gets a fresh one tuned to the current provider/model. Cheap
|
|
4997
|
+
// because the engine is just a config + judge callback.
|
|
4998
|
+
this.verifierEngine = null;
|
|
4999
|
+
}
|
|
5000
|
+
}
|
|
4555
5001
|
// ── Manual Compaction ─────────────────────────────────────
|
|
4556
5002
|
manualCompact() {
|
|
4557
5003
|
const compactionCheck = this.contextIntelligence.shouldCompact();
|
|
@@ -4572,7 +5018,14 @@ export class WotannRuntime {
|
|
|
4572
5018
|
};
|
|
4573
5019
|
}
|
|
4574
5020
|
// ── Thinking Effort Control (like Cursor) ─────────────────
|
|
4575
|
-
|
|
5021
|
+
// Default `low` for snappy interactive UX. Reasoning-tier models
|
|
5022
|
+
// (codex/gpt-5.5, anthropic extended thinking, openai gpt-5/o-series)
|
|
5023
|
+
// respond in <5s at low effort vs 60–90s at the server default
|
|
5024
|
+
// (`xhigh` for codex). Users escalate via `/thinking medium` or
|
|
5025
|
+
// `/thinking high` when a prompt actually warrants deep reasoning.
|
|
5026
|
+
// Pre-2026-05-03 default was `medium`, which the user reported as
|
|
5027
|
+
// making "test, who are you?" take 75s on codex/gpt-5.5.
|
|
5028
|
+
thinkingEffort = "low";
|
|
4576
5029
|
setThinkingEffort(effort) {
|
|
4577
5030
|
this.thinkingEffort = effort;
|
|
4578
5031
|
// Adjust reasoning sandwich multiplier based on effort
|
|
@@ -4767,6 +5220,35 @@ export class WotannRuntime {
|
|
|
4767
5220
|
}
|
|
4768
5221
|
return { content: contentForHooks, blocked: false };
|
|
4769
5222
|
}
|
|
5223
|
+
/**
|
|
5224
|
+
* God-object extraction shim — delegate the per-tool dispatch for the
|
|
5225
|
+
* runtime-handled tools (`web_fetch`, `plan_*`, `find_symbol`,
|
|
5226
|
+
* `find_references`, `rename_symbol`) to the extracted
|
|
5227
|
+
* `dispatchRuntimeTool` instead of repeating the per-case logic inline.
|
|
5228
|
+
*
|
|
5229
|
+
* Behavioral contract is preserved byte-for-byte:
|
|
5230
|
+
* - the input parsing, tool execution, and `[tool] ...` envelope are
|
|
5231
|
+
* identical to the previous inline branches (verified against
|
|
5232
|
+
* `runtime-tool-dispatch.ts` output formats); and
|
|
5233
|
+
* - the caller still fires `ToolResultReceived` via
|
|
5234
|
+
* `fireToolResultReceivedHook` so virtual-path scrubbing and the
|
|
5235
|
+
* result-injection scanner observe every tool envelope, exactly as
|
|
5236
|
+
* before. The hook label matches the legacy inline call sites.
|
|
5237
|
+
*
|
|
5238
|
+
* Returns `null` when the tool name isn't one this shim handles, so
|
|
5239
|
+
* the caller can fall through to its remaining inline branches
|
|
5240
|
+
* (bash / computer_use / monitor / LSP-agent-tools / etc.).
|
|
5241
|
+
*/
|
|
5242
|
+
async dispatchAndSanitizeRuntimeTool(toolName, toolInput, ctx, hookLabel) {
|
|
5243
|
+
const dispatchResult = await dispatchRuntimeTool(toolName, toolInput, {
|
|
5244
|
+
webFetch: this.webFetchTool,
|
|
5245
|
+
planStore: this.planStore,
|
|
5246
|
+
lsp: this.symbolOperations,
|
|
5247
|
+
}, ctx);
|
|
5248
|
+
if (!dispatchResult)
|
|
5249
|
+
return null;
|
|
5250
|
+
return this.fireToolResultReceivedHook(hookLabel, dispatchResult.content);
|
|
5251
|
+
}
|
|
4770
5252
|
getCanvasEditor() {
|
|
4771
5253
|
return this.canvasEditor;
|
|
4772
5254
|
}
|
|
@@ -4788,6 +5270,14 @@ export class WotannRuntime {
|
|
|
4788
5270
|
getContextInspector() {
|
|
4789
5271
|
return this.contextInspector;
|
|
4790
5272
|
}
|
|
5273
|
+
/**
|
|
5274
|
+
* Per-session ReasoningEngine instance. Null until MemoryStore is
|
|
5275
|
+
* initialized. Used by RPC + tests to inspect the per-session
|
|
5276
|
+
* premise pool and derived conclusions.
|
|
5277
|
+
*/
|
|
5278
|
+
getReasoningEngine() {
|
|
5279
|
+
return this.reasoningEngine;
|
|
5280
|
+
}
|
|
4791
5281
|
getPersonaManager() {
|
|
4792
5282
|
return this.personaManager;
|
|
4793
5283
|
}
|
|
@@ -5282,8 +5772,7 @@ export class WotannRuntime {
|
|
|
5282
5772
|
// classifier treats empty as "don't filter; return the general-best
|
|
5283
5773
|
// recommendation" rather than forcing any one model. Previously
|
|
5284
5774
|
// hardcoded ["claude-sonnet-4-6"] which silently biased the router.
|
|
5285
|
-
const
|
|
5286
|
-
const available = status?.providers ? status.providers.map(String) : [];
|
|
5775
|
+
const available = this.getDiscoveredModelIds();
|
|
5287
5776
|
const classification = this.taskRouter.classify(prompt, available);
|
|
5288
5777
|
return {
|
|
5289
5778
|
taskType: classification.type,
|