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
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* markdown-stream — fence-aware streaming markdown boundary detector
|
|
3
|
+
* + nested-fence normalizer.
|
|
4
|
+
*
|
|
5
|
+
* Ported from claw-code rusty-claude-cli render.rs lines 600-814.
|
|
6
|
+
*
|
|
7
|
+
* Why it exists
|
|
8
|
+
* -------------
|
|
9
|
+
* When LLM tokens stream in incrementally, partial code fences (an
|
|
10
|
+
* opening ``` without a closer yet) cause a markdown renderer to
|
|
11
|
+
* mis-render half-finished fences as inline content, then redraw them
|
|
12
|
+
* once the closer arrives. This module buffers tokens until a
|
|
13
|
+
* "fence-safe boundary" — a fully closed fence run, or a blank line
|
|
14
|
+
* outside any open fence — and only then releases a chunk ready to be
|
|
15
|
+
* rendered.
|
|
16
|
+
*
|
|
17
|
+
* `normalizeNestedFences` is a pre-pass that upgrades an outer ```
|
|
18
|
+
* fence to ```` (or longer) when the body contains triple-backtick
|
|
19
|
+
* runs of equal or greater length. CommonMark would otherwise treat
|
|
20
|
+
* the inner marker as the closer; this is the LLM-quoting-markdown
|
|
21
|
+
* case where the model writes a code block that itself contains a
|
|
22
|
+
* code block.
|
|
23
|
+
*
|
|
24
|
+
* Contract
|
|
25
|
+
* --------
|
|
26
|
+
* - Pure module — no side effects, no I/O. The caller owns rendering.
|
|
27
|
+
* - Methods on MarkdownStreamState are minimal and immutable in
|
|
28
|
+
* spirit: each call returns the slice that became ready, plus the
|
|
29
|
+
* updated pending buffer.
|
|
30
|
+
* - Tilde fences (`~~~`) and backtick fences (` ``` `) are tracked
|
|
31
|
+
* independently — a backtick run cannot close a tilde-opened fence
|
|
32
|
+
* and vice versa.
|
|
33
|
+
*
|
|
34
|
+
* API
|
|
35
|
+
* ---
|
|
36
|
+
* class MarkdownStreamState
|
|
37
|
+
* push(delta: string): { readyToFlush: string; pending: string }
|
|
38
|
+
* flush(): string
|
|
39
|
+
* findStreamSafeBoundary(buf: string): number // 0 = not safe yet
|
|
40
|
+
* normalizeNestedFences(markdown: string): string
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* Streaming buffer that releases chunks only at fence-safe boundaries.
|
|
44
|
+
*
|
|
45
|
+
* Although the buffer itself is mutable (a single internal string),
|
|
46
|
+
* `push` and `flush` always return fresh primitives — there is no
|
|
47
|
+
* shared object the caller can accidentally mutate.
|
|
48
|
+
*/
|
|
49
|
+
export class MarkdownStreamState {
|
|
50
|
+
#pending = "";
|
|
51
|
+
/**
|
|
52
|
+
* Append a streamed delta and return whatever is now safe to render.
|
|
53
|
+
*
|
|
54
|
+
* - `readyToFlush` is empty when no safe boundary has been crossed
|
|
55
|
+
* yet (e.g. while inside an open fence). The caller should hold
|
|
56
|
+
* the chunk back until the next push that crosses a boundary.
|
|
57
|
+
* - `pending` is what is still being buffered. It is returned for
|
|
58
|
+
* visibility / debugging; the caller does not need to feed it
|
|
59
|
+
* back.
|
|
60
|
+
*/
|
|
61
|
+
push(delta) {
|
|
62
|
+
this.#pending = this.#pending + delta;
|
|
63
|
+
const split = findStreamSafeBoundary(this.#pending);
|
|
64
|
+
if (split === 0) {
|
|
65
|
+
return { readyToFlush: "", pending: this.#pending };
|
|
66
|
+
}
|
|
67
|
+
const ready = this.#pending.slice(0, split);
|
|
68
|
+
this.#pending = this.#pending.slice(split);
|
|
69
|
+
return { readyToFlush: ready, pending: this.#pending };
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Release any buffered content at the end of the stream. Returns
|
|
73
|
+
* "" when only whitespace was held (we don't want to emit pure
|
|
74
|
+
* whitespace as a final chunk).
|
|
75
|
+
*/
|
|
76
|
+
flush() {
|
|
77
|
+
const remaining = this.#pending;
|
|
78
|
+
if (remaining.trim().length === 0) {
|
|
79
|
+
this.#pending = "";
|
|
80
|
+
return "";
|
|
81
|
+
}
|
|
82
|
+
this.#pending = "";
|
|
83
|
+
return remaining;
|
|
84
|
+
}
|
|
85
|
+
/** Visible for tests — current internal buffer. */
|
|
86
|
+
get pending() {
|
|
87
|
+
return this.#pending;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Find the byte index up to which the buffer can safely be sliced and
|
|
92
|
+
* emitted. Returns `0` when no safe boundary exists yet (the whole
|
|
93
|
+
* buffer must stay pending).
|
|
94
|
+
*
|
|
95
|
+
* A boundary is:
|
|
96
|
+
* - the end of a line that closes a previously opened fence, OR
|
|
97
|
+
* - the end of a blank line, when no fence is open.
|
|
98
|
+
*
|
|
99
|
+
* The buffer must be split by `\n`-inclusive lines so that the
|
|
100
|
+
* returned index points just past a newline — slicing there never
|
|
101
|
+
* cuts a line in half.
|
|
102
|
+
*
|
|
103
|
+
* Note: a value > 0 is always at a line boundary. A value of 0 means
|
|
104
|
+
* either the buffer is empty or no safe boundary has been observed.
|
|
105
|
+
*/
|
|
106
|
+
export function findStreamSafeBoundary(buf) {
|
|
107
|
+
if (buf.length === 0) {
|
|
108
|
+
return 0;
|
|
109
|
+
}
|
|
110
|
+
let openFence = null;
|
|
111
|
+
let lastBoundary = 0;
|
|
112
|
+
let cursor = 0;
|
|
113
|
+
while (cursor < buf.length) {
|
|
114
|
+
const nl = buf.indexOf("\n", cursor);
|
|
115
|
+
const lineEnd = nl === -1 ? buf.length : nl + 1;
|
|
116
|
+
const line = buf.slice(cursor, lineEnd);
|
|
117
|
+
const lineWithoutNewline = stripTrailingNewline(line);
|
|
118
|
+
if (openFence !== null) {
|
|
119
|
+
if (lineClosesFence(lineWithoutNewline, openFence)) {
|
|
120
|
+
openFence = null;
|
|
121
|
+
lastBoundary = lineEnd;
|
|
122
|
+
}
|
|
123
|
+
cursor = lineEnd;
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
const opener = parseFenceOpener(lineWithoutNewline);
|
|
127
|
+
if (opener !== null) {
|
|
128
|
+
openFence = opener;
|
|
129
|
+
cursor = lineEnd;
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
if (lineWithoutNewline.trim().length === 0) {
|
|
133
|
+
lastBoundary = lineEnd;
|
|
134
|
+
}
|
|
135
|
+
cursor = lineEnd;
|
|
136
|
+
}
|
|
137
|
+
return lastBoundary;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Upgrade outer fences whose bodies contain fences of equal or
|
|
141
|
+
* greater length. The rewrite makes the inner markers ordinary
|
|
142
|
+
* content so a CommonMark parser won't see them as the closer.
|
|
143
|
+
*
|
|
144
|
+
* Returns the original string when no rewrite is needed.
|
|
145
|
+
*/
|
|
146
|
+
export function normalizeNestedFences(markdown) {
|
|
147
|
+
if (markdown.length === 0) {
|
|
148
|
+
return markdown;
|
|
149
|
+
}
|
|
150
|
+
const lines = splitInclusive(markdown, "\n");
|
|
151
|
+
const fenceInfo = lines.map((l) => parseFenceLine(l));
|
|
152
|
+
const stack = [];
|
|
153
|
+
const pairs = [];
|
|
154
|
+
for (let i = 0; i < fenceInfo.length; i++) {
|
|
155
|
+
const fl = fenceInfo[i];
|
|
156
|
+
if (fl === null || fl === undefined) {
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
if (fl.hasInfo) {
|
|
160
|
+
stack.push({ lineIdx: i, fence: fl });
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
const top = stack[stack.length - 1];
|
|
164
|
+
const closesTop = top !== undefined && top.fence.char === fl.char && fl.len >= top.fence.len;
|
|
165
|
+
if (closesTop) {
|
|
166
|
+
const opener = stack.pop();
|
|
167
|
+
let innerMax = 0;
|
|
168
|
+
for (let j = opener.lineIdx + 1; j < i; j++) {
|
|
169
|
+
const inner = fenceInfo[j];
|
|
170
|
+
if (inner !== null && inner !== undefined && inner.len > innerMax) {
|
|
171
|
+
innerMax = inner.len;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
pairs.push({ opener: opener.lineIdx, closer: i, innerMax });
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
stack.push({ lineIdx: i, fence: fl });
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
const rewrites = new Map();
|
|
181
|
+
for (const { opener, closer, innerMax } of pairs) {
|
|
182
|
+
const openerFl = fenceInfo[opener];
|
|
183
|
+
const closerFl = fenceInfo[closer];
|
|
184
|
+
if (openerFl === null || openerFl === undefined)
|
|
185
|
+
continue;
|
|
186
|
+
if (closerFl === null || closerFl === undefined)
|
|
187
|
+
continue;
|
|
188
|
+
if (openerFl.len > innerMax)
|
|
189
|
+
continue;
|
|
190
|
+
const newLen = innerMax + 1;
|
|
191
|
+
rewrites.set(opener, { char: openerFl.char, newLen, indent: openerFl.indent });
|
|
192
|
+
rewrites.set(closer, { char: closerFl.char, newLen, indent: closerFl.indent });
|
|
193
|
+
}
|
|
194
|
+
if (rewrites.size === 0) {
|
|
195
|
+
return markdown;
|
|
196
|
+
}
|
|
197
|
+
let out = "";
|
|
198
|
+
for (let i = 0; i < lines.length; i++) {
|
|
199
|
+
const line = lines[i];
|
|
200
|
+
const rw = rewrites.get(i);
|
|
201
|
+
if (rw === undefined) {
|
|
202
|
+
out += line;
|
|
203
|
+
continue;
|
|
204
|
+
}
|
|
205
|
+
const fi = fenceInfo[i];
|
|
206
|
+
const trimmed = stripTrailingNewline(line);
|
|
207
|
+
const info = trimmed.slice(fi.indent + fi.len);
|
|
208
|
+
const trailing = line.slice(trimmed.length);
|
|
209
|
+
const indentStr = " ".repeat(rw.indent);
|
|
210
|
+
const fenceStr = rw.char.repeat(rw.newLen);
|
|
211
|
+
out += indentStr + fenceStr + info + trailing;
|
|
212
|
+
}
|
|
213
|
+
return out;
|
|
214
|
+
}
|
|
215
|
+
// ---------- internals ----------
|
|
216
|
+
function parseFenceOpener(line) {
|
|
217
|
+
const indent = countLeading(line, " ");
|
|
218
|
+
if (indent > 3) {
|
|
219
|
+
return null;
|
|
220
|
+
}
|
|
221
|
+
const rest = line.slice(indent);
|
|
222
|
+
const ch = rest.charAt(0);
|
|
223
|
+
if (ch !== "`" && ch !== "~") {
|
|
224
|
+
return null;
|
|
225
|
+
}
|
|
226
|
+
const length = countLeading(rest, ch);
|
|
227
|
+
if (length < 3) {
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
230
|
+
const infoString = rest.slice(length);
|
|
231
|
+
// Per CommonMark, a backtick fence's info string may not itself
|
|
232
|
+
// contain a backtick. Tilde fences are unrestricted.
|
|
233
|
+
if (ch === "`" && infoString.includes("`")) {
|
|
234
|
+
return null;
|
|
235
|
+
}
|
|
236
|
+
return { character: ch, length };
|
|
237
|
+
}
|
|
238
|
+
function lineClosesFence(line, opener) {
|
|
239
|
+
const indent = countLeading(line, " ");
|
|
240
|
+
if (indent > 3) {
|
|
241
|
+
return false;
|
|
242
|
+
}
|
|
243
|
+
const rest = line.slice(indent);
|
|
244
|
+
const length = countLeading(rest, opener.character);
|
|
245
|
+
if (length < opener.length) {
|
|
246
|
+
return false;
|
|
247
|
+
}
|
|
248
|
+
const tail = rest.slice(length);
|
|
249
|
+
for (let i = 0; i < tail.length; i++) {
|
|
250
|
+
const c = tail.charAt(i);
|
|
251
|
+
if (c !== " " && c !== "\t") {
|
|
252
|
+
return false;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return true;
|
|
256
|
+
}
|
|
257
|
+
function parseFenceLine(line) {
|
|
258
|
+
const trimmed = stripTrailingNewline(line).replace(/\r$/, "");
|
|
259
|
+
const indent = countLeading(trimmed, " ");
|
|
260
|
+
if (indent > 3) {
|
|
261
|
+
return null;
|
|
262
|
+
}
|
|
263
|
+
const rest = trimmed.slice(indent);
|
|
264
|
+
const ch = rest.charAt(0);
|
|
265
|
+
if (ch !== "`" && ch !== "~") {
|
|
266
|
+
return null;
|
|
267
|
+
}
|
|
268
|
+
const len = countLeading(rest, ch);
|
|
269
|
+
if (len < 3) {
|
|
270
|
+
return null;
|
|
271
|
+
}
|
|
272
|
+
const after = rest.slice(len);
|
|
273
|
+
if (ch === "`" && after.includes("`")) {
|
|
274
|
+
return null;
|
|
275
|
+
}
|
|
276
|
+
const hasInfo = after.trim().length > 0;
|
|
277
|
+
return { char: ch, len, hasInfo, indent };
|
|
278
|
+
}
|
|
279
|
+
function countLeading(s, ch) {
|
|
280
|
+
let n = 0;
|
|
281
|
+
while (n < s.length && s.charAt(n) === ch) {
|
|
282
|
+
n++;
|
|
283
|
+
}
|
|
284
|
+
return n;
|
|
285
|
+
}
|
|
286
|
+
function stripTrailingNewline(line) {
|
|
287
|
+
if (line.endsWith("\n")) {
|
|
288
|
+
return line.slice(0, -1);
|
|
289
|
+
}
|
|
290
|
+
return line;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Equivalent to Rust's `str::split_inclusive('\n')` — returns lines
|
|
294
|
+
* with their trailing newline preserved, and a final entry without a
|
|
295
|
+
* newline if the input does not end in one.
|
|
296
|
+
*/
|
|
297
|
+
function splitInclusive(s, sep) {
|
|
298
|
+
if (s.length === 0) {
|
|
299
|
+
return [];
|
|
300
|
+
}
|
|
301
|
+
const out = [];
|
|
302
|
+
let cursor = 0;
|
|
303
|
+
while (cursor < s.length) {
|
|
304
|
+
const idx = s.indexOf(sep, cursor);
|
|
305
|
+
if (idx === -1) {
|
|
306
|
+
out.push(s.slice(cursor));
|
|
307
|
+
break;
|
|
308
|
+
}
|
|
309
|
+
out.push(s.slice(cursor, idx + sep.length));
|
|
310
|
+
cursor = idx + sep.length;
|
|
311
|
+
}
|
|
312
|
+
return out;
|
|
313
|
+
}
|
|
314
|
+
//# sourceMappingURL=markdown-stream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-stream.js","sourceRoot":"","sources":["../../src/ui/markdown-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAcH;;;;;;GAMG;AACH,MAAM,OAAO,mBAAmB;IAC9B,QAAQ,GAAW,EAAE,CAAC;IAEtB;;;;;;;;;OASG;IACH,IAAI,CAAC,KAAa;QAChB,IAAI,CAAC,QA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C,KAAK,EAAE,EAAE,CAAC;QAC1C,CAAC,EAAE,CAAC;IACN,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAS,oBAAoB,CAAC,IAAY;IACxC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CAAC,CAAS,EAAE,GAAW;IAC5C,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,OAAO,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;QACzB,MAAM,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QACnC,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC;YACf,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;YAC1B,MAAM;QACR,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;QAC5C,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC;IAC5B,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kitty / CSI-u progressive enhancement keyboard protocol.
|
|
3
|
+
*
|
|
4
|
+
* On supported terminals (kitty, alacritty, wezterm, foot, recent
|
|
5
|
+
* iTerm2 with the setting enabled), enabling this protocol makes
|
|
6
|
+
* Ctrl+M, Ctrl+I, Ctrl+H, Ctrl+J distinguishable from Enter/Tab/etc.
|
|
7
|
+
* On unsupported terminals (Apple Terminal.app, classic xterm, most
|
|
8
|
+
* SSH-from-Windows setups), we leave the protocol disabled — sending
|
|
9
|
+
* the enable sequence is harmless (terminals ignore unknown CSI
|
|
10
|
+
* sequences) but adds zero value, and querying for support without
|
|
11
|
+
* a fallback risks corrupting input on hostile environments.
|
|
12
|
+
*
|
|
13
|
+
* Reference: https://sw.kovidgoyal.net/kitty/keyboard-protocol/
|
|
14
|
+
*/
|
|
15
|
+
export type KeyboardProtocolMode = "kitty" | "default";
|
|
16
|
+
export declare function detectKeyboardProtocolSupport(env?: NodeJS.ProcessEnv): KeyboardProtocolMode;
|
|
17
|
+
/**
|
|
18
|
+
* Send the kitty enable sequence and return a cleanup function. No-op
|
|
19
|
+
* when mode is "default". Safe to call multiple times — the cleanup
|
|
20
|
+
* handle is idempotent.
|
|
21
|
+
*/
|
|
22
|
+
export declare function enableKeyboardProtocol(mode: KeyboardProtocolMode, out?: NodeJS.WriteStream): () => void;
|
|
23
|
+
//# sourceMappingURL=terminal-keyboard-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal-keyboard-protocol.d.ts","sourceRoot":"","sources":["../../src/ui/terminal-keyboard-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,SAAS,CAAC;AAEvD,wBAAgB,6BAA6B,CAC3C,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,oBAAoB,CA6BtB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,oBAAoB,EAC1B,GAAG,GAAE,MAAM,CAAC,WAA4B,GACvC,MAAM,IAAI,CAiBZ"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kitty / CSI-u progressive enhancement keyboard protocol.
|
|
3
|
+
*
|
|
4
|
+
* On supported terminals (kitty, alacritty, wezterm, foot, recent
|
|
5
|
+
* iTerm2 with the setting enabled), enabling this protocol makes
|
|
6
|
+
* Ctrl+M, Ctrl+I, Ctrl+H, Ctrl+J distinguishable from Enter/Tab/etc.
|
|
7
|
+
* On unsupported terminals (Apple Terminal.app, classic xterm, most
|
|
8
|
+
* SSH-from-Windows setups), we leave the protocol disabled — sending
|
|
9
|
+
* the enable sequence is harmless (terminals ignore unknown CSI
|
|
10
|
+
* sequences) but adds zero value, and querying for support without
|
|
11
|
+
* a fallback risks corrupting input on hostile environments.
|
|
12
|
+
*
|
|
13
|
+
* Reference: https://sw.kovidgoyal.net/kitty/keyboard-protocol/
|
|
14
|
+
*/
|
|
15
|
+
export function detectKeyboardProtocolSupport(env = process.env) {
|
|
16
|
+
// Explicit env overrides win over auto-detection. Opt-out comes
|
|
17
|
+
// first, so a user whose tmux multiplexer doesn't pass through the
|
|
18
|
+
// protocol can disable it even when running under kitty/wezterm/etc.
|
|
19
|
+
if (env["WOTANN_KITTY_KEYBOARD"] === "0")
|
|
20
|
+
return "default";
|
|
21
|
+
// Explicit opt-in, for users who know their terminal supports it
|
|
22
|
+
// and want to override the conservative default.
|
|
23
|
+
if (env["WOTANN_KITTY_KEYBOARD"] === "1")
|
|
24
|
+
return "kitty";
|
|
25
|
+
// Conservative: only enable on terminals KNOWN to support it AND
|
|
26
|
+
// implement the protocol cleanly. Unknown terminals get default.
|
|
27
|
+
const term = env["TERM"] ?? "";
|
|
28
|
+
const termProgram = env["TERM_PROGRAM"] ?? "";
|
|
29
|
+
const lcTerm = env["LC_TERMINAL"] ?? "";
|
|
30
|
+
// Confirmed-good terminals
|
|
31
|
+
if (termProgram === "kitty" || term.includes("kitty"))
|
|
32
|
+
return "kitty";
|
|
33
|
+
if (termProgram === "WezTerm" || term.includes("wezterm"))
|
|
34
|
+
return "kitty";
|
|
35
|
+
if (term.startsWith("alacritty"))
|
|
36
|
+
return "kitty";
|
|
37
|
+
if (term === "foot" || term.includes("foot-"))
|
|
38
|
+
return "kitty";
|
|
39
|
+
if (lcTerm === "ghostty" || termProgram === "ghostty")
|
|
40
|
+
return "kitty";
|
|
41
|
+
// iTerm2 supports it from build 3.5+ but only when the user enables
|
|
42
|
+
// "Report modifiers using CSI u" in Profile > Keys. We can't probe
|
|
43
|
+
// that without a roundtrip, so default to "default" — Ctrl+O / Ctrl+X
|
|
44
|
+
// already work on iTerm2 and the cost of NOT enabling here is just
|
|
45
|
+
// muscle-memory loss for power users (they can override via env).
|
|
46
|
+
return "default";
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Send the kitty enable sequence and return a cleanup function. No-op
|
|
50
|
+
* when mode is "default". Safe to call multiple times — the cleanup
|
|
51
|
+
* handle is idempotent.
|
|
52
|
+
*/
|
|
53
|
+
export function enableKeyboardProtocol(mode, out = process.stdout) {
|
|
54
|
+
if (mode !== "kitty")
|
|
55
|
+
return () => { };
|
|
56
|
+
if (!out.isTTY)
|
|
57
|
+
return () => { };
|
|
58
|
+
// Push a new keyboard mode (flag 1 = disambiguate escape codes).
|
|
59
|
+
// The push/pop semantics mean we don't clobber a parent process's
|
|
60
|
+
// mode if WOTANN is invoked from a terminal multiplexer that already
|
|
61
|
+
// uses the protocol.
|
|
62
|
+
out.write("\x1b[>1u");
|
|
63
|
+
let cleaned = false;
|
|
64
|
+
return () => {
|
|
65
|
+
if (cleaned)
|
|
66
|
+
return;
|
|
67
|
+
cleaned = true;
|
|
68
|
+
// Pop our mode off the stack.
|
|
69
|
+
out.write("\x1b[<u");
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=terminal-keyboard-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal-keyboard-protocol.js","sourceRoot":"","sources":["../../src/ui/terminal-keyboard-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,MAAM,UAAU,6BAA6B,CAC3C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,CAAC,KAAK;QAAE,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;IAEhC,iEAAiE;IACjE,kEAAkE;IAClE,qEAAqE;IACrE,qBAAqB;IACrB,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAEtB,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,OAAO,GAAG,EAAE;QACV,IAAI,OAAO;YAAE,OAAO;QACpB,OAAO,GAAG,IAAI,CAAC;QACf,8BAA8B;QAC9B,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACvB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme React context — single source of truth for the active palette.
|
|
3
|
+
*
|
|
4
|
+
* Pre-2026-05-03, every component hardcoded `buildTone(PALETTES.dark)`.
|
|
5
|
+
* Switching themes via Ctrl+Y / `/theme` updated `App.tsx` state but
|
|
6
|
+
* leaf components ignored it because they re-read the dark palette
|
|
7
|
+
* unconditionally. User report: "themes don't apply everywhere in the
|
|
8
|
+
* TUI" — this fixes that by threading the active palette through
|
|
9
|
+
* context so every `useThemeTone()` call resolves to the live palette.
|
|
10
|
+
*
|
|
11
|
+
* Why context not props: ~20 leaf components ranging from StatusBar
|
|
12
|
+
* to MemoryInspector to OptionPicker need the active tone. Prop-
|
|
13
|
+
* drilling through Box / Static / wrapper layers creates churn on
|
|
14
|
+
* every refactor. Context is the standard React pattern for cross-
|
|
15
|
+
* cutting design tokens, and Ink supports it natively.
|
|
16
|
+
*
|
|
17
|
+
* Performance: the provider memoises tone+palette together; consumer
|
|
18
|
+
* components only re-render when the palette identity changes (which
|
|
19
|
+
* happens on `/theme switch`, not on every state update).
|
|
20
|
+
*/
|
|
21
|
+
import React from "react";
|
|
22
|
+
import { type Palette } from "../themes.js";
|
|
23
|
+
import { type Tone } from "./tokens.js";
|
|
24
|
+
interface ThemeContextValue {
|
|
25
|
+
readonly palette: Palette;
|
|
26
|
+
readonly tone: Tone;
|
|
27
|
+
}
|
|
28
|
+
export declare function ThemeProvider({ palette, children, }: {
|
|
29
|
+
readonly palette: Palette;
|
|
30
|
+
readonly children: React.ReactNode;
|
|
31
|
+
}): React.ReactElement;
|
|
32
|
+
/**
|
|
33
|
+
* Read the active palette + tone from context. Use this in any leaf
|
|
34
|
+
* UI component instead of `buildTone(PALETTES.dark)` so theme cycling
|
|
35
|
+
* propagates to the whole tree.
|
|
36
|
+
*/
|
|
37
|
+
export declare function useThemeTone(): ThemeContextValue;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/ui/theme/context.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAa,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnD,UAAU,iBAAiB;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;CACrB;AASD,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CACpC,GAAG,KAAK,CAAC,YAAY,CAMrB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,iBAAiB,CAEhD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Theme React context — single source of truth for the active palette.
|
|
4
|
+
*
|
|
5
|
+
* Pre-2026-05-03, every component hardcoded `buildTone(PALETTES.dark)`.
|
|
6
|
+
* Switching themes via Ctrl+Y / `/theme` updated `App.tsx` state but
|
|
7
|
+
* leaf components ignored it because they re-read the dark palette
|
|
8
|
+
* unconditionally. User report: "themes don't apply everywhere in the
|
|
9
|
+
* TUI" — this fixes that by threading the active palette through
|
|
10
|
+
* context so every `useThemeTone()` call resolves to the live palette.
|
|
11
|
+
*
|
|
12
|
+
* Why context not props: ~20 leaf components ranging from StatusBar
|
|
13
|
+
* to MemoryInspector to OptionPicker need the active tone. Prop-
|
|
14
|
+
* drilling through Box / Static / wrapper layers creates churn on
|
|
15
|
+
* every refactor. Context is the standard React pattern for cross-
|
|
16
|
+
* cutting design tokens, and Ink supports it natively.
|
|
17
|
+
*
|
|
18
|
+
* Performance: the provider memoises tone+palette together; consumer
|
|
19
|
+
* components only re-render when the palette identity changes (which
|
|
20
|
+
* happens on `/theme switch`, not on every state update).
|
|
21
|
+
*/
|
|
22
|
+
import { createContext, useContext, useMemo } from "react";
|
|
23
|
+
import { PALETTES } from "../themes.js";
|
|
24
|
+
import { buildTone } from "./tokens.js";
|
|
25
|
+
const DEFAULT_VALUE = {
|
|
26
|
+
palette: PALETTES.dark,
|
|
27
|
+
tone: buildTone(PALETTES.dark),
|
|
28
|
+
};
|
|
29
|
+
const ThemeContext = createContext(DEFAULT_VALUE);
|
|
30
|
+
export function ThemeProvider({ palette, children, }) {
|
|
31
|
+
const value = useMemo(() => ({ palette, tone: buildTone(palette) }), [palette]);
|
|
32
|
+
return _jsx(ThemeContext.Provider, { value: value, children: children });
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Read the active palette + tone from context. Use this in any leaf
|
|
36
|
+
* UI component instead of `buildTone(PALETTES.dark)` so theme cycling
|
|
37
|
+
* propagates to the whole tree.
|
|
38
|
+
*/
|
|
39
|
+
export function useThemeTone() {
|
|
40
|
+
return useContext(ThemeContext);
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/ui/theme/context.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAc,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAgB,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,SAAS,EAAa,MAAM,aAAa,CAAC;AAOnD,MAAM,aAAa,GAAsB;IACvC,OAAO,EAAE,QAAQ,CAAC,IAAI;IACtB,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC;CAC/B,CAAC;AAEF,MAAM,YAAY,GAAG,aAAa,CAAoB,aAAa,CAAC,CAAC;AAErE,MAAM,UAAU,aAAa,CAAC,EAC5B,OAAO,EACP,QAAQ,GAIT;IACC,MAAM,KAAK,GAAG,OAAO,CACnB,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,EAC7C,CAAC,OAAO,CAAC,CACV,CAAC;IACF,OAAO,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAyB,CAAC;AACjF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,UAAU,CAAC,YAAY,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* platform — single source of truth for OS-aware system calls.
|
|
3
|
+
*
|
|
4
|
+
* WOTANN runs on macOS, Linux, AND Windows. POSIX assumptions
|
|
5
|
+
* scattered across the codebase (hardcoded `bash`, `/bin/sh`,
|
|
6
|
+
* `which`, literal `/tmp`, `process.env.HOME`, `:` PATH separator)
|
|
7
|
+
* silently break on Windows. This module centralizes the
|
|
8
|
+
* platform branches so callers route everything through one
|
|
9
|
+
* helper instead of duplicating `process.platform === "win32"`
|
|
10
|
+
* checks at every call site.
|
|
11
|
+
*
|
|
12
|
+
* Quality bars:
|
|
13
|
+
* - Pure functions (no module-level state, no env mutation)
|
|
14
|
+
* - Frozen return objects for shape stability
|
|
15
|
+
* - Tests live in tests/utils/platform.test.ts and exercise
|
|
16
|
+
* win32/darwin/linux branches via explicit overrides
|
|
17
|
+
*/
|
|
18
|
+
export type SupportedPlatform = NodeJS.Platform;
|
|
19
|
+
export interface PlatformShell {
|
|
20
|
+
/** The shell binary to invoke (e.g. "cmd.exe" or "/bin/sh"). */
|
|
21
|
+
readonly cmd: string;
|
|
22
|
+
/**
|
|
23
|
+
* Argument prefix for `execFile`/`spawn`. Combine with the actual
|
|
24
|
+
* command via a single trailing string argument so shell injection
|
|
25
|
+
* surface stays minimal. e.g. `[...args, "echo hello"]`.
|
|
26
|
+
*/
|
|
27
|
+
readonly args: readonly string[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Resolve the appropriate shell for the current platform.
|
|
31
|
+
*
|
|
32
|
+
* On Windows, returns cmd.exe with /c so callers can pass a single
|
|
33
|
+
* command string. POSIX systems use /bin/sh -c by default; bash is
|
|
34
|
+
* preferred when explicitly available but /bin/sh is the POSIX
|
|
35
|
+
* lowest-common-denominator (avoids "bash not on PATH" failures on
|
|
36
|
+
* minimal containers).
|
|
37
|
+
*
|
|
38
|
+
* Callers that need bash specifically (e.g. for arrays, [[ ]],
|
|
39
|
+
* process substitution) should branch on `process.platform` AND
|
|
40
|
+
* verify `bash` is on PATH via `whichBinary("bash")` first.
|
|
41
|
+
*/
|
|
42
|
+
export declare function getPlatformShell(platformOverride?: SupportedPlatform): PlatformShell;
|
|
43
|
+
/**
|
|
44
|
+
* Build the argv for executing a single shell command portably.
|
|
45
|
+
* Returns the full argv ready to pass to `execFile` / `spawn`.
|
|
46
|
+
*/
|
|
47
|
+
export declare function buildShellCommand(command: string, platformOverride?: SupportedPlatform): {
|
|
48
|
+
readonly file: string;
|
|
49
|
+
readonly argv: readonly string[];
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Return the OS-appropriate "which" binary name. Windows ships
|
|
53
|
+
* `where.exe`; POSIX has `which` on PATH by default.
|
|
54
|
+
*
|
|
55
|
+
* Callers should invoke this and check exit code rather than parsing
|
|
56
|
+
* stdout — the `where`/`which` output formats differ (where emits
|
|
57
|
+
* absolute paths separated by CRLF; which emits one path per line).
|
|
58
|
+
*/
|
|
59
|
+
export declare function whichBinary(platformOverride?: SupportedPlatform): "where" | "which";
|
|
60
|
+
/**
|
|
61
|
+
* PATH list separator. POSIX uses `:`, Windows uses `;`. Centralized
|
|
62
|
+
* here so callers never inline the literal — that's a class of bug
|
|
63
|
+
* the prior audit caught at src/sandbox/extended-backends.ts:176.
|
|
64
|
+
*/
|
|
65
|
+
export declare function getPathDelimiter(platformOverride?: SupportedPlatform): ":" | ";";
|
|
66
|
+
/**
|
|
67
|
+
* Re-export from `node:path` for callers that want the canonical
|
|
68
|
+
* separator without re-importing node:path. Identical to
|
|
69
|
+
* `getPathDelimiter()` on every modern Node.
|
|
70
|
+
*/
|
|
71
|
+
export declare const PATH_DELIMITER: string;
|
|
72
|
+
/**
|
|
73
|
+
* Resolve the user's home directory, OS-aware. `process.env.HOME`
|
|
74
|
+
* is empty on Windows by default — Node's `os.homedir()` reads from
|
|
75
|
+
* USERPROFILE on Windows and HOME elsewhere.
|
|
76
|
+
*/
|
|
77
|
+
export declare function getHomeDir(): string;
|
|
78
|
+
/**
|
|
79
|
+
* Resolve the OS-appropriate temp directory. Hardcoded `/tmp`
|
|
80
|
+
* literals fail on Windows; `process.env.TMPDIR` is POSIX-only.
|
|
81
|
+
* Node's `os.tmpdir()` is the canonical source.
|
|
82
|
+
*/
|
|
83
|
+
export declare function getTempDir(): string;
|
|
84
|
+
/**
|
|
85
|
+
* Best-effort chmod wrapper. POSIX file modes are meaningless on
|
|
86
|
+
* Windows FAT/exFAT; the SDK throws EINVAL/ENOSYS on those layers.
|
|
87
|
+
* Wraps the sync chmod in a try/catch so callers don't have to.
|
|
88
|
+
*
|
|
89
|
+
* Returns true when chmod succeeded, false when it threw — callers
|
|
90
|
+
* that need to confirm POSIX-mode semantics should branch on the
|
|
91
|
+
* return value. For pure "let me try to make this executable"
|
|
92
|
+
* use-cases, the return value can be ignored.
|
|
93
|
+
*/
|
|
94
|
+
export declare function chmodBestEffort(fs: {
|
|
95
|
+
chmodSync: (path: string, mode: number) => void;
|
|
96
|
+
}, filePath: string, mode: number): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Resolve the platform-specific name of a Node tooling binary. On
|
|
99
|
+
* Windows, npm/npx/yarn/pnpm install as `.cmd` shims (e.g. npx.cmd)
|
|
100
|
+
* which spawnSync/execFile MUST receive literally — bare "npx" ENOENTs.
|
|
101
|
+
* On POSIX the bare name resolves via PATH.
|
|
102
|
+
*/
|
|
103
|
+
export declare function nodeToolBinary(name: "npx" | "npm" | "yarn" | "pnpm" | "tsc", platformOverride?: SupportedPlatform): string;
|
|
104
|
+
/**
|
|
105
|
+
* Convenience predicate for branches that need to know "are we on
|
|
106
|
+
* Windows right now". Equivalent to `process.platform === "win32"`
|
|
107
|
+
* but accepts an override for tests.
|
|
108
|
+
*/
|
|
109
|
+
export declare function isWindows(platformOverride?: SupportedPlatform): boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Convenience predicate for macOS. Used by macOS-only paths like
|
|
112
|
+
* the seatbelt sandbox executor.
|
|
113
|
+
*/
|
|
114
|
+
export declare function isMacOS(platformOverride?: SupportedPlatform): boolean;
|
|
115
|
+
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/utils/platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,QAAQ,CAAC;AAEhD,MAAM,WAAW,aAAa;IAC5B,gEAAgE;IAChE,QAAQ,CAAC,GAAG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