@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,1217 @@
|
|
|
1
|
+
import { isAbsolute, relative, resolve } from "node:path";
|
|
2
|
+
import { getKeybindings, truncateToWidth, visibleWidth, wrapTextWithAnsi } from "@hansjm10/volt-tui";
|
|
3
|
+
import { getAgentDir, VERSION } from "../../../config.js";
|
|
4
|
+
import { IROH_REMOTE_ACCESS_PRESET_NAMES, isIrohRemoteAccessPresetName, } from "../../../core/remote/iroh/access-grant.js";
|
|
5
|
+
import { formatIrohRemoteTicketQrCode } from "../../../core/remote/iroh/qr.js";
|
|
6
|
+
import { getIrohRemotePairingVerificationDetails } from "../../../core/remote/iroh/ticket.js";
|
|
7
|
+
import { theme } from "../../../core/theme/runtime.js";
|
|
8
|
+
import { createDaemonClient } from "../../../daemon/control-client.js";
|
|
9
|
+
import { CONTROL_PAIR_CANCEL_CAPABILITY, CONTROL_RPC_GRANTS_CAPABILITY, } from "../../../daemon/control-protocol.js";
|
|
10
|
+
import { ensureDaemonRunning, probeDaemon, waitForDaemonExit } from "../../../daemon/spawn.js";
|
|
11
|
+
import { findRecoverableVoltdStateBackup, inspectVoltdStateFiles, recoverVoltdStateFromBackup, regenerateInvalidVoltdState, } from "../../../daemon/state.js";
|
|
12
|
+
import { DEFAULT_INTEGRATED_DETACHED_RUNTIME_TTL_MS } from "../../../remote/integrated-runtime-retention.js";
|
|
13
|
+
import { stripAnsi } from "../../../utils/ansi.js";
|
|
14
|
+
import { resolveDaemonWorkspaceForCwd } from "../daemon-attach.js";
|
|
15
|
+
import { DynamicBorder } from "./dynamic-border.js";
|
|
16
|
+
import { keyHint } from "./keybinding-hints.js";
|
|
17
|
+
export class RemoteControlRequestError extends Error {
|
|
18
|
+
code;
|
|
19
|
+
constructor(code, message) {
|
|
20
|
+
super(message);
|
|
21
|
+
this.name = "RemoteControlRequestError";
|
|
22
|
+
this.code = code;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const UNSAFE_TERMINAL_CHARACTERS = /[\u0000-\u001f\u007f-\u009f\u202a-\u202e\u2066-\u2069]/g;
|
|
26
|
+
/**
|
|
27
|
+
* A management-only daemon client. It never acquires or releases a conversation
|
|
28
|
+
* lease, so opening and closing /remote cannot transfer ownership of the active
|
|
29
|
+
* session.
|
|
30
|
+
*/
|
|
31
|
+
export function createRemoteControlBackend(agentDir = getAgentDir()) {
|
|
32
|
+
let client;
|
|
33
|
+
const eventHandlers = new Set();
|
|
34
|
+
const pendingPairingRequestIds = new Set();
|
|
35
|
+
const pairingCancellations = new Map();
|
|
36
|
+
const cancelPairing = (active, requestId) => {
|
|
37
|
+
const existing = pairingCancellations.get(requestId);
|
|
38
|
+
if (existing)
|
|
39
|
+
return existing;
|
|
40
|
+
if (!pendingPairingRequestIds.has(requestId))
|
|
41
|
+
return Promise.resolve();
|
|
42
|
+
const cancellation = (async () => {
|
|
43
|
+
try {
|
|
44
|
+
if (active.connectionState === "connected") {
|
|
45
|
+
const response = await active.request({ type: "pair_cancel", requestId });
|
|
46
|
+
if (response.type === "error")
|
|
47
|
+
throw new Error(response.message);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
// A current daemon also invalidates tickets when the owning control connection closes.
|
|
52
|
+
await active.close().catch(() => { });
|
|
53
|
+
}
|
|
54
|
+
finally {
|
|
55
|
+
pendingPairingRequestIds.delete(requestId);
|
|
56
|
+
pairingCancellations.delete(requestId);
|
|
57
|
+
}
|
|
58
|
+
})();
|
|
59
|
+
pairingCancellations.set(requestId, cancellation);
|
|
60
|
+
return cancellation;
|
|
61
|
+
};
|
|
62
|
+
const closeClient = async () => {
|
|
63
|
+
const active = client;
|
|
64
|
+
client = undefined;
|
|
65
|
+
if (active) {
|
|
66
|
+
await Promise.all([...pendingPairingRequestIds].map((requestId) => cancelPairing(active, requestId)));
|
|
67
|
+
}
|
|
68
|
+
pendingPairingRequestIds.clear();
|
|
69
|
+
pairingCancellations.clear();
|
|
70
|
+
await active?.close();
|
|
71
|
+
};
|
|
72
|
+
const connect = async () => {
|
|
73
|
+
if (client?.connectionState === "connected")
|
|
74
|
+
return client;
|
|
75
|
+
await closeClient();
|
|
76
|
+
const probe = await probeDaemon(agentDir);
|
|
77
|
+
if (!probe.healthy)
|
|
78
|
+
throw new Error(`voltd is ${probe.state}`);
|
|
79
|
+
const connected = createDaemonClient({
|
|
80
|
+
socketPath: probe.socketPath,
|
|
81
|
+
authToken: probe.authToken,
|
|
82
|
+
client: "cli",
|
|
83
|
+
version: VERSION,
|
|
84
|
+
reconnect: false,
|
|
85
|
+
onEvent: (event) => {
|
|
86
|
+
for (const handler of eventHandlers)
|
|
87
|
+
handler(event);
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
client = connected;
|
|
91
|
+
try {
|
|
92
|
+
await connected.connect();
|
|
93
|
+
return connected;
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
await closeClient();
|
|
97
|
+
throw error;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
return {
|
|
101
|
+
async load() {
|
|
102
|
+
const probe = await probeDaemon(agentDir);
|
|
103
|
+
if (!probe.healthy) {
|
|
104
|
+
const invalidState = inspectVoltdStateFiles(agentDir);
|
|
105
|
+
return {
|
|
106
|
+
kind: "offline",
|
|
107
|
+
state: probe.state,
|
|
108
|
+
...(invalidState === undefined ? {} : { error: invalidState.error, invalidState }),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
try {
|
|
112
|
+
const response = await (await connect()).request({ type: "status" });
|
|
113
|
+
if (response.type === "error")
|
|
114
|
+
throw new Error(response.message);
|
|
115
|
+
if (response.type !== "status_result")
|
|
116
|
+
throw new Error(`unexpected ${response.type} response`);
|
|
117
|
+
return { kind: "online", status: response };
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
await closeClient();
|
|
121
|
+
return {
|
|
122
|
+
kind: "offline",
|
|
123
|
+
state: "unresponsive",
|
|
124
|
+
error: error instanceof Error ? error.message : String(error),
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
async startDaemon() {
|
|
129
|
+
const result = await ensureDaemonRunning(agentDir);
|
|
130
|
+
if (!result.healthy)
|
|
131
|
+
throw new Error(result.error ?? `voltd did not start (${result.state})`);
|
|
132
|
+
await closeClient();
|
|
133
|
+
},
|
|
134
|
+
async regenerateState() {
|
|
135
|
+
const probe = await probeDaemon(agentDir);
|
|
136
|
+
if (probe.healthy || probe.state !== "not-running") {
|
|
137
|
+
throw new Error(`voltd must be fully stopped before regenerating state (currently ${probe.state})`);
|
|
138
|
+
}
|
|
139
|
+
return regenerateInvalidVoltdState(agentDir);
|
|
140
|
+
},
|
|
141
|
+
async findRecoveryBackup() {
|
|
142
|
+
return findRecoverableVoltdStateBackup(agentDir);
|
|
143
|
+
},
|
|
144
|
+
async recoverStateBackup(path) {
|
|
145
|
+
const probe = await probeDaemon(agentDir);
|
|
146
|
+
if (probe.healthy) {
|
|
147
|
+
const response = await (await connect()).request({ type: "shutdown" });
|
|
148
|
+
if (response.type === "error")
|
|
149
|
+
throw new Error(response.message);
|
|
150
|
+
await closeClient();
|
|
151
|
+
const exit = await waitForDaemonExit({
|
|
152
|
+
agentDir,
|
|
153
|
+
pid: probe.pid,
|
|
154
|
+
socketPath: probe.socketPath,
|
|
155
|
+
});
|
|
156
|
+
if (exit !== "exited")
|
|
157
|
+
throw new Error("voltd did not stop before state recovery");
|
|
158
|
+
}
|
|
159
|
+
else if (probe.state !== "not-running") {
|
|
160
|
+
throw new Error(`voltd must be stopped before state recovery (currently ${probe.state})`);
|
|
161
|
+
}
|
|
162
|
+
const recovered = await recoverVoltdStateFromBackup(agentDir, path);
|
|
163
|
+
const restarted = await ensureDaemonRunning(agentDir);
|
|
164
|
+
if (!restarted.healthy) {
|
|
165
|
+
throw new Error(restarted.error ?? `voltd did not restart (${restarted.state})`);
|
|
166
|
+
}
|
|
167
|
+
return { preservedIdentity: recovered.preservedIdentity };
|
|
168
|
+
},
|
|
169
|
+
async registerCurrentWorkspace(path) {
|
|
170
|
+
const workspace = await resolveDaemonWorkspaceForCwd(await connect(), path);
|
|
171
|
+
if (!workspace)
|
|
172
|
+
throw new Error("could not register the current directory with voltd");
|
|
173
|
+
return workspace;
|
|
174
|
+
},
|
|
175
|
+
async beginPairing(workspaceName, access, onProgress) {
|
|
176
|
+
const queued = [];
|
|
177
|
+
let requestId;
|
|
178
|
+
let terminal = false;
|
|
179
|
+
const handler = (event) => {
|
|
180
|
+
if (event.type !== "pairing_progress")
|
|
181
|
+
return;
|
|
182
|
+
if (requestId === undefined) {
|
|
183
|
+
queued.push(event);
|
|
184
|
+
}
|
|
185
|
+
else if (event.requestId === requestId) {
|
|
186
|
+
if (event.phase === "completed" || event.phase === "failed") {
|
|
187
|
+
terminal = true;
|
|
188
|
+
pendingPairingRequestIds.delete(requestId);
|
|
189
|
+
}
|
|
190
|
+
onProgress(event);
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
eventHandlers.add(handler);
|
|
194
|
+
try {
|
|
195
|
+
const response = await (await connect()).request({ type: "pair_request", workspaceName, access });
|
|
196
|
+
if (response.type === "error")
|
|
197
|
+
throw new RemoteControlRequestError(response.code, response.message);
|
|
198
|
+
if (response.type !== "pair_started")
|
|
199
|
+
throw new Error(`unexpected ${response.type} response`);
|
|
200
|
+
const startedRequestId = response.requestId;
|
|
201
|
+
requestId = startedRequestId;
|
|
202
|
+
for (const event of queued) {
|
|
203
|
+
if (event.requestId !== startedRequestId)
|
|
204
|
+
continue;
|
|
205
|
+
if (event.phase === "completed" || event.phase === "failed")
|
|
206
|
+
terminal = true;
|
|
207
|
+
onProgress(event);
|
|
208
|
+
}
|
|
209
|
+
if (!terminal)
|
|
210
|
+
pendingPairingRequestIds.add(startedRequestId);
|
|
211
|
+
return {
|
|
212
|
+
requestId: startedRequestId,
|
|
213
|
+
dispose: () => {
|
|
214
|
+
eventHandlers.delete(handler);
|
|
215
|
+
if (terminal)
|
|
216
|
+
return;
|
|
217
|
+
terminal = true;
|
|
218
|
+
const activeClient = client;
|
|
219
|
+
if (activeClient)
|
|
220
|
+
void cancelPairing(activeClient, startedRequestId);
|
|
221
|
+
},
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
catch (error) {
|
|
225
|
+
eventHandlers.delete(handler);
|
|
226
|
+
throw error;
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
async revokeClient(clientNodeId) {
|
|
230
|
+
const response = await (await connect()).request({ type: "client_revoke", clientNodeId });
|
|
231
|
+
if (response.type === "error")
|
|
232
|
+
throw new Error(response.message);
|
|
233
|
+
if (response.type !== "ok")
|
|
234
|
+
throw new Error(`unexpected ${response.type} response`);
|
|
235
|
+
},
|
|
236
|
+
async approveClientRepair(clientNodeId) {
|
|
237
|
+
const response = await (await connect()).request({ type: "client_approve_repair", clientNodeId });
|
|
238
|
+
if (response.type === "error")
|
|
239
|
+
throw new Error(response.message);
|
|
240
|
+
if (response.type !== "ok")
|
|
241
|
+
throw new Error(`unexpected ${response.type} response`);
|
|
242
|
+
},
|
|
243
|
+
close: closeClient,
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
function formatDuration(ms) {
|
|
247
|
+
const seconds = Math.max(0, Math.floor(ms / 1000));
|
|
248
|
+
if (seconds < 60)
|
|
249
|
+
return `${seconds}s`;
|
|
250
|
+
const minutes = Math.floor(seconds / 60);
|
|
251
|
+
if (minutes < 60)
|
|
252
|
+
return `${minutes}m`;
|
|
253
|
+
const hours = Math.floor(minutes / 60);
|
|
254
|
+
if (hours < 48)
|
|
255
|
+
return `${hours}h ${minutes % 60}m`;
|
|
256
|
+
return `${Math.floor(hours / 24)}d ${hours % 24}h`;
|
|
257
|
+
}
|
|
258
|
+
function abbreviatedId(value, width = 12) {
|
|
259
|
+
return value.length <= width ? value : `${value.slice(0, Math.max(4, width - 1))}…`;
|
|
260
|
+
}
|
|
261
|
+
function supportsSafePairing(status) {
|
|
262
|
+
return (status.capabilities?.includes(CONTROL_PAIR_CANCEL_CAPABILITY) === true &&
|
|
263
|
+
status.capabilities.includes(CONTROL_RPC_GRANTS_CAPABILITY));
|
|
264
|
+
}
|
|
265
|
+
const ACCESS_PRESET_DETAILS = Object.freeze({
|
|
266
|
+
coding: {
|
|
267
|
+
label: "Coding",
|
|
268
|
+
description: "Coding tools plus conversation and model controls.",
|
|
269
|
+
},
|
|
270
|
+
review: {
|
|
271
|
+
label: "Review",
|
|
272
|
+
description: "Read-only tools plus conversation and model controls.",
|
|
273
|
+
},
|
|
274
|
+
chat: {
|
|
275
|
+
label: "Chat",
|
|
276
|
+
description: "Conversation and model controls without tool access.",
|
|
277
|
+
},
|
|
278
|
+
full: {
|
|
279
|
+
label: "Full access",
|
|
280
|
+
description: "Everything: API keys, log upload, host control, worktrees, and workspaces.",
|
|
281
|
+
},
|
|
282
|
+
});
|
|
283
|
+
function workspaceForPath(status, path) {
|
|
284
|
+
const currentPath = resolve(path);
|
|
285
|
+
return status.workspaces
|
|
286
|
+
.filter((workspace) => {
|
|
287
|
+
const workspacePath = resolve(workspace.path);
|
|
288
|
+
const pathFromWorkspace = relative(workspacePath, currentPath);
|
|
289
|
+
return pathFromWorkspace === "" || (!pathFromWorkspace.startsWith("..") && !isAbsolute(pathFromWorkspace));
|
|
290
|
+
})
|
|
291
|
+
.sort((left, right) => right.path.length - left.path.length)[0];
|
|
292
|
+
}
|
|
293
|
+
function policyTools(policy, fallback) {
|
|
294
|
+
if (policy.allowTools !== null)
|
|
295
|
+
return policy.allowTools.join(", ") || "none";
|
|
296
|
+
if (fallback !== undefined)
|
|
297
|
+
return fallback.join(", ") || "none";
|
|
298
|
+
return "per-device grant";
|
|
299
|
+
}
|
|
300
|
+
/** Full-viewport control center for daemon health, phone pairing, and access. */
|
|
301
|
+
export class RemoteControlCenterComponent {
|
|
302
|
+
backend;
|
|
303
|
+
options;
|
|
304
|
+
view = { kind: "loading", label: "Loading remote access…" };
|
|
305
|
+
selectedKey = "refresh";
|
|
306
|
+
scrollOffset = 0;
|
|
307
|
+
manualScroll = false;
|
|
308
|
+
lastRows = [];
|
|
309
|
+
lastPageSize = 1;
|
|
310
|
+
pairingHandle;
|
|
311
|
+
pairingAttempt = 0;
|
|
312
|
+
generation = 0;
|
|
313
|
+
disposed = false;
|
|
314
|
+
constructor(backend, options) {
|
|
315
|
+
this.backend = backend;
|
|
316
|
+
this.options = options;
|
|
317
|
+
}
|
|
318
|
+
async start() {
|
|
319
|
+
await this.refresh();
|
|
320
|
+
}
|
|
321
|
+
invalidate() {
|
|
322
|
+
// Theme styling is resolved during render.
|
|
323
|
+
}
|
|
324
|
+
dispose() {
|
|
325
|
+
if (this.disposed)
|
|
326
|
+
return;
|
|
327
|
+
this.disposed = true;
|
|
328
|
+
this.generation++;
|
|
329
|
+
this.pairingAttempt++;
|
|
330
|
+
this.pairingHandle?.dispose();
|
|
331
|
+
this.pairingHandle = undefined;
|
|
332
|
+
void this.backend.close();
|
|
333
|
+
}
|
|
334
|
+
render(width) {
|
|
335
|
+
if (width <= 0)
|
|
336
|
+
return [];
|
|
337
|
+
const height = Math.max(6, this.options.getTerminalRows() || 24);
|
|
338
|
+
const header = this.renderHeader(width);
|
|
339
|
+
const footer = this.renderFooter(width);
|
|
340
|
+
const pageSize = Math.max(1, height - header.length - footer.length);
|
|
341
|
+
this.lastPageSize = pageSize;
|
|
342
|
+
const rows = this.buildRows(width, pageSize);
|
|
343
|
+
this.lastRows = rows;
|
|
344
|
+
this.ensureSelection(rows);
|
|
345
|
+
const selectedIndex = rows.findIndex((row) => row.key === this.selectedKey);
|
|
346
|
+
const maxOffset = Math.max(0, rows.length - pageSize);
|
|
347
|
+
if (!this.manualScroll && selectedIndex >= 0) {
|
|
348
|
+
if (selectedIndex < this.scrollOffset)
|
|
349
|
+
this.scrollOffset = selectedIndex;
|
|
350
|
+
if (selectedIndex >= this.scrollOffset + pageSize)
|
|
351
|
+
this.scrollOffset = selectedIndex - pageSize + 1;
|
|
352
|
+
}
|
|
353
|
+
this.scrollOffset = Math.max(0, Math.min(this.scrollOffset, maxOffset));
|
|
354
|
+
const body = rows.slice(this.scrollOffset, this.scrollOffset + pageSize).map((row) => this.renderRow(row, width));
|
|
355
|
+
while (body.length < pageSize)
|
|
356
|
+
body.push("");
|
|
357
|
+
return [...header, ...body, ...footer];
|
|
358
|
+
}
|
|
359
|
+
handleInput(data) {
|
|
360
|
+
const keybindings = getKeybindings();
|
|
361
|
+
if (keybindings.matches(data, "tui.select.cancel")) {
|
|
362
|
+
if (this.view.kind === "access-picker" ||
|
|
363
|
+
this.view.kind === "workspace-picker" ||
|
|
364
|
+
this.view.kind === "confirm-regenerate" ||
|
|
365
|
+
this.view.kind === "confirm-recover" ||
|
|
366
|
+
this.view.kind === "confirm-revoke" ||
|
|
367
|
+
this.view.kind === "confirm-repair" ||
|
|
368
|
+
this.view.kind === "pairing") {
|
|
369
|
+
if (this.view.kind === "pairing")
|
|
370
|
+
this.pairingAttempt++;
|
|
371
|
+
this.pairingHandle?.dispose();
|
|
372
|
+
this.pairingHandle = undefined;
|
|
373
|
+
if (this.view.kind === "confirm-regenerate") {
|
|
374
|
+
this.view = { kind: "offline", snapshot: this.view.snapshot };
|
|
375
|
+
this.selectedKey = "regenerate-state";
|
|
376
|
+
}
|
|
377
|
+
else if (this.view.kind === "confirm-recover") {
|
|
378
|
+
this.view = {
|
|
379
|
+
kind: "pairing",
|
|
380
|
+
status: this.view.status,
|
|
381
|
+
workspaceName: this.view.workspaceName,
|
|
382
|
+
access: this.view.access,
|
|
383
|
+
phase: "failed",
|
|
384
|
+
message: "Iroh endpoint unavailable",
|
|
385
|
+
recoveryBackupPath: this.view.backupPath,
|
|
386
|
+
};
|
|
387
|
+
this.selectedKey = "pairing-recover";
|
|
388
|
+
}
|
|
389
|
+
else if (this.view.kind === "workspace-picker") {
|
|
390
|
+
const { status, access } = this.view;
|
|
391
|
+
this.view = { kind: "access-picker", status };
|
|
392
|
+
this.selectedKey = `access:${access}`;
|
|
393
|
+
}
|
|
394
|
+
else {
|
|
395
|
+
const returnKey = this.view.kind === "confirm-revoke"
|
|
396
|
+
? `client:${this.view.clientNodeId}`
|
|
397
|
+
: this.view.kind === "confirm-repair"
|
|
398
|
+
? `revoked:${this.view.clientNodeId}`
|
|
399
|
+
: "pair";
|
|
400
|
+
this.view = { kind: "overview", status: this.view.status };
|
|
401
|
+
this.selectedKey = returnKey;
|
|
402
|
+
}
|
|
403
|
+
this.scrollOffset = 0;
|
|
404
|
+
this.manualScroll = false;
|
|
405
|
+
this.options.requestRender();
|
|
406
|
+
}
|
|
407
|
+
else {
|
|
408
|
+
this.options.onClose();
|
|
409
|
+
}
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
if (keybindings.matches(data, "tui.select.up")) {
|
|
413
|
+
this.moveSelection(-1);
|
|
414
|
+
}
|
|
415
|
+
else if (keybindings.matches(data, "tui.select.down")) {
|
|
416
|
+
this.moveSelection(1);
|
|
417
|
+
}
|
|
418
|
+
else if (keybindings.matches(data, "tui.select.pageUp")) {
|
|
419
|
+
this.scrollRows(-this.lastPageSize);
|
|
420
|
+
}
|
|
421
|
+
else if (keybindings.matches(data, "tui.select.pageDown")) {
|
|
422
|
+
this.scrollRows(this.lastPageSize);
|
|
423
|
+
}
|
|
424
|
+
else if (keybindings.matches(data, "tui.select.confirm")) {
|
|
425
|
+
this.activateSelection();
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
this.options.requestRender();
|
|
431
|
+
}
|
|
432
|
+
async refresh(notice) {
|
|
433
|
+
const generation = ++this.generation;
|
|
434
|
+
this.pairingAttempt++;
|
|
435
|
+
this.pairingHandle?.dispose();
|
|
436
|
+
this.pairingHandle = undefined;
|
|
437
|
+
this.view = { kind: "loading", label: "Refreshing remote access…" };
|
|
438
|
+
this.options.requestRender();
|
|
439
|
+
const snapshot = await this.backend.load();
|
|
440
|
+
if (this.disposed || generation !== this.generation)
|
|
441
|
+
return;
|
|
442
|
+
this.view =
|
|
443
|
+
snapshot.kind === "online"
|
|
444
|
+
? { kind: "overview", status: snapshot.status, ...(notice === undefined ? {} : { notice }) }
|
|
445
|
+
: { kind: "offline", snapshot };
|
|
446
|
+
this.selectedKey = snapshot.kind === "online" ? "refresh" : "start";
|
|
447
|
+
this.scrollOffset = 0;
|
|
448
|
+
this.manualScroll = false;
|
|
449
|
+
this.options.requestRender();
|
|
450
|
+
}
|
|
451
|
+
async startDaemon() {
|
|
452
|
+
const generation = ++this.generation;
|
|
453
|
+
this.view = { kind: "loading", label: "Starting voltd…" };
|
|
454
|
+
this.options.requestRender();
|
|
455
|
+
try {
|
|
456
|
+
await this.backend.startDaemon();
|
|
457
|
+
if (this.disposed || generation !== this.generation)
|
|
458
|
+
return;
|
|
459
|
+
await this.refresh("Daemon started");
|
|
460
|
+
}
|
|
461
|
+
catch (error) {
|
|
462
|
+
if (this.disposed || generation !== this.generation)
|
|
463
|
+
return;
|
|
464
|
+
this.view = {
|
|
465
|
+
kind: "offline",
|
|
466
|
+
snapshot: {
|
|
467
|
+
kind: "offline",
|
|
468
|
+
state: "not-running",
|
|
469
|
+
error: error instanceof Error ? error.message : String(error),
|
|
470
|
+
},
|
|
471
|
+
};
|
|
472
|
+
this.selectedKey = "start";
|
|
473
|
+
this.options.requestRender();
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
async regenerateState() {
|
|
477
|
+
const generation = ++this.generation;
|
|
478
|
+
this.view = { kind: "loading", label: "Backing up and regenerating daemon state…" };
|
|
479
|
+
this.options.requestRender();
|
|
480
|
+
try {
|
|
481
|
+
const result = await this.backend.regenerateState();
|
|
482
|
+
await this.backend.startDaemon();
|
|
483
|
+
if (this.disposed || generation !== this.generation)
|
|
484
|
+
return;
|
|
485
|
+
await this.refresh(`Daemon state regenerated; backup saved to ${result.backupPath}${result.preservedIdentity ? " · Iroh identity preserved" : " · new Iroh identity created"}`);
|
|
486
|
+
}
|
|
487
|
+
catch (error) {
|
|
488
|
+
if (this.disposed || generation !== this.generation)
|
|
489
|
+
return;
|
|
490
|
+
const snapshot = await this.backend.load();
|
|
491
|
+
if (this.disposed || generation !== this.generation)
|
|
492
|
+
return;
|
|
493
|
+
this.view =
|
|
494
|
+
snapshot.kind === "online"
|
|
495
|
+
? { kind: "overview", status: snapshot.status, notice: "Daemon state was regenerated" }
|
|
496
|
+
: {
|
|
497
|
+
kind: "offline",
|
|
498
|
+
snapshot: {
|
|
499
|
+
...snapshot,
|
|
500
|
+
error: error instanceof Error ? error.message : String(error),
|
|
501
|
+
},
|
|
502
|
+
};
|
|
503
|
+
this.selectedKey =
|
|
504
|
+
snapshot.kind === "online" ? "refresh" : snapshot.invalidState ? "regenerate-state" : "start";
|
|
505
|
+
this.options.requestRender();
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
async recoverStateBackup(backupPath) {
|
|
509
|
+
const generation = ++this.generation;
|
|
510
|
+
this.view = { kind: "loading", label: "Stopping voltd and recovering daemon state…" };
|
|
511
|
+
this.options.requestRender();
|
|
512
|
+
try {
|
|
513
|
+
const result = await this.backend.recoverStateBackup(backupPath);
|
|
514
|
+
if (this.disposed || generation !== this.generation)
|
|
515
|
+
return;
|
|
516
|
+
await this.refresh(result.preservedIdentity
|
|
517
|
+
? "Recovered daemon state and preserved the Iroh identity"
|
|
518
|
+
: "Recovered daemon state with a new Iroh identity; pair phones again");
|
|
519
|
+
}
|
|
520
|
+
catch (error) {
|
|
521
|
+
if (this.disposed || generation !== this.generation)
|
|
522
|
+
return;
|
|
523
|
+
const snapshot = await this.backend.load();
|
|
524
|
+
if (this.disposed || generation !== this.generation)
|
|
525
|
+
return;
|
|
526
|
+
this.view =
|
|
527
|
+
snapshot.kind === "online"
|
|
528
|
+
? {
|
|
529
|
+
kind: "overview",
|
|
530
|
+
status: snapshot.status,
|
|
531
|
+
notice: `State recovery failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
532
|
+
}
|
|
533
|
+
: { kind: "offline", snapshot };
|
|
534
|
+
this.selectedKey = "refresh";
|
|
535
|
+
this.options.requestRender();
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
async registerCurrentWorkspace() {
|
|
539
|
+
const generation = ++this.generation;
|
|
540
|
+
const currentPath = this.options.getCurrentWorkspacePath();
|
|
541
|
+
this.view = { kind: "loading", label: "Registering current directory…" };
|
|
542
|
+
this.options.requestRender();
|
|
543
|
+
try {
|
|
544
|
+
const workspace = await this.backend.registerCurrentWorkspace(currentPath);
|
|
545
|
+
if (this.disposed || generation !== this.generation)
|
|
546
|
+
return;
|
|
547
|
+
await this.refresh(`Workspace ${workspace.name} is available`);
|
|
548
|
+
}
|
|
549
|
+
catch (error) {
|
|
550
|
+
if (this.disposed || generation !== this.generation)
|
|
551
|
+
return;
|
|
552
|
+
const snapshot = await this.backend.load();
|
|
553
|
+
if (this.disposed || generation !== this.generation)
|
|
554
|
+
return;
|
|
555
|
+
this.view =
|
|
556
|
+
snapshot.kind === "online"
|
|
557
|
+
? {
|
|
558
|
+
kind: "overview",
|
|
559
|
+
status: snapshot.status,
|
|
560
|
+
notice: `Workspace registration failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
561
|
+
}
|
|
562
|
+
: { kind: "offline", snapshot };
|
|
563
|
+
this.selectedKey = snapshot.kind === "online" ? "register-current" : "start";
|
|
564
|
+
this.options.requestRender();
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
async beginPairing(workspaceName, access, status) {
|
|
568
|
+
const pairingAttempt = ++this.pairingAttempt;
|
|
569
|
+
this.pairingHandle?.dispose();
|
|
570
|
+
this.pairingHandle = undefined;
|
|
571
|
+
this.view = { kind: "pairing", status, workspaceName, access, phase: "starting" };
|
|
572
|
+
this.selectedKey = "pairing-back";
|
|
573
|
+
this.scrollOffset = 0;
|
|
574
|
+
this.manualScroll = false;
|
|
575
|
+
this.options.requestRender();
|
|
576
|
+
try {
|
|
577
|
+
const handle = await this.backend.beginPairing(workspaceName, access, (event) => this.onPairingProgress(event, pairingAttempt));
|
|
578
|
+
if (this.disposed ||
|
|
579
|
+
pairingAttempt !== this.pairingAttempt ||
|
|
580
|
+
this.view.kind !== "pairing" ||
|
|
581
|
+
this.view.workspaceName !== workspaceName ||
|
|
582
|
+
this.view.access !== access) {
|
|
583
|
+
handle.dispose();
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
586
|
+
if (this.view.phase === "completed" || this.view.phase === "failed") {
|
|
587
|
+
handle.dispose();
|
|
588
|
+
}
|
|
589
|
+
else {
|
|
590
|
+
this.pairingHandle = handle;
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
catch (error) {
|
|
594
|
+
const recoveryBackup = error instanceof RemoteControlRequestError && error.code === "iroh_unavailable"
|
|
595
|
+
? await this.backend.findRecoveryBackup()
|
|
596
|
+
: undefined;
|
|
597
|
+
if (this.disposed || pairingAttempt !== this.pairingAttempt || this.view.kind !== "pairing")
|
|
598
|
+
return;
|
|
599
|
+
this.view = {
|
|
600
|
+
...this.view,
|
|
601
|
+
phase: "failed",
|
|
602
|
+
message: error instanceof Error ? error.message : String(error),
|
|
603
|
+
...(recoveryBackup === undefined ? {} : { recoveryBackupPath: recoveryBackup.path }),
|
|
604
|
+
};
|
|
605
|
+
this.selectedKey = recoveryBackup === undefined ? "pairing-back" : "pairing-recover";
|
|
606
|
+
this.options.requestRender();
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
onPairingProgress(event, pairingAttempt) {
|
|
610
|
+
if (this.disposed || pairingAttempt !== this.pairingAttempt || this.view.kind !== "pairing")
|
|
611
|
+
return;
|
|
612
|
+
if (event.phase === "ticket" && event.ticket) {
|
|
613
|
+
this.view = { ...this.view, phase: "ticket", ticket: event.ticket };
|
|
614
|
+
}
|
|
615
|
+
else if (event.phase === "waiting") {
|
|
616
|
+
this.view = { ...this.view, phase: "waiting" };
|
|
617
|
+
}
|
|
618
|
+
else if (event.phase === "completed") {
|
|
619
|
+
this.view = {
|
|
620
|
+
...this.view,
|
|
621
|
+
phase: "completed",
|
|
622
|
+
message: `Paired ${event.clientNodeId ? abbreviatedId(event.clientNodeId, 20) : "device"}`,
|
|
623
|
+
showQr: false,
|
|
624
|
+
};
|
|
625
|
+
this.pairingHandle?.dispose();
|
|
626
|
+
this.pairingHandle = undefined;
|
|
627
|
+
}
|
|
628
|
+
else if (event.phase === "failed") {
|
|
629
|
+
this.view = { ...this.view, phase: "failed", message: event.error ?? "Pairing failed", showQr: false };
|
|
630
|
+
this.pairingHandle?.dispose();
|
|
631
|
+
this.pairingHandle = undefined;
|
|
632
|
+
}
|
|
633
|
+
this.options.requestRender();
|
|
634
|
+
}
|
|
635
|
+
async copyPairingTicket() {
|
|
636
|
+
if (this.view.kind !== "pairing" || !this.view.ticket)
|
|
637
|
+
return;
|
|
638
|
+
const pairingAttempt = this.pairingAttempt;
|
|
639
|
+
const ticket = this.view.ticket;
|
|
640
|
+
try {
|
|
641
|
+
await this.options.copyText(ticket);
|
|
642
|
+
if (!this.disposed &&
|
|
643
|
+
pairingAttempt === this.pairingAttempt &&
|
|
644
|
+
this.view.kind === "pairing" &&
|
|
645
|
+
this.view.ticket === ticket) {
|
|
646
|
+
this.view = { ...this.view, message: "Pairing ticket copied" };
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
catch (error) {
|
|
650
|
+
if (!this.disposed &&
|
|
651
|
+
pairingAttempt === this.pairingAttempt &&
|
|
652
|
+
this.view.kind === "pairing" &&
|
|
653
|
+
this.view.ticket === ticket) {
|
|
654
|
+
this.view = { ...this.view, message: error instanceof Error ? error.message : String(error) };
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
if (!this.disposed)
|
|
658
|
+
this.options.requestRender();
|
|
659
|
+
}
|
|
660
|
+
async revokeClient(clientNodeId) {
|
|
661
|
+
const generation = ++this.generation;
|
|
662
|
+
this.view = { kind: "loading", label: "Revoking device…" };
|
|
663
|
+
this.options.requestRender();
|
|
664
|
+
try {
|
|
665
|
+
await this.backend.revokeClient(clientNodeId);
|
|
666
|
+
if (this.disposed || generation !== this.generation)
|
|
667
|
+
return;
|
|
668
|
+
await this.refresh(`Revoked ${abbreviatedId(clientNodeId, 20)}`);
|
|
669
|
+
}
|
|
670
|
+
catch (error) {
|
|
671
|
+
if (this.disposed || generation !== this.generation)
|
|
672
|
+
return;
|
|
673
|
+
const snapshot = await this.backend.load();
|
|
674
|
+
if (this.disposed || generation !== this.generation)
|
|
675
|
+
return;
|
|
676
|
+
this.view =
|
|
677
|
+
snapshot.kind === "online"
|
|
678
|
+
? {
|
|
679
|
+
kind: "overview",
|
|
680
|
+
status: snapshot.status,
|
|
681
|
+
notice: `Revoke failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
682
|
+
}
|
|
683
|
+
: { kind: "offline", snapshot };
|
|
684
|
+
this.options.requestRender();
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
async approveClientRepair(clientNodeId) {
|
|
688
|
+
const generation = ++this.generation;
|
|
689
|
+
this.view = { kind: "loading", label: "Allowing device to re-pair…" };
|
|
690
|
+
this.options.requestRender();
|
|
691
|
+
try {
|
|
692
|
+
await this.backend.approveClientRepair(clientNodeId);
|
|
693
|
+
if (this.disposed || generation !== this.generation)
|
|
694
|
+
return;
|
|
695
|
+
await this.refresh("Re-pair approved. Choose Pair a phone and scan a fresh QR.");
|
|
696
|
+
}
|
|
697
|
+
catch (error) {
|
|
698
|
+
if (this.disposed || generation !== this.generation)
|
|
699
|
+
return;
|
|
700
|
+
const snapshot = await this.backend.load();
|
|
701
|
+
if (this.disposed || generation !== this.generation)
|
|
702
|
+
return;
|
|
703
|
+
this.view =
|
|
704
|
+
snapshot.kind === "online"
|
|
705
|
+
? {
|
|
706
|
+
kind: "overview",
|
|
707
|
+
status: snapshot.status,
|
|
708
|
+
notice: `Repair approval failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
709
|
+
}
|
|
710
|
+
: { kind: "offline", snapshot };
|
|
711
|
+
this.selectedKey = snapshot.kind === "online" ? `revoked:${clientNodeId}` : "start";
|
|
712
|
+
this.options.requestRender();
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
activateSelection() {
|
|
716
|
+
if (this.view.kind === "loading")
|
|
717
|
+
return;
|
|
718
|
+
const key = this.selectedKey;
|
|
719
|
+
if (key === "refresh") {
|
|
720
|
+
void this.refresh();
|
|
721
|
+
return;
|
|
722
|
+
}
|
|
723
|
+
if (key === "start") {
|
|
724
|
+
void this.startDaemon();
|
|
725
|
+
return;
|
|
726
|
+
}
|
|
727
|
+
if (key === "regenerate-state" && this.view.kind === "offline" && this.view.snapshot.invalidState) {
|
|
728
|
+
this.view = { kind: "confirm-regenerate", snapshot: this.view.snapshot };
|
|
729
|
+
this.selectedKey = "confirm-regenerate-state";
|
|
730
|
+
this.scrollOffset = 0;
|
|
731
|
+
this.manualScroll = false;
|
|
732
|
+
return;
|
|
733
|
+
}
|
|
734
|
+
if (key === "confirm-regenerate-state" && this.view.kind === "confirm-regenerate") {
|
|
735
|
+
void this.regenerateState();
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
738
|
+
if (key === "pairing-recover" && this.view.kind === "pairing" && this.view.recoveryBackupPath) {
|
|
739
|
+
this.view = {
|
|
740
|
+
kind: "confirm-recover",
|
|
741
|
+
status: this.view.status,
|
|
742
|
+
workspaceName: this.view.workspaceName,
|
|
743
|
+
access: this.view.access,
|
|
744
|
+
backupPath: this.view.recoveryBackupPath,
|
|
745
|
+
};
|
|
746
|
+
this.selectedKey = "confirm-recover-state";
|
|
747
|
+
this.scrollOffset = 0;
|
|
748
|
+
this.manualScroll = false;
|
|
749
|
+
return;
|
|
750
|
+
}
|
|
751
|
+
if (key === "confirm-recover-state" && this.view.kind === "confirm-recover") {
|
|
752
|
+
void this.recoverStateBackup(this.view.backupPath);
|
|
753
|
+
return;
|
|
754
|
+
}
|
|
755
|
+
if (key === "register-current") {
|
|
756
|
+
if (this.view.kind === "overview")
|
|
757
|
+
void this.registerCurrentWorkspace();
|
|
758
|
+
return;
|
|
759
|
+
}
|
|
760
|
+
if (key === "pair") {
|
|
761
|
+
if (this.view.kind !== "overview" || !supportsSafePairing(this.view.status))
|
|
762
|
+
return;
|
|
763
|
+
this.view = { kind: "access-picker", status: this.view.status };
|
|
764
|
+
this.selectedKey = "access:coding";
|
|
765
|
+
this.scrollOffset = 0;
|
|
766
|
+
this.manualScroll = false;
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
769
|
+
if (key.startsWith("access:") && this.view.kind === "access-picker") {
|
|
770
|
+
const selectedAccess = key.slice("access:".length);
|
|
771
|
+
if (!isIrohRemoteAccessPresetName(selectedAccess))
|
|
772
|
+
return;
|
|
773
|
+
const currentWorkspace = this.options.getCurrentWorkspaceName();
|
|
774
|
+
const match = this.view.status.workspaces.find((workspace) => workspace.name === currentWorkspace);
|
|
775
|
+
if (match) {
|
|
776
|
+
void this.beginPairing(match.name, selectedAccess, this.view.status);
|
|
777
|
+
}
|
|
778
|
+
else if (this.view.status.workspaces.length === 1) {
|
|
779
|
+
void this.beginPairing(this.view.status.workspaces[0].name, selectedAccess, this.view.status);
|
|
780
|
+
}
|
|
781
|
+
else if (this.view.status.workspaces.length > 1) {
|
|
782
|
+
this.view = { kind: "workspace-picker", status: this.view.status, access: selectedAccess };
|
|
783
|
+
this.selectedKey = `workspace:${this.view.status.workspaces[0].name}`;
|
|
784
|
+
this.scrollOffset = 0;
|
|
785
|
+
this.manualScroll = false;
|
|
786
|
+
}
|
|
787
|
+
return;
|
|
788
|
+
}
|
|
789
|
+
if (key.startsWith("workspace:") && this.view.kind === "workspace-picker") {
|
|
790
|
+
void this.beginPairing(key.slice("workspace:".length), this.view.access, this.view.status);
|
|
791
|
+
return;
|
|
792
|
+
}
|
|
793
|
+
if (key.startsWith("client:") && this.view.kind === "overview") {
|
|
794
|
+
const clientNodeId = key.slice("client:".length);
|
|
795
|
+
this.view = { kind: "confirm-revoke", status: this.view.status, clientNodeId };
|
|
796
|
+
this.selectedKey = `revoke:${clientNodeId}`;
|
|
797
|
+
this.scrollOffset = 0;
|
|
798
|
+
this.manualScroll = false;
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
801
|
+
if (key.startsWith("revoked:") && this.view.kind === "overview") {
|
|
802
|
+
const clientNodeId = key.slice("revoked:".length);
|
|
803
|
+
this.view = { kind: "confirm-repair", status: this.view.status, clientNodeId };
|
|
804
|
+
this.selectedKey = `approve-repair:${clientNodeId}`;
|
|
805
|
+
this.scrollOffset = 0;
|
|
806
|
+
this.manualScroll = false;
|
|
807
|
+
return;
|
|
808
|
+
}
|
|
809
|
+
if (key.startsWith("revoke:") && this.view.kind === "confirm-revoke") {
|
|
810
|
+
void this.revokeClient(this.view.clientNodeId);
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
813
|
+
if (key.startsWith("approve-repair:") && this.view.kind === "confirm-repair") {
|
|
814
|
+
void this.approveClientRepair(this.view.clientNodeId);
|
|
815
|
+
return;
|
|
816
|
+
}
|
|
817
|
+
if (key === "pairing-copy" && this.view.kind === "pairing" && this.view.ticket) {
|
|
818
|
+
void this.copyPairingTicket();
|
|
819
|
+
return;
|
|
820
|
+
}
|
|
821
|
+
if (key === "pairing-show-qr" && this.view.kind === "pairing" && this.view.ticket) {
|
|
822
|
+
this.view = { ...this.view, showQr: true };
|
|
823
|
+
this.selectedKey = "pairing-verification";
|
|
824
|
+
this.scrollOffset = 0;
|
|
825
|
+
this.manualScroll = false;
|
|
826
|
+
return;
|
|
827
|
+
}
|
|
828
|
+
if (key === "pairing-verification" && this.view.kind === "pairing") {
|
|
829
|
+
this.view = { ...this.view, showQr: false };
|
|
830
|
+
this.selectedKey = "pairing-show-qr";
|
|
831
|
+
this.scrollOffset = 0;
|
|
832
|
+
this.manualScroll = false;
|
|
833
|
+
return;
|
|
834
|
+
}
|
|
835
|
+
if (key === "pairing-back" && this.view.kind === "pairing") {
|
|
836
|
+
if (this.view.phase === "completed") {
|
|
837
|
+
void this.refresh(this.view.message);
|
|
838
|
+
}
|
|
839
|
+
else {
|
|
840
|
+
this.pairingAttempt++;
|
|
841
|
+
this.pairingHandle?.dispose();
|
|
842
|
+
this.pairingHandle = undefined;
|
|
843
|
+
this.view = { kind: "overview", status: this.view.status };
|
|
844
|
+
this.selectedKey = "pair";
|
|
845
|
+
this.scrollOffset = 0;
|
|
846
|
+
this.manualScroll = false;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
moveSelection(delta) {
|
|
851
|
+
const selectable = this.lastRows.filter((row) => row.key);
|
|
852
|
+
if (selectable.length === 0)
|
|
853
|
+
return;
|
|
854
|
+
const index = selectable.findIndex((row) => row.key === this.selectedKey);
|
|
855
|
+
const next = Math.max(0, Math.min(selectable.length - 1, (index < 0 ? 0 : index) + delta));
|
|
856
|
+
this.selectedKey = selectable[next].key;
|
|
857
|
+
this.manualScroll = false;
|
|
858
|
+
}
|
|
859
|
+
scrollRows(delta) {
|
|
860
|
+
const maxOffset = Math.max(0, this.lastRows.length - this.lastPageSize);
|
|
861
|
+
this.scrollOffset = Math.max(0, Math.min(maxOffset, this.scrollOffset + delta));
|
|
862
|
+
this.manualScroll = true;
|
|
863
|
+
}
|
|
864
|
+
ensureSelection(rows) {
|
|
865
|
+
if (rows.some((row) => row.key === this.selectedKey))
|
|
866
|
+
return;
|
|
867
|
+
this.selectedKey = rows.find((row) => row.key)?.key ?? "";
|
|
868
|
+
}
|
|
869
|
+
renderHeader(width) {
|
|
870
|
+
let state = "loading";
|
|
871
|
+
if (this.view.kind === "offline")
|
|
872
|
+
state = this.view.snapshot.state;
|
|
873
|
+
else if (this.view.kind === "confirm-regenerate" || this.view.kind === "confirm-recover")
|
|
874
|
+
state = "confirmation";
|
|
875
|
+
else if ("status" in this.view)
|
|
876
|
+
state = `online · ${this.view.status.phoneConnections} phone${this.view.status.phoneConnections === 1 ? "" : "s"}`;
|
|
877
|
+
const title = theme.bold(theme.fg("accent", "Remote Access"));
|
|
878
|
+
const right = theme.fg(this.view.kind === "offline" ? "warning" : "muted", state);
|
|
879
|
+
const gap = " ".repeat(Math.max(1, width - visibleWidth(title) - visibleWidth(right) - 2));
|
|
880
|
+
return [new DynamicBorder().render(width)[0], truncateToWidth(` ${title}${gap}${right} `, width, ""), ""];
|
|
881
|
+
}
|
|
882
|
+
renderFooter(width) {
|
|
883
|
+
const hints = [keyHint("tui.select.up", "navigate"), keyHint("tui.select.pageDown", "scroll")];
|
|
884
|
+
hints.push(keyHint("tui.select.confirm", "select"));
|
|
885
|
+
hints.push(keyHint("tui.select.cancel", this.view.kind === "overview" || this.view.kind === "offline" ? "close" : "back"));
|
|
886
|
+
return [truncateToWidth(` ${hints.join(" ")}`, width, ""), new DynamicBorder().render(width)[0]];
|
|
887
|
+
}
|
|
888
|
+
buildRows(width, pageSize) {
|
|
889
|
+
if (this.view.kind === "loading")
|
|
890
|
+
return [{ text: this.view.label, tone: "muted" }];
|
|
891
|
+
if (this.view.kind === "offline") {
|
|
892
|
+
return [
|
|
893
|
+
{ text: "DAEMON", tone: "accent" },
|
|
894
|
+
{ text: `voltd is ${this.view.snapshot.state}`, tone: "warning" },
|
|
895
|
+
...(this.view.snapshot.error ? [{ text: this.view.snapshot.error, tone: "error" }] : []),
|
|
896
|
+
...(this.view.snapshot.invalidState
|
|
897
|
+
? [
|
|
898
|
+
{
|
|
899
|
+
text: "Regeneration creates a backup, preserves validated settings/identity when possible, and may require phones to pair again.",
|
|
900
|
+
tone: "warning",
|
|
901
|
+
},
|
|
902
|
+
{ key: "regenerate-state", text: "Regenerate daemon state…", tone: "warning" },
|
|
903
|
+
]
|
|
904
|
+
: [{ key: "start", text: "Start daemon", tone: "text" }]),
|
|
905
|
+
{ key: "refresh", text: "Refresh status", tone: "text" },
|
|
906
|
+
];
|
|
907
|
+
}
|
|
908
|
+
if (this.view.kind === "confirm-regenerate") {
|
|
909
|
+
return [
|
|
910
|
+
{ text: "REGENERATE DAEMON STATE", tone: "warning" },
|
|
911
|
+
{ text: this.view.snapshot.invalidState?.path ?? "Unknown state file", tone: "dim" },
|
|
912
|
+
{ text: "The invalid file will be kept as a timestamped backup.", tone: "text" },
|
|
913
|
+
{ text: "Validated identity, workspace, and settings data will be preserved when safe.", tone: "text" },
|
|
914
|
+
{ text: "Invalid access records are dropped; phones may need to pair again.", tone: "warning" },
|
|
915
|
+
{ key: "confirm-regenerate-state", text: "Confirm regenerate state", tone: "warning" },
|
|
916
|
+
];
|
|
917
|
+
}
|
|
918
|
+
if (this.view.kind === "confirm-recover") {
|
|
919
|
+
return [
|
|
920
|
+
{ text: "RECOVER PREVIOUS DAEMON STATE", tone: "warning" },
|
|
921
|
+
{ text: this.view.backupPath, tone: "dim" },
|
|
922
|
+
{ text: "The current daemon will stop and its state will be backed up.", tone: "text" },
|
|
923
|
+
{ text: "Validated identity, workspace, and settings data will be restored.", tone: "text" },
|
|
924
|
+
{ text: "Legacy access records are dropped; phones may need to pair again.", tone: "warning" },
|
|
925
|
+
{ key: "confirm-recover-state", text: "Confirm recover and restart", tone: "warning" },
|
|
926
|
+
];
|
|
927
|
+
}
|
|
928
|
+
if (this.view.kind === "access-picker") {
|
|
929
|
+
return [
|
|
930
|
+
{ text: "PAIR A PHONE · ACCESS", tone: "accent" },
|
|
931
|
+
{ text: "Choose what this phone may do. Access can be changed later.", tone: "muted" },
|
|
932
|
+
...IROH_REMOTE_ACCESS_PRESET_NAMES.flatMap((name) => {
|
|
933
|
+
const details = ACCESS_PRESET_DETAILS[name];
|
|
934
|
+
return [
|
|
935
|
+
{
|
|
936
|
+
key: `access:${name}`,
|
|
937
|
+
text: details.label,
|
|
938
|
+
tone: name === "full" ? "warning" : "text",
|
|
939
|
+
},
|
|
940
|
+
{ text: ` ${details.description}`, tone: "dim" },
|
|
941
|
+
];
|
|
942
|
+
}),
|
|
943
|
+
];
|
|
944
|
+
}
|
|
945
|
+
if (this.view.kind === "workspace-picker") {
|
|
946
|
+
return [
|
|
947
|
+
{ text: `PAIR A PHONE · ${ACCESS_PRESET_DETAILS[this.view.access].label}`, tone: "accent" },
|
|
948
|
+
{ text: "Choose the phone's initial workspace.", tone: "muted" },
|
|
949
|
+
...this.view.status.workspaces.map((workspace) => ({
|
|
950
|
+
key: `workspace:${workspace.name}`,
|
|
951
|
+
text: `${workspace.name} ${workspace.path}`,
|
|
952
|
+
tone: "text",
|
|
953
|
+
})),
|
|
954
|
+
];
|
|
955
|
+
}
|
|
956
|
+
if (this.view.kind === "confirm-revoke") {
|
|
957
|
+
const revokeView = this.view;
|
|
958
|
+
const client = revokeView.status.clients.find((candidate) => candidate.clientNodeId === revokeView.clientNodeId);
|
|
959
|
+
return [
|
|
960
|
+
{ text: "REVOKE DEVICE", tone: "error" },
|
|
961
|
+
{ text: client?.label || "Unnamed phone", tone: "text" },
|
|
962
|
+
{ text: revokeView.clientNodeId, tone: "dim" },
|
|
963
|
+
{ text: "This immediately closes the device's active remote connections.", tone: "warning" },
|
|
964
|
+
{ key: `revoke:${revokeView.clientNodeId}`, text: "Confirm revoke", tone: "error" },
|
|
965
|
+
];
|
|
966
|
+
}
|
|
967
|
+
if (this.view.kind === "confirm-repair") {
|
|
968
|
+
const repairView = this.view;
|
|
969
|
+
const client = repairView.status.revokedClients?.find((candidate) => candidate.clientNodeId === repairView.clientNodeId);
|
|
970
|
+
return [
|
|
971
|
+
{ text: "ALLOW DEVICE TO RE-PAIR", tone: "warning" },
|
|
972
|
+
{ text: client?.label || "Unnamed phone", tone: "text" },
|
|
973
|
+
{ text: repairView.clientNodeId, tone: "dim" },
|
|
974
|
+
{ text: "This identity may use one fresh pairing ticket after approval.", tone: "warning" },
|
|
975
|
+
{ text: "The device remains revoked until fresh pairing succeeds.", tone: "muted" },
|
|
976
|
+
{ key: `approve-repair:${repairView.clientNodeId}`, text: "Confirm allow re-pair", tone: "warning" },
|
|
977
|
+
];
|
|
978
|
+
}
|
|
979
|
+
if (this.view.kind === "pairing")
|
|
980
|
+
return this.buildPairingRows(width, pageSize);
|
|
981
|
+
const status = this.view.status;
|
|
982
|
+
const remotePolicy = status.remotePolicy ?? {
|
|
983
|
+
allowTools: null,
|
|
984
|
+
detachedRuntimeTtlMs: DEFAULT_INTEGRATED_DETACHED_RUNTIME_TTL_MS,
|
|
985
|
+
};
|
|
986
|
+
const currentLease = status.leases.find((lease) => lease.sessionId === this.options.currentSessionId);
|
|
987
|
+
const currentWorkspace = status.workspaces.find((workspace) => workspace.name === this.options.getCurrentWorkspaceName()) ??
|
|
988
|
+
workspaceForPath(status, this.options.getCurrentWorkspacePath());
|
|
989
|
+
const rows = [
|
|
990
|
+
...(this.view.notice
|
|
991
|
+
? [
|
|
992
|
+
{
|
|
993
|
+
text: this.view.notice,
|
|
994
|
+
tone: this.view.notice.includes("failed") ? "error" : "success",
|
|
995
|
+
},
|
|
996
|
+
]
|
|
997
|
+
: []),
|
|
998
|
+
{ text: "CONNECTION", tone: "accent" },
|
|
999
|
+
{
|
|
1000
|
+
text: `voltd ${status.version} · pid ${status.pid} · up ${formatDuration(Date.now() - status.startedAtMs)}`,
|
|
1001
|
+
tone: "text",
|
|
1002
|
+
},
|
|
1003
|
+
{
|
|
1004
|
+
text: `${status.phoneConnections} attached phone${status.phoneConnections === 1 ? "" : "s"} · ${status.clients.length} paired device${status.clients.length === 1 ? "" : "s"}${status.revokedClients === undefined ? "" : ` · ${status.revokedClients.length} revoked`}`,
|
|
1005
|
+
tone: status.phoneConnections > 0 ? "success" : "muted",
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
text: currentLease
|
|
1009
|
+
? `Current lease: ${currentLease.state} · ${currentLease.streamCount} stream${currentLease.streamCount === 1 ? "" : "s"} · ${currentLease.relayCount} relay${currentLease.relayCount === 1 ? "" : "s"}`
|
|
1010
|
+
: "Current lease: not reported by daemon",
|
|
1011
|
+
tone: currentLease ? "text" : "muted",
|
|
1012
|
+
},
|
|
1013
|
+
{ text: "ACTIONS", tone: "accent" },
|
|
1014
|
+
{ key: "refresh", text: "Refresh status", tone: "text" },
|
|
1015
|
+
{ key: "register-current", text: "Register current directory", tone: "text" },
|
|
1016
|
+
...(status.workspaces.length === 0
|
|
1017
|
+
? [{ text: "Pairing needs a registered workspace.", tone: "warning" }]
|
|
1018
|
+
: supportsSafePairing(status)
|
|
1019
|
+
? [{ key: "pair", text: "Pair a phone", tone: "text" }]
|
|
1020
|
+
: [{ text: "Restart voltd to pair with explicit access grants.", tone: "warning" }]),
|
|
1021
|
+
{ text: "HEADLESS POLICY", tone: "accent" },
|
|
1022
|
+
...(status.remotePolicy
|
|
1023
|
+
? [
|
|
1024
|
+
{
|
|
1025
|
+
text: `Tools: ${policyTools(remotePolicy, currentWorkspace?.allowedTools)}`,
|
|
1026
|
+
tone: "text",
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
text: `Source: ${remotePolicy.allowTools !== null ? "daemon override" : currentWorkspace?.allowedTools ? `workspace ${currentWorkspace.name}` : "paired device grant"}`,
|
|
1030
|
+
tone: "dim",
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
text: `Detached runtime retention: ${formatDuration(remotePolicy.detachedRuntimeTtlMs)}`,
|
|
1034
|
+
tone: "text",
|
|
1035
|
+
},
|
|
1036
|
+
]
|
|
1037
|
+
: [
|
|
1038
|
+
{ text: "Tools: not reported by this running daemon", tone: "muted" },
|
|
1039
|
+
{ text: "Detached runtime retention: not reported", tone: "muted" },
|
|
1040
|
+
]),
|
|
1041
|
+
{ text: "PAIRED DEVICES", tone: "accent" },
|
|
1042
|
+
];
|
|
1043
|
+
if (status.clients.length === 0)
|
|
1044
|
+
rows.push({ text: "No paired devices.", tone: "muted" });
|
|
1045
|
+
for (const client of status.clients) {
|
|
1046
|
+
rows.push({
|
|
1047
|
+
key: `client:${client.clientNodeId}`,
|
|
1048
|
+
text: `${client.label || "Unnamed phone"} · ${abbreviatedId(client.clientNodeId, width < 60 ? 10 : 20)} · last seen ${formatDuration(Date.now() - (client.lastSeenAtMs ?? client.pairedAtMs))} ago`,
|
|
1049
|
+
tone: "text",
|
|
1050
|
+
});
|
|
1051
|
+
rows.push({
|
|
1052
|
+
text: ` Tools: ${client.allowedTools ? client.allowedTools.join(", ") || "none" : "not reported"}`,
|
|
1053
|
+
tone: "dim",
|
|
1054
|
+
});
|
|
1055
|
+
}
|
|
1056
|
+
if (status.revokedClients !== undefined) {
|
|
1057
|
+
rows.push({ text: "REVOKED DEVICES", tone: "accent" });
|
|
1058
|
+
if (status.revokedClients.length === 0)
|
|
1059
|
+
rows.push({ text: "No revoked devices.", tone: "muted" });
|
|
1060
|
+
for (const client of status.revokedClients) {
|
|
1061
|
+
const approved = client.rePairApprovedAtMs !== undefined;
|
|
1062
|
+
rows.push({
|
|
1063
|
+
...(approved ? {} : { key: `revoked:${client.clientNodeId}` }),
|
|
1064
|
+
text: `${client.label || "Unnamed phone"} · ${abbreviatedId(client.clientNodeId, width < 60 ? 10 : 20)} · revoked ${formatDuration(Date.now() - client.revokedAtMs)} ago`,
|
|
1065
|
+
tone: approved ? "success" : "warning",
|
|
1066
|
+
});
|
|
1067
|
+
rows.push({
|
|
1068
|
+
text: approved ? " Re-pair approved · scan a fresh QR" : " Select to allow fresh pairing",
|
|
1069
|
+
tone: approved ? "success" : "dim",
|
|
1070
|
+
});
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
rows.push({ text: "WORKSPACES", tone: "accent" });
|
|
1074
|
+
if (status.workspaces.length === 0)
|
|
1075
|
+
rows.push({ text: "No registered workspaces.", tone: "muted" });
|
|
1076
|
+
for (const workspace of status.workspaces) {
|
|
1077
|
+
rows.push({
|
|
1078
|
+
text: `${workspace.name === currentWorkspace?.name ? "Current · " : ""}${workspace.name} · ${workspace.path}`,
|
|
1079
|
+
tone: workspace.name === currentWorkspace?.name ? "accent" : "text",
|
|
1080
|
+
});
|
|
1081
|
+
if (workspace.allowedTools)
|
|
1082
|
+
rows.push({ text: ` Tools: ${workspace.allowedTools.join(", ") || "none"}`, tone: "dim" });
|
|
1083
|
+
}
|
|
1084
|
+
rows.push({ text: "LEASES", tone: "accent" });
|
|
1085
|
+
if (status.leases.length === 0)
|
|
1086
|
+
rows.push({ text: "No active conversation leases.", tone: "muted" });
|
|
1087
|
+
for (const lease of status.leases) {
|
|
1088
|
+
const current = lease.sessionId === this.options.currentSessionId;
|
|
1089
|
+
rows.push({
|
|
1090
|
+
text: `${current ? "Current · " : ""}${lease.workspaceName}/${abbreviatedId(lease.sessionId, width < 60 ? 10 : 18)} · ${lease.state} · ${lease.streamCount} streams · ${lease.relayCount} relays`,
|
|
1091
|
+
tone: current ? "accent" : "text",
|
|
1092
|
+
});
|
|
1093
|
+
}
|
|
1094
|
+
return rows;
|
|
1095
|
+
}
|
|
1096
|
+
buildPairingRows(width, pageSize) {
|
|
1097
|
+
if (this.view.kind !== "pairing")
|
|
1098
|
+
return [];
|
|
1099
|
+
const phaseLabel = {
|
|
1100
|
+
starting: "Creating one-time ticket…",
|
|
1101
|
+
ticket: "Ticket ready",
|
|
1102
|
+
waiting: "Scan with Volt on your phone",
|
|
1103
|
+
completed: "Pairing complete",
|
|
1104
|
+
failed: "Pairing failed",
|
|
1105
|
+
}[this.view.phase];
|
|
1106
|
+
const rows = [
|
|
1107
|
+
{
|
|
1108
|
+
text: `PAIR PHONE · ${this.view.workspaceName} · ${ACCESS_PRESET_DETAILS[this.view.access].label}`,
|
|
1109
|
+
tone: "accent",
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
text: this.view.phase === "waiting"
|
|
1113
|
+
? "Scan with Volt, then compare these values before confirming"
|
|
1114
|
+
: phaseLabel,
|
|
1115
|
+
tone: this.view.phase === "failed" ? "error" : this.view.phase === "completed" ? "success" : "text",
|
|
1116
|
+
},
|
|
1117
|
+
];
|
|
1118
|
+
if (this.view.message)
|
|
1119
|
+
rows.push({ text: this.view.message, tone: this.view.phase === "failed" ? "error" : "muted" });
|
|
1120
|
+
let qrLines;
|
|
1121
|
+
let qrError;
|
|
1122
|
+
if (this.view.ticket) {
|
|
1123
|
+
try {
|
|
1124
|
+
qrLines = formatIrohRemoteTicketQrCode(this.view.ticket)
|
|
1125
|
+
.split("\n")
|
|
1126
|
+
.filter((line, index, lines) => line.length > 0 || (index > 0 && index < lines.length - 1));
|
|
1127
|
+
}
|
|
1128
|
+
catch (error) {
|
|
1129
|
+
qrError = error instanceof Error ? error.message : String(error);
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
const qrFits = qrLines !== undefined &&
|
|
1133
|
+
qrLines.length + 4 <= pageSize &&
|
|
1134
|
+
qrLines.every((line) => visibleWidth(line) <= width);
|
|
1135
|
+
if (this.view.showQr) {
|
|
1136
|
+
if (qrFits && qrLines !== undefined) {
|
|
1137
|
+
return [
|
|
1138
|
+
{ text: `PAIR QR · ${this.view.workspaceName}`, tone: "accent" },
|
|
1139
|
+
...qrLines.map((line) => ({ text: line, raw: true })),
|
|
1140
|
+
{ key: "pairing-verification", text: "Show verification details", tone: "text" },
|
|
1141
|
+
{ key: "pairing-copy", text: "Copy pairing ticket", tone: "text" },
|
|
1142
|
+
{ key: "pairing-back", text: "Cancel pairing", tone: "text" },
|
|
1143
|
+
];
|
|
1144
|
+
}
|
|
1145
|
+
rows.push({ text: "The terminal is no longer large enough to show the complete QR code.", tone: "warning" });
|
|
1146
|
+
rows.push({ key: "pairing-verification", text: "Show verification details", tone: "text" });
|
|
1147
|
+
}
|
|
1148
|
+
else if (this.view.ticket) {
|
|
1149
|
+
try {
|
|
1150
|
+
const details = getIrohRemotePairingVerificationDetails(this.view.ticket);
|
|
1151
|
+
const addDetail = (label, value) => {
|
|
1152
|
+
rows.push({ text: label, tone: "dim" });
|
|
1153
|
+
for (const item of typeof value === "string" ? [value] : value) {
|
|
1154
|
+
const safeValue = stripAnsi(item).replace(UNSAFE_TERMINAL_CHARACTERS, "");
|
|
1155
|
+
rows.push(...wrapTextWithAnsi(safeValue, Math.max(1, width - 2)).map((line) => ({
|
|
1156
|
+
text: line,
|
|
1157
|
+
tone: "text",
|
|
1158
|
+
})));
|
|
1159
|
+
}
|
|
1160
|
+
};
|
|
1161
|
+
addDetail("Fingerprint", details.hostFingerprint);
|
|
1162
|
+
addDetail("Host ID", details.hostNodeId);
|
|
1163
|
+
addDetail("Workspace", details.workspace);
|
|
1164
|
+
addDetail("Relay mode", details.relayMode);
|
|
1165
|
+
addDetail("HTTPS relay origins", details.relayOrigins.length === 0 ? "none" : details.relayOrigins);
|
|
1166
|
+
addDetail("Expires (UTC)", details.expiresAt === undefined ? "not specified" : new Date(details.expiresAt).toISOString());
|
|
1167
|
+
}
|
|
1168
|
+
catch (error) {
|
|
1169
|
+
rows.push({
|
|
1170
|
+
text: `Verification unavailable: ${error instanceof Error ? error.message : String(error)}`,
|
|
1171
|
+
tone: "error",
|
|
1172
|
+
});
|
|
1173
|
+
}
|
|
1174
|
+
if (qrFits) {
|
|
1175
|
+
rows.push({ key: "pairing-show-qr", text: "Show pairing QR", tone: "text" });
|
|
1176
|
+
}
|
|
1177
|
+
else if (qrError) {
|
|
1178
|
+
rows.push({ text: `QR unavailable: ${qrError}`, tone: "warning" });
|
|
1179
|
+
}
|
|
1180
|
+
else {
|
|
1181
|
+
rows.push({ text: "Enlarge the terminal to show the complete QR code.", tone: "warning" });
|
|
1182
|
+
rows.push({ text: "Use Copy pairing ticket instead of exposing it in scrollback.", tone: "dim" });
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
if (this.view.ticket)
|
|
1186
|
+
rows.push({ key: "pairing-copy", text: "Copy pairing ticket", tone: "text" });
|
|
1187
|
+
if (this.view.recoveryBackupPath) {
|
|
1188
|
+
rows.push({
|
|
1189
|
+
text: "A recoverable daemon-state backup is available from before the endpoint failure.",
|
|
1190
|
+
tone: "warning",
|
|
1191
|
+
});
|
|
1192
|
+
rows.push({ key: "pairing-recover", text: "Recover previous daemon state…", tone: "warning" });
|
|
1193
|
+
}
|
|
1194
|
+
rows.push({
|
|
1195
|
+
key: "pairing-back",
|
|
1196
|
+
text: this.view.phase === "completed"
|
|
1197
|
+
? "Return to overview"
|
|
1198
|
+
: this.view.phase === "starting"
|
|
1199
|
+
? "Back to overview"
|
|
1200
|
+
: "Cancel pairing",
|
|
1201
|
+
tone: "text",
|
|
1202
|
+
});
|
|
1203
|
+
return rows;
|
|
1204
|
+
}
|
|
1205
|
+
renderRow(row, width) {
|
|
1206
|
+
const marker = row.raw ? "" : row.key ? (row.key === this.selectedKey ? "› " : " ") : " ";
|
|
1207
|
+
const color = row.tone ?? "text";
|
|
1208
|
+
const safeText = row.raw ? row.text : stripAnsi(row.text).replace(UNSAFE_TERMINAL_CHARACTERS, "");
|
|
1209
|
+
const content = truncateToWidth(`${marker}${safeText}`, width, "…");
|
|
1210
|
+
let styled = theme.fg(color, content);
|
|
1211
|
+
if (row.key === this.selectedKey) {
|
|
1212
|
+
styled = theme.bg("selectedBg", `${styled}${" ".repeat(Math.max(0, width - visibleWidth(content)))}`);
|
|
1213
|
+
}
|
|
1214
|
+
return truncateToWidth(styled, width, "");
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
//# sourceMappingURL=remote-control-center.js.map
|