@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,26 @@
|
|
|
1
|
+
import type { StorePackageInspection } from "./inspector.ts";
|
|
2
|
+
import type { StoreResolvedSource } from "./resolver.ts";
|
|
3
|
+
export type StoreInstallScope = "user" | "project";
|
|
4
|
+
export type StoreInstallScriptPolicy = "never" | "ask" | "allow";
|
|
5
|
+
export type StoreCompatibilityStatus = "compatible" | "incompatible" | "unknown";
|
|
6
|
+
export interface StoreInstallPlan {
|
|
7
|
+
input: string;
|
|
8
|
+
source: string;
|
|
9
|
+
scope: StoreInstallScope;
|
|
10
|
+
tracking: boolean;
|
|
11
|
+
resolved: StoreResolvedSource;
|
|
12
|
+
inspection: StorePackageInspection;
|
|
13
|
+
compatibility: StoreCompatibilityStatus;
|
|
14
|
+
scriptPolicy: StoreInstallScriptPolicy;
|
|
15
|
+
warnings: string[];
|
|
16
|
+
}
|
|
17
|
+
export interface BuildStoreInstallPlanOptions {
|
|
18
|
+
resolved: StoreResolvedSource;
|
|
19
|
+
inspection: StorePackageInspection;
|
|
20
|
+
scope: StoreInstallScope;
|
|
21
|
+
scriptPolicy: StoreInstallScriptPolicy;
|
|
22
|
+
currentVersion?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function getCompatibilityStatus(range: string | undefined, currentVersion?: string): StoreCompatibilityStatus;
|
|
25
|
+
export declare function buildStoreInstallPlan(options: BuildStoreInstallPlanOptions): StoreInstallPlan;
|
|
26
|
+
//# sourceMappingURL=install-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-plan.d.ts","sourceRoot":"","sources":["../../src/store/install-plan.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzD,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,SAAS,CAAC;AACnD,MAAM,MAAM,wBAAwB,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,CAAC;AACjE,MAAM,MAAM,wBAAwB,GAAG,YAAY,GAAG,cAAc,GAAG,SAAS,CAAC;AAEjF,MAAM,WAAW,gBAAgB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,iBAAiB,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,UAAU,EAAE,sBAAsB,CAAC;IACnC,aAAa,EAAE,wBAAwB,CAAC;IACxC,YAAY,EAAE,wBAAwB,CAAC;IACvC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,4BAA4B;IAC5C,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,UAAU,EAAE,sBAAsB,CAAC;IACnC,KAAK,EAAE,iBAAiB,CAAC;IACzB,YAAY,EAAE,wBAAwB,CAAC;IACvC,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAyBD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,cAAc,SAAU,GAAG,wBAAwB,CAsBpH;AAMD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,4BAA4B,GAAG,gBAAgB,CAsC7F","sourcesContent":["import { VERSION } from \"../config.ts\";\nimport type { StorePackageInspection } from \"./inspector.ts\";\nimport type { StoreResolvedSource } from \"./resolver.ts\";\n\nexport type StoreInstallScope = \"user\" | \"project\";\nexport type StoreInstallScriptPolicy = \"never\" | \"ask\" | \"allow\";\nexport type StoreCompatibilityStatus = \"compatible\" | \"incompatible\" | \"unknown\";\n\nexport interface StoreInstallPlan {\n\tinput: string;\n\tsource: string;\n\tscope: StoreInstallScope;\n\ttracking: boolean;\n\tresolved: StoreResolvedSource;\n\tinspection: StorePackageInspection;\n\tcompatibility: StoreCompatibilityStatus;\n\tscriptPolicy: StoreInstallScriptPolicy;\n\twarnings: string[];\n}\n\nexport interface BuildStoreInstallPlanOptions {\n\tresolved: StoreResolvedSource;\n\tinspection: StorePackageInspection;\n\tscope: StoreInstallScope;\n\tscriptPolicy: StoreInstallScriptPolicy;\n\tcurrentVersion?: string;\n}\n\nfunction parseVersionParts(version: string): [number, number, number] | undefined {\n\tconst match = version.match(/^(\\d+)\\.(\\d+)\\.(\\d+)/);\n\tif (!match) {\n\t\treturn undefined;\n\t}\n\treturn [Number(match[1]), Number(match[2]), Number(match[3])];\n}\n\nfunction compareVersions(left: string, right: string): number | undefined {\n\tconst leftParts = parseVersionParts(left);\n\tconst rightParts = parseVersionParts(right);\n\tif (!leftParts || !rightParts) {\n\t\treturn undefined;\n\t}\n\tfor (let index = 0; index < leftParts.length; index++) {\n\t\tconst diff = leftParts[index] - rightParts[index];\n\t\tif (diff !== 0) {\n\t\t\treturn diff;\n\t\t}\n\t}\n\treturn 0;\n}\n\nexport function getCompatibilityStatus(range: string | undefined, currentVersion = VERSION): StoreCompatibilityStatus {\n\tif (!range) {\n\t\treturn \"unknown\";\n\t}\n\tconst trimmed = range.trim();\n\tif (!trimmed) {\n\t\treturn \"unknown\";\n\t}\n\n\tconst greaterThanOrEqual = trimmed.match(/^>=\\s*(\\d+\\.\\d+\\.\\d+(?:[-+][0-9A-Za-z.-]+)?)$/);\n\tif (greaterThanOrEqual?.[1]) {\n\t\tconst comparison = compareVersions(currentVersion, greaterThanOrEqual[1]);\n\t\treturn comparison === undefined ? \"unknown\" : comparison >= 0 ? \"compatible\" : \"incompatible\";\n\t}\n\n\tconst exact = trimmed.match(/^=?\\s*(\\d+\\.\\d+\\.\\d+(?:[-+][0-9A-Za-z.-]+)?)$/);\n\tif (exact?.[1]) {\n\t\tconst comparison = compareVersions(currentVersion, exact[1]);\n\t\treturn comparison === undefined ? \"unknown\" : comparison === 0 ? \"compatible\" : \"incompatible\";\n\t}\n\n\treturn \"unknown\";\n}\n\nfunction hasDirectScripts(inspection: StorePackageInspection): boolean {\n\treturn Object.keys(inspection.scripts).length > 0;\n}\n\nexport function buildStoreInstallPlan(options: BuildStoreInstallPlanOptions): StoreInstallPlan {\n\tconst compatibility = getCompatibilityStatus(\n\t\toptions.resolved.catalogPackage?.compatibility?.volt,\n\t\toptions.currentVersion ?? VERSION,\n\t);\n\tconst warnings = [\n\t\t...options.resolved.warnings,\n\t\t...options.inspection.warnings,\n\t\t\"Extensions run as local code with the full permissions of the Volt process.\",\n\t];\n\n\tif (options.resolved.catalogPackage && options.resolved.catalogPackage.verified !== true) {\n\t\twarnings.push(\"This catalog entry is not marked verified by Volt maintainers.\");\n\t}\n\tif (compatibility === \"incompatible\") {\n\t\twarnings.push(`Catalog compatibility range is ${options.resolved.catalogPackage?.compatibility?.volt}.`);\n\t}\n\tif (options.scriptPolicy === \"never\") {\n\t\twarnings.push(\"Package lifecycle scripts will be disabled for this store install.\");\n\t} else if (options.scriptPolicy === \"allow\") {\n\t\twarnings.push(\"Package lifecycle scripts are allowed for this store install.\");\n\t} else if (hasDirectScripts(options.inspection)) {\n\t\twarnings.push(\n\t\t\t\"Package declares scripts; interactive confirmation is required before allowing lifecycle scripts.\",\n\t\t);\n\t}\n\n\treturn {\n\t\tinput: options.resolved.input,\n\t\tsource: options.resolved.source,\n\t\tscope: options.scope,\n\t\ttracking: options.resolved.tracking,\n\t\tresolved: options.resolved,\n\t\tinspection: options.inspection,\n\t\tcompatibility,\n\t\tscriptPolicy: options.scriptPolicy,\n\t\twarnings,\n\t};\n}\n"]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { VERSION } from "../config.js";
|
|
2
|
+
function parseVersionParts(version) {
|
|
3
|
+
const match = version.match(/^(\d+)\.(\d+)\.(\d+)/);
|
|
4
|
+
if (!match) {
|
|
5
|
+
return undefined;
|
|
6
|
+
}
|
|
7
|
+
return [Number(match[1]), Number(match[2]), Number(match[3])];
|
|
8
|
+
}
|
|
9
|
+
function compareVersions(left, right) {
|
|
10
|
+
const leftParts = parseVersionParts(left);
|
|
11
|
+
const rightParts = parseVersionParts(right);
|
|
12
|
+
if (!leftParts || !rightParts) {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
for (let index = 0; index < leftParts.length; index++) {
|
|
16
|
+
const diff = leftParts[index] - rightParts[index];
|
|
17
|
+
if (diff !== 0) {
|
|
18
|
+
return diff;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return 0;
|
|
22
|
+
}
|
|
23
|
+
export function getCompatibilityStatus(range, currentVersion = VERSION) {
|
|
24
|
+
if (!range) {
|
|
25
|
+
return "unknown";
|
|
26
|
+
}
|
|
27
|
+
const trimmed = range.trim();
|
|
28
|
+
if (!trimmed) {
|
|
29
|
+
return "unknown";
|
|
30
|
+
}
|
|
31
|
+
const greaterThanOrEqual = trimmed.match(/^>=\s*(\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?)$/);
|
|
32
|
+
if (greaterThanOrEqual?.[1]) {
|
|
33
|
+
const comparison = compareVersions(currentVersion, greaterThanOrEqual[1]);
|
|
34
|
+
return comparison === undefined ? "unknown" : comparison >= 0 ? "compatible" : "incompatible";
|
|
35
|
+
}
|
|
36
|
+
const exact = trimmed.match(/^=?\s*(\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?)$/);
|
|
37
|
+
if (exact?.[1]) {
|
|
38
|
+
const comparison = compareVersions(currentVersion, exact[1]);
|
|
39
|
+
return comparison === undefined ? "unknown" : comparison === 0 ? "compatible" : "incompatible";
|
|
40
|
+
}
|
|
41
|
+
return "unknown";
|
|
42
|
+
}
|
|
43
|
+
function hasDirectScripts(inspection) {
|
|
44
|
+
return Object.keys(inspection.scripts).length > 0;
|
|
45
|
+
}
|
|
46
|
+
export function buildStoreInstallPlan(options) {
|
|
47
|
+
const compatibility = getCompatibilityStatus(options.resolved.catalogPackage?.compatibility?.volt, options.currentVersion ?? VERSION);
|
|
48
|
+
const warnings = [
|
|
49
|
+
...options.resolved.warnings,
|
|
50
|
+
...options.inspection.warnings,
|
|
51
|
+
"Extensions run as local code with the full permissions of the Volt process.",
|
|
52
|
+
];
|
|
53
|
+
if (options.resolved.catalogPackage && options.resolved.catalogPackage.verified !== true) {
|
|
54
|
+
warnings.push("This catalog entry is not marked verified by Volt maintainers.");
|
|
55
|
+
}
|
|
56
|
+
if (compatibility === "incompatible") {
|
|
57
|
+
warnings.push(`Catalog compatibility range is ${options.resolved.catalogPackage?.compatibility?.volt}.`);
|
|
58
|
+
}
|
|
59
|
+
if (options.scriptPolicy === "never") {
|
|
60
|
+
warnings.push("Package lifecycle scripts will be disabled for this store install.");
|
|
61
|
+
}
|
|
62
|
+
else if (options.scriptPolicy === "allow") {
|
|
63
|
+
warnings.push("Package lifecycle scripts are allowed for this store install.");
|
|
64
|
+
}
|
|
65
|
+
else if (hasDirectScripts(options.inspection)) {
|
|
66
|
+
warnings.push("Package declares scripts; interactive confirmation is required before allowing lifecycle scripts.");
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
input: options.resolved.input,
|
|
70
|
+
source: options.resolved.source,
|
|
71
|
+
scope: options.scope,
|
|
72
|
+
tracking: options.resolved.tracking,
|
|
73
|
+
resolved: options.resolved,
|
|
74
|
+
inspection: options.inspection,
|
|
75
|
+
compatibility,
|
|
76
|
+
scriptPolicy: options.scriptPolicy,
|
|
77
|
+
warnings,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=install-plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-plan.js","sourceRoot":"","sources":["../../src/store/install-plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA4BvC,SAAS,iBAAiB,CAAC,OAAe,EAAwC;IACjF,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACpD,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAAA,CAC9D;AAED,SAAS,eAAe,CAAC,IAAY,EAAE,KAAa,EAAsB;IACzE,MAAM,SAAS,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC1C,MAAM,UAAU,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAC5C,IAAI,CAAC,SAAS,IAAI,CAAC,UAAU,EAAE,CAAC;QAC/B,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;QACvD,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;QAClD,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC;QACb,CAAC;IACF,CAAC;IACD,OAAO,CAAC,CAAC;AAAA,CACT;AAED,MAAM,UAAU,sBAAsB,CAAC,KAAyB,EAAE,cAAc,GAAG,OAAO,EAA4B;IACrH,IAAI,CA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AClC,QAAQ;KACR,CAAC;AAAA,CACF","sourcesContent":["import { VERSION } from \"../config.ts\";\nimport type { StorePackageInspection } from \"./inspector.ts\";\nimport type { StoreResolvedSource } from \"./resolver.ts\";\n\nexport type StoreInstallScope = \"user\" | \"project\";\nexport type StoreInstallScriptPolicy = \"never\" | \"ask\" | \"allow\";\nexport type StoreCompatibilityStatus = \"compatible\" | \"incompatible\" | \"unknown\";\n\nexport interface StoreInstallPlan {\n\tinput: string;\n\tsource: string;\n\tscope: StoreInstallScope;\n\ttracking: boolean;\n\tresolved: StoreResolvedSource;\n\tinspection: StorePackageInspection;\n\tcompatibility: StoreCompatibilityStatus;\n\tscriptPolicy: StoreInstallScriptPolicy;\n\twarnings: string[];\n}\n\nexport interface BuildStoreInstallPlanOptions {\n\tresolved: StoreResolvedSource;\n\tinspection: StorePackageInspection;\n\tscope: StoreInstallScope;\n\tscriptPolicy: StoreInstallScriptPolicy;\n\tcurrentVersion?: string;\n}\n\nfunction parseVersionParts(version: string): [number, number, number] | undefined {\n\tconst match = version.match(/^(\\d+)\\.(\\d+)\\.(\\d+)/);\n\tif (!match) {\n\t\treturn undefined;\n\t}\n\treturn [Number(match[1]), Number(match[2]), Number(match[3])];\n}\n\nfunction compareVersions(left: string, right: string): number | undefined {\n\tconst leftParts = parseVersionParts(left);\n\tconst rightParts = parseVersionParts(right);\n\tif (!leftParts || !rightParts) {\n\t\treturn undefined;\n\t}\n\tfor (let index = 0; index < leftParts.length; index++) {\n\t\tconst diff = leftParts[index] - rightParts[index];\n\t\tif (diff !== 0) {\n\t\t\treturn diff;\n\t\t}\n\t}\n\treturn 0;\n}\n\nexport function getCompatibilityStatus(range: string | undefined, currentVersion = VERSION): StoreCompatibilityStatus {\n\tif (!range) {\n\t\treturn \"unknown\";\n\t}\n\tconst trimmed = range.trim();\n\tif (!trimmed) {\n\t\treturn \"unknown\";\n\t}\n\n\tconst greaterThanOrEqual = trimmed.match(/^>=\\s*(\\d+\\.\\d+\\.\\d+(?:[-+][0-9A-Za-z.-]+)?)$/);\n\tif (greaterThanOrEqual?.[1]) {\n\t\tconst comparison = compareVersions(currentVersion, greaterThanOrEqual[1]);\n\t\treturn comparison === undefined ? \"unknown\" : comparison >= 0 ? \"compatible\" : \"incompatible\";\n\t}\n\n\tconst exact = trimmed.match(/^=?\\s*(\\d+\\.\\d+\\.\\d+(?:[-+][0-9A-Za-z.-]+)?)$/);\n\tif (exact?.[1]) {\n\t\tconst comparison = compareVersions(currentVersion, exact[1]);\n\t\treturn comparison === undefined ? \"unknown\" : comparison === 0 ? \"compatible\" : \"incompatible\";\n\t}\n\n\treturn \"unknown\";\n}\n\nfunction hasDirectScripts(inspection: StorePackageInspection): boolean {\n\treturn Object.keys(inspection.scripts).length > 0;\n}\n\nexport function buildStoreInstallPlan(options: BuildStoreInstallPlanOptions): StoreInstallPlan {\n\tconst compatibility = getCompatibilityStatus(\n\t\toptions.resolved.catalogPackage?.compatibility?.volt,\n\t\toptions.currentVersion ?? VERSION,\n\t);\n\tconst warnings = [\n\t\t...options.resolved.warnings,\n\t\t...options.inspection.warnings,\n\t\t\"Extensions run as local code with the full permissions of the Volt process.\",\n\t];\n\n\tif (options.resolved.catalogPackage && options.resolved.catalogPackage.verified !== true) {\n\t\twarnings.push(\"This catalog entry is not marked verified by Volt maintainers.\");\n\t}\n\tif (compatibility === \"incompatible\") {\n\t\twarnings.push(`Catalog compatibility range is ${options.resolved.catalogPackage?.compatibility?.volt}.`);\n\t}\n\tif (options.scriptPolicy === \"never\") {\n\t\twarnings.push(\"Package lifecycle scripts will be disabled for this store install.\");\n\t} else if (options.scriptPolicy === \"allow\") {\n\t\twarnings.push(\"Package lifecycle scripts are allowed for this store install.\");\n\t} else if (hasDirectScripts(options.inspection)) {\n\t\twarnings.push(\n\t\t\t\"Package declares scripts; interactive confirmation is required before allowing lifecycle scripts.\",\n\t\t);\n\t}\n\n\treturn {\n\t\tinput: options.resolved.input,\n\t\tsource: options.resolved.source,\n\t\tscope: options.scope,\n\t\ttracking: options.resolved.tracking,\n\t\tresolved: options.resolved,\n\t\tinspection: options.inspection,\n\t\tcompatibility,\n\t\tscriptPolicy: options.scriptPolicy,\n\t\twarnings,\n\t};\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { StoreCatalogPackage } from "./catalog.ts";
|
|
2
|
+
import type { StorePackageInspection } from "./inspector.ts";
|
|
3
|
+
import type { StoreInstallPlan } from "./install-plan.ts";
|
|
4
|
+
import type { StoreResolvedSource } from "./resolver.ts";
|
|
5
|
+
export declare function formatStoreSourceSummary(source: string): string;
|
|
6
|
+
export declare function formatStoreInstallPlanTarget(plan: StoreInstallPlan): string;
|
|
7
|
+
export declare function formatStoreProgressMessage(source: string, message: string): string;
|
|
8
|
+
export declare function renderCatalogSearch(packages: readonly StoreCatalogPackage[], query?: string): string;
|
|
9
|
+
export declare function renderStoreShow(resolved: StoreResolvedSource, inspection: StorePackageInspection): string;
|
|
10
|
+
export declare function renderStoreInstallPlan(plan: StoreInstallPlan): string;
|
|
11
|
+
//# sourceMappingURL=render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/store/render.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAqB,MAAM,cAAc,CAAC;AAC3E,OAAO,KAAK,EAAE,sBAAsB,EAAqB,MAAM,gBAAgB,CAAC;AAChF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAQzD,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAe/D;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM,CAM3E;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAElF;AA6CD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,mBAAmB,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAcpG;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,mBAAmB,EAAE,UAAU,EAAE,sBAAsB,GAAG,MAAM,CAmCzG;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM,CA2BrE","sourcesContent":["import chalk from \"chalk\";\nimport { parseGitUrl } from \"../utils/git.ts\";\nimport type { StoreCatalogPackage, StoreResourceType } from \"./catalog.ts\";\nimport type { StorePackageInspection, StoreVoltManifest } from \"./inspector.ts\";\nimport type { StoreInstallPlan } from \"./install-plan.ts\";\nimport type { StoreResolvedSource } from \"./resolver.ts\";\n\nconst RESOURCE_TYPES: StoreResourceType[] = [\"extensions\", \"skills\", \"prompts\", \"themes\"];\n\nfunction formatList(values: readonly string[] | undefined): string {\n\treturn values && values.length > 0 ? values.join(\", \") : \"none\";\n}\n\nexport function formatStoreSourceSummary(source: string): string {\n\tconst gitSource = parseGitUrl(source);\n\tif (gitSource) {\n\t\tconst ref = gitSource.ref\n\t\t\t? ` @ ${/^[0-9a-f]{40}$/i.test(gitSource.ref) ? gitSource.ref.slice(0, 12) : gitSource.ref}`\n\t\t\t: \"\";\n\t\treturn `git ${gitSource.host}/${gitSource.path}${ref}`;\n\t}\n\n\tif (source.startsWith(\"npm:\")) {\n\t\tconst spec = source.slice(\"npm:\".length).trim();\n\t\treturn spec ? `npm ${spec}` : source;\n\t}\n\n\treturn source;\n}\n\nexport function formatStoreInstallPlanTarget(plan: StoreInstallPlan): string {\n\tconst catalogPackage = plan.resolved.catalogPackage;\n\tif (catalogPackage) {\n\t\treturn `${catalogPackage.id} - ${catalogPackage.name}`;\n\t}\n\treturn formatStoreSourceSummary(plan.resolved.source);\n}\n\nexport function formatStoreProgressMessage(source: string, message: string): string {\n\treturn source ? message.split(source).join(formatStoreSourceSummary(source)) : message;\n}\n\nfunction renderRecord(title: string, values: Record<string, string>): string[] {\n\tconst entries = Object.entries(values);\n\tif (entries.length === 0) {\n\t\treturn [`${title}: none`];\n\t}\n\treturn [`${title}:`, ...entries.map(([name, version]) => ` - ${name}: ${version}`)];\n}\n\nfunction renderVoltManifest(manifest: StoreVoltManifest | undefined): string[] {\n\tif (!manifest) {\n\t\treturn [\"Volt manifest: none\"];\n\t}\n\tconst lines = [\"Volt manifest:\"];\n\tfor (const resourceType of RESOURCE_TYPES) {\n\t\tconst entries = manifest[resourceType];\n\t\tif (entries !== undefined) {\n\t\t\tlines.push(` ${resourceType}: ${formatList(entries)}`);\n\t\t}\n\t}\n\tif (manifest.image) {\n\t\tlines.push(` image: ${manifest.image}`);\n\t}\n\tif (manifest.video) {\n\t\tlines.push(` video: ${manifest.video}`);\n\t}\n\treturn lines;\n}\n\nfunction renderDiscoveredResources(inspection: StorePackageInspection): string[] {\n\tconst lines = [\"Discovered resources:\"];\n\tfor (const resourceType of RESOURCE_TYPES) {\n\t\tlines.push(` ${resourceType}: ${formatList(inspection.discoveredResources[resourceType])}`);\n\t}\n\treturn lines;\n}\n\nfunction renderWarnings(warnings: readonly string[]): string[] {\n\tif (warnings.length === 0) {\n\t\treturn [];\n\t}\n\treturn [\"Warnings:\", ...warnings.map((warning) => ` - ${warning}`)];\n}\n\nexport function renderCatalogSearch(packages: readonly StoreCatalogPackage[], query?: string): string {\n\tif (packages.length === 0) {\n\t\treturn query?.trim() ? `No store packages found for \"${query.trim()}\".` : \"No store packages found.\";\n\t}\n\n\tconst lines = [chalk.bold(\"Store packages:\")];\n\tfor (const pkg of packages) {\n\t\tconst verified = pkg.verified ? \" verified\" : \"\";\n\t\tconst categories = pkg.categories && pkg.categories.length > 0 ? ` [${pkg.categories.join(\", \")}]` : \"\";\n\t\tlines.push(`${pkg.id} - ${pkg.name}${verified}${categories}`);\n\t\tlines.push(chalk.dim(` ${pkg.description}`));\n\t\tlines.push(chalk.dim(` Source: ${formatStoreSourceSummary(pkg.source)}`));\n\t}\n\treturn lines.join(\"\\n\");\n}\n\nexport function renderStoreShow(resolved: StoreResolvedSource, inspection: StorePackageInspection): string {\n\tconst lines: string[] = [];\n\tconst catalogPackage = resolved.catalogPackage;\n\tif (catalogPackage) {\n\t\tlines.push(chalk.bold(catalogPackage.name));\n\t\tlines.push(`ID: ${catalogPackage.id}`);\n\t\tlines.push(`Description: ${catalogPackage.description}`);\n\t\tlines.push(`Source: ${formatStoreSourceSummary(catalogPackage.source)}`);\n\t\tlines.push(`Verified: ${catalogPackage.verified === true ? \"yes\" : \"no\"}`);\n\t\tif (catalogPackage.repo) lines.push(`Repo: ${catalogPackage.repo}`);\n\t\tif (catalogPackage.author) lines.push(`Author: ${catalogPackage.author}`);\n\t\tif (catalogPackage.license) lines.push(`License: ${catalogPackage.license}`);\n\t\tif (catalogPackage.resources) lines.push(`Catalog resources: ${formatList(catalogPackage.resources)}`);\n\t\tif (catalogPackage.compatibility?.volt) lines.push(`Volt compatibility: ${catalogPackage.compatibility.volt}`);\n\t\tlines.push(\"\");\n\t} else {\n\t\tlines.push(chalk.bold(resolved.input));\n\t\tlines.push(`Source: ${formatStoreSourceSummary(resolved.source)}`);\n\t\tlines.push(\"\");\n\t}\n\n\tlines.push(chalk.bold(\"Package metadata\"));\n\tlines.push(`Name: ${inspection.packageName ?? \"unknown\"}`);\n\tlines.push(`Version: ${inspection.packageVersion ?? \"unknown\"}`);\n\tlines.push(`Description: ${inspection.packageDescription ?? \"unknown\"}`);\n\tlines.push(`License: ${inspection.packageLicense ?? \"unknown\"}`);\n\tlines.push(`Repository: ${inspection.packageRepository ?? \"unknown\"}`);\n\tlines.push(...renderVoltManifest(inspection.voltManifest));\n\tlines.push(...renderDiscoveredResources(inspection));\n\tlines.push(...renderRecord(\"Dependencies\", inspection.dependencies));\n\tlines.push(...renderRecord(\"Peer dependencies\", inspection.peerDependencies));\n\tlines.push(...renderRecord(\"Optional dependencies\", inspection.optionalDependencies));\n\tlines.push(...renderRecord(\"Scripts\", inspection.scripts));\n\tlines.push(...renderWarnings([...resolved.warnings, ...inspection.warnings]));\n\treturn lines.join(\"\\n\");\n}\n\nexport function renderStoreInstallPlan(plan: StoreInstallPlan): string {\n\tconst target = formatStoreInstallPlanTarget(plan);\n\tconst source = formatStoreSourceSummary(plan.source);\n\tconst lines = [\n\t\tchalk.bold(\"Store install plan\"),\n\t\t...(target !== source ? [`Package: ${target}`] : []),\n\t\t`Source: ${source}`,\n\t\t`Scope: ${plan.scope}`,\n\t\t`Tracking: ${plan.tracking ? \"yes\" : \"no\"}`,\n\t\t`Script policy: ${plan.scriptPolicy}`,\n\t\t`Compatibility: ${plan.compatibility}`,\n\t\t\"\",\n\t\tchalk.bold(\"Package metadata\"),\n\t\t`Name: ${plan.inspection.packageName ?? \"unknown\"}`,\n\t\t`Version: ${plan.inspection.packageVersion ?? \"unknown\"}`,\n\t\t`Description: ${plan.inspection.packageDescription ?? \"unknown\"}`,\n\t\t`License: ${plan.inspection.packageLicense ?? \"unknown\"}`,\n\t\t`Repository: ${plan.inspection.packageRepository ?? \"unknown\"}`,\n\t\t...renderVoltManifest(plan.inspection.voltManifest),\n\t\t...renderDiscoveredResources(plan.inspection),\n\t\t...renderRecord(\"Dependencies\", plan.inspection.dependencies),\n\t\t...renderRecord(\"Peer dependencies\", plan.inspection.peerDependencies),\n\t\t...renderRecord(\"Optional dependencies\", plan.inspection.optionalDependencies),\n\t\t...renderRecord(\"Scripts\", plan.inspection.scripts),\n\t\t...renderWarnings(plan.warnings),\n\t];\n\treturn lines.join(\"\\n\");\n}\n"]}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
import { parseGitUrl } from "../utils/git.js";
|
|
3
|
+
const RESOURCE_TYPES = ["extensions", "skills", "prompts", "themes"];
|
|
4
|
+
function formatList(values) {
|
|
5
|
+
return values && values.length > 0 ? values.join(", ") : "none";
|
|
6
|
+
}
|
|
7
|
+
export function formatStoreSourceSummary(source) {
|
|
8
|
+
const gitSource = parseGitUrl(source);
|
|
9
|
+
if (gitSource) {
|
|
10
|
+
const ref = gitSource.ref
|
|
11
|
+
? ` @ ${/^[0-9a-f]{40}$/i.test(gitSource.ref) ? gitSource.ref.slice(0, 12) : gitSource.ref}`
|
|
12
|
+
: "";
|
|
13
|
+
return `git ${gitSource.host}/${gitSource.path}${ref}`;
|
|
14
|
+
}
|
|
15
|
+
if (source.startsWith("npm:")) {
|
|
16
|
+
const spec = source.slice("npm:".length).trim();
|
|
17
|
+
return spec ? `npm ${spec}` : source;
|
|
18
|
+
}
|
|
19
|
+
return source;
|
|
20
|
+
}
|
|
21
|
+
export function formatStoreInstallPlanTarget(plan) {
|
|
22
|
+
const catalogPackage = plan.resolved.catalogPackage;
|
|
23
|
+
if (catalogPackage) {
|
|
24
|
+
return `${catalogPackage.id} - ${catalogPackage.name}`;
|
|
25
|
+
}
|
|
26
|
+
return formatStoreSourceSummary(plan.resolved.source);
|
|
27
|
+
}
|
|
28
|
+
export function formatStoreProgressMessage(source, message) {
|
|
29
|
+
return source ? message.split(source).join(formatStoreSourceSummary(source)) : message;
|
|
30
|
+
}
|
|
31
|
+
function renderRecord(title, values) {
|
|
32
|
+
const entries = Object.entries(values);
|
|
33
|
+
if (entries.length === 0) {
|
|
34
|
+
return [`${title}: none`];
|
|
35
|
+
}
|
|
36
|
+
return [`${title}:`, ...entries.map(([name, version]) => ` - ${name}: ${version}`)];
|
|
37
|
+
}
|
|
38
|
+
function renderVoltManifest(manifest) {
|
|
39
|
+
if (!manifest) {
|
|
40
|
+
return ["Volt manifest: none"];
|
|
41
|
+
}
|
|
42
|
+
const lines = ["Volt manifest:"];
|
|
43
|
+
for (const resourceType of RESOURCE_TYPES) {
|
|
44
|
+
const entries = manifest[resourceType];
|
|
45
|
+
if (entries !== undefined) {
|
|
46
|
+
lines.push(` ${resourceType}: ${formatList(entries)}`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (manifest.image) {
|
|
50
|
+
lines.push(` image: ${manifest.image}`);
|
|
51
|
+
}
|
|
52
|
+
if (manifest.video) {
|
|
53
|
+
lines.push(` video: ${manifest.video}`);
|
|
54
|
+
}
|
|
55
|
+
return lines;
|
|
56
|
+
}
|
|
57
|
+
function renderDiscoveredResources(inspection) {
|
|
58
|
+
const lines = ["Discovered resources:"];
|
|
59
|
+
for (const resourceType of RESOURCE_TYPES) {
|
|
60
|
+
lines.push(` ${resourceType}: ${formatList(inspection.discoveredResources[resourceType])}`);
|
|
61
|
+
}
|
|
62
|
+
return lines;
|
|
63
|
+
}
|
|
64
|
+
function renderWarnings(warnings) {
|
|
65
|
+
if (warnings.length === 0) {
|
|
66
|
+
return [];
|
|
67
|
+
}
|
|
68
|
+
return ["Warnings:", ...warnings.map((warning) => ` - ${warning}`)];
|
|
69
|
+
}
|
|
70
|
+
export function renderCatalogSearch(packages, query) {
|
|
71
|
+
if (packages.length === 0) {
|
|
72
|
+
return query?.trim() ? `No store packages found for "${query.trim()}".` : "No store packages found.";
|
|
73
|
+
}
|
|
74
|
+
const lines = [chalk.bold("Store packages:")];
|
|
75
|
+
for (const pkg of packages) {
|
|
76
|
+
const verified = pkg.verified ? " verified" : "";
|
|
77
|
+
const categories = pkg.categories && pkg.categories.length > 0 ? ` [${pkg.categories.join(", ")}]` : "";
|
|
78
|
+
lines.push(`${pkg.id} - ${pkg.name}${verified}${categories}`);
|
|
79
|
+
lines.push(chalk.dim(` ${pkg.description}`));
|
|
80
|
+
lines.push(chalk.dim(` Source: ${formatStoreSourceSummary(pkg.source)}`));
|
|
81
|
+
}
|
|
82
|
+
return lines.join("\n");
|
|
83
|
+
}
|
|
84
|
+
export function renderStoreShow(resolved, inspection) {
|
|
85
|
+
const lines = [];
|
|
86
|
+
const catalogPackage = resolved.catalogPackage;
|
|
87
|
+
if (catalogPackage) {
|
|
88
|
+
lines.push(chalk.bold(catalogPackage.name));
|
|
89
|
+
lines.push(`ID: ${catalogPackage.id}`);
|
|
90
|
+
lines.push(`Description: ${catalogPackage.description}`);
|
|
91
|
+
lines.push(`Source: ${formatStoreSourceSummary(catalogPackage.source)}`);
|
|
92
|
+
lines.push(`Verified: ${catalogPackage.verified === true ? "yes" : "no"}`);
|
|
93
|
+
if (catalogPackage.repo)
|
|
94
|
+
lines.push(`Repo: ${catalogPackage.repo}`);
|
|
95
|
+
if (catalogPackage.author)
|
|
96
|
+
lines.push(`Author: ${catalogPackage.author}`);
|
|
97
|
+
if (catalogPackage.license)
|
|
98
|
+
lines.push(`License: ${catalogPackage.license}`);
|
|
99
|
+
if (catalogPackage.resources)
|
|
100
|
+
lines.push(`Catalog resources: ${formatList(catalogPackage.resources)}`);
|
|
101
|
+
if (catalogPackage.compatibility?.volt)
|
|
102
|
+
lines.push(`Volt compatibility: ${catalogPackage.compatibility.volt}`);
|
|
103
|
+
lines.push("");
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
lines.push(chalk.bold(resolved.input));
|
|
107
|
+
lines.push(`Source: ${formatStoreSourceSummary(resolved.source)}`);
|
|
108
|
+
lines.push("");
|
|
109
|
+
}
|
|
110
|
+
lines.push(chalk.bold("Package metadata"));
|
|
111
|
+
lines.push(`Name: ${inspection.packageName ?? "unknown"}`);
|
|
112
|
+
lines.push(`Version: ${inspection.packageVersion ?? "unknown"}`);
|
|
113
|
+
lines.push(`Description: ${inspection.packageDescription ?? "unknown"}`);
|
|
114
|
+
lines.push(`License: ${inspection.packageLicense ?? "unknown"}`);
|
|
115
|
+
lines.push(`Repository: ${inspection.packageRepository ?? "unknown"}`);
|
|
116
|
+
lines.push(...renderVoltManifest(inspection.voltManifest));
|
|
117
|
+
lines.push(...renderDiscoveredResources(inspection));
|
|
118
|
+
lines.push(...renderRecord("Dependencies", inspection.dependencies));
|
|
119
|
+
lines.push(...renderRecord("Peer dependencies", inspection.peerDependencies));
|
|
120
|
+
lines.push(...renderRecord("Optional dependencies", inspection.optionalDependencies));
|
|
121
|
+
lines.push(...renderRecord("Scripts", inspection.scripts));
|
|
122
|
+
lines.push(...renderWarnings([...resolved.warnings, ...inspection.warnings]));
|
|
123
|
+
return lines.join("\n");
|
|
124
|
+
}
|
|
125
|
+
export function renderStoreInstallPlan(plan) {
|
|
126
|
+
const target = formatStoreInstallPlanTarget(plan);
|
|
127
|
+
const source = formatStoreSourceSummary(plan.source);
|
|
128
|
+
const lines = [
|
|
129
|
+
chalk.bold("Store install plan"),
|
|
130
|
+
...(target !== source ? [`Package: ${target}`] : []),
|
|
131
|
+
`Source: ${source}`,
|
|
132
|
+
`Scope: ${plan.scope}`,
|
|
133
|
+
`Tracking: ${plan.tracking ? "yes" : "no"}`,
|
|
134
|
+
`Script policy: ${plan.scriptPolicy}`,
|
|
135
|
+
`Compatibility: ${plan.compatibility}`,
|
|
136
|
+
"",
|
|
137
|
+
chalk.bold("Package metadata"),
|
|
138
|
+
`Name: ${plan.inspection.packageName ?? "unknown"}`,
|
|
139
|
+
`Version: ${plan.inspection.packageVersion ?? "unknown"}`,
|
|
140
|
+
`Description: ${plan.inspection.packageDescription ?? "unknown"}`,
|
|
141
|
+
`License: ${plan.inspection.packageLicense ?? "unknown"}`,
|
|
142
|
+
`Repository: ${plan.inspection.packageRepository ?? "unknown"}`,
|
|
143
|
+
...renderVoltManifest(plan.inspection.voltManifest),
|
|
144
|
+
...renderDiscoveredResources(plan.inspection),
|
|
145
|
+
...renderRecord("Dependencies", plan.inspection.dependencies),
|
|
146
|
+
...renderRecord("Peer dependencies", plan.inspection.peerDependencies),
|
|
147
|
+
...renderRecord("Optional dependencies", plan.inspection.optionalDependencies),
|
|
148
|
+
...renderRecord("Scripts", plan.inspection.scripts),
|
|
149
|
+
...renderWarnings(plan.warnings),
|
|
150
|
+
];
|
|
151
|
+
return lines.join("\n");
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/store/render.ts"],"names":[],"mappings":"AAAA,OA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CAAC;QACnD,GAAG,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC;KAChC,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAAA,CACxB","sourcesContent":["import chalk from \"chalk\";\nimport { parseGitUrl } from \"../utils/git.ts\";\nimport type { StoreCatalogPackage, StoreResourceType } from \"./catalog.ts\";\nimport type { StorePackageInspection, StoreVoltManifest } from \"./inspector.ts\";\nimport type { StoreInstallPlan } from \"./install-plan.ts\";\nimport type { StoreResolvedSource } from \"./resolver.ts\";\n\nconst RESOURCE_TYPES: StoreResourceType[] = [\"extensions\", \"skills\", \"prompts\", \"themes\"];\n\nfunction formatList(values: readonly string[] | undefined): string {\n\treturn values && values.length > 0 ? values.join(\", \") : \"none\";\n}\n\nexport function formatStoreSourceSummary(source: string): string {\n\tconst gitSource = parseGitUrl(source);\n\tif (gitSource) {\n\t\tconst ref = gitSource.ref\n\t\t\t? ` @ ${/^[0-9a-f]{40}$/i.test(gitSource.ref) ? gitSource.ref.slice(0, 12) : gitSource.ref}`\n\t\t\t: \"\";\n\t\treturn `git ${gitSource.host}/${gitSource.path}${ref}`;\n\t}\n\n\tif (source.startsWith(\"npm:\")) {\n\t\tconst spec = source.slice(\"npm:\".length).trim();\n\t\treturn spec ? `npm ${spec}` : source;\n\t}\n\n\treturn source;\n}\n\nexport function formatStoreInstallPlanTarget(plan: StoreInstallPlan): string {\n\tconst catalogPackage = plan.resolved.catalogPackage;\n\tif (catalogPackage) {\n\t\treturn `${catalogPackage.id} - ${catalogPackage.name}`;\n\t}\n\treturn formatStoreSourceSummary(plan.resolved.source);\n}\n\nexport function formatStoreProgressMessage(source: string, message: string): string {\n\treturn source ? message.split(source).join(formatStoreSourceSummary(source)) : message;\n}\n\nfunction renderRecord(title: string, values: Record<string, string>): string[] {\n\tconst entries = Object.entries(values);\n\tif (entries.length === 0) {\n\t\treturn [`${title}: none`];\n\t}\n\treturn [`${title}:`, ...entries.map(([name, version]) => ` - ${name}: ${version}`)];\n}\n\nfunction renderVoltManifest(manifest: StoreVoltManifest | undefined): string[] {\n\tif (!manifest) {\n\t\treturn [\"Volt manifest: none\"];\n\t}\n\tconst lines = [\"Volt manifest:\"];\n\tfor (const resourceType of RESOURCE_TYPES) {\n\t\tconst entries = manifest[resourceType];\n\t\tif (entries !== undefined) {\n\t\t\tlines.push(` ${resourceType}: ${formatList(entries)}`);\n\t\t}\n\t}\n\tif (manifest.image) {\n\t\tlines.push(` image: ${manifest.image}`);\n\t}\n\tif (manifest.video) {\n\t\tlines.push(` video: ${manifest.video}`);\n\t}\n\treturn lines;\n}\n\nfunction renderDiscoveredResources(inspection: StorePackageInspection): string[] {\n\tconst lines = [\"Discovered resources:\"];\n\tfor (const resourceType of RESOURCE_TYPES) {\n\t\tlines.push(` ${resourceType}: ${formatList(inspection.discoveredResources[resourceType])}`);\n\t}\n\treturn lines;\n}\n\nfunction renderWarnings(warnings: readonly string[]): string[] {\n\tif (warnings.length === 0) {\n\t\treturn [];\n\t}\n\treturn [\"Warnings:\", ...warnings.map((warning) => ` - ${warning}`)];\n}\n\nexport function renderCatalogSearch(packages: readonly StoreCatalogPackage[], query?: string): string {\n\tif (packages.length === 0) {\n\t\treturn query?.trim() ? `No store packages found for \"${query.trim()}\".` : \"No store packages found.\";\n\t}\n\n\tconst lines = [chalk.bold(\"Store packages:\")];\n\tfor (const pkg of packages) {\n\t\tconst verified = pkg.verified ? \" verified\" : \"\";\n\t\tconst categories = pkg.categories && pkg.categories.length > 0 ? ` [${pkg.categories.join(\", \")}]` : \"\";\n\t\tlines.push(`${pkg.id} - ${pkg.name}${verified}${categories}`);\n\t\tlines.push(chalk.dim(` ${pkg.description}`));\n\t\tlines.push(chalk.dim(` Source: ${formatStoreSourceSummary(pkg.source)}`));\n\t}\n\treturn lines.join(\"\\n\");\n}\n\nexport function renderStoreShow(resolved: StoreResolvedSource, inspection: StorePackageInspection): string {\n\tconst lines: string[] = [];\n\tconst catalogPackage = resolved.catalogPackage;\n\tif (catalogPackage) {\n\t\tlines.push(chalk.bold(catalogPackage.name));\n\t\tlines.push(`ID: ${catalogPackage.id}`);\n\t\tlines.push(`Description: ${catalogPackage.description}`);\n\t\tlines.push(`Source: ${formatStoreSourceSummary(catalogPackage.source)}`);\n\t\tlines.push(`Verified: ${catalogPackage.verified === true ? \"yes\" : \"no\"}`);\n\t\tif (catalogPackage.repo) lines.push(`Repo: ${catalogPackage.repo}`);\n\t\tif (catalogPackage.author) lines.push(`Author: ${catalogPackage.author}`);\n\t\tif (catalogPackage.license) lines.push(`License: ${catalogPackage.license}`);\n\t\tif (catalogPackage.resources) lines.push(`Catalog resources: ${formatList(catalogPackage.resources)}`);\n\t\tif (catalogPackage.compatibility?.volt) lines.push(`Volt compatibility: ${catalogPackage.compatibility.volt}`);\n\t\tlines.push(\"\");\n\t} else {\n\t\tlines.push(chalk.bold(resolved.input));\n\t\tlines.push(`Source: ${formatStoreSourceSummary(resolved.source)}`);\n\t\tlines.push(\"\");\n\t}\n\n\tlines.push(chalk.bold(\"Package metadata\"));\n\tlines.push(`Name: ${inspection.packageName ?? \"unknown\"}`);\n\tlines.push(`Version: ${inspection.packageVersion ?? \"unknown\"}`);\n\tlines.push(`Description: ${inspection.packageDescription ?? \"unknown\"}`);\n\tlines.push(`License: ${inspection.packageLicense ?? \"unknown\"}`);\n\tlines.push(`Repository: ${inspection.packageRepository ?? \"unknown\"}`);\n\tlines.push(...renderVoltManifest(inspection.voltManifest));\n\tlines.push(...renderDiscoveredResources(inspection));\n\tlines.push(...renderRecord(\"Dependencies\", inspection.dependencies));\n\tlines.push(...renderRecord(\"Peer dependencies\", inspection.peerDependencies));\n\tlines.push(...renderRecord(\"Optional dependencies\", inspection.optionalDependencies));\n\tlines.push(...renderRecord(\"Scripts\", inspection.scripts));\n\tlines.push(...renderWarnings([...resolved.warnings, ...inspection.warnings]));\n\treturn lines.join(\"\\n\");\n}\n\nexport function renderStoreInstallPlan(plan: StoreInstallPlan): string {\n\tconst target = formatStoreInstallPlanTarget(plan);\n\tconst source = formatStoreSourceSummary(plan.source);\n\tconst lines = [\n\t\tchalk.bold(\"Store install plan\"),\n\t\t...(target !== source ? [`Package: ${target}`] : []),\n\t\t`Source: ${source}`,\n\t\t`Scope: ${plan.scope}`,\n\t\t`Tracking: ${plan.tracking ? \"yes\" : \"no\"}`,\n\t\t`Script policy: ${plan.scriptPolicy}`,\n\t\t`Compatibility: ${plan.compatibility}`,\n\t\t\"\",\n\t\tchalk.bold(\"Package metadata\"),\n\t\t`Name: ${plan.inspection.packageName ?? \"unknown\"}`,\n\t\t`Version: ${plan.inspection.packageVersion ?? \"unknown\"}`,\n\t\t`Description: ${plan.inspection.packageDescription ?? \"unknown\"}`,\n\t\t`License: ${plan.inspection.packageLicense ?? \"unknown\"}`,\n\t\t`Repository: ${plan.inspection.packageRepository ?? \"unknown\"}`,\n\t\t...renderVoltManifest(plan.inspection.voltManifest),\n\t\t...renderDiscoveredResources(plan.inspection),\n\t\t...renderRecord(\"Dependencies\", plan.inspection.dependencies),\n\t\t...renderRecord(\"Peer dependencies\", plan.inspection.peerDependencies),\n\t\t...renderRecord(\"Optional dependencies\", plan.inspection.optionalDependencies),\n\t\t...renderRecord(\"Scripts\", plan.inspection.scripts),\n\t\t...renderWarnings(plan.warnings),\n\t];\n\treturn lines.join(\"\\n\");\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type StoreCatalog, type StoreCatalogPackage } from "./catalog.ts";
|
|
2
|
+
export type StoreResolvedSourceKind = "catalog" | "npm" | "git" | "local";
|
|
3
|
+
export interface StoreResolvedSource {
|
|
4
|
+
input: string;
|
|
5
|
+
source: string;
|
|
6
|
+
kind: StoreResolvedSourceKind;
|
|
7
|
+
catalogPackage?: StoreCatalogPackage;
|
|
8
|
+
pinned: boolean;
|
|
9
|
+
tracking: boolean;
|
|
10
|
+
warnings: string[];
|
|
11
|
+
}
|
|
12
|
+
export type StoreGitLsRemote = (repo: string, ref: string) => Promise<string>;
|
|
13
|
+
export interface ResolveStoreSourceOptions {
|
|
14
|
+
input: string;
|
|
15
|
+
catalog: StoreCatalog;
|
|
16
|
+
track?: boolean;
|
|
17
|
+
pinGit?: boolean;
|
|
18
|
+
ref?: string;
|
|
19
|
+
gitLsRemote?: StoreGitLsRemote;
|
|
20
|
+
}
|
|
21
|
+
export declare function resolveStoreSource(options: ResolveStoreSourceOptions): Promise<StoreResolvedSource>;
|
|
22
|
+
//# sourceMappingURL=resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../src/store/resolver.ts"],"names":[],"mappings":"AASA,OAAO,EAEN,KAAK,YAAY,EACjB,KAAK,mBAAmB,EAExB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,CAAC;AAE1E,MAAM,WAAW,mBAAmB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,uBAAuB,CAAC;IAC9B,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAE9E,MAAM,WAAW,yBAAyB;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,YAAY,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAkHD,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA0GzG","sourcesContent":["import type { ChildProcessByStdio } from \"node:child_process\";\nimport { isAbsolute } from \"node:path\";\nimport type { Readable } from \"node:stream\";\nimport { spawnProcess } from \"../utils/child-process.ts\";\nimport type { GitSource } from \"../utils/git.ts\";\nimport { parseGitUrl } from \"../utils/git.ts\";\nimport { type ParsedNpmSpec, parseNpmSpec } from \"../utils/npm-spec.ts\";\nimport { isLocalPath } from \"../utils/paths.ts\";\nimport { getSubprocessEnv } from \"../utils/process-env.ts\";\nimport {\n\tfindCatalogPackage,\n\ttype StoreCatalog,\n\ttype StoreCatalogPackage,\n\tsuggestCatalogPackageIds,\n} from \"./catalog.ts\";\n\nexport type StoreResolvedSourceKind = \"catalog\" | \"npm\" | \"git\" | \"local\";\n\nexport interface StoreResolvedSource {\n\tinput: string;\n\tsource: string;\n\tkind: StoreResolvedSourceKind;\n\tcatalogPackage?: StoreCatalogPackage;\n\tpinned: boolean;\n\ttracking: boolean;\n\twarnings: string[];\n}\n\nexport type StoreGitLsRemote = (repo: string, ref: string) => Promise<string>;\n\nexport interface ResolveStoreSourceOptions {\n\tinput: string;\n\tcatalog: StoreCatalog;\n\ttrack?: boolean;\n\tpinGit?: boolean;\n\tref?: string;\n\tgitLsRemote?: StoreGitLsRemote;\n}\n\nconst GIT_REMOTE_TIMEOUT_MS = 10000;\n\nfunction parseNpmSource(source: string): ParsedNpmSpec | undefined {\n\tif (!source.startsWith(\"npm:\")) {\n\t\treturn undefined;\n\t}\n\tconst spec = source.slice(\"npm:\".length).trim();\n\tif (!spec) {\n\t\tthrow new Error(\"npm store source must include a package spec\");\n\t}\n\treturn parseNpmSpec(spec);\n}\n\nfunction isStoreLocalPathInput(input: string): boolean {\n\tconst trimmed = input.trim();\n\treturn (\n\t\ttrimmed === \".\" ||\n\t\ttrimmed === \"..\" ||\n\t\ttrimmed.startsWith(\"./\") ||\n\t\ttrimmed.startsWith(\".\\\\\") ||\n\t\ttrimmed.startsWith(\"../\") ||\n\t\ttrimmed.startsWith(\"..\\\\\") ||\n\t\ttrimmed.startsWith(\"~/\") ||\n\t\ttrimmed.startsWith(\"~\\\\\") ||\n\t\ttrimmed.startsWith(\"file://\") ||\n\t\tisAbsolute(trimmed) ||\n\t\t(isLocalPath(trimmed) && (trimmed.includes(\"/\") || trimmed.includes(\"\\\\\")))\n\t);\n}\n\nfunction formatGitSource(source: GitSource, ref?: string): string {\n\treturn `git:${source.repo}${ref ? `@${ref}` : \"\"}`;\n}\n\nfunction withGitRef(source: GitSource, ref: string): GitSource {\n\treturn {\n\t\t...source,\n\t\tref,\n\t\tpinned: true,\n\t};\n}\n\nfunction isCommitRef(ref: string): boolean {\n\treturn /^[0-9a-f]{40}$/i.test(ref);\n}\n\nfunction parseLsRemoteCommit(output: string, ref: string): string {\n\tconst escapedRef = ref.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n\tconst refPattern = ref === \"HEAD\" ? \"HEAD\" : escapedRef;\n\tconst pattern = new RegExp(`^([0-9a-f]{40})\\\\s+${refPattern}$`, \"im\");\n\tconst exactMatch = output.match(pattern);\n\tif (exactMatch?.[1]) {\n\t\treturn exactMatch[1];\n\t}\n\tconst firstCommit = output.match(/^([0-9a-f]{40})\\s+/m);\n\tif (firstCommit?.[1]) {\n\t\treturn firstCommit[1];\n\t}\n\tthrow new Error(`Unable to resolve git ref ${ref}`);\n}\n\nfunction runGitLsRemote(repo: string, ref: string): Promise<string> {\n\treturn new Promise((resolvePromise, reject) => {\n\t\tconst child = spawnProcess(\"git\", [\"ls-remote\", repo, ref], {\n\t\t\tstdio: [\"ignore\", \"pipe\", \"pipe\"],\n\t\t\tenv: { ...getSubprocessEnv(), GIT_TERMINAL_PROMPT: \"0\" },\n\t\t}) as ChildProcessByStdio<null, Readable, Readable>;\n\t\tlet stdout = \"\";\n\t\tlet stderr = \"\";\n\t\tlet timedOut = false;\n\t\tconst timeout = setTimeout(() => {\n\t\t\ttimedOut = true;\n\t\t\tchild.kill();\n\t\t}, GIT_REMOTE_TIMEOUT_MS);\n\n\t\tchild.stdout.on(\"data\", (data) => {\n\t\t\tstdout += data.toString();\n\t\t});\n\t\tchild.stderr.on(\"data\", (data) => {\n\t\t\tstderr += data.toString();\n\t\t});\n\t\tchild.once(\"error\", (error) => {\n\t\t\tclearTimeout(timeout);\n\t\t\treject(error);\n\t\t});\n\t\tchild.once(\"close\", (code, signal) => {\n\t\t\tclearTimeout(timeout);\n\t\t\tif (timedOut) {\n\t\t\t\treject(new Error(`git ls-remote ${repo} ${ref} timed out`));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (code === 0) {\n\t\t\t\tresolvePromise(stdout.trim());\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst status = code === null ? `signal ${signal ?? \"unknown\"}` : `code ${code}`;\n\t\t\treject(new Error(`git ls-remote ${repo} ${ref} failed with ${status}: ${stderr || stdout}`));\n\t\t});\n\t});\n}\n\nasync function resolveGitCommit(repo: string, ref: string, gitLsRemote?: StoreGitLsRemote): Promise<string> {\n\tconst output = gitLsRemote ? await gitLsRemote(repo, ref) : await runGitLsRemote(repo, ref);\n\treturn parseLsRemoteCommit(output, ref);\n}\n\nfunction buildUnknownSourceError(input: string, catalog: StoreCatalog): Error {\n\tconst suggestions = suggestCatalogPackageIds(catalog, input);\n\tconst suffix = suggestions.length > 0 ? ` Did you mean ${suggestions.join(\", \")}?` : \"\";\n\treturn new Error(`Unknown store package or source: ${input}.${suffix}`);\n}\n\nexport async function resolveStoreSource(options: ResolveStoreSourceOptions): Promise<StoreResolvedSource> {\n\tconst input = options.input.trim();\n\tif (!input) {\n\t\tthrow new Error(\"Missing store source.\");\n\t}\n\n\tconst catalogPackage = findCatalogPackage(options.catalog, input);\n\tconst baseSource = catalogPackage?.source ?? input;\n\tconst baseKind: StoreResolvedSourceKind = catalogPackage ? \"catalog\" : \"local\";\n\tconst warnings: string[] = [];\n\tconst track = options.track ?? false;\n\n\tconst npmInfo = parseNpmSource(baseSource);\n\tif (npmInfo) {\n\t\tif (options.ref) {\n\t\t\tthrow new Error(\"--ref is only valid for git store sources\");\n\t\t}\n\t\tif (track) {\n\t\t\tthrow new Error(\"--track is only valid for git store sources\");\n\t\t}\n\t\tif (!npmInfo.version) {\n\t\t\twarnings.push(`npm package ${npmInfo.name} is not pinned to an exact version.`);\n\t\t} else if (!npmInfo.exactVersion) {\n\t\t\twarnings.push(`npm package ${npmInfo.name} uses non-exact version spec \"${npmInfo.version}\".`);\n\t\t}\n\t\tconst pinned = npmInfo.exactVersion;\n\t\treturn {\n\t\t\tinput,\n\t\t\tsource: baseSource,\n\t\t\tkind: catalogPackage ? \"catalog\" : \"npm\",\n\t\t\t...(catalogPackage ? { catalogPackage } : {}),\n\t\t\tpinned,\n\t\t\ttracking: !pinned,\n\t\t\twarnings,\n\t\t};\n\t}\n\n\tlet gitSource = parseGitUrl(baseSource);\n\tif (gitSource) {\n\t\tif (options.ref) {\n\t\t\tgitSource = withGitRef(gitSource, options.ref);\n\t\t}\n\n\t\tif (!gitSource.ref) {\n\t\t\tif (track || options.pinGit === false) {\n\t\t\t\twarnings.push(\"Git source has no ref and will track the repository default branch if installed.\");\n\t\t\t\treturn {\n\t\t\t\t\tinput,\n\t\t\t\t\tsource: formatGitSource(gitSource),\n\t\t\t\t\tkind: catalogPackage ? \"catalog\" : \"git\",\n\t\t\t\t\t...(catalogPackage ? { catalogPackage } : {}),\n\t\t\t\t\tpinned: false,\n\t\t\t\t\ttracking: true,\n\t\t\t\t\twarnings,\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst commit = await resolveGitCommit(gitSource.repo, \"HEAD\", options.gitLsRemote);\n\t\t\treturn {\n\t\t\t\tinput,\n\t\t\t\tsource: formatGitSource(gitSource, commit),\n\t\t\t\tkind: catalogPackage ? \"catalog\" : \"git\",\n\t\t\t\t...(catalogPackage ? { catalogPackage } : {}),\n\t\t\t\tpinned: true,\n\t\t\t\ttracking: false,\n\t\t\t\twarnings,\n\t\t\t};\n\t\t}\n\n\t\tif (!isCommitRef(gitSource.ref)) {\n\t\t\twarnings.push(`Git ref \"${gitSource.ref}\" can be moved by repository owners; commits are more reproducible.`);\n\t\t}\n\t\treturn {\n\t\t\tinput,\n\t\t\tsource: options.ref ? formatGitSource(gitSource, gitSource.ref) : baseSource,\n\t\t\tkind: catalogPackage ? \"catalog\" : \"git\",\n\t\t\t...(catalogPackage ? { catalogPackage } : {}),\n\t\t\tpinned: !track,\n\t\t\ttracking: track,\n\t\t\twarnings,\n\t\t};\n\t}\n\n\tif (!catalogPackage && !isStoreLocalPathInput(input)) {\n\t\tthrow buildUnknownSourceError(input, options.catalog);\n\t}\n\tif (options.ref) {\n\t\tthrow new Error(\"--ref is only valid for git store sources\");\n\t}\n\tif (track) {\n\t\tthrow new Error(\"--track is only valid for git store sources\");\n\t}\n\n\tif (catalogPackage && !isLocalPath(baseSource)) {\n\t\tthrow new Error(`Catalog package ${catalogPackage.id} has an unsupported source: ${baseSource}`);\n\t}\n\n\twarnings.push(\"Local package paths are not reproducible and should not appear in public catalogs.\");\n\treturn {\n\t\tinput,\n\t\tsource: baseSource,\n\t\tkind: catalogPackage ? baseKind : \"local\",\n\t\t...(catalogPackage ? { catalogPackage } : {}),\n\t\tpinned: false,\n\t\ttracking: false,\n\t\twarnings,\n\t};\n}\n"]}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { isAbsolute } from "node:path";
|
|
2
|
+
import { spawnProcess } from "../utils/child-process.js";
|
|
3
|
+
import { parseGitUrl } from "../utils/git.js";
|
|
4
|
+
import { parseNpmSpec } from "../utils/npm-spec.js";
|
|
5
|
+
import { isLocalPath } from "../utils/paths.js";
|
|
6
|
+
import { getSubprocessEnv } from "../utils/process-env.js";
|
|
7
|
+
import { findCatalogPackage, suggestCatalogPackageIds, } from "./catalog.js";
|
|
8
|
+
const GIT_REMOTE_TIMEOUT_MS = 10000;
|
|
9
|
+
function parseNpmSource(source) {
|
|
10
|
+
if (!source.startsWith("npm:")) {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
const spec = source.slice("npm:".length).trim();
|
|
14
|
+
if (!spec) {
|
|
15
|
+
throw new Error("npm store source must include a package spec");
|
|
16
|
+
}
|
|
17
|
+
return parseNpmSpec(spec);
|
|
18
|
+
}
|
|
19
|
+
function isStoreLocalPathInput(input) {
|
|
20
|
+
const trimmed = input.trim();
|
|
21
|
+
return (trimmed === "." ||
|
|
22
|
+
trimmed === ".." ||
|
|
23
|
+
trimmed.startsWith("./") ||
|
|
24
|
+
trimmed.startsWith(".\\") ||
|
|
25
|
+
trimmed.startsWith("../") ||
|
|
26
|
+
trimmed.startsWith("..\\") ||
|
|
27
|
+
trimmed.startsWith("~/") ||
|
|
28
|
+
trimmed.startsWith("~\\") ||
|
|
29
|
+
trimmed.startsWith("file://") ||
|
|
30
|
+
isAbsolute(trimmed) ||
|
|
31
|
+
(isLocalPath(trimmed) && (trimmed.includes("/") || trimmed.includes("\\"))));
|
|
32
|
+
}
|
|
33
|
+
function formatGitSource(source, ref) {
|
|
34
|
+
return `git:${source.repo}${ref ? `@${ref}` : ""}`;
|
|
35
|
+
}
|
|
36
|
+
function withGitRef(source, ref) {
|
|
37
|
+
return {
|
|
38
|
+
...source,
|
|
39
|
+
ref,
|
|
40
|
+
pinned: true,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function isCommitRef(ref) {
|
|
44
|
+
return /^[0-9a-f]{40}$/i.test(ref);
|
|
45
|
+
}
|
|
46
|
+
function parseLsRemoteCommit(output, ref) {
|
|
47
|
+
const escapedRef = ref.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
48
|
+
const refPattern = ref === "HEAD" ? "HEAD" : escapedRef;
|
|
49
|
+
const pattern = new RegExp(`^([0-9a-f]{40})\\s+${refPattern}$`, "im");
|
|
50
|
+
const exactMatch = output.match(pattern);
|
|
51
|
+
if (exactMatch?.[1]) {
|
|
52
|
+
return exactMatch[1];
|
|
53
|
+
}
|
|
54
|
+
const firstCommit = output.match(/^([0-9a-f]{40})\s+/m);
|
|
55
|
+
if (firstCommit?.[1]) {
|
|
56
|
+
return firstCommit[1];
|
|
57
|
+
}
|
|
58
|
+
throw new Error(`Unable to resolve git ref ${ref}`);
|
|
59
|
+
}
|
|
60
|
+
function runGitLsRemote(repo, ref) {
|
|
61
|
+
return new Promise((resolvePromise, reject) => {
|
|
62
|
+
const child = spawnProcess("git", ["ls-remote", repo, ref], {
|
|
63
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
64
|
+
env: { ...getSubprocessEnv(), GIT_TERMINAL_PROMPT: "0" },
|
|
65
|
+
});
|
|
66
|
+
let stdout = "";
|
|
67
|
+
let stderr = "";
|
|
68
|
+
let timedOut = false;
|
|
69
|
+
const timeout = setTimeout(() => {
|
|
70
|
+
timedOut = true;
|
|
71
|
+
child.kill();
|
|
72
|
+
}, GIT_REMOTE_TIMEOUT_MS);
|
|
73
|
+
child.stdout.on("data", (data) => {
|
|
74
|
+
stdout += data.toString();
|
|
75
|
+
});
|
|
76
|
+
child.stderr.on("data", (data) => {
|
|
77
|
+
stderr += data.toString();
|
|
78
|
+
});
|
|
79
|
+
child.once("error", (error) => {
|
|
80
|
+
clearTimeout(timeout);
|
|
81
|
+
reject(error);
|
|
82
|
+
});
|
|
83
|
+
child.once("close", (code, signal) => {
|
|
84
|
+
clearTimeout(timeout);
|
|
85
|
+
if (timedOut) {
|
|
86
|
+
reject(new Error(`git ls-remote ${repo} ${ref} timed out`));
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (code === 0) {
|
|
90
|
+
resolvePromise(stdout.trim());
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const status = code === null ? `signal ${signal ?? "unknown"}` : `code ${code}`;
|
|
94
|
+
reject(new Error(`git ls-remote ${repo} ${ref} failed with ${status}: ${stderr || stdout}`));
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
async function resolveGitCommit(repo, ref, gitLsRemote) {
|
|
99
|
+
const output = gitLsRemote ? await gitLsRemote(repo, ref) : await runGitLsRemote(repo, ref);
|
|
100
|
+
return parseLsRemoteCommit(output, ref);
|
|
101
|
+
}
|
|
102
|
+
function buildUnknownSourceError(input, catalog) {
|
|
103
|
+
const suggestions = suggestCatalogPackageIds(catalog, input);
|
|
104
|
+
const suffix = suggestions.length > 0 ? ` Did you mean ${suggestions.join(", ")}?` : "";
|
|
105
|
+
return new Error(`Unknown store package or source: ${input}.${suffix}`);
|
|
106
|
+
}
|
|
107
|
+
export async function resolveStoreSource(options) {
|
|
108
|
+
const input = options.input.trim();
|
|
109
|
+
if (!input) {
|
|
110
|
+
throw new Error("Missing store source.");
|
|
111
|
+
}
|
|
112
|
+
const catalogPackage = findCatalogPackage(options.catalog, input);
|
|
113
|
+
const baseSource = catalogPackage?.source ?? input;
|
|
114
|
+
const baseKind = catalogPackage ? "catalog" : "local";
|
|
115
|
+
const warnings = [];
|
|
116
|
+
const track = options.track ?? false;
|
|
117
|
+
const npmInfo = parseNpmSource(baseSource);
|
|
118
|
+
if (npmInfo) {
|
|
119
|
+
if (options.ref) {
|
|
120
|
+
throw new Error("--ref is only valid for git store sources");
|
|
121
|
+
}
|
|
122
|
+
if (track) {
|
|
123
|
+
throw new Error("--track is only valid for git store sources");
|
|
124
|
+
}
|
|
125
|
+
if (!npmInfo.version) {
|
|
126
|
+
warnings.push(`npm package ${npmInfo.name} is not pinned to an exact version.`);
|
|
127
|
+
}
|
|
128
|
+
else if (!npmInfo.exactVersion) {
|
|
129
|
+
warnings.push(`npm package ${npmInfo.name} uses non-exact version spec "${npmInfo.version}".`);
|
|
130
|
+
}
|
|
131
|
+
const pinned = npmInfo.exactVersion;
|
|
132
|
+
return {
|
|
133
|
+
input,
|
|
134
|
+
source: baseSource,
|
|
135
|
+
kind: catalogPackage ? "catalog" : "npm",
|
|
136
|
+
...(catalogPackage ? { catalogPackage } : {}),
|
|
137
|
+
pinned,
|
|
138
|
+
tracking: !pinned,
|
|
139
|
+
warnings,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
let gitSource = parseGitUrl(baseSource);
|
|
143
|
+
if (gitSource) {
|
|
144
|
+
if (options.ref) {
|
|
145
|
+
gitSource = withGitRef(gitSource, options.ref);
|
|
146
|
+
}
|
|
147
|
+
if (!gitSource.ref) {
|
|
148
|
+
if (track || options.pinGit === false) {
|
|
149
|
+
warnings.push("Git source has no ref and will track the repository default branch if installed.");
|
|
150
|
+
return {
|
|
151
|
+
input,
|
|
152
|
+
source: formatGitSource(gitSource),
|
|
153
|
+
kind: catalogPackage ? "catalog" : "git",
|
|
154
|
+
...(catalogPackage ? { catalogPackage } : {}),
|
|
155
|
+
pinned: false,
|
|
156
|
+
tracking: true,
|
|
157
|
+
warnings,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
const commit = await resolveGitCommit(gitSource.repo, "HEAD", options.gitLsRemote);
|
|
161
|
+
return {
|
|
162
|
+
input,
|
|
163
|
+
source: formatGitSource(gitSource, commit),
|
|
164
|
+
kind: catalogPackage ? "catalog" : "git",
|
|
165
|
+
...(catalogPackage ? { catalogPackage } : {}),
|
|
166
|
+
pinned: true,
|
|
167
|
+
tracking: false,
|
|
168
|
+
warnings,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
if (!isCommitRef(gitSource.ref)) {
|
|
172
|
+
warnings.push(`Git ref "${gitSource.ref}" can be moved by repository owners; commits are more reproducible.`);
|
|
173
|
+
}
|
|
174
|
+
return {
|
|
175
|
+
input,
|
|
176
|
+
source: options.ref ? formatGitSource(gitSource, gitSource.ref) : baseSource,
|
|
177
|
+
kind: catalogPackage ? "catalog" : "git",
|
|
178
|
+
...(catalogPackage ? { catalogPackage } : {}),
|
|
179
|
+
pinned: !track,
|
|
180
|
+
tracking: track,
|
|
181
|
+
warnings,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
if (!catalogPackage && !isStoreLocalPathInput(input)) {
|
|
185
|
+
throw buildUnknownSourceError(input, options.catalog);
|
|
186
|
+
}
|
|
187
|
+
if (options.ref) {
|
|
188
|
+
throw new Error("--ref is only valid for git store sources");
|
|
189
|
+
}
|
|
190
|
+
if (track) {
|
|
191
|
+
throw new Error("--track is only valid for git store sources");
|
|
192
|
+
}
|
|
193
|
+
if (catalogPackage && !isLocalPath(baseSource)) {
|
|
194
|
+
throw new Error(`Catalog package ${catalogPackage.id} has an unsupported source: ${baseSource}`);
|
|
195
|
+
}
|
|
196
|
+
warnings.push("Local package paths are not reproducible and should not appear in public catalogs.");
|
|
197
|
+
return {
|
|
198
|
+
input,
|
|
199
|
+
source: baseSource,
|
|
200
|
+
kind: catalogPackage ? baseKind : "local",
|
|
201
|
+
...(catalogPackage ? { catalogPackage } : {}),
|
|
202
|
+
pinned: false,
|
|
203
|
+
tracking: false,
|
|
204
|
+
warnings,
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
//# sourceMappingURL=resolver.js.map
|