@hansjm10/volt-coding-agent 0.0.0-bootstrap.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BINARY-CAPABILITIES.md +28 -0
- package/CHANGELOG.md +4845 -0
- package/LICENSE +1 -1
- package/README.md +716 -3
- package/THIRD-PARTY-NOTICES.md +55 -0
- package/dist/LICENSES/clipboard-image-MIT.txt +9 -0
- package/dist/LICENSES/highlight.js-10.7.3-BSD-3-Clause.txt +29 -0
- package/dist/LICENSES/highlight.js-11.9.0-BSD-3-Clause.txt +29 -0
- package/dist/LICENSES/marked-18.0.5-LICENSE.txt +44 -0
- package/dist/LICENSES/run-jxa-MIT.txt +9 -0
- package/dist/cli/args.d.ts +60 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +414 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/config-selector.d.ts +14 -0
- package/dist/cli/config-selector.d.ts.map +1 -0
- package/dist/cli/config-selector.js +31 -0
- package/dist/cli/config-selector.js.map +1 -0
- package/dist/cli/file-processor.d.ts +15 -0
- package/dist/cli/file-processor.d.ts.map +1 -0
- package/dist/cli/file-processor.js +85 -0
- package/dist/cli/file-processor.js.map +1 -0
- package/dist/cli/initial-message.d.ts +18 -0
- package/dist/cli/initial-message.d.ts.map +1 -0
- package/dist/cli/initial-message.js +22 -0
- package/dist/cli/initial-message.js.map +1 -0
- package/dist/cli/list-models.d.ts +9 -0
- package/dist/cli/list-models.d.ts.map +1 -0
- package/dist/cli/list-models.js +98 -0
- package/dist/cli/list-models.js.map +1 -0
- package/dist/cli/project-trust.d.ts +10 -0
- package/dist/cli/project-trust.d.ts.map +1 -0
- package/dist/cli/project-trust.js +48 -0
- package/dist/cli/project-trust.js.map +1 -0
- package/dist/cli/session-picker.d.ts +9 -0
- package/dist/cli/session-picker.d.ts.map +1 -0
- package/dist/cli/session-picker.js +35 -0
- package/dist/cli/session-picker.js.map +1 -0
- package/dist/cli/startup-ui.d.ts +17 -0
- package/dist/cli/startup-ui.d.ts.map +1 -0
- package/dist/cli/startup-ui.js +133 -0
- package/dist/cli/startup-ui.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +18 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +85 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +487 -0
- package/dist/config.js.map +1 -0
- package/dist/core/agent-session-runtime.d.ts +160 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -0
- package/dist/core/agent-session-runtime.js +397 -0
- package/dist/core/agent-session-runtime.js.map +1 -0
- package/dist/core/agent-session-services.d.ts +98 -0
- package/dist/core/agent-session-services.d.ts.map +1 -0
- package/dist/core/agent-session-services.js +125 -0
- package/dist/core/agent-session-services.js.map +1 -0
- package/dist/core/agent-session.d.ts +739 -0
- package/dist/core/agent-session.d.ts.map +1 -0
- package/dist/core/agent-session.js +3158 -0
- package/dist/core/agent-session.js.map +1 -0
- package/dist/core/auth-guidance.d.ts +5 -0
- package/dist/core/auth-guidance.d.ts.map +1 -0
- package/dist/core/auth-guidance.js +21 -0
- package/dist/core/auth-guidance.js.map +1 -0
- package/dist/core/auth-storage.d.ts +159 -0
- package/dist/core/auth-storage.d.ts.map +1 -0
- package/dist/core/auth-storage.js +509 -0
- package/dist/core/auth-storage.js.map +1 -0
- package/dist/core/bash-executor.d.ts +32 -0
- package/dist/core/bash-executor.d.ts.map +1 -0
- package/dist/core/bash-executor.js +111 -0
- package/dist/core/bash-executor.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts +92 -0
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -0
- package/dist/core/compaction/branch-summarization.js +257 -0
- package/dist/core/compaction/branch-summarization.js.map +1 -0
- package/dist/core/compaction/compaction.d.ts +121 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -0
- package/dist/core/compaction/compaction.js +658 -0
- package/dist/core/compaction/compaction.js.map +1 -0
- package/dist/core/compaction/index.d.ts +7 -0
- package/dist/core/compaction/index.d.ts.map +1 -0
- package/dist/core/compaction/index.js +7 -0
- package/dist/core/compaction/index.js.map +1 -0
- package/dist/core/compaction/utils.d.ts +56 -0
- package/dist/core/compaction/utils.d.ts.map +1 -0
- package/dist/core/compaction/utils.js +271 -0
- package/dist/core/compaction/utils.js.map +1 -0
- package/dist/core/defaults.d.ts +3 -0
- package/dist/core/defaults.d.ts.map +1 -0
- package/dist/core/defaults.js +2 -0
- package/dist/core/defaults.js.map +1 -0
- package/dist/core/diagnostics.d.ts +15 -0
- package/dist/core/diagnostics.d.ts.map +1 -0
- package/dist/core/diagnostics.js +2 -0
- package/dist/core/diagnostics.js.map +1 -0
- package/dist/core/event-bus.d.ts +9 -0
- package/dist/core/event-bus.d.ts.map +1 -0
- package/dist/core/event-bus.js +25 -0
- package/dist/core/event-bus.js.map +1 -0
- package/dist/core/exec.d.ts +29 -0
- package/dist/core/exec.d.ts.map +1 -0
- package/dist/core/exec.js +75 -0
- package/dist/core/exec.js.map +1 -0
- package/dist/core/experimental.d.ts +2 -0
- package/dist/core/experimental.d.ts.map +1 -0
- package/dist/core/experimental.js +4 -0
- package/dist/core/experimental.js.map +1 -0
- package/dist/core/export-html/ansi-to-html.d.ts +22 -0
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
- package/dist/core/export-html/ansi-to-html.js +249 -0
- package/dist/core/export-html/ansi-to-html.js.map +1 -0
- package/dist/core/export-html/index.d.ts +37 -0
- package/dist/core/export-html/index.d.ts.map +1 -0
- package/dist/core/export-html/index.js +234 -0
- package/dist/core/export-html/index.js.map +1 -0
- package/dist/core/export-html/template.css +1066 -0
- package/dist/core/export-html/template.html +55 -0
- package/dist/core/export-html/template.js +1864 -0
- package/dist/core/export-html/tool-renderer.d.ts +34 -0
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -0
- package/dist/core/export-html/tool-renderer.js +108 -0
- package/dist/core/export-html/tool-renderer.js.map +1 -0
- package/dist/core/export-html/vendor/highlight.min.js +1213 -0
- package/dist/core/export-html/vendor/marked.min.js +78 -0
- package/dist/core/extensions/index.d.ts +12 -0
- package/dist/core/extensions/index.d.ts.map +1 -0
- package/dist/core/extensions/index.js +9 -0
- package/dist/core/extensions/index.js.map +1 -0
- package/dist/core/extensions/loader.d.ts +25 -0
- package/dist/core/extensions/loader.d.ts.map +1 -0
- package/dist/core/extensions/loader.js +516 -0
- package/dist/core/extensions/loader.js.map +1 -0
- package/dist/core/extensions/runner.d.ts +180 -0
- package/dist/core/extensions/runner.d.ts.map +1 -0
- package/dist/core/extensions/runner.js +938 -0
- package/dist/core/extensions/runner.js.map +1 -0
- package/dist/core/extensions/types.d.ts +1215 -0
- package/dist/core/extensions/types.d.ts.map +1 -0
- package/dist/core/extensions/types.js +48 -0
- package/dist/core/extensions/types.js.map +1 -0
- package/dist/core/extensions/wrapper.d.ts +20 -0
- package/dist/core/extensions/wrapper.d.ts.map +1 -0
- package/dist/core/extensions/wrapper.js +22 -0
- package/dist/core/extensions/wrapper.js.map +1 -0
- package/dist/core/footer-data-provider.d.ts +54 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -0
- package/dist/core/footer-data-provider.js +338 -0
- package/dist/core/footer-data-provider.js.map +1 -0
- package/dist/core/host-actions.d.ts +107 -0
- package/dist/core/host-actions.d.ts.map +1 -0
- package/dist/core/host-actions.js +632 -0
- package/dist/core/host-actions.js.map +1 -0
- package/dist/core/host-interaction.d.ts +35 -0
- package/dist/core/host-interaction.d.ts.map +1 -0
- package/dist/core/host-interaction.js +2 -0
- package/dist/core/host-interaction.js.map +1 -0
- package/dist/core/http-dispatcher.d.ts +22 -0
- package/dist/core/http-dispatcher.d.ts.map +1 -0
- package/dist/core/http-dispatcher.js +64 -0
- package/dist/core/http-dispatcher.js.map +1 -0
- package/dist/core/index.d.ts +18 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +17 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/keybindings.d.ts +373 -0
- package/dist/core/keybindings.d.ts.map +1 -0
- package/dist/core/keybindings.js +303 -0
- package/dist/core/keybindings.js.map +1 -0
- package/dist/core/lsp/client.d.ts +119 -0
- package/dist/core/lsp/client.d.ts.map +1 -0
- package/dist/core/lsp/client.js +711 -0
- package/dist/core/lsp/client.js.map +1 -0
- package/dist/core/lsp/config.d.ts +96 -0
- package/dist/core/lsp/config.d.ts.map +1 -0
- package/dist/core/lsp/config.js +206 -0
- package/dist/core/lsp/config.js.map +1 -0
- package/dist/core/lsp/index.d.ts +6 -0
- package/dist/core/lsp/index.d.ts.map +1 -0
- package/dist/core/lsp/index.js +6 -0
- package/dist/core/lsp/index.js.map +1 -0
- package/dist/core/lsp/manager.d.ts +122 -0
- package/dist/core/lsp/manager.d.ts.map +1 -0
- package/dist/core/lsp/manager.js +1136 -0
- package/dist/core/lsp/manager.js.map +1 -0
- package/dist/core/lsp/trace.d.ts +26 -0
- package/dist/core/lsp/trace.d.ts.map +1 -0
- package/dist/core/lsp/trace.js +98 -0
- package/dist/core/lsp/trace.js.map +1 -0
- package/dist/core/lsp/workspace-edit.d.ts +60 -0
- package/dist/core/lsp/workspace-edit.d.ts.map +1 -0
- package/dist/core/lsp/workspace-edit.js +71 -0
- package/dist/core/lsp/workspace-edit.js.map +1 -0
- package/dist/core/mcp/audit.d.ts +39 -0
- package/dist/core/mcp/audit.d.ts.map +1 -0
- package/dist/core/mcp/audit.js +35 -0
- package/dist/core/mcp/audit.js.map +1 -0
- package/dist/core/mcp/auth.d.ts +7 -0
- package/dist/core/mcp/auth.d.ts.map +1 -0
- package/dist/core/mcp/auth.js +56 -0
- package/dist/core/mcp/auth.js.map +1 -0
- package/dist/core/mcp/client-factory.d.ts +20 -0
- package/dist/core/mcp/client-factory.d.ts.map +1 -0
- package/dist/core/mcp/client-factory.js +200 -0
- package/dist/core/mcp/client-factory.js.map +1 -0
- package/dist/core/mcp/config-loader.d.ts +9 -0
- package/dist/core/mcp/config-loader.d.ts.map +1 -0
- package/dist/core/mcp/config-loader.js +104 -0
- package/dist/core/mcp/config-loader.js.map +1 -0
- package/dist/core/mcp/config-writer.d.ts +21 -0
- package/dist/core/mcp/config-writer.d.ts.map +1 -0
- package/dist/core/mcp/config-writer.js +124 -0
- package/dist/core/mcp/config-writer.js.map +1 -0
- package/dist/core/mcp/config.d.ts +32 -0
- package/dist/core/mcp/config.d.ts.map +1 -0
- package/dist/core/mcp/config.js +385 -0
- package/dist/core/mcp/config.js.map +1 -0
- package/dist/core/mcp/direct-tools.d.ts +11 -0
- package/dist/core/mcp/direct-tools.d.ts.map +1 -0
- package/dist/core/mcp/direct-tools.js +47 -0
- package/dist/core/mcp/direct-tools.js.map +1 -0
- package/dist/core/mcp/gateway-tool.d.ts +29 -0
- package/dist/core/mcp/gateway-tool.d.ts.map +1 -0
- package/dist/core/mcp/gateway-tool.js +108 -0
- package/dist/core/mcp/gateway-tool.js.map +1 -0
- package/dist/core/mcp/index.d.ts +19 -0
- package/dist/core/mcp/index.d.ts.map +1 -0
- package/dist/core/mcp/index.js +18 -0
- package/dist/core/mcp/index.js.map +1 -0
- package/dist/core/mcp/manager.d.ts +117 -0
- package/dist/core/mcp/manager.d.ts.map +1 -0
- package/dist/core/mcp/manager.js +819 -0
- package/dist/core/mcp/manager.js.map +1 -0
- package/dist/core/mcp/metadata-cache.d.ts +27 -0
- package/dist/core/mcp/metadata-cache.d.ts.map +1 -0
- package/dist/core/mcp/metadata-cache.js +152 -0
- package/dist/core/mcp/metadata-cache.js.map +1 -0
- package/dist/core/mcp/oauth-flow.d.ts +94 -0
- package/dist/core/mcp/oauth-flow.d.ts.map +1 -0
- package/dist/core/mcp/oauth-flow.js +473 -0
- package/dist/core/mcp/oauth-flow.js.map +1 -0
- package/dist/core/mcp/oauth-provider.d.ts +39 -0
- package/dist/core/mcp/oauth-provider.d.ts.map +1 -0
- package/dist/core/mcp/oauth-provider.js +149 -0
- package/dist/core/mcp/oauth-provider.js.map +1 -0
- package/dist/core/mcp/oauth-store.d.ts +27 -0
- package/dist/core/mcp/oauth-store.d.ts.map +1 -0
- package/dist/core/mcp/oauth-store.js +111 -0
- package/dist/core/mcp/oauth-store.js.map +1 -0
- package/dist/core/mcp/output-store.d.ts +55 -0
- package/dist/core/mcp/output-store.d.ts.map +1 -0
- package/dist/core/mcp/output-store.js +206 -0
- package/dist/core/mcp/output-store.js.map +1 -0
- package/dist/core/mcp/rpc.d.ts +13 -0
- package/dist/core/mcp/rpc.d.ts.map +1 -0
- package/dist/core/mcp/rpc.js +29 -0
- package/dist/core/mcp/rpc.js.map +1 -0
- package/dist/core/mcp/safety.d.ts +6 -0
- package/dist/core/mcp/safety.d.ts.map +1 -0
- package/dist/core/mcp/safety.js +65 -0
- package/dist/core/mcp/safety.js.map +1 -0
- package/dist/core/mcp/search.d.ts +8 -0
- package/dist/core/mcp/search.d.ts.map +1 -0
- package/dist/core/mcp/search.js +85 -0
- package/dist/core/mcp/search.js.map +1 -0
- package/dist/core/mcp/server-supervisor.d.ts +59 -0
- package/dist/core/mcp/server-supervisor.d.ts.map +1 -0
- package/dist/core/mcp/server-supervisor.js +331 -0
- package/dist/core/mcp/server-supervisor.js.map +1 -0
- package/dist/core/mcp/types.d.ts +321 -0
- package/dist/core/mcp/types.d.ts.map +1 -0
- package/dist/core/mcp/types.js +2 -0
- package/dist/core/mcp/types.js.map +1 -0
- package/dist/core/messages.d.ts +78 -0
- package/dist/core/messages.d.ts.map +1 -0
- package/dist/core/messages.js +138 -0
- package/dist/core/messages.js.map +1 -0
- package/dist/core/model-catalog-watcher.d.ts +36 -0
- package/dist/core/model-catalog-watcher.d.ts.map +1 -0
- package/dist/core/model-catalog-watcher.js +101 -0
- package/dist/core/model-catalog-watcher.js.map +1 -0
- package/dist/core/model-registry.d.ts +160 -0
- package/dist/core/model-registry.d.ts.map +1 -0
- package/dist/core/model-registry.js +754 -0
- package/dist/core/model-registry.js.map +1 -0
- package/dist/core/model-resolver.d.ts +111 -0
- package/dist/core/model-resolver.d.ts.map +1 -0
- package/dist/core/model-resolver.js +534 -0
- package/dist/core/model-resolver.js.map +1 -0
- package/dist/core/output-guard.d.ts +7 -0
- package/dist/core/output-guard.d.ts.map +1 -0
- package/dist/core/output-guard.js +89 -0
- package/dist/core/output-guard.js.map +1 -0
- package/dist/core/package-manager.d.ts +220 -0
- package/dist/core/package-manager.d.ts.map +1 -0
- package/dist/core/package-manager.js +2217 -0
- package/dist/core/package-manager.js.map +1 -0
- package/dist/core/project-trust.d.ts +15 -0
- package/dist/core/project-trust.d.ts.map +1 -0
- package/dist/core/project-trust.js +58 -0
- package/dist/core/project-trust.js.map +1 -0
- package/dist/core/prompt-templates.d.ts +53 -0
- package/dist/core/prompt-templates.d.ts.map +1 -0
- package/dist/core/prompt-templates.js +236 -0
- package/dist/core/prompt-templates.js.map +1 -0
- package/dist/core/provider-attribution.d.ts +4 -0
- package/dist/core/provider-attribution.d.ts.map +1 -0
- package/dist/core/provider-attribution.js +81 -0
- package/dist/core/provider-attribution.js.map +1 -0
- package/dist/core/provider-display-names.d.ts +2 -0
- package/dist/core/provider-display-names.d.ts.map +1 -0
- package/dist/core/provider-display-names.js +36 -0
- package/dist/core/provider-display-names.js.map +1 -0
- package/dist/core/remote/iroh/access-grant.d.ts +40 -0
- package/dist/core/remote/iroh/access-grant.d.ts.map +1 -0
- package/dist/core/remote/iroh/access-grant.js +199 -0
- package/dist/core/remote/iroh/access-grant.js.map +1 -0
- package/dist/core/remote/iroh/active-stream-registry.d.ts +39 -0
- package/dist/core/remote/iroh/active-stream-registry.d.ts.map +1 -0
- package/dist/core/remote/iroh/active-stream-registry.js +109 -0
- package/dist/core/remote/iroh/active-stream-registry.js.map +1 -0
- package/dist/core/remote/iroh/audit.d.ts +67 -0
- package/dist/core/remote/iroh/audit.d.ts.map +1 -0
- package/dist/core/remote/iroh/audit.js +274 -0
- package/dist/core/remote/iroh/audit.js.map +1 -0
- package/dist/core/remote/iroh/authorization.d.ts +46 -0
- package/dist/core/remote/iroh/authorization.d.ts.map +1 -0
- package/dist/core/remote/iroh/authorization.js +327 -0
- package/dist/core/remote/iroh/authorization.js.map +1 -0
- package/dist/core/remote/iroh/control.d.ts +64 -0
- package/dist/core/remote/iroh/control.d.ts.map +1 -0
- package/dist/core/remote/iroh/control.js +326 -0
- package/dist/core/remote/iroh/control.js.map +1 -0
- package/dist/core/remote/iroh/device-log-rpc.d.ts +22 -0
- package/dist/core/remote/iroh/device-log-rpc.d.ts.map +1 -0
- package/dist/core/remote/iroh/device-log-rpc.js +152 -0
- package/dist/core/remote/iroh/device-log-rpc.js.map +1 -0
- package/dist/core/remote/iroh/engine.d.ts +148 -0
- package/dist/core/remote/iroh/engine.d.ts.map +1 -0
- package/dist/core/remote/iroh/engine.js +499 -0
- package/dist/core/remote/iroh/engine.js.map +1 -0
- package/dist/core/remote/iroh/handshake-reader.d.ts +19 -0
- package/dist/core/remote/iroh/handshake-reader.d.ts.map +1 -0
- package/dist/core/remote/iroh/handshake-reader.js +91 -0
- package/dist/core/remote/iroh/handshake-reader.js.map +1 -0
- package/dist/core/remote/iroh/handshake.d.ts +119 -0
- package/dist/core/remote/iroh/handshake.d.ts.map +1 -0
- package/dist/core/remote/iroh/handshake.js +621 -0
- package/dist/core/remote/iroh/handshake.js.map +1 -0
- package/dist/core/remote/iroh/host-policy.d.ts +13 -0
- package/dist/core/remote/iroh/host-policy.d.ts.map +1 -0
- package/dist/core/remote/iroh/host-policy.js +15 -0
- package/dist/core/remote/iroh/host-policy.js.map +1 -0
- package/dist/core/remote/iroh/index.d.ts +25 -0
- package/dist/core/remote/iroh/index.d.ts.map +1 -0
- package/dist/core/remote/iroh/index.js +25 -0
- package/dist/core/remote/iroh/index.js.map +1 -0
- package/dist/core/remote/iroh/metadata.d.ts +28 -0
- package/dist/core/remote/iroh/metadata.d.ts.map +1 -0
- package/dist/core/remote/iroh/metadata.js +16 -0
- package/dist/core/remote/iroh/metadata.js.map +1 -0
- package/dist/core/remote/iroh/outbound-filter.d.ts +29 -0
- package/dist/core/remote/iroh/outbound-filter.d.ts.map +1 -0
- package/dist/core/remote/iroh/outbound-filter.js +692 -0
- package/dist/core/remote/iroh/outbound-filter.js.map +1 -0
- package/dist/core/remote/iroh/protocol.d.ts +60 -0
- package/dist/core/remote/iroh/protocol.d.ts.map +1 -0
- package/dist/core/remote/iroh/protocol.js +204 -0
- package/dist/core/remote/iroh/protocol.js.map +1 -0
- package/dist/core/remote/iroh/push.d.ts +179 -0
- package/dist/core/remote/iroh/push.d.ts.map +1 -0
- package/dist/core/remote/iroh/push.js +662 -0
- package/dist/core/remote/iroh/push.js.map +1 -0
- package/dist/core/remote/iroh/qr.d.ts +12 -0
- package/dist/core/remote/iroh/qr.d.ts.map +1 -0
- package/dist/core/remote/iroh/qr.js +27 -0
- package/dist/core/remote/iroh/qr.js.map +1 -0
- package/dist/core/remote/iroh/rpc-command-filter.d.ts +47 -0
- package/dist/core/remote/iroh/rpc-command-filter.d.ts.map +1 -0
- package/dist/core/remote/iroh/rpc-command-filter.js +188 -0
- package/dist/core/remote/iroh/rpc-command-filter.js.map +1 -0
- package/dist/core/remote/iroh/rpc-transport.d.ts +21 -0
- package/dist/core/remote/iroh/rpc-transport.d.ts.map +1 -0
- package/dist/core/remote/iroh/rpc-transport.js +106 -0
- package/dist/core/remote/iroh/rpc-transport.js.map +1 -0
- package/dist/core/remote/iroh/state-manager.d.ts +141 -0
- package/dist/core/remote/iroh/state-manager.d.ts.map +1 -0
- package/dist/core/remote/iroh/state-manager.js +744 -0
- package/dist/core/remote/iroh/state-manager.js.map +1 -0
- package/dist/core/remote/iroh/state.d.ts +141 -0
- package/dist/core/remote/iroh/state.d.ts.map +1 -0
- package/dist/core/remote/iroh/state.js +433 -0
- package/dist/core/remote/iroh/state.js.map +1 -0
- package/dist/core/remote/iroh/ticket.d.ts +46 -0
- package/dist/core/remote/iroh/ticket.d.ts.map +1 -0
- package/dist/core/remote/iroh/ticket.js +267 -0
- package/dist/core/remote/iroh/ticket.js.map +1 -0
- package/dist/core/remote/iroh/transcript-text.d.ts +8 -0
- package/dist/core/remote/iroh/transcript-text.d.ts.map +1 -0
- package/dist/core/remote/iroh/transcript-text.js +26 -0
- package/dist/core/remote/iroh/transcript-text.js.map +1 -0
- package/dist/core/remote/iroh/workspace-rpc.d.ts +31 -0
- package/dist/core/remote/iroh/workspace-rpc.d.ts.map +1 -0
- package/dist/core/remote/iroh/workspace-rpc.js +73 -0
- package/dist/core/remote/iroh/workspace-rpc.js.map +1 -0
- package/dist/core/remote/iroh/workspace.d.ts +16 -0
- package/dist/core/remote/iroh/workspace.d.ts.map +1 -0
- package/dist/core/remote/iroh/workspace.js +104 -0
- package/dist/core/remote/iroh/workspace.js.map +1 -0
- package/dist/core/remote/iroh/worktree-rpc.d.ts +83 -0
- package/dist/core/remote/iroh/worktree-rpc.d.ts.map +1 -0
- package/dist/core/remote/iroh/worktree-rpc.js +148 -0
- package/dist/core/remote/iroh/worktree-rpc.js.map +1 -0
- package/dist/core/resolve-config-value.d.ts +30 -0
- package/dist/core/resolve-config-value.d.ts.map +1 -0
- package/dist/core/resolve-config-value.js +245 -0
- package/dist/core/resolve-config-value.js.map +1 -0
- package/dist/core/resource-loader.d.ts +214 -0
- package/dist/core/resource-loader.d.ts.map +1 -0
- package/dist/core/resource-loader.js +824 -0
- package/dist/core/resource-loader.js.map +1 -0
- package/dist/core/review.d.ts +318 -0
- package/dist/core/review.d.ts.map +1 -0
- package/dist/core/review.js +1271 -0
- package/dist/core/review.js.map +1 -0
- package/dist/core/rpc/duplex-write-gate.d.ts +29 -0
- package/dist/core/rpc/duplex-write-gate.d.ts.map +1 -0
- package/dist/core/rpc/duplex-write-gate.js +124 -0
- package/dist/core/rpc/duplex-write-gate.js.map +1 -0
- package/dist/core/rpc/index.d.ts +6 -0
- package/dist/core/rpc/index.d.ts.map +1 -0
- package/dist/core/rpc/index.js +5 -0
- package/dist/core/rpc/index.js.map +1 -0
- package/dist/core/rpc/iroh-transport.d.ts +58 -0
- package/dist/core/rpc/iroh-transport.d.ts.map +1 -0
- package/dist/core/rpc/iroh-transport.js +278 -0
- package/dist/core/rpc/iroh-transport.js.map +1 -0
- package/dist/core/rpc/jsonl.d.ts +17 -0
- package/dist/core/rpc/jsonl.d.ts.map +1 -0
- package/dist/core/rpc/jsonl.js +49 -0
- package/dist/core/rpc/jsonl.js.map +1 -0
- package/dist/core/rpc/loopback-transport.d.ts +14 -0
- package/dist/core/rpc/loopback-transport.d.ts.map +1 -0
- package/dist/core/rpc/loopback-transport.js +120 -0
- package/dist/core/rpc/loopback-transport.js.map +1 -0
- package/dist/core/rpc/transcript.d.ts +37 -0
- package/dist/core/rpc/transcript.d.ts.map +1 -0
- package/dist/core/rpc/transcript.js +624 -0
- package/dist/core/rpc/transcript.js.map +1 -0
- package/dist/core/rpc/transport.d.ts +41 -0
- package/dist/core/rpc/transport.d.ts.map +1 -0
- package/dist/core/rpc/transport.js +155 -0
- package/dist/core/rpc/transport.js.map +1 -0
- package/dist/core/rpc/types.d.ts +1254 -0
- package/dist/core/rpc/types.d.ts.map +1 -0
- package/dist/core/rpc/types.js +8 -0
- package/dist/core/rpc/types.js.map +1 -0
- package/dist/core/rpc/ui-action-args.d.ts +3 -0
- package/dist/core/rpc/ui-action-args.d.ts.map +1 -0
- package/dist/core/rpc/ui-action-args.js +66 -0
- package/dist/core/rpc/ui-action-args.js.map +1 -0
- package/dist/core/rpc/ui-actions.d.ts +43 -0
- package/dist/core/rpc/ui-actions.d.ts.map +1 -0
- package/dist/core/rpc/ui-actions.js +362 -0
- package/dist/core/rpc/ui-actions.js.map +1 -0
- package/dist/core/sdk.d.ts +138 -0
- package/dist/core/sdk.d.ts.map +1 -0
- package/dist/core/sdk.js +324 -0
- package/dist/core/sdk.js.map +1 -0
- package/dist/core/session-cwd.d.ts +19 -0
- package/dist/core/session-cwd.d.ts.map +1 -0
- package/dist/core/session-cwd.js +38 -0
- package/dist/core/session-cwd.js.map +1 -0
- package/dist/core/session-manager.d.ts +346 -0
- package/dist/core/session-manager.d.ts.map +1 -0
- package/dist/core/session-manager.js +1280 -0
- package/dist/core/session-manager.js.map +1 -0
- package/dist/core/settings-manager.d.ts +359 -0
- package/dist/core/settings-manager.d.ts.map +1 -0
- package/dist/core/settings-manager.js +1277 -0
- package/dist/core/settings-manager.js.map +1 -0
- package/dist/core/skills.d.ts +60 -0
- package/dist/core/skills.d.ts.map +1 -0
- package/dist/core/skills.js +387 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/core/slash-commands.d.ts +14 -0
- package/dist/core/slash-commands.d.ts.map +1 -0
- package/dist/core/slash-commands.js +51 -0
- package/dist/core/slash-commands.js.map +1 -0
- package/dist/core/source-info.d.ts +18 -0
- package/dist/core/source-info.d.ts.map +1 -0
- package/dist/core/source-info.js +19 -0
- package/dist/core/source-info.js.map +1 -0
- package/dist/core/subagents/delegation-scope.d.ts +47 -0
- package/dist/core/subagents/delegation-scope.d.ts.map +1 -0
- package/dist/core/subagents/delegation-scope.js +134 -0
- package/dist/core/subagents/delegation-scope.js.map +1 -0
- package/dist/core/subagents/index.d.ts +46 -0
- package/dist/core/subagents/index.d.ts.map +1 -0
- package/dist/core/subagents/index.js +369 -0
- package/dist/core/subagents/index.js.map +1 -0
- package/dist/core/subagents/manager.d.ts +183 -0
- package/dist/core/subagents/manager.d.ts.map +1 -0
- package/dist/core/subagents/manager.js +820 -0
- package/dist/core/subagents/manager.js.map +1 -0
- package/dist/core/system-prompt.d.ts +28 -0
- package/dist/core/system-prompt.d.ts.map +1 -0
- package/dist/core/system-prompt.js +180 -0
- package/dist/core/system-prompt.js.map +1 -0
- package/dist/core/telemetry.d.ts +3 -0
- package/dist/core/telemetry.d.ts.map +1 -0
- package/dist/core/telemetry.js +9 -0
- package/dist/core/telemetry.js.map +1 -0
- package/dist/core/theme/dark.json +86 -0
- package/dist/core/theme/discovery.d.ts +48 -0
- package/dist/core/theme/discovery.d.ts.map +1 -0
- package/dist/core/theme/discovery.js +239 -0
- package/dist/core/theme/discovery.js.map +1 -0
- package/dist/core/theme/index.d.ts +6 -0
- package/dist/core/theme/index.d.ts.map +1 -0
- package/dist/core/theme/index.js +5 -0
- package/dist/core/theme/index.js.map +1 -0
- package/dist/core/theme/light.json +85 -0
- package/dist/core/theme/runtime.d.ts +55 -0
- package/dist/core/theme/runtime.d.ts.map +1 -0
- package/dist/core/theme/runtime.js +555 -0
- package/dist/core/theme/runtime.js.map +1 -0
- package/dist/core/theme/theme-schema.json +335 -0
- package/dist/core/theme/theme-service.d.ts +37 -0
- package/dist/core/theme/theme-service.d.ts.map +1 -0
- package/dist/core/theme/theme-service.js +222 -0
- package/dist/core/theme/theme-service.js.map +1 -0
- package/dist/core/theme/theme.d.ts +100 -0
- package/dist/core/theme/theme.d.ts.map +1 -0
- package/dist/core/theme/theme.js +243 -0
- package/dist/core/theme/theme.js.map +1 -0
- package/dist/core/theme/tokens.d.ts +20 -0
- package/dist/core/theme/tokens.d.ts.map +1 -0
- package/dist/core/theme/tokens.js +178 -0
- package/dist/core/theme/tokens.js.map +1 -0
- package/dist/core/theme/types.d.ts +21 -0
- package/dist/core/theme/types.d.ts.map +1 -0
- package/dist/core/theme/types.js +2 -0
- package/dist/core/theme/types.js.map +1 -0
- package/dist/core/timings.d.ts +8 -0
- package/dist/core/timings.d.ts.map +1 -0
- package/dist/core/timings.js +31 -0
- package/dist/core/timings.js.map +1 -0
- package/dist/core/tools/bash.d.ts +68 -0
- package/dist/core/tools/bash.d.ts.map +1 -0
- package/dist/core/tools/bash.js +345 -0
- package/dist/core/tools/bash.js.map +1 -0
- package/dist/core/tools/diagnostics-provider.d.ts +12 -0
- package/dist/core/tools/diagnostics-provider.d.ts.map +1 -0
- package/dist/core/tools/diagnostics-provider.js +2 -0
- package/dist/core/tools/diagnostics-provider.js.map +1 -0
- package/dist/core/tools/edit-diff.d.ts +77 -0
- package/dist/core/tools/edit-diff.d.ts.map +1 -0
- package/dist/core/tools/edit-diff.js +506 -0
- package/dist/core/tools/edit-diff.js.map +1 -0
- package/dist/core/tools/edit.d.ts +56 -0
- package/dist/core/tools/edit.d.ts.map +1 -0
- package/dist/core/tools/edit.js +300 -0
- package/dist/core/tools/edit.js.map +1 -0
- package/dist/core/tools/file-mutation-queue.d.ts +6 -0
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -0
- package/dist/core/tools/file-mutation-queue.js +52 -0
- package/dist/core/tools/file-mutation-queue.js.map +1 -0
- package/dist/core/tools/find.d.ts +35 -0
- package/dist/core/tools/find.d.ts.map +1 -0
- package/dist/core/tools/find.js +337 -0
- package/dist/core/tools/find.js.map +1 -0
- package/dist/core/tools/grep.d.ts +37 -0
- package/dist/core/tools/grep.d.ts.map +1 -0
- package/dist/core/tools/grep.js +305 -0
- package/dist/core/tools/grep.js.map +1 -0
- package/dist/core/tools/index.d.ts +56 -0
- package/dist/core/tools/index.d.ts.map +1 -0
- package/dist/core/tools/index.js +174 -0
- package/dist/core/tools/index.js.map +1 -0
- package/dist/core/tools/ls.d.ts +37 -0
- package/dist/core/tools/ls.d.ts.map +1 -0
- package/dist/core/tools/ls.js +167 -0
- package/dist/core/tools/ls.js.map +1 -0
- package/dist/core/tools/lsp.d.ts +59 -0
- package/dist/core/tools/lsp.d.ts.map +1 -0
- package/dist/core/tools/lsp.js +157 -0
- package/dist/core/tools/lsp.js.map +1 -0
- package/dist/core/tools/output-accumulator.d.ts +52 -0
- package/dist/core/tools/output-accumulator.d.ts.map +1 -0
- package/dist/core/tools/output-accumulator.js +184 -0
- package/dist/core/tools/output-accumulator.js.map +1 -0
- package/dist/core/tools/path-utils.d.ts +10 -0
- package/dist/core/tools/path-utils.d.ts.map +1 -0
- package/dist/core/tools/path-utils.js +99 -0
- package/dist/core/tools/path-utils.js.map +1 -0
- package/dist/core/tools/read.d.ts +35 -0
- package/dist/core/tools/read.d.ts.map +1 -0
- package/dist/core/tools/read.js +292 -0
- package/dist/core/tools/read.js.map +1 -0
- package/dist/core/tools/render-utils.d.ts +26 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -0
- package/dist/core/tools/render-utils.js +69 -0
- package/dist/core/tools/render-utils.js.map +1 -0
- package/dist/core/tools/subagent.d.ts +219 -0
- package/dist/core/tools/subagent.d.ts.map +1 -0
- package/dist/core/tools/subagent.js +1445 -0
- package/dist/core/tools/subagent.js.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts +14 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.js +34 -0
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -0
- package/dist/core/tools/truncate.d.ts +70 -0
- package/dist/core/tools/truncate.d.ts.map +1 -0
- package/dist/core/tools/truncate.js +215 -0
- package/dist/core/tools/truncate.js.map +1 -0
- package/dist/core/tools/web-search.d.ts +69 -0
- package/dist/core/tools/web-search.d.ts.map +1 -0
- package/dist/core/tools/web-search.js +634 -0
- package/dist/core/tools/web-search.js.map +1 -0
- package/dist/core/tools/write.d.ts +33 -0
- package/dist/core/tools/write.d.ts.map +1 -0
- package/dist/core/tools/write.js +210 -0
- package/dist/core/tools/write.js.map +1 -0
- package/dist/core/trust-manager.d.ts +36 -0
- package/dist/core/trust-manager.d.ts.map +1 -0
- package/dist/core/trust-manager.js +220 -0
- package/dist/core/trust-manager.js.map +1 -0
- package/dist/daemon/cli.d.ts +8 -0
- package/dist/daemon/cli.d.ts.map +1 -0
- package/dist/daemon/cli.js +468 -0
- package/dist/daemon/cli.js.map +1 -0
- package/dist/daemon/control-client.d.ts +60 -0
- package/dist/daemon/control-client.d.ts.map +1 -0
- package/dist/daemon/control-client.js +411 -0
- package/dist/daemon/control-client.js.map +1 -0
- package/dist/daemon/control-protocol.d.ts +507 -0
- package/dist/daemon/control-protocol.d.ts.map +1 -0
- package/dist/daemon/control-protocol.js +395 -0
- package/dist/daemon/control-protocol.js.map +1 -0
- package/dist/daemon/control-server.d.ts +77 -0
- package/dist/daemon/control-server.d.ts.map +1 -0
- package/dist/daemon/control-server.js +327 -0
- package/dist/daemon/control-server.js.map +1 -0
- package/dist/daemon/conversation-commands.d.ts +176 -0
- package/dist/daemon/conversation-commands.d.ts.map +1 -0
- package/dist/daemon/conversation-commands.js +1268 -0
- package/dist/daemon/conversation-commands.js.map +1 -0
- package/dist/daemon/daemon-lock.d.ts +27 -0
- package/dist/daemon/daemon-lock.d.ts.map +1 -0
- package/dist/daemon/daemon-lock.js +238 -0
- package/dist/daemon/daemon-lock.js.map +1 -0
- package/dist/daemon/handshake-responses.d.ts +47 -0
- package/dist/daemon/handshake-responses.d.ts.map +1 -0
- package/dist/daemon/handshake-responses.js +113 -0
- package/dist/daemon/handshake-responses.js.map +1 -0
- package/dist/daemon/integrated-runtimes.d.ts +137 -0
- package/dist/daemon/integrated-runtimes.d.ts.map +1 -0
- package/dist/daemon/integrated-runtimes.js +763 -0
- package/dist/daemon/integrated-runtimes.js.map +1 -0
- package/dist/daemon/iroh-native.d.ts +76 -0
- package/dist/daemon/iroh-native.d.ts.map +1 -0
- package/dist/daemon/iroh-native.js +18 -0
- package/dist/daemon/iroh-native.js.map +1 -0
- package/dist/daemon/iroh-resource-guard.d.ts +57 -0
- package/dist/daemon/iroh-resource-guard.d.ts.map +1 -0
- package/dist/daemon/iroh-resource-guard.js +134 -0
- package/dist/daemon/iroh-resource-guard.js.map +1 -0
- package/dist/daemon/iroh-service.d.ts +51 -0
- package/dist/daemon/iroh-service.d.ts.map +1 -0
- package/dist/daemon/iroh-service.js +2604 -0
- package/dist/daemon/iroh-service.js.map +1 -0
- package/dist/daemon/keep-awake.d.ts +62 -0
- package/dist/daemon/keep-awake.d.ts.map +1 -0
- package/dist/daemon/keep-awake.js +190 -0
- package/dist/daemon/keep-awake.js.map +1 -0
- package/dist/daemon/lease-broker.d.ts +139 -0
- package/dist/daemon/lease-broker.d.ts.map +1 -0
- package/dist/daemon/lease-broker.js +504 -0
- package/dist/daemon/lease-broker.js.map +1 -0
- package/dist/daemon/log.d.ts +16 -0
- package/dist/daemon/log.d.ts.map +1 -0
- package/dist/daemon/log.js +40 -0
- package/dist/daemon/log.js.map +1 -0
- package/dist/daemon/main.d.ts +70 -0
- package/dist/daemon/main.d.ts.map +1 -0
- package/dist/daemon/main.js +781 -0
- package/dist/daemon/main.js.map +1 -0
- package/dist/daemon/paths.d.ts +32 -0
- package/dist/daemon/paths.d.ts.map +1 -0
- package/dist/daemon/paths.js +208 -0
- package/dist/daemon/paths.js.map +1 -0
- package/dist/daemon/process-identity.d.ts +58 -0
- package/dist/daemon/process-identity.d.ts.map +1 -0
- package/dist/daemon/process-identity.js +185 -0
- package/dist/daemon/process-identity.js.map +1 -0
- package/dist/daemon/relay-stream.d.ts +89 -0
- package/dist/daemon/relay-stream.d.ts.map +1 -0
- package/dist/daemon/relay-stream.js +202 -0
- package/dist/daemon/relay-stream.js.map +1 -0
- package/dist/daemon/remote-cli.d.ts +7 -0
- package/dist/daemon/remote-cli.d.ts.map +1 -0
- package/dist/daemon/remote-cli.js +774 -0
- package/dist/daemon/remote-cli.js.map +1 -0
- package/dist/daemon/service-install.d.ts +43 -0
- package/dist/daemon/service-install.d.ts.map +1 -0
- package/dist/daemon/service-install.js +198 -0
- package/dist/daemon/service-install.js.map +1 -0
- package/dist/daemon/session-target.d.ts +62 -0
- package/dist/daemon/session-target.d.ts.map +1 -0
- package/dist/daemon/session-target.js +66 -0
- package/dist/daemon/session-target.js.map +1 -0
- package/dist/daemon/spawn.d.ts +53 -0
- package/dist/daemon/spawn.d.ts.map +1 -0
- package/dist/daemon/spawn.js +205 -0
- package/dist/daemon/spawn.js.map +1 -0
- package/dist/daemon/state.d.ts +145 -0
- package/dist/daemon/state.d.ts.map +1 -0
- package/dist/daemon/state.js +454 -0
- package/dist/daemon/state.js.map +1 -0
- package/dist/daemon/theme-push.d.ts +23 -0
- package/dist/daemon/theme-push.d.ts.map +1 -0
- package/dist/daemon/theme-push.js +30 -0
- package/dist/daemon/theme-push.js.map +1 -0
- package/dist/daemon/viewer-feed.d.ts +42 -0
- package/dist/daemon/viewer-feed.d.ts.map +1 -0
- package/dist/daemon/viewer-feed.js +138 -0
- package/dist/daemon/viewer-feed.js.map +1 -0
- package/dist/daemon/workspace-directory.d.ts +35 -0
- package/dist/daemon/workspace-directory.d.ts.map +1 -0
- package/dist/daemon/workspace-directory.js +105 -0
- package/dist/daemon/workspace-directory.js.map +1 -0
- package/dist/daemon/workspace-streams.d.ts +70 -0
- package/dist/daemon/workspace-streams.d.ts.map +1 -0
- package/dist/daemon/workspace-streams.js +289 -0
- package/dist/daemon/workspace-streams.js.map +1 -0
- package/dist/daemon/worktree-manager.d.ts +219 -0
- package/dist/daemon/worktree-manager.d.ts.map +1 -0
- package/dist/daemon/worktree-manager.js +1204 -0
- package/dist/daemon/worktree-manager.js.map +1 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +57 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +12 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +773 -0
- package/dist/main.js.map +1 -0
- package/dist/mcp-cli.d.ts +6 -0
- package/dist/mcp-cli.d.ts.map +1 -0
- package/dist/mcp-cli.js +347 -0
- package/dist/mcp-cli.js.map +1 -0
- package/dist/migrations.d.ts +33 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +281 -0
- package/dist/migrations.js.map +1 -0
- package/dist/modes/index.d.ts +13 -0
- package/dist/modes/index.d.ts.map +1 -0
- package/dist/modes/index.js +12 -0
- package/dist/modes/index.js.map +1 -0
- package/dist/modes/interactive/components/armin.d.ts +34 -0
- package/dist/modes/interactive/components/armin.d.ts.map +1 -0
- package/dist/modes/interactive/components/armin.js +333 -0
- package/dist/modes/interactive/components/armin.js.map +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts +22 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/assistant-message.js +129 -0
- package/dist/modes/interactive/components/assistant-message.js.map +1 -0
- package/dist/modes/interactive/components/bash-execution.d.ts +39 -0
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/bash-execution.js +212 -0
- package/dist/modes/interactive/components/bash-execution.js.map +1 -0
- package/dist/modes/interactive/components/bordered-loader.d.ts +17 -0
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -0
- package/dist/modes/interactive/components/bordered-loader.js +57 -0
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -0
- package/dist/modes/interactive/components/branch-summary-message.d.ts +16 -0
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/branch-summary-message.js +44 -0
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +16 -0
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/compaction-summary-message.js +45 -0
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/config-selector.d.ts +71 -0
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/config-selector.js +510 -0
- package/dist/modes/interactive/components/config-selector.js.map +1 -0
- package/dist/modes/interactive/components/countdown-timer.d.ts +14 -0
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -0
- package/dist/modes/interactive/components/countdown-timer.js +33 -0
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -0
- package/dist/modes/interactive/components/custom-editor.d.ts +21 -0
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-editor.js +70 -0
- package/dist/modes/interactive/components/custom-editor.js.map +1 -0
- package/dist/modes/interactive/components/custom-message.d.ts +20 -0
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-message.js +76 -0
- package/dist/modes/interactive/components/custom-message.js.map +1 -0
- package/dist/modes/interactive/components/daxnuts.d.ts +23 -0
- package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -0
- package/dist/modes/interactive/components/daxnuts.js +140 -0
- package/dist/modes/interactive/components/daxnuts.js.map +1 -0
- package/dist/modes/interactive/components/diff.d.ts +12 -0
- package/dist/modes/interactive/components/diff.d.ts.map +1 -0
- package/dist/modes/interactive/components/diff.js +133 -0
- package/dist/modes/interactive/components/diff.js.map +1 -0
- package/dist/modes/interactive/components/dynamic-border.d.ts +15 -0
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -0
- package/dist/modes/interactive/components/dynamic-border.js +21 -0
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -0
- package/dist/modes/interactive/components/extension-editor.d.ts +20 -0
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-editor.js +116 -0
- package/dist/modes/interactive/components/extension-editor.js.map +1 -0
- package/dist/modes/interactive/components/extension-input.d.ts +23 -0
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-input.js +61 -0
- package/dist/modes/interactive/components/extension-input.js.map +1 -0
- package/dist/modes/interactive/components/extension-selector.d.ts +27 -0
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-selector.js +98 -0
- package/dist/modes/interactive/components/extension-selector.js.map +1 -0
- package/dist/modes/interactive/components/first-time-setup.d.ts +25 -0
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -0
- package/dist/modes/interactive/components/first-time-setup.js +103 -0
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts +27 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -0
- package/dist/modes/interactive/components/footer.js +180 -0
- package/dist/modes/interactive/components/footer.js.map +1 -0
- package/dist/modes/interactive/components/hotkeys.d.ts +24 -0
- package/dist/modes/interactive/components/hotkeys.d.ts.map +1 -0
- package/dist/modes/interactive/components/hotkeys.js +97 -0
- package/dist/modes/interactive/components/hotkeys.js.map +1 -0
- package/dist/modes/interactive/components/index.d.ts +35 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -0
- package/dist/modes/interactive/components/index.js +36 -0
- package/dist/modes/interactive/components/index.js.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts +19 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.js +48 -0
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -0
- package/dist/modes/interactive/components/login-dialog.d.ts +52 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
- package/dist/modes/interactive/components/login-dialog.js +179 -0
- package/dist/modes/interactive/components/login-dialog.js.map +1 -0
- package/dist/modes/interactive/components/logo.d.ts +25 -0
- package/dist/modes/interactive/components/logo.d.ts.map +1 -0
- package/dist/modes/interactive/components/logo.js +89 -0
- package/dist/modes/interactive/components/logo.js.map +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts +47 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/model-selector.js +278 -0
- package/dist/modes/interactive/components/model-selector.js.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts +31 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.js +165 -0
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -0
- package/dist/modes/interactive/components/remote-control-center.d.ts +110 -0
- package/dist/modes/interactive/components/remote-control-center.d.ts.map +1 -0
- package/dist/modes/interactive/components/remote-control-center.js +1217 -0
- package/dist/modes/interactive/components/remote-control-center.js.map +1 -0
- package/dist/modes/interactive/components/review-tools-selector.d.ts +24 -0
- package/dist/modes/interactive/components/review-tools-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/review-tools-selector.js +93 -0
- package/dist/modes/interactive/components/review-tools-selector.js.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +42 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.js +290 -0
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts +23 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -0
- package/dist/modes/interactive/components/session-selector-search.js +155 -0
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -0
- package/dist/modes/interactive/components/session-selector.d.ts +95 -0
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/session-selector.js +856 -0
- package/dist/modes/interactive/components/session-selector.js.map +1 -0
- package/dist/modes/interactive/components/settings-selector.d.ts +77 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-selector.js +484 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -0
- package/dist/modes/interactive/components/show-images-selector.d.ts +10 -0
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/show-images-selector.js +39 -0
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +17 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/skill-invocation-message.js +47 -0
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
- package/dist/modes/interactive/components/streaming-render-coalescer.d.ts +29 -0
- package/dist/modes/interactive/components/streaming-render-coalescer.d.ts.map +1 -0
- package/dist/modes/interactive/components/streaming-render-coalescer.js +98 -0
- package/dist/modes/interactive/components/streaming-render-coalescer.js.map +1 -0
- package/dist/modes/interactive/components/subagent-inspector.d.ts +32 -0
- package/dist/modes/interactive/components/subagent-inspector.d.ts.map +1 -0
- package/dist/modes/interactive/components/subagent-inspector.js +439 -0
- package/dist/modes/interactive/components/subagent-inspector.js.map +1 -0
- package/dist/modes/interactive/components/theme-selector.d.ts +11 -0
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/theme-selector.js +50 -0
- package/dist/modes/interactive/components/theme-selector.js.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts +11 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.js +52 -0
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -0
- package/dist/modes/interactive/components/tool-execution.d.ts +83 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-execution.js +421 -0
- package/dist/modes/interactive/components/tool-execution.js.map +1 -0
- package/dist/modes/interactive/components/tree-selector.d.ts +89 -0
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/tree-selector.js +1208 -0
- package/dist/modes/interactive/components/tree-selector.js.map +1 -0
- package/dist/modes/interactive/components/trust-selector.d.ts +23 -0
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/trust-selector.js +91 -0
- package/dist/modes/interactive/components/trust-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts +30 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.js +114 -0
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message.d.ts +9 -0
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/user-message.js +42 -0
- package/dist/modes/interactive/components/user-message.js.map +1 -0
- package/dist/modes/interactive/components/visual-truncate.d.ts +24 -0
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -0
- package/dist/modes/interactive/components/visual-truncate.js +33 -0
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -0
- package/dist/modes/interactive/components/volt-announcement.d.ts +5 -0
- package/dist/modes/interactive/components/volt-announcement.d.ts.map +1 -0
- package/dist/modes/interactive/components/volt-announcement.js +15 -0
- package/dist/modes/interactive/components/volt-announcement.js.map +1 -0
- package/dist/modes/interactive/daemon-attach.d.ts +154 -0
- package/dist/modes/interactive/daemon-attach.d.ts.map +1 -0
- package/dist/modes/interactive/daemon-attach.js +552 -0
- package/dist/modes/interactive/daemon-attach.js.map +1 -0
- package/dist/modes/interactive/drain-viewer.d.ts +31 -0
- package/dist/modes/interactive/drain-viewer.d.ts.map +1 -0
- package/dist/modes/interactive/drain-viewer.js +166 -0
- package/dist/modes/interactive/drain-viewer.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +502 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-mode.js +7007 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -0
- package/dist/modes/interactive/prompt-image-attachments.d.ts +34 -0
- package/dist/modes/interactive/prompt-image-attachments.d.ts.map +1 -0
- package/dist/modes/interactive/prompt-image-attachments.js +120 -0
- package/dist/modes/interactive/prompt-image-attachments.js.map +1 -0
- package/dist/modes/interactive/relay-stream-adapter.d.ts +19 -0
- package/dist/modes/interactive/relay-stream-adapter.d.ts.map +1 -0
- package/dist/modes/interactive/relay-stream-adapter.js +107 -0
- package/dist/modes/interactive/relay-stream-adapter.js.map +1 -0
- package/dist/modes/print-mode.d.ts +28 -0
- package/dist/modes/print-mode.d.ts.map +1 -0
- package/dist/modes/print-mode.js +132 -0
- package/dist/modes/print-mode.js.map +1 -0
- package/dist/modes/rpc/in-process-rpc-client.d.ts +31 -0
- package/dist/modes/rpc/in-process-rpc-client.d.ts.map +1 -0
- package/dist/modes/rpc/in-process-rpc-client.js +63 -0
- package/dist/modes/rpc/in-process-rpc-client.js.map +1 -0
- package/dist/modes/rpc/iroh-remote-agent-runtime.d.ts +61 -0
- package/dist/modes/rpc/iroh-remote-agent-runtime.d.ts.map +1 -0
- package/dist/modes/rpc/iroh-remote-agent-runtime.js +155 -0
- package/dist/modes/rpc/iroh-remote-agent-runtime.js.map +1 -0
- package/dist/modes/rpc/iroh-remote-rpc-mode.d.ts +69 -0
- package/dist/modes/rpc/iroh-remote-rpc-mode.d.ts.map +1 -0
- package/dist/modes/rpc/iroh-remote-rpc-mode.js +1223 -0
- package/dist/modes/rpc/iroh-remote-rpc-mode.js.map +1 -0
- package/dist/modes/rpc/jsonl.d.ts +2 -0
- package/dist/modes/rpc/jsonl.d.ts.map +1 -0
- package/dist/modes/rpc/jsonl.js +2 -0
- package/dist/modes/rpc/jsonl.js.map +1 -0
- package/dist/modes/rpc/rpc-client-base.d.ts +209 -0
- package/dist/modes/rpc/rpc-client-base.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-client-base.js +530 -0
- package/dist/modes/rpc/rpc-client-base.js.map +1 -0
- package/dist/modes/rpc/rpc-client.d.ts +50 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-client.js +190 -0
- package/dist/modes/rpc/rpc-client.js.map +1 -0
- package/dist/modes/rpc/rpc-command-dispatcher.d.ts +43 -0
- package/dist/modes/rpc/rpc-command-dispatcher.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-command-dispatcher.js +613 -0
- package/dist/modes/rpc/rpc-command-dispatcher.js.map +1 -0
- package/dist/modes/rpc/rpc-command-validation.d.ts +2 -0
- package/dist/modes/rpc/rpc-command-validation.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-command-validation.js +207 -0
- package/dist/modes/rpc/rpc-command-validation.js.map +1 -0
- package/dist/modes/rpc/rpc-mode.d.ts +48 -0
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-mode.js +1089 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -0
- package/dist/modes/rpc/rpc-transport-client.d.ts +26 -0
- package/dist/modes/rpc/rpc-transport-client.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-transport-client.js +76 -0
- package/dist/modes/rpc/rpc-transport-client.js.map +1 -0
- package/dist/modes/rpc/rpc-types.d.ts +2 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-types.js +2 -0
- package/dist/modes/rpc/rpc-types.js.map +1 -0
- package/dist/package-manager-cli.d.ts +28 -0
- package/dist/package-manager-cli.d.ts.map +1 -0
- package/dist/package-manager-cli.js +667 -0
- package/dist/package-manager-cli.js.map +1 -0
- package/dist/remote/integrated-runtime-retention.d.ts +17 -0
- package/dist/remote/integrated-runtime-retention.d.ts.map +1 -0
- package/dist/remote/integrated-runtime-retention.js +62 -0
- package/dist/remote/integrated-runtime-retention.js.map +1 -0
- package/dist/remote/iroh-native-adapter.cjs +19 -0
- package/dist/sea/cli.d.ts +4 -0
- package/dist/sea/cli.d.ts.map +1 -0
- package/dist/sea/cli.js +4 -0
- package/dist/sea/cli.js.map +1 -0
- package/dist/sea/register-bedrock.d.ts +2 -0
- package/dist/sea/register-bedrock.d.ts.map +1 -0
- package/dist/sea/register-bedrock.js +4 -0
- package/dist/sea/register-bedrock.js.map +1 -0
- package/dist/store/catalog.d.ts +57 -0
- package/dist/store/catalog.d.ts.map +1 -0
- package/dist/store/catalog.js +331 -0
- package/dist/store/catalog.js.map +1 -0
- package/dist/store/inspector.d.ts +36 -0
- package/dist/store/inspector.d.ts.map +1 -0
- package/dist/store/inspector.js +578 -0
- package/dist/store/inspector.js.map +1 -0
- package/dist/store/install-plan.d.ts +26 -0
- package/dist/store/install-plan.d.ts.map +1 -0
- package/dist/store/install-plan.js +80 -0
- package/dist/store/install-plan.js.map +1 -0
- package/dist/store/render.d.ts +11 -0
- package/dist/store/render.d.ts.map +1 -0
- package/dist/store/render.js +153 -0
- package/dist/store/render.js.map +1 -0
- package/dist/store/resolver.d.ts +22 -0
- package/dist/store/resolver.d.ts.map +1 -0
- package/dist/store/resolver.js +207 -0
- package/dist/store/resolver.js.map +1 -0
- package/dist/store/store-cli.d.ts +7 -0
- package/dist/store/store-cli.d.ts.map +1 -0
- package/dist/store/store-cli.js +636 -0
- package/dist/store/store-cli.js.map +1 -0
- package/dist/store/targets.d.ts +21 -0
- package/dist/store/targets.d.ts.map +1 -0
- package/dist/store/targets.js +55 -0
- package/dist/store/targets.js.map +1 -0
- package/dist/utils/ansi.d.ts +2 -0
- package/dist/utils/ansi.d.ts.map +1 -0
- package/dist/utils/ansi.js +52 -0
- package/dist/utils/ansi.js.map +1 -0
- package/dist/utils/changelog.d.ts +22 -0
- package/dist/utils/changelog.d.ts.map +1 -0
- package/dist/utils/changelog.js +165 -0
- package/dist/utils/changelog.js.map +1 -0
- package/dist/utils/child-process.d.ts +18 -0
- package/dist/utils/child-process.d.ts.map +1 -0
- package/dist/utils/child-process.js +106 -0
- package/dist/utils/child-process.js.map +1 -0
- package/dist/utils/clipboard-image.d.ts +11 -0
- package/dist/utils/clipboard-image.d.ts.map +1 -0
- package/dist/utils/clipboard-image.js +245 -0
- package/dist/utils/clipboard-image.js.map +1 -0
- package/dist/utils/clipboard.d.ts +2 -0
- package/dist/utils/clipboard.d.ts.map +1 -0
- package/dist/utils/clipboard.js +94 -0
- package/dist/utils/clipboard.js.map +1 -0
- package/dist/utils/deprecation.d.ts +4 -0
- package/dist/utils/deprecation.d.ts.map +1 -0
- package/dist/utils/deprecation.js +13 -0
- package/dist/utils/deprecation.js.map +1 -0
- package/dist/utils/durable-atomic-write.d.ts +46 -0
- package/dist/utils/durable-atomic-write.d.ts.map +1 -0
- package/dist/utils/durable-atomic-write.js +104 -0
- package/dist/utils/durable-atomic-write.js.map +1 -0
- package/dist/utils/frontmatter.d.ts +8 -0
- package/dist/utils/frontmatter.d.ts.map +1 -0
- package/dist/utils/frontmatter.js +26 -0
- package/dist/utils/frontmatter.js.map +1 -0
- package/dist/utils/fs-watch.d.ts +5 -0
- package/dist/utils/fs-watch.d.ts.map +1 -0
- package/dist/utils/fs-watch.js +25 -0
- package/dist/utils/fs-watch.js.map +1 -0
- package/dist/utils/git.d.ts +26 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +195 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/html.d.ts +7 -0
- package/dist/utils/html.d.ts.map +1 -0
- package/dist/utils/html.js +40 -0
- package/dist/utils/html.js.map +1 -0
- package/dist/utils/ignore-files.d.ts +5 -0
- package/dist/utils/ignore-files.d.ts.map +1 -0
- package/dist/utils/ignore-files.js +58 -0
- package/dist/utils/ignore-files.js.map +1 -0
- package/dist/utils/image-codec.d.ts +22 -0
- package/dist/utils/image-codec.d.ts.map +1 -0
- package/dist/utils/image-codec.js +35 -0
- package/dist/utils/image-codec.js.map +1 -0
- package/dist/utils/image-convert.d.ts +9 -0
- package/dist/utils/image-convert.d.ts.map +1 -0
- package/dist/utils/image-convert.js +26 -0
- package/dist/utils/image-convert.js.map +1 -0
- package/dist/utils/image-resize-core.d.ts +31 -0
- package/dist/utils/image-resize-core.d.ts.map +1 -0
- package/dist/utils/image-resize-core.js +181 -0
- package/dist/utils/image-resize-core.js.map +1 -0
- package/dist/utils/image-resize-worker.d.ts +2 -0
- package/dist/utils/image-resize-worker.d.ts.map +1 -0
- package/dist/utils/image-resize-worker.js +31 -0
- package/dist/utils/image-resize-worker.js.map +1 -0
- package/dist/utils/image-resize.d.ts +15 -0
- package/dist/utils/image-resize.d.ts.map +1 -0
- package/dist/utils/image-resize.js +92 -0
- package/dist/utils/image-resize.js.map +1 -0
- package/dist/utils/json.d.ts +3 -0
- package/dist/utils/json.d.ts.map +1 -0
- package/dist/utils/json.js +7 -0
- package/dist/utils/json.js.map +1 -0
- package/dist/utils/mime.d.ts +3 -0
- package/dist/utils/mime.d.ts.map +1 -0
- package/dist/utils/mime.js +69 -0
- package/dist/utils/mime.js.map +1 -0
- package/dist/utils/npm-spec.d.ts +9 -0
- package/dist/utils/npm-spec.d.ts.map +1 -0
- package/dist/utils/npm-spec.js +15 -0
- package/dist/utils/npm-spec.js.map +1 -0
- package/dist/utils/open-browser.d.ts +9 -0
- package/dist/utils/open-browser.d.ts.map +1 -0
- package/dist/utils/open-browser.js +22 -0
- package/dist/utils/open-browser.js.map +1 -0
- package/dist/utils/paths.d.ts +31 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +92 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/private-files.d.ts +21 -0
- package/dist/utils/private-files.d.ts.map +1 -0
- package/dist/utils/private-files.js +103 -0
- package/dist/utils/private-files.js.map +1 -0
- package/dist/utils/process-env.d.ts +2 -0
- package/dist/utils/process-env.d.ts.map +1 -0
- package/dist/utils/process-env.js +31 -0
- package/dist/utils/process-env.js.map +1 -0
- package/dist/utils/shell.d.ts +30 -0
- package/dist/utils/shell.d.ts.map +1 -0
- package/dist/utils/shell.js +195 -0
- package/dist/utils/shell.js.map +1 -0
- package/dist/utils/sleep.d.ts +5 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/sleep.js +17 -0
- package/dist/utils/sleep.js.map +1 -0
- package/dist/utils/syntax-highlight.d.ts +18 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -0
- package/dist/utils/syntax-highlight.js +139 -0
- package/dist/utils/syntax-highlight.js.map +1 -0
- package/dist/utils/tools-manager.d.ts +3 -0
- package/dist/utils/tools-manager.d.ts.map +1 -0
- package/dist/utils/tools-manager.js +328 -0
- package/dist/utils/tools-manager.js.map +1 -0
- package/dist/utils/version-check.d.ts +15 -0
- package/dist/utils/version-check.d.ts.map +1 -0
- package/dist/utils/version-check.js +61 -0
- package/dist/utils/version-check.js.map +1 -0
- package/dist/utils/volt-user-agent.d.ts +2 -0
- package/dist/utils/volt-user-agent.d.ts.map +1 -0
- package/dist/utils/volt-user-agent.js +5 -0
- package/dist/utils/volt-user-agent.js.map +1 -0
- package/dist/utils/windows-self-update.d.ts +3 -0
- package/dist/utils/windows-self-update.d.ts.map +1 -0
- package/dist/utils/windows-self-update.js +77 -0
- package/dist/utils/windows-self-update.js.map +1 -0
- package/docs/compaction.md +394 -0
- package/docs/containerization.md +111 -0
- package/docs/custom-provider.md +737 -0
- package/docs/daemon.md +190 -0
- package/docs/development.md +70 -0
- package/docs/docs.json +176 -0
- package/docs/extensions.md +2692 -0
- package/docs/images/exy.png +0 -0
- package/docs/images/interactive-mode.png +0 -0
- package/docs/images/tree-view.png +0 -0
- package/docs/index.md +82 -0
- package/docs/iroh-remote-access-design.md +340 -0
- package/docs/iroh-remote-protocol.md +431 -0
- package/docs/json.md +87 -0
- package/docs/keybindings.md +200 -0
- package/docs/live-shared-session-daemon-design.md +1090 -0
- package/docs/lsp.md +143 -0
- package/docs/mcp.md +1044 -0
- package/docs/models.md +495 -0
- package/docs/packages.md +230 -0
- package/docs/prompt-templates.md +108 -0
- package/docs/providers.md +274 -0
- package/docs/quickstart.md +165 -0
- package/docs/rpc.md +2050 -0
- package/docs/sdk.md +1267 -0
- package/docs/security.md +139 -0
- package/docs/session-format.md +412 -0
- package/docs/sessions.md +145 -0
- package/docs/settings.md +371 -0
- package/docs/shell-aliases.md +13 -0
- package/docs/skills.md +243 -0
- package/docs/subagents-design.md +419 -0
- package/docs/terminal-setup.md +148 -0
- package/docs/termux.md +127 -0
- package/docs/themes.md +295 -0
- package/docs/tla/ClientAuth.cfg +16 -0
- package/docs/tla/ClientAuth.tla +205 -0
- package/docs/tla/ClientConn.cfg +16 -0
- package/docs/tla/ClientConn.tla +265 -0
- package/docs/tla/LeaseBroker.cfg +43 -0
- package/docs/tla/LeaseBroker.tla +563 -0
- package/docs/tla/PLAN.md +240 -0
- package/docs/tla/PushOrdering.cfg +17 -0
- package/docs/tla/PushOrdering.tla +183 -0
- package/docs/tla/README.md +205 -0
- package/docs/tla/RelayViewer.cfg +26 -0
- package/docs/tla/RelayViewer.tla +299 -0
- package/docs/tla/SessionTarget.cfg +18 -0
- package/docs/tla/SessionTarget.tla +192 -0
- package/docs/tla/check.sh +34 -0
- package/docs/tmux.md +63 -0
- package/docs/tui.md +949 -0
- package/docs/usage.md +482 -0
- package/docs/windows.md +17 -0
- package/docs/worktrees-design.md +605 -0
- package/examples/README.md +28 -0
- package/examples/extensions/README.md +211 -0
- package/examples/extensions/auto-commit-on-exit.ts +49 -0
- package/examples/extensions/bash-spawn-hook.ts +30 -0
- package/examples/extensions/bookmark.ts +50 -0
- package/examples/extensions/border-status-editor.ts +150 -0
- package/examples/extensions/built-in-tool-renderer.ts +249 -0
- package/examples/extensions/claude-rules.ts +86 -0
- package/examples/extensions/commands.ts +72 -0
- package/examples/extensions/confirm-destructive.ts +59 -0
- package/examples/extensions/custom-compaction.ts +127 -0
- package/examples/extensions/custom-footer.ts +64 -0
- package/examples/extensions/custom-header.ts +72 -0
- package/examples/extensions/custom-provider-anthropic/index.ts +604 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +24 -0
- package/examples/extensions/custom-provider-anthropic/package.json +19 -0
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +400 -0
- package/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -0
- package/examples/extensions/dirty-repo-guard.ts +56 -0
- package/examples/extensions/dynamic-resources/SKILL.md +8 -0
- package/examples/extensions/dynamic-resources/dynamic.json +79 -0
- package/examples/extensions/dynamic-resources/dynamic.md +5 -0
- package/examples/extensions/dynamic-resources/index.ts +15 -0
- package/examples/extensions/dynamic-tools.ts +74 -0
- package/examples/extensions/event-bus.ts +43 -0
- package/examples/extensions/file-trigger.ts +41 -0
- package/examples/extensions/git-checkpoint.ts +53 -0
- package/examples/extensions/git-merge-and-resolve.ts +115 -0
- package/examples/extensions/github-issue-autocomplete.ts +185 -0
- package/examples/extensions/gondolin/index.ts +531 -0
- package/examples/extensions/gondolin/package-lock.json +185 -0
- package/examples/extensions/gondolin/package.json +19 -0
- package/examples/extensions/handoff.ts +191 -0
- package/examples/extensions/hello.ts +26 -0
- package/examples/extensions/hidden-thinking-label.ts +53 -0
- package/examples/extensions/inline-bash.ts +94 -0
- package/examples/extensions/input-transform-streaming.ts +39 -0
- package/examples/extensions/input-transform.ts +43 -0
- package/examples/extensions/interactive-shell.ts +196 -0
- package/examples/extensions/mac-system-theme.ts +47 -0
- package/examples/extensions/message-renderer.ts +59 -0
- package/examples/extensions/minimal-mode.ts +426 -0
- package/examples/extensions/modal-editor.ts +85 -0
- package/examples/extensions/model-status.ts +31 -0
- package/examples/extensions/notify.ts +55 -0
- package/examples/extensions/overlay-qa-tests.ts +1450 -0
- package/examples/extensions/overlay-test.ts +153 -0
- package/examples/extensions/permission-gate.ts +34 -0
- package/examples/extensions/pirate.ts +47 -0
- package/examples/extensions/plan-mode/README.md +65 -0
- package/examples/extensions/plan-mode/index.ts +340 -0
- package/examples/extensions/plan-mode/utils.ts +168 -0
- package/examples/extensions/preset.ts +436 -0
- package/examples/extensions/project-trust.ts +64 -0
- package/examples/extensions/prompt-customizer.ts +97 -0
- package/examples/extensions/protected-paths.ts +30 -0
- package/examples/extensions/provider-payload.ts +18 -0
- package/examples/extensions/qna.ts +122 -0
- package/examples/extensions/question.ts +277 -0
- package/examples/extensions/questionnaire.ts +440 -0
- package/examples/extensions/rainbow-editor.ts +88 -0
- package/examples/extensions/reload-runtime.ts +37 -0
- package/examples/extensions/rpc-demo.ts +118 -0
- package/examples/extensions/sandbox/index.ts +321 -0
- package/examples/extensions/sandbox/package-lock.json +92 -0
- package/examples/extensions/sandbox/package.json +19 -0
- package/examples/extensions/send-user-message.ts +97 -0
- package/examples/extensions/session-name.ts +27 -0
- package/examples/extensions/shutdown-command.ts +63 -0
- package/examples/extensions/snake.ts +343 -0
- package/examples/extensions/space-invaders.ts +560 -0
- package/examples/extensions/ssh.ts +220 -0
- package/examples/extensions/status-line.ts +32 -0
- package/examples/extensions/structured-output.ts +65 -0
- package/examples/extensions/subagent/README.md +175 -0
- package/examples/extensions/subagent/agents/planner.md +37 -0
- package/examples/extensions/subagent/agents/reviewer.md +35 -0
- package/examples/extensions/subagent/agents/scout.md +50 -0
- package/examples/extensions/subagent/agents/worker.md +24 -0
- package/examples/extensions/subagent/agents.ts +126 -0
- package/examples/extensions/subagent/index.ts +1009 -0
- package/examples/extensions/subagent/prompts/implement-and-review.md +10 -0
- package/examples/extensions/subagent/prompts/implement.md +10 -0
- package/examples/extensions/subagent/prompts/scout-and-plan.md +9 -0
- package/examples/extensions/summarize.ts +206 -0
- package/examples/extensions/system-prompt-header.ts +17 -0
- package/examples/extensions/tic-tac-toe.ts +1008 -0
- package/examples/extensions/timed-confirm.ts +70 -0
- package/examples/extensions/titlebar-spinner.ts +58 -0
- package/examples/extensions/todo.ts +297 -0
- package/examples/extensions/tool-override.ts +144 -0
- package/examples/extensions/tools.ts +146 -0
- package/examples/extensions/trigger-compact.ts +50 -0
- package/examples/extensions/truncated-tool.ts +195 -0
- package/examples/extensions/widget-placement.ts +9 -0
- package/examples/extensions/with-deps/index.ts +32 -0
- package/examples/extensions/with-deps/package-lock.json +31 -0
- package/examples/extensions/with-deps/package.json +22 -0
- package/examples/extensions/working-indicator.ts +123 -0
- package/examples/extensions/working-message-test.ts +25 -0
- package/examples/remote/firebase-push-relay/README.md +79 -0
- package/examples/remote/firebase-push-relay/firebase.json +12 -0
- package/examples/remote/firebase-push-relay/firestore.indexes.json +11 -0
- package/examples/remote/firebase-push-relay/firestore.rules +9 -0
- package/examples/remote/firebase-push-relay/functions/core.js +511 -0
- package/examples/remote/firebase-push-relay/functions/core.test.js +273 -0
- package/examples/remote/firebase-push-relay/functions/index.js +413 -0
- package/examples/remote/firebase-push-relay/functions/package-lock.json +2974 -0
- package/examples/remote/firebase-push-relay/functions/package.json +18 -0
- package/examples/remote/iroh-sidecar/README.md +211 -0
- package/examples/remote/iroh-sidecar/client.mjs +554 -0
- package/examples/remote/iroh-sidecar/common.mjs +195 -0
- package/examples/remote/iroh-sidecar/host.mjs +4 -0
- package/examples/remote/iroh-sidecar/package-lock.json +213 -0
- package/examples/remote/iroh-sidecar/package.json +13 -0
- package/examples/remote/iroh-sidecar/source-aware-run.mjs +41 -0
- package/examples/rpc-extension-ui.ts +632 -0
- package/examples/sdk/01-minimal.ts +26 -0
- package/examples/sdk/02-custom-model.ts +53 -0
- package/examples/sdk/03-custom-prompt.ts +70 -0
- package/examples/sdk/04-skills.ts +55 -0
- package/examples/sdk/05-tools.ts +48 -0
- package/examples/sdk/06-extensions.ts +94 -0
- package/examples/sdk/07-context-files.ts +42 -0
- package/examples/sdk/08-prompt-templates.ts +51 -0
- package/examples/sdk/09-api-keys-and-oauth.ts +52 -0
- package/examples/sdk/10-settings.ts +53 -0
- package/examples/sdk/11-sessions.ts +52 -0
- package/examples/sdk/12-full-control.ts +78 -0
- package/examples/sdk/13-session-runtime.ts +67 -0
- package/examples/sdk/README.md +147 -0
- package/npm-shrinkwrap.json +3442 -0
- package/package.json +125 -19
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
import { Buffer } from "node:buffer";
|
|
2
|
+
import { type IrohRemoteAccessPresetName, type IrohRemoteRpcCapability, type IrohRemoteRpcGrant } from "../core/remote/iroh/access-grant.ts";
|
|
3
|
+
import type { IrohRemoteLiveActivityUpdateIntent, IrohRemotePushNotificationDeliveryStatus, IrohRemotePushNotificationIntent } from "../core/remote/iroh/push.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Wire types and framing for the voltd control plane: JSONL over the unix
|
|
6
|
+
* socket ~/.volt/agent/daemon/voltd.sock. Shared by the daemon, the TUI, and
|
|
7
|
+
* the CLI. Zero runtime deps beyond node:buffer.
|
|
8
|
+
*/
|
|
9
|
+
export declare const PROTOCOL_VERSION = 1;
|
|
10
|
+
/** Hard cap per JSONL line; longer lines close the connection with a fatal frame. */
|
|
11
|
+
export declare const CONTROL_MAX_LINE_BYTES: number;
|
|
12
|
+
export type LeaseState = "unowned" | "daemon-active" | "daemon-detached" | "daemon-draining" | "tui-owned";
|
|
13
|
+
export type ControlClientKind = "tui" | "cli";
|
|
14
|
+
/**
|
|
15
|
+
* Control-hello capability advertised by TUIs that can serve worktree-bound
|
|
16
|
+
* conversations over the byte relay (worktree-cwd sanitization). The daemon
|
|
17
|
+
* never offers worktree-session relays to control clients without it.
|
|
18
|
+
*/
|
|
19
|
+
export declare const CONTROL_WORKTREES_CAPABILITY = "worktrees";
|
|
20
|
+
/** Status capability for cancellable, immediately-invalidated pairing tickets. */
|
|
21
|
+
export declare const CONTROL_PAIR_CANCEL_CAPABILITY = "pair_cancel";
|
|
22
|
+
/** TUI/CLI understands per-device tool + RPC grant control messages and relay preambles. */
|
|
23
|
+
export declare const CONTROL_RPC_GRANTS_CAPABILITY = "rpc_grants";
|
|
24
|
+
export type HelloMessage = {
|
|
25
|
+
type: "hello";
|
|
26
|
+
role: "control";
|
|
27
|
+
protocolVersion: number;
|
|
28
|
+
pid: number;
|
|
29
|
+
version: string;
|
|
30
|
+
client: ControlClientKind;
|
|
31
|
+
/** Per-daemon instance token read from the local pidfile. */
|
|
32
|
+
controlToken?: string;
|
|
33
|
+
/** Optional client capabilities (e.g. "worktrees"); absent for old clients. */
|
|
34
|
+
capabilities?: string[];
|
|
35
|
+
} | {
|
|
36
|
+
type: "hello";
|
|
37
|
+
role: "relay";
|
|
38
|
+
protocolVersion: number;
|
|
39
|
+
relayId: string;
|
|
40
|
+
relayToken: string;
|
|
41
|
+
};
|
|
42
|
+
export interface HelloAck {
|
|
43
|
+
type: "hello_ack";
|
|
44
|
+
ok: boolean;
|
|
45
|
+
error?: "protocol_mismatch" | "shutting_down" | "bad_relay_token" | "auth_failed";
|
|
46
|
+
/** daemon-assigned, present when ok (control role) */
|
|
47
|
+
connectionId?: string;
|
|
48
|
+
/** daemon package version */
|
|
49
|
+
version?: string;
|
|
50
|
+
protocolVersion?: number;
|
|
51
|
+
}
|
|
52
|
+
export type ControlAccessSelection = {
|
|
53
|
+
access?: IrohRemoteAccessPresetName;
|
|
54
|
+
allowedTools?: never;
|
|
55
|
+
rpcCapabilities?: never;
|
|
56
|
+
} | {
|
|
57
|
+
access?: never;
|
|
58
|
+
allowedTools: string[];
|
|
59
|
+
rpcCapabilities: IrohRemoteRpcCapability[];
|
|
60
|
+
};
|
|
61
|
+
export type ControlRequest = {
|
|
62
|
+
type: "status";
|
|
63
|
+
id: string;
|
|
64
|
+
} | {
|
|
65
|
+
type: "shutdown";
|
|
66
|
+
id: string;
|
|
67
|
+
} | {
|
|
68
|
+
type: "lease_acquire";
|
|
69
|
+
id: string;
|
|
70
|
+
workspaceName: string;
|
|
71
|
+
sessionId: string;
|
|
72
|
+
/** reserved; true => lease_denied{force_unsupported} */
|
|
73
|
+
force?: boolean;
|
|
74
|
+
} | {
|
|
75
|
+
type: "lease_release";
|
|
76
|
+
id: string;
|
|
77
|
+
workspaceName: string;
|
|
78
|
+
sessionId: string;
|
|
79
|
+
} | {
|
|
80
|
+
type: "lease_rekey";
|
|
81
|
+
id: string;
|
|
82
|
+
workspaceName: string;
|
|
83
|
+
oldSessionId: string;
|
|
84
|
+
newSessionId: string;
|
|
85
|
+
} | ({
|
|
86
|
+
type: "pair_request";
|
|
87
|
+
id: string;
|
|
88
|
+
workspaceName?: string;
|
|
89
|
+
} & ControlAccessSelection) | {
|
|
90
|
+
type: "pair_cancel";
|
|
91
|
+
id: string;
|
|
92
|
+
requestId: string;
|
|
93
|
+
} | {
|
|
94
|
+
type: "clients_list";
|
|
95
|
+
id: string;
|
|
96
|
+
} | ({
|
|
97
|
+
type: "client_access_update";
|
|
98
|
+
id: string;
|
|
99
|
+
clientNodeId: string;
|
|
100
|
+
expectedRevision: number;
|
|
101
|
+
} & ControlAccessSelection) | {
|
|
102
|
+
type: "client_revoke";
|
|
103
|
+
id: string;
|
|
104
|
+
clientNodeId: string;
|
|
105
|
+
} | {
|
|
106
|
+
type: "client_approve_repair";
|
|
107
|
+
id: string;
|
|
108
|
+
clientNodeId: string;
|
|
109
|
+
} | {
|
|
110
|
+
type: "workspace_register";
|
|
111
|
+
id: string;
|
|
112
|
+
name: string;
|
|
113
|
+
path: string;
|
|
114
|
+
} | {
|
|
115
|
+
type: "workspace_unregister";
|
|
116
|
+
id: string;
|
|
117
|
+
name: string;
|
|
118
|
+
} | {
|
|
119
|
+
type: "worktree_create";
|
|
120
|
+
id: string;
|
|
121
|
+
workspaceName: string;
|
|
122
|
+
worktreeName?: string;
|
|
123
|
+
branch?: string;
|
|
124
|
+
baseRef?: string;
|
|
125
|
+
} | {
|
|
126
|
+
type: "worktree_adopt";
|
|
127
|
+
id: string;
|
|
128
|
+
workspaceName: string;
|
|
129
|
+
path: string;
|
|
130
|
+
worktreeName?: string;
|
|
131
|
+
baseRef?: string;
|
|
132
|
+
} | {
|
|
133
|
+
type: "worktree_list";
|
|
134
|
+
id: string;
|
|
135
|
+
workspaceName?: string;
|
|
136
|
+
} | {
|
|
137
|
+
type: "worktree_remove";
|
|
138
|
+
id: string;
|
|
139
|
+
workspaceName: string;
|
|
140
|
+
worktreeId: string;
|
|
141
|
+
force?: boolean;
|
|
142
|
+
} | {
|
|
143
|
+
type: "worktree_prune";
|
|
144
|
+
id: string;
|
|
145
|
+
workspaceName?: string;
|
|
146
|
+
}
|
|
147
|
+
/** Resolve a filesystem path to the daemon-managed worktree containing it. */
|
|
148
|
+
| {
|
|
149
|
+
type: "worktree_resolve";
|
|
150
|
+
id: string;
|
|
151
|
+
path: string;
|
|
152
|
+
}
|
|
153
|
+
/** Bind a session id to a worktree (TUI-created worktree sessions). */
|
|
154
|
+
| {
|
|
155
|
+
type: "worktree_bind";
|
|
156
|
+
id: string;
|
|
157
|
+
workspaceName: string;
|
|
158
|
+
worktreeId: string;
|
|
159
|
+
sessionId: string;
|
|
160
|
+
} | {
|
|
161
|
+
type: "theme_set";
|
|
162
|
+
id: string;
|
|
163
|
+
theme: string;
|
|
164
|
+
} | {
|
|
165
|
+
type: "keep_awake_set";
|
|
166
|
+
id: string;
|
|
167
|
+
enabled: boolean;
|
|
168
|
+
} | {
|
|
169
|
+
type: "viewer_subscribe";
|
|
170
|
+
id: string;
|
|
171
|
+
viewerFeedId: string;
|
|
172
|
+
} | {
|
|
173
|
+
type: "viewer_unsubscribe";
|
|
174
|
+
id: string;
|
|
175
|
+
viewerFeedId: string;
|
|
176
|
+
} | {
|
|
177
|
+
type: "viewer_abort";
|
|
178
|
+
id: string;
|
|
179
|
+
viewerFeedId: string;
|
|
180
|
+
} | {
|
|
181
|
+
type: "relay_rpc";
|
|
182
|
+
id: string;
|
|
183
|
+
/** Active relay whose phone command is being forwarded. */
|
|
184
|
+
relayId: string;
|
|
185
|
+
/** paired phone client the relayed conversation belongs to */
|
|
186
|
+
clientNodeId: string;
|
|
187
|
+
workspaceName: string;
|
|
188
|
+
/** the TUI's current session id for the relayed conversation */
|
|
189
|
+
sessionId: string;
|
|
190
|
+
/**
|
|
191
|
+
* Verbatim phone RPC command forwarded from a TUI-owned conversation.
|
|
192
|
+
* The daemon executes it against its real state (push targets, live
|
|
193
|
+
* activities, workspace registry) and returns the RPC response in
|
|
194
|
+
* relay_rpc_result.
|
|
195
|
+
*/
|
|
196
|
+
command: Record<string, unknown> & {
|
|
197
|
+
type: string;
|
|
198
|
+
};
|
|
199
|
+
} | {
|
|
200
|
+
type: "relay_notification_delivery";
|
|
201
|
+
id: string;
|
|
202
|
+
/** paired phone client the relayed conversation belongs to */
|
|
203
|
+
clientNodeId: string;
|
|
204
|
+
workspaceName: string;
|
|
205
|
+
/** the TUI's current session id for the relayed conversation */
|
|
206
|
+
sessionId: string;
|
|
207
|
+
notification: IrohRemotePushNotificationIntent;
|
|
208
|
+
} | {
|
|
209
|
+
type: "relay_live_activity_delivery";
|
|
210
|
+
id: string;
|
|
211
|
+
/** paired phone client the relayed conversation belongs to */
|
|
212
|
+
clientNodeId: string;
|
|
213
|
+
workspaceName: string;
|
|
214
|
+
/** the TUI's current session id for the relayed conversation */
|
|
215
|
+
sessionId: string;
|
|
216
|
+
update: IrohRemoteLiveActivityUpdateIntent;
|
|
217
|
+
};
|
|
218
|
+
/** RPC command types the daemon executes on behalf of a TUI relay. */
|
|
219
|
+
export declare const RELAY_RPC_COMMAND_TYPES: ReadonlySet<string>;
|
|
220
|
+
/** Host keep-awake assertion state as reported over the control plane. */
|
|
221
|
+
export interface ControlKeepAwakeStatus {
|
|
222
|
+
/** Desired (persisted) state. */
|
|
223
|
+
enabled: boolean;
|
|
224
|
+
/** Actual state; `degraded` means enabled but the assertion is not held. */
|
|
225
|
+
state: "disabled" | "active" | "degraded";
|
|
226
|
+
method?: string;
|
|
227
|
+
reason?: string;
|
|
228
|
+
}
|
|
229
|
+
export interface ControlLeaseStatus {
|
|
230
|
+
workspaceName: string;
|
|
231
|
+
sessionId: string;
|
|
232
|
+
state: LeaseState;
|
|
233
|
+
relayCount: number;
|
|
234
|
+
streamCount: number;
|
|
235
|
+
}
|
|
236
|
+
export interface ControlWorkspaceStatus {
|
|
237
|
+
name: string;
|
|
238
|
+
path: string;
|
|
239
|
+
/** Workspace-specific headless tool grant, when configured. */
|
|
240
|
+
allowedTools?: string[];
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Worktree status over the LOCAL control socket. Unlike the iroh wire, the
|
|
244
|
+
* control plane is trusted (same user), so checkout paths are included for
|
|
245
|
+
* display.
|
|
246
|
+
*/
|
|
247
|
+
export interface ControlWorktreeStatus {
|
|
248
|
+
id: string;
|
|
249
|
+
workspaceName: string;
|
|
250
|
+
path: string;
|
|
251
|
+
branch: string;
|
|
252
|
+
baseRef?: string;
|
|
253
|
+
createdAt: number;
|
|
254
|
+
sessionIds: string[];
|
|
255
|
+
available?: boolean;
|
|
256
|
+
dirty?: boolean;
|
|
257
|
+
/** Branch commits vs the base ref (merge-back guidance). */
|
|
258
|
+
aheadBehind?: {
|
|
259
|
+
ahead: number;
|
|
260
|
+
behind: number;
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
export interface ControlClientStatus {
|
|
264
|
+
clientNodeId: string;
|
|
265
|
+
label?: string;
|
|
266
|
+
pairedAtMs: number;
|
|
267
|
+
/** Added to protocol v1 after launch; absent on older running daemons. */
|
|
268
|
+
lastSeenAtMs?: number;
|
|
269
|
+
/** Persisted headless tool grant for this paired device. */
|
|
270
|
+
allowedTools?: string[];
|
|
271
|
+
rpcGrant?: IrohRemoteRpcGrant;
|
|
272
|
+
}
|
|
273
|
+
export interface ControlRevokedClientStatus {
|
|
274
|
+
clientNodeId: string;
|
|
275
|
+
label?: string;
|
|
276
|
+
pairedAtMs: number;
|
|
277
|
+
lastSeenAtMs?: number;
|
|
278
|
+
revokedAtMs: number;
|
|
279
|
+
/** Present after the desktop explicitly allows this identity to use a fresh pairing ticket. */
|
|
280
|
+
rePairApprovedAtMs?: number;
|
|
281
|
+
rpcGrant?: IrohRemoteRpcGrant;
|
|
282
|
+
}
|
|
283
|
+
export interface DaemonRemotePolicyStatus {
|
|
284
|
+
/** Daemon-wide override; null delegates to workspace and device grants. */
|
|
285
|
+
allowTools: string[] | null;
|
|
286
|
+
/** Retention window for idle, detached daemon-owned runtimes. */
|
|
287
|
+
detachedRuntimeTtlMs: number;
|
|
288
|
+
}
|
|
289
|
+
export type ControlResponse = {
|
|
290
|
+
type: "ok";
|
|
291
|
+
id: string;
|
|
292
|
+
} | {
|
|
293
|
+
type: "error";
|
|
294
|
+
id: string;
|
|
295
|
+
code: string;
|
|
296
|
+
message: string;
|
|
297
|
+
} | {
|
|
298
|
+
type: "lease_granted";
|
|
299
|
+
id: string;
|
|
300
|
+
workspaceName: string;
|
|
301
|
+
sessionId: string;
|
|
302
|
+
handoff: "cold" | "warm" | "none";
|
|
303
|
+
} | {
|
|
304
|
+
type: "lease_pending";
|
|
305
|
+
id: string;
|
|
306
|
+
viewerFeedId: string;
|
|
307
|
+
} | {
|
|
308
|
+
type: "lease_denied";
|
|
309
|
+
id: string;
|
|
310
|
+
reason: "held_by_tui" | "force_unsupported" | "draining_elsewhere";
|
|
311
|
+
} | {
|
|
312
|
+
type: "status_result";
|
|
313
|
+
id: string;
|
|
314
|
+
version: string;
|
|
315
|
+
protocolVersion: number;
|
|
316
|
+
pid: number;
|
|
317
|
+
startedAtMs: number;
|
|
318
|
+
/** Optional feature flags for protocol-v1 additions. */
|
|
319
|
+
capabilities?: string[];
|
|
320
|
+
leases: ControlLeaseStatus[];
|
|
321
|
+
phoneConnections: number;
|
|
322
|
+
workspaces: ControlWorkspaceStatus[];
|
|
323
|
+
clients: ControlClientStatus[];
|
|
324
|
+
/** Revoked identities retained for explicit repair approval; absent on older running daemons. */
|
|
325
|
+
revokedClients?: ControlRevokedClientStatus[];
|
|
326
|
+
/** Added to protocol v1 after launch; absent on older running daemons. */
|
|
327
|
+
remotePolicy?: DaemonRemotePolicyStatus;
|
|
328
|
+
keepAwake: ControlKeepAwakeStatus;
|
|
329
|
+
} | {
|
|
330
|
+
type: "keep_awake_result";
|
|
331
|
+
id: string;
|
|
332
|
+
keepAwake: ControlKeepAwakeStatus;
|
|
333
|
+
} | {
|
|
334
|
+
type: "clients_result";
|
|
335
|
+
id: string;
|
|
336
|
+
clients: ControlClientStatus[];
|
|
337
|
+
} | {
|
|
338
|
+
type: "client_access_updated";
|
|
339
|
+
id: string;
|
|
340
|
+
client: ControlClientStatus;
|
|
341
|
+
} | {
|
|
342
|
+
type: "worktree_result";
|
|
343
|
+
id: string;
|
|
344
|
+
worktree: ControlWorktreeStatus;
|
|
345
|
+
} | {
|
|
346
|
+
type: "worktrees_result";
|
|
347
|
+
id: string;
|
|
348
|
+
worktrees: ControlWorktreeStatus[];
|
|
349
|
+
} | {
|
|
350
|
+
type: "worktree_resolve_result";
|
|
351
|
+
id: string;
|
|
352
|
+
/** Parent workspace the worktree belongs to. */
|
|
353
|
+
workspaceName: string;
|
|
354
|
+
/** Parent workspace checkout path (control plane is local/trusted). */
|
|
355
|
+
workspacePath: string;
|
|
356
|
+
worktreeId: string;
|
|
357
|
+
worktreePath: string;
|
|
358
|
+
} | {
|
|
359
|
+
type: "worktree_prune_result";
|
|
360
|
+
id: string;
|
|
361
|
+
results: Array<{
|
|
362
|
+
workspaceName: string;
|
|
363
|
+
removedRecords: string[];
|
|
364
|
+
orphanCheckouts: string[];
|
|
365
|
+
}>;
|
|
366
|
+
} | {
|
|
367
|
+
type: "pair_started";
|
|
368
|
+
id: string;
|
|
369
|
+
requestId: string;
|
|
370
|
+
} | {
|
|
371
|
+
type: "relay_rpc_result";
|
|
372
|
+
id: string;
|
|
373
|
+
/** verbatim RPC response object for the TUI to forward to the phone */
|
|
374
|
+
response: Record<string, unknown>;
|
|
375
|
+
/** refreshed workspace metadata after a successful unregister_workspace */
|
|
376
|
+
workspaceMetadata?: {
|
|
377
|
+
workspaceNames: string[];
|
|
378
|
+
workspaces: Array<{
|
|
379
|
+
name: string;
|
|
380
|
+
status: string;
|
|
381
|
+
}>;
|
|
382
|
+
};
|
|
383
|
+
} | {
|
|
384
|
+
type: "relay_push_delivery_result";
|
|
385
|
+
id: string;
|
|
386
|
+
status: IrohRemotePushNotificationDeliveryStatus;
|
|
387
|
+
};
|
|
388
|
+
export type RelayCloseReason = "phone_disconnected" | "tui_disconnected" | "lease_transferred" | "session_rekeyed_reconnect" | "workspace_unregistered" | "host_shutdown" | "error";
|
|
389
|
+
export type ControlEvent = {
|
|
390
|
+
type: "relay_offer";
|
|
391
|
+
relayId: string;
|
|
392
|
+
/** single-use, 10s expiry */
|
|
393
|
+
relayToken: string;
|
|
394
|
+
workspaceName: string;
|
|
395
|
+
sessionId: string;
|
|
396
|
+
clientNodeId: string;
|
|
397
|
+
connectionId: string;
|
|
398
|
+
streamId: string;
|
|
399
|
+
} | {
|
|
400
|
+
type: "relay_closed";
|
|
401
|
+
relayId: string;
|
|
402
|
+
reason: RelayCloseReason;
|
|
403
|
+
} | {
|
|
404
|
+
type: "viewer_event";
|
|
405
|
+
viewerFeedId: string;
|
|
406
|
+
seq: number;
|
|
407
|
+
/** AgentSessionEvent JSON, or {kind:"truncated"} when the buffer overflowed */
|
|
408
|
+
event: unknown;
|
|
409
|
+
} | {
|
|
410
|
+
type: "viewer_end";
|
|
411
|
+
viewerFeedId: string;
|
|
412
|
+
reason: "granted" | "cancelled" | "error";
|
|
413
|
+
} | {
|
|
414
|
+
type: "theme_snapshot";
|
|
415
|
+
themeName: string;
|
|
416
|
+
tokens: Record<string, string>;
|
|
417
|
+
} | {
|
|
418
|
+
type: "keep_awake_changed";
|
|
419
|
+
keepAwake: ControlKeepAwakeStatus;
|
|
420
|
+
} | {
|
|
421
|
+
type: "pairing_progress";
|
|
422
|
+
requestId: string;
|
|
423
|
+
phase: "ticket" | "qr" | "waiting" | "completed" | "failed";
|
|
424
|
+
ticket?: string;
|
|
425
|
+
qrLines?: string[];
|
|
426
|
+
clientNodeId?: string;
|
|
427
|
+
error?: string;
|
|
428
|
+
} | {
|
|
429
|
+
type: "daemon_shutdown";
|
|
430
|
+
};
|
|
431
|
+
export interface ControlFatal {
|
|
432
|
+
type: "fatal";
|
|
433
|
+
error: string;
|
|
434
|
+
}
|
|
435
|
+
export type ControlMessage = HelloMessage | HelloAck | ControlRequest | ControlResponse | ControlEvent | ControlFatal;
|
|
436
|
+
/** One JSONL relay preamble line follows a successful relay hello_ack. */
|
|
437
|
+
export interface RelayPreamble {
|
|
438
|
+
type: "relay_preamble";
|
|
439
|
+
relayId: string;
|
|
440
|
+
/** verbatim phone handshake JSON as received (parsed object, re-serialized) */
|
|
441
|
+
handshake: unknown;
|
|
442
|
+
/** authorization subset — everything the TUI needs to serve the stream */
|
|
443
|
+
authorization: {
|
|
444
|
+
clientNodeId: string;
|
|
445
|
+
workspaceName: string;
|
|
446
|
+
workspacePath: string;
|
|
447
|
+
/** Headless agent tool grant, carried for visibility; TUI-owned sessions retain their full local tools. */
|
|
448
|
+
allowedTools: string;
|
|
449
|
+
rpcGrant: IrohRemoteRpcGrant;
|
|
450
|
+
/** Present when the conversation is bound to a daemon-managed worktree. */
|
|
451
|
+
worktreeId?: string;
|
|
452
|
+
/** Worktree checkout path — the TUI sanitizes with this as the root. */
|
|
453
|
+
worktreePath?: string;
|
|
454
|
+
/** Registered-workspace-relative git source root for nested repo worktrees. */
|
|
455
|
+
worktreeSourceRootRelativePath?: string;
|
|
456
|
+
};
|
|
457
|
+
/**
|
|
458
|
+
* The daemon's Iroh node id: the TUI writes it into the handshake response
|
|
459
|
+
* so the phone's saved-host identity verification passes over the relay.
|
|
460
|
+
*/
|
|
461
|
+
hostNodeId?: string;
|
|
462
|
+
relayMode?: "disabled" | "development" | "production";
|
|
463
|
+
relayUrls?: string[];
|
|
464
|
+
connectionId: string;
|
|
465
|
+
streamId: string;
|
|
466
|
+
resolvedTarget: {
|
|
467
|
+
sessionId: string;
|
|
468
|
+
sessionFilePath?: string;
|
|
469
|
+
selection: "created" | "created_after_missing" | "resumed";
|
|
470
|
+
requestedSessionId?: string;
|
|
471
|
+
workspaceName: string;
|
|
472
|
+
workspacePath: string;
|
|
473
|
+
worktreeId?: string;
|
|
474
|
+
/** POSIX-style path relative to the registered workspace root. */
|
|
475
|
+
workingDirectory?: string;
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
export declare function encodeControlLine(message: object): Buffer;
|
|
479
|
+
export declare class ControlFrameTooLargeError extends Error {
|
|
480
|
+
constructor(byteLength: number);
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Incremental JSONL decoder with the 8 MiB line cap. Feed raw socket chunks;
|
|
484
|
+
* complete lines come back parsed. Throws ControlFrameTooLargeError when the
|
|
485
|
+
* buffered partial line exceeds the cap (callers must close the connection).
|
|
486
|
+
*/
|
|
487
|
+
export declare class ControlLineDecoder {
|
|
488
|
+
private buffered;
|
|
489
|
+
push(chunk: Buffer): unknown[];
|
|
490
|
+
/**
|
|
491
|
+
* Parse complete lines one at a time, invoking handle per message. When
|
|
492
|
+
* handle returns "stop" (relay handoff), decoding halts immediately and any
|
|
493
|
+
* bytes past the consumed line stay buffered for drainRemainder(). Unlike
|
|
494
|
+
* push(), bytes arriving after a stop are never JSON-decoded — required for
|
|
495
|
+
* relay hellos, where everything after the hello line is opaque payload.
|
|
496
|
+
*/
|
|
497
|
+
pushEach(chunk: Buffer, handle: (message: unknown) => "continue" | "stop"): void;
|
|
498
|
+
/** Bytes buffered past the last complete line (used when switching a relay conn to raw mode). */
|
|
499
|
+
drainRemainder(): Buffer;
|
|
500
|
+
}
|
|
501
|
+
export declare function parseHelloMessage(value: unknown): HelloMessage | undefined;
|
|
502
|
+
export declare function isControlRequest(value: unknown): value is ControlRequest;
|
|
503
|
+
export declare function isControlResponse(value: unknown): value is ControlResponse;
|
|
504
|
+
export declare function isControlEvent(value: unknown): value is ControlEvent;
|
|
505
|
+
export declare function isHelloAck(value: unknown): value is HelloAck;
|
|
506
|
+
export declare function isRelayPreamble(value: unknown): value is RelayPreamble;
|
|
507
|
+
//# sourceMappingURL=control-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-protocol.d.ts","sourceRoot":"","sources":["../../src/daemon/control-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EACN,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EAIvB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EACX,kCAAkC,EAClC,wCAAwC,EACxC,gCAAgC,EAChC,MAAM,6BAA6B,CAAC;AAErC;;;;GAIG;AAEH,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,qFAAqF;AACrF,eAAO,MAAM,sBAAsB,QAAkB,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,eAAe,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,WAAW,CAAC;AAE3G,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,KAAK,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,cAAc,CAAC;AACxD,kFAAkF;AAClF,eAAO,MAAM,8BAA8B,gBAAgB,CAAC;AAC5D,4FAA4F;AAC5F,eAAO,MAAM,6BAA6B,eAAe,CAAC;AAE1D,MAAM,MAAM,YAAY,GACrB;IACA,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,SAAS,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;CACD;AAED;;;;GAIG;AACH,qBAAa,kBAAkB;IAC9B,OAAO,CAAC,QAAQ,CAA2B;IAE3C,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAqB7B;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,UAAU,GAAG,MAAM,GAAG,IAAI,CAsB/E;IAED,iGAAiG;IACjG,cAAc,IAAI,MAAM,CAIvB;CACD;AAgGD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,GAAG,SAAS,CAgD1E;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAyGxE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAqC1E;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAkBpE;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAE5D;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAmBtE","sourcesContent":["import { Buffer } from \"node:buffer\";\nimport {\n\ttype IrohRemoteAccessPresetName,\n\ttype IrohRemoteRpcCapability,\n\ttype IrohRemoteRpcGrant,\n\tisIrohRemoteAccessPresetName,\n\tparseIrohRemoteRpcCapabilities,\n\tparseIrohRemoteRpcGrant,\n} from \"../core/remote/iroh/access-grant.ts\";\nimport type {\n\tIrohRemoteLiveActivityUpdateIntent,\n\tIrohRemotePushNotificationDeliveryStatus,\n\tIrohRemotePushNotificationIntent,\n} from \"../core/remote/iroh/push.ts\";\n\n/**\n * Wire types and framing for the voltd control plane: JSONL over the unix\n * socket ~/.volt/agent/daemon/voltd.sock. Shared by the daemon, the TUI, and\n * the CLI. Zero runtime deps beyond node:buffer.\n */\n\nexport const PROTOCOL_VERSION = 1;\n\n/** Hard cap per JSONL line; longer lines close the connection with a fatal frame. */\nexport const CONTROL_MAX_LINE_BYTES = 8 * 1024 * 1024;\n\nexport type LeaseState = \"unowned\" | \"daemon-active\" | \"daemon-detached\" | \"daemon-draining\" | \"tui-owned\";\n\nexport type ControlClientKind = \"tui\" | \"cli\";\n\n/**\n * Control-hello capability advertised by TUIs that can serve worktree-bound\n * conversations over the byte relay (worktree-cwd sanitization). The daemon\n * never offers worktree-session relays to control clients without it.\n */\nexport const CONTROL_WORKTREES_CAPABILITY = \"worktrees\";\n/** Status capability for cancellable, immediately-invalidated pairing tickets. */\nexport const CONTROL_PAIR_CANCEL_CAPABILITY = \"pair_cancel\";\n/** TUI/CLI understands per-device tool + RPC grant control messages and relay preambles. */\nexport const CONTROL_RPC_GRANTS_CAPABILITY = \"rpc_grants\";\n\nexport type HelloMessage =\n\t| {\n\t\t\ttype: \"hello\";\n\t\t\trole: \"control\";\n\t\t\tprotocolVersion: number;\n\t\t\tpid: number;\n\t\t\tversion: string;\n\t\t\tclient: ControlClientKind;\n\t\t\t/** Per-daemon instance token read from the local pidfile. */\n\t\t\tcontrolToken?: string;\n\t\t\t/** Optional client capabilities (e.g. \"worktrees\"); absent for old clients. */\n\t\t\tcapabilities?: string[];\n\t }\n\t| {\n\t\t\ttype: \"hello\";\n\t\t\trole: \"relay\";\n\t\t\tprotocolVersion: number;\n\t\t\trelayId: string;\n\t\t\trelayToken: string;\n\t };\n\nexport interface HelloAck {\n\ttype: \"hello_ack\";\n\tok: boolean;\n\terror?: \"protocol_mismatch\" | \"shutting_down\" | \"bad_relay_token\" | \"auth_failed\";\n\t/** daemon-assigned, present when ok (control role) */\n\tconnectionId?: string;\n\t/** daemon package version */\n\tversion?: string;\n\tprotocolVersion?: number;\n}\n\n// ============================================================================\n// Requests and responses (control role)\n// ============================================================================\n\nexport type ControlAccessSelection =\n\t| { access?: IrohRemoteAccessPresetName; allowedTools?: never; rpcCapabilities?: never }\n\t| { access?: never; allowedTools: string[]; rpcCapabilities: IrohRemoteRpcCapability[] };\n\nexport type ControlRequest =\n\t| { type: \"status\"; id: string }\n\t| { type: \"shutdown\"; id: string }\n\t| {\n\t\t\ttype: \"lease_acquire\";\n\t\t\tid: string;\n\t\t\tworkspaceName: string;\n\t\t\tsessionId: string;\n\t\t\t/** reserved; true => lease_denied{force_unsupported} */\n\t\t\tforce?: boolean;\n\t }\n\t| { type: \"lease_release\"; id: string; workspaceName: string; sessionId: string }\n\t| { type: \"lease_rekey\"; id: string; workspaceName: string; oldSessionId: string; newSessionId: string }\n\t| ({ type: \"pair_request\"; id: string; workspaceName?: string } & ControlAccessSelection) // progress arrives as pairing_progress events\n\t| { type: \"pair_cancel\"; id: string; requestId: string }\n\t| { type: \"clients_list\"; id: string }\n\t| ({\n\t\t\ttype: \"client_access_update\";\n\t\t\tid: string;\n\t\t\tclientNodeId: string;\n\t\t\texpectedRevision: number;\n\t } & ControlAccessSelection)\n\t| { type: \"client_revoke\"; id: string; clientNodeId: string }\n\t| { type: \"client_approve_repair\"; id: string; clientNodeId: string }\n\t| { type: \"workspace_register\"; id: string; name: string; path: string }\n\t| { type: \"workspace_unregister\"; id: string; name: string }\n\t| {\n\t\t\ttype: \"worktree_create\";\n\t\t\tid: string;\n\t\t\tworkspaceName: string;\n\t\t\tworktreeName?: string;\n\t\t\tbranch?: string;\n\t\t\tbaseRef?: string;\n\t }\n\t| {\n\t\t\ttype: \"worktree_adopt\";\n\t\t\tid: string;\n\t\t\tworkspaceName: string;\n\t\t\tpath: string;\n\t\t\tworktreeName?: string;\n\t\t\tbaseRef?: string;\n\t }\n\t| { type: \"worktree_list\"; id: string; workspaceName?: string }\n\t| { type: \"worktree_remove\"; id: string; workspaceName: string; worktreeId: string; force?: boolean }\n\t| { type: \"worktree_prune\"; id: string; workspaceName?: string }\n\t/** Resolve a filesystem path to the daemon-managed worktree containing it. */\n\t| { type: \"worktree_resolve\"; id: string; path: string }\n\t/** Bind a session id to a worktree (TUI-created worktree sessions). */\n\t| { type: \"worktree_bind\"; id: string; workspaceName: string; worktreeId: string; sessionId: string }\n\t| { type: \"theme_set\"; id: string; theme: string } // name; daemon resolves + broadcasts\n\t| { type: \"keep_awake_set\"; id: string; enabled: boolean } // hold/release the host sleep-prevention assertion\n\t| { type: \"viewer_subscribe\"; id: string; viewerFeedId: string }\n\t| { type: \"viewer_unsubscribe\"; id: string; viewerFeedId: string }\n\t| { type: \"viewer_abort\"; id: string; viewerFeedId: string }\n\t| {\n\t\t\ttype: \"relay_rpc\";\n\t\t\tid: string;\n\t\t\t/** Active relay whose phone command is being forwarded. */\n\t\t\trelayId: string;\n\t\t\t/** paired phone client the relayed conversation belongs to */\n\t\t\tclientNodeId: string;\n\t\t\tworkspaceName: string;\n\t\t\t/** the TUI's current session id for the relayed conversation */\n\t\t\tsessionId: string;\n\t\t\t/**\n\t\t\t * Verbatim phone RPC command forwarded from a TUI-owned conversation.\n\t\t\t * The daemon executes it against its real state (push targets, live\n\t\t\t * activities, workspace registry) and returns the RPC response in\n\t\t\t * relay_rpc_result.\n\t\t\t */\n\t\t\tcommand: Record<string, unknown> & { type: string };\n\t }\n\t| {\n\t\t\ttype: \"relay_notification_delivery\";\n\t\t\tid: string;\n\t\t\t/** paired phone client the relayed conversation belongs to */\n\t\t\tclientNodeId: string;\n\t\t\tworkspaceName: string;\n\t\t\t/** the TUI's current session id for the relayed conversation */\n\t\t\tsessionId: string;\n\t\t\tnotification: IrohRemotePushNotificationIntent;\n\t }\n\t| {\n\t\t\ttype: \"relay_live_activity_delivery\";\n\t\t\tid: string;\n\t\t\t/** paired phone client the relayed conversation belongs to */\n\t\t\tclientNodeId: string;\n\t\t\tworkspaceName: string;\n\t\t\t/** the TUI's current session id for the relayed conversation */\n\t\t\tsessionId: string;\n\t\t\tupdate: IrohRemoteLiveActivityUpdateIntent;\n\t };\n\n/** RPC command types the daemon executes on behalf of a TUI relay. */\nexport const RELAY_RPC_COMMAND_TYPES: ReadonlySet<string> = new Set([\n\t\"register_push_target\",\n\t\"register_live_activity\",\n\t\"unregister_live_activity\",\n\t\"unregister_workspace\",\n\t// worktrees.v1: create/list only — remove_worktree is management-stream-only.\n\t\"create_worktree\",\n\t\"list_worktrees\",\n\t\"set_keep_awake\",\n\t\"get_keep_awake\",\n\t\"set_web_search_key\",\n\t\"get_web_search_status\",\n]);\n\n/** Host keep-awake assertion state as reported over the control plane. */\nexport interface ControlKeepAwakeStatus {\n\t/** Desired (persisted) state. */\n\tenabled: boolean;\n\t/** Actual state; `degraded` means enabled but the assertion is not held. */\n\tstate: \"disabled\" | \"active\" | \"degraded\";\n\tmethod?: string;\n\treason?: string;\n}\n\nexport interface ControlLeaseStatus {\n\tworkspaceName: string;\n\tsessionId: string;\n\tstate: LeaseState;\n\trelayCount: number;\n\tstreamCount: number;\n}\n\nexport interface ControlWorkspaceStatus {\n\tname: string;\n\tpath: string;\n\t/** Workspace-specific headless tool grant, when configured. */\n\tallowedTools?: string[];\n}\n\n/**\n * Worktree status over the LOCAL control socket. Unlike the iroh wire, the\n * control plane is trusted (same user), so checkout paths are included for\n * display.\n */\nexport interface ControlWorktreeStatus {\n\tid: string;\n\tworkspaceName: string;\n\tpath: string;\n\tbranch: string;\n\tbaseRef?: string;\n\tcreatedAt: number;\n\tsessionIds: string[];\n\tavailable?: boolean;\n\tdirty?: boolean;\n\t/** Branch commits vs the base ref (merge-back guidance). */\n\taheadBehind?: { ahead: number; behind: number };\n}\n\nexport interface ControlClientStatus {\n\tclientNodeId: string;\n\tlabel?: string;\n\tpairedAtMs: number;\n\t/** Added to protocol v1 after launch; absent on older running daemons. */\n\tlastSeenAtMs?: number;\n\t/** Persisted headless tool grant for this paired device. */\n\tallowedTools?: string[];\n\trpcGrant?: IrohRemoteRpcGrant;\n}\n\nexport interface ControlRevokedClientStatus {\n\tclientNodeId: string;\n\tlabel?: string;\n\tpairedAtMs: number;\n\tlastSeenAtMs?: number;\n\trevokedAtMs: number;\n\t/** Present after the desktop explicitly allows this identity to use a fresh pairing ticket. */\n\trePairApprovedAtMs?: number;\n\trpcGrant?: IrohRemoteRpcGrant;\n}\n\nexport interface DaemonRemotePolicyStatus {\n\t/** Daemon-wide override; null delegates to workspace and device grants. */\n\tallowTools: string[] | null;\n\t/** Retention window for idle, detached daemon-owned runtimes. */\n\tdetachedRuntimeTtlMs: number;\n}\n\nexport type ControlResponse =\n\t| { type: \"ok\"; id: string }\n\t| { type: \"error\"; id: string; code: string; message: string }\n\t| { type: \"lease_granted\"; id: string; workspaceName: string; sessionId: string; handoff: \"cold\" | \"warm\" | \"none\" }\n\t| { type: \"lease_pending\"; id: string; viewerFeedId: string }\n\t// lease_pending is provisional; the terminal response for the same id arrives\n\t// when the drain completes (lease_granted) or fails (error{drain_failed})\n\t| { type: \"lease_denied\"; id: string; reason: \"held_by_tui\" | \"force_unsupported\" | \"draining_elsewhere\" }\n\t| {\n\t\t\ttype: \"status_result\";\n\t\t\tid: string;\n\t\t\tversion: string;\n\t\t\tprotocolVersion: number;\n\t\t\tpid: number;\n\t\t\tstartedAtMs: number;\n\t\t\t/** Optional feature flags for protocol-v1 additions. */\n\t\t\tcapabilities?: string[];\n\t\t\tleases: ControlLeaseStatus[];\n\t\t\tphoneConnections: number;\n\t\t\tworkspaces: ControlWorkspaceStatus[];\n\t\t\tclients: ControlClientStatus[];\n\t\t\t/** Revoked identities retained for explicit repair approval; absent on older running daemons. */\n\t\t\trevokedClients?: ControlRevokedClientStatus[];\n\t\t\t/** Added to protocol v1 after launch; absent on older running daemons. */\n\t\t\tremotePolicy?: DaemonRemotePolicyStatus;\n\t\t\tkeepAwake: ControlKeepAwakeStatus;\n\t }\n\t| { type: \"keep_awake_result\"; id: string; keepAwake: ControlKeepAwakeStatus }\n\t| { type: \"clients_result\"; id: string; clients: ControlClientStatus[] }\n\t| { type: \"client_access_updated\"; id: string; client: ControlClientStatus }\n\t| { type: \"worktree_result\"; id: string; worktree: ControlWorktreeStatus }\n\t| { type: \"worktrees_result\"; id: string; worktrees: ControlWorktreeStatus[] }\n\t| {\n\t\t\ttype: \"worktree_resolve_result\";\n\t\t\tid: string;\n\t\t\t/** Parent workspace the worktree belongs to. */\n\t\t\tworkspaceName: string;\n\t\t\t/** Parent workspace checkout path (control plane is local/trusted). */\n\t\t\tworkspacePath: string;\n\t\t\tworktreeId: string;\n\t\t\tworktreePath: string;\n\t }\n\t| {\n\t\t\ttype: \"worktree_prune_result\";\n\t\t\tid: string;\n\t\t\tresults: Array<{ workspaceName: string; removedRecords: string[]; orphanCheckouts: string[] }>;\n\t }\n\t| { type: \"pair_started\"; id: string; requestId: string }\n\t| {\n\t\t\ttype: \"relay_rpc_result\";\n\t\t\tid: string;\n\t\t\t/** verbatim RPC response object for the TUI to forward to the phone */\n\t\t\tresponse: Record<string, unknown>;\n\t\t\t/** refreshed workspace metadata after a successful unregister_workspace */\n\t\t\tworkspaceMetadata?: { workspaceNames: string[]; workspaces: Array<{ name: string; status: string }> };\n\t }\n\t| { type: \"relay_push_delivery_result\"; id: string; status: IrohRemotePushNotificationDeliveryStatus };\n\n// ============================================================================\n// Unsolicited events (daemon -> control clients)\n// ============================================================================\n\nexport type RelayCloseReason =\n\t| \"phone_disconnected\"\n\t| \"tui_disconnected\"\n\t| \"lease_transferred\"\n\t| \"session_rekeyed_reconnect\"\n\t| \"workspace_unregistered\"\n\t| \"host_shutdown\"\n\t| \"error\";\n\nexport type ControlEvent =\n\t| {\n\t\t\ttype: \"relay_offer\";\n\t\t\trelayId: string;\n\t\t\t/** single-use, 10s expiry */\n\t\t\trelayToken: string;\n\t\t\tworkspaceName: string;\n\t\t\tsessionId: string;\n\t\t\tclientNodeId: string;\n\t\t\tconnectionId: string;\n\t\t\tstreamId: string;\n\t }\n\t| { type: \"relay_closed\"; relayId: string; reason: RelayCloseReason }\n\t| {\n\t\t\ttype: \"viewer_event\";\n\t\t\tviewerFeedId: string;\n\t\t\tseq: number;\n\t\t\t/** AgentSessionEvent JSON, or {kind:\"truncated\"} when the buffer overflowed */\n\t\t\tevent: unknown;\n\t }\n\t| { type: \"viewer_end\"; viewerFeedId: string; reason: \"granted\" | \"cancelled\" | \"error\" }\n\t| { type: \"theme_snapshot\"; themeName: string; tokens: Record<string, string> }\n\t| { type: \"keep_awake_changed\"; keepAwake: ControlKeepAwakeStatus }\n\t| {\n\t\t\ttype: \"pairing_progress\";\n\t\t\trequestId: string;\n\t\t\tphase: \"ticket\" | \"qr\" | \"waiting\" | \"completed\" | \"failed\";\n\t\t\tticket?: string;\n\t\t\tqrLines?: string[];\n\t\t\tclientNodeId?: string;\n\t\t\terror?: string;\n\t }\n\t| { type: \"daemon_shutdown\" };\n\nexport interface ControlFatal {\n\ttype: \"fatal\";\n\terror: string;\n}\n\nexport type ControlMessage = HelloMessage | HelloAck | ControlRequest | ControlResponse | ControlEvent | ControlFatal;\n\n/** One JSONL relay preamble line follows a successful relay hello_ack. */\nexport interface RelayPreamble {\n\ttype: \"relay_preamble\";\n\trelayId: string;\n\t/** verbatim phone handshake JSON as received (parsed object, re-serialized) */\n\thandshake: unknown;\n\t/** authorization subset — everything the TUI needs to serve the stream */\n\tauthorization: {\n\t\tclientNodeId: string;\n\t\tworkspaceName: string;\n\t\tworkspacePath: string;\n\t\t/** Headless agent tool grant, carried for visibility; TUI-owned sessions retain their full local tools. */\n\t\tallowedTools: string;\n\t\trpcGrant: IrohRemoteRpcGrant;\n\t\t/** Present when the conversation is bound to a daemon-managed worktree. */\n\t\tworktreeId?: string;\n\t\t/** Worktree checkout path — the TUI sanitizes with this as the root. */\n\t\tworktreePath?: string;\n\t\t/** Registered-workspace-relative git source root for nested repo worktrees. */\n\t\tworktreeSourceRootRelativePath?: string;\n\t};\n\t/**\n\t * The daemon's Iroh node id: the TUI writes it into the handshake response\n\t * so the phone's saved-host identity verification passes over the relay.\n\t */\n\thostNodeId?: string;\n\trelayMode?: \"disabled\" | \"development\" | \"production\";\n\trelayUrls?: string[];\n\tconnectionId: string;\n\tstreamId: string;\n\tresolvedTarget: {\n\t\tsessionId: string;\n\t\tsessionFilePath?: string;\n\t\tselection: \"created\" | \"created_after_missing\" | \"resumed\";\n\t\trequestedSessionId?: string;\n\t\tworkspaceName: string;\n\t\tworkspacePath: string;\n\t\tworktreeId?: string;\n\t\t/** POSIX-style path relative to the registered workspace root. */\n\t\tworkingDirectory?: string;\n\t};\n}\n\n// ============================================================================\n// Framing\n// ============================================================================\n\nexport function encodeControlLine(message: object): Buffer {\n\treturn Buffer.from(`${JSON.stringify(message)}\\n`, \"utf8\");\n}\n\nexport class ControlFrameTooLargeError extends Error {\n\tconstructor(byteLength: number) {\n\t\tsuper(`control frame of ${byteLength} bytes exceeds the ${CONTROL_MAX_LINE_BYTES} byte cap`);\n\t\tthis.name = \"ControlFrameTooLargeError\";\n\t}\n}\n\n/**\n * Incremental JSONL decoder with the 8 MiB line cap. Feed raw socket chunks;\n * complete lines come back parsed. Throws ControlFrameTooLargeError when the\n * buffered partial line exceeds the cap (callers must close the connection).\n */\nexport class ControlLineDecoder {\n\tprivate buffered: Buffer = Buffer.alloc(0);\n\n\tpush(chunk: Buffer): unknown[] {\n\t\tthis.buffered = this.buffered.length === 0 ? Buffer.from(chunk) : Buffer.concat([this.buffered, chunk]);\n\t\tconst messages: unknown[] = [];\n\t\twhile (true) {\n\t\t\tconst newlineIndex = this.buffered.indexOf(0x0a);\n\t\t\tif (newlineIndex === -1) {\n\t\t\t\tif (this.buffered.length > CONTROL_MAX_LINE_BYTES) {\n\t\t\t\t\tthrow new ControlFrameTooLargeError(this.buffered.length);\n\t\t\t\t}\n\t\t\t\treturn messages;\n\t\t\t}\n\t\t\tif (newlineIndex > CONTROL_MAX_LINE_BYTES) {\n\t\t\t\tthrow new ControlFrameTooLargeError(newlineIndex);\n\t\t\t}\n\t\t\tconst line = this.buffered.subarray(0, newlineIndex).toString(\"utf8\");\n\t\t\tthis.buffered = this.buffered.subarray(newlineIndex + 1);\n\t\t\tif (line.trim().length === 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tmessages.push(JSON.parse(line));\n\t\t}\n\t}\n\n\t/**\n\t * Parse complete lines one at a time, invoking handle per message. When\n\t * handle returns \"stop\" (relay handoff), decoding halts immediately and any\n\t * bytes past the consumed line stay buffered for drainRemainder(). Unlike\n\t * push(), bytes arriving after a stop are never JSON-decoded — required for\n\t * relay hellos, where everything after the hello line is opaque payload.\n\t */\n\tpushEach(chunk: Buffer, handle: (message: unknown) => \"continue\" | \"stop\"): void {\n\t\tthis.buffered = this.buffered.length === 0 ? Buffer.from(chunk) : Buffer.concat([this.buffered, chunk]);\n\t\twhile (true) {\n\t\t\tconst newlineIndex = this.buffered.indexOf(0x0a);\n\t\t\tif (newlineIndex === -1) {\n\t\t\t\tif (this.buffered.length > CONTROL_MAX_LINE_BYTES) {\n\t\t\t\t\tthrow new ControlFrameTooLargeError(this.buffered.length);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (newlineIndex > CONTROL_MAX_LINE_BYTES) {\n\t\t\t\tthrow new ControlFrameTooLargeError(newlineIndex);\n\t\t\t}\n\t\t\tconst line = this.buffered.subarray(0, newlineIndex).toString(\"utf8\");\n\t\t\tthis.buffered = this.buffered.subarray(newlineIndex + 1);\n\t\t\tif (line.trim().length === 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (handle(JSON.parse(line)) === \"stop\") {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\t/** Bytes buffered past the last complete line (used when switching a relay conn to raw mode). */\n\tdrainRemainder(): Buffer {\n\t\tconst remainder = this.buffered;\n\t\tthis.buffered = Buffer.alloc(0);\n\t\treturn remainder;\n\t}\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction isOptionalString(value: unknown): boolean {\n\treturn value === undefined || typeof value === \"string\";\n}\n\nfunction isOptionalNumber(value: unknown): boolean {\n\treturn value === undefined || typeof value === \"number\";\n}\n\nfunction isControlAccessSelection(value: Record<string, unknown>, allowDefault: boolean): boolean {\n\tif (value.access !== undefined) {\n\t\treturn (\n\t\t\tisIrohRemoteAccessPresetName(value.access) &&\n\t\t\tvalue.allowedTools === undefined &&\n\t\t\tvalue.rpcCapabilities === undefined\n\t\t);\n\t}\n\tif (value.allowedTools === undefined && value.rpcCapabilities === undefined) {\n\t\treturn allowDefault;\n\t}\n\tif (!Array.isArray(value.allowedTools) || !value.allowedTools.every((entry) => typeof entry === \"string\")) {\n\t\treturn false;\n\t}\n\ttry {\n\t\tparseIrohRemoteRpcCapabilities(value.rpcCapabilities);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction isPushDeliveryStatus(value: unknown): value is IrohRemotePushNotificationDeliveryStatus {\n\treturn (\n\t\tvalue === \"sent\" ||\n\t\tvalue === \"no_push_target\" ||\n\t\tvalue === \"duplicate\" ||\n\t\tvalue === \"failed\" ||\n\t\tvalue === \"invalid_target\"\n\t);\n}\n\nfunction isLiveActivityToolGlyph(value: unknown): boolean {\n\treturn (\n\t\tisRecord(value) &&\n\t\ttypeof value.name === \"string\" &&\n\t\ttypeof value.symbolName === \"string\" &&\n\t\t(value.status === \"started\" || value.status === \"completed\" || value.status === \"failed\")\n\t);\n}\n\nfunction isLiveActivityContentState(value: unknown): boolean {\n\treturn (\n\t\tisRecord(value) &&\n\t\t(value.status === \"running\" ||\n\t\t\tvalue.status === \"completed\" ||\n\t\t\tvalue.status === \"failed\" ||\n\t\t\tvalue.status === \"waiting\") &&\n\t\ttypeof value.statusText === \"string\" &&\n\t\t(value.currentTool === undefined || isLiveActivityToolGlyph(value.currentTool)) &&\n\t\tArray.isArray(value.recentTools) &&\n\t\tvalue.recentTools.every(isLiveActivityToolGlyph) &&\n\t\tisOptionalString(value.sessionID) &&\n\t\tisOptionalString(value.workspaceName) &&\n\t\ttypeof value.updatedAtEpochSeconds === \"number\"\n\t);\n}\n\nfunction isPushNotificationIntent(value: unknown): value is IrohRemotePushNotificationIntent {\n\treturn (\n\t\tisRecord(value) &&\n\t\ttypeof value.eventId === \"string\" &&\n\t\ttypeof value.kind === \"string\" &&\n\t\ttypeof value.title === \"string\" &&\n\t\ttypeof value.body === \"string\" &&\n\t\tisOptionalString(value.sessionId) &&\n\t\tisOptionalString(value.workspace)\n\t);\n}\n\nfunction isLiveActivityUpdateIntent(value: unknown): value is IrohRemoteLiveActivityUpdateIntent {\n\treturn (\n\t\tisRecord(value) &&\n\t\ttypeof value.eventId === \"string\" &&\n\t\ttypeof value.kind === \"string\" &&\n\t\t(value.activityEvent === undefined || value.activityEvent === \"update\" || value.activityEvent === \"end\") &&\n\t\tisLiveActivityContentState(value.contentState) &&\n\t\tisOptionalNumber(value.staleDateEpochSeconds) &&\n\t\tisOptionalNumber(value.dismissalDateEpochSeconds)\n\t);\n}\n\nexport function parseHelloMessage(value: unknown): HelloMessage | undefined {\n\tif (!isRecord(value) || value.type !== \"hello\") {\n\t\treturn undefined;\n\t}\n\tif (typeof value.protocolVersion !== \"number\") {\n\t\treturn undefined;\n\t}\n\tif (value.role === \"control\") {\n\t\tif (\n\t\t\ttypeof value.pid !== \"number\" ||\n\t\t\ttypeof value.version !== \"string\" ||\n\t\t\t(value.client !== \"tui\" && value.client !== \"cli\")\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\t\tif (\n\t\t\tvalue.capabilities !== undefined &&\n\t\t\t(!Array.isArray(value.capabilities) || !value.capabilities.every((entry) => typeof entry === \"string\"))\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\t\tif (value.controlToken !== undefined && typeof value.controlToken !== \"string\") {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn {\n\t\t\ttype: \"hello\",\n\t\t\trole: \"control\",\n\t\t\tprotocolVersion: value.protocolVersion,\n\t\t\tpid: value.pid,\n\t\t\tversion: value.version,\n\t\t\tclient: value.client,\n\t\t\t...(value.controlToken === undefined ? {} : { controlToken: value.controlToken }),\n\t\t\t...(value.capabilities === undefined ? {} : { capabilities: value.capabilities as string[] }),\n\t\t};\n\t}\n\tif (value.role === \"relay\") {\n\t\tif (typeof value.relayId !== \"string\" || typeof value.relayToken !== \"string\") {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn {\n\t\t\ttype: \"hello\",\n\t\t\trole: \"relay\",\n\t\t\tprotocolVersion: value.protocolVersion,\n\t\t\trelayId: value.relayId,\n\t\t\trelayToken: value.relayToken,\n\t\t};\n\t}\n\treturn undefined;\n}\n\nexport function isControlRequest(value: unknown): value is ControlRequest {\n\tif (!isRecord(value) || typeof value.type !== \"string\" || typeof value.id !== \"string\") {\n\t\treturn false;\n\t}\n\tswitch (value.type) {\n\t\tcase \"status\":\n\t\tcase \"shutdown\":\n\t\tcase \"clients_list\":\n\t\t\treturn true;\n\t\tcase \"pair_request\":\n\t\t\treturn (\n\t\t\t\t(value.workspaceName === undefined || typeof value.workspaceName === \"string\") &&\n\t\t\t\tisControlAccessSelection(value, true)\n\t\t\t);\n\t\tcase \"lease_acquire\":\n\t\tcase \"lease_release\":\n\t\t\treturn typeof value.workspaceName === \"string\" && typeof value.sessionId === \"string\";\n\t\tcase \"lease_rekey\":\n\t\t\treturn (\n\t\t\t\ttypeof value.workspaceName === \"string\" &&\n\t\t\t\ttypeof value.oldSessionId === \"string\" &&\n\t\t\t\ttypeof value.newSessionId === \"string\"\n\t\t\t);\n\t\tcase \"pair_cancel\":\n\t\t\treturn typeof value.requestId === \"string\";\n\t\tcase \"client_access_update\":\n\t\t\treturn (\n\t\t\t\ttypeof value.clientNodeId === \"string\" &&\n\t\t\t\ttypeof value.expectedRevision === \"number\" &&\n\t\t\t\tNumber.isSafeInteger(value.expectedRevision) &&\n\t\t\t\tvalue.expectedRevision >= 1 &&\n\t\t\t\tisControlAccessSelection(value, false)\n\t\t\t);\n\t\tcase \"client_revoke\":\n\t\tcase \"client_approve_repair\":\n\t\t\treturn typeof value.clientNodeId === \"string\";\n\t\tcase \"workspace_register\":\n\t\t\treturn typeof value.name === \"string\" && typeof value.path === \"string\";\n\t\tcase \"workspace_unregister\":\n\t\t\treturn typeof value.name === \"string\";\n\t\tcase \"worktree_create\":\n\t\t\treturn (\n\t\t\t\ttypeof value.workspaceName === \"string\" &&\n\t\t\t\t(value.worktreeName === undefined || typeof value.worktreeName === \"string\") &&\n\t\t\t\t(value.branch === undefined || typeof value.branch === \"string\") &&\n\t\t\t\t(value.baseRef === undefined || typeof value.baseRef === \"string\")\n\t\t\t);\n\t\tcase \"worktree_adopt\":\n\t\t\treturn (\n\t\t\t\ttypeof value.workspaceName === \"string\" &&\n\t\t\t\ttypeof value.path === \"string\" &&\n\t\t\t\t(value.worktreeName === undefined || typeof value.worktreeName === \"string\") &&\n\t\t\t\t(value.baseRef === undefined || typeof value.baseRef === \"string\")\n\t\t\t);\n\t\tcase \"worktree_list\":\n\t\tcase \"worktree_prune\":\n\t\t\treturn value.workspaceName === undefined || typeof value.workspaceName === \"string\";\n\t\tcase \"worktree_remove\":\n\t\t\treturn (\n\t\t\t\ttypeof value.workspaceName === \"string\" &&\n\t\t\t\ttypeof value.worktreeId === \"string\" &&\n\t\t\t\t(value.force === undefined || typeof value.force === \"boolean\")\n\t\t\t);\n\t\tcase \"worktree_resolve\":\n\t\t\treturn typeof value.path === \"string\";\n\t\tcase \"worktree_bind\":\n\t\t\treturn (\n\t\t\t\ttypeof value.workspaceName === \"string\" &&\n\t\t\t\ttypeof value.worktreeId === \"string\" &&\n\t\t\t\ttypeof value.sessionId === \"string\"\n\t\t\t);\n\t\tcase \"theme_set\":\n\t\t\treturn typeof value.theme === \"string\";\n\t\tcase \"keep_awake_set\":\n\t\t\treturn typeof value.enabled === \"boolean\";\n\t\tcase \"viewer_subscribe\":\n\t\tcase \"viewer_unsubscribe\":\n\t\tcase \"viewer_abort\":\n\t\t\treturn typeof value.viewerFeedId === \"string\";\n\t\tcase \"relay_rpc\":\n\t\t\treturn (\n\t\t\t\ttypeof value.relayId === \"string\" &&\n\t\t\t\ttypeof value.clientNodeId === \"string\" &&\n\t\t\t\ttypeof value.workspaceName === \"string\" &&\n\t\t\t\ttypeof value.sessionId === \"string\" &&\n\t\t\t\tisRecord(value.command) &&\n\t\t\t\ttypeof value.command.type === \"string\"\n\t\t\t);\n\t\tcase \"relay_notification_delivery\":\n\t\t\treturn (\n\t\t\t\ttypeof value.clientNodeId === \"string\" &&\n\t\t\t\ttypeof value.workspaceName === \"string\" &&\n\t\t\t\ttypeof value.sessionId === \"string\" &&\n\t\t\t\tisPushNotificationIntent(value.notification)\n\t\t\t);\n\t\tcase \"relay_live_activity_delivery\":\n\t\t\treturn (\n\t\t\t\ttypeof value.clientNodeId === \"string\" &&\n\t\t\t\ttypeof value.workspaceName === \"string\" &&\n\t\t\t\ttypeof value.sessionId === \"string\" &&\n\t\t\t\tisLiveActivityUpdateIntent(value.update)\n\t\t\t);\n\t\tdefault:\n\t\t\treturn false;\n\t}\n}\n\nexport function isControlResponse(value: unknown): value is ControlResponse {\n\tif (!isRecord(value) || typeof value.type !== \"string\" || typeof value.id !== \"string\") {\n\t\treturn false;\n\t}\n\tswitch (value.type) {\n\t\tcase \"ok\":\n\t\tcase \"error\":\n\t\tcase \"lease_granted\":\n\t\tcase \"lease_pending\":\n\t\tcase \"lease_denied\":\n\t\tcase \"status_result\":\n\t\tcase \"clients_result\":\n\t\tcase \"client_access_updated\":\n\t\tcase \"pair_started\":\n\t\t\treturn true;\n\t\tcase \"worktree_result\":\n\t\t\treturn isRecord(value.worktree);\n\t\tcase \"worktrees_result\":\n\t\t\treturn Array.isArray(value.worktrees);\n\t\tcase \"worktree_prune_result\":\n\t\t\treturn Array.isArray(value.results);\n\t\tcase \"worktree_resolve_result\":\n\t\t\treturn (\n\t\t\t\ttypeof value.workspaceName === \"string\" &&\n\t\t\t\ttypeof value.workspacePath === \"string\" &&\n\t\t\t\ttypeof value.worktreeId === \"string\" &&\n\t\t\t\ttypeof value.worktreePath === \"string\"\n\t\t\t);\n\t\tcase \"keep_awake_result\":\n\t\t\treturn isRecord(value.keepAwake);\n\t\tcase \"relay_rpc_result\":\n\t\t\treturn isRecord(value.response);\n\t\tcase \"relay_push_delivery_result\":\n\t\t\treturn isPushDeliveryStatus(value.status);\n\t\tdefault:\n\t\t\treturn false;\n\t}\n}\n\nexport function isControlEvent(value: unknown): value is ControlEvent {\n\tif (!isRecord(value) || typeof value.type !== \"string\") {\n\t\treturn false;\n\t}\n\tswitch (value.type) {\n\t\tcase \"relay_offer\":\n\t\tcase \"relay_closed\":\n\t\tcase \"viewer_event\":\n\t\tcase \"viewer_end\":\n\t\tcase \"theme_snapshot\":\n\t\tcase \"pairing_progress\":\n\t\tcase \"daemon_shutdown\":\n\t\t\treturn true;\n\t\tcase \"keep_awake_changed\":\n\t\t\treturn isRecord(value.keepAwake);\n\t\tdefault:\n\t\t\treturn false;\n\t}\n}\n\nexport function isHelloAck(value: unknown): value is HelloAck {\n\treturn isRecord(value) && value.type === \"hello_ack\" && typeof value.ok === \"boolean\";\n}\n\nexport function isRelayPreamble(value: unknown): value is RelayPreamble {\n\tif (\n\t\t!isRecord(value) ||\n\t\tvalue.type !== \"relay_preamble\" ||\n\t\ttypeof value.relayId !== \"string\" ||\n\t\t!isRecord(value.authorization) ||\n\t\t!isRecord(value.resolvedTarget)\n\t) {\n\t\treturn false;\n\t}\n\ttry {\n\t\tif (typeof value.authorization.allowedTools !== \"string\") {\n\t\t\treturn false;\n\t\t}\n\t\tparseIrohRemoteRpcGrant(value.authorization.rpcGrant, \"relay rpcGrant\");\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n"]}
|