@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,179 @@
|
|
|
1
|
+
import type { RpcRegisterPushTargetArgs, RpcRegisterPushTargetResponse } from "../../rpc/types.ts";
|
|
2
|
+
import type { IrohRemoteAuditLogger } from "./audit.ts";
|
|
3
|
+
import type { IrohRemoteClient, IrohRemotePushTokenEnvironment } from "./state.ts";
|
|
4
|
+
import type { IrohRemoteHostStateManager } from "./state-manager.ts";
|
|
5
|
+
export declare const DEFAULT_IROH_REMOTE_PUSH_RELAY_RETRY_ATTEMPTS = 3;
|
|
6
|
+
export declare const DEFAULT_IROH_REMOTE_PUSH_RELAY_RETRY_DELAY_MS = 250;
|
|
7
|
+
export declare const DEFAULT_IROH_REMOTE_PUSH_RELAY_TIMEOUT_MS = 10000;
|
|
8
|
+
export declare const DEFAULT_IROH_REMOTE_PUSH_RELAY_URL = "https://us-central1-volt-3fae7.cloudfunctions.net/pushRelay";
|
|
9
|
+
export type IrohRemotePushTargetRegistrationRequest = RpcRegisterPushTargetArgs;
|
|
10
|
+
export type IrohRemotePushTargetRegistrationResult = RpcRegisterPushTargetResponse;
|
|
11
|
+
export interface IrohRemotePushNotificationIntent {
|
|
12
|
+
eventId: string;
|
|
13
|
+
kind: string;
|
|
14
|
+
title: string;
|
|
15
|
+
body: string;
|
|
16
|
+
sessionId?: string;
|
|
17
|
+
workspace?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface IrohRemoteLiveActivityToolGlyph {
|
|
20
|
+
name: string;
|
|
21
|
+
symbolName: string;
|
|
22
|
+
status: "started" | "completed" | "failed";
|
|
23
|
+
}
|
|
24
|
+
export interface IrohRemoteLiveActivityContentState {
|
|
25
|
+
status: "running" | "completed" | "failed" | "waiting";
|
|
26
|
+
statusText: string;
|
|
27
|
+
currentTool?: IrohRemoteLiveActivityToolGlyph;
|
|
28
|
+
recentTools: IrohRemoteLiveActivityToolGlyph[];
|
|
29
|
+
sessionID?: string;
|
|
30
|
+
workspaceName?: string;
|
|
31
|
+
updatedAtEpochSeconds: number;
|
|
32
|
+
}
|
|
33
|
+
export interface IrohRemoteLiveActivityUpdateIntent {
|
|
34
|
+
eventId: string;
|
|
35
|
+
kind: string;
|
|
36
|
+
activityEvent?: "update" | "end";
|
|
37
|
+
contentState: IrohRemoteLiveActivityContentState;
|
|
38
|
+
staleDateEpochSeconds?: number;
|
|
39
|
+
dismissalDateEpochSeconds?: number;
|
|
40
|
+
}
|
|
41
|
+
export interface IrohRemotePushRelayNotificationRequest {
|
|
42
|
+
pushTargetId: string;
|
|
43
|
+
pushTargetAuthToken: string;
|
|
44
|
+
eventId: string;
|
|
45
|
+
kind: string;
|
|
46
|
+
title: string;
|
|
47
|
+
body: string;
|
|
48
|
+
workspace?: string;
|
|
49
|
+
data: {
|
|
50
|
+
eventId: string;
|
|
51
|
+
kind: string;
|
|
52
|
+
sessionId?: string;
|
|
53
|
+
workspace?: string;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export interface IrohRemotePushRelayLiveActivityRequest {
|
|
57
|
+
pushTargetId: string;
|
|
58
|
+
pushTargetAuthToken: string;
|
|
59
|
+
activityId: string;
|
|
60
|
+
activityPushToken: string;
|
|
61
|
+
/** APNs environment of the activity push token, when the client reported one. */
|
|
62
|
+
tokenEnvironment?: IrohRemotePushTokenEnvironment;
|
|
63
|
+
eventId: string;
|
|
64
|
+
kind: string;
|
|
65
|
+
contentState: IrohRemoteLiveActivityContentState;
|
|
66
|
+
activityEvent?: "update" | "end";
|
|
67
|
+
staleDateEpochSeconds?: number;
|
|
68
|
+
dismissalDateEpochSeconds?: number;
|
|
69
|
+
}
|
|
70
|
+
export interface IrohRemotePushRelayRevocationRequest {
|
|
71
|
+
pushTargetId: string;
|
|
72
|
+
pushTargetAuthToken: string;
|
|
73
|
+
}
|
|
74
|
+
export type IrohRemotePushRelayNotificationResult = {
|
|
75
|
+
status: "sent";
|
|
76
|
+
} | {
|
|
77
|
+
status: "invalid_target";
|
|
78
|
+
};
|
|
79
|
+
export type IrohRemotePushRelayRevocationResult = {
|
|
80
|
+
status: "revoked";
|
|
81
|
+
} | {
|
|
82
|
+
status: "already_absent";
|
|
83
|
+
};
|
|
84
|
+
export interface IrohRemotePushRelayClient {
|
|
85
|
+
sendNotification(request: IrohRemotePushRelayNotificationRequest): Promise<IrohRemotePushRelayNotificationResult>;
|
|
86
|
+
sendLiveActivityUpdate?(request: IrohRemotePushRelayLiveActivityRequest): Promise<IrohRemotePushRelayNotificationResult>;
|
|
87
|
+
revokePushTarget?(request: IrohRemotePushRelayRevocationRequest): Promise<IrohRemotePushRelayRevocationResult>;
|
|
88
|
+
}
|
|
89
|
+
export interface IrohRemotePushTargetRevocationSummary {
|
|
90
|
+
attempted: number;
|
|
91
|
+
revoked: number;
|
|
92
|
+
alreadyAbsent: number;
|
|
93
|
+
failed: number;
|
|
94
|
+
skipped: number;
|
|
95
|
+
}
|
|
96
|
+
export type IrohRemotePushNotificationDeliveryStatus = "sent" | "no_push_target" | "duplicate" | "failed" | "invalid_target";
|
|
97
|
+
export interface IrohRemotePushNotificationDelivery {
|
|
98
|
+
deliverNotification(notification: IrohRemotePushNotificationIntent): Promise<IrohRemotePushNotificationDeliveryStatus>;
|
|
99
|
+
deliverLiveActivityUpdate?(update: IrohRemoteLiveActivityUpdateIntent): Promise<IrohRemotePushNotificationDeliveryStatus>;
|
|
100
|
+
}
|
|
101
|
+
export interface IrohRemotePushNotificationDeduper {
|
|
102
|
+
tryMark(clientNodeId: string, eventId: string): boolean;
|
|
103
|
+
/** Release a mark claimed by tryMark when the corresponding delivery did not succeed. */
|
|
104
|
+
unmark(clientNodeId: string, eventId: string): void;
|
|
105
|
+
}
|
|
106
|
+
export interface IrohRemotePushNotificationDispatcherOptions {
|
|
107
|
+
auditLogger?: IrohRemoteAuditLogger;
|
|
108
|
+
clientNodeId: string;
|
|
109
|
+
deduper?: IrohRemotePushNotificationDeduper;
|
|
110
|
+
now?: () => number;
|
|
111
|
+
relayClient: IrohRemotePushRelayClient;
|
|
112
|
+
retryAttempts?: number;
|
|
113
|
+
retryDelayMs?: number;
|
|
114
|
+
stateManager: IrohRemoteHostStateManager;
|
|
115
|
+
workspace?: string;
|
|
116
|
+
}
|
|
117
|
+
export interface IrohRemotePushRelayHttpClientOptions {
|
|
118
|
+
authToken?: string;
|
|
119
|
+
baseUrl?: string;
|
|
120
|
+
fetcher?: (input: string, init: RequestInit) => Promise<Response>;
|
|
121
|
+
timeoutMs?: number;
|
|
122
|
+
}
|
|
123
|
+
export declare const MAX_IROH_REMOTE_PUSH_TARGET_REVOCATIONS_PER_CLIENT = 8;
|
|
124
|
+
export declare const MAX_IROH_REMOTE_PUSH_TARGET_REVOCATION_CONCURRENCY = 4;
|
|
125
|
+
export declare class IrohRemoteInMemoryPushNotificationDeduper implements IrohRemotePushNotificationDeduper {
|
|
126
|
+
private readonly sentEventIdsByClient;
|
|
127
|
+
tryMark(clientNodeId: string, eventId: string): boolean;
|
|
128
|
+
unmark(clientNodeId: string, eventId: string): void;
|
|
129
|
+
}
|
|
130
|
+
export declare class IrohRemotePushRelayHttpError extends Error {
|
|
131
|
+
readonly status: number;
|
|
132
|
+
readonly transient: boolean;
|
|
133
|
+
constructor(status: number, transient: boolean, detail?: string);
|
|
134
|
+
}
|
|
135
|
+
export declare class IrohRemotePushRelayHttpClient implements IrohRemotePushRelayClient {
|
|
136
|
+
private readonly authToken;
|
|
137
|
+
private readonly baseUrl;
|
|
138
|
+
private readonly fetcher;
|
|
139
|
+
private readonly timeoutMs;
|
|
140
|
+
constructor(options: IrohRemotePushRelayHttpClientOptions);
|
|
141
|
+
sendNotification(request: IrohRemotePushRelayNotificationRequest): Promise<IrohRemotePushRelayNotificationResult>;
|
|
142
|
+
sendLiveActivityUpdate(request: IrohRemotePushRelayLiveActivityRequest): Promise<IrohRemotePushRelayNotificationResult>;
|
|
143
|
+
revokePushTarget(request: IrohRemotePushRelayRevocationRequest): Promise<IrohRemotePushRelayRevocationResult>;
|
|
144
|
+
private sendRelayRequest;
|
|
145
|
+
private createHeaders;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Best-effort cleanup after local client revocation. Local authority is already
|
|
149
|
+
* gone before this runs, so relay failures are summarized rather than thrown.
|
|
150
|
+
* The call count is capped to keep a corrupted or malicious state file from
|
|
151
|
+
* turning one control request into unbounded outbound work; relay TTL bounds any
|
|
152
|
+
* skipped or failed credential's remaining lifetime.
|
|
153
|
+
*/
|
|
154
|
+
export declare function revokeIrohRemoteClientPushTargets(client: Pick<IrohRemoteClient, "pushTargets"> | undefined, relayClient: IrohRemotePushRelayClient): Promise<IrohRemotePushTargetRevocationSummary>;
|
|
155
|
+
export declare class IrohRemotePushNotificationDispatcher implements IrohRemotePushNotificationDelivery {
|
|
156
|
+
private readonly auditLogger;
|
|
157
|
+
private readonly clientNodeId;
|
|
158
|
+
private readonly deduper;
|
|
159
|
+
private readonly now;
|
|
160
|
+
private readonly relayClient;
|
|
161
|
+
private readonly retryAttempts;
|
|
162
|
+
private readonly retryDelayMs;
|
|
163
|
+
private readonly stateManager;
|
|
164
|
+
private readonly workspace;
|
|
165
|
+
constructor(options: IrohRemotePushNotificationDispatcherOptions);
|
|
166
|
+
registerPushTarget(args: unknown): Promise<RpcRegisterPushTargetResponse>;
|
|
167
|
+
deliverNotification(notification: IrohRemotePushNotificationIntent): Promise<IrohRemotePushNotificationDeliveryStatus>;
|
|
168
|
+
deliverLiveActivityUpdate(update: IrohRemoteLiveActivityUpdateIntent): Promise<IrohRemotePushNotificationDeliveryStatus>;
|
|
169
|
+
private markDeliveryIntent;
|
|
170
|
+
private logPushFallback;
|
|
171
|
+
private sendNotificationWithRetry;
|
|
172
|
+
private sendLiveActivityUpdateWithRetry;
|
|
173
|
+
private sendWithRetry;
|
|
174
|
+
private logPushDelivery;
|
|
175
|
+
private log;
|
|
176
|
+
}
|
|
177
|
+
export declare function hashIrohRemotePushToken(token: string): string;
|
|
178
|
+
export declare function parseRegisterPushTargetArgs(value: unknown): RpcRegisterPushTargetArgs;
|
|
179
|
+
//# sourceMappingURL=push.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../../../src/core/remote/iroh/push.ts"],"names":[],"mappings":"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","sourcesContent":["import { createHash } from \"node:crypto\";\nimport type { RpcRegisterPushTargetArgs, RpcRegisterPushTargetResponse } from \"../../rpc/types.ts\";\nimport type { IrohRemoteAuditEventInput, IrohRemoteAuditLogger } from \"./audit.ts\";\nimport type {\n\tIrohRemoteClient,\n\tIrohRemoteLiveActivityRegistration,\n\tIrohRemotePushTarget,\n\tIrohRemotePushTargetPlatform,\n\tIrohRemotePushTargetProvider,\n\tIrohRemotePushTokenEnvironment,\n} from \"./state.ts\";\nimport type { IrohRemoteHostStateManager } from \"./state-manager.ts\";\n\nexport const DEFAULT_IROH_REMOTE_PUSH_RELAY_RETRY_ATTEMPTS = 3;\nexport const DEFAULT_IROH_REMOTE_PUSH_RELAY_RETRY_DELAY_MS = 250;\nexport const DEFAULT_IROH_REMOTE_PUSH_RELAY_TIMEOUT_MS = 10_000;\nexport const DEFAULT_IROH_REMOTE_PUSH_RELAY_URL = \"https://us-central1-volt-3fae7.cloudfunctions.net/pushRelay\";\n\nexport type IrohRemotePushTargetRegistrationRequest = RpcRegisterPushTargetArgs;\nexport type IrohRemotePushTargetRegistrationResult = RpcRegisterPushTargetResponse;\n\nexport interface IrohRemotePushNotificationIntent {\n\teventId: string;\n\tkind: string;\n\ttitle: string;\n\tbody: string;\n\tsessionId?: string;\n\tworkspace?: string;\n}\n\nexport interface IrohRemoteLiveActivityToolGlyph {\n\tname: string;\n\tsymbolName: string;\n\tstatus: \"started\" | \"completed\" | \"failed\";\n}\n\nexport interface IrohRemoteLiveActivityContentState {\n\tstatus: \"running\" | \"completed\" | \"failed\" | \"waiting\";\n\tstatusText: string;\n\tcurrentTool?: IrohRemoteLiveActivityToolGlyph;\n\trecentTools: IrohRemoteLiveActivityToolGlyph[];\n\tsessionID?: string;\n\tworkspaceName?: string;\n\tupdatedAtEpochSeconds: number;\n}\n\nexport interface IrohRemoteLiveActivityUpdateIntent {\n\teventId: string;\n\tkind: string;\n\tactivityEvent?: \"update\" | \"end\";\n\tcontentState: IrohRemoteLiveActivityContentState;\n\tstaleDateEpochSeconds?: number;\n\tdismissalDateEpochSeconds?: number;\n}\n\nexport interface IrohRemotePushRelayNotificationRequest {\n\tpushTargetId: string;\n\tpushTargetAuthToken: string;\n\teventId: string;\n\tkind: string;\n\ttitle: string;\n\tbody: string;\n\tworkspace?: string;\n\tdata: {\n\t\teventId: string;\n\t\tkind: string;\n\t\tsessionId?: string;\n\t\tworkspace?: string;\n\t};\n}\n\nexport interface IrohRemotePushRelayLiveActivityRequest {\n\tpushTargetId: string;\n\tpushTargetAuthToken: string;\n\tactivityId: string;\n\tactivityPushToken: string;\n\t/** APNs environment of the activity push token, when the client reported one. */\n\ttokenEnvironment?: IrohRemotePushTokenEnvironment;\n\teventId: string;\n\tkind: string;\n\tcontentState: IrohRemoteLiveActivityContentState;\n\tactivityEvent?: \"update\" | \"end\";\n\tstaleDateEpochSeconds?: number;\n\tdismissalDateEpochSeconds?: number;\n}\n\nexport interface IrohRemotePushRelayRevocationRequest {\n\tpushTargetId: string;\n\tpushTargetAuthToken: string;\n}\n\nexport type IrohRemotePushRelayNotificationResult = { status: \"sent\" } | { status: \"invalid_target\" };\nexport type IrohRemotePushRelayRevocationResult = { status: \"revoked\" } | { status: \"already_absent\" };\n\nexport interface IrohRemotePushRelayClient {\n\tsendNotification(request: IrohRemotePushRelayNotificationRequest): Promise<IrohRemotePushRelayNotificationResult>;\n\tsendLiveActivityUpdate?(\n\t\trequest: IrohRemotePushRelayLiveActivityRequest,\n\t): Promise<IrohRemotePushRelayNotificationResult>;\n\trevokePushTarget?(request: IrohRemotePushRelayRevocationRequest): Promise<IrohRemotePushRelayRevocationResult>;\n}\n\nexport interface IrohRemotePushTargetRevocationSummary {\n\tattempted: number;\n\trevoked: number;\n\talreadyAbsent: number;\n\tfailed: number;\n\tskipped: number;\n}\n\nexport type IrohRemotePushNotificationDeliveryStatus =\n\t| \"sent\"\n\t| \"no_push_target\"\n\t| \"duplicate\"\n\t| \"failed\"\n\t| \"invalid_target\";\n\nexport interface IrohRemotePushNotificationDelivery {\n\tdeliverNotification(\n\t\tnotification: IrohRemotePushNotificationIntent,\n\t): Promise<IrohRemotePushNotificationDeliveryStatus>;\n\tdeliverLiveActivityUpdate?(\n\t\tupdate: IrohRemoteLiveActivityUpdateIntent,\n\t): Promise<IrohRemotePushNotificationDeliveryStatus>;\n}\n\nexport interface IrohRemotePushNotificationDeduper {\n\ttryMark(clientNodeId: string, eventId: string): boolean;\n\t/** Release a mark claimed by tryMark when the corresponding delivery did not succeed. */\n\tunmark(clientNodeId: string, eventId: string): void;\n}\n\nexport interface IrohRemotePushNotificationDispatcherOptions {\n\tauditLogger?: IrohRemoteAuditLogger;\n\tclientNodeId: string;\n\tdeduper?: IrohRemotePushNotificationDeduper;\n\tnow?: () => number;\n\trelayClient: IrohRemotePushRelayClient;\n\tretryAttempts?: number;\n\tretryDelayMs?: number;\n\tstateManager: IrohRemoteHostStateManager;\n\tworkspace?: string;\n}\n\nexport interface IrohRemotePushRelayHttpClientOptions {\n\tauthToken?: string;\n\tbaseUrl?: string;\n\tfetcher?: (input: string, init: RequestInit) => Promise<Response>;\n\ttimeoutMs?: number;\n}\n\n// The deduper lives for the daemon's whole lifetime, so the per-client id set is\n// bounded. Re-marking an evicted id at most re-sends one very old notification.\nconst MAX_SENT_EVENT_IDS_PER_CLIENT = 1000;\nexport const MAX_IROH_REMOTE_PUSH_TARGET_REVOCATIONS_PER_CLIENT = 8;\nexport const MAX_IROH_REMOTE_PUSH_TARGET_REVOCATION_CONCURRENCY = 4;\nconst MAX_IROH_REMOTE_PUSH_RELAY_RESPONSE_BYTES = 1024;\n\nexport class IrohRemoteInMemoryPushNotificationDeduper implements IrohRemotePushNotificationDeduper {\n\tprivate readonly sentEventIdsByClient = new Map<string, Set<string>>();\n\n\ttryMark(clientNodeId: string, eventId: string): boolean {\n\t\tlet sentEventIds = this.sentEventIdsByClient.get(clientNodeId);\n\t\tif (!sentEventIds) {\n\t\t\tsentEventIds = new Set();\n\t\t\tthis.sentEventIdsByClient.set(clientNodeId, sentEventIds);\n\t\t}\n\t\tif (sentEventIds.has(eventId)) {\n\t\t\treturn false;\n\t\t}\n\t\tsentEventIds.add(eventId);\n\t\t// Evict oldest ids (Sets preserve insertion order) once over the cap.\n\t\twhile (sentEventIds.size > MAX_SENT_EVENT_IDS_PER_CLIENT) {\n\t\t\tconst oldest = sentEventIds.values().next().value;\n\t\t\tif (oldest === undefined) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsentEventIds.delete(oldest);\n\t\t}\n\t\treturn true;\n\t}\n\n\tunmark(clientNodeId: string, eventId: string): void {\n\t\tthis.sentEventIdsByClient.get(clientNodeId)?.delete(eventId);\n\t}\n}\n\nexport class IrohRemotePushRelayHttpError extends Error {\n\treadonly status: number;\n\treadonly transient: boolean;\n\n\tconstructor(status: number, transient: boolean, detail?: string) {\n\t\tsuper(`Push relay request failed with HTTP ${status}${detail ? ` (${detail})` : \"\"}`);\n\t\tthis.name = \"IrohRemotePushRelayHttpError\";\n\t\tthis.status = status;\n\t\tthis.transient = transient;\n\t}\n}\n\nconst MAX_RELAY_ERROR_DETAIL_LENGTH = 200;\n\n/** Best-effort extraction of the relay's `{ error, code }` body for audit logs. */\nasync function readRelayErrorDetail(response: Response): Promise<string | undefined> {\n\ttry {\n\t\tconst body: unknown = await readBoundedRelayJson(response);\n\t\tif (typeof body !== \"object\" || body === null) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst record = body as Record<string, unknown>;\n\t\tconst parts = [record.error, record.code].filter(\n\t\t\t(part): part is string => typeof part === \"string\" && part.length > 0,\n\t\t);\n\t\tif (parts.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn parts.join(\": \").slice(0, MAX_RELAY_ERROR_DETAIL_LENGTH);\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\nexport class IrohRemotePushRelayHttpClient implements IrohRemotePushRelayClient {\n\tprivate readonly authToken: string | undefined;\n\tprivate readonly baseUrl: string;\n\tprivate readonly fetcher: (input: string, init: RequestInit) => Promise<Response>;\n\tprivate readonly timeoutMs: number;\n\n\tconstructor(options: IrohRemotePushRelayHttpClientOptions) {\n\t\tthis.authToken = options.authToken;\n\t\tconst baseUrl = options.baseUrl ?? DEFAULT_IROH_REMOTE_PUSH_RELAY_URL;\n\t\tthis.baseUrl = baseUrl.endsWith(\"/\") ? baseUrl : `${baseUrl}/`;\n\t\tthis.fetcher = options.fetcher ?? ((input, init) => fetch(input, init));\n\t\tthis.timeoutMs = options.timeoutMs ?? DEFAULT_IROH_REMOTE_PUSH_RELAY_TIMEOUT_MS;\n\t}\n\n\tasync sendNotification(\n\t\trequest: IrohRemotePushRelayNotificationRequest,\n\t): Promise<IrohRemotePushRelayNotificationResult> {\n\t\treturn this.sendRelayRequest(\"v1/notifications\", createRelayNotificationBody(request));\n\t}\n\n\tasync sendLiveActivityUpdate(\n\t\trequest: IrohRemotePushRelayLiveActivityRequest,\n\t): Promise<IrohRemotePushRelayNotificationResult> {\n\t\treturn this.sendRelayRequest(\"v1/live-activities\", createRelayLiveActivityBody(request));\n\t}\n\n\tasync revokePushTarget(request: IrohRemotePushRelayRevocationRequest): Promise<IrohRemotePushRelayRevocationResult> {\n\t\tconst response = await this.fetcher(new URL(\"v1/push-targets/revoke\", this.baseUrl).toString(), {\n\t\t\tbody: JSON.stringify(createRelayRevocationBody(request)),\n\t\t\theaders: this.createHeaders(),\n\t\t\tmethod: \"POST\",\n\t\t\tsignal: AbortSignal.timeout(this.timeoutMs),\n\t\t});\n\t\tif (response.status === 404 || response.status === 410) {\n\t\t\treturn { status: \"already_absent\" };\n\t\t}\n\t\tif (!response.ok) {\n\t\t\tthrow new IrohRemotePushRelayHttpError(\n\t\t\t\tresponse.status,\n\t\t\t\tisTransientHttpStatus(response.status),\n\t\t\t\tawait readRelayErrorDetail(response),\n\t\t\t);\n\t\t}\n\t\tconst body = await readBoundedRelayJson(response);\n\t\tif (body.status === \"revoked\") return { status: \"revoked\" };\n\t\tif (body.status === \"already_revoked\") return { status: \"already_absent\" };\n\t\tthrow new IrohRemotePushRelayHttpError(502, true, \"invalid revoke response\");\n\t}\n\n\tprivate async sendRelayRequest(\n\t\tpath: string,\n\t\tbody:\n\t\t\t| IrohRemotePushRelayNotificationRequest\n\t\t\t| IrohRemotePushRelayLiveActivityRequest\n\t\t\t| IrohRemotePushRelayRevocationRequest,\n\t): Promise<IrohRemotePushRelayNotificationResult> {\n\t\tconst response = await this.fetcher(new URL(path, this.baseUrl).toString(), {\n\t\t\tbody: JSON.stringify(body),\n\t\t\theaders: this.createHeaders(),\n\t\t\tmethod: \"POST\",\n\t\t\tsignal: AbortSignal.timeout(this.timeoutMs),\n\t\t});\n\t\tif (response.ok) {\n\t\t\treturn { status: \"sent\" };\n\t\t}\n\t\t// 404/410: target unknown or disabled. 422: the relay cannot deliver to\n\t\t// this target at all (e.g. a development-environment Live Activity token,\n\t\t// which FCM cannot reach) — treat as invalid so the caller prunes the\n\t\t// registration instead of retrying a permanently undeliverable channel.\n\t\tif (response.status === 404 || response.status === 410 || response.status === 422) {\n\t\t\treturn { status: \"invalid_target\" };\n\t\t}\n\t\tthrow new IrohRemotePushRelayHttpError(\n\t\t\tresponse.status,\n\t\t\tisTransientHttpStatus(response.status),\n\t\t\tawait readRelayErrorDetail(response),\n\t\t);\n\t}\n\n\tprivate createHeaders(): Record<string, string> {\n\t\treturn {\n\t\t\t\"content-type\": \"application/json\",\n\t\t\t...(this.authToken ? { authorization: `Bearer ${this.authToken}` } : {}),\n\t\t};\n\t}\n}\n\nfunction createRelayNotificationBody(\n\trequest: IrohRemotePushRelayNotificationRequest,\n): IrohRemotePushRelayNotificationRequest {\n\treturn {\n\t\tpushTargetId: request.pushTargetId,\n\t\tpushTargetAuthToken: request.pushTargetAuthToken,\n\t\teventId: request.eventId,\n\t\tkind: request.kind,\n\t\ttitle: request.title,\n\t\tbody: request.body,\n\t\t...(request.workspace === undefined ? {} : { workspace: request.workspace }),\n\t\tdata: request.data,\n\t};\n}\n\nfunction createRelayLiveActivityBody(\n\trequest: IrohRemotePushRelayLiveActivityRequest,\n): IrohRemotePushRelayLiveActivityRequest {\n\treturn {\n\t\tpushTargetId: request.pushTargetId,\n\t\tpushTargetAuthToken: request.pushTargetAuthToken,\n\t\tactivityId: request.activityId,\n\t\tactivityPushToken: request.activityPushToken,\n\t\t...(request.tokenEnvironment === undefined ? {} : { tokenEnvironment: request.tokenEnvironment }),\n\t\teventId: request.eventId,\n\t\tkind: request.kind,\n\t\tcontentState: request.contentState,\n\t\t...(request.activityEvent === undefined ? {} : { activityEvent: request.activityEvent }),\n\t\t...(request.staleDateEpochSeconds === undefined ? {} : { staleDateEpochSeconds: request.staleDateEpochSeconds }),\n\t\t...(request.dismissalDateEpochSeconds === undefined\n\t\t\t? {}\n\t\t\t: { dismissalDateEpochSeconds: request.dismissalDateEpochSeconds }),\n\t};\n}\n\nfunction createRelayRevocationBody(\n\trequest: IrohRemotePushRelayRevocationRequest,\n): IrohRemotePushRelayRevocationRequest {\n\treturn {\n\t\tpushTargetId: request.pushTargetId,\n\t\tpushTargetAuthToken: request.pushTargetAuthToken,\n\t};\n}\n\nasync function readBoundedRelayJson(response: Response): Promise<Record<string, unknown>> {\n\tconst reader = response.body?.getReader();\n\tif (!reader) return {};\n\tconst chunks: Uint8Array[] = [];\n\tlet totalBytes = 0;\n\ttry {\n\t\twhile (true) {\n\t\t\tconst chunk = await reader.read();\n\t\t\tif (chunk.done) break;\n\t\t\ttotalBytes += chunk.value.byteLength;\n\t\t\tif (totalBytes > MAX_IROH_REMOTE_PUSH_RELAY_RESPONSE_BYTES) {\n\t\t\t\tawait reader.cancel();\n\t\t\t\tthrow new IrohRemotePushRelayHttpError(502, true, \"relay response too large\");\n\t\t\t}\n\t\t\tchunks.push(chunk.value);\n\t\t}\n\t} finally {\n\t\treader.releaseLock();\n\t}\n\tconst bytes = new Uint8Array(totalBytes);\n\tlet offset = 0;\n\tfor (const chunk of chunks) {\n\t\tbytes.set(chunk, offset);\n\t\toffset += chunk.byteLength;\n\t}\n\ttry {\n\t\tconst parsed: unknown = JSON.parse(new TextDecoder(\"utf-8\", { fatal: true }).decode(bytes));\n\t\treturn typeof parsed === \"object\" && parsed !== null && !Array.isArray(parsed)\n\t\t\t? (parsed as Record<string, unknown>)\n\t\t\t: {};\n\t} catch {\n\t\treturn {};\n\t}\n}\n\n/**\n * Best-effort cleanup after local client revocation. Local authority is already\n * gone before this runs, so relay failures are summarized rather than thrown.\n * The call count is capped to keep a corrupted or malicious state file from\n * turning one control request into unbounded outbound work; relay TTL bounds any\n * skipped or failed credential's remaining lifetime.\n */\nexport async function revokeIrohRemoteClientPushTargets(\n\tclient: Pick<IrohRemoteClient, \"pushTargets\"> | undefined,\n\trelayClient: IrohRemotePushRelayClient,\n): Promise<IrohRemotePushTargetRevocationSummary> {\n\tconst uniqueTargets = new Map<string, IrohRemotePushRelayRevocationRequest>();\n\tfor (const target of client?.pushTargets ?? []) {\n\t\tif (target.id.length === 0 || target.pushTargetAuthToken.length === 0) continue;\n\t\tuniqueTargets.set(`${target.id}\\0${target.pushTargetAuthToken}`, {\n\t\t\tpushTargetId: target.id,\n\t\t\tpushTargetAuthToken: target.pushTargetAuthToken,\n\t\t});\n\t}\n\tconst targets = Array.from(uniqueTargets.values());\n\tconst selectedTargets = targets.slice(0, MAX_IROH_REMOTE_PUSH_TARGET_REVOCATIONS_PER_CLIENT);\n\tconst summary: IrohRemotePushTargetRevocationSummary = {\n\t\tattempted: selectedTargets.length,\n\t\trevoked: 0,\n\t\talreadyAbsent: 0,\n\t\tfailed: 0,\n\t\tskipped: targets.length - selectedTargets.length,\n\t};\n\tconst revokePushTarget = relayClient.revokePushTarget?.bind(relayClient);\n\tif (!revokePushTarget) {\n\t\tsummary.failed = selectedTargets.length;\n\t\treturn summary;\n\t}\n\tfor (let offset = 0; offset < selectedTargets.length; offset += MAX_IROH_REMOTE_PUSH_TARGET_REVOCATION_CONCURRENCY) {\n\t\tconst batch = selectedTargets.slice(offset, offset + MAX_IROH_REMOTE_PUSH_TARGET_REVOCATION_CONCURRENCY);\n\t\tconst results = await Promise.allSettled(batch.map((target) => revokePushTarget(target)));\n\t\tfor (const result of results) {\n\t\t\tif (result.status === \"rejected\") {\n\t\t\t\tsummary.failed += 1;\n\t\t\t} else if (result.value.status === \"revoked\") {\n\t\t\t\tsummary.revoked += 1;\n\t\t\t} else {\n\t\t\t\tsummary.alreadyAbsent += 1;\n\t\t\t}\n\t\t}\n\t}\n\treturn summary;\n}\n\nexport class IrohRemotePushNotificationDispatcher implements IrohRemotePushNotificationDelivery {\n\tprivate readonly auditLogger: IrohRemoteAuditLogger | undefined;\n\tprivate readonly clientNodeId: string;\n\tprivate readonly deduper: IrohRemotePushNotificationDeduper;\n\tprivate readonly now: () => number;\n\tprivate readonly relayClient: IrohRemotePushRelayClient;\n\tprivate readonly retryAttempts: number;\n\tprivate readonly retryDelayMs: number;\n\tprivate readonly stateManager: IrohRemoteHostStateManager;\n\tprivate readonly workspace: string | undefined;\n\n\tconstructor(options: IrohRemotePushNotificationDispatcherOptions) {\n\t\tthis.auditLogger = options.auditLogger;\n\t\tthis.clientNodeId = options.clientNodeId;\n\t\tthis.deduper = options.deduper ?? new IrohRemoteInMemoryPushNotificationDeduper();\n\t\tthis.now = options.now ?? Date.now;\n\t\tthis.relayClient = options.relayClient;\n\t\tthis.retryAttempts = Math.max(\n\t\t\t1,\n\t\t\tMath.trunc(options.retryAttempts ?? DEFAULT_IROH_REMOTE_PUSH_RELAY_RETRY_ATTEMPTS),\n\t\t);\n\t\tthis.retryDelayMs = Math.max(\n\t\t\t0,\n\t\t\tMath.trunc(options.retryDelayMs ?? DEFAULT_IROH_REMOTE_PUSH_RELAY_RETRY_DELAY_MS),\n\t\t);\n\t\tthis.stateManager = options.stateManager;\n\t\tthis.workspace = options.workspace;\n\t}\n\n\tasync registerPushTarget(args: unknown): Promise<RpcRegisterPushTargetResponse> {\n\t\tconst registration = parseRegisterPushTargetArgs(args);\n\t\ttry {\n\t\t\tconst now = this.now();\n\t\t\tconst pushTarget: IrohRemotePushTarget = {\n\t\t\t\tid: registration.pushTargetId,\n\t\t\t\tprovider: registration.provider,\n\t\t\t\tplatform: registration.platform,\n\t\t\t\tpushTargetAuthToken: registration.pushTargetAuthToken,\n\t\t\t\t...(registration.relayUrl === undefined ? {} : { relayUrl: registration.relayUrl }),\n\t\t\t\t...(registration.tokenHash === undefined ? {} : { tokenHash: registration.tokenHash }),\n\t\t\t\t...(registration.liveActivity === undefined\n\t\t\t\t\t? {}\n\t\t\t\t\t: {\n\t\t\t\t\t\t\tliveActivity: {\n\t\t\t\t\t\t\t\tactivityId: registration.liveActivity.activityId,\n\t\t\t\t\t\t\t\tpushToken: registration.liveActivity.pushToken,\n\t\t\t\t\t\t\t\t...(registration.liveActivity.tokenHash === undefined\n\t\t\t\t\t\t\t\t\t? {}\n\t\t\t\t\t\t\t\t\t: { tokenHash: registration.liveActivity.tokenHash }),\n\t\t\t\t\t\t\t\t...(registration.liveActivity.tokenEnvironment === undefined\n\t\t\t\t\t\t\t\t\t? {}\n\t\t\t\t\t\t\t\t\t: { tokenEnvironment: registration.liveActivity.tokenEnvironment }),\n\t\t\t\t\t\t\t\tupdatedAt: now,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}),\n\t\t\t\tenabled: registration.enabled,\n\t\t\t\tcreatedAt: now,\n\t\t\t\tupdatedAt: now,\n\t\t\t};\n\t\t\tconst client = await this.stateManager.upsertClientPushTarget(this.clientNodeId, pushTarget);\n\t\t\tif (!client) {\n\t\t\t\tthrow new Error(\"paired client not found\");\n\t\t\t}\n\t\t\tawait this.log({\n\t\t\t\ttype: \"push_target_registered\",\n\t\t\t\tclientNodeId: this.clientNodeId,\n\t\t\t\tworkspace: this.workspace,\n\t\t\t\tsuccess: true,\n\t\t\t\tdetails: getPushTargetAuditDetails(pushTarget),\n\t\t\t});\n\t\t\treturn { status: \"registered\", pushTargetId: registration.pushTargetId };\n\t\t} catch (error: unknown) {\n\t\t\tconst errorMessage = toErrorMessage(error);\n\t\t\tconst redactedError =\n\t\t\t\tregistration.pushTargetAuthToken.length === 0\n\t\t\t\t\t? errorMessage\n\t\t\t\t\t: errorMessage.split(registration.pushTargetAuthToken).join(\"[redacted-push-target-auth-token]\");\n\t\t\tawait this.log({\n\t\t\t\ttype: \"push_target_registered\",\n\t\t\t\tclientNodeId: this.clientNodeId,\n\t\t\t\tworkspace: this.workspace,\n\t\t\t\tsuccess: false,\n\t\t\t\terror: redactedError,\n\t\t\t\tdetails: {\n\t\t\t\t\tpushTargetId: registration.pushTargetId,\n\t\t\t\t\tprovider: registration.provider,\n\t\t\t\t\tplatform: registration.platform,\n\t\t\t\t\trelayUrl: registration.relayUrl,\n\t\t\t\t\ttokenHash: registration.tokenHash,\n\t\t\t\t\tliveActivityTokenHash: registration.liveActivity?.tokenHash,\n\t\t\t\t\tliveActivityTokenEnvironment: registration.liveActivity?.tokenEnvironment,\n\t\t\t\t\tenabled: registration.enabled,\n\t\t\t\t},\n\t\t\t});\n\t\t\tthrow new Error(redactedError);\n\t\t}\n\t}\n\n\tasync deliverNotification(\n\t\tnotification: IrohRemotePushNotificationIntent,\n\t): Promise<IrohRemotePushNotificationDeliveryStatus> {\n\t\tif (!(await this.markDeliveryIntent(notification.eventId, notification.kind))) {\n\t\t\treturn \"duplicate\";\n\t\t}\n\n\t\tconst client = await this.stateManager.getClient(this.clientNodeId);\n\t\tconst pushTarget = selectEnabledPushTarget(client?.pushTargets ?? []);\n\t\tif (!pushTarget) {\n\t\t\tawait this.logPushFallback(notification.eventId, notification.kind, \"no_push_target\");\n\t\t\treturn \"no_push_target\";\n\t\t}\n\n\t\tconst relayRequest = createRelayNotificationRequest(pushTarget, notification);\n\t\ttry {\n\t\t\tconst relayResult = await this.sendNotificationWithRetry(relayRequest);\n\t\t\tif (relayResult.status === \"invalid_target\") {\n\t\t\t\tawait this.stateManager.disableClientPushTarget(this.clientNodeId, pushTarget.id, this.now());\n\t\t\t\tawait this.logPushDelivery(\n\t\t\t\t\tpushTarget,\n\t\t\t\t\tnotification.eventId,\n\t\t\t\t\tnotification.kind,\n\t\t\t\t\tfalse,\n\t\t\t\t\t\"push target is invalid or unregistered\",\n\t\t\t\t);\n\t\t\t\treturn \"invalid_target\";\n\t\t\t}\n\t\t\tawait this.logPushDelivery(pushTarget, notification.eventId, notification.kind, true);\n\t\t\treturn \"sent\";\n\t\t} catch (error: unknown) {\n\t\t\t// Release the dedup claim so a transient relay failure can be retried on a\n\t\t\t// later re-emission instead of being permanently suppressed as delivered.\n\t\t\tthis.deduper.unmark(this.clientNodeId, notification.eventId);\n\t\t\tawait this.logPushDelivery(pushTarget, notification.eventId, notification.kind, false, toErrorMessage(error));\n\t\t\treturn \"failed\";\n\t\t}\n\t}\n\n\tasync deliverLiveActivityUpdate(\n\t\tupdate: IrohRemoteLiveActivityUpdateIntent,\n\t): Promise<IrohRemotePushNotificationDeliveryStatus> {\n\t\tif (!(await this.markDeliveryIntent(update.eventId, update.kind))) {\n\t\t\treturn \"duplicate\";\n\t\t}\n\n\t\tconst client = await this.stateManager.getClient(this.clientNodeId);\n\t\tconst registration = selectLiveActivityRegistration(client, update.contentState);\n\t\tconst pushTarget = registration ? findRegisteredLiveActivityPushTarget(client, registration) : undefined;\n\t\tif (!registration || !pushTarget?.liveActivity) {\n\t\t\tawait this.logPushFallback(update.eventId, update.kind, \"no_live_activity_target\");\n\t\t\treturn \"no_push_target\";\n\t\t}\n\n\t\tconst relayRequest = createRelayLiveActivityRequest(pushTarget, update, registration.activityId);\n\t\ttry {\n\t\t\tconst relayResult = await this.sendLiveActivityUpdateWithRetry(relayRequest);\n\t\t\tif (relayResult.status === \"invalid_target\") {\n\t\t\t\tawait this.stateManager.pruneClientLiveActivityDeliveryChannel(this.clientNodeId, registration, this.now());\n\t\t\t\tawait this.logPushDelivery(\n\t\t\t\t\tpushTarget,\n\t\t\t\t\tupdate.eventId,\n\t\t\t\t\tupdate.kind,\n\t\t\t\t\tfalse,\n\t\t\t\t\t\"live activity target is invalid or unregistered\",\n\t\t\t\t\tregistration.tokenHash,\n\t\t\t\t);\n\t\t\t\treturn \"invalid_target\";\n\t\t\t}\n\t\t\tawait this.logPushDelivery(pushTarget, update.eventId, update.kind, true, undefined, registration.tokenHash);\n\t\t\treturn \"sent\";\n\t\t} catch (error: unknown) {\n\t\t\t// Release the dedup claim so a transient relay failure can be retried on a\n\t\t\t// later re-emission instead of being permanently suppressed as delivered.\n\t\t\tthis.deduper.unmark(this.clientNodeId, update.eventId);\n\t\t\tawait this.logPushDelivery(\n\t\t\t\tpushTarget,\n\t\t\t\tupdate.eventId,\n\t\t\t\tupdate.kind,\n\t\t\t\tfalse,\n\t\t\t\ttoErrorMessage(error),\n\t\t\t\tregistration.tokenHash,\n\t\t\t);\n\t\t\treturn \"failed\";\n\t\t}\n\t}\n\n\tprivate async markDeliveryIntent(eventId: string, kind: string): Promise<boolean> {\n\t\tif (this.deduper.tryMark(this.clientNodeId, eventId)) {\n\t\t\treturn true;\n\t\t}\n\t\tawait this.log({\n\t\t\ttype: \"push_notification_deduplicated\",\n\t\t\tclientNodeId: this.clientNodeId,\n\t\t\tworkspace: this.workspace,\n\t\t\tsuccess: true,\n\t\t\tdetails: { eventId, kind },\n\t\t});\n\t\treturn false;\n\t}\n\n\tprivate async logPushFallback(eventId: string, kind: string, reason: string): Promise<void> {\n\t\tawait this.log({\n\t\t\ttype: \"push_notification_fallback\",\n\t\t\tclientNodeId: this.clientNodeId,\n\t\t\tworkspace: this.workspace,\n\t\t\tsuccess: true,\n\t\t\tdetails: { eventId, kind, reason },\n\t\t});\n\t}\n\n\tprivate async sendNotificationWithRetry(\n\t\trequest: IrohRemotePushRelayNotificationRequest,\n\t): Promise<IrohRemotePushRelayNotificationResult> {\n\t\treturn this.sendWithRetry(() => this.relayClient.sendNotification(request));\n\t}\n\n\tprivate async sendLiveActivityUpdateWithRetry(\n\t\trequest: IrohRemotePushRelayLiveActivityRequest,\n\t): Promise<IrohRemotePushRelayNotificationResult> {\n\t\tconst sendLiveActivityUpdate = this.relayClient.sendLiveActivityUpdate?.bind(this.relayClient);\n\t\tif (!sendLiveActivityUpdate) {\n\t\t\tthrow new Error(\"push relay does not support live activity updates\");\n\t\t}\n\t\treturn this.sendWithRetry(() => sendLiveActivityUpdate(request));\n\t}\n\n\tprivate async sendWithRetry(\n\t\tsend: () => Promise<IrohRemotePushRelayNotificationResult>,\n\t): Promise<IrohRemotePushRelayNotificationResult> {\n\t\tlet lastError: unknown;\n\t\tfor (let attempt = 1; attempt <= this.retryAttempts; attempt += 1) {\n\t\t\ttry {\n\t\t\t\treturn await send();\n\t\t\t} catch (error: unknown) {\n\t\t\t\tlastError = error;\n\t\t\t\tif (attempt >= this.retryAttempts || !isTransientPushRelayError(error)) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t\tawait delay(this.retryDelayMs * attempt);\n\t\t\t}\n\t\t}\n\t\tthrow lastError;\n\t}\n\n\tprivate async logPushDelivery(\n\t\tpushTarget: IrohRemotePushTarget,\n\t\teventId: string,\n\t\tkind: string,\n\t\tsuccess: boolean,\n\t\terror?: string,\n\t\tdeliveredTokenHash?: string,\n\t): Promise<void> {\n\t\tawait this.log({\n\t\t\ttype: \"push_notification_delivered\",\n\t\t\tclientNodeId: this.clientNodeId,\n\t\t\tworkspace: this.workspace,\n\t\t\tsuccess,\n\t\t\terror,\n\t\t\tdetails: {\n\t\t\t\teventId,\n\t\t\t\tkind,\n\t\t\t\tpushTargetId: pushTarget.id,\n\t\t\t\tprovider: pushTarget.provider,\n\t\t\t\tplatform: pushTarget.platform,\n\t\t\t\ttokenHash: deliveredTokenHash ?? pushTarget.tokenHash,\n\t\t\t},\n\t\t});\n\t}\n\n\tprivate async log(event: IrohRemoteAuditEventInput): Promise<void> {\n\t\tif (!this.auditLogger) {\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tawait this.auditLogger.log(event);\n\t\t} catch {\n\t\t\t// Push relay side effects should not be reinterpreted as RPC failures if audit I/O fails.\n\t\t}\n\t}\n}\n\nexport function hashIrohRemotePushToken(token: string): string {\n\treturn `sha256:${createHash(\"sha256\").update(token, \"utf8\").digest(\"base64url\")}`;\n}\n\nexport function parseRegisterPushTargetArgs(value: unknown): RpcRegisterPushTargetArgs {\n\tconst args = expectRecord(value, \"register_push_target args\");\n\treturn {\n\t\tprovider: expectPushProvider(args.provider),\n\t\tplatform: expectPushPlatform(args.platform),\n\t\tpushTargetId: expectString(args.pushTargetId, \"push target id\"),\n\t\tpushTargetAuthToken: expectString(args.pushTargetAuthToken, \"push target auth token\"),\n\t\trelayUrl: expectOptionalString(args.relayUrl, \"push relay URL\"),\n\t\ttokenHash: expectOptionalString(args.tokenHash, \"push token hash\"),\n\t\tliveActivity: parseOptionalLiveActivityRegistration(args.liveActivity, \"push liveActivity\"),\n\t\tenabled: expectBoolean(args.enabled, \"push enabled\"),\n\t};\n}\n\nfunction parseOptionalLiveActivityRegistration(\n\tvalue: unknown,\n\tlabel: string,\n): RpcRegisterPushTargetArgs[\"liveActivity\"] {\n\tif (value === undefined) {\n\t\treturn undefined;\n\t}\n\tconst liveActivity = expectRecord(value, label);\n\treturn {\n\t\tactivityId: expectString(liveActivity.activityId, `${label} activityId`),\n\t\tpushToken: expectString(liveActivity.pushToken, `${label} pushToken`),\n\t\ttokenHash: expectOptionalString(liveActivity.tokenHash, `${label} tokenHash`),\n\t\ttokenEnvironment: expectOptionalPushTokenEnvironment(liveActivity.tokenEnvironment, `${label} tokenEnvironment`),\n\t};\n}\n\nfunction selectEnabledPushTarget(pushTargets: IrohRemotePushTarget[]): IrohRemotePushTarget | undefined {\n\treturn pushTargets\n\t\t.filter((target) => target.enabled)\n\t\t.sort((a, b) => b.updatedAt - a.updatedAt || b.createdAt - a.createdAt)[0];\n}\n\nfunction createRelayNotificationRequest(\n\tpushTarget: IrohRemotePushTarget,\n\tnotification: IrohRemotePushNotificationIntent,\n): IrohRemotePushRelayNotificationRequest {\n\tconst workspace = getSafeNotificationWorkspace(notification.workspace);\n\treturn {\n\t\tpushTargetId: pushTarget.id,\n\t\tpushTargetAuthToken: pushTarget.pushTargetAuthToken,\n\t\teventId: notification.eventId,\n\t\tkind: notification.kind,\n\t\ttitle: notification.title,\n\t\tbody: notification.body,\n\t\t...(workspace === undefined ? {} : { workspace }),\n\t\tdata: {\n\t\t\teventId: notification.eventId,\n\t\t\tkind: notification.kind,\n\t\t\t...(notification.sessionId === undefined ? {} : { sessionId: notification.sessionId }),\n\t\t\t...(workspace === undefined ? {} : { workspace }),\n\t\t},\n\t};\n}\n\nfunction getSafeNotificationWorkspace(workspace: string | undefined): string | undefined {\n\tif (workspace === undefined) {\n\t\treturn undefined;\n\t}\n\tconst trimmed = workspace.trim();\n\tif (trimmed.length === 0 || trimmed.includes(\"/\") || trimmed.includes(\"\\\\\") || trimmed.includes(\"\\0\")) {\n\t\treturn undefined;\n\t}\n\treturn trimmed;\n}\n\nfunction createRelayLiveActivityRequest(\n\tpushTarget: IrohRemotePushTarget,\n\tupdate: IrohRemoteLiveActivityUpdateIntent,\n\tactivityId = pushTarget.liveActivity?.activityId,\n): IrohRemotePushRelayLiveActivityRequest {\n\tif (!pushTarget.liveActivity) {\n\t\tthrow new Error(\"push target has no live activity token\");\n\t}\n\tif (!activityId) {\n\t\tthrow new Error(\"live activity registration has no activity id\");\n\t}\n\treturn {\n\t\tpushTargetId: pushTarget.id,\n\t\tpushTargetAuthToken: pushTarget.pushTargetAuthToken,\n\t\tactivityId,\n\t\tactivityPushToken: pushTarget.liveActivity.pushToken,\n\t\t...(pushTarget.liveActivity.tokenEnvironment === undefined\n\t\t\t? {}\n\t\t\t: { tokenEnvironment: pushTarget.liveActivity.tokenEnvironment }),\n\t\teventId: update.eventId,\n\t\tkind: update.kind,\n\t\tcontentState: update.contentState,\n\t\t...(update.activityEvent === undefined ? {} : { activityEvent: update.activityEvent }),\n\t\t...(update.staleDateEpochSeconds === undefined ? {} : { staleDateEpochSeconds: update.staleDateEpochSeconds }),\n\t\t...(update.dismissalDateEpochSeconds === undefined\n\t\t\t? {}\n\t\t\t: { dismissalDateEpochSeconds: update.dismissalDateEpochSeconds }),\n\t};\n}\n\nfunction getPushTargetAuditDetails(pushTarget: IrohRemotePushTarget): Record<string, unknown> {\n\treturn {\n\t\tpushTargetId: pushTarget.id,\n\t\tprovider: pushTarget.provider,\n\t\tplatform: pushTarget.platform,\n\t\trelayUrl: pushTarget.relayUrl,\n\t\ttokenHash: pushTarget.tokenHash,\n\t\tliveActivityTokenHash: pushTarget.liveActivity?.tokenHash,\n\t\tliveActivityTokenEnvironment: pushTarget.liveActivity?.tokenEnvironment,\n\t\tenabled: pushTarget.enabled,\n\t\tcreatedAt: pushTarget.createdAt,\n\t\tupdatedAt: pushTarget.updatedAt,\n\t};\n}\n\nfunction selectLiveActivityRegistration(\n\tclient: IrohRemoteClient | undefined,\n\tcontentState: IrohRemoteLiveActivityContentState,\n): IrohRemoteLiveActivityRegistration | undefined {\n\tconst workspaceName = contentState.workspaceName;\n\tconst sessionId = contentState.sessionID;\n\tif (!workspaceName || !sessionId) {\n\t\treturn undefined;\n\t}\n\treturn (client?.liveActivities ?? [])\n\t\t.filter((registration) => {\n\t\t\treturn registration.workspaceName === workspaceName && registration.sessionId === sessionId;\n\t\t})\n\t\t.sort((a, b) => b.updatedAt - a.updatedAt || b.createdAt - a.createdAt)[0];\n}\n\nfunction findRegisteredLiveActivityPushTarget(\n\tclient: IrohRemoteClient | undefined,\n\tregistration: IrohRemoteLiveActivityRegistration,\n): IrohRemotePushTarget | undefined {\n\treturn client?.pushTargets?.find((target) => {\n\t\treturn (\n\t\t\ttarget.id === registration.pushTargetId &&\n\t\t\ttarget.platform === registration.platform &&\n\t\t\ttarget.liveActivity?.tokenHash === registration.tokenHash &&\n\t\t\ttarget.liveActivity.tokenEnvironment === registration.tokenEnvironment\n\t\t);\n\t});\n}\n\nfunction isTransientPushRelayError(error: unknown): boolean {\n\tif (error instanceof IrohRemotePushRelayHttpError) {\n\t\treturn error.transient;\n\t}\n\treturn true;\n}\n\nfunction isTransientHttpStatus(status: number): boolean {\n\treturn status === 408 || status === 409 || status === 425 || status === 429 || status >= 500;\n}\n\nfunction toErrorMessage(error: unknown): string {\n\treturn error instanceof Error ? error.message : String(error);\n}\n\nfunction expectRecord(value: unknown, label: string): Record<string, unknown> {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n\t\tthrow new Error(`${label} must be an object`);\n\t}\n\treturn value as Record<string, unknown>;\n}\n\nfunction expectString(value: unknown, label: string): string {\n\tif (typeof value !== \"string\" || value.length === 0) {\n\t\tthrow new Error(`${label} must be a non-empty string`);\n\t}\n\treturn value;\n}\n\nfunction expectOptionalString(value: unknown, label: string): string | undefined {\n\tif (value === undefined) {\n\t\treturn undefined;\n\t}\n\treturn expectString(value, label);\n}\n\nfunction expectBoolean(value: unknown, label: string): boolean {\n\tif (typeof value !== \"boolean\") {\n\t\tthrow new Error(`${label} must be a boolean`);\n\t}\n\treturn value;\n}\n\nfunction expectPushProvider(value: unknown): IrohRemotePushTargetProvider {\n\tif (value === \"fcm\") {\n\t\treturn value;\n\t}\n\tthrow new Error(\"push provider must be fcm\");\n}\n\nfunction expectPushPlatform(value: unknown): IrohRemotePushTargetPlatform {\n\tif (value === \"ios\") {\n\t\treturn value;\n\t}\n\tthrow new Error(\"push platform must be ios\");\n}\n\nfunction expectOptionalPushTokenEnvironment(value: unknown, label: string): IrohRemotePushTokenEnvironment | undefined {\n\tif (value === undefined) {\n\t\treturn undefined;\n\t}\n\tif (value === \"development\" || value === \"production\") {\n\t\treturn value;\n\t}\n\tthrow new Error(`${label} must be development or production`);\n}\n\nfunction delay(ms: number): Promise<void> {\n\tif (ms === 0) {\n\t\treturn Promise.resolve();\n\t}\n\treturn new Promise((resolve) => {\n\t\tsetTimeout(resolve, ms);\n\t});\n}\n"]}
|