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
|
@@ -35,14 +35,17 @@ import { execFileSync, spawn } from "node:child_process";
|
|
|
35
35
|
import { hostname, networkInterfaces, platform as osPlatform } from "node:os";
|
|
36
36
|
import { join as pathJoin } from "node:path";
|
|
37
37
|
import { resolveWotannHomeSubdir } from "../utils/wotann-home.js";
|
|
38
|
+
import { writeFileAtomic } from "../utils/atomic-io.js";
|
|
38
39
|
import { createSqliteKvStore } from "../utils/sqlite-kv-store.js";
|
|
39
40
|
import { resolveCompanionPort } from "../daemon/port-resolver.js";
|
|
40
41
|
import { WebSocketServer } from "ws";
|
|
41
|
-
import {
|
|
42
|
+
import { parse as yamlParse } from "yaml";
|
|
43
|
+
import { takeScreenshot, click, moveMouse, drag, scroll, typeText, pressKey, detectPlatform, detectAvailableTools, listDesktopActions, } from "../computer-use/platform-bindings.js";
|
|
42
44
|
import { ConversationSyncHandler, MobileVoiceHandler, TaskMonitorHandler, QuickActionHandler, FileShareHandler, PushNotificationHandler, WidgetDataHandler, LiveActivityHandler, } from "../mobile/ios-app.js";
|
|
43
45
|
import { SecureAuthManager } from "../mobile/secure-auth.js";
|
|
44
46
|
import { resolveHaptic } from "../mobile/haptic-feedback.js";
|
|
45
47
|
import { isWithinWorkspace } from "../sandbox/security.js";
|
|
48
|
+
import { getProviderService } from "../providers/provider-service.js";
|
|
46
49
|
/**
|
|
47
50
|
* GA-11 helper — translate a streaming chunk type into the discriminated
|
|
48
51
|
* method name iOS subscribes to. Single source of truth so additions or
|
|
@@ -311,9 +314,21 @@ export class PairingManager {
|
|
|
311
314
|
/**
|
|
312
315
|
* Generate QR code data for pairing.
|
|
313
316
|
* Format: wotann://pair?id=<requestId>&pin=<pin>&host=<host>&port=<port>
|
|
317
|
+
* When available, embeds remote access metadata so QR/deep-link pairing
|
|
318
|
+
* works beyond the LAN without requiring a second config.sync round-trip.
|
|
314
319
|
*/
|
|
315
|
-
generateQRData(requestId, pin, host, port) {
|
|
316
|
-
|
|
320
|
+
generateQRData(requestId, pin, host, port, remoteAccess) {
|
|
321
|
+
const params = new URLSearchParams({
|
|
322
|
+
id: requestId,
|
|
323
|
+
pin,
|
|
324
|
+
host,
|
|
325
|
+
port: String(port),
|
|
326
|
+
});
|
|
327
|
+
if (remoteAccess) {
|
|
328
|
+
params.set("remoteAccess", JSON.stringify(remoteAccess));
|
|
329
|
+
params.set("remoteEndpoints", JSON.stringify(remoteAccess.endpoints));
|
|
330
|
+
}
|
|
331
|
+
return `wotann://pair?${params.toString()}`;
|
|
317
332
|
}
|
|
318
333
|
}
|
|
319
334
|
// ── RPC Handler ─────────────────────────────────────────
|
|
@@ -360,6 +375,13 @@ export class CompanionRPCHandler {
|
|
|
360
375
|
return [...this.handlers.keys()];
|
|
361
376
|
}
|
|
362
377
|
}
|
|
378
|
+
function normalizeP256PublicKey(publicKey) {
|
|
379
|
+
if (publicKey.length === 65 && publicKey[0] === 0x04)
|
|
380
|
+
return publicKey;
|
|
381
|
+
if (publicKey.length === 64)
|
|
382
|
+
return Buffer.concat([Buffer.from([0x04]), publicKey]);
|
|
383
|
+
throw new Error(`Invalid P-256 public key: expected 64-byte raw X/Y or 65-byte X9.63, got ${publicKey.length} bytes`);
|
|
384
|
+
}
|
|
363
385
|
/**
|
|
364
386
|
* Methods that DO NOT require an authToken. These are either bootstrapping
|
|
365
387
|
* (to obtain a token in the first place), health-check, or the ECDH key
|
|
@@ -367,6 +389,7 @@ export class CompanionRPCHandler {
|
|
|
367
389
|
*/
|
|
368
390
|
export const AUTH_EXEMPT_METHODS = new Set([
|
|
369
391
|
"pair",
|
|
392
|
+
"pair.offer",
|
|
370
393
|
"pair.local",
|
|
371
394
|
"security.keyExchange",
|
|
372
395
|
"ping",
|
|
@@ -374,8 +397,52 @@ export const AUTH_EXEMPT_METHODS = new Set([
|
|
|
374
397
|
export class AuthTokenStore {
|
|
375
398
|
tokens = new Map();
|
|
376
399
|
sessionTimeoutMs;
|
|
377
|
-
|
|
400
|
+
persistence;
|
|
401
|
+
constructor(sessionTimeoutMs = 24 * 60 * 60_000, persistPath) {
|
|
378
402
|
this.sessionTimeoutMs = sessionTimeoutMs;
|
|
403
|
+
const store = persistPath ? createSqliteKvStore(persistPath, "tokens") : null;
|
|
404
|
+
this.persistence = store?.usable ? store : null;
|
|
405
|
+
if (this.persistence) {
|
|
406
|
+
const now = Date.now();
|
|
407
|
+
for (const { key, value } of this.persistence.loadAll()) {
|
|
408
|
+
const tokenHash = typeof value.tokenHash === "string"
|
|
409
|
+
? value.tokenHash
|
|
410
|
+
: typeof value.token === "string"
|
|
411
|
+
? AuthTokenStore.tokenHash(value.token)
|
|
412
|
+
: key;
|
|
413
|
+
if (!tokenHash ||
|
|
414
|
+
typeof value.sessionId !== "string" ||
|
|
415
|
+
typeof value.deviceId !== "string" ||
|
|
416
|
+
typeof value.issuedAt !== "number" ||
|
|
417
|
+
typeof value.expiresAt !== "number") {
|
|
418
|
+
this.persistence.delete(key);
|
|
419
|
+
continue;
|
|
420
|
+
}
|
|
421
|
+
if (now > value.expiresAt) {
|
|
422
|
+
this.persistence.delete(key);
|
|
423
|
+
continue;
|
|
424
|
+
}
|
|
425
|
+
this.tokens.set(tokenHash, {
|
|
426
|
+
token: "",
|
|
427
|
+
sessionId: value.sessionId,
|
|
428
|
+
deviceId: value.deviceId,
|
|
429
|
+
issuedAt: value.issuedAt,
|
|
430
|
+
expiresAt: value.expiresAt,
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
static tokenHash(token) {
|
|
436
|
+
return createHash("sha256").update(token).digest("hex");
|
|
437
|
+
}
|
|
438
|
+
persist(key, record) {
|
|
439
|
+
this.persistence?.put(key, {
|
|
440
|
+
tokenHash: key,
|
|
441
|
+
sessionId: record.sessionId,
|
|
442
|
+
deviceId: record.deviceId,
|
|
443
|
+
issuedAt: record.issuedAt,
|
|
444
|
+
expiresAt: record.expiresAt,
|
|
445
|
+
});
|
|
379
446
|
}
|
|
380
447
|
/**
|
|
381
448
|
* Issue a new 32-byte (64 hex char) random token for the given session/device.
|
|
@@ -384,14 +451,17 @@ export class AuthTokenStore {
|
|
|
384
451
|
*/
|
|
385
452
|
issue(sessionId, deviceId) {
|
|
386
453
|
const token = randomBytes(32).toString("hex");
|
|
454
|
+
const key = AuthTokenStore.tokenHash(token);
|
|
387
455
|
const now = Date.now();
|
|
388
|
-
|
|
456
|
+
const record = {
|
|
389
457
|
token,
|
|
390
458
|
sessionId,
|
|
391
459
|
deviceId,
|
|
392
460
|
issuedAt: now,
|
|
393
461
|
expiresAt: now + this.sessionTimeoutMs,
|
|
394
|
-
}
|
|
462
|
+
};
|
|
463
|
+
this.tokens.set(key, record);
|
|
464
|
+
this.persist(key, record);
|
|
395
465
|
return token;
|
|
396
466
|
}
|
|
397
467
|
/**
|
|
@@ -401,18 +471,23 @@ export class AuthTokenStore {
|
|
|
401
471
|
validate(token) {
|
|
402
472
|
if (!token || typeof token !== "string")
|
|
403
473
|
return null;
|
|
404
|
-
const
|
|
474
|
+
const key = AuthTokenStore.tokenHash(token);
|
|
475
|
+
const record = this.tokens.get(key);
|
|
405
476
|
if (!record)
|
|
406
477
|
return null;
|
|
407
478
|
if (Date.now() > record.expiresAt) {
|
|
408
|
-
this.tokens.delete(
|
|
479
|
+
this.tokens.delete(key);
|
|
480
|
+
this.persistence?.delete(key);
|
|
409
481
|
return null;
|
|
410
482
|
}
|
|
411
|
-
return record;
|
|
483
|
+
return { ...record, token };
|
|
412
484
|
}
|
|
413
485
|
/** Revoke a specific token (e.g. on unpair). */
|
|
414
486
|
revoke(token) {
|
|
415
|
-
|
|
487
|
+
const key = AuthTokenStore.tokenHash(token);
|
|
488
|
+
const removed = this.tokens.delete(key);
|
|
489
|
+
this.persistence?.delete(key);
|
|
490
|
+
return removed;
|
|
416
491
|
}
|
|
417
492
|
/** Revoke all tokens for a given device (e.g. on unpair by deviceId). */
|
|
418
493
|
revokeForDevice(deviceId) {
|
|
@@ -420,6 +495,7 @@ export class AuthTokenStore {
|
|
|
420
495
|
for (const [tok, rec] of this.tokens) {
|
|
421
496
|
if (rec.deviceId === deviceId) {
|
|
422
497
|
this.tokens.delete(tok);
|
|
498
|
+
this.persistence?.delete(tok);
|
|
423
499
|
count++;
|
|
424
500
|
}
|
|
425
501
|
}
|
|
@@ -471,6 +547,7 @@ export class CompanionServer {
|
|
|
471
547
|
connectedClients = new Set();
|
|
472
548
|
running = false;
|
|
473
549
|
runtime = null;
|
|
550
|
+
runtimeReady = null;
|
|
474
551
|
bridgeRpcHandler = null;
|
|
475
552
|
/** Per-device AES-256 symmetric keys derived from ECDH key exchange. */
|
|
476
553
|
deviceEncryptionKeys = new Map();
|
|
@@ -497,6 +574,13 @@ export class CompanionServer {
|
|
|
497
574
|
* (not module-global) so concurrent test daemons do not share state.
|
|
498
575
|
*/
|
|
499
576
|
wsOriginAuditLog = [];
|
|
577
|
+
/**
|
|
578
|
+
* One-tap iOS pairing offer advertised through Bonjour TXT records.
|
|
579
|
+
* The offer is still verified by the same pending-request store as QR
|
|
580
|
+
* pairing; Bonjour only removes the need for the user to scan the code.
|
|
581
|
+
*/
|
|
582
|
+
bonjourPairingOffer = null;
|
|
583
|
+
bonjourRefreshTimer = null;
|
|
500
584
|
constructor(config) {
|
|
501
585
|
// SECURITY (SB-3): default to loopback-only to prevent the companion
|
|
502
586
|
// server from being reachable on every network interface (incl. public
|
|
@@ -541,8 +625,8 @@ export class CompanionServer {
|
|
|
541
625
|
this.pairingManager = new PairingManager(this.config.maxDevices, resolveWotannHomeSubdir("companion-devices.db"));
|
|
542
626
|
this.rpcHandler = new CompanionRPCHandler();
|
|
543
627
|
this.secureAuth = new SecureAuthManager(this.config.sessionTimeoutMs);
|
|
544
|
-
this.authTokens = new AuthTokenStore(this.config.sessionTimeoutMs);
|
|
545
|
-
this.conversationSync = new ConversationSyncHandler();
|
|
628
|
+
this.authTokens = new AuthTokenStore(this.config.sessionTimeoutMs, resolveWotannHomeSubdir("companion-auth-tokens.db"));
|
|
629
|
+
this.conversationSync = new ConversationSyncHandler(resolveWotannHomeSubdir("mobile-conversations.json"));
|
|
546
630
|
this.mobileVoice = new MobileVoiceHandler();
|
|
547
631
|
this.taskMonitor = new TaskMonitorHandler();
|
|
548
632
|
this.quickAction = new QuickActionHandler();
|
|
@@ -750,13 +834,14 @@ export class CompanionServer {
|
|
|
750
834
|
const serviceName = `WOTANN (${hostname()})`;
|
|
751
835
|
const serviceType = "_wotann._tcp";
|
|
752
836
|
const port = String(this.config.port);
|
|
837
|
+
const txtRecords = this.getBonjourTxtRecords();
|
|
753
838
|
const os = osPlatform();
|
|
754
839
|
let proc = null;
|
|
755
840
|
let advertiser = "";
|
|
756
841
|
if (os === "darwin") {
|
|
757
842
|
try {
|
|
758
843
|
// dns-sd is built into macOS — no npm package needed.
|
|
759
|
-
proc = spawn("dns-sd", ["-R", serviceName, serviceType, "local", port], {
|
|
844
|
+
proc = spawn("dns-sd", ["-R", serviceName, serviceType, "local", port, ...txtRecords], {
|
|
760
845
|
stdio: "ignore",
|
|
761
846
|
detached: true,
|
|
762
847
|
});
|
|
@@ -771,7 +856,7 @@ export class CompanionServer {
|
|
|
771
856
|
// process; we detach so it survives daemon parent. Package is
|
|
772
857
|
// typically `avahi-utils` (Debian/Ubuntu) or `avahi` (Arch/Fedora).
|
|
773
858
|
try {
|
|
774
|
-
proc = spawn("avahi-publish-service", [serviceName, serviceType, port], {
|
|
859
|
+
proc = spawn("avahi-publish-service", [serviceName, serviceType, port, ...txtRecords], {
|
|
775
860
|
stdio: "ignore",
|
|
776
861
|
detached: true,
|
|
777
862
|
});
|
|
@@ -810,6 +895,7 @@ export class CompanionServer {
|
|
|
810
895
|
/* ignore write errors */
|
|
811
896
|
}
|
|
812
897
|
}
|
|
898
|
+
this.scheduleBonjourPairingRefresh();
|
|
813
899
|
}
|
|
814
900
|
stop() {
|
|
815
901
|
this.running = false;
|
|
@@ -830,16 +916,7 @@ export class CompanionServer {
|
|
|
830
916
|
this.httpServer = null;
|
|
831
917
|
}
|
|
832
918
|
this.wsServer = null;
|
|
833
|
-
|
|
834
|
-
// CI runners restrict process.kill on subprocesses they didn't spawn,
|
|
835
|
-
// so swallow EPERM/ESRCH instead of letting it propagate.
|
|
836
|
-
const bonjourProc = this._bonjourProc;
|
|
837
|
-
try {
|
|
838
|
-
bonjourProc?.kill?.();
|
|
839
|
-
}
|
|
840
|
-
catch {
|
|
841
|
-
/* sandbox/CI may forbid kill() — non-fatal */
|
|
842
|
-
}
|
|
919
|
+
this.stopBonjourAdvertisement();
|
|
843
920
|
}
|
|
844
921
|
isRunning() {
|
|
845
922
|
return this.running;
|
|
@@ -856,10 +933,13 @@ export class CompanionServer {
|
|
|
856
933
|
* pipeline — tasks resolve with { success, result } when the underlying
|
|
857
934
|
* stream ends, or { success:false, result:"error…" } on exception.
|
|
858
935
|
*/
|
|
859
|
-
setRuntime(runtime) {
|
|
936
|
+
setRuntime(runtime, ready) {
|
|
860
937
|
this.runtime = runtime;
|
|
938
|
+
this.runtimeReady = ready ?? null;
|
|
861
939
|
this.taskMonitor = new TaskMonitorHandler(async (prompt) => {
|
|
862
940
|
try {
|
|
941
|
+
if (this.runtimeReady)
|
|
942
|
+
await this.runtimeReady;
|
|
863
943
|
let collected = "";
|
|
864
944
|
for await (const chunk of runtime.query({ prompt })) {
|
|
865
945
|
if (typeof chunk === "string")
|
|
@@ -907,14 +987,335 @@ export class CompanionServer {
|
|
|
907
987
|
}
|
|
908
988
|
return hostname();
|
|
909
989
|
}
|
|
990
|
+
getRemoteEndpoints() {
|
|
991
|
+
const endpoints = [];
|
|
992
|
+
const configured = this.parseConfiguredRemoteEndpoint();
|
|
993
|
+
if (configured)
|
|
994
|
+
endpoints.push(configured);
|
|
995
|
+
if (process.env.WOTANN_DISABLE_TAILSCALE_DETECTION !== "1") {
|
|
996
|
+
const nets = networkInterfaces();
|
|
997
|
+
for (const addresses of Object.values(nets)) {
|
|
998
|
+
for (const entry of addresses ?? []) {
|
|
999
|
+
if (entry.family !== "IPv4" ||
|
|
1000
|
+
entry.internal ||
|
|
1001
|
+
!CompanionServer.isTailscaleIPv4(entry.address)) {
|
|
1002
|
+
continue;
|
|
1003
|
+
}
|
|
1004
|
+
endpoints.push({
|
|
1005
|
+
kind: "tailnet",
|
|
1006
|
+
label: "Tailscale",
|
|
1007
|
+
host: entry.address,
|
|
1008
|
+
port: this.config.port,
|
|
1009
|
+
scheme: "ws",
|
|
1010
|
+
});
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
const cliTailnetIp = this.getTailscaleIPv4FromCli();
|
|
1014
|
+
if (cliTailnetIp) {
|
|
1015
|
+
endpoints.push({
|
|
1016
|
+
kind: "tailnet",
|
|
1017
|
+
label: "Tailscale",
|
|
1018
|
+
host: cliTailnetIp,
|
|
1019
|
+
port: this.config.port,
|
|
1020
|
+
scheme: "ws",
|
|
1021
|
+
});
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
const seen = new Set();
|
|
1025
|
+
return endpoints.filter((endpoint) => {
|
|
1026
|
+
const key = `${endpoint.scheme}://${endpoint.host}:${endpoint.port}`;
|
|
1027
|
+
if (seen.has(key))
|
|
1028
|
+
return false;
|
|
1029
|
+
seen.add(key);
|
|
1030
|
+
return true;
|
|
1031
|
+
});
|
|
1032
|
+
}
|
|
1033
|
+
getRemoteAccessStatus() {
|
|
1034
|
+
const endpoints = this.getRemoteEndpoints();
|
|
1035
|
+
const hasConfiguredEndpoint = endpoints.some((endpoint) => endpoint.kind === "configured");
|
|
1036
|
+
const hasTailnetEndpoint = endpoints.some((endpoint) => endpoint.kind === "tailnet");
|
|
1037
|
+
const mode = hasConfiguredEndpoint ? "configured-url" : hasTailnetEndpoint ? "tailscale" : "unconfigured";
|
|
1038
|
+
const status = endpoints.length > 0 ? "ready" : "missing-endpoint";
|
|
1039
|
+
const setupOptions = [
|
|
1040
|
+
{
|
|
1041
|
+
id: "tailscale",
|
|
1042
|
+
label: "Tailscale private mesh",
|
|
1043
|
+
detail: "Install Tailscale on the Mac and iPhone, sign into the same tailnet, then reopen WOTANN link. WOTANN will advertise the 100.x tailnet address automatically.",
|
|
1044
|
+
url: "https://tailscale.com/download",
|
|
1045
|
+
recommended: true,
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
id: "configured-url",
|
|
1049
|
+
label: "Bring your own remote URL",
|
|
1050
|
+
detail: "Use any free tunnel or reverse proxy you already trust, then point WOTANN at its WebSocket URL.",
|
|
1051
|
+
command: "printf '{\"remoteUrl\":\"wss://your-host.example\"}\\n' > ~/.wotann/remote-access.json",
|
|
1052
|
+
recommended: false,
|
|
1053
|
+
},
|
|
1054
|
+
];
|
|
1055
|
+
return {
|
|
1056
|
+
status,
|
|
1057
|
+
mode,
|
|
1058
|
+
endpoints,
|
|
1059
|
+
setupOptions,
|
|
1060
|
+
message: status === "ready"
|
|
1061
|
+
? "Off-WiFi access is ready through a remote endpoint advertised by this daemon."
|
|
1062
|
+
: "No Tailscale or configured remote endpoint is available. Add Tailscale or set ~/.wotann/remote-access.json so iOS has an off-WiFi endpoint.",
|
|
1063
|
+
};
|
|
1064
|
+
}
|
|
1065
|
+
getRemoteAccessSnapshot() {
|
|
1066
|
+
return this.getRemoteAccessStatus();
|
|
1067
|
+
}
|
|
1068
|
+
configureRemoteAccessUrl(rawUrl) {
|
|
1069
|
+
const endpoint = CompanionServer.parseRemoteEndpoint(rawUrl);
|
|
1070
|
+
if (!endpoint) {
|
|
1071
|
+
throw new Error("Remote URL must be a valid ws, wss, http, or https URL");
|
|
1072
|
+
}
|
|
1073
|
+
const configPath = resolveWotannHomeSubdir("remote-access.json");
|
|
1074
|
+
mkdirSync(resolveWotannHomeSubdir(), { recursive: true });
|
|
1075
|
+
writeFileAtomic(configPath, `${JSON.stringify({ remoteUrl: rawUrl.trim() }, null, 2)}\n`, { mode: 0o600 });
|
|
1076
|
+
return this.getRemoteAccessStatus();
|
|
1077
|
+
}
|
|
1078
|
+
clearConfiguredRemoteAccessUrl() {
|
|
1079
|
+
try {
|
|
1080
|
+
unlinkSync(resolveWotannHomeSubdir("remote-access.json"));
|
|
1081
|
+
}
|
|
1082
|
+
catch {
|
|
1083
|
+
/* already absent */
|
|
1084
|
+
}
|
|
1085
|
+
return this.getRemoteAccessStatus();
|
|
1086
|
+
}
|
|
1087
|
+
getTailscaleIPv4FromCli() {
|
|
1088
|
+
try {
|
|
1089
|
+
const output = execFileSync("tailscale", ["ip", "-4"], {
|
|
1090
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
1091
|
+
timeout: 1500,
|
|
1092
|
+
encoding: "utf-8",
|
|
1093
|
+
});
|
|
1094
|
+
const candidate = output
|
|
1095
|
+
.split(/\s+/)
|
|
1096
|
+
.map((part) => part.trim())
|
|
1097
|
+
.find((part) => CompanionServer.isTailscaleIPv4(part));
|
|
1098
|
+
return candidate ?? null;
|
|
1099
|
+
}
|
|
1100
|
+
catch {
|
|
1101
|
+
return null;
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
parseConfiguredRemoteEndpoint() {
|
|
1105
|
+
const raw = this.resolveConfiguredRemoteUrl();
|
|
1106
|
+
if (!raw)
|
|
1107
|
+
return null;
|
|
1108
|
+
try {
|
|
1109
|
+
return CompanionServer.parseRemoteEndpoint(raw);
|
|
1110
|
+
}
|
|
1111
|
+
catch {
|
|
1112
|
+
console.warn(`[CompanionServer] ignoring invalid WOTANN_COMPANION_REMOTE_URL=${JSON.stringify(raw)}`);
|
|
1113
|
+
return null;
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
static parseRemoteEndpoint(rawValue) {
|
|
1117
|
+
const raw = rawValue.trim();
|
|
1118
|
+
if (!raw)
|
|
1119
|
+
return null;
|
|
1120
|
+
try {
|
|
1121
|
+
const url = raw.includes("://") ? new URL(raw) : new URL(`wss://${raw}`);
|
|
1122
|
+
const scheme = url.protocol === "ws:" || url.protocol === "http:"
|
|
1123
|
+
? "ws"
|
|
1124
|
+
: url.protocol === "wss:" || url.protocol === "https:"
|
|
1125
|
+
? "wss"
|
|
1126
|
+
: null;
|
|
1127
|
+
if (!scheme || !url.hostname)
|
|
1128
|
+
return null;
|
|
1129
|
+
const port = url.port ? Number.parseInt(url.port, 10) : scheme === "wss" ? 443 : 80;
|
|
1130
|
+
if (!Number.isInteger(port) || port <= 0 || port > 65_535)
|
|
1131
|
+
return null;
|
|
1132
|
+
const path = url.pathname && url.pathname !== "/" ? url.pathname : undefined;
|
|
1133
|
+
const query = url.search ? url.search.slice(1) : undefined;
|
|
1134
|
+
return {
|
|
1135
|
+
kind: "configured",
|
|
1136
|
+
label: "Remote Bridge",
|
|
1137
|
+
host: url.hostname,
|
|
1138
|
+
port,
|
|
1139
|
+
scheme,
|
|
1140
|
+
...(path ? { path } : {}),
|
|
1141
|
+
...(query ? { query } : {}),
|
|
1142
|
+
url: url.toString(),
|
|
1143
|
+
};
|
|
1144
|
+
}
|
|
1145
|
+
catch {
|
|
1146
|
+
return null;
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
resolveConfiguredRemoteUrl() {
|
|
1150
|
+
const envUrl = (process.env.WOTANN_COMPANION_REMOTE_URL ?? "").trim();
|
|
1151
|
+
if (envUrl)
|
|
1152
|
+
return envUrl;
|
|
1153
|
+
return this.readRemoteAccessJsonUrl() ?? this.readWotannYamlRemoteUrl();
|
|
1154
|
+
}
|
|
1155
|
+
readRemoteAccessJsonUrl() {
|
|
1156
|
+
try {
|
|
1157
|
+
const configPath = resolveWotannHomeSubdir("remote-access.json");
|
|
1158
|
+
if (!existsSync(configPath))
|
|
1159
|
+
return null;
|
|
1160
|
+
const parsed = JSON.parse(readFileSync(configPath, "utf-8"));
|
|
1161
|
+
return CompanionServer.firstConfigString(parsed, [
|
|
1162
|
+
["remoteUrl"],
|
|
1163
|
+
["url"],
|
|
1164
|
+
["endpoint"],
|
|
1165
|
+
["remoteAccess", "url"],
|
|
1166
|
+
["companion", "remoteUrl"],
|
|
1167
|
+
["companion", "remoteAccessUrl"],
|
|
1168
|
+
]);
|
|
1169
|
+
}
|
|
1170
|
+
catch {
|
|
1171
|
+
return null;
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
readWotannYamlRemoteUrl() {
|
|
1175
|
+
try {
|
|
1176
|
+
const configPath = resolveWotannHomeSubdir("wotann.yaml");
|
|
1177
|
+
if (!existsSync(configPath))
|
|
1178
|
+
return null;
|
|
1179
|
+
const parsed = yamlParse(readFileSync(configPath, "utf-8"));
|
|
1180
|
+
return CompanionServer.firstConfigString(parsed, [
|
|
1181
|
+
["remoteAccess", "url"],
|
|
1182
|
+
["remote_access", "url"],
|
|
1183
|
+
["remote", "url"],
|
|
1184
|
+
["companion", "remoteUrl"],
|
|
1185
|
+
["companion", "remoteAccessUrl"],
|
|
1186
|
+
["companion", "remote_access_url"],
|
|
1187
|
+
]);
|
|
1188
|
+
}
|
|
1189
|
+
catch {
|
|
1190
|
+
return null;
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
static firstConfigString(value, paths) {
|
|
1194
|
+
for (const path of paths) {
|
|
1195
|
+
let cursor = value;
|
|
1196
|
+
for (const segment of path) {
|
|
1197
|
+
if (!cursor || typeof cursor !== "object" || Array.isArray(cursor)) {
|
|
1198
|
+
cursor = undefined;
|
|
1199
|
+
break;
|
|
1200
|
+
}
|
|
1201
|
+
cursor = cursor[segment];
|
|
1202
|
+
}
|
|
1203
|
+
if (typeof cursor === "string" && cursor.trim().length > 0) {
|
|
1204
|
+
return cursor.trim();
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
return null;
|
|
1208
|
+
}
|
|
1209
|
+
static isTailscaleIPv4(address) {
|
|
1210
|
+
const parts = address.split(".").map((part) => Number.parseInt(part, 10));
|
|
1211
|
+
if (parts.length !== 4 || parts.some((part) => !Number.isInteger(part))) {
|
|
1212
|
+
return false;
|
|
1213
|
+
}
|
|
1214
|
+
const [first, second] = parts;
|
|
1215
|
+
if (first === undefined || second === undefined)
|
|
1216
|
+
return false;
|
|
1217
|
+
// Tailscale assigns IPv4 addresses from 100.64.0.0/10.
|
|
1218
|
+
return first === 100 && second >= 64 && second <= 127;
|
|
1219
|
+
}
|
|
1220
|
+
getBonjourTxtRecords() {
|
|
1221
|
+
const offer = this.getOrCreateBonjourPairingOffer();
|
|
1222
|
+
return [
|
|
1223
|
+
`host=${this.getAdvertisedHost()}`,
|
|
1224
|
+
`port=${this.config.port}`,
|
|
1225
|
+
"scheme=ws",
|
|
1226
|
+
`requestId=${offer.requestId}`,
|
|
1227
|
+
`pin=${offer.pin}`,
|
|
1228
|
+
`expiresAt=${offer.expiresAt}`,
|
|
1229
|
+
];
|
|
1230
|
+
}
|
|
1231
|
+
getOrCreateBonjourPairingOffer() {
|
|
1232
|
+
const current = this.bonjourPairingOffer;
|
|
1233
|
+
if (current) {
|
|
1234
|
+
const expiresAtMs = Date.parse(current.expiresAt);
|
|
1235
|
+
if (Number.isFinite(expiresAtMs) && expiresAtMs - Date.now() > 30_000) {
|
|
1236
|
+
return current;
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
const request = this.pairingManager.generatePairingRequest();
|
|
1240
|
+
this.bonjourPairingOffer = {
|
|
1241
|
+
requestId: request.requestId,
|
|
1242
|
+
pin: request.pin,
|
|
1243
|
+
expiresAt: request.expiresAt,
|
|
1244
|
+
};
|
|
1245
|
+
return this.bonjourPairingOffer;
|
|
1246
|
+
}
|
|
1247
|
+
setBonjourPairingOffer(offer) {
|
|
1248
|
+
this.bonjourPairingOffer = offer;
|
|
1249
|
+
if (this.running) {
|
|
1250
|
+
this.restartBonjourAdvertisement({ regenerateOffer: false });
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
scheduleBonjourPairingRefresh() {
|
|
1254
|
+
if (this.bonjourRefreshTimer) {
|
|
1255
|
+
clearTimeout(this.bonjourRefreshTimer);
|
|
1256
|
+
this.bonjourRefreshTimer = null;
|
|
1257
|
+
}
|
|
1258
|
+
const offer = this.bonjourPairingOffer;
|
|
1259
|
+
if (!offer)
|
|
1260
|
+
return;
|
|
1261
|
+
const expiresAtMs = Date.parse(offer.expiresAt);
|
|
1262
|
+
if (!Number.isFinite(expiresAtMs))
|
|
1263
|
+
return;
|
|
1264
|
+
const delayMs = Math.max(30_000, expiresAtMs - Date.now() - 30_000);
|
|
1265
|
+
this.bonjourRefreshTimer = setTimeout(() => {
|
|
1266
|
+
this.bonjourRefreshTimer = null;
|
|
1267
|
+
this.restartBonjourAdvertisement({ regenerateOffer: true });
|
|
1268
|
+
}, delayMs);
|
|
1269
|
+
this.bonjourRefreshTimer.unref?.();
|
|
1270
|
+
}
|
|
1271
|
+
restartBonjourAdvertisement(options) {
|
|
1272
|
+
if (options.regenerateOffer) {
|
|
1273
|
+
this.bonjourPairingOffer = null;
|
|
1274
|
+
}
|
|
1275
|
+
this.stopBonjourAdvertisement();
|
|
1276
|
+
if (this.running) {
|
|
1277
|
+
this.advertiseBonjourService();
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
stopBonjourAdvertisement() {
|
|
1281
|
+
if (this.bonjourRefreshTimer) {
|
|
1282
|
+
clearTimeout(this.bonjourRefreshTimer);
|
|
1283
|
+
this.bonjourRefreshTimer = null;
|
|
1284
|
+
}
|
|
1285
|
+
const bonjourProc = this._bonjourProc;
|
|
1286
|
+
try {
|
|
1287
|
+
bonjourProc?.kill?.();
|
|
1288
|
+
}
|
|
1289
|
+
catch {
|
|
1290
|
+
/* sandbox/CI may forbid kill() — non-fatal */
|
|
1291
|
+
}
|
|
1292
|
+
this._bonjourProc = undefined;
|
|
1293
|
+
try {
|
|
1294
|
+
unlinkSync(resolveWotannHomeSubdir("bonjour.pid"));
|
|
1295
|
+
}
|
|
1296
|
+
catch {
|
|
1297
|
+
/* ignore */
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
910
1300
|
/**
|
|
911
1301
|
* Generate a pairing QR code for iOS app connection.
|
|
912
1302
|
*/
|
|
913
1303
|
generatePairingQR() {
|
|
914
1304
|
const { pin, requestId, expiresAt } = this.pairingManager.generatePairingRequest();
|
|
1305
|
+
this.setBonjourPairingOffer({ requestId, pin, expiresAt });
|
|
1306
|
+
const remoteAccess = this.getRemoteAccessStatus();
|
|
915
1307
|
const host = this.getAdvertisedHost();
|
|
916
|
-
const qrData = this.pairingManager.generateQRData(requestId, pin, host, this.config.port);
|
|
917
|
-
return {
|
|
1308
|
+
const qrData = this.pairingManager.generateQRData(requestId, pin, host, this.config.port, remoteAccess);
|
|
1309
|
+
return {
|
|
1310
|
+
qrData,
|
|
1311
|
+
requestId,
|
|
1312
|
+
pin,
|
|
1313
|
+
expiresAt,
|
|
1314
|
+
host,
|
|
1315
|
+
port: this.config.port,
|
|
1316
|
+
remoteEndpoints: remoteAccess.endpoints,
|
|
1317
|
+
remoteAccess,
|
|
1318
|
+
};
|
|
918
1319
|
}
|
|
919
1320
|
getConversationSync() {
|
|
920
1321
|
return this.conversationSync;
|
|
@@ -1124,6 +1525,10 @@ export class CompanionServer {
|
|
|
1124
1525
|
}
|
|
1125
1526
|
}
|
|
1126
1527
|
if (parsed.method === "chat.send") {
|
|
1528
|
+
if (this.bridgeRpcHandler) {
|
|
1529
|
+
await this.handleBridgeRPC(ws, raw, parsed);
|
|
1530
|
+
return;
|
|
1531
|
+
}
|
|
1127
1532
|
await this.handleChatSend(ws, parsed);
|
|
1128
1533
|
return;
|
|
1129
1534
|
}
|
|
@@ -1151,6 +1556,19 @@ export class CompanionServer {
|
|
|
1151
1556
|
});
|
|
1152
1557
|
}
|
|
1153
1558
|
async handleBridgeRPC(ws, raw, parsed) {
|
|
1559
|
+
const isChatSend = parsed.method === "chat.send";
|
|
1560
|
+
const chatConversationId = this.conversationIdFromChatParams(parsed.params);
|
|
1561
|
+
const chatPrompt = this.promptFromChatParams(parsed.params);
|
|
1562
|
+
if (isChatSend && chatConversationId && chatPrompt) {
|
|
1563
|
+
const provider = typeof parsed.params["provider"] === "string"
|
|
1564
|
+
? parsed.params["provider"]
|
|
1565
|
+
: undefined;
|
|
1566
|
+
const model = typeof parsed.params["model"] === "string" ? parsed.params["model"] : undefined;
|
|
1567
|
+
this.conversationSync.receiveMessage(chatConversationId, chatPrompt, this.attachmentsFromChatParams(parsed.params), {
|
|
1568
|
+
...(provider ? { provider } : {}),
|
|
1569
|
+
...(model ? { model } : {}),
|
|
1570
|
+
});
|
|
1571
|
+
}
|
|
1154
1572
|
const result = await this.bridgeRpcHandler?.handleMessage(raw);
|
|
1155
1573
|
if (!result) {
|
|
1156
1574
|
this.sendRPCResponse(ws, parsed.method, {
|
|
@@ -1178,12 +1596,26 @@ export class CompanionServer {
|
|
|
1178
1596
|
});
|
|
1179
1597
|
return;
|
|
1180
1598
|
}
|
|
1599
|
+
if (isChatSend && chatConversationId && content.length > 0) {
|
|
1600
|
+
this.conversationSync.receiveAssistantMessage(chatConversationId, content);
|
|
1601
|
+
}
|
|
1181
1602
|
this.sendRPCResponse(ws, parsed.method, {
|
|
1182
1603
|
result: { content },
|
|
1183
1604
|
id: parsed.id,
|
|
1184
1605
|
});
|
|
1185
1606
|
return;
|
|
1186
1607
|
}
|
|
1608
|
+
if (isChatSend && chatConversationId) {
|
|
1609
|
+
const responseContent = typeof result.result === "object" &&
|
|
1610
|
+
result.result !== null &&
|
|
1611
|
+
"content" in result.result &&
|
|
1612
|
+
typeof result.result.content === "string"
|
|
1613
|
+
? result.result.content
|
|
1614
|
+
: "";
|
|
1615
|
+
if (responseContent.length > 0) {
|
|
1616
|
+
this.conversationSync.receiveAssistantMessage(chatConversationId, responseContent);
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1187
1619
|
this.sendRPCResponse(ws, parsed.method, {
|
|
1188
1620
|
result: result.result,
|
|
1189
1621
|
error: result.error,
|
|
@@ -1224,14 +1656,35 @@ export class CompanionServer {
|
|
|
1224
1656
|
});
|
|
1225
1657
|
return;
|
|
1226
1658
|
}
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1659
|
+
if (this.runtimeReady) {
|
|
1660
|
+
try {
|
|
1661
|
+
await this.runtimeReady;
|
|
1662
|
+
}
|
|
1663
|
+
catch (err) {
|
|
1664
|
+
this.sendRPCResponse(ws, message.method, {
|
|
1665
|
+
error: {
|
|
1666
|
+
code: -32000,
|
|
1667
|
+
message: `Runtime initialization failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
1668
|
+
},
|
|
1669
|
+
id: message.id,
|
|
1670
|
+
});
|
|
1671
|
+
return;
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
const prompt = this.promptFromChatParams(message.params);
|
|
1230
1675
|
const conversationId = message.params["conversationId"] ?? this.runtime.getSession().id;
|
|
1231
1676
|
const provider = message.params["provider"];
|
|
1232
1677
|
const model = message.params["model"];
|
|
1233
1678
|
const beforeSession = this.runtime.getSession();
|
|
1234
1679
|
let content = "";
|
|
1680
|
+
const beforeTokens = beforeSession.totalTokens;
|
|
1681
|
+
const beforeCost = beforeSession.totalCost;
|
|
1682
|
+
if (prompt.trim()) {
|
|
1683
|
+
this.conversationSync.receiveMessage(conversationId, prompt, this.attachmentsFromChatParams(message.params), {
|
|
1684
|
+
...(provider ? { provider } : {}),
|
|
1685
|
+
...(model ? { model } : {}),
|
|
1686
|
+
});
|
|
1687
|
+
}
|
|
1235
1688
|
try {
|
|
1236
1689
|
for await (const chunk of this.runtime.query({ prompt, provider, model })) {
|
|
1237
1690
|
if (chunk.type === "text") {
|
|
@@ -1262,6 +1715,16 @@ export class CompanionServer {
|
|
|
1262
1715
|
}
|
|
1263
1716
|
}
|
|
1264
1717
|
const afterSession = this.runtime.getSession();
|
|
1718
|
+
const tokensUsed = Math.max(0, afterSession.totalTokens - beforeTokens);
|
|
1719
|
+
const cost = Math.max(0, afterSession.totalCost - beforeCost);
|
|
1720
|
+
if (content.length > 0) {
|
|
1721
|
+
this.conversationSync.receiveAssistantMessage(conversationId, content, {
|
|
1722
|
+
provider: afterSession.provider,
|
|
1723
|
+
model: afterSession.model,
|
|
1724
|
+
tokensUsed,
|
|
1725
|
+
cost,
|
|
1726
|
+
});
|
|
1727
|
+
}
|
|
1265
1728
|
this.sendStreamEvent(ws, {
|
|
1266
1729
|
method: "stream.done",
|
|
1267
1730
|
params: {
|
|
@@ -1269,8 +1732,8 @@ export class CompanionServer {
|
|
|
1269
1732
|
content: "",
|
|
1270
1733
|
sessionId: conversationId,
|
|
1271
1734
|
conversationId,
|
|
1272
|
-
tokensUsed
|
|
1273
|
-
cost
|
|
1735
|
+
tokensUsed,
|
|
1736
|
+
cost,
|
|
1274
1737
|
provider: afterSession.provider,
|
|
1275
1738
|
model: afterSession.model,
|
|
1276
1739
|
},
|
|
@@ -1298,6 +1761,38 @@ export class CompanionServer {
|
|
|
1298
1761
|
});
|
|
1299
1762
|
}
|
|
1300
1763
|
}
|
|
1764
|
+
promptFromChatParams(params) {
|
|
1765
|
+
return params["content"] ?? params["prompt"] ?? "";
|
|
1766
|
+
}
|
|
1767
|
+
conversationIdFromChatParams(params) {
|
|
1768
|
+
const conversationId = params["conversationId"];
|
|
1769
|
+
return typeof conversationId === "string" && conversationId.trim().length > 0
|
|
1770
|
+
? conversationId
|
|
1771
|
+
: null;
|
|
1772
|
+
}
|
|
1773
|
+
attachmentsFromChatParams(params) {
|
|
1774
|
+
const attachments = params["attachments"];
|
|
1775
|
+
if (Array.isArray(attachments)) {
|
|
1776
|
+
return attachments.filter((item) => {
|
|
1777
|
+
if (typeof item !== "object" || item === null)
|
|
1778
|
+
return false;
|
|
1779
|
+
const candidate = item;
|
|
1780
|
+
return (typeof candidate["name"] === "string" &&
|
|
1781
|
+
typeof candidate["dataBase64"] === "string" &&
|
|
1782
|
+
typeof candidate["mimeType"] === "string");
|
|
1783
|
+
});
|
|
1784
|
+
}
|
|
1785
|
+
const images = params["images"];
|
|
1786
|
+
if (!Array.isArray(images))
|
|
1787
|
+
return undefined;
|
|
1788
|
+
return images
|
|
1789
|
+
.filter((image) => typeof image === "string" && image.length > 0)
|
|
1790
|
+
.map((dataBase64, index) => ({
|
|
1791
|
+
name: `image-${index + 1}.jpg`,
|
|
1792
|
+
dataBase64,
|
|
1793
|
+
mimeType: "image/jpeg",
|
|
1794
|
+
}));
|
|
1795
|
+
}
|
|
1301
1796
|
/**
|
|
1302
1797
|
* Map RPC method outcomes to haptic trigger names for iOS feedback.
|
|
1303
1798
|
*/
|
|
@@ -1410,8 +1905,9 @@ export class CompanionServer {
|
|
|
1410
1905
|
return { success: false, error: "Missing publicKey parameter" };
|
|
1411
1906
|
}
|
|
1412
1907
|
try {
|
|
1413
|
-
// Decode client's base64 public key
|
|
1414
|
-
|
|
1908
|
+
// Decode client's base64 public key. CryptoKit may send raw X/Y
|
|
1909
|
+
// bytes, while Node ECDH expects X9.63 with the 0x04 prefix.
|
|
1910
|
+
const clientPubRaw = normalizeP256PublicKey(Buffer.from(clientPublicKeyB64, "base64"));
|
|
1415
1911
|
// Generate server ECDH key pair on the same P-256 curve
|
|
1416
1912
|
const ecdh = createECDH("prime256v1");
|
|
1417
1913
|
ecdh.generateKeys();
|
|
@@ -1429,6 +1925,7 @@ export class CompanionServer {
|
|
|
1429
1925
|
return {
|
|
1430
1926
|
success: true,
|
|
1431
1927
|
publicKey: serverPubRaw.toString("base64"),
|
|
1928
|
+
serverPublicKey: serverPubRaw.toString("base64"),
|
|
1432
1929
|
algorithm: "ECDH-P256",
|
|
1433
1930
|
};
|
|
1434
1931
|
}
|
|
@@ -1445,19 +1942,18 @@ export class CompanionServer {
|
|
|
1445
1942
|
// This is the single source of truth: iOS never needs manual config entry
|
|
1446
1943
|
// for anything the desktop already has configured.
|
|
1447
1944
|
this.rpcHandler.register("config.sync", async () => {
|
|
1448
|
-
// Gather
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1945
|
+
// Gather runtime status (provider, model, etc.)
|
|
1946
|
+
if (this.runtimeReady) {
|
|
1947
|
+
try {
|
|
1948
|
+
await this.runtimeReady;
|
|
1949
|
+
}
|
|
1950
|
+
catch {
|
|
1951
|
+
/* status below honestly reflects whatever runtime has available */
|
|
1454
1952
|
}
|
|
1455
1953
|
}
|
|
1456
|
-
catch {
|
|
1457
|
-
/* relay not configured — fine */
|
|
1458
|
-
}
|
|
1459
|
-
// Gather runtime status (provider, model, etc.)
|
|
1460
1954
|
const status = this.runtime?.getStatus();
|
|
1955
|
+
const remoteAccess = this.getRemoteAccessStatus();
|
|
1956
|
+
const remoteEndpoints = remoteAccess.endpoints;
|
|
1461
1957
|
// Gather user preferences from wotann.yaml if it exists
|
|
1462
1958
|
let userPrefs = {};
|
|
1463
1959
|
try {
|
|
@@ -1477,15 +1973,6 @@ export class CompanionServer {
|
|
|
1477
1973
|
/* no prefs file — fine */
|
|
1478
1974
|
}
|
|
1479
1975
|
return {
|
|
1480
|
-
// Supabase relay credentials — iOS auto-configures from this
|
|
1481
|
-
relay: relayConfig
|
|
1482
|
-
? {
|
|
1483
|
-
supabaseUrl: relayConfig.supabaseUrl,
|
|
1484
|
-
supabaseAnonKey: relayConfig.supabaseAnonKey,
|
|
1485
|
-
channelId: relayConfig.channelId,
|
|
1486
|
-
devicePairId: relayConfig.devicePairId,
|
|
1487
|
-
}
|
|
1488
|
-
: null,
|
|
1489
1976
|
// Active provider/model attribution for the phone's "what desktop
|
|
1490
1977
|
// is using" badge. Empty-string sentinel when nothing is configured
|
|
1491
1978
|
// — the phone's UI then shows a neutral "No active model" hint
|
|
@@ -1493,6 +1980,13 @@ export class CompanionServer {
|
|
|
1493
1980
|
provider: status?.activeProvider ?? "",
|
|
1494
1981
|
model: status?.activeModel ?? "",
|
|
1495
1982
|
providers: status?.providers ?? [],
|
|
1983
|
+
remoteEndpoints,
|
|
1984
|
+
remoteAccess,
|
|
1985
|
+
computerUse: {
|
|
1986
|
+
platform: detectPlatform(),
|
|
1987
|
+
tools: detectAvailableTools(),
|
|
1988
|
+
actions: listDesktopActions(),
|
|
1989
|
+
},
|
|
1496
1990
|
// Desktop identity
|
|
1497
1991
|
hostname: hostname(),
|
|
1498
1992
|
version: "0.1.0",
|
|
@@ -1504,7 +1998,7 @@ export class CompanionServer {
|
|
|
1504
1998
|
voice: true,
|
|
1505
1999
|
localSend: true,
|
|
1506
2000
|
healthInsights: true,
|
|
1507
|
-
|
|
2001
|
+
remoteAccess: remoteAccess.status === "ready",
|
|
1508
2002
|
},
|
|
1509
2003
|
};
|
|
1510
2004
|
});
|
|
@@ -1648,22 +2142,9 @@ export class CompanionServer {
|
|
|
1648
2142
|
};
|
|
1649
2143
|
});
|
|
1650
2144
|
this.rpcHandler.register("briefing.daily", async () => {
|
|
1651
|
-
const status = this.runtime?.getStatus();
|
|
1652
2145
|
return {
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
prsMerged: 0,
|
|
1656
|
-
issuesAssigned: 0,
|
|
1657
|
-
yesterdayCost: status?.totalCost ?? 0,
|
|
1658
|
-
agentsCompleted: this.pairingManager.getActiveSessions().length,
|
|
1659
|
-
uptimeHours: 0,
|
|
1660
|
-
highlights: status
|
|
1661
|
-
? [
|
|
1662
|
-
`Provider: ${status.activeProvider ?? "none"}`,
|
|
1663
|
-
`Mode: ${status.currentMode}`,
|
|
1664
|
-
`Messages: ${status.messageCount}`,
|
|
1665
|
-
]
|
|
1666
|
-
: [],
|
|
2146
|
+
available: false,
|
|
2147
|
+
error: "Daily briefing is not connected to real overnight activity yet.",
|
|
1667
2148
|
};
|
|
1668
2149
|
});
|
|
1669
2150
|
this.rpcHandler.register("meet.summarize", async (params) => {
|
|
@@ -1849,12 +2330,65 @@ export class CompanionServer {
|
|
|
1849
2330
|
if (!this.runtime)
|
|
1850
2331
|
return { providers: [], count: 0 };
|
|
1851
2332
|
const status = this.runtime.getStatus();
|
|
2333
|
+
const snapshot = getProviderService().currentSnapshot();
|
|
2334
|
+
if (snapshot.providers.length > 0) {
|
|
2335
|
+
return {
|
|
2336
|
+
providers: snapshot.providers.map((provider) => ({
|
|
2337
|
+
id: provider.id,
|
|
2338
|
+
name: provider.name,
|
|
2339
|
+
configured: provider.configured,
|
|
2340
|
+
available: provider.configured,
|
|
2341
|
+
models: provider.models.map((model) => ({
|
|
2342
|
+
id: model.id,
|
|
2343
|
+
name: model.name,
|
|
2344
|
+
supportsVision: model.supportsVision ?? false,
|
|
2345
|
+
supportsTools: model.supportsTools ?? false,
|
|
2346
|
+
supportsThinking: model.supportsThinking ?? false,
|
|
2347
|
+
})),
|
|
2348
|
+
defaultModel: provider.defaultModel,
|
|
2349
|
+
authMethod: provider.credential?.method ?? null,
|
|
2350
|
+
error: provider.lastError,
|
|
2351
|
+
})),
|
|
2352
|
+
count: snapshot.providers.length,
|
|
2353
|
+
active: snapshot.active?.provider ?? status.activeProvider,
|
|
2354
|
+
activeModel: snapshot.active?.model ?? status.activeModel,
|
|
2355
|
+
lastRefreshedAt: snapshot.lastRefreshedAt,
|
|
2356
|
+
};
|
|
2357
|
+
}
|
|
1852
2358
|
return {
|
|
1853
|
-
providers: status.providers.map((p) => ({
|
|
2359
|
+
providers: status.providers.map((p) => ({
|
|
2360
|
+
id: p,
|
|
2361
|
+
name: p,
|
|
2362
|
+
configured: true,
|
|
2363
|
+
available: true,
|
|
2364
|
+
models: [],
|
|
2365
|
+
defaultModel: p === status.activeProvider ? status.activeModel : null,
|
|
2366
|
+
})),
|
|
1854
2367
|
count: status.providers.length,
|
|
1855
2368
|
active: status.activeProvider,
|
|
2369
|
+
activeModel: status.activeModel,
|
|
1856
2370
|
};
|
|
1857
2371
|
});
|
|
2372
|
+
this.rpcHandler.register("remote.access.status", async () => {
|
|
2373
|
+
return this.getRemoteAccessStatus();
|
|
2374
|
+
});
|
|
2375
|
+
this.rpcHandler.register("remote.access.configure", async (params) => {
|
|
2376
|
+
const url = typeof params["url"] === "string" ? params["url"].trim() : "";
|
|
2377
|
+
if (!url)
|
|
2378
|
+
return { success: false, error: "url required" };
|
|
2379
|
+
try {
|
|
2380
|
+
return this.configureRemoteAccessUrl(url);
|
|
2381
|
+
}
|
|
2382
|
+
catch (err) {
|
|
2383
|
+
return {
|
|
2384
|
+
success: false,
|
|
2385
|
+
error: err instanceof Error ? err.message : String(err),
|
|
2386
|
+
};
|
|
2387
|
+
}
|
|
2388
|
+
});
|
|
2389
|
+
this.rpcHandler.register("remote.access.clear", async () => {
|
|
2390
|
+
return this.clearConfiguredRemoteAccessUrl();
|
|
2391
|
+
});
|
|
1858
2392
|
this.rpcHandler.register("screen.stream", async () => {
|
|
1859
2393
|
// Verify that screen capture is available before starting a stream
|
|
1860
2394
|
const testCapture = takeScreenshot();
|
|
@@ -2055,6 +2589,19 @@ export class CompanionServer {
|
|
|
2055
2589
|
// and return it to the client. The client includes this token as `authToken`
|
|
2056
2590
|
// on every subsequent RPC call; requests without it (or with an expired
|
|
2057
2591
|
// token) are rejected as unauthorized.
|
|
2592
|
+
this.rpcHandler.register("pair.offer", async () => {
|
|
2593
|
+
const pairing = this.generatePairingQR();
|
|
2594
|
+
return {
|
|
2595
|
+
requestId: pairing.requestId,
|
|
2596
|
+
pin: pairing.pin,
|
|
2597
|
+
expiresAt: pairing.expiresAt,
|
|
2598
|
+
host: pairing.host,
|
|
2599
|
+
port: pairing.port,
|
|
2600
|
+
remoteEndpoints: pairing.remoteEndpoints,
|
|
2601
|
+
remoteAccess: pairing.remoteAccess,
|
|
2602
|
+
qrData: pairing.qrData,
|
|
2603
|
+
};
|
|
2604
|
+
});
|
|
2058
2605
|
this.rpcHandler.register("pair", async (params) => {
|
|
2059
2606
|
const requestId = params["requestId"];
|
|
2060
2607
|
const pin = params["pin"];
|