@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 @@
|
|
|
1
|
+
{"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../../../src/core/rpc/transcript.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,KAAK,EACX,eAAe,EAEf,qBAAqB,EAGrB,MAAM,YAAY,CAAC;AA0BpB,MAAM,WAAW,+BAA+B;IAC/C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,wBAAwB,CACvC,cAAc,EAAE,sBAAsB,EACtC,OAAO,GAAE,+BAAoC,GAC3C,qBAAqB,CAiBvB;AAED;;;;;GAKG;AACH,eAAO,MAAM,oCAAoC,QAAkB,CAAC;AACpE,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAEhD,MAAM,MAAM,0BAA0B,GACnC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,eAAe,EAAE,CAAC;IAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAC5G;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,eAAe,GAAG,iBAAiB,CAAA;CAAE,CAAC;AAM7D;;;;;GAKG;AACH,wBAAgB,oBAAoB,CACnC,OAAO,EAAE,YAAY,EAAE,EACvB,OAAO,EAAE,MAAM,EACf,eAAe,SAAI,EACnB,WAAW,SAAuC,GAChD,0BAA0B,CAwB5B;AAED,kEAAkE;AAClE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,EAAE,CAYrE;AA+SD,wBAAgB,sBAAsB,CACrC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAC1C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAiDrC","sourcesContent":["import { Buffer } from \"node:buffer\";\nimport type { AgentMessage } from \"@hansjm10/volt-agent-core\";\nimport type { ImageContent } from \"@hansjm10/volt-ai\";\nimport { type BashExecutionMessage, extractVisibleTextContent } from \"../messages.ts\";\nimport type { ReadonlySessionManager, SessionEntry } from \"../session-manager.ts\";\nimport type {\n\tRpcMessageImage,\n\tRpcTranscriptItem,\n\tRpcTranscriptResponse,\n\tRpcTranscriptToolItem,\n\tRpcTranscriptToolStatus,\n} from \"./types.ts\";\n\nconst DEFAULT_TRANSCRIPT_LIMIT = 100;\nconst MAX_TRANSCRIPT_LIMIT = 200;\nconst MESSAGE_TEXT_LIMIT = 16_000;\nconst SUMMARY_TEXT_LIMIT = 1_000;\nconst TOOL_SUMMARY_LIMIT = 1_000;\nconst TOOL_COMMAND_LIMIT = 500;\nconst TOOL_ARGUMENT_STRING_LIMIT = 500;\nconst TOOL_ARGUMENT_KEYS_LIMIT = 12;\nconst MUTATION_PREVIEW_LIMIT = 4_000;\nconst SUBAGENT_AGENT_LIMIT = 200;\nconst SUBAGENT_ID_LIMIT = 200;\nconst SUBAGENT_TASK_LIMIT = 1_000;\nconst SUBAGENT_ERROR_LIMIT = 1_000;\nconst SUBAGENT_OUTPUT_LIMIT = 1_000;\nconst SUBAGENT_ACTIVITY_LIMIT = 300;\nconst SUBAGENT_TREE_DEPTH_LIMIT = 5;\nconst SUBAGENT_NUMERIC_DETAIL_KEYS = [\"startedAt\", \"durationMs\", \"toolCalls\", \"tokens\"] as const;\n\ninterface StoredToolCall {\n\tid: string;\n\tname: string;\n\targuments: Record<string, unknown>;\n}\n\nexport interface ProjectSessionTranscriptOptions {\n\tbeforeEntryId?: string;\n\tlimit?: number;\n}\n\nexport function projectSessionTranscript(\n\tsessionManager: ReadonlySessionManager,\n\toptions: ProjectSessionTranscriptOptions = {},\n): RpcTranscriptResponse {\n\tconst allItems = projectTranscriptItems(sessionManager.getBranch());\n\tconst beforeIndex = options.beforeEntryId\n\t\t? allItems.findIndex((item) => item.id === options.beforeEntryId)\n\t\t: allItems.length;\n\tconst eligibleItems = beforeIndex === -1 ? [] : allItems.slice(0, beforeIndex);\n\tconst limit = normalizeLimit(options.limit);\n\tconst pageStart = Math.max(0, eligibleItems.length - limit);\n\tconst items = eligibleItems.slice(pageStart);\n\tconst hasMore = pageStart > 0;\n\n\treturn {\n\t\tsessionId: sessionManager.getSessionId(),\n\t\titems,\n\t\thasMore,\n\t\tnextBeforeEntryId: hasMore ? (items[0]?.id ?? null) : null,\n\t};\n}\n\n/**\n * Serialized-size budget for one get_message_images response. Keeps the frame\n * under the daemon control protocol's 8 MB line cap (the tightest transport on\n * any relay path) with headroom for JSON envelope overhead. The first image of\n * a page is always included so pagination cannot stall on a single large image.\n */\nexport const MESSAGE_IMAGES_RESPONSE_BUDGET_BYTES = 6 * 1024 * 1024;\nexport const MESSAGE_IMAGES_PAGE_MAX_ITEMS = 32;\n\nexport type ProjectMessageImagesResult =\n\t| { ok: true; entryId: string; totalImages: number; images: RpcMessageImage[]; nextImageIndex: number | null }\n\t| { ok: false; error: \"unknown_entry\" | \"image_too_large\" };\n\nfunction getSerializedMessageImageBytes(image: ImageContent, index: number): number {\n\treturn Buffer.byteLength(JSON.stringify({ ...image, index }), \"utf8\");\n}\n\n/**\n * Recovers the inline image blocks persisted on a session entry, paged from\n * `startImageIndex` under `budgetBytes`. Text-only transcript projections\n * advertise `imageCount`; reconnecting clients call this per entry to restore\n * user-message images after a cold restart.\n */\nexport function projectMessageImages(\n\tentries: SessionEntry[],\n\tentryId: string,\n\tstartImageIndex = 0,\n\tbudgetBytes = MESSAGE_IMAGES_RESPONSE_BUDGET_BYTES,\n): ProjectMessageImagesResult {\n\tconst entry = entries.find((candidate) => candidate.id === entryId);\n\tif (!entry || entry.type !== \"message\") {\n\t\treturn { ok: false, error: \"unknown_entry\" };\n\t}\n\tconst allImages = extractMessageImages((entry.message as { content?: unknown }).content);\n\tconst start = Math.max(0, Math.floor(startImageIndex));\n\tconst images: RpcMessageImage[] = [];\n\tlet usedBytes = 0;\n\tlet nextImageIndex: number | null = null;\n\tfor (let index = start; index < allImages.length; index++) {\n\t\tconst image = allImages[index];\n\t\tconst serializedBytes = getSerializedMessageImageBytes(image, index);\n\t\tif (serializedBytes > budgetBytes && images.length === 0) {\n\t\t\treturn { ok: false, error: \"image_too_large\" };\n\t\t}\n\t\tif (images.length >= MESSAGE_IMAGES_PAGE_MAX_ITEMS || usedBytes + serializedBytes > budgetBytes) {\n\t\t\tnextImageIndex = index;\n\t\t\tbreak;\n\t\t}\n\t\timages.push({ ...image, index });\n\t\tusedBytes += serializedBytes;\n\t}\n\treturn { ok: true, entryId, totalImages: allImages.length, images, nextImageIndex };\n}\n\n/** Inline image blocks on a persisted message's content array. */\nexport function extractMessageImages(content: unknown): ImageContent[] {\n\tif (!Array.isArray(content)) {\n\t\treturn [];\n\t}\n\treturn content.filter(\n\t\t(block): block is ImageContent =>\n\t\t\tisRecord(block) &&\n\t\t\tblock.type === \"image\" &&\n\t\t\ttypeof block.data === \"string\" &&\n\t\t\tblock.data.length > 0 &&\n\t\t\ttypeof block.mimeType === \"string\",\n\t);\n}\n\nfunction normalizeLimit(limit: number | undefined): number {\n\tif (limit === undefined || !Number.isFinite(limit) || limit <= 0) {\n\t\treturn DEFAULT_TRANSCRIPT_LIMIT;\n\t}\n\treturn Math.min(MAX_TRANSCRIPT_LIMIT, Math.floor(limit));\n}\n\nfunction projectTranscriptItems(entries: SessionEntry[]): RpcTranscriptItem[] {\n\tconst toolCallsById = collectToolCalls(entries);\n\tconst items: RpcTranscriptItem[] = [];\n\n\tfor (const entry of entries) {\n\t\tif (entry.type === \"compaction\") {\n\t\t\titems.push({\n\t\t\t\tid: entry.id,\n\t\t\t\trole: \"summary\",\n\t\t\t\ttimestamp: normalizeTimestamp(entry.timestamp),\n\t\t\t\ttitle: \"Conversation compacted\",\n\t\t\t\ttext: boundText(entry.summary, SUMMARY_TEXT_LIMIT),\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (entry.type === \"custom_message\") {\n\t\t\tconst customItem = projectCustomMessage(entry);\n\t\t\tif (customItem) {\n\t\t\t\titems.push(customItem);\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (entry.type !== \"message\") {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst message = entry.message;\n\t\tif (message.role === \"user\") {\n\t\t\tconst text = boundText(extractVisibleTextContent(message.content), MESSAGE_TEXT_LIMIT);\n\t\t\tconst imageCount = extractMessageImages(message.content).length;\n\t\t\tif (text || imageCount > 0) {\n\t\t\t\titems.push({\n\t\t\t\t\tid: entry.id,\n\t\t\t\t\trole: \"user\",\n\t\t\t\t\ttext,\n\t\t\t\t\ttimestamp: normalizeTimestamp(entry.timestamp),\n\t\t\t\t\t...(imageCount > 0 ? { imageCount } : {}),\n\t\t\t\t});\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (message.role === \"assistant\") {\n\t\t\tconst text = boundText(extractVisibleTextContent(message.content), MESSAGE_TEXT_LIMIT);\n\t\t\tif (text) {\n\t\t\t\titems.push({ id: entry.id, role: \"assistant\", text, timestamp: normalizeTimestamp(entry.timestamp) });\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (message.role === \"toolResult\") {\n\t\t\titems.push(projectToolResult(entry.id, entry.timestamp, message, toolCallsById.get(message.toolCallId)));\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (message.role === \"bashExecution\") {\n\t\t\titems.push(projectBashExecution(entry.id, entry.timestamp, message));\n\t\t}\n\t}\n\n\treturn items;\n}\n\nfunction projectCustomMessage(entry: Extract<SessionEntry, { type: \"custom_message\" }>): RpcTranscriptItem | undefined {\n\tif (!entry.display || entry.customType !== \"review\") {\n\t\treturn undefined;\n\t}\n\tconst text = boundText(extractVisibleTextContent(entry.content), MESSAGE_TEXT_LIMIT);\n\tif (!text) {\n\t\treturn undefined;\n\t}\n\treturn { id: entry.id, role: \"assistant\", text, timestamp: normalizeTimestamp(entry.timestamp) };\n}\n\nfunction collectToolCalls(entries: SessionEntry[]): Map<string, StoredToolCall> {\n\tconst toolCalls = new Map<string, StoredToolCall>();\n\tfor (const entry of entries) {\n\t\tif (entry.type !== \"message\" || entry.message.role !== \"assistant\") {\n\t\t\tcontinue;\n\t\t}\n\t\tfor (const block of entry.message.content) {\n\t\t\tif (isStoredToolCall(block)) {\n\t\t\t\ttoolCalls.set(block.id, block);\n\t\t\t}\n\t\t}\n\t}\n\treturn toolCalls;\n}\n\nfunction projectToolResult(\n\tentryId: string,\n\ttimestamp: string,\n\tmessage: Extract<AgentMessage, { role: \"toolResult\" }>,\n\ttoolCall: StoredToolCall | undefined,\n): RpcTranscriptToolItem {\n\tconst args = toolCall?.arguments;\n\tconst status: RpcTranscriptToolStatus = message.isError ? \"failed\" : \"completed\";\n\tconst path = getToolPath(message.toolName, args);\n\tconst details = isRecord(message.details) ? message.details : undefined;\n\tconst item: RpcTranscriptToolItem = {\n\t\tid: entryId,\n\t\trole: \"tool\",\n\t\ttoolName: message.toolName,\n\t\tstatus,\n\t\tsummary: summarizeToolResult(message.toolName, status, args, path),\n\t\ttimestamp: normalizeTimestamp(timestamp),\n\t};\n\tif (path) {\n\t\titem.path = path;\n\t}\n\tconst imageCount = extractMessageImages(message.content).length;\n\tif (imageCount > 0) {\n\t\titem.imageCount = imageCount;\n\t}\n\tconst diffPreview = getBoundedString(details, \"diff\", MUTATION_PREVIEW_LIMIT);\n\tif (diffPreview) {\n\t\titem.diffPreview = diffPreview;\n\t}\n\tconst patchPreview = getBoundedString(details, \"patch\", MUTATION_PREVIEW_LIMIT);\n\tif (patchPreview) {\n\t\titem.patchPreview = patchPreview;\n\t}\n\tconst projectedArgs = projectToolArgs(message.toolName, args);\n\tif (projectedArgs) {\n\t\titem.args = projectedArgs;\n\t}\n\tif (message.toolName === \"subagent\") {\n\t\tconst subagentDetails = projectSubagentDetails(details);\n\t\tif (subagentDetails) {\n\t\t\titem.details = subagentDetails;\n\t\t}\n\t}\n\treturn item;\n}\n\nfunction projectToolArgs(\n\ttoolName: string,\n\targs: Record<string, unknown> | undefined,\n): Record<string, unknown> | undefined {\n\tif (toolName === \"subagent\") {\n\t\treturn projectSubagentArgs(args);\n\t}\n\tif (!args) {\n\t\treturn undefined;\n\t}\n\n\tconst projected: Record<string, unknown> = {};\n\tswitch (toolName) {\n\t\tcase \"bash\":\n\t\t\tcopyStringArg(args, projected, \"command\", TOOL_COMMAND_LIMIT);\n\t\t\tcopyNumberArg(args, projected, \"timeout\");\n\t\t\tbreak;\n\t\tcase \"read\":\n\t\t\tcopyStringArg(args, projected, \"path\");\n\t\t\tcopyStringArg(args, projected, \"file_path\");\n\t\t\tcopyNumberArg(args, projected, \"offset\");\n\t\t\tcopyNumberArg(args, projected, \"limit\");\n\t\t\tbreak;\n\t\tcase \"edit\":\n\t\tcase \"write\":\n\t\t\tcopyStringArg(args, projected, \"path\");\n\t\t\tcopyStringArg(args, projected, \"file_path\");\n\t\t\tbreak;\n\t\tcase \"grep\":\n\t\t\tcopyStringArg(args, projected, \"pattern\");\n\t\t\tcopyStringArg(args, projected, \"path\");\n\t\t\tcopyStringArg(args, projected, \"glob\");\n\t\t\tcopyStringArg(args, projected, \"include\");\n\t\t\tcopyStringArg(args, projected, \"exclude\");\n\t\t\tcopyBooleanArg(args, projected, \"ignoreCase\");\n\t\t\tcopyBooleanArg(args, projected, \"literal\");\n\t\t\tcopyNumberArg(args, projected, \"context\");\n\t\t\tbreak;\n\t\tcase \"find\":\n\t\t\tcopyStringArg(args, projected, \"query\");\n\t\t\tcopyStringArg(args, projected, \"pattern\");\n\t\t\tcopyStringArg(args, projected, \"path\");\n\t\t\tcopyStringArg(args, projected, \"glob\");\n\t\t\tcopyStringArg(args, projected, \"name\");\n\t\t\tcopyNumberArg(args, projected, \"limit\");\n\t\t\tbreak;\n\t\tcase \"ls\":\n\t\t\tcopyStringArg(args, projected, \"path\");\n\t\t\tcopyNumberArg(args, projected, \"limit\");\n\t\t\tbreak;\n\t\tcase \"lsp\":\n\t\t\tcopyStringArg(args, projected, \"action\");\n\t\t\tcopyStringArg(args, projected, \"symbol\");\n\t\t\tcopyStringArg(args, projected, \"path\");\n\t\t\tcopyStringArg(args, projected, \"file_path\");\n\t\t\tcopyNumberArg(args, projected, \"line\");\n\t\t\tbreak;\n\t\tcase \"web_search\":\n\t\t\tcopyStringArg(args, projected, \"query\");\n\t\t\tcopyStringArrayArg(args, projected, \"domains\");\n\t\t\tcopyNumberArg(args, projected, \"limit\");\n\t\t\tcopyNumberArg(args, projected, \"recencyDays\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n\treturn Object.keys(projected).length > 0 ? projected : undefined;\n}\n\nfunction copyStringArg(\n\tfrom: Record<string, unknown>,\n\tto: Record<string, unknown>,\n\tkey: string,\n\tlimit = TOOL_ARGUMENT_STRING_LIMIT,\n): void {\n\tconst value = getStringArg(from, key);\n\tif (value) {\n\t\tto[key] = boundText(value, limit);\n\t}\n}\n\nfunction copyNumberArg(from: Record<string, unknown>, to: Record<string, unknown>, key: string): void {\n\tconst value = getFiniteNumber(from, key);\n\tif (value !== undefined) {\n\t\tto[key] = value;\n\t}\n}\n\nfunction copyBooleanArg(from: Record<string, unknown>, to: Record<string, unknown>, key: string): void {\n\tconst value = from[key];\n\tif (typeof value === \"boolean\") {\n\t\tto[key] = value;\n\t}\n}\n\nfunction copyStringArrayArg(from: Record<string, unknown>, to: Record<string, unknown>, key: string): void {\n\tconst value = from[key];\n\tif (!Array.isArray(value)) {\n\t\treturn;\n\t}\n\tconst strings = value\n\t\t.map((item) => (typeof item === \"string\" ? boundText(item, TOOL_ARGUMENT_STRING_LIMIT) : undefined))\n\t\t.filter((item): item is string => item !== undefined && item.trim().length > 0)\n\t\t.slice(0, TOOL_ARGUMENT_KEYS_LIMIT);\n\tif (strings.length > 0) {\n\t\tto[key] = strings;\n\t}\n}\n\nfunction projectSubagentArgs(args: Record<string, unknown> | undefined): Record<string, unknown> | undefined {\n\tif (!args) {\n\t\treturn undefined;\n\t}\n\tconst projected: Record<string, unknown> = {};\n\tconst agent = getStringArg(args, \"agent\");\n\tif (agent) {\n\t\tprojected.agent = boundSummary(agent, SUBAGENT_AGENT_LIMIT);\n\t}\n\tconst task = getStringArg(args, \"task\");\n\tif (task) {\n\t\tprojected.task = boundText(task, SUBAGENT_TASK_LIMIT);\n\t}\n\tconst tasks = projectSubagentInputArray(args.tasks);\n\tif (tasks) {\n\t\tprojected.tasks = tasks;\n\t}\n\tconst chain = projectSubagentInputArray(args.chain);\n\tif (chain) {\n\t\tprojected.chain = chain;\n\t}\n\treturn Object.keys(projected).length > 0 ? projected : undefined;\n}\n\nfunction projectSubagentInputArray(value: unknown): Record<string, string>[] | undefined {\n\tif (!Array.isArray(value)) {\n\t\treturn undefined;\n\t}\n\tconst projected = value\n\t\t.map((item) => {\n\t\t\tif (!isRecord(item)) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst agent = getStringArg(item, \"agent\");\n\t\t\tconst task = getStringArg(item, \"task\");\n\t\t\tif (!agent || !task) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tagent: boundSummary(agent, SUBAGENT_AGENT_LIMIT),\n\t\t\t\ttask: boundText(task, SUBAGENT_TASK_LIMIT),\n\t\t\t};\n\t\t})\n\t\t.filter((item): item is { agent: string; task: string } => item !== undefined);\n\treturn projected.length > 0 ? projected : undefined;\n}\n\nexport function projectSubagentDetails(\n\tdetails: Record<string, unknown> | undefined,\n): Record<string, unknown> | undefined {\n\tif (!details) {\n\t\treturn undefined;\n\t}\n\tconst projected: Record<string, unknown> = {};\n\tcopyBoundedString(details, projected, \"mode\", SUBAGENT_AGENT_LIMIT);\n\tcopyBoundedString(details, projected, \"status\", SUBAGENT_AGENT_LIMIT);\n\tcopyBoundedString(details, projected, \"subagentId\", SUBAGENT_ID_LIMIT);\n\tcopyBoundedString(details, projected, \"sessionId\", SUBAGENT_ID_LIMIT);\n\tfor (const key of SUBAGENT_NUMERIC_DETAIL_KEYS) {\n\t\tconst numberValue = getFiniteNumber(details, key);\n\t\tif (numberValue !== undefined) {\n\t\t\tprojected[key] = numberValue;\n\t\t}\n\t}\n\tcopyBoundedString(details, projected, \"currentActivity\", SUBAGENT_ACTIVITY_LIMIT);\n\tconst summary = projectSubagentSummary(details.summary);\n\tif (summary) {\n\t\tprojected.summary = summary;\n\t}\n\tconst childSessions = projectSubagentDetailArray(details.childSessions);\n\tif (childSessions) {\n\t\tprojected.childSessions = childSessions;\n\t}\n\tconst agent = projectSubagentAgent(details.agent);\n\tif (agent) {\n\t\tprojected.agent = agent;\n\t}\n\tconst output = projectSubagentOutput(details.output);\n\tif (output) {\n\t\tprojected.output = output;\n\t}\n\tconst error = projectSubagentError(details.error);\n\tif (error) {\n\t\tprojected.error = error;\n\t}\n\tconst children = projectSubagentDetailArray(details.children);\n\tif (children) {\n\t\tprojected.children = children;\n\t}\n\tconst tasks = projectSubagentDetailArray(details.tasks);\n\tif (tasks) {\n\t\tprojected.tasks = tasks;\n\t}\n\tconst steps = projectSubagentDetailArray(details.steps);\n\tif (steps) {\n\t\tprojected.steps = steps;\n\t}\n\treturn Object.keys(projected).length > 0 ? projected : undefined;\n}\n\nfunction projectSubagentSummary(value: unknown): Record<string, number> | undefined {\n\tif (!isRecord(value)) {\n\t\treturn undefined;\n\t}\n\tconst projected: Record<string, number> = {};\n\tfor (const key of [\n\t\t\"total\",\n\t\t\"completed\",\n\t\t\"failed\",\n\t\t\"aborted\",\n\t\t\"running\",\n\t\t\"maxTasks\",\n\t\t\"maxConcurrency\",\n\t\t\"stoppedAt\",\n\t]) {\n\t\tconst numberValue = getFiniteNumber(value, key);\n\t\tif (numberValue !== undefined) {\n\t\t\tprojected[key] = numberValue;\n\t\t}\n\t}\n\treturn Object.keys(projected).length > 0 ? projected : undefined;\n}\n\nfunction projectSubagentDetailArray(value: unknown, depth = 0): Record<string, unknown>[] | undefined {\n\tif (!Array.isArray(value) || depth >= SUBAGENT_TREE_DEPTH_LIMIT) {\n\t\treturn undefined;\n\t}\n\tconst projected = value\n\t\t.map((item) => (isRecord(item) ? projectSubagentTaskDetails(item, depth) : undefined))\n\t\t.filter((item): item is Record<string, unknown> => item !== undefined);\n\treturn projected.length > 0 ? projected : undefined;\n}\n\nfunction projectSubagentTaskDetails(item: Record<string, unknown>, depth = 0): Record<string, unknown> | undefined {\n\tconst projected: Record<string, unknown> = {};\n\tconst index = getFiniteNumber(item, \"index\");\n\tif (index !== undefined) {\n\t\tprojected.index = index;\n\t}\n\tcopyBoundedString(item, projected, \"subagentId\", SUBAGENT_ID_LIMIT);\n\tcopyBoundedString(item, projected, \"sessionId\", SUBAGENT_ID_LIMIT);\n\tconst agent = projectSubagentAgent(item.agent);\n\tif (agent) {\n\t\tprojected.agent = agent;\n\t}\n\tcopyBoundedString(item, projected, \"status\", SUBAGENT_AGENT_LIMIT);\n\tcopyBoundedString(item, projected, \"task\", SUBAGENT_TASK_LIMIT);\n\tfor (const key of SUBAGENT_NUMERIC_DETAIL_KEYS) {\n\t\tconst numberValue = getFiniteNumber(item, key);\n\t\tif (numberValue !== undefined) {\n\t\t\tprojected[key] = numberValue;\n\t\t}\n\t}\n\tcopyBoundedString(item, projected, \"currentActivity\", SUBAGENT_ACTIVITY_LIMIT);\n\tconst error = projectSubagentError(item.error);\n\tif (error) {\n\t\tprojected.error = error;\n\t}\n\tconst children = projectSubagentDetailArray(item.children, depth + 1);\n\tif (children) {\n\t\tprojected.children = children;\n\t}\n\treturn Object.keys(projected).length > 0 ? projected : undefined;\n}\n\nfunction projectSubagentAgent(value: unknown): Record<string, string> | undefined {\n\tif (!isRecord(value)) {\n\t\treturn undefined;\n\t}\n\tconst projected: Record<string, string> = {};\n\tconst name = getStringArg(value, \"name\");\n\tif (name) {\n\t\tprojected.name = boundSummary(name, SUBAGENT_AGENT_LIMIT);\n\t}\n\tconst source = getStringArg(value, \"source\");\n\tif (source) {\n\t\tprojected.source = boundSummary(source, SUBAGENT_AGENT_LIMIT);\n\t}\n\treturn Object.keys(projected).length > 0 ? projected : undefined;\n}\n\nfunction projectSubagentOutput(value: unknown): Record<string, unknown> | undefined {\n\tif (!isRecord(value)) {\n\t\treturn undefined;\n\t}\n\tconst projected: Record<string, unknown> = {};\n\tconst text = getStringArg(value, \"text\");\n\tif (text) {\n\t\tprojected.text = boundText(text, SUBAGENT_OUTPUT_LIMIT);\n\t}\n\tfor (const key of [\"bytes\", \"omittedBytes\", \"maxBytes\"]) {\n\t\tconst numberValue = getFiniteNumber(value, key);\n\t\tif (numberValue !== undefined) {\n\t\t\tprojected[key] = numberValue;\n\t\t}\n\t}\n\tconst truncated = value.truncated;\n\tif (typeof truncated === \"boolean\") {\n\t\tprojected.truncated = truncated;\n\t}\n\treturn Object.keys(projected).length > 0 ? projected : undefined;\n}\n\nfunction projectSubagentError(value: unknown): Record<string, string> | undefined {\n\tif (!isRecord(value)) {\n\t\treturn undefined;\n\t}\n\tconst message = getStringArg(value, \"message\");\n\treturn message ? { message: boundText(message, SUBAGENT_ERROR_LIMIT) } : undefined;\n}\n\nfunction copyBoundedString(\n\tfrom: Record<string, unknown>,\n\tto: Record<string, unknown>,\n\tkey: string,\n\tlimit: number,\n): void {\n\tconst value = getStringArg(from, key);\n\tif (value) {\n\t\tto[key] = boundText(value, limit);\n\t}\n}\n\nfunction getFiniteNumber(record: Record<string, unknown>, key: string): number | undefined {\n\tconst value = record[key];\n\treturn typeof value === \"number\" && Number.isFinite(value) ? value : undefined;\n}\n\nfunction projectBashExecution(\n\tentryId: string,\n\ttimestamp: string,\n\tmessage: BashExecutionMessage,\n): RpcTranscriptToolItem {\n\tconst failed = message.cancelled || (message.exitCode !== undefined && message.exitCode !== 0);\n\tconst status: RpcTranscriptToolStatus = failed ? \"failed\" : \"completed\";\n\tconst summaryParts = [`Ran command: ${boundSummary(message.command, TOOL_COMMAND_LIMIT)}`];\n\tif (message.truncated) {\n\t\tsummaryParts.push(\"output truncated\");\n\t}\n\tif (message.cancelled) {\n\t\tsummaryParts.push(\"cancelled\");\n\t} else if (message.exitCode !== undefined) {\n\t\tsummaryParts.push(`exit ${message.exitCode}`);\n\t}\n\tconst item: RpcTranscriptToolItem = {\n\t\tid: entryId,\n\t\trole: \"tool\",\n\t\ttoolName: \"bash\",\n\t\tstatus,\n\t\tsummary: boundSummary(summaryParts.join(\"; \"), TOOL_SUMMARY_LIMIT),\n\t\ttimestamp: normalizeTimestamp(timestamp),\n\t};\n\tif (message.command.trim().length > 0) {\n\t\titem.args = { command: boundText(message.command, TOOL_COMMAND_LIMIT) };\n\t}\n\treturn item;\n}\n\nfunction summarizeToolResult(\n\ttoolName: string,\n\tstatus: RpcTranscriptToolStatus,\n\targs: Record<string, unknown> | undefined,\n\tpath: string | undefined,\n): string {\n\tconst statusText = status === \"failed\" ? \"failed\" : \"completed\";\n\tconst target = path ? ` ${path}` : \"\";\n\tif (toolName === \"read\") {\n\t\treturn boundSummary(`Read${target || \" file\"} (${statusText})`, TOOL_SUMMARY_LIMIT);\n\t}\n\tif (toolName === \"edit\") {\n\t\treturn boundSummary(`Edited${target || \" file\"} (${statusText})`, TOOL_SUMMARY_LIMIT);\n\t}\n\tif (toolName === \"write\") {\n\t\treturn boundSummary(`Wrote${target || \" file\"} (${statusText})`, TOOL_SUMMARY_LIMIT);\n\t}\n\tif (toolName === \"bash\") {\n\t\tconst command = getStringArg(args, \"command\");\n\t\treturn boundSummary(\n\t\t\tcommand\n\t\t\t\t? `Ran command: ${boundSummary(command, TOOL_COMMAND_LIMIT)} (${statusText})`\n\t\t\t\t: `Ran command (${statusText})`,\n\t\t\tTOOL_SUMMARY_LIMIT,\n\t\t);\n\t}\n\tif (toolName === \"web_search\") {\n\t\tconst query = getStringArg(args, \"query\");\n\t\treturn boundSummary(\n\t\t\tquery\n\t\t\t\t? `Searched web for ${boundSummary(query, TOOL_COMMAND_LIMIT)} (${statusText})`\n\t\t\t\t: `Searched web (${statusText})`,\n\t\t\tTOOL_SUMMARY_LIMIT,\n\t\t);\n\t}\n\tif (toolName === \"grep\") {\n\t\tconst pattern = getStringArg(args, \"pattern\");\n\t\tconst patternText = pattern ? ` for ${pattern}` : \"\";\n\t\treturn boundSummary(`Searched${target || \" workspace\"}${patternText} (${statusText})`, TOOL_SUMMARY_LIMIT);\n\t}\n\tif (toolName === \"find\") {\n\t\tconst query = getStringArg(args, \"query\") ?? getStringArg(args, \"pattern\");\n\t\tconst queryText = query ? ` for ${query}` : \"\";\n\t\treturn boundSummary(`Found files${target}${queryText} (${statusText})`, TOOL_SUMMARY_LIMIT);\n\t}\n\tif (toolName === \"ls\") {\n\t\treturn boundSummary(`Listed${target || \" directory\"} (${statusText})`, TOOL_SUMMARY_LIMIT);\n\t}\n\tif (toolName === \"lsp\") {\n\t\tconst action = getStringArg(args, \"action\");\n\t\treturn boundSummary(\n\t\t\taction ? `Ran lsp ${action}${target} (${statusText})` : `Ran lsp${target} (${statusText})`,\n\t\t\tTOOL_SUMMARY_LIMIT,\n\t\t);\n\t}\n\treturn boundSummary(`${toolName} ${statusText}`, TOOL_SUMMARY_LIMIT);\n}\n\nfunction getToolPath(toolName: string, args: Record<string, unknown> | undefined): string | undefined {\n\treturn getStringArg(args, \"path\") ?? getStringArg(args, \"file_path\") ?? getStringArg(args, `${toolName}Path`);\n}\n\nfunction getStringArg(args: Record<string, unknown> | undefined, key: string): string | undefined {\n\tconst value = args?.[key];\n\treturn typeof value === \"string\" && value.trim().length > 0 ? value : undefined;\n}\n\nfunction getBoundedString(record: Record<string, unknown> | undefined, key: string, limit: number): string | undefined {\n\tconst value = record?.[key];\n\treturn typeof value === \"string\" && value.length > 0 ? boundText(value, limit) : undefined;\n}\n\nfunction boundSummary(text: string, limit: number): string {\n\treturn boundText(text.replace(/\\s+/g, \" \").trim(), limit);\n}\n\nfunction boundText(text: string, limit: number): string {\n\tif (text.length <= limit) {\n\t\treturn text;\n\t}\n\treturn `${text.slice(0, Math.max(0, limit - 16)).trimEnd()}\\n[truncated]`;\n}\n\nfunction normalizeTimestamp(timestamp: string): string {\n\tconst date = new Date(timestamp);\n\treturn Number.isNaN(date.getTime()) ? timestamp : date.toISOString();\n}\n\nfunction isStoredToolCall(value: unknown): value is StoredToolCall {\n\treturn (\n\t\tisRecord(value) &&\n\t\tvalue.type === \"toolCall\" &&\n\t\ttypeof value.id === \"string\" &&\n\t\ttypeof value.name === \"string\" &&\n\t\tisRecord(value.arguments)\n\t);\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n"]}
|
|
@@ -0,0 +1,624 @@
|
|
|
1
|
+
import { Buffer } from "node:buffer";
|
|
2
|
+
import { extractVisibleTextContent } from "../messages.js";
|
|
3
|
+
const DEFAULT_TRANSCRIPT_LIMIT = 100;
|
|
4
|
+
const MAX_TRANSCRIPT_LIMIT = 200;
|
|
5
|
+
const MESSAGE_TEXT_LIMIT = 16_000;
|
|
6
|
+
const SUMMARY_TEXT_LIMIT = 1_000;
|
|
7
|
+
const TOOL_SUMMARY_LIMIT = 1_000;
|
|
8
|
+
const TOOL_COMMAND_LIMIT = 500;
|
|
9
|
+
const TOOL_ARGUMENT_STRING_LIMIT = 500;
|
|
10
|
+
const TOOL_ARGUMENT_KEYS_LIMIT = 12;
|
|
11
|
+
const MUTATION_PREVIEW_LIMIT = 4_000;
|
|
12
|
+
const SUBAGENT_AGENT_LIMIT = 200;
|
|
13
|
+
const SUBAGENT_ID_LIMIT = 200;
|
|
14
|
+
const SUBAGENT_TASK_LIMIT = 1_000;
|
|
15
|
+
const SUBAGENT_ERROR_LIMIT = 1_000;
|
|
16
|
+
const SUBAGENT_OUTPUT_LIMIT = 1_000;
|
|
17
|
+
const SUBAGENT_ACTIVITY_LIMIT = 300;
|
|
18
|
+
const SUBAGENT_TREE_DEPTH_LIMIT = 5;
|
|
19
|
+
const SUBAGENT_NUMERIC_DETAIL_KEYS = ["startedAt", "durationMs", "toolCalls", "tokens"];
|
|
20
|
+
export function projectSessionTranscript(sessionManager, options = {}) {
|
|
21
|
+
const allItems = projectTranscriptItems(sessionManager.getBranch());
|
|
22
|
+
const beforeIndex = options.beforeEntryId
|
|
23
|
+
? allItems.findIndex((item) => item.id === options.beforeEntryId)
|
|
24
|
+
: allItems.length;
|
|
25
|
+
const eligibleItems = beforeIndex === -1 ? [] : allItems.slice(0, beforeIndex);
|
|
26
|
+
const limit = normalizeLimit(options.limit);
|
|
27
|
+
const pageStart = Math.max(0, eligibleItems.length - limit);
|
|
28
|
+
const items = eligibleItems.slice(pageStart);
|
|
29
|
+
const hasMore = pageStart > 0;
|
|
30
|
+
return {
|
|
31
|
+
sessionId: sessionManager.getSessionId(),
|
|
32
|
+
items,
|
|
33
|
+
hasMore,
|
|
34
|
+
nextBeforeEntryId: hasMore ? (items[0]?.id ?? null) : null,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Serialized-size budget for one get_message_images response. Keeps the frame
|
|
39
|
+
* under the daemon control protocol's 8 MB line cap (the tightest transport on
|
|
40
|
+
* any relay path) with headroom for JSON envelope overhead. The first image of
|
|
41
|
+
* a page is always included so pagination cannot stall on a single large image.
|
|
42
|
+
*/
|
|
43
|
+
export const MESSAGE_IMAGES_RESPONSE_BUDGET_BYTES = 6 * 1024 * 1024;
|
|
44
|
+
export const MESSAGE_IMAGES_PAGE_MAX_ITEMS = 32;
|
|
45
|
+
function getSerializedMessageImageBytes(image, index) {
|
|
46
|
+
return Buffer.byteLength(JSON.stringify({ ...image, index }), "utf8");
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Recovers the inline image blocks persisted on a session entry, paged from
|
|
50
|
+
* `startImageIndex` under `budgetBytes`. Text-only transcript projections
|
|
51
|
+
* advertise `imageCount`; reconnecting clients call this per entry to restore
|
|
52
|
+
* user-message images after a cold restart.
|
|
53
|
+
*/
|
|
54
|
+
export function projectMessageImages(entries, entryId, startImageIndex = 0, budgetBytes = MESSAGE_IMAGES_RESPONSE_BUDGET_BYTES) {
|
|
55
|
+
const entry = entries.find((candidate) => candidate.id === entryId);
|
|
56
|
+
if (!entry || entry.type !== "message") {
|
|
57
|
+
return { ok: false, error: "unknown_entry" };
|
|
58
|
+
}
|
|
59
|
+
const allImages = extractMessageImages(entry.message.content);
|
|
60
|
+
const start = Math.max(0, Math.floor(startImageIndex));
|
|
61
|
+
const images = [];
|
|
62
|
+
let usedBytes = 0;
|
|
63
|
+
let nextImageIndex = null;
|
|
64
|
+
for (let index = start; index < allImages.length; index++) {
|
|
65
|
+
const image = allImages[index];
|
|
66
|
+
const serializedBytes = getSerializedMessageImageBytes(image, index);
|
|
67
|
+
if (serializedBytes > budgetBytes && images.length === 0) {
|
|
68
|
+
return { ok: false, error: "image_too_large" };
|
|
69
|
+
}
|
|
70
|
+
if (images.length >= MESSAGE_IMAGES_PAGE_MAX_ITEMS || usedBytes + serializedBytes > budgetBytes) {
|
|
71
|
+
nextImageIndex = index;
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
images.push({ ...image, index });
|
|
75
|
+
usedBytes += serializedBytes;
|
|
76
|
+
}
|
|
77
|
+
return { ok: true, entryId, totalImages: allImages.length, images, nextImageIndex };
|
|
78
|
+
}
|
|
79
|
+
/** Inline image blocks on a persisted message's content array. */
|
|
80
|
+
export function extractMessageImages(content) {
|
|
81
|
+
if (!Array.isArray(content)) {
|
|
82
|
+
return [];
|
|
83
|
+
}
|
|
84
|
+
return content.filter((block) => isRecord(block) &&
|
|
85
|
+
block.type === "image" &&
|
|
86
|
+
typeof block.data === "string" &&
|
|
87
|
+
block.data.length > 0 &&
|
|
88
|
+
typeof block.mimeType === "string");
|
|
89
|
+
}
|
|
90
|
+
function normalizeLimit(limit) {
|
|
91
|
+
if (limit === undefined || !Number.isFinite(limit) || limit <= 0) {
|
|
92
|
+
return DEFAULT_TRANSCRIPT_LIMIT;
|
|
93
|
+
}
|
|
94
|
+
return Math.min(MAX_TRANSCRIPT_LIMIT, Math.floor(limit));
|
|
95
|
+
}
|
|
96
|
+
function projectTranscriptItems(entries) {
|
|
97
|
+
const toolCallsById = collectToolCalls(entries);
|
|
98
|
+
const items = [];
|
|
99
|
+
for (const entry of entries) {
|
|
100
|
+
if (entry.type === "compaction") {
|
|
101
|
+
items.push({
|
|
102
|
+
id: entry.id,
|
|
103
|
+
role: "summary",
|
|
104
|
+
timestamp: normalizeTimestamp(entry.timestamp),
|
|
105
|
+
title: "Conversation compacted",
|
|
106
|
+
text: boundText(entry.summary, SUMMARY_TEXT_LIMIT),
|
|
107
|
+
});
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (entry.type === "custom_message") {
|
|
111
|
+
const customItem = projectCustomMessage(entry);
|
|
112
|
+
if (customItem) {
|
|
113
|
+
items.push(customItem);
|
|
114
|
+
}
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
if (entry.type !== "message") {
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
const message = entry.message;
|
|
121
|
+
if (message.role === "user") {
|
|
122
|
+
const text = boundText(extractVisibleTextContent(message.content), MESSAGE_TEXT_LIMIT);
|
|
123
|
+
const imageCount = extractMessageImages(message.content).length;
|
|
124
|
+
if (text || imageCount > 0) {
|
|
125
|
+
items.push({
|
|
126
|
+
id: entry.id,
|
|
127
|
+
role: "user",
|
|
128
|
+
text,
|
|
129
|
+
timestamp: normalizeTimestamp(entry.timestamp),
|
|
130
|
+
...(imageCount > 0 ? { imageCount } : {}),
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
if (message.role === "assistant") {
|
|
136
|
+
const text = boundText(extractVisibleTextContent(message.content), MESSAGE_TEXT_LIMIT);
|
|
137
|
+
if (text) {
|
|
138
|
+
items.push({ id: entry.id, role: "assistant", text, timestamp: normalizeTimestamp(entry.timestamp) });
|
|
139
|
+
}
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
if (message.role === "toolResult") {
|
|
143
|
+
items.push(projectToolResult(entry.id, entry.timestamp, message, toolCallsById.get(message.toolCallId)));
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
if (message.role === "bashExecution") {
|
|
147
|
+
items.push(projectBashExecution(entry.id, entry.timestamp, message));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return items;
|
|
151
|
+
}
|
|
152
|
+
function projectCustomMessage(entry) {
|
|
153
|
+
if (!entry.display || entry.customType !== "review") {
|
|
154
|
+
return undefined;
|
|
155
|
+
}
|
|
156
|
+
const text = boundText(extractVisibleTextContent(entry.content), MESSAGE_TEXT_LIMIT);
|
|
157
|
+
if (!text) {
|
|
158
|
+
return undefined;
|
|
159
|
+
}
|
|
160
|
+
return { id: entry.id, role: "assistant", text, timestamp: normalizeTimestamp(entry.timestamp) };
|
|
161
|
+
}
|
|
162
|
+
function collectToolCalls(entries) {
|
|
163
|
+
const toolCalls = new Map();
|
|
164
|
+
for (const entry of entries) {
|
|
165
|
+
if (entry.type !== "message" || entry.message.role !== "assistant") {
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
for (const block of entry.message.content) {
|
|
169
|
+
if (isStoredToolCall(block)) {
|
|
170
|
+
toolCalls.set(block.id, block);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return toolCalls;
|
|
175
|
+
}
|
|
176
|
+
function projectToolResult(entryId, timestamp, message, toolCall) {
|
|
177
|
+
const args = toolCall?.arguments;
|
|
178
|
+
const status = message.isError ? "failed" : "completed";
|
|
179
|
+
const path = getToolPath(message.toolName, args);
|
|
180
|
+
const details = isRecord(message.details) ? message.details : undefined;
|
|
181
|
+
const item = {
|
|
182
|
+
id: entryId,
|
|
183
|
+
role: "tool",
|
|
184
|
+
toolName: message.toolName,
|
|
185
|
+
status,
|
|
186
|
+
summary: summarizeToolResult(message.toolName, status, args, path),
|
|
187
|
+
timestamp: normalizeTimestamp(timestamp),
|
|
188
|
+
};
|
|
189
|
+
if (path) {
|
|
190
|
+
item.path = path;
|
|
191
|
+
}
|
|
192
|
+
const imageCount = extractMessageImages(message.content).length;
|
|
193
|
+
if (imageCount > 0) {
|
|
194
|
+
item.imageCount = imageCount;
|
|
195
|
+
}
|
|
196
|
+
const diffPreview = getBoundedString(details, "diff", MUTATION_PREVIEW_LIMIT);
|
|
197
|
+
if (diffPreview) {
|
|
198
|
+
item.diffPreview = diffPreview;
|
|
199
|
+
}
|
|
200
|
+
const patchPreview = getBoundedString(details, "patch", MUTATION_PREVIEW_LIMIT);
|
|
201
|
+
if (patchPreview) {
|
|
202
|
+
item.patchPreview = patchPreview;
|
|
203
|
+
}
|
|
204
|
+
const projectedArgs = projectToolArgs(message.toolName, args);
|
|
205
|
+
if (projectedArgs) {
|
|
206
|
+
item.args = projectedArgs;
|
|
207
|
+
}
|
|
208
|
+
if (message.toolName === "subagent") {
|
|
209
|
+
const subagentDetails = projectSubagentDetails(details);
|
|
210
|
+
if (subagentDetails) {
|
|
211
|
+
item.details = subagentDetails;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return item;
|
|
215
|
+
}
|
|
216
|
+
function projectToolArgs(toolName, args) {
|
|
217
|
+
if (toolName === "subagent") {
|
|
218
|
+
return projectSubagentArgs(args);
|
|
219
|
+
}
|
|
220
|
+
if (!args) {
|
|
221
|
+
return undefined;
|
|
222
|
+
}
|
|
223
|
+
const projected = {};
|
|
224
|
+
switch (toolName) {
|
|
225
|
+
case "bash":
|
|
226
|
+
copyStringArg(args, projected, "command", TOOL_COMMAND_LIMIT);
|
|
227
|
+
copyNumberArg(args, projected, "timeout");
|
|
228
|
+
break;
|
|
229
|
+
case "read":
|
|
230
|
+
copyStringArg(args, projected, "path");
|
|
231
|
+
copyStringArg(args, projected, "file_path");
|
|
232
|
+
copyNumberArg(args, projected, "offset");
|
|
233
|
+
copyNumberArg(args, projected, "limit");
|
|
234
|
+
break;
|
|
235
|
+
case "edit":
|
|
236
|
+
case "write":
|
|
237
|
+
copyStringArg(args, projected, "path");
|
|
238
|
+
copyStringArg(args, projected, "file_path");
|
|
239
|
+
break;
|
|
240
|
+
case "grep":
|
|
241
|
+
copyStringArg(args, projected, "pattern");
|
|
242
|
+
copyStringArg(args, projected, "path");
|
|
243
|
+
copyStringArg(args, projected, "glob");
|
|
244
|
+
copyStringArg(args, projected, "include");
|
|
245
|
+
copyStringArg(args, projected, "exclude");
|
|
246
|
+
copyBooleanArg(args, projected, "ignoreCase");
|
|
247
|
+
copyBooleanArg(args, projected, "literal");
|
|
248
|
+
copyNumberArg(args, projected, "context");
|
|
249
|
+
break;
|
|
250
|
+
case "find":
|
|
251
|
+
copyStringArg(args, projected, "query");
|
|
252
|
+
copyStringArg(args, projected, "pattern");
|
|
253
|
+
copyStringArg(args, projected, "path");
|
|
254
|
+
copyStringArg(args, projected, "glob");
|
|
255
|
+
copyStringArg(args, projected, "name");
|
|
256
|
+
copyNumberArg(args, projected, "limit");
|
|
257
|
+
break;
|
|
258
|
+
case "ls":
|
|
259
|
+
copyStringArg(args, projected, "path");
|
|
260
|
+
copyNumberArg(args, projected, "limit");
|
|
261
|
+
break;
|
|
262
|
+
case "lsp":
|
|
263
|
+
copyStringArg(args, projected, "action");
|
|
264
|
+
copyStringArg(args, projected, "symbol");
|
|
265
|
+
copyStringArg(args, projected, "path");
|
|
266
|
+
copyStringArg(args, projected, "file_path");
|
|
267
|
+
copyNumberArg(args, projected, "line");
|
|
268
|
+
break;
|
|
269
|
+
case "web_search":
|
|
270
|
+
copyStringArg(args, projected, "query");
|
|
271
|
+
copyStringArrayArg(args, projected, "domains");
|
|
272
|
+
copyNumberArg(args, projected, "limit");
|
|
273
|
+
copyNumberArg(args, projected, "recencyDays");
|
|
274
|
+
break;
|
|
275
|
+
default:
|
|
276
|
+
break;
|
|
277
|
+
}
|
|
278
|
+
return Object.keys(projected).length > 0 ? projected : undefined;
|
|
279
|
+
}
|
|
280
|
+
function copyStringArg(from, to, key, limit = TOOL_ARGUMENT_STRING_LIMIT) {
|
|
281
|
+
const value = getStringArg(from, key);
|
|
282
|
+
if (value) {
|
|
283
|
+
to[key] = boundText(value, limit);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
function copyNumberArg(from, to, key) {
|
|
287
|
+
const value = getFiniteNumber(from, key);
|
|
288
|
+
if (value !== undefined) {
|
|
289
|
+
to[key] = value;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
function copyBooleanArg(from, to, key) {
|
|
293
|
+
const value = from[key];
|
|
294
|
+
if (typeof value === "boolean") {
|
|
295
|
+
to[key] = value;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
function copyStringArrayArg(from, to, key) {
|
|
299
|
+
const value = from[key];
|
|
300
|
+
if (!Array.isArray(value)) {
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
const strings = value
|
|
304
|
+
.map((item) => (typeof item === "string" ? boundText(item, TOOL_ARGUMENT_STRING_LIMIT) : undefined))
|
|
305
|
+
.filter((item) => item !== undefined && item.trim().length > 0)
|
|
306
|
+
.slice(0, TOOL_ARGUMENT_KEYS_LIMIT);
|
|
307
|
+
if (strings.length > 0) {
|
|
308
|
+
to[key] = strings;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
function projectSubagentArgs(args) {
|
|
312
|
+
if (!args) {
|
|
313
|
+
return undefined;
|
|
314
|
+
}
|
|
315
|
+
const projected = {};
|
|
316
|
+
const agent = getStringArg(args, "agent");
|
|
317
|
+
if (agent) {
|
|
318
|
+
projected.agent = boundSummary(agent, SUBAGENT_AGENT_LIMIT);
|
|
319
|
+
}
|
|
320
|
+
const task = getStringArg(args, "task");
|
|
321
|
+
if (task) {
|
|
322
|
+
projected.task = boundText(task, SUBAGENT_TASK_LIMIT);
|
|
323
|
+
}
|
|
324
|
+
const tasks = projectSubagentInputArray(args.tasks);
|
|
325
|
+
if (tasks) {
|
|
326
|
+
projected.tasks = tasks;
|
|
327
|
+
}
|
|
328
|
+
const chain = projectSubagentInputArray(args.chain);
|
|
329
|
+
if (chain) {
|
|
330
|
+
projected.chain = chain;
|
|
331
|
+
}
|
|
332
|
+
return Object.keys(projected).length > 0 ? projected : undefined;
|
|
333
|
+
}
|
|
334
|
+
function projectSubagentInputArray(value) {
|
|
335
|
+
if (!Array.isArray(value)) {
|
|
336
|
+
return undefined;
|
|
337
|
+
}
|
|
338
|
+
const projected = value
|
|
339
|
+
.map((item) => {
|
|
340
|
+
if (!isRecord(item)) {
|
|
341
|
+
return undefined;
|
|
342
|
+
}
|
|
343
|
+
const agent = getStringArg(item, "agent");
|
|
344
|
+
const task = getStringArg(item, "task");
|
|
345
|
+
if (!agent || !task) {
|
|
346
|
+
return undefined;
|
|
347
|
+
}
|
|
348
|
+
return {
|
|
349
|
+
agent: boundSummary(agent, SUBAGENT_AGENT_LIMIT),
|
|
350
|
+
task: boundText(task, SUBAGENT_TASK_LIMIT),
|
|
351
|
+
};
|
|
352
|
+
})
|
|
353
|
+
.filter((item) => item !== undefined);
|
|
354
|
+
return projected.length > 0 ? projected : undefined;
|
|
355
|
+
}
|
|
356
|
+
export function projectSubagentDetails(details) {
|
|
357
|
+
if (!details) {
|
|
358
|
+
return undefined;
|
|
359
|
+
}
|
|
360
|
+
const projected = {};
|
|
361
|
+
copyBoundedString(details, projected, "mode", SUBAGENT_AGENT_LIMIT);
|
|
362
|
+
copyBoundedString(details, projected, "status", SUBAGENT_AGENT_LIMIT);
|
|
363
|
+
copyBoundedString(details, projected, "subagentId", SUBAGENT_ID_LIMIT);
|
|
364
|
+
copyBoundedString(details, projected, "sessionId", SUBAGENT_ID_LIMIT);
|
|
365
|
+
for (const key of SUBAGENT_NUMERIC_DETAIL_KEYS) {
|
|
366
|
+
const numberValue = getFiniteNumber(details, key);
|
|
367
|
+
if (numberValue !== undefined) {
|
|
368
|
+
projected[key] = numberValue;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
copyBoundedString(details, projected, "currentActivity", SUBAGENT_ACTIVITY_LIMIT);
|
|
372
|
+
const summary = projectSubagentSummary(details.summary);
|
|
373
|
+
if (summary) {
|
|
374
|
+
projected.summary = summary;
|
|
375
|
+
}
|
|
376
|
+
const childSessions = projectSubagentDetailArray(details.childSessions);
|
|
377
|
+
if (childSessions) {
|
|
378
|
+
projected.childSessions = childSessions;
|
|
379
|
+
}
|
|
380
|
+
const agent = projectSubagentAgent(details.agent);
|
|
381
|
+
if (agent) {
|
|
382
|
+
projected.agent = agent;
|
|
383
|
+
}
|
|
384
|
+
const output = projectSubagentOutput(details.output);
|
|
385
|
+
if (output) {
|
|
386
|
+
projected.output = output;
|
|
387
|
+
}
|
|
388
|
+
const error = projectSubagentError(details.error);
|
|
389
|
+
if (error) {
|
|
390
|
+
projected.error = error;
|
|
391
|
+
}
|
|
392
|
+
const children = projectSubagentDetailArray(details.children);
|
|
393
|
+
if (children) {
|
|
394
|
+
projected.children = children;
|
|
395
|
+
}
|
|
396
|
+
const tasks = projectSubagentDetailArray(details.tasks);
|
|
397
|
+
if (tasks) {
|
|
398
|
+
projected.tasks = tasks;
|
|
399
|
+
}
|
|
400
|
+
const steps = projectSubagentDetailArray(details.steps);
|
|
401
|
+
if (steps) {
|
|
402
|
+
projected.steps = steps;
|
|
403
|
+
}
|
|
404
|
+
return Object.keys(projected).length > 0 ? projected : undefined;
|
|
405
|
+
}
|
|
406
|
+
function projectSubagentSummary(value) {
|
|
407
|
+
if (!isRecord(value)) {
|
|
408
|
+
return undefined;
|
|
409
|
+
}
|
|
410
|
+
const projected = {};
|
|
411
|
+
for (const key of [
|
|
412
|
+
"total",
|
|
413
|
+
"completed",
|
|
414
|
+
"failed",
|
|
415
|
+
"aborted",
|
|
416
|
+
"running",
|
|
417
|
+
"maxTasks",
|
|
418
|
+
"maxConcurrency",
|
|
419
|
+
"stoppedAt",
|
|
420
|
+
]) {
|
|
421
|
+
const numberValue = getFiniteNumber(value, key);
|
|
422
|
+
if (numberValue !== undefined) {
|
|
423
|
+
projected[key] = numberValue;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
return Object.keys(projected).length > 0 ? projected : undefined;
|
|
427
|
+
}
|
|
428
|
+
function projectSubagentDetailArray(value, depth = 0) {
|
|
429
|
+
if (!Array.isArray(value) || depth >= SUBAGENT_TREE_DEPTH_LIMIT) {
|
|
430
|
+
return undefined;
|
|
431
|
+
}
|
|
432
|
+
const projected = value
|
|
433
|
+
.map((item) => (isRecord(item) ? projectSubagentTaskDetails(item, depth) : undefined))
|
|
434
|
+
.filter((item) => item !== undefined);
|
|
435
|
+
return projected.length > 0 ? projected : undefined;
|
|
436
|
+
}
|
|
437
|
+
function projectSubagentTaskDetails(item, depth = 0) {
|
|
438
|
+
const projected = {};
|
|
439
|
+
const index = getFiniteNumber(item, "index");
|
|
440
|
+
if (index !== undefined) {
|
|
441
|
+
projected.index = index;
|
|
442
|
+
}
|
|
443
|
+
copyBoundedString(item, projected, "subagentId", SUBAGENT_ID_LIMIT);
|
|
444
|
+
copyBoundedString(item, projected, "sessionId", SUBAGENT_ID_LIMIT);
|
|
445
|
+
const agent = projectSubagentAgent(item.agent);
|
|
446
|
+
if (agent) {
|
|
447
|
+
projected.agent = agent;
|
|
448
|
+
}
|
|
449
|
+
copyBoundedString(item, projected, "status", SUBAGENT_AGENT_LIMIT);
|
|
450
|
+
copyBoundedString(item, projected, "task", SUBAGENT_TASK_LIMIT);
|
|
451
|
+
for (const key of SUBAGENT_NUMERIC_DETAIL_KEYS) {
|
|
452
|
+
const numberValue = getFiniteNumber(item, key);
|
|
453
|
+
if (numberValue !== undefined) {
|
|
454
|
+
projected[key] = numberValue;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
copyBoundedString(item, projected, "currentActivity", SUBAGENT_ACTIVITY_LIMIT);
|
|
458
|
+
const error = projectSubagentError(item.error);
|
|
459
|
+
if (error) {
|
|
460
|
+
projected.error = error;
|
|
461
|
+
}
|
|
462
|
+
const children = projectSubagentDetailArray(item.children, depth + 1);
|
|
463
|
+
if (children) {
|
|
464
|
+
projected.children = children;
|
|
465
|
+
}
|
|
466
|
+
return Object.keys(projected).length > 0 ? projected : undefined;
|
|
467
|
+
}
|
|
468
|
+
function projectSubagentAgent(value) {
|
|
469
|
+
if (!isRecord(value)) {
|
|
470
|
+
return undefined;
|
|
471
|
+
}
|
|
472
|
+
const projected = {};
|
|
473
|
+
const name = getStringArg(value, "name");
|
|
474
|
+
if (name) {
|
|
475
|
+
projected.name = boundSummary(name, SUBAGENT_AGENT_LIMIT);
|
|
476
|
+
}
|
|
477
|
+
const source = getStringArg(value, "source");
|
|
478
|
+
if (source) {
|
|
479
|
+
projected.source = boundSummary(source, SUBAGENT_AGENT_LIMIT);
|
|
480
|
+
}
|
|
481
|
+
return Object.keys(projected).length > 0 ? projected : undefined;
|
|
482
|
+
}
|
|
483
|
+
function projectSubagentOutput(value) {
|
|
484
|
+
if (!isRecord(value)) {
|
|
485
|
+
return undefined;
|
|
486
|
+
}
|
|
487
|
+
const projected = {};
|
|
488
|
+
const text = getStringArg(value, "text");
|
|
489
|
+
if (text) {
|
|
490
|
+
projected.text = boundText(text, SUBAGENT_OUTPUT_LIMIT);
|
|
491
|
+
}
|
|
492
|
+
for (const key of ["bytes", "omittedBytes", "maxBytes"]) {
|
|
493
|
+
const numberValue = getFiniteNumber(value, key);
|
|
494
|
+
if (numberValue !== undefined) {
|
|
495
|
+
projected[key] = numberValue;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
const truncated = value.truncated;
|
|
499
|
+
if (typeof truncated === "boolean") {
|
|
500
|
+
projected.truncated = truncated;
|
|
501
|
+
}
|
|
502
|
+
return Object.keys(projected).length > 0 ? projected : undefined;
|
|
503
|
+
}
|
|
504
|
+
function projectSubagentError(value) {
|
|
505
|
+
if (!isRecord(value)) {
|
|
506
|
+
return undefined;
|
|
507
|
+
}
|
|
508
|
+
const message = getStringArg(value, "message");
|
|
509
|
+
return message ? { message: boundText(message, SUBAGENT_ERROR_LIMIT) } : undefined;
|
|
510
|
+
}
|
|
511
|
+
function copyBoundedString(from, to, key, limit) {
|
|
512
|
+
const value = getStringArg(from, key);
|
|
513
|
+
if (value) {
|
|
514
|
+
to[key] = boundText(value, limit);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
function getFiniteNumber(record, key) {
|
|
518
|
+
const value = record[key];
|
|
519
|
+
return typeof value === "number" && Number.isFinite(value) ? value : undefined;
|
|
520
|
+
}
|
|
521
|
+
function projectBashExecution(entryId, timestamp, message) {
|
|
522
|
+
const failed = message.cancelled || (message.exitCode !== undefined && message.exitCode !== 0);
|
|
523
|
+
const status = failed ? "failed" : "completed";
|
|
524
|
+
const summaryParts = [`Ran command: ${boundSummary(message.command, TOOL_COMMAND_LIMIT)}`];
|
|
525
|
+
if (message.truncated) {
|
|
526
|
+
summaryParts.push("output truncated");
|
|
527
|
+
}
|
|
528
|
+
if (message.cancelled) {
|
|
529
|
+
summaryParts.push("cancelled");
|
|
530
|
+
}
|
|
531
|
+
else if (message.exitCode !== undefined) {
|
|
532
|
+
summaryParts.push(`exit ${message.exitCode}`);
|
|
533
|
+
}
|
|
534
|
+
const item = {
|
|
535
|
+
id: entryId,
|
|
536
|
+
role: "tool",
|
|
537
|
+
toolName: "bash",
|
|
538
|
+
status,
|
|
539
|
+
summary: boundSummary(summaryParts.join("; "), TOOL_SUMMARY_LIMIT),
|
|
540
|
+
timestamp: normalizeTimestamp(timestamp),
|
|
541
|
+
};
|
|
542
|
+
if (message.command.trim().length > 0) {
|
|
543
|
+
item.args = { command: boundText(message.command, TOOL_COMMAND_LIMIT) };
|
|
544
|
+
}
|
|
545
|
+
return item;
|
|
546
|
+
}
|
|
547
|
+
function summarizeToolResult(toolName, status, args, path) {
|
|
548
|
+
const statusText = status === "failed" ? "failed" : "completed";
|
|
549
|
+
const target = path ? ` ${path}` : "";
|
|
550
|
+
if (toolName === "read") {
|
|
551
|
+
return boundSummary(`Read${target || " file"} (${statusText})`, TOOL_SUMMARY_LIMIT);
|
|
552
|
+
}
|
|
553
|
+
if (toolName === "edit") {
|
|
554
|
+
return boundSummary(`Edited${target || " file"} (${statusText})`, TOOL_SUMMARY_LIMIT);
|
|
555
|
+
}
|
|
556
|
+
if (toolName === "write") {
|
|
557
|
+
return boundSummary(`Wrote${target || " file"} (${statusText})`, TOOL_SUMMARY_LIMIT);
|
|
558
|
+
}
|
|
559
|
+
if (toolName === "bash") {
|
|
560
|
+
const command = getStringArg(args, "command");
|
|
561
|
+
return boundSummary(command
|
|
562
|
+
? `Ran command: ${boundSummary(command, TOOL_COMMAND_LIMIT)} (${statusText})`
|
|
563
|
+
: `Ran command (${statusText})`, TOOL_SUMMARY_LIMIT);
|
|
564
|
+
}
|
|
565
|
+
if (toolName === "web_search") {
|
|
566
|
+
const query = getStringArg(args, "query");
|
|
567
|
+
return boundSummary(query
|
|
568
|
+
? `Searched web for ${boundSummary(query, TOOL_COMMAND_LIMIT)} (${statusText})`
|
|
569
|
+
: `Searched web (${statusText})`, TOOL_SUMMARY_LIMIT);
|
|
570
|
+
}
|
|
571
|
+
if (toolName === "grep") {
|
|
572
|
+
const pattern = getStringArg(args, "pattern");
|
|
573
|
+
const patternText = pattern ? ` for ${pattern}` : "";
|
|
574
|
+
return boundSummary(`Searched${target || " workspace"}${patternText} (${statusText})`, TOOL_SUMMARY_LIMIT);
|
|
575
|
+
}
|
|
576
|
+
if (toolName === "find") {
|
|
577
|
+
const query = getStringArg(args, "query") ?? getStringArg(args, "pattern");
|
|
578
|
+
const queryText = query ? ` for ${query}` : "";
|
|
579
|
+
return boundSummary(`Found files${target}${queryText} (${statusText})`, TOOL_SUMMARY_LIMIT);
|
|
580
|
+
}
|
|
581
|
+
if (toolName === "ls") {
|
|
582
|
+
return boundSummary(`Listed${target || " directory"} (${statusText})`, TOOL_SUMMARY_LIMIT);
|
|
583
|
+
}
|
|
584
|
+
if (toolName === "lsp") {
|
|
585
|
+
const action = getStringArg(args, "action");
|
|
586
|
+
return boundSummary(action ? `Ran lsp ${action}${target} (${statusText})` : `Ran lsp${target} (${statusText})`, TOOL_SUMMARY_LIMIT);
|
|
587
|
+
}
|
|
588
|
+
return boundSummary(`${toolName} ${statusText}`, TOOL_SUMMARY_LIMIT);
|
|
589
|
+
}
|
|
590
|
+
function getToolPath(toolName, args) {
|
|
591
|
+
return getStringArg(args, "path") ?? getStringArg(args, "file_path") ?? getStringArg(args, `${toolName}Path`);
|
|
592
|
+
}
|
|
593
|
+
function getStringArg(args, key) {
|
|
594
|
+
const value = args?.[key];
|
|
595
|
+
return typeof value === "string" && value.trim().length > 0 ? value : undefined;
|
|
596
|
+
}
|
|
597
|
+
function getBoundedString(record, key, limit) {
|
|
598
|
+
const value = record?.[key];
|
|
599
|
+
return typeof value === "string" && value.length > 0 ? boundText(value, limit) : undefined;
|
|
600
|
+
}
|
|
601
|
+
function boundSummary(text, limit) {
|
|
602
|
+
return boundText(text.replace(/\s+/g, " ").trim(), limit);
|
|
603
|
+
}
|
|
604
|
+
function boundText(text, limit) {
|
|
605
|
+
if (text.length <= limit) {
|
|
606
|
+
return text;
|
|
607
|
+
}
|
|
608
|
+
return `${text.slice(0, Math.max(0, limit - 16)).trimEnd()}\n[truncated]`;
|
|
609
|
+
}
|
|
610
|
+
function normalizeTimestamp(timestamp) {
|
|
611
|
+
const date = new Date(timestamp);
|
|
612
|
+
return Number.isNaN(date.getTime()) ? timestamp : date.toISOString();
|
|
613
|
+
}
|
|
614
|
+
function isStoredToolCall(value) {
|
|
615
|
+
return (isRecord(value) &&
|
|
616
|
+
value.type === "toolCall" &&
|
|
617
|
+
typeof value.id === "string" &&
|
|
618
|
+
typeof value.name === "string" &&
|
|
619
|
+
isRecord(value.arguments));
|
|
620
|
+
}
|
|
621
|
+
function isRecord(value) {
|
|
622
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
623
|
+
}
|
|
624
|
+
//# sourceMappingURL=transcript.js.map
|