@agimon-ai/doompi-core 0.0.1-alpha.70
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/LICENSE +21 -0
- package/README.md +5 -0
- package/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/agent-model.cjs +4 -0
- package/dist/agent-model.d.cts +2 -0
- package/dist/agent-model.d.mts +2 -0
- package/dist/agent-model.mjs +2 -0
- package/dist/api-contracts.cjs +27 -0
- package/dist/api-contracts.d.cts +7 -0
- package/dist/api-contracts.d.mts +7 -0
- package/dist/api-contracts.mjs +7 -0
- package/dist/ask-user.cjs +8 -0
- package/dist/ask-user.d.cts +2 -0
- package/dist/ask-user.d.mts +2 -0
- package/dist/ask-user.mjs +2 -0
- package/dist/author-tools.cjs +5 -0
- package/dist/author-tools.d.cts +2 -0
- package/dist/author-tools.d.mts +2 -0
- package/dist/author-tools.mjs +2 -0
- package/dist/background-work.cjs +7 -0
- package/dist/background-work.d.cts +2 -0
- package/dist/background-work.d.mts +2 -0
- package/dist/background-work.mjs +2 -0
- package/dist/child-process.cjs +15 -0
- package/dist/child-process.d.cts +2 -0
- package/dist/child-process.d.mts +2 -0
- package/dist/child-process.mjs +2 -0
- package/dist/child.cjs +7 -0
- package/dist/child.d.cts +3 -0
- package/dist/child.d.mts +3 -0
- package/dist/child.mjs +3 -0
- package/dist/cockpit-container.cjs +4 -0
- package/dist/cockpit-container.d.cts +2 -0
- package/dist/cockpit-container.d.mts +2 -0
- package/dist/cockpit-container.mjs +2 -0
- package/dist/config.cjs +13 -0
- package/dist/config.d.cts +3 -0
- package/dist/config.d.mts +3 -0
- package/dist/config.mjs +2 -0
- package/dist/constants/authorTools.cjs +10 -0
- package/dist/constants/authorTools.cjs.map +1 -0
- package/dist/constants/authorTools.d.cts +6 -0
- package/dist/constants/authorTools.d.cts.map +1 -0
- package/dist/constants/authorTools.d.mts +6 -0
- package/dist/constants/authorTools.d.mts.map +1 -0
- package/dist/constants/authorTools.mjs +8 -0
- package/dist/constants/authorTools.mjs.map +1 -0
- package/dist/constants/contextApi.cjs +28 -0
- package/dist/constants/contextApi.cjs.map +1 -0
- package/dist/constants/contextApi.d.cts +21 -0
- package/dist/constants/contextApi.d.cts.map +1 -0
- package/dist/constants/contextApi.d.mts +21 -0
- package/dist/constants/contextApi.d.mts.map +1 -0
- package/dist/constants/contextApi.mjs +23 -0
- package/dist/constants/contextApi.mjs.map +1 -0
- package/dist/constants/remote.cjs +81 -0
- package/dist/constants/remote.cjs.map +1 -0
- package/dist/constants/remote.mjs +62 -0
- package/dist/constants/remote.mjs.map +1 -0
- package/dist/constants/voiceReloadHandoff.cjs +12 -0
- package/dist/constants/voiceReloadHandoff.cjs.map +1 -0
- package/dist/constants/voiceReloadHandoff.d.cts +7 -0
- package/dist/constants/voiceReloadHandoff.d.cts.map +1 -0
- package/dist/constants/voiceReloadHandoff.d.mts +7 -0
- package/dist/constants/voiceReloadHandoff.d.mts.map +1 -0
- package/dist/constants/voiceReloadHandoff.mjs +9 -0
- package/dist/constants/voiceReloadHandoff.mjs.map +1 -0
- package/dist/constants/voiceTools.cjs +96 -0
- package/dist/constants/voiceTools.cjs.map +1 -0
- package/dist/constants/voiceTools.d.cts +58 -0
- package/dist/constants/voiceTools.d.cts.map +1 -0
- package/dist/constants/voiceTools.d.mts +58 -0
- package/dist/constants/voiceTools.d.mts.map +1 -0
- package/dist/constants/voiceTools.mjs +60 -0
- package/dist/constants/voiceTools.mjs.map +1 -0
- package/dist/context-api.cjs +10 -0
- package/dist/context-api.d.cts +4 -0
- package/dist/context-api.d.mts +4 -0
- package/dist/context-api.mjs +3 -0
- package/dist/context-contributions.cjs +7 -0
- package/dist/context-contributions.d.cts +3 -0
- package/dist/context-contributions.d.mts +3 -0
- package/dist/context-contributions.mjs +3 -0
- package/dist/context-detail-store.cjs +100 -0
- package/dist/context-detail-store.cjs.map +1 -0
- package/dist/context-detail-store.d.cts +19 -0
- package/dist/context-detail-store.d.cts.map +1 -0
- package/dist/context-detail-store.d.mts +19 -0
- package/dist/context-detail-store.d.mts.map +1 -0
- package/dist/context-detail-store.mjs +91 -0
- package/dist/context-detail-store.mjs.map +1 -0
- package/dist/context-detail.cjs +57 -0
- package/dist/context-detail.cjs.map +1 -0
- package/dist/context-detail.d.cts +13 -0
- package/dist/context-detail.d.cts.map +1 -0
- package/dist/context-detail.d.mts +13 -0
- package/dist/context-detail.d.mts.map +1 -0
- package/dist/context-detail.mjs +56 -0
- package/dist/context-detail.mjs.map +1 -0
- package/dist/context-projection.cjs +120 -0
- package/dist/context-projection.cjs.map +1 -0
- package/dist/context-projection.d.cts +113 -0
- package/dist/context-projection.d.cts.map +1 -0
- package/dist/context-projection.d.mts +113 -0
- package/dist/context-projection.d.mts.map +1 -0
- package/dist/context-projection.mjs +116 -0
- package/dist/context-projection.mjs.map +1 -0
- package/dist/cordis-host.cjs +10 -0
- package/dist/cordis-host.d.cts +2 -0
- package/dist/cordis-host.d.mts +2 -0
- package/dist/cordis-host.mjs +2 -0
- package/dist/delegation.cjs +18 -0
- package/dist/delegation.d.cts +2 -0
- package/dist/delegation.d.mts +2 -0
- package/dist/delegation.mjs +2 -0
- package/dist/doom-package.cjs +61 -0
- package/dist/doom-package.cjs.map +1 -0
- package/dist/doom-package.d.cts +17 -0
- package/dist/doom-package.d.cts.map +1 -0
- package/dist/doom-package.d.mts +17 -0
- package/dist/doom-package.d.mts.map +1 -0
- package/dist/doom-package.mjs +54 -0
- package/dist/doom-package.mjs.map +1 -0
- package/dist/extensions/serverPlugin.cjs +106 -0
- package/dist/extensions/serverPlugin.cjs.map +1 -0
- package/dist/extensions/serverPlugin.d.cts +5 -0
- package/dist/extensions/serverPlugin.d.cts.map +1 -0
- package/dist/extensions/serverPlugin.d.mts +5 -0
- package/dist/extensions/serverPlugin.d.mts.map +1 -0
- package/dist/extensions/serverPlugin.mjs +106 -0
- package/dist/extensions/serverPlugin.mjs.map +1 -0
- package/dist/extensions/webPlugin.cjs +28 -0
- package/dist/extensions/webPlugin.cjs.map +1 -0
- package/dist/extensions/webPlugin.d.cts +19 -0
- package/dist/extensions/webPlugin.d.cts.map +1 -0
- package/dist/extensions/webPlugin.d.mts +19 -0
- package/dist/extensions/webPlugin.d.mts.map +1 -0
- package/dist/extensions/webPlugin.mjs +26 -0
- package/dist/extensions/webPlugin.mjs.map +1 -0
- package/dist/footer.cjs +6 -0
- package/dist/footer.d.cts +2 -0
- package/dist/footer.d.mts +2 -0
- package/dist/footer.mjs +2 -0
- package/dist/headless-hub.cjs +499 -0
- package/dist/headless-hub.cjs.map +1 -0
- package/dist/headless-hub.d.cts +96 -0
- package/dist/headless-hub.d.cts.map +1 -0
- package/dist/headless-hub.d.mts +96 -0
- package/dist/headless-hub.d.mts.map +1 -0
- package/dist/headless-hub.mjs +498 -0
- package/dist/headless-hub.mjs.map +1 -0
- package/dist/headless-server.cjs +492 -0
- package/dist/headless-server.cjs.map +1 -0
- package/dist/headless-server.d.cts +30 -0
- package/dist/headless-server.d.cts.map +1 -0
- package/dist/headless-server.d.mts +30 -0
- package/dist/headless-server.d.mts.map +1 -0
- package/dist/headless-server.mjs +488 -0
- package/dist/headless-server.mjs.map +1 -0
- package/dist/headless-session-host.cjs +0 -0
- package/dist/headless-session-host.d.cts +45 -0
- package/dist/headless-session-host.d.cts.map +1 -0
- package/dist/headless-session-host.d.mts +45 -0
- package/dist/headless-session-host.d.mts.map +1 -0
- package/dist/headless-session-host.mjs +1 -0
- package/dist/headless-session-manager.cjs +51 -0
- package/dist/headless-session-manager.cjs.map +1 -0
- package/dist/headless-session-manager.d.cts +6 -0
- package/dist/headless-session-manager.d.cts.map +1 -0
- package/dist/headless-session-manager.d.mts +6 -0
- package/dist/headless-session-manager.d.mts.map +1 -0
- package/dist/headless-session-manager.mjs +50 -0
- package/dist/headless-session-manager.mjs.map +1 -0
- package/dist/headless.cjs +7 -0
- package/dist/headless.d.cts +2 -0
- package/dist/headless.d.mts +2 -0
- package/dist/headless.mjs +2 -0
- package/dist/help.cjs +21 -0
- package/dist/help.d.cts +2 -0
- package/dist/help.d.mts +2 -0
- package/dist/help.mjs +2 -0
- package/dist/history-import.cjs +553 -0
- package/dist/history-import.cjs.map +1 -0
- package/dist/history-import.d.cts +76 -0
- package/dist/history-import.d.cts.map +1 -0
- package/dist/history-import.d.mts +76 -0
- package/dist/history-import.d.mts.map +1 -0
- package/dist/history-import.mjs +547 -0
- package/dist/history-import.mjs.map +1 -0
- package/dist/history-ownership.cjs +169 -0
- package/dist/history-ownership.cjs.map +1 -0
- package/dist/history-ownership.d.cts +23 -0
- package/dist/history-ownership.d.cts.map +1 -0
- package/dist/history-ownership.d.mts +23 -0
- package/dist/history-ownership.d.mts.map +1 -0
- package/dist/history-ownership.mjs +163 -0
- package/dist/history-ownership.mjs.map +1 -0
- package/dist/history.cjs +13 -0
- package/dist/history.d.cts +6 -0
- package/dist/history.d.mts +6 -0
- package/dist/history.mjs +6 -0
- package/dist/hub-channel.cjs +0 -0
- package/dist/hub-channel.d.cts +2 -0
- package/dist/hub-channel.d.mts +2 -0
- package/dist/hub-channel.mjs +1 -0
- package/dist/index.cjs +44 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.mjs +6 -0
- package/dist/json.cjs +6 -0
- package/dist/json.d.cts +2 -0
- package/dist/json.d.mts +2 -0
- package/dist/json.mjs +2 -0
- package/dist/jsonl-session-repo.cjs +217 -0
- package/dist/jsonl-session-repo.cjs.map +1 -0
- package/dist/jsonl-session-repo.d.cts +7 -0
- package/dist/jsonl-session-repo.d.cts.map +1 -0
- package/dist/jsonl-session-repo.d.mts +7 -0
- package/dist/jsonl-session-repo.d.mts.map +1 -0
- package/dist/jsonl-session-repo.mjs +212 -0
- package/dist/jsonl-session-repo.mjs.map +1 -0
- package/dist/kernel.cjs +3 -0
- package/dist/kernel.d.cts +3 -0
- package/dist/kernel.d.mts +3 -0
- package/dist/kernel.mjs +2 -0
- package/dist/leader.cjs +9 -0
- package/dist/leader.d.cts +2 -0
- package/dist/leader.d.mts +2 -0
- package/dist/leader.mjs +2 -0
- package/dist/log-sink-telemetry.cjs +5 -0
- package/dist/log-sink-telemetry.d.cts +2 -0
- package/dist/log-sink-telemetry.d.mts +2 -0
- package/dist/log-sink-telemetry.mjs +2 -0
- package/dist/machine-api.cjs +73 -0
- package/dist/machine-api.cjs.map +1 -0
- package/dist/machine-api.d.cts +7 -0
- package/dist/machine-api.d.cts.map +1 -0
- package/dist/machine-api.d.mts +7 -0
- package/dist/machine-api.d.mts.map +1 -0
- package/dist/machine-api.mjs +70 -0
- package/dist/machine-api.mjs.map +1 -0
- package/dist/main.cjs +10 -0
- package/dist/main.d.cts +5 -0
- package/dist/main.d.mts +5 -0
- package/dist/main.mjs +4 -0
- package/dist/mcp-projection.cjs +15 -0
- package/dist/mcp-projection.d.cts +2 -0
- package/dist/mcp-projection.d.mts +2 -0
- package/dist/mcp-projection.mjs +2 -0
- package/dist/mcp-schema-cost.cjs +195 -0
- package/dist/mcp-schema-cost.cjs.map +1 -0
- package/dist/mcp-schema-cost.d.cts +35 -0
- package/dist/mcp-schema-cost.d.cts.map +1 -0
- package/dist/mcp-schema-cost.d.mts +35 -0
- package/dist/mcp-schema-cost.d.mts.map +1 -0
- package/dist/mcp-schema-cost.mjs +190 -0
- package/dist/mcp-schema-cost.mjs.map +1 -0
- package/dist/mcp-session.cjs +9 -0
- package/dist/mcp-session.d.cts +2 -0
- package/dist/mcp-session.d.mts +2 -0
- package/dist/mcp-session.mjs +2 -0
- package/dist/mcp-status.cjs +7 -0
- package/dist/mcp-status.d.cts +2 -0
- package/dist/mcp-status.d.mts +2 -0
- package/dist/mcp-status.mjs +2 -0
- package/dist/mcp-tool-resolver.cjs +5 -0
- package/dist/mcp-tool-resolver.d.cts +2 -0
- package/dist/mcp-tool-resolver.d.mts +2 -0
- package/dist/mcp-tool-resolver.mjs +2 -0
- package/dist/module-resolution.cjs +405 -0
- package/dist/module-resolution.cjs.map +1 -0
- package/dist/module-resolution.d.cts +67 -0
- package/dist/module-resolution.d.cts.map +1 -0
- package/dist/module-resolution.d.mts +67 -0
- package/dist/module-resolution.d.mts.map +1 -0
- package/dist/module-resolution.mjs +389 -0
- package/dist/module-resolution.mjs.map +1 -0
- package/dist/narration.cjs +10 -0
- package/dist/narration.d.cts +2 -0
- package/dist/narration.d.mts +2 -0
- package/dist/narration.mjs +2 -0
- package/dist/notification.cjs +17 -0
- package/dist/notification.d.cts +2 -0
- package/dist/notification.d.mts +2 -0
- package/dist/notification.mjs +2 -0
- package/dist/package-api-server.cjs +161 -0
- package/dist/package-api-server.cjs.map +1 -0
- package/dist/package-api-server.d.cts +47 -0
- package/dist/package-api-server.d.cts.map +1 -0
- package/dist/package-api-server.d.mts +47 -0
- package/dist/package-api-server.d.mts.map +1 -0
- package/dist/package-api-server.mjs +159 -0
- package/dist/package-api-server.mjs.map +1 -0
- package/dist/package-api.cjs +11 -0
- package/dist/package-api.d.cts +2 -0
- package/dist/package-api.d.mts +2 -0
- package/dist/package-api.mjs +2 -0
- package/dist/pi/piSessionRuntime.cjs +520 -0
- package/dist/pi/piSessionRuntime.cjs.map +1 -0
- package/dist/pi/piSessionRuntime.d.cts +43 -0
- package/dist/pi/piSessionRuntime.d.cts.map +1 -0
- package/dist/pi/piSessionRuntime.d.mts +43 -0
- package/dist/pi/piSessionRuntime.d.mts.map +1 -0
- package/dist/pi/piSessionRuntime.mjs +519 -0
- package/dist/pi/piSessionRuntime.mjs.map +1 -0
- package/dist/pi/piWebSocketListener.cjs +115 -0
- package/dist/pi/piWebSocketListener.cjs.map +1 -0
- package/dist/pi/piWebSocketListener.mjs +115 -0
- package/dist/pi/piWebSocketListener.mjs.map +1 -0
- package/dist/pi-extension.cjs +8 -0
- package/dist/pi-extension.d.cts +5 -0
- package/dist/pi-extension.d.mts +5 -0
- package/dist/pi-extension.mjs +4 -0
- package/dist/pi-settings.cjs +11 -0
- package/dist/pi-settings.d.cts +2 -0
- package/dist/pi-settings.d.mts +2 -0
- package/dist/pi-settings.mjs +2 -0
- package/dist/plugin-protocol.cjs +10 -0
- package/dist/plugin-protocol.d.cts +2 -0
- package/dist/plugin-protocol.d.mts +2 -0
- package/dist/plugin-protocol.mjs +2 -0
- package/dist/profile-identity.cjs +6 -0
- package/dist/profile-identity.d.cts +2 -0
- package/dist/profile-identity.d.mts +2 -0
- package/dist/profile-identity.mjs +2 -0
- package/dist/protocol.cjs +10 -0
- package/dist/protocol.d.cts +2 -0
- package/dist/protocol.d.mts +2 -0
- package/dist/protocol.mjs +2 -0
- package/dist/readiness.cjs +8 -0
- package/dist/readiness.d.cts +2 -0
- package/dist/readiness.d.mts +2 -0
- package/dist/readiness.mjs +2 -0
- package/dist/relaunch-handoff.cjs +6 -0
- package/dist/relaunch-handoff.d.cts +2 -0
- package/dist/relaunch-handoff.d.mts +2 -0
- package/dist/relaunch-handoff.mjs +2 -0
- package/dist/remote-api.cjs +42 -0
- package/dist/remote-api.cjs.map +1 -0
- package/dist/remote-api.d.cts +7 -0
- package/dist/remote-api.d.cts.map +1 -0
- package/dist/remote-api.d.mts +7 -0
- package/dist/remote-api.d.mts.map +1 -0
- package/dist/remote-api.mjs +41 -0
- package/dist/remote-api.mjs.map +1 -0
- package/dist/remote-runtime.cjs +394 -0
- package/dist/remote-runtime.cjs.map +1 -0
- package/dist/remote-runtime.d.cts +26 -0
- package/dist/remote-runtime.d.cts.map +1 -0
- package/dist/remote-runtime.d.mts +26 -0
- package/dist/remote-runtime.d.mts.map +1 -0
- package/dist/remote-runtime.mjs +390 -0
- package/dist/remote-runtime.mjs.map +1 -0
- package/dist/runtime-config.cjs +232 -0
- package/dist/runtime-config.cjs.map +1 -0
- package/dist/runtime-config.d.cts +313 -0
- package/dist/runtime-config.d.cts.map +1 -0
- package/dist/runtime-config.d.mts +313 -0
- package/dist/runtime-config.d.mts.map +1 -0
- package/dist/runtime-config.mjs +221 -0
- package/dist/runtime-config.mjs.map +1 -0
- package/dist/runtime-context-api.cjs +64 -0
- package/dist/runtime-context-api.cjs.map +1 -0
- package/dist/runtime-context-api.d.cts +16 -0
- package/dist/runtime-context-api.d.cts.map +1 -0
- package/dist/runtime-context-api.d.mts +16 -0
- package/dist/runtime-context-api.d.mts.map +1 -0
- package/dist/runtime-context-api.mjs +62 -0
- package/dist/runtime-context-api.mjs.map +1 -0
- package/dist/runtime-cordis-host.cjs +191 -0
- package/dist/runtime-cordis-host.cjs.map +1 -0
- package/dist/runtime-cordis-host.d.cts +57 -0
- package/dist/runtime-cordis-host.d.cts.map +1 -0
- package/dist/runtime-cordis-host.d.mts +57 -0
- package/dist/runtime-cordis-host.d.mts.map +1 -0
- package/dist/runtime-cordis-host.mjs +183 -0
- package/dist/runtime-cordis-host.mjs.map +1 -0
- package/dist/runtime-headless-session-manager.cjs +0 -0
- package/dist/runtime-headless-session-manager.d.cts +14 -0
- package/dist/runtime-headless-session-manager.d.cts.map +1 -0
- package/dist/runtime-headless-session-manager.d.mts +14 -0
- package/dist/runtime-headless-session-manager.d.mts.map +1 -0
- package/dist/runtime-headless-session-manager.mjs +1 -0
- package/dist/runtime-identity.cjs +26 -0
- package/dist/runtime-identity.cjs.map +1 -0
- package/dist/runtime-identity.d.cts +7 -0
- package/dist/runtime-identity.d.cts.map +1 -0
- package/dist/runtime-identity.d.mts +7 -0
- package/dist/runtime-identity.d.mts.map +1 -0
- package/dist/runtime-identity.mjs +21 -0
- package/dist/runtime-identity.mjs.map +1 -0
- package/dist/runtime-json.cjs +46 -0
- package/dist/runtime-json.cjs.map +1 -0
- package/dist/runtime-json.d.cts +22 -0
- package/dist/runtime-json.d.cts.map +1 -0
- package/dist/runtime-json.d.mts +22 -0
- package/dist/runtime-json.d.mts.map +1 -0
- package/dist/runtime-json.mjs +39 -0
- package/dist/runtime-json.mjs.map +1 -0
- package/dist/runtime-log-sink-telemetry.cjs +102 -0
- package/dist/runtime-log-sink-telemetry.cjs.map +1 -0
- package/dist/runtime-log-sink-telemetry.d.cts +49 -0
- package/dist/runtime-log-sink-telemetry.d.cts.map +1 -0
- package/dist/runtime-log-sink-telemetry.d.mts +49 -0
- package/dist/runtime-log-sink-telemetry.d.mts.map +1 -0
- package/dist/runtime-log-sink-telemetry.mjs +99 -0
- package/dist/runtime-log-sink-telemetry.mjs.map +1 -0
- package/dist/runtime-pi-extension.cjs +243 -0
- package/dist/runtime-pi-extension.cjs.map +1 -0
- package/dist/runtime-pi-extension.d.cts +102 -0
- package/dist/runtime-pi-extension.d.cts.map +1 -0
- package/dist/runtime-pi-extension.d.mts +102 -0
- package/dist/runtime-pi-extension.d.mts.map +1 -0
- package/dist/runtime-pi-extension.mjs +242 -0
- package/dist/runtime-pi-extension.mjs.map +1 -0
- package/dist/runtime-pi-settings.cjs +104 -0
- package/dist/runtime-pi-settings.cjs.map +1 -0
- package/dist/runtime-pi-settings.d.cts +23 -0
- package/dist/runtime-pi-settings.d.cts.map +1 -0
- package/dist/runtime-pi-settings.d.mts +23 -0
- package/dist/runtime-pi-settings.d.mts.map +1 -0
- package/dist/runtime-pi-settings.mjs +92 -0
- package/dist/runtime-pi-settings.mjs.map +1 -0
- package/dist/runtime-protocol.cjs +223 -0
- package/dist/runtime-protocol.cjs.map +1 -0
- package/dist/runtime-protocol.d.cts +84 -0
- package/dist/runtime-protocol.d.cts.map +1 -0
- package/dist/runtime-protocol.d.mts +84 -0
- package/dist/runtime-protocol.d.mts.map +1 -0
- package/dist/runtime-protocol.mjs +215 -0
- package/dist/runtime-protocol.mjs.map +1 -0
- package/dist/runtime-tool-names.cjs +51 -0
- package/dist/runtime-tool-names.cjs.map +1 -0
- package/dist/runtime-tool-names.d.cts +24 -0
- package/dist/runtime-tool-names.d.cts.map +1 -0
- package/dist/runtime-tool-names.d.mts +24 -0
- package/dist/runtime-tool-names.d.mts.map +1 -0
- package/dist/runtime-tool-names.mjs +49 -0
- package/dist/runtime-tool-names.mjs.map +1 -0
- package/dist/runtime-transition.cjs +27 -0
- package/dist/runtime-transition.cjs.map +1 -0
- package/dist/runtime-transition.d.cts +114 -0
- package/dist/runtime-transition.d.cts.map +1 -0
- package/dist/runtime-transition.d.mts +114 -0
- package/dist/runtime-transition.d.mts.map +1 -0
- package/dist/runtime-transition.mjs +24 -0
- package/dist/runtime-transition.mjs.map +1 -0
- package/dist/sandbox-harness.cjs +6 -0
- package/dist/sandbox-harness.d.cts +2 -0
- package/dist/sandbox-harness.d.mts +2 -0
- package/dist/sandbox-harness.mjs +2 -0
- package/dist/schemas/agentModel.cjs +33 -0
- package/dist/schemas/agentModel.cjs.map +1 -0
- package/dist/schemas/agentModel.d.cts +26 -0
- package/dist/schemas/agentModel.d.cts.map +1 -0
- package/dist/schemas/agentModel.d.mts +26 -0
- package/dist/schemas/agentModel.d.mts.map +1 -0
- package/dist/schemas/agentModel.mjs +32 -0
- package/dist/schemas/agentModel.mjs.map +1 -0
- package/dist/schemas/apiContracts.cjs +145 -0
- package/dist/schemas/apiContracts.cjs.map +1 -0
- package/dist/schemas/apiContracts.d.cts +81 -0
- package/dist/schemas/apiContracts.d.cts.map +1 -0
- package/dist/schemas/apiContracts.d.mts +81 -0
- package/dist/schemas/apiContracts.d.mts.map +1 -0
- package/dist/schemas/apiContracts.mjs +140 -0
- package/dist/schemas/apiContracts.mjs.map +1 -0
- package/dist/schemas/askUser.cjs +42 -0
- package/dist/schemas/askUser.cjs.map +1 -0
- package/dist/schemas/askUser.d.cts +47 -0
- package/dist/schemas/askUser.d.cts.map +1 -0
- package/dist/schemas/askUser.d.mts +47 -0
- package/dist/schemas/askUser.d.mts.map +1 -0
- package/dist/schemas/askUser.mjs +37 -0
- package/dist/schemas/askUser.mjs.map +1 -0
- package/dist/schemas/backgroundWork.cjs +31 -0
- package/dist/schemas/backgroundWork.cjs.map +1 -0
- package/dist/schemas/backgroundWork.d.cts +72 -0
- package/dist/schemas/backgroundWork.d.cts.map +1 -0
- package/dist/schemas/backgroundWork.d.mts +72 -0
- package/dist/schemas/backgroundWork.d.mts.map +1 -0
- package/dist/schemas/backgroundWork.mjs +27 -0
- package/dist/schemas/backgroundWork.mjs.map +1 -0
- package/dist/schemas/builtinApiContracts.cjs +37 -0
- package/dist/schemas/builtinApiContracts.cjs.map +1 -0
- package/dist/schemas/builtinApiContracts.d.cts +51 -0
- package/dist/schemas/builtinApiContracts.d.cts.map +1 -0
- package/dist/schemas/builtinApiContracts.d.mts +51 -0
- package/dist/schemas/builtinApiContracts.d.mts.map +1 -0
- package/dist/schemas/builtinApiContracts.mjs +37 -0
- package/dist/schemas/builtinApiContracts.mjs.map +1 -0
- package/dist/schemas/childProcess.cjs +67 -0
- package/dist/schemas/childProcess.cjs.map +1 -0
- package/dist/schemas/childProcess.d.cts +30 -0
- package/dist/schemas/childProcess.d.cts.map +1 -0
- package/dist/schemas/childProcess.d.mts +30 -0
- package/dist/schemas/childProcess.d.mts.map +1 -0
- package/dist/schemas/childProcess.mjs +55 -0
- package/dist/schemas/childProcess.mjs.map +1 -0
- package/dist/schemas/cockpitContainer.cjs +31 -0
- package/dist/schemas/cockpitContainer.cjs.map +1 -0
- package/dist/schemas/cockpitContainer.d.cts +80 -0
- package/dist/schemas/cockpitContainer.d.cts.map +1 -0
- package/dist/schemas/cockpitContainer.d.mts +80 -0
- package/dist/schemas/cockpitContainer.d.mts.map +1 -0
- package/dist/schemas/cockpitContainer.mjs +30 -0
- package/dist/schemas/cockpitContainer.mjs.map +1 -0
- package/dist/schemas/contextContributions.cjs +17 -0
- package/dist/schemas/contextContributions.cjs.map +1 -0
- package/dist/schemas/contextContributions.d.cts +49 -0
- package/dist/schemas/contextContributions.d.cts.map +1 -0
- package/dist/schemas/contextContributions.d.mts +49 -0
- package/dist/schemas/contextContributions.d.mts.map +1 -0
- package/dist/schemas/contextContributions.mjs +15 -0
- package/dist/schemas/contextContributions.mjs.map +1 -0
- package/dist/schemas/delegation.cjs +91 -0
- package/dist/schemas/delegation.cjs.map +1 -0
- package/dist/schemas/delegation.d.cts +95 -0
- package/dist/schemas/delegation.d.cts.map +1 -0
- package/dist/schemas/delegation.d.mts +95 -0
- package/dist/schemas/delegation.d.mts.map +1 -0
- package/dist/schemas/delegation.mjs +76 -0
- package/dist/schemas/delegation.mjs.map +1 -0
- package/dist/schemas/footer.cjs +48 -0
- package/dist/schemas/footer.cjs.map +1 -0
- package/dist/schemas/footer.d.cts +48 -0
- package/dist/schemas/footer.d.cts.map +1 -0
- package/dist/schemas/footer.d.mts +48 -0
- package/dist/schemas/footer.d.mts.map +1 -0
- package/dist/schemas/footer.mjs +45 -0
- package/dist/schemas/footer.mjs.map +1 -0
- package/dist/schemas/headless.cjs +23 -0
- package/dist/schemas/headless.cjs.map +1 -0
- package/dist/schemas/headless.d.cts +238 -0
- package/dist/schemas/headless.d.cts.map +1 -0
- package/dist/schemas/headless.d.mts +238 -0
- package/dist/schemas/headless.d.mts.map +1 -0
- package/dist/schemas/headless.mjs +19 -0
- package/dist/schemas/headless.mjs.map +1 -0
- package/dist/schemas/help.cjs +249 -0
- package/dist/schemas/help.cjs.map +1 -0
- package/dist/schemas/help.d.cts +106 -0
- package/dist/schemas/help.d.cts.map +1 -0
- package/dist/schemas/help.d.mts +106 -0
- package/dist/schemas/help.d.mts.map +1 -0
- package/dist/schemas/help.mjs +231 -0
- package/dist/schemas/help.mjs.map +1 -0
- package/dist/schemas/httpApiContracts.cjs +388 -0
- package/dist/schemas/httpApiContracts.cjs.map +1 -0
- package/dist/schemas/httpApiContracts.d.cts +14 -0
- package/dist/schemas/httpApiContracts.d.cts.map +1 -0
- package/dist/schemas/httpApiContracts.d.mts +14 -0
- package/dist/schemas/httpApiContracts.d.mts.map +1 -0
- package/dist/schemas/httpApiContracts.mjs +377 -0
- package/dist/schemas/httpApiContracts.mjs.map +1 -0
- package/dist/schemas/hubChannel.d.cts +91 -0
- package/dist/schemas/hubChannel.d.cts.map +1 -0
- package/dist/schemas/hubChannel.d.mts +91 -0
- package/dist/schemas/hubChannel.d.mts.map +1 -0
- package/dist/schemas/leader.cjs +57 -0
- package/dist/schemas/leader.cjs.map +1 -0
- package/dist/schemas/leader.d.cts +107 -0
- package/dist/schemas/leader.d.cts.map +1 -0
- package/dist/schemas/leader.d.mts +107 -0
- package/dist/schemas/leader.d.mts.map +1 -0
- package/dist/schemas/leader.mjs +51 -0
- package/dist/schemas/leader.mjs.map +1 -0
- package/dist/schemas/mcpProjection.cjs +114 -0
- package/dist/schemas/mcpProjection.cjs.map +1 -0
- package/dist/schemas/mcpProjection.d.cts +116 -0
- package/dist/schemas/mcpProjection.d.cts.map +1 -0
- package/dist/schemas/mcpProjection.d.mts +116 -0
- package/dist/schemas/mcpProjection.d.mts.map +1 -0
- package/dist/schemas/mcpProjection.mjs +102 -0
- package/dist/schemas/mcpProjection.mjs.map +1 -0
- package/dist/schemas/mcpSession.cjs +57 -0
- package/dist/schemas/mcpSession.cjs.map +1 -0
- package/dist/schemas/mcpSession.d.cts +57 -0
- package/dist/schemas/mcpSession.d.cts.map +1 -0
- package/dist/schemas/mcpSession.d.mts +57 -0
- package/dist/schemas/mcpSession.d.mts.map +1 -0
- package/dist/schemas/mcpSession.mjs +51 -0
- package/dist/schemas/mcpSession.mjs.map +1 -0
- package/dist/schemas/mcpStatus.cjs +52 -0
- package/dist/schemas/mcpStatus.cjs.map +1 -0
- package/dist/schemas/mcpStatus.d.cts +73 -0
- package/dist/schemas/mcpStatus.d.cts.map +1 -0
- package/dist/schemas/mcpStatus.d.mts +73 -0
- package/dist/schemas/mcpStatus.d.mts.map +1 -0
- package/dist/schemas/mcpStatus.mjs +48 -0
- package/dist/schemas/mcpStatus.mjs.map +1 -0
- package/dist/schemas/mcpToolResolver.cjs +17 -0
- package/dist/schemas/mcpToolResolver.cjs.map +1 -0
- package/dist/schemas/mcpToolResolver.d.cts +24 -0
- package/dist/schemas/mcpToolResolver.d.cts.map +1 -0
- package/dist/schemas/mcpToolResolver.d.mts +24 -0
- package/dist/schemas/mcpToolResolver.d.mts.map +1 -0
- package/dist/schemas/mcpToolResolver.mjs +15 -0
- package/dist/schemas/mcpToolResolver.mjs.map +1 -0
- package/dist/schemas/narration.cjs +54 -0
- package/dist/schemas/narration.cjs.map +1 -0
- package/dist/schemas/narration.d.cts +29 -0
- package/dist/schemas/narration.d.cts.map +1 -0
- package/dist/schemas/narration.d.mts +29 -0
- package/dist/schemas/narration.d.mts.map +1 -0
- package/dist/schemas/narration.mjs +47 -0
- package/dist/schemas/narration.mjs.map +1 -0
- package/dist/schemas/notification.cjs +122 -0
- package/dist/schemas/notification.cjs.map +1 -0
- package/dist/schemas/notification.d.cts +48 -0
- package/dist/schemas/notification.d.cts.map +1 -0
- package/dist/schemas/notification.d.mts +48 -0
- package/dist/schemas/notification.d.mts.map +1 -0
- package/dist/schemas/notification.mjs +108 -0
- package/dist/schemas/notification.mjs.map +1 -0
- package/dist/schemas/packageApi.cjs +52 -0
- package/dist/schemas/packageApi.cjs.map +1 -0
- package/dist/schemas/packageApi.d.cts +149 -0
- package/dist/schemas/packageApi.d.cts.map +1 -0
- package/dist/schemas/packageApi.d.mts +149 -0
- package/dist/schemas/packageApi.d.mts.map +1 -0
- package/dist/schemas/packageApi.mjs +44 -0
- package/dist/schemas/packageApi.mjs.map +1 -0
- package/dist/schemas/piTool.cjs +25 -0
- package/dist/schemas/piTool.cjs.map +1 -0
- package/dist/schemas/piTool.d.cts +12 -0
- package/dist/schemas/piTool.d.cts.map +1 -0
- package/dist/schemas/piTool.d.mts +12 -0
- package/dist/schemas/piTool.d.mts.map +1 -0
- package/dist/schemas/piTool.mjs +25 -0
- package/dist/schemas/piTool.mjs.map +1 -0
- package/dist/schemas/pluginContributions.cjs +19 -0
- package/dist/schemas/pluginContributions.cjs.map +1 -0
- package/dist/schemas/pluginContributions.d.cts +56 -0
- package/dist/schemas/pluginContributions.d.cts.map +1 -0
- package/dist/schemas/pluginContributions.d.mts +56 -0
- package/dist/schemas/pluginContributions.d.mts.map +1 -0
- package/dist/schemas/pluginContributions.mjs +18 -0
- package/dist/schemas/pluginContributions.mjs.map +1 -0
- package/dist/schemas/pluginProtocol.cjs +103 -0
- package/dist/schemas/pluginProtocol.cjs.map +1 -0
- package/dist/schemas/pluginProtocol.d.cts +68 -0
- package/dist/schemas/pluginProtocol.d.cts.map +1 -0
- package/dist/schemas/pluginProtocol.d.mts +68 -0
- package/dist/schemas/pluginProtocol.d.mts.map +1 -0
- package/dist/schemas/pluginProtocol.mjs +96 -0
- package/dist/schemas/pluginProtocol.mjs.map +1 -0
- package/dist/schemas/profileIdentity.cjs +67 -0
- package/dist/schemas/profileIdentity.cjs.map +1 -0
- package/dist/schemas/profileIdentity.d.cts +50 -0
- package/dist/schemas/profileIdentity.d.cts.map +1 -0
- package/dist/schemas/profileIdentity.d.mts +50 -0
- package/dist/schemas/profileIdentity.d.mts.map +1 -0
- package/dist/schemas/profileIdentity.mjs +64 -0
- package/dist/schemas/profileIdentity.mjs.map +1 -0
- package/dist/schemas/readiness.cjs +251 -0
- package/dist/schemas/readiness.cjs.map +1 -0
- package/dist/schemas/readiness.d.cts +84 -0
- package/dist/schemas/readiness.d.cts.map +1 -0
- package/dist/schemas/readiness.d.mts +84 -0
- package/dist/schemas/readiness.d.mts.map +1 -0
- package/dist/schemas/readiness.mjs +246 -0
- package/dist/schemas/readiness.mjs.map +1 -0
- package/dist/schemas/relaunchHandoff.cjs +47 -0
- package/dist/schemas/relaunchHandoff.cjs.map +1 -0
- package/dist/schemas/relaunchHandoff.d.cts +25 -0
- package/dist/schemas/relaunchHandoff.d.cts.map +1 -0
- package/dist/schemas/relaunchHandoff.d.mts +25 -0
- package/dist/schemas/relaunchHandoff.d.mts.map +1 -0
- package/dist/schemas/relaunchHandoff.mjs +44 -0
- package/dist/schemas/relaunchHandoff.mjs.map +1 -0
- package/dist/schemas/remoteApiContracts.cjs +307 -0
- package/dist/schemas/remoteApiContracts.cjs.map +1 -0
- package/dist/schemas/remoteApiContracts.mjs +303 -0
- package/dist/schemas/remoteApiContracts.mjs.map +1 -0
- package/dist/schemas/sandboxHarness.cjs +29 -0
- package/dist/schemas/sandboxHarness.cjs.map +1 -0
- package/dist/schemas/sandboxHarness.d.cts +39 -0
- package/dist/schemas/sandboxHarness.d.cts.map +1 -0
- package/dist/schemas/sandboxHarness.d.mts +39 -0
- package/dist/schemas/sandboxHarness.d.mts.map +1 -0
- package/dist/schemas/sandboxHarness.mjs +26 -0
- package/dist/schemas/sandboxHarness.mjs.map +1 -0
- package/dist/schemas/serverBundle.cjs +79 -0
- package/dist/schemas/serverBundle.cjs.map +1 -0
- package/dist/schemas/serverBundle.d.cts +34 -0
- package/dist/schemas/serverBundle.d.cts.map +1 -0
- package/dist/schemas/serverBundle.d.mts +34 -0
- package/dist/schemas/serverBundle.d.mts.map +1 -0
- package/dist/schemas/serverBundle.mjs +77 -0
- package/dist/schemas/serverBundle.mjs.map +1 -0
- package/dist/schemas/serverFacet.cjs +102 -0
- package/dist/schemas/serverFacet.cjs.map +1 -0
- package/dist/schemas/serverFacet.d.cts +141 -0
- package/dist/schemas/serverFacet.d.cts.map +1 -0
- package/dist/schemas/serverFacet.d.mts +141 -0
- package/dist/schemas/serverFacet.d.mts.map +1 -0
- package/dist/schemas/serverFacet.mjs +93 -0
- package/dist/schemas/serverFacet.mjs.map +1 -0
- package/dist/schemas/sessionApiContracts.cjs +474 -0
- package/dist/schemas/sessionApiContracts.cjs.map +1 -0
- package/dist/schemas/sessionApiContracts.d.cts +563 -0
- package/dist/schemas/sessionApiContracts.d.cts.map +1 -0
- package/dist/schemas/sessionApiContracts.d.mts +563 -0
- package/dist/schemas/sessionApiContracts.d.mts.map +1 -0
- package/dist/schemas/sessionApiContracts.mjs +472 -0
- package/dist/schemas/sessionApiContracts.mjs.map +1 -0
- package/dist/schemas/sessionProtocol.cjs +17 -0
- package/dist/schemas/sessionProtocol.cjs.map +1 -0
- package/dist/schemas/sessionProtocol.d.cts +269 -0
- package/dist/schemas/sessionProtocol.d.cts.map +1 -0
- package/dist/schemas/sessionProtocol.d.mts +269 -0
- package/dist/schemas/sessionProtocol.d.mts.map +1 -0
- package/dist/schemas/sessionProtocol.mjs +12 -0
- package/dist/schemas/sessionProtocol.mjs.map +1 -0
- package/dist/schemas/sessionUpdates.d.cts +34 -0
- package/dist/schemas/sessionUpdates.d.cts.map +1 -0
- package/dist/schemas/sessionUpdates.d.mts +34 -0
- package/dist/schemas/sessionUpdates.d.mts.map +1 -0
- package/dist/schemas/skills.cjs +115 -0
- package/dist/schemas/skills.cjs.map +1 -0
- package/dist/schemas/skills.d.cts +65 -0
- package/dist/schemas/skills.d.cts.map +1 -0
- package/dist/schemas/skills.d.mts +65 -0
- package/dist/schemas/skills.d.mts.map +1 -0
- package/dist/schemas/skills.mjs +109 -0
- package/dist/schemas/skills.mjs.map +1 -0
- package/dist/schemas/toolOverrides.cjs +17 -0
- package/dist/schemas/toolOverrides.cjs.map +1 -0
- package/dist/schemas/toolOverrides.d.cts +29 -0
- package/dist/schemas/toolOverrides.d.cts.map +1 -0
- package/dist/schemas/toolOverrides.d.mts +29 -0
- package/dist/schemas/toolOverrides.d.mts.map +1 -0
- package/dist/schemas/toolOverrides.mjs +15 -0
- package/dist/schemas/toolOverrides.mjs.map +1 -0
- package/dist/schemas/toolSurface.cjs +17 -0
- package/dist/schemas/toolSurface.cjs.map +1 -0
- package/dist/schemas/toolSurface.d.cts +54 -0
- package/dist/schemas/toolSurface.d.cts.map +1 -0
- package/dist/schemas/toolSurface.d.mts +54 -0
- package/dist/schemas/toolSurface.d.mts.map +1 -0
- package/dist/schemas/toolSurface.mjs +15 -0
- package/dist/schemas/toolSurface.mjs.map +1 -0
- package/dist/schemas/transportApiContracts.cjs +248 -0
- package/dist/schemas/transportApiContracts.cjs.map +1 -0
- package/dist/schemas/transportApiContracts.d.cts +205 -0
- package/dist/schemas/transportApiContracts.d.cts.map +1 -0
- package/dist/schemas/transportApiContracts.d.mts +205 -0
- package/dist/schemas/transportApiContracts.d.mts.map +1 -0
- package/dist/schemas/transportApiContracts.mjs +242 -0
- package/dist/schemas/transportApiContracts.mjs.map +1 -0
- package/dist/schemas/uiHub.cjs +17 -0
- package/dist/schemas/uiHub.cjs.map +1 -0
- package/dist/schemas/uiHub.d.cts +23 -0
- package/dist/schemas/uiHub.d.cts.map +1 -0
- package/dist/schemas/uiHub.d.mts +23 -0
- package/dist/schemas/uiHub.d.mts.map +1 -0
- package/dist/schemas/uiHub.mjs +15 -0
- package/dist/schemas/uiHub.mjs.map +1 -0
- package/dist/schemas/voiceReloadHandoff.cjs +78 -0
- package/dist/schemas/voiceReloadHandoff.cjs.map +1 -0
- package/dist/schemas/voiceReloadHandoff.d.cts +31 -0
- package/dist/schemas/voiceReloadHandoff.d.cts.map +1 -0
- package/dist/schemas/voiceReloadHandoff.d.mts +31 -0
- package/dist/schemas/voiceReloadHandoff.d.mts.map +1 -0
- package/dist/schemas/voiceReloadHandoff.mjs +75 -0
- package/dist/schemas/voiceReloadHandoff.mjs.map +1 -0
- package/dist/schemas/voiceTools.cjs +205 -0
- package/dist/schemas/voiceTools.cjs.map +1 -0
- package/dist/schemas/voiceTools.d.cts +120 -0
- package/dist/schemas/voiceTools.d.cts.map +1 -0
- package/dist/schemas/voiceTools.d.mts +120 -0
- package/dist/schemas/voiceTools.d.mts.map +1 -0
- package/dist/schemas/voiceTools.mjs +194 -0
- package/dist/schemas/voiceTools.mjs.map +1 -0
- package/dist/server/directHarnessRuntime.cjs +981 -0
- package/dist/server/directHarnessRuntime.cjs.map +1 -0
- package/dist/server/directHarnessRuntime.d.cts +3 -0
- package/dist/server/directHarnessRuntime.d.mts +3 -0
- package/dist/server/directHarnessRuntime.mjs +976 -0
- package/dist/server/directHarnessRuntime.mjs.map +1 -0
- package/dist/server/headlessProtocol.cjs +233 -0
- package/dist/server/headlessProtocol.cjs.map +1 -0
- package/dist/server/headlessProtocol.mjs +233 -0
- package/dist/server/headlessProtocol.mjs.map +1 -0
- package/dist/server/jsonlTranscriptReader.cjs +85 -0
- package/dist/server/jsonlTranscriptReader.cjs.map +1 -0
- package/dist/server/jsonlTranscriptReader.mjs +83 -0
- package/dist/server/jsonlTranscriptReader.mjs.map +1 -0
- package/dist/server/nativeChildTranscriptReader.cjs +20 -0
- package/dist/server/nativeChildTranscriptReader.cjs.map +1 -0
- package/dist/server/nativeChildTranscriptReader.mjs +18 -0
- package/dist/server/nativeChildTranscriptReader.mjs.map +1 -0
- package/dist/server/remoteRoutes.cjs +386 -0
- package/dist/server/remoteRoutes.cjs.map +1 -0
- package/dist/server/remoteRoutes.mjs +386 -0
- package/dist/server/remoteRoutes.mjs.map +1 -0
- package/dist/server/serverFacetLoader.cjs +220 -0
- package/dist/server/serverFacetLoader.cjs.map +1 -0
- package/dist/server/serverFacetLoader.d.cts +77 -0
- package/dist/server/serverFacetLoader.d.cts.map +1 -0
- package/dist/server/serverFacetLoader.d.mts +77 -0
- package/dist/server/serverFacetLoader.d.mts.map +1 -0
- package/dist/server/serverFacetLoader.mjs +215 -0
- package/dist/server/serverFacetLoader.mjs.map +1 -0
- package/dist/server/threadJournals.cjs +172 -0
- package/dist/server/threadJournals.cjs.map +1 -0
- package/dist/server/threadJournals.mjs +169 -0
- package/dist/server/threadJournals.mjs.map +1 -0
- package/dist/server-facet.cjs +27 -0
- package/dist/server-facet.d.cts +7 -0
- package/dist/server-facet.d.mts +7 -0
- package/dist/server-facet.mjs +7 -0
- package/dist/server-telemetry.cjs +25 -0
- package/dist/server-telemetry.cjs.map +1 -0
- package/dist/server-telemetry.d.cts +12 -0
- package/dist/server-telemetry.d.cts.map +1 -0
- package/dist/server-telemetry.d.mts +12 -0
- package/dist/server-telemetry.d.mts.map +1 -0
- package/dist/server-telemetry.mjs +23 -0
- package/dist/server-telemetry.mjs.map +1 -0
- package/dist/server.cjs +17 -0
- package/dist/server.d.cts +10 -0
- package/dist/server.d.mts +10 -0
- package/dist/server.mjs +7 -0
- package/dist/services/acpSessionUpdates/index.cjs +129 -0
- package/dist/services/acpSessionUpdates/index.cjs.map +1 -0
- package/dist/services/acpSessionUpdates/index.mjs +129 -0
- package/dist/services/acpSessionUpdates/index.mjs.map +1 -0
- package/dist/services/apiContracts/index.cjs +267 -0
- package/dist/services/apiContracts/index.cjs.map +1 -0
- package/dist/services/apiContracts/index.d.cts +42 -0
- package/dist/services/apiContracts/index.d.cts.map +1 -0
- package/dist/services/apiContracts/index.d.mts +42 -0
- package/dist/services/apiContracts/index.d.mts.map +1 -0
- package/dist/services/apiContracts/index.mjs +266 -0
- package/dist/services/apiContracts/index.mjs.map +1 -0
- package/dist/services/bundlePublication/index.cjs +88 -0
- package/dist/services/bundlePublication/index.cjs.map +1 -0
- package/dist/services/bundlePublication/index.mjs +85 -0
- package/dist/services/bundlePublication/index.mjs.map +1 -0
- package/dist/services/contextApiUrls/index.cjs +15 -0
- package/dist/services/contextApiUrls/index.cjs.map +1 -0
- package/dist/services/contextApiUrls/index.d.cts +6 -0
- package/dist/services/contextApiUrls/index.d.cts.map +1 -0
- package/dist/services/contextApiUrls/index.d.mts +6 -0
- package/dist/services/contextApiUrls/index.d.mts.map +1 -0
- package/dist/services/contextApiUrls/index.mjs +15 -0
- package/dist/services/contextApiUrls/index.mjs.map +1 -0
- package/dist/services/contextContributions/index.cjs +79 -0
- package/dist/services/contextContributions/index.cjs.map +1 -0
- package/dist/services/contextContributions/index.d.cts +6 -0
- package/dist/services/contextContributions/index.d.cts.map +1 -0
- package/dist/services/contextContributions/index.d.mts +6 -0
- package/dist/services/contextContributions/index.d.mts.map +1 -0
- package/dist/services/contextContributions/index.mjs +79 -0
- package/dist/services/contextContributions/index.mjs.map +1 -0
- package/dist/services/deviceAuth/index.cjs +125 -0
- package/dist/services/deviceAuth/index.cjs.map +1 -0
- package/dist/services/deviceAuth/index.d.cts +9 -0
- package/dist/services/deviceAuth/index.d.cts.map +1 -0
- package/dist/services/deviceAuth/index.d.mts +9 -0
- package/dist/services/deviceAuth/index.d.mts.map +1 -0
- package/dist/services/deviceAuth/index.mjs +125 -0
- package/dist/services/deviceAuth/index.mjs.map +1 -0
- package/dist/services/deviceSessions/index.cjs +147 -0
- package/dist/services/deviceSessions/index.cjs.map +1 -0
- package/dist/services/deviceSessions/index.d.cts +15 -0
- package/dist/services/deviceSessions/index.d.cts.map +1 -0
- package/dist/services/deviceSessions/index.d.mts +15 -0
- package/dist/services/deviceSessions/index.d.mts.map +1 -0
- package/dist/services/deviceSessions/index.mjs +141 -0
- package/dist/services/deviceSessions/index.mjs.map +1 -0
- package/dist/services/headlessClient/index.cjs +117 -0
- package/dist/services/headlessClient/index.cjs.map +1 -0
- package/dist/services/headlessClient/index.mjs +117 -0
- package/dist/services/headlessClient/index.mjs.map +1 -0
- package/dist/services/historyCreationFileSystem/index.cjs +114 -0
- package/dist/services/historyCreationFileSystem/index.cjs.map +1 -0
- package/dist/services/historyCreationFileSystem/index.mjs +114 -0
- package/dist/services/historyCreationFileSystem/index.mjs.map +1 -0
- package/dist/services/hubChannelHarness/index.cjs +50 -0
- package/dist/services/hubChannelHarness/index.cjs.map +1 -0
- package/dist/services/hubChannelHarness/index.d.cts +17 -0
- package/dist/services/hubChannelHarness/index.d.cts.map +1 -0
- package/dist/services/hubChannelHarness/index.d.mts +17 -0
- package/dist/services/hubChannelHarness/index.d.mts.map +1 -0
- package/dist/services/hubChannelHarness/index.mjs +50 -0
- package/dist/services/hubChannelHarness/index.mjs.map +1 -0
- package/dist/services/kernel/index.cjs +147 -0
- package/dist/services/kernel/index.cjs.map +1 -0
- package/dist/services/kernel/index.d.cts +9 -0
- package/dist/services/kernel/index.d.cts.map +1 -0
- package/dist/services/kernel/index.d.mts +9 -0
- package/dist/services/kernel/index.d.mts.map +1 -0
- package/dist/services/kernel/index.mjs +147 -0
- package/dist/services/kernel/index.mjs.map +1 -0
- package/dist/services/loginFlow/index.cjs +131 -0
- package/dist/services/loginFlow/index.cjs.map +1 -0
- package/dist/services/loginFlow/index.mjs +131 -0
- package/dist/services/loginFlow/index.mjs.map +1 -0
- package/dist/services/packageApiHarness/index.cjs +36 -0
- package/dist/services/packageApiHarness/index.cjs.map +1 -0
- package/dist/services/packageApiHarness/index.d.cts +40 -0
- package/dist/services/packageApiHarness/index.d.cts.map +1 -0
- package/dist/services/packageApiHarness/index.d.mts +40 -0
- package/dist/services/packageApiHarness/index.d.mts.map +1 -0
- package/dist/services/packageApiHarness/index.mjs +36 -0
- package/dist/services/packageApiHarness/index.mjs.map +1 -0
- package/dist/services/pairingFlow/index.cjs +145 -0
- package/dist/services/pairingFlow/index.cjs.map +1 -0
- package/dist/services/pairingFlow/index.d.cts +44 -0
- package/dist/services/pairingFlow/index.d.cts.map +1 -0
- package/dist/services/pairingFlow/index.d.mts +44 -0
- package/dist/services/pairingFlow/index.d.mts.map +1 -0
- package/dist/services/pairingFlow/index.mjs +145 -0
- package/dist/services/pairingFlow/index.mjs.map +1 -0
- package/dist/services/pairingPage/index.cjs +450 -0
- package/dist/services/pairingPage/index.cjs.map +1 -0
- package/dist/services/pairingPage/index.mjs +447 -0
- package/dist/services/pairingPage/index.mjs.map +1 -0
- package/dist/services/pluginLifecycle/index.cjs +71 -0
- package/dist/services/pluginLifecycle/index.cjs.map +1 -0
- package/dist/services/pluginLifecycle/index.d.cts +11 -0
- package/dist/services/pluginLifecycle/index.d.cts.map +1 -0
- package/dist/services/pluginLifecycle/index.d.mts +11 -0
- package/dist/services/pluginLifecycle/index.d.mts.map +1 -0
- package/dist/services/pluginLifecycle/index.mjs +71 -0
- package/dist/services/pluginLifecycle/index.mjs.map +1 -0
- package/dist/services/providerAuth/index.cjs +156 -0
- package/dist/services/providerAuth/index.cjs.map +1 -0
- package/dist/services/providerAuth/index.mjs +154 -0
- package/dist/services/providerAuth/index.mjs.map +1 -0
- package/dist/services/remoteAccess/index.cjs +393 -0
- package/dist/services/remoteAccess/index.cjs.map +1 -0
- package/dist/services/remoteAccess/index.d.cts +79 -0
- package/dist/services/remoteAccess/index.d.cts.map +1 -0
- package/dist/services/remoteAccess/index.d.mts +79 -0
- package/dist/services/remoteAccess/index.d.mts.map +1 -0
- package/dist/services/remoteAccess/index.mjs +393 -0
- package/dist/services/remoteAccess/index.mjs.map +1 -0
- package/dist/services/remoteAccessSettings/index.cjs +151 -0
- package/dist/services/remoteAccessSettings/index.cjs.map +1 -0
- package/dist/services/remoteAccessSettings/index.mjs +149 -0
- package/dist/services/remoteAccessSettings/index.mjs.map +1 -0
- package/dist/services/remoteAccessStore/index.cjs +126 -0
- package/dist/services/remoteAccessStore/index.cjs.map +1 -0
- package/dist/services/remoteAccessStore/index.mjs +121 -0
- package/dist/services/remoteAccessStore/index.mjs.map +1 -0
- package/dist/services/remoteGuardPolicy/index.cjs +190 -0
- package/dist/services/remoteGuardPolicy/index.cjs.map +1 -0
- package/dist/services/remoteGuardPolicy/index.d.cts +7 -0
- package/dist/services/remoteGuardPolicy/index.d.cts.map +1 -0
- package/dist/services/remoteGuardPolicy/index.d.mts +7 -0
- package/dist/services/remoteGuardPolicy/index.d.mts.map +1 -0
- package/dist/services/remoteGuardPolicy/index.mjs +186 -0
- package/dist/services/remoteGuardPolicy/index.mjs.map +1 -0
- package/dist/services/rpcTranscript/index.cjs +590 -0
- package/dist/services/rpcTranscript/index.cjs.map +1 -0
- package/dist/services/rpcTranscript/index.d.cts +50 -0
- package/dist/services/rpcTranscript/index.d.cts.map +1 -0
- package/dist/services/rpcTranscript/index.d.mts +50 -0
- package/dist/services/rpcTranscript/index.d.mts.map +1 -0
- package/dist/services/rpcTranscript/index.mjs +589 -0
- package/dist/services/rpcTranscript/index.mjs.map +1 -0
- package/dist/services/serverFacet/index.cjs +197 -0
- package/dist/services/serverFacet/index.cjs.map +1 -0
- package/dist/services/serverFacet/index.d.cts +31 -0
- package/dist/services/serverFacet/index.d.cts.map +1 -0
- package/dist/services/serverFacet/index.d.mts +31 -0
- package/dist/services/serverFacet/index.d.mts.map +1 -0
- package/dist/services/serverFacet/index.mjs +197 -0
- package/dist/services/serverFacet/index.mjs.map +1 -0
- package/dist/services/sessionPresentation/index.cjs +117 -0
- package/dist/services/sessionPresentation/index.cjs.map +1 -0
- package/dist/services/sessionPresentation/index.mjs +117 -0
- package/dist/services/sessionPresentation/index.mjs.map +1 -0
- package/dist/services/sqliteSessionHistory/index.cjs +59 -0
- package/dist/services/sqliteSessionHistory/index.cjs.map +1 -0
- package/dist/services/sqliteSessionHistory/index.d.cts +13 -0
- package/dist/services/sqliteSessionHistory/index.d.cts.map +1 -0
- package/dist/services/sqliteSessionHistory/index.d.mts +13 -0
- package/dist/services/sqliteSessionHistory/index.d.mts.map +1 -0
- package/dist/services/sqliteSessionHistory/index.mjs +57 -0
- package/dist/services/sqliteSessionHistory/index.mjs.map +1 -0
- package/dist/services/sqliteTranscriptReader/index.cjs +49 -0
- package/dist/services/sqliteTranscriptReader/index.cjs.map +1 -0
- package/dist/services/sqliteTranscriptReader/index.mjs +47 -0
- package/dist/services/sqliteTranscriptReader/index.mjs.map +1 -0
- package/dist/services/toolCost/index.cjs +47 -0
- package/dist/services/toolCost/index.cjs.map +1 -0
- package/dist/services/toolCost/index.d.cts +38 -0
- package/dist/services/toolCost/index.d.cts.map +1 -0
- package/dist/services/toolCost/index.d.mts +38 -0
- package/dist/services/toolCost/index.d.mts.map +1 -0
- package/dist/services/toolCost/index.mjs +46 -0
- package/dist/services/toolCost/index.mjs.map +1 -0
- package/dist/services/toolOverrides/index.cjs +45 -0
- package/dist/services/toolOverrides/index.cjs.map +1 -0
- package/dist/services/toolOverrides/index.d.cts +6 -0
- package/dist/services/toolOverrides/index.d.cts.map +1 -0
- package/dist/services/toolOverrides/index.d.mts +6 -0
- package/dist/services/toolOverrides/index.d.mts.map +1 -0
- package/dist/services/toolOverrides/index.mjs +45 -0
- package/dist/services/toolOverrides/index.mjs.map +1 -0
- package/dist/services/toolSurface/index.cjs +105 -0
- package/dist/services/toolSurface/index.cjs.map +1 -0
- package/dist/services/toolSurface/index.d.cts +19 -0
- package/dist/services/toolSurface/index.d.cts.map +1 -0
- package/dist/services/toolSurface/index.d.mts +19 -0
- package/dist/services/toolSurface/index.d.mts.map +1 -0
- package/dist/services/toolSurface/index.mjs +105 -0
- package/dist/services/toolSurface/index.mjs.map +1 -0
- package/dist/services/traceContext/index.cjs +13 -0
- package/dist/services/traceContext/index.cjs.map +1 -0
- package/dist/services/traceContext/index.mjs +13 -0
- package/dist/services/traceContext/index.mjs.map +1 -0
- package/dist/services/transcriptPages/index.cjs +74 -0
- package/dist/services/transcriptPages/index.cjs.map +1 -0
- package/dist/services/transcriptPages/index.mjs +73 -0
- package/dist/services/transcriptPages/index.mjs.map +1 -0
- package/dist/services/tunnelOutput/index.cjs +58 -0
- package/dist/services/tunnelOutput/index.cjs.map +1 -0
- package/dist/services/tunnelOutput/index.mjs +54 -0
- package/dist/services/tunnelOutput/index.mjs.map +1 -0
- package/dist/services/tunnelProcess/index.cjs +486 -0
- package/dist/services/tunnelProcess/index.cjs.map +1 -0
- package/dist/services/tunnelProcess/index.mjs +480 -0
- package/dist/services/tunnelProcess/index.mjs.map +1 -0
- package/dist/services/voiceReloadHandoff/index.cjs +136 -0
- package/dist/services/voiceReloadHandoff/index.cjs.map +1 -0
- package/dist/services/voiceReloadHandoff/index.d.cts +34 -0
- package/dist/services/voiceReloadHandoff/index.d.cts.map +1 -0
- package/dist/services/voiceReloadHandoff/index.d.mts +34 -0
- package/dist/services/voiceReloadHandoff/index.d.mts.map +1 -0
- package/dist/services/voiceReloadHandoff/index.mjs +135 -0
- package/dist/services/voiceReloadHandoff/index.mjs.map +1 -0
- package/dist/services/voiceToolsContract/index.cjs +26 -0
- package/dist/services/voiceToolsContract/index.cjs.map +1 -0
- package/dist/services/voiceToolsContract/index.d.cts +76 -0
- package/dist/services/voiceToolsContract/index.d.cts.map +1 -0
- package/dist/services/voiceToolsContract/index.d.mts +76 -0
- package/dist/services/voiceToolsContract/index.d.mts.map +1 -0
- package/dist/services/voiceToolsContract/index.mjs +24 -0
- package/dist/services/voiceToolsContract/index.mjs.map +1 -0
- package/dist/services/webauthn/index.cjs +262 -0
- package/dist/services/webauthn/index.cjs.map +1 -0
- package/dist/services/webauthn/index.d.cts +39 -0
- package/dist/services/webauthn/index.d.cts.map +1 -0
- package/dist/services/webauthn/index.d.mts +39 -0
- package/dist/services/webauthn/index.d.mts.map +1 -0
- package/dist/services/webauthn/index.mjs +262 -0
- package/dist/services/webauthn/index.mjs.map +1 -0
- package/dist/services/webauthnPolicy/index.cjs +178 -0
- package/dist/services/webauthnPolicy/index.cjs.map +1 -0
- package/dist/services/webauthnPolicy/index.d.cts +41 -0
- package/dist/services/webauthnPolicy/index.d.cts.map +1 -0
- package/dist/services/webauthnPolicy/index.d.mts +41 -0
- package/dist/services/webauthnPolicy/index.d.mts.map +1 -0
- package/dist/services/webauthnPolicy/index.mjs +171 -0
- package/dist/services/webauthnPolicy/index.mjs.map +1 -0
- package/dist/session-files-api.cjs +61 -0
- package/dist/session-files-api.cjs.map +1 -0
- package/dist/session-files-api.d.cts +7 -0
- package/dist/session-files-api.d.cts.map +1 -0
- package/dist/session-files-api.d.mts +7 -0
- package/dist/session-files-api.d.mts.map +1 -0
- package/dist/session-files-api.mjs +57 -0
- package/dist/session-files-api.mjs.map +1 -0
- package/dist/session-protocol.cjs +8 -0
- package/dist/session-protocol.d.cts +3 -0
- package/dist/session-protocol.d.mts +3 -0
- package/dist/session-protocol.mjs +2 -0
- package/dist/skills.cjs +9 -0
- package/dist/skills.d.cts +2 -0
- package/dist/skills.d.mts +2 -0
- package/dist/skills.mjs +2 -0
- package/dist/sqlite-history-import.cjs +151 -0
- package/dist/sqlite-history-import.cjs.map +1 -0
- package/dist/sqlite-history-import.d.cts +8 -0
- package/dist/sqlite-history-import.d.cts.map +1 -0
- package/dist/sqlite-history-import.d.mts +8 -0
- package/dist/sqlite-history-import.d.mts.map +1 -0
- package/dist/sqlite-history-import.mjs +146 -0
- package/dist/sqlite-history-import.mjs.map +1 -0
- package/dist/sqlite-session-storage.cjs +53 -0
- package/dist/sqlite-session-storage.cjs.map +1 -0
- package/dist/sqlite-session-storage.d.cts +7 -0
- package/dist/sqlite-session-storage.d.cts.map +1 -0
- package/dist/sqlite-session-storage.d.mts +7 -0
- package/dist/sqlite-session-storage.d.mts.map +1 -0
- package/dist/sqlite-session-storage.mjs +49 -0
- package/dist/sqlite-session-storage.mjs.map +1 -0
- package/dist/sync-location.cjs +209 -0
- package/dist/sync-location.cjs.map +1 -0
- package/dist/sync-location.d.cts +31 -0
- package/dist/sync-location.d.cts.map +1 -0
- package/dist/sync-location.d.mts +31 -0
- package/dist/sync-location.d.mts.map +1 -0
- package/dist/sync-location.mjs +199 -0
- package/dist/sync-location.mjs.map +1 -0
- package/dist/sync-registration.cjs +140 -0
- package/dist/sync-registration.cjs.map +1 -0
- package/dist/sync-registration.d.cts +38 -0
- package/dist/sync-registration.d.cts.map +1 -0
- package/dist/sync-registration.d.mts +38 -0
- package/dist/sync-registration.d.mts.map +1 -0
- package/dist/sync-registration.mjs +131 -0
- package/dist/sync-registration.mjs.map +1 -0
- package/dist/sync-state-contract.cjs +19 -0
- package/dist/sync-state-contract.cjs.map +1 -0
- package/dist/sync-state-contract.d.cts +14 -0
- package/dist/sync-state-contract.d.cts.map +1 -0
- package/dist/sync-state-contract.d.mts +14 -0
- package/dist/sync-state-contract.d.mts.map +1 -0
- package/dist/sync-state-contract.mjs +16 -0
- package/dist/sync-state-contract.mjs.map +1 -0
- package/dist/systems/child/adapters/headlessChildSessionService.cjs +210 -0
- package/dist/systems/child/adapters/headlessChildSessionService.cjs.map +1 -0
- package/dist/systems/child/adapters/headlessChildSessionService.d.cts +24 -0
- package/dist/systems/child/adapters/headlessChildSessionService.d.cts.map +1 -0
- package/dist/systems/child/adapters/headlessChildSessionService.d.mts +24 -0
- package/dist/systems/child/adapters/headlessChildSessionService.d.mts.map +1 -0
- package/dist/systems/child/adapters/headlessChildSessionService.mjs +205 -0
- package/dist/systems/child/adapters/headlessChildSessionService.mjs.map +1 -0
- package/dist/systems/child/adapters/nativeChildRuntimes.cjs +28 -0
- package/dist/systems/child/adapters/nativeChildRuntimes.cjs.map +1 -0
- package/dist/systems/child/adapters/nativeChildRuntimes.mjs +25 -0
- package/dist/systems/child/adapters/nativeChildRuntimes.mjs.map +1 -0
- package/dist/systems/child/services/childSession/index.cjs +206 -0
- package/dist/systems/child/services/childSession/index.cjs.map +1 -0
- package/dist/systems/child/services/childSession/index.d.cts +14 -0
- package/dist/systems/child/services/childSession/index.d.cts.map +1 -0
- package/dist/systems/child/services/childSession/index.d.mts +14 -0
- package/dist/systems/child/services/childSession/index.d.mts.map +1 -0
- package/dist/systems/child/services/childSession/index.mjs +206 -0
- package/dist/systems/child/services/childSession/index.mjs.map +1 -0
- package/dist/systems/child/types/childSession.cjs +16 -0
- package/dist/systems/child/types/childSession.cjs.map +1 -0
- package/dist/systems/child/types/childSession.d.cts +135 -0
- package/dist/systems/child/types/childSession.d.cts.map +1 -0
- package/dist/systems/child/types/childSession.d.mts +135 -0
- package/dist/systems/child/types/childSession.d.mts.map +1 -0
- package/dist/systems/child/types/childSession.mjs +14 -0
- package/dist/systems/child/types/childSession.mjs.map +1 -0
- package/dist/systems/main/adapters/headlessHost.cjs +436 -0
- package/dist/systems/main/adapters/headlessHost.cjs.map +1 -0
- package/dist/systems/main/adapters/headlessHost.d.cts +72 -0
- package/dist/systems/main/adapters/headlessHost.d.cts.map +1 -0
- package/dist/systems/main/adapters/headlessHost.d.mts +72 -0
- package/dist/systems/main/adapters/headlessHost.d.mts.map +1 -0
- package/dist/systems/main/adapters/headlessHost.mjs +435 -0
- package/dist/systems/main/adapters/headlessHost.mjs.map +1 -0
- package/dist/systems/main/adapters/headlessSessionHost.cjs +653 -0
- package/dist/systems/main/adapters/headlessSessionHost.cjs.map +1 -0
- package/dist/systems/main/adapters/headlessSessionHost.d.cts +14 -0
- package/dist/systems/main/adapters/headlessSessionHost.d.cts.map +1 -0
- package/dist/systems/main/adapters/headlessSessionHost.d.mts +14 -0
- package/dist/systems/main/adapters/headlessSessionHost.d.mts.map +1 -0
- package/dist/systems/main/adapters/headlessSessionHost.mjs +649 -0
- package/dist/systems/main/adapters/headlessSessionHost.mjs.map +1 -0
- package/dist/systems/main/types/headlessHost.d.cts +36 -0
- package/dist/systems/main/types/headlessHost.d.cts.map +1 -0
- package/dist/systems/main/types/headlessHost.d.mts +36 -0
- package/dist/systems/main/types/headlessHost.d.mts.map +1 -0
- package/dist/terminal-pi-child-session-service.cjs +263 -0
- package/dist/terminal-pi-child-session-service.cjs.map +1 -0
- package/dist/terminal-pi-child-session-service.d.cts +36 -0
- package/dist/terminal-pi-child-session-service.d.cts.map +1 -0
- package/dist/terminal-pi-child-session-service.d.mts +36 -0
- package/dist/terminal-pi-child-session-service.d.mts.map +1 -0
- package/dist/terminal-pi-child-session-service.mjs +256 -0
- package/dist/terminal-pi-child-session-service.mjs.map +1 -0
- package/dist/testing/pi/extensionScenarios.cjs +73 -0
- package/dist/testing/pi/extensionScenarios.cjs.map +1 -0
- package/dist/testing/pi/extensionScenarios.d.cts +41 -0
- package/dist/testing/pi/extensionScenarios.d.cts.map +1 -0
- package/dist/testing/pi/extensionScenarios.d.mts +41 -0
- package/dist/testing/pi/extensionScenarios.d.mts.map +1 -0
- package/dist/testing/pi/extensionScenarios.mjs +73 -0
- package/dist/testing/pi/extensionScenarios.mjs.map +1 -0
- package/dist/testing/pi/testHost.cjs +365 -0
- package/dist/testing/pi/testHost.cjs.map +1 -0
- package/dist/testing/pi/testHost.d.cts +160 -0
- package/dist/testing/pi/testHost.d.cts.map +1 -0
- package/dist/testing/pi/testHost.d.mts +160 -0
- package/dist/testing/pi/testHost.d.mts.map +1 -0
- package/dist/testing/pi/testHost.mjs +365 -0
- package/dist/testing/pi/testHost.mjs.map +1 -0
- package/dist/testing.cjs +9 -0
- package/dist/testing.d.cts +5 -0
- package/dist/testing.d.mts +5 -0
- package/dist/testing.mjs +5 -0
- package/dist/tool-inventory.cjs +136 -0
- package/dist/tool-inventory.cjs.map +1 -0
- package/dist/tool-inventory.d.cts +66 -0
- package/dist/tool-inventory.d.cts.map +1 -0
- package/dist/tool-inventory.d.mts +66 -0
- package/dist/tool-inventory.d.mts.map +1 -0
- package/dist/tool-inventory.mjs +133 -0
- package/dist/tool-inventory.mjs.map +1 -0
- package/dist/tool-names.cjs +4 -0
- package/dist/tool-names.d.cts +2 -0
- package/dist/tool-names.d.mts +2 -0
- package/dist/tool-names.mjs +2 -0
- package/dist/tool-overrides.cjs +7 -0
- package/dist/tool-overrides.d.cts +3 -0
- package/dist/tool-overrides.d.mts +3 -0
- package/dist/tool-overrides.mjs +3 -0
- package/dist/tool-surface.cjs +7 -0
- package/dist/tool-surface.d.cts +3 -0
- package/dist/tool-surface.d.mts +3 -0
- package/dist/tool-surface.mjs +3 -0
- package/dist/transition-classifier.cjs +112 -0
- package/dist/transition-classifier.cjs.map +1 -0
- package/dist/transition-classifier.d.cts +18 -0
- package/dist/transition-classifier.d.cts.map +1 -0
- package/dist/transition-classifier.d.mts +18 -0
- package/dist/transition-classifier.d.mts.map +1 -0
- package/dist/transition-classifier.mjs +111 -0
- package/dist/transition-classifier.mjs.map +1 -0
- package/dist/transition-coordinator.cjs +131 -0
- package/dist/transition-coordinator.cjs.map +1 -0
- package/dist/transition-coordinator.d.cts +16 -0
- package/dist/transition-coordinator.d.cts.map +1 -0
- package/dist/transition-coordinator.d.mts +16 -0
- package/dist/transition-coordinator.d.mts.map +1 -0
- package/dist/transition-coordinator.mjs +130 -0
- package/dist/transition-coordinator.mjs.map +1 -0
- package/dist/transition.cjs +5 -0
- package/dist/transition.d.cts +2 -0
- package/dist/transition.d.mts +2 -0
- package/dist/transition.mjs +2 -0
- package/dist/types/config.d.cts +20 -0
- package/dist/types/config.d.cts.map +1 -0
- package/dist/types/config.d.mts +20 -0
- package/dist/types/config.d.mts.map +1 -0
- package/dist/types/kernel.d.cts +69 -0
- package/dist/types/kernel.d.cts.map +1 -0
- package/dist/types/kernel.d.mts +69 -0
- package/dist/types/kernel.d.mts.map +1 -0
- package/dist/types/remote.d.cts +124 -0
- package/dist/types/remote.d.cts.map +1 -0
- package/dist/types/remote.d.mts +124 -0
- package/dist/types/remote.d.mts.map +1 -0
- package/dist/types/server/directHarnessRuntime.d.cts +156 -0
- package/dist/types/server/directHarnessRuntime.d.cts.map +1 -0
- package/dist/types/server/directHarnessRuntime.d.mts +156 -0
- package/dist/types/server/directHarnessRuntime.d.mts.map +1 -0
- package/dist/types/server/session.d.cts +5 -0
- package/dist/types/server/session.d.cts.map +1 -0
- package/dist/types/server/session.d.mts +5 -0
- package/dist/types/server/session.d.mts.map +1 -0
- package/dist/types-context-api.cjs +0 -0
- package/dist/types-context-api.d.cts +48 -0
- package/dist/types-context-api.d.cts.map +1 -0
- package/dist/types-context-api.d.mts +48 -0
- package/dist/types-context-api.d.mts.map +1 -0
- package/dist/types-context-api.mjs +1 -0
- package/dist/ui-hub.cjs +5 -0
- package/dist/ui-hub.d.cts +2 -0
- package/dist/ui-hub.d.mts +2 -0
- package/dist/ui-hub.mjs +2 -0
- package/dist/v3-export.cjs +1004 -0
- package/dist/v3-export.cjs.map +1 -0
- package/dist/v3-export.d.cts +34 -0
- package/dist/v3-export.d.cts.map +1 -0
- package/dist/v3-export.d.mts +34 -0
- package/dist/v3-export.d.mts.map +1 -0
- package/dist/v3-export.mjs +1000 -0
- package/dist/v3-export.mjs.map +1 -0
- package/dist/voice-reload-handoff.cjs +14 -0
- package/dist/voice-reload-handoff.d.cts +4 -0
- package/dist/voice-reload-handoff.d.mts +4 -0
- package/dist/voice-reload-handoff.mjs +4 -0
- package/dist/voice-tools.cjs +56 -0
- package/dist/voice-tools.d.cts +4 -0
- package/dist/voice-tools.d.mts +4 -0
- package/dist/voice-tools.mjs +4 -0
- package/dist/web/models/globalStore.cjs +23 -0
- package/dist/web/models/globalStore.cjs.map +1 -0
- package/dist/web/models/globalStore.d.cts +6 -0
- package/dist/web/models/globalStore.d.cts.map +1 -0
- package/dist/web/models/globalStore.d.mts +6 -0
- package/dist/web/models/globalStore.d.mts.map +1 -0
- package/dist/web/models/globalStore.mjs +23 -0
- package/dist/web/models/globalStore.mjs.map +1 -0
- package/dist/web/models/sessionStore.cjs +56 -0
- package/dist/web/models/sessionStore.cjs.map +1 -0
- package/dist/web/models/sessionStore.d.cts +14 -0
- package/dist/web/models/sessionStore.d.cts.map +1 -0
- package/dist/web/models/sessionStore.d.mts +14 -0
- package/dist/web/models/sessionStore.d.mts.map +1 -0
- package/dist/web/models/sessionStore.mjs +56 -0
- package/dist/web/models/sessionStore.mjs.map +1 -0
- package/dist/web/schemas/bundleAssetPolicy.cjs +20 -0
- package/dist/web/schemas/bundleAssetPolicy.cjs.map +1 -0
- package/dist/web/schemas/bundleAssetPolicy.d.cts +10 -0
- package/dist/web/schemas/bundleAssetPolicy.d.cts.map +1 -0
- package/dist/web/schemas/bundleAssetPolicy.d.mts +10 -0
- package/dist/web/schemas/bundleAssetPolicy.d.mts.map +1 -0
- package/dist/web/schemas/bundleAssetPolicy.mjs +18 -0
- package/dist/web/schemas/bundleAssetPolicy.mjs.map +1 -0
- package/dist/web/services/sessionRegistry/index.cjs +107 -0
- package/dist/web/services/sessionRegistry/index.cjs.map +1 -0
- package/dist/web/services/sessionRegistry/index.d.cts +42 -0
- package/dist/web/services/sessionRegistry/index.d.cts.map +1 -0
- package/dist/web/services/sessionRegistry/index.d.mts +42 -0
- package/dist/web/services/sessionRegistry/index.d.mts.map +1 -0
- package/dist/web/services/sessionRegistry/index.mjs +100 -0
- package/dist/web/services/sessionRegistry/index.mjs.map +1 -0
- package/dist/web/services/testing/channels.cjs +11 -0
- package/dist/web/services/testing/channels.cjs.map +1 -0
- package/dist/web/services/testing/channels.d.cts +8 -0
- package/dist/web/services/testing/channels.d.cts.map +1 -0
- package/dist/web/services/testing/channels.d.mts +8 -0
- package/dist/web/services/testing/channels.d.mts.map +1 -0
- package/dist/web/services/testing/channels.mjs +11 -0
- package/dist/web/services/testing/channels.mjs.map +1 -0
- package/dist/web/services/testing/index.cjs +27 -0
- package/dist/web/services/testing/index.cjs.map +1 -0
- package/dist/web/services/testing/index.d.cts +31 -0
- package/dist/web/services/testing/index.d.cts.map +1 -0
- package/dist/web/services/testing/index.d.mts +31 -0
- package/dist/web/services/testing/index.d.mts.map +1 -0
- package/dist/web/services/testing/index.mjs +27 -0
- package/dist/web/services/testing/index.mjs.map +1 -0
- package/dist/web/services/testing/slotProps.cjs +90 -0
- package/dist/web/services/testing/slotProps.cjs.map +1 -0
- package/dist/web/services/testing/slotProps.d.cts +67 -0
- package/dist/web/services/testing/slotProps.d.cts.map +1 -0
- package/dist/web/services/testing/slotProps.d.mts +67 -0
- package/dist/web/services/testing/slotProps.d.mts.map +1 -0
- package/dist/web/services/testing/slotProps.mjs +89 -0
- package/dist/web/services/testing/slotProps.mjs.map +1 -0
- package/dist/web/services/toolResult/index.cjs +30 -0
- package/dist/web/services/toolResult/index.cjs.map +1 -0
- package/dist/web/services/toolResult/index.d.cts +14 -0
- package/dist/web/services/toolResult/index.d.cts.map +1 -0
- package/dist/web/services/toolResult/index.d.mts +14 -0
- package/dist/web/services/toolResult/index.d.mts.map +1 -0
- package/dist/web/services/toolResult/index.mjs +29 -0
- package/dist/web/services/toolResult/index.mjs.map +1 -0
- package/dist/web/testing.cjs +8 -0
- package/dist/web/testing.d.cts +4 -0
- package/dist/web/testing.d.mts +4 -0
- package/dist/web/testing.mjs +4 -0
- package/dist/web/types/modelContext.d.cts +43 -0
- package/dist/web/types/modelContext.d.cts.map +1 -0
- package/dist/web/types/modelContext.d.mts +43 -0
- package/dist/web/types/modelContext.d.mts.map +1 -0
- package/dist/web/types/sessionRegistry.d.cts +59 -0
- package/dist/web/types/sessionRegistry.d.cts.map +1 -0
- package/dist/web/types/sessionRegistry.d.mts +59 -0
- package/dist/web/types/sessionRegistry.d.mts.map +1 -0
- package/dist/web/types/webPlugin.d.cts +809 -0
- package/dist/web/types/webPlugin.d.cts.map +1 -0
- package/dist/web/types/webPlugin.d.mts +809 -0
- package/dist/web/types/webPlugin.d.mts.map +1 -0
- package/dist/web-compositions.cjs +100 -0
- package/dist/web-compositions.cjs.map +1 -0
- package/dist/web-compositions.d.cts +20 -0
- package/dist/web-compositions.d.cts.map +1 -0
- package/dist/web-compositions.d.mts +20 -0
- package/dist/web-compositions.d.mts.map +1 -0
- package/dist/web-compositions.mjs +95 -0
- package/dist/web-compositions.mjs.map +1 -0
- package/dist/web.cjs +25 -0
- package/dist/web.d.cts +10 -0
- package/dist/web.d.mts +10 -0
- package/dist/web.mjs +7 -0
- package/package.json +587 -0
|
@@ -0,0 +1,1004 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
let node_fs = require("node:fs");
|
|
4
|
+
node_fs = require_runtime.__toESM(node_fs, 1);
|
|
5
|
+
let node_path = require("node:path");
|
|
6
|
+
node_path = require_runtime.__toESM(node_path, 1);
|
|
7
|
+
let node_crypto = require("node:crypto");
|
|
8
|
+
//#region src/services/v3Export/index.ts
|
|
9
|
+
const EXPORT_STATE_VERSION = 1;
|
|
10
|
+
const EXPORT_OPERATION = "v4-to-v3-export";
|
|
11
|
+
const SESSION_NAME_NAMESPACE = "pi.session.name";
|
|
12
|
+
const ENTRY_LABEL_NAMESPACE = "pi.entry.label";
|
|
13
|
+
const BRANCH_TIP_NAMESPACE = "pi.branch.tip";
|
|
14
|
+
function nullableString(value) {
|
|
15
|
+
return value === null ? null : typeof value === "string" ? value : void 0;
|
|
16
|
+
}
|
|
17
|
+
function parseProtectedSourceIdentity(value) {
|
|
18
|
+
const record = asRecord(value);
|
|
19
|
+
if (typeof record?.path !== "string" || typeof record.realPath !== "string" || typeof record.sha256 !== "string" || !/^[a-f0-9]{64}$/.test(record.sha256)) return;
|
|
20
|
+
const number = (field) => {
|
|
21
|
+
const candidate = record[field];
|
|
22
|
+
return typeof candidate === "number" && Number.isSafeInteger(candidate) && candidate >= 0 ? candidate : void 0;
|
|
23
|
+
};
|
|
24
|
+
const device = number("device");
|
|
25
|
+
const inode = number("inode");
|
|
26
|
+
const size = number("size");
|
|
27
|
+
const mtimeMs = record.mtimeMs;
|
|
28
|
+
if (device === void 0 || inode === void 0 || size === void 0 || typeof mtimeMs !== "number" || !Number.isFinite(mtimeMs) || mtimeMs < 0) return;
|
|
29
|
+
return {
|
|
30
|
+
path: record.path,
|
|
31
|
+
realPath: record.realPath,
|
|
32
|
+
device,
|
|
33
|
+
inode,
|
|
34
|
+
size,
|
|
35
|
+
mtimeMs,
|
|
36
|
+
sha256: record.sha256
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function parseProtectedImportState(value) {
|
|
40
|
+
const record = asRecord(value);
|
|
41
|
+
const sourceIdentity = parseProtectedSourceIdentity(record?.sourceIdentity);
|
|
42
|
+
const verification = asRecord(record?.verification);
|
|
43
|
+
if (record?.version !== 1 || record.operation !== "protected-history-import" || record.phase !== "published" || typeof record.sourcePath !== "string" || typeof record.destinationPath !== "string" || typeof record.originalPath !== "string" || typeof sourceIdentity?.path !== "string" || node_path.default.resolve(sourceIdentity.path) !== node_path.default.resolve(record.sourcePath) || typeof sourceIdentity.sha256 !== "string" || !/^[a-f0-9]{64}$/.test(sourceIdentity.sha256) || typeof record.stagedSha256 !== "string" || !/^[a-f0-9]{64}$/.test(record.stagedSha256) || !Array.isArray(verification?.entries) || !Array.isArray(verification.branches)) return;
|
|
44
|
+
const entries = [];
|
|
45
|
+
for (const item of verification.entries) {
|
|
46
|
+
const proof = asRecord(item);
|
|
47
|
+
const sourceParentId = nullableString(proof?.sourceParentId);
|
|
48
|
+
const importedParentId = nullableString(proof?.importedParentId);
|
|
49
|
+
if (typeof proof?.sourceId !== "string" || typeof proof.importedId !== "string" || sourceParentId === void 0 || importedParentId === void 0 || typeof proof.sourceContentHash !== "string" || !/^[a-f0-9]{64}$/.test(proof.sourceContentHash) || typeof proof.importedContentHash !== "string" || !/^[a-f0-9]{64}$/.test(proof.importedContentHash)) return;
|
|
50
|
+
entries.push({
|
|
51
|
+
sourceId: proof.sourceId,
|
|
52
|
+
importedId: proof.importedId,
|
|
53
|
+
sourceParentId,
|
|
54
|
+
importedParentId,
|
|
55
|
+
sourceContentHash: proof.sourceContentHash,
|
|
56
|
+
importedContentHash: proof.importedContentHash
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
const branches = [];
|
|
60
|
+
for (const item of verification.branches) {
|
|
61
|
+
const proof = asRecord(item);
|
|
62
|
+
const sourceTipId = nullableString(proof?.sourceTipId);
|
|
63
|
+
const importedTipId = nullableString(proof?.importedTipId);
|
|
64
|
+
if (sourceTipId === void 0 || importedTipId === void 0) return void 0;
|
|
65
|
+
if (proof?.branch !== void 0 && typeof proof.branch !== "string") return void 0;
|
|
66
|
+
branches.push({
|
|
67
|
+
sourceTipId,
|
|
68
|
+
importedTipId,
|
|
69
|
+
...proof?.branch === void 0 ? {} : { branch: proof.branch }
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
const projected = verification.projectedSourceIds;
|
|
73
|
+
if (!Array.isArray(projected) || projected.some((id) => typeof id !== "string" || id.length === 0) || new Set(projected).size !== projected.length) return;
|
|
74
|
+
return {
|
|
75
|
+
sourcePath: record.sourcePath,
|
|
76
|
+
destinationPath: record.destinationPath,
|
|
77
|
+
originalPath: record.originalPath,
|
|
78
|
+
sourceIdentity,
|
|
79
|
+
stagedSha256: record.stagedSha256,
|
|
80
|
+
entries,
|
|
81
|
+
branches,
|
|
82
|
+
projectedSourceIds: projected
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function parseOriginalV3(content) {
|
|
86
|
+
const text = Buffer.from(content).toString("utf8");
|
|
87
|
+
if (Buffer.from(text).compare(Buffer.from(content)) !== 0 || !text.endsWith("\n")) return void 0;
|
|
88
|
+
const lines = text.slice(0, -1).split("\n");
|
|
89
|
+
let header;
|
|
90
|
+
try {
|
|
91
|
+
header = asRecord(JSON.parse(lines[0] ?? ""));
|
|
92
|
+
} catch {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
if (header?.type !== "session" || header.version !== 3) return void 0;
|
|
96
|
+
const records = [];
|
|
97
|
+
const byId = /* @__PURE__ */ new Map();
|
|
98
|
+
for (const line of lines.slice(1)) {
|
|
99
|
+
if (line.length === 0) return void 0;
|
|
100
|
+
let record;
|
|
101
|
+
try {
|
|
102
|
+
record = asRecord(JSON.parse(line));
|
|
103
|
+
} catch {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
if (record === void 0 || typeof record.id !== "string" || byId.has(record.id)) return void 0;
|
|
107
|
+
records.push(record);
|
|
108
|
+
byId.set(record.id, record);
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
header,
|
|
112
|
+
records,
|
|
113
|
+
byId
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function provenanceStableJson(value) {
|
|
117
|
+
if (Array.isArray(value)) return `[${value.map(provenanceStableJson).join(",")}]`;
|
|
118
|
+
const record = asRecord(value);
|
|
119
|
+
if (record === void 0) return JSON.stringify(value) ?? "null";
|
|
120
|
+
return `{${Object.keys(record).sort().map((key) => `${JSON.stringify(key)}:${provenanceStableJson(record[key])}`).join(",")}}`;
|
|
121
|
+
}
|
|
122
|
+
function metadataTimestamp(value) {
|
|
123
|
+
if (typeof value !== "string" || !Number.isFinite(Date.parse(value))) return void 0;
|
|
124
|
+
return new Date(Date.parse(value)).toISOString();
|
|
125
|
+
}
|
|
126
|
+
function provenanceContentHash(record) {
|
|
127
|
+
const { id: _id, parentId: _parentId, timestamp: _timestamp, kind: _kind, seq: _seq, ...content } = record;
|
|
128
|
+
if (content.type === "custom_message") {
|
|
129
|
+
content.type = "message";
|
|
130
|
+
content.message = {
|
|
131
|
+
role: "custom",
|
|
132
|
+
customType: content.customType,
|
|
133
|
+
content: content.content,
|
|
134
|
+
details: content.details,
|
|
135
|
+
display: content.display
|
|
136
|
+
};
|
|
137
|
+
delete content.customType;
|
|
138
|
+
delete content.content;
|
|
139
|
+
delete content.details;
|
|
140
|
+
delete content.display;
|
|
141
|
+
}
|
|
142
|
+
if (content.type === "branch_summary" && content.fromId === "root") content.fromId = null;
|
|
143
|
+
if (content.type === "compaction") {
|
|
144
|
+
delete content.firstKeptEntryId;
|
|
145
|
+
delete content.retainedTail;
|
|
146
|
+
}
|
|
147
|
+
return digest(Buffer.from(provenanceStableJson(content)));
|
|
148
|
+
}
|
|
149
|
+
function sameProtectedSourceIdentity(left, right) {
|
|
150
|
+
return left.path === right.path && left.realPath === right.realPath && left.device === right.device && left.inode === right.inode && left.size === right.size && left.mtimeMs === right.mtimeMs && left.sha256 === right.sha256;
|
|
151
|
+
}
|
|
152
|
+
function resolveProvenanceParent(sourceId, sourceById, mappings) {
|
|
153
|
+
const visited = /* @__PURE__ */ new Set();
|
|
154
|
+
let current = sourceId;
|
|
155
|
+
while (current !== null) {
|
|
156
|
+
if (visited.has(current)) return void 0;
|
|
157
|
+
visited.add(current);
|
|
158
|
+
const mapping = mappings.get(current);
|
|
159
|
+
if (mapping !== void 0) return mapping.importedId;
|
|
160
|
+
const record = sourceById.get(current);
|
|
161
|
+
if (record === void 0) return void 0;
|
|
162
|
+
const parentId = nullableString(record.parentId);
|
|
163
|
+
if (parentId === void 0) return void 0;
|
|
164
|
+
current = parentId;
|
|
165
|
+
}
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
function readMetadataProvenance(sourcePath, snapshot, parsed, entryRecords) {
|
|
169
|
+
const statePath = `${sourcePath}.import-state.json`;
|
|
170
|
+
if (!node_fs.default.existsSync(statePath)) return void 0;
|
|
171
|
+
let state;
|
|
172
|
+
try {
|
|
173
|
+
state = parseProtectedImportState(JSON.parse(node_fs.default.readFileSync(statePath, "utf8")));
|
|
174
|
+
} catch {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
if (state === void 0) return void 0;
|
|
178
|
+
let currentSourceIdentity;
|
|
179
|
+
try {
|
|
180
|
+
const current = readSourceSnapshot(state.sourcePath);
|
|
181
|
+
currentSourceIdentity = {
|
|
182
|
+
path: node_path.default.resolve(state.sourcePath),
|
|
183
|
+
realPath: node_fs.default.realpathSync(state.sourcePath),
|
|
184
|
+
...current.identity,
|
|
185
|
+
sha256: current.sourceSha256
|
|
186
|
+
};
|
|
187
|
+
} catch {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
let originalContent;
|
|
191
|
+
try {
|
|
192
|
+
originalContent = node_fs.default.readFileSync(node_path.default.resolve(state.originalPath));
|
|
193
|
+
} catch {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
if (!sameProtectedSourceIdentity(state.sourceIdentity, currentSourceIdentity) || node_path.default.resolve(state.destinationPath) !== sourcePath || node_path.default.resolve(state.originalPath) !== `${node_path.default.resolve(state.sourcePath)}.original` || digest(snapshot.content) !== state.stagedSha256 || state.sourceIdentity.sha256 !== digest(originalContent)) return;
|
|
197
|
+
const original = parseOriginalV3(originalContent);
|
|
198
|
+
if (original === void 0 || original.header.id !== parsed.header.id || original.header.cwd !== parsed.header.cwd || metadataTimestamp(original.header.timestamp) !== new Date(parsed.header.createdAt).toISOString()) return;
|
|
199
|
+
const sourceById = original.byId;
|
|
200
|
+
const mappings = /* @__PURE__ */ new Map();
|
|
201
|
+
const importedIds = /* @__PURE__ */ new Set();
|
|
202
|
+
const canonicalById = new Map(entryRecords.map((entry) => [String(entry.id), entry]));
|
|
203
|
+
for (const proof of state.entries) {
|
|
204
|
+
if (mappings.has(proof.sourceId) || importedIds.has(proof.importedId)) return void 0;
|
|
205
|
+
mappings.set(proof.sourceId, proof);
|
|
206
|
+
importedIds.add(proof.importedId);
|
|
207
|
+
}
|
|
208
|
+
for (const proof of state.entries) {
|
|
209
|
+
const source = sourceById.get(proof.sourceId);
|
|
210
|
+
const imported = canonicalById.get(proof.importedId);
|
|
211
|
+
if (source === void 0 || imported === void 0 || proof.sourceContentHash !== proof.importedContentHash || proof.sourceContentHash !== provenanceContentHash(source) || proof.importedContentHash !== provenanceContentHash(imported) || nullableString(source.parentId) !== proof.sourceParentId || nullableString(imported.parentId) !== proof.importedParentId || metadataTimestamp(source.timestamp) !== metadataTimestamp(imported.timestamp) || resolveProvenanceParent(proof.sourceParentId, sourceById, mappings) !== proof.importedParentId) return;
|
|
212
|
+
}
|
|
213
|
+
if (mappings.size !== entryRecords.length) return void 0;
|
|
214
|
+
const projected = new Set(state.projectedSourceIds);
|
|
215
|
+
for (const source of original.records) {
|
|
216
|
+
const id = String(source.id);
|
|
217
|
+
if (!mappings.has(id) && !projected.has(id)) return void 0;
|
|
218
|
+
if (projected.has(id) && mappings.has(id)) return void 0;
|
|
219
|
+
}
|
|
220
|
+
for (const branch of state.branches) {
|
|
221
|
+
if (branch.sourceTipId === null ? branch.importedTipId !== null : mappings.get(branch.sourceTipId)?.importedId !== branch.importedTipId) return;
|
|
222
|
+
if (branch.branch !== void 0) {
|
|
223
|
+
const current = [...parsed.writes].filter((write) => write.kind === "value" && write.namespace === BRANCH_TIP_NAMESPACE && write.key === branch.branch).sort((left, right) => left.seq - right.seq).at(-1);
|
|
224
|
+
if ((current === void 0 || current.op === "delete" ? null : nullableString(current.value)) !== branch.importedTipId) return void 0;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
const labels = /* @__PURE__ */ new Map();
|
|
228
|
+
let sourceSessionName;
|
|
229
|
+
for (const source of original.records) {
|
|
230
|
+
const id = String(source.id);
|
|
231
|
+
if (!projected.has(id)) continue;
|
|
232
|
+
const timestamp = metadataTimestamp(source.timestamp);
|
|
233
|
+
if (timestamp === void 0) return void 0;
|
|
234
|
+
if (source.type === "session_info") {
|
|
235
|
+
if (typeof source.name !== "string" || source.name.length === 0) sourceSessionName = void 0;
|
|
236
|
+
else sourceSessionName = {
|
|
237
|
+
timestamp,
|
|
238
|
+
parentId: null,
|
|
239
|
+
value: source.name
|
|
240
|
+
};
|
|
241
|
+
} else if (source.type === "label") {
|
|
242
|
+
const sourceTarget = typeof source.targetId === "string" ? source.targetId : void 0;
|
|
243
|
+
const targetId = sourceTarget === void 0 ? void 0 : resolveProvenanceParent(sourceTarget, sourceById, mappings);
|
|
244
|
+
const sourceParentId = nullableString(source.parentId);
|
|
245
|
+
if (sourceParentId === void 0 || targetId === void 0) return void 0;
|
|
246
|
+
if (targetId === null) continue;
|
|
247
|
+
const parentId = resolveProvenanceParent(sourceParentId, sourceById, mappings);
|
|
248
|
+
if (parentId === void 0) return void 0;
|
|
249
|
+
labels.set(targetId, typeof source.label === "string" && source.label.length > 0 ? {
|
|
250
|
+
timestamp,
|
|
251
|
+
parentId,
|
|
252
|
+
targetId,
|
|
253
|
+
value: source.label
|
|
254
|
+
} : null);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
const currentLabels = /* @__PURE__ */ new Map();
|
|
258
|
+
let currentName;
|
|
259
|
+
for (const write of [...parsed.writes].sort((left, right) => left.seq - right.seq)) {
|
|
260
|
+
if (write.kind !== "value") continue;
|
|
261
|
+
if (write.namespace === ENTRY_LABEL_NAMESPACE) currentLabels.set(write.key, write);
|
|
262
|
+
if (write.namespace === SESSION_NAME_NAMESPACE && write.key === "") currentName = write;
|
|
263
|
+
}
|
|
264
|
+
const expectedLabels = /* @__PURE__ */ new Map();
|
|
265
|
+
for (const [targetId, metadata] of labels) {
|
|
266
|
+
const current = currentLabels.get(targetId);
|
|
267
|
+
if (metadata === null) {
|
|
268
|
+
if (current !== void 0 && current.op !== "delete") return void 0;
|
|
269
|
+
} else {
|
|
270
|
+
if (current?.op !== "set" || current.value !== metadata.value) return void 0;
|
|
271
|
+
expectedLabels.set(targetId, metadata);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
for (const [targetId, current] of currentLabels) if (current.op === "set" && (!expectedLabels.has(targetId) || typeof current.value !== "string")) return void 0;
|
|
275
|
+
if (sourceSessionName === void 0) {
|
|
276
|
+
if (currentName?.op === "set") return void 0;
|
|
277
|
+
} else if (currentName?.op !== "set" || currentName.value !== original.records.findLast((record) => projected.has(String(record.id)) && record.type === "session_info")?.name) return;
|
|
278
|
+
return {
|
|
279
|
+
sessionName: sourceSessionName,
|
|
280
|
+
labels: new Map(expectedLabels)
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
function asRecord(value) {
|
|
284
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : void 0;
|
|
285
|
+
}
|
|
286
|
+
function requireString(value, field) {
|
|
287
|
+
if (typeof value !== "string" || value.length === 0) throw new Error(`Invalid v4 ${field}`);
|
|
288
|
+
return value;
|
|
289
|
+
}
|
|
290
|
+
function requireKey(value, field) {
|
|
291
|
+
if (typeof value !== "string") throw new Error(`Invalid v4 ${field}`);
|
|
292
|
+
return value;
|
|
293
|
+
}
|
|
294
|
+
function requireNumber(value, field) {
|
|
295
|
+
if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 1) throw new Error(`Invalid v4 ${field}`);
|
|
296
|
+
return value;
|
|
297
|
+
}
|
|
298
|
+
function requireTimestamp(value, field) {
|
|
299
|
+
if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 0) throw new Error(`Invalid v4 ${field}`);
|
|
300
|
+
return value;
|
|
301
|
+
}
|
|
302
|
+
function digest(content) {
|
|
303
|
+
return (0, node_crypto.createHash)("sha256").update(content).digest("hex");
|
|
304
|
+
}
|
|
305
|
+
function isFileSystemError(error) {
|
|
306
|
+
return error instanceof Error && "code" in error;
|
|
307
|
+
}
|
|
308
|
+
function sameIdentity(left, right) {
|
|
309
|
+
return left.device === right.device && left.inode === right.inode && left.size === right.size && left.mtimeMs === right.mtimeMs;
|
|
310
|
+
}
|
|
311
|
+
function readSourceSnapshot(sourcePath) {
|
|
312
|
+
const before = node_fs.default.statSync(sourcePath);
|
|
313
|
+
const content = node_fs.default.readFileSync(sourcePath);
|
|
314
|
+
const after = node_fs.default.statSync(sourcePath);
|
|
315
|
+
const identity = {
|
|
316
|
+
device: after.dev,
|
|
317
|
+
inode: after.ino,
|
|
318
|
+
size: after.size,
|
|
319
|
+
mtimeMs: after.mtimeMs
|
|
320
|
+
};
|
|
321
|
+
if (before.dev !== after.dev || before.ino !== after.ino || before.size !== after.size || before.mtimeMs !== after.mtimeMs || after.size !== content.byteLength) throw new Error("v4 source changed while it was being read");
|
|
322
|
+
return {
|
|
323
|
+
content,
|
|
324
|
+
sourceSha256: digest(content),
|
|
325
|
+
identity
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
function assertSourceUnchanged(sourcePath, snapshot) {
|
|
329
|
+
const current = readSourceSnapshot(sourcePath);
|
|
330
|
+
if (!sameIdentity(current.identity, snapshot.identity) || current.sourceSha256 !== snapshot.sourceSha256) throw new Error("v4 source changed during export");
|
|
331
|
+
}
|
|
332
|
+
function readJsonLines(content) {
|
|
333
|
+
if (content.byteLength === 0) throw new Error("Cannot export an empty v4 JSONL file");
|
|
334
|
+
if (!content.toString("utf8").endsWith("\n")) throw new Error("Cannot export a truncated v4 JSONL file");
|
|
335
|
+
const lines = content.toString("utf8").slice(0, -1).split("\n");
|
|
336
|
+
if (lines[0] === void 0 || lines[0].length === 0) throw new Error("Cannot export an empty v4 JSONL file");
|
|
337
|
+
const headerValue = asRecord(JSON.parse(lines[0]));
|
|
338
|
+
if (headerValue?.v !== 4 || headerValue.kind !== "header") throw new Error("Source is not v4 JSONL");
|
|
339
|
+
const header = headerValue;
|
|
340
|
+
requireString(header.id, "header id");
|
|
341
|
+
requireNumber(header.storageVersion, "storage version");
|
|
342
|
+
requireTimestamp(header.createdAt, "header createdAt");
|
|
343
|
+
requireString(header.cwd, "header cwd");
|
|
344
|
+
if (header.parentSessionId !== void 0) requireString(header.parentSessionId, "parent session id");
|
|
345
|
+
if (header.legacyParentSessionPath !== void 0) requireString(header.legacyParentSessionPath, "legacy parent session path");
|
|
346
|
+
const writes = [];
|
|
347
|
+
const losses = [];
|
|
348
|
+
const knownHeaderFields = /* @__PURE__ */ new Set([
|
|
349
|
+
"v",
|
|
350
|
+
"kind",
|
|
351
|
+
"id",
|
|
352
|
+
"storageVersion",
|
|
353
|
+
"createdAt",
|
|
354
|
+
"cwd",
|
|
355
|
+
"parentSessionId",
|
|
356
|
+
"legacyParentSessionPath"
|
|
357
|
+
]);
|
|
358
|
+
for (const [key, value] of Object.entries(headerValue)) if (!knownHeaderFields.has(key)) losses.push({
|
|
359
|
+
code: "unknown-header-field",
|
|
360
|
+
detail: `Header field ${key} is not representable in v3`,
|
|
361
|
+
record: {
|
|
362
|
+
key,
|
|
363
|
+
value
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
for (const [lineIndex, line] of lines.slice(1).entries()) {
|
|
367
|
+
if (line.length === 0) continue;
|
|
368
|
+
let value;
|
|
369
|
+
try {
|
|
370
|
+
value = JSON.parse(line);
|
|
371
|
+
} catch (error) {
|
|
372
|
+
throw new Error(`Invalid v4 JSONL transaction at line ${lineIndex + 2}`, { cause: error });
|
|
373
|
+
}
|
|
374
|
+
const transaction = Array.isArray(value) ? value : [value];
|
|
375
|
+
for (const item of transaction) {
|
|
376
|
+
const record = asRecord(item);
|
|
377
|
+
if (record === void 0) {
|
|
378
|
+
losses.push({
|
|
379
|
+
code: "unknown-record",
|
|
380
|
+
detail: `Non-object transaction at line ${lineIndex + 2}`,
|
|
381
|
+
record: item
|
|
382
|
+
});
|
|
383
|
+
continue;
|
|
384
|
+
}
|
|
385
|
+
const kind = record.kind;
|
|
386
|
+
if (kind === "entry") {
|
|
387
|
+
const seq = requireNumber(record.seq, "entry sequence");
|
|
388
|
+
const { kind: _kind, seq: _seq, ...entry } = record;
|
|
389
|
+
writes.push({
|
|
390
|
+
kind,
|
|
391
|
+
entry,
|
|
392
|
+
seq
|
|
393
|
+
});
|
|
394
|
+
} else if (kind === "usage") {
|
|
395
|
+
const seq = requireNumber(record.seq, "usage sequence");
|
|
396
|
+
const { kind: _kind, seq: _seq, ...row } = record;
|
|
397
|
+
writes.push({
|
|
398
|
+
kind,
|
|
399
|
+
row,
|
|
400
|
+
seq
|
|
401
|
+
});
|
|
402
|
+
} else if (kind === "value" && (record.op === "set" || record.op === "delete")) writes.push({
|
|
403
|
+
kind,
|
|
404
|
+
op: record.op,
|
|
405
|
+
namespace: requireString(record.namespace, "value namespace"),
|
|
406
|
+
key: requireKey(record.key, "value key"),
|
|
407
|
+
...record.value === void 0 ? {} : { value: record.value },
|
|
408
|
+
seq: requireNumber(record.seq, "value sequence")
|
|
409
|
+
});
|
|
410
|
+
else if (kind === "list" && (record.op === "append" || record.op === "delete")) writes.push({
|
|
411
|
+
kind,
|
|
412
|
+
op: record.op,
|
|
413
|
+
namespace: requireString(record.namespace, "list namespace"),
|
|
414
|
+
key: requireKey(record.key, "list key"),
|
|
415
|
+
...record.value === void 0 ? {} : { value: record.value },
|
|
416
|
+
seq: requireNumber(record.seq, "list sequence")
|
|
417
|
+
});
|
|
418
|
+
else losses.push({
|
|
419
|
+
code: "unknown-write",
|
|
420
|
+
detail: `Unsupported v4 write at line ${lineIndex + 2}`,
|
|
421
|
+
record
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
return {
|
|
426
|
+
header,
|
|
427
|
+
writes,
|
|
428
|
+
losses
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
function isoTimestamp(timestamp, field) {
|
|
432
|
+
const value = requireTimestamp(timestamp, field);
|
|
433
|
+
const result = new Date(value).toISOString();
|
|
434
|
+
if (Number.isNaN(Date.parse(result))) throw new Error(`Invalid v4 ${field}`);
|
|
435
|
+
return result;
|
|
436
|
+
}
|
|
437
|
+
function deterministicId(sourceSha256, kind, key) {
|
|
438
|
+
return `doom-${(0, node_crypto.createHash)("sha256").update(`${sourceSha256}\0${kind}\0${key}`).digest("hex").slice(0, 32)}`;
|
|
439
|
+
}
|
|
440
|
+
function messageForEntry(entry) {
|
|
441
|
+
return entry.type === "message" ? entry.message : void 0;
|
|
442
|
+
}
|
|
443
|
+
function sameJson(left, right) {
|
|
444
|
+
return JSON.stringify(left) === JSON.stringify(right);
|
|
445
|
+
}
|
|
446
|
+
function findCompactionFirstKeptId(entry, entries) {
|
|
447
|
+
const retainedTail = entry.retainedTail;
|
|
448
|
+
if (!Array.isArray(retainedTail)) return void 0;
|
|
449
|
+
if (retainedTail.length === 0) return typeof entry.parentId === "string" ? entry.parentId : void 0;
|
|
450
|
+
const ancestry = [];
|
|
451
|
+
const visited = /* @__PURE__ */ new Set();
|
|
452
|
+
let currentId = typeof entry.parentId === "string" ? entry.parentId : null;
|
|
453
|
+
while (currentId !== null) {
|
|
454
|
+
if (visited.has(currentId)) return void 0;
|
|
455
|
+
visited.add(currentId);
|
|
456
|
+
const current = entries.get(currentId);
|
|
457
|
+
if (current === void 0) return void 0;
|
|
458
|
+
ancestry.unshift(current);
|
|
459
|
+
currentId = typeof current.parentId === "string" ? current.parentId : null;
|
|
460
|
+
}
|
|
461
|
+
for (let index = 0; index + retainedTail.length <= ancestry.length; index += 1) {
|
|
462
|
+
const candidate = ancestry.slice(index, index + retainedTail.length);
|
|
463
|
+
if (candidate.every((item, itemIndex) => sameJson(messageForEntry(item), retainedTail[itemIndex]))) {
|
|
464
|
+
const id = candidate[0]?.id;
|
|
465
|
+
if (typeof id === "string") return id;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
function attachUsage(entry, usage) {
|
|
470
|
+
if (entry.type === "message" && asRecord(entry.message)?.role !== void 0) return {
|
|
471
|
+
...entry,
|
|
472
|
+
message: {
|
|
473
|
+
...asRecord(entry.message),
|
|
474
|
+
usage
|
|
475
|
+
}
|
|
476
|
+
};
|
|
477
|
+
if (entry.type === "compaction" || entry.type === "branch_summary") return {
|
|
478
|
+
...entry,
|
|
479
|
+
usage
|
|
480
|
+
};
|
|
481
|
+
return entry;
|
|
482
|
+
}
|
|
483
|
+
function convertEntries(entryWrites, usageWrites, losses) {
|
|
484
|
+
const entries = /* @__PURE__ */ new Map();
|
|
485
|
+
for (const write of entryWrites) {
|
|
486
|
+
const id = requireString(write.entry.id, "entry id");
|
|
487
|
+
if (entries.has(id)) throw new Error(`Duplicate v4 entry id: ${id}`);
|
|
488
|
+
entries.set(id, write.entry);
|
|
489
|
+
}
|
|
490
|
+
for (const entry of entries.values()) {
|
|
491
|
+
const parentId = entry.parentId;
|
|
492
|
+
if (parentId !== null && (typeof parentId !== "string" || !entries.has(parentId))) throw new Error(`Missing v4 entry parent: ${JSON.stringify(parentId)}`);
|
|
493
|
+
}
|
|
494
|
+
const usageByEntry = /* @__PURE__ */ new Map();
|
|
495
|
+
for (const write of [...usageWrites].sort((left, right) => left.seq - right.seq)) {
|
|
496
|
+
const entryId = write.row.entryId;
|
|
497
|
+
if (typeof entryId !== "string" || !entries.has(entryId) || write.row.usage === void 0) {
|
|
498
|
+
losses.push({
|
|
499
|
+
code: "usage-not-representable",
|
|
500
|
+
detail: "Usage row has no representable entry target",
|
|
501
|
+
record: write.row
|
|
502
|
+
});
|
|
503
|
+
continue;
|
|
504
|
+
}
|
|
505
|
+
if (usageByEntry.has(entryId)) losses.push({
|
|
506
|
+
code: "usage-multiple-rows",
|
|
507
|
+
detail: `Multiple usage rows target entry ${entryId}; v3 retains only the latest usage value`,
|
|
508
|
+
record: write.row
|
|
509
|
+
});
|
|
510
|
+
if (write.row.adjustment !== false || write.row.details !== void 0) losses.push({
|
|
511
|
+
code: "usage-metadata",
|
|
512
|
+
detail: `Usage metadata for entry ${entryId} is not representable in v3`,
|
|
513
|
+
record: write.row
|
|
514
|
+
});
|
|
515
|
+
usageByEntry.set(entryId, write.row.usage);
|
|
516
|
+
}
|
|
517
|
+
return [...entryWrites].sort((left, right) => left.seq - right.seq).map((write) => {
|
|
518
|
+
const source = write.entry;
|
|
519
|
+
const type = requireString(source.type, "entry type");
|
|
520
|
+
const id = requireString(source.id, "entry id");
|
|
521
|
+
const parentId = source.parentId;
|
|
522
|
+
if (typeof parentId !== "string" && parentId !== null) throw new Error(`Invalid v4 parent id: ${id}`);
|
|
523
|
+
const base = {
|
|
524
|
+
...source,
|
|
525
|
+
type,
|
|
526
|
+
id,
|
|
527
|
+
parentId,
|
|
528
|
+
timestamp: isoTimestamp(source.timestamp, "entry timestamp")
|
|
529
|
+
};
|
|
530
|
+
delete base.kind;
|
|
531
|
+
delete base.seq;
|
|
532
|
+
if (type === "branch_summary") {
|
|
533
|
+
if (base.fromId === null) base.fromId = "root";
|
|
534
|
+
else if (typeof base.fromId !== "string") throw new Error(`Invalid v4 branch summary source: ${id}`);
|
|
535
|
+
}
|
|
536
|
+
if (type === "compaction") {
|
|
537
|
+
const firstKeptEntryId = findCompactionFirstKeptId(source, entries);
|
|
538
|
+
if (firstKeptEntryId === void 0) {
|
|
539
|
+
losses.push({
|
|
540
|
+
code: "compaction-retained-tail",
|
|
541
|
+
detail: `Compaction ${id} retained tail cannot be mapped to v3 firstKeptEntryId`,
|
|
542
|
+
record: source
|
|
543
|
+
});
|
|
544
|
+
if (typeof parentId === "string") base.firstKeptEntryId = parentId;
|
|
545
|
+
else return void 0;
|
|
546
|
+
} else base.firstKeptEntryId = firstKeptEntryId;
|
|
547
|
+
delete base.retainedTail;
|
|
548
|
+
} else if (type === "custom") requireString(source.customType, "custom entry type");
|
|
549
|
+
else if (type !== "message" && type !== "branch_summary") {
|
|
550
|
+
losses.push({
|
|
551
|
+
code: "entry-type",
|
|
552
|
+
detail: `Entry type ${type} is not representable in v3`,
|
|
553
|
+
record: source
|
|
554
|
+
});
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
const usage = usageByEntry.get(id);
|
|
558
|
+
return usage === void 0 ? base : attachUsage(base, usage);
|
|
559
|
+
}).filter((record) => record !== void 0);
|
|
560
|
+
}
|
|
561
|
+
function convertValues(sourceSha256, valueWrites, representableEntryIds, provenance, losses) {
|
|
562
|
+
const sessionNames = valueWrites.filter((write) => write.namespace === SESSION_NAME_NAMESPACE && write.key === "");
|
|
563
|
+
const labels = /* @__PURE__ */ new Map();
|
|
564
|
+
const branchTips = /* @__PURE__ */ new Map();
|
|
565
|
+
for (const write of [...valueWrites].sort((left, right) => left.seq - right.seq)) if (write.namespace === ENTRY_LABEL_NAMESPACE) labels.set(write.key, write);
|
|
566
|
+
else if (write.namespace === BRANCH_TIP_NAMESPACE) {
|
|
567
|
+
branchTips.set(write.key, write);
|
|
568
|
+
if (write.key !== "main") losses.push({
|
|
569
|
+
code: "branch-tip-value",
|
|
570
|
+
detail: `Named branch tip ${write.key} is represented by its entry tree only`,
|
|
571
|
+
record: write
|
|
572
|
+
});
|
|
573
|
+
} else if (write.namespace === SESSION_NAME_NAMESPACE && write.key !== "") losses.push({
|
|
574
|
+
code: "session-name-key",
|
|
575
|
+
detail: `Session value key ${write.key} is not representable in v3`,
|
|
576
|
+
record: write
|
|
577
|
+
});
|
|
578
|
+
else if (write.namespace !== SESSION_NAME_NAMESPACE) losses.push({
|
|
579
|
+
code: "value-not-representable",
|
|
580
|
+
detail: `Value ${write.namespace}/${write.key} is not representable in v3`,
|
|
581
|
+
record: write
|
|
582
|
+
});
|
|
583
|
+
const records = [];
|
|
584
|
+
const latestName = [...sessionNames].sort((left, right) => left.seq - right.seq).at(-1);
|
|
585
|
+
if (latestName !== void 0 && latestName.op === "set") {
|
|
586
|
+
if (typeof latestName.value !== "string") losses.push({
|
|
587
|
+
code: "session-name-value",
|
|
588
|
+
detail: "Session name is not a v3 string",
|
|
589
|
+
record: latestName
|
|
590
|
+
});
|
|
591
|
+
else {
|
|
592
|
+
const metadata = provenance?.sessionName;
|
|
593
|
+
if (metadata === void 0) losses.push({
|
|
594
|
+
code: "value-provenance",
|
|
595
|
+
detail: "v4 session value has no source event timestamp; v3 session_info was omitted to avoid inventing one",
|
|
596
|
+
record: latestName
|
|
597
|
+
});
|
|
598
|
+
else records.push({
|
|
599
|
+
type: "session_info",
|
|
600
|
+
id: deterministicId(sourceSha256, "session_info", "name"),
|
|
601
|
+
parentId: metadata.parentId,
|
|
602
|
+
timestamp: metadata.timestamp,
|
|
603
|
+
name: latestName.value
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
for (const [targetId, write] of [...labels.entries()].sort((left, right) => left[1].seq - right[1].seq)) {
|
|
608
|
+
if (write.op !== "set") continue;
|
|
609
|
+
if (typeof write.value !== "string") {
|
|
610
|
+
losses.push({
|
|
611
|
+
code: "label-value",
|
|
612
|
+
detail: `Label ${targetId} is not a v3 string`,
|
|
613
|
+
record: write
|
|
614
|
+
});
|
|
615
|
+
continue;
|
|
616
|
+
}
|
|
617
|
+
if (!representableEntryIds.has(targetId)) {
|
|
618
|
+
losses.push({
|
|
619
|
+
code: "label-target",
|
|
620
|
+
detail: `Label ${targetId} targets an entry that is not representable in v3`,
|
|
621
|
+
record: write
|
|
622
|
+
});
|
|
623
|
+
continue;
|
|
624
|
+
}
|
|
625
|
+
const metadata = provenance?.labels.get(targetId);
|
|
626
|
+
if (metadata === void 0) {
|
|
627
|
+
losses.push({
|
|
628
|
+
code: "value-provenance",
|
|
629
|
+
detail: `v4 label ${targetId} has no source event timestamp; v3 label was omitted to avoid inventing one`,
|
|
630
|
+
record: write
|
|
631
|
+
});
|
|
632
|
+
continue;
|
|
633
|
+
}
|
|
634
|
+
records.push({
|
|
635
|
+
type: "label",
|
|
636
|
+
id: deterministicId(sourceSha256, "label", targetId),
|
|
637
|
+
parentId: metadata.parentId,
|
|
638
|
+
timestamp: metadata.timestamp,
|
|
639
|
+
targetId: metadata.targetId ?? targetId,
|
|
640
|
+
label: write.value
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
const mainTip = branchTips.get("main");
|
|
644
|
+
let mainTipId;
|
|
645
|
+
if (mainTip === void 0) {
|
|
646
|
+
if (representableEntryIds.size > 0) losses.push({
|
|
647
|
+
code: "main-tip-missing",
|
|
648
|
+
detail: "v4 has no main branch tip; v3 cannot choose a resume tip"
|
|
649
|
+
});
|
|
650
|
+
} else if (mainTip.op === "delete" || mainTip.value === null) mainTipId = null;
|
|
651
|
+
else if (typeof mainTip.value === "string") {
|
|
652
|
+
mainTipId = mainTip.value;
|
|
653
|
+
if (!representableEntryIds.has(mainTipId)) {
|
|
654
|
+
losses.push({
|
|
655
|
+
code: "main-tip-not-representable",
|
|
656
|
+
detail: `v4 main branch tip ${mainTipId} is not representable in v3`,
|
|
657
|
+
record: mainTip
|
|
658
|
+
});
|
|
659
|
+
mainTipId = void 0;
|
|
660
|
+
}
|
|
661
|
+
} else losses.push({
|
|
662
|
+
code: "main-tip-value",
|
|
663
|
+
detail: "v4 main branch tip is not a nullable entry id",
|
|
664
|
+
record: mainTip
|
|
665
|
+
});
|
|
666
|
+
return {
|
|
667
|
+
records,
|
|
668
|
+
mainTipId
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
function orderEntriesForMainTip(entries, mainTipId, losses) {
|
|
672
|
+
if (mainTipId === void 0 || mainTipId === null) return entries;
|
|
673
|
+
const tipIndex = entries.findIndex((entry) => entry.id === mainTipId);
|
|
674
|
+
if (tipIndex < 0) return entries;
|
|
675
|
+
if (entries.some((entry) => entry.parentId === mainTipId && entry.id !== mainTipId)) {
|
|
676
|
+
losses.push({
|
|
677
|
+
code: "main-tip-not-leaf",
|
|
678
|
+
detail: `v4 main branch tip ${mainTipId} has representable descendants; v3 cannot make it the resume tip`
|
|
679
|
+
});
|
|
680
|
+
return entries;
|
|
681
|
+
}
|
|
682
|
+
const [tip] = entries.splice(tipIndex, 1);
|
|
683
|
+
entries.push(tip);
|
|
684
|
+
return entries;
|
|
685
|
+
}
|
|
686
|
+
function serializeV3(header, records) {
|
|
687
|
+
const v3Header = {
|
|
688
|
+
type: "session",
|
|
689
|
+
version: 3,
|
|
690
|
+
id: header.id,
|
|
691
|
+
timestamp: isoTimestamp(header.createdAt, "header createdAt"),
|
|
692
|
+
cwd: header.cwd
|
|
693
|
+
};
|
|
694
|
+
if (header.legacyParentSessionPath !== void 0) v3Header.parentSession = header.legacyParentSessionPath;
|
|
695
|
+
return `${[v3Header, ...records].map((record) => JSON.stringify(record)).join("\n")}\n`;
|
|
696
|
+
}
|
|
697
|
+
function removeIfPresent(filePath) {
|
|
698
|
+
try {
|
|
699
|
+
node_fs.default.rmSync(filePath, { force: true });
|
|
700
|
+
} catch {}
|
|
701
|
+
}
|
|
702
|
+
function writeExclusiveText(filePath, content) {
|
|
703
|
+
node_fs.default.mkdirSync(node_path.default.dirname(filePath), { recursive: true });
|
|
704
|
+
let fd;
|
|
705
|
+
let created = false;
|
|
706
|
+
try {
|
|
707
|
+
fd = node_fs.default.openSync(filePath, "wx", 384);
|
|
708
|
+
created = true;
|
|
709
|
+
node_fs.default.writeFileSync(fd, content, "utf8");
|
|
710
|
+
node_fs.default.fsyncSync(fd);
|
|
711
|
+
node_fs.default.closeSync(fd);
|
|
712
|
+
fd = void 0;
|
|
713
|
+
node_fs.default.chmodSync(filePath, 384);
|
|
714
|
+
} catch (error) {
|
|
715
|
+
if (fd !== void 0) try {
|
|
716
|
+
node_fs.default.closeSync(fd);
|
|
717
|
+
} catch {}
|
|
718
|
+
if (created) removeIfPresent(filePath);
|
|
719
|
+
throw error;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
function publishDistinct(stagingPath, destinationPath, expectedDigest, allowExistingMatching = false) {
|
|
723
|
+
const acceptExisting = () => {
|
|
724
|
+
if (!allowExistingMatching || expectedDigest === void 0 || !node_fs.default.existsSync(destinationPath)) return false;
|
|
725
|
+
return digest(node_fs.default.readFileSync(destinationPath)) === expectedDigest;
|
|
726
|
+
};
|
|
727
|
+
if (node_fs.default.existsSync(destinationPath)) {
|
|
728
|
+
if (acceptExisting()) return;
|
|
729
|
+
throw new Error(`Refusing to overwrite derived export: ${destinationPath}`);
|
|
730
|
+
}
|
|
731
|
+
node_fs.default.mkdirSync(node_path.default.dirname(destinationPath), { recursive: true });
|
|
732
|
+
try {
|
|
733
|
+
node_fs.default.linkSync(stagingPath, destinationPath);
|
|
734
|
+
} catch (error) {
|
|
735
|
+
if (!isFileSystemError(error) || error.code !== "EEXIST" || !acceptExisting()) throw error;
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
738
|
+
if (node_fs.default.existsSync(destinationPath) && digest(node_fs.default.readFileSync(destinationPath)) !== expectedDigest && expectedDigest !== void 0) throw new Error(`Published export does not match staged content: ${destinationPath}`);
|
|
739
|
+
node_fs.default.unlinkSync(stagingPath);
|
|
740
|
+
}
|
|
741
|
+
function sameState(left, right) {
|
|
742
|
+
return left.version === right.version && left.operation === right.operation && left.phase === right.phase && left.sourcePath === right.sourcePath && left.destinationPath === right.destinationPath && left.reportPath === right.reportPath && left.sourceSha256 === right.sourceSha256 && sameIdentity(left.sourceIdentity, right.sourceIdentity) && left.destinationSha256 === right.destinationSha256 && left.reportSha256 === right.reportSha256 && left.stagingPath === right.stagingPath && left.reportStagingPath === right.reportStagingPath;
|
|
743
|
+
}
|
|
744
|
+
function writeState(statePath, state, expectedState) {
|
|
745
|
+
const temporaryPath = `${statePath}.${process.pid}.${(0, node_crypto.randomUUID)()}.tmp`;
|
|
746
|
+
let temporaryCreated = false;
|
|
747
|
+
try {
|
|
748
|
+
writeExclusiveText(temporaryPath, `${JSON.stringify(state, null, 2)}\n`);
|
|
749
|
+
temporaryCreated = true;
|
|
750
|
+
if (expectedState === void 0) {
|
|
751
|
+
publishDistinct(temporaryPath, statePath);
|
|
752
|
+
temporaryCreated = false;
|
|
753
|
+
return;
|
|
754
|
+
}
|
|
755
|
+
const currentState = parseState(statePath);
|
|
756
|
+
if (currentState === void 0 || !sameState(currentState, expectedState)) throw new Error(`v3 export state changed during publication: ${statePath}`);
|
|
757
|
+
node_fs.default.renameSync(temporaryPath, statePath);
|
|
758
|
+
temporaryCreated = false;
|
|
759
|
+
node_fs.default.chmodSync(statePath, 384);
|
|
760
|
+
} catch (error) {
|
|
761
|
+
if (temporaryCreated) removeIfPresent(temporaryPath);
|
|
762
|
+
throw error;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
function parseSourceIdentity(value) {
|
|
766
|
+
const record = asRecord(value);
|
|
767
|
+
if (record === void 0) throw new Error("Invalid v3 export source identity");
|
|
768
|
+
const number = (field) => {
|
|
769
|
+
const candidate = record[field];
|
|
770
|
+
if (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0) throw new Error(`Invalid v3 export source identity ${field}`);
|
|
771
|
+
return candidate;
|
|
772
|
+
};
|
|
773
|
+
const mtimeMs = record.mtimeMs;
|
|
774
|
+
if (typeof mtimeMs !== "number" || !Number.isFinite(mtimeMs) || mtimeMs < 0) throw new Error("Invalid v3 export source identity mtimeMs");
|
|
775
|
+
return {
|
|
776
|
+
device: number("device"),
|
|
777
|
+
inode: number("inode"),
|
|
778
|
+
size: number("size"),
|
|
779
|
+
mtimeMs
|
|
780
|
+
};
|
|
781
|
+
}
|
|
782
|
+
function requireHash(value, field) {
|
|
783
|
+
const hash = requireString(value, field);
|
|
784
|
+
if (!/^[a-f0-9]{64}$/.test(hash)) throw new Error(`Invalid v3 export ${field}`);
|
|
785
|
+
return hash;
|
|
786
|
+
}
|
|
787
|
+
function parseState(statePath) {
|
|
788
|
+
if (!node_fs.default.existsSync(statePath)) return void 0;
|
|
789
|
+
const record = asRecord(JSON.parse(node_fs.default.readFileSync(statePath, "utf8")));
|
|
790
|
+
if (record?.version !== EXPORT_STATE_VERSION || record.operation !== EXPORT_OPERATION || typeof record.phase !== "string" || typeof record.sourcePath !== "string" || typeof record.destinationPath !== "string" || typeof record.reportPath !== "string" || typeof record.sourceSha256 !== "string" || typeof record.destinationSha256 !== "string" || typeof record.reportSha256 !== "string" || typeof record.stagingPath !== "string" || typeof record.reportStagingPath !== "string") throw new Error(`Invalid v3 export state: ${statePath}`);
|
|
791
|
+
if (record.phase !== "staged" && record.phase !== "published") throw new Error(`Invalid v3 export state phase: ${record.phase}`);
|
|
792
|
+
return {
|
|
793
|
+
version: 1,
|
|
794
|
+
operation: EXPORT_OPERATION,
|
|
795
|
+
phase: record.phase,
|
|
796
|
+
sourcePath: record.sourcePath,
|
|
797
|
+
destinationPath: record.destinationPath,
|
|
798
|
+
reportPath: record.reportPath,
|
|
799
|
+
sourceSha256: requireHash(record.sourceSha256, "source checksum"),
|
|
800
|
+
sourceIdentity: parseSourceIdentity(record.sourceIdentity),
|
|
801
|
+
destinationSha256: requireHash(record.destinationSha256, "destination checksum"),
|
|
802
|
+
reportSha256: requireHash(record.reportSha256, "report checksum"),
|
|
803
|
+
stagingPath: record.stagingPath,
|
|
804
|
+
reportStagingPath: record.reportStagingPath
|
|
805
|
+
};
|
|
806
|
+
}
|
|
807
|
+
function assertDistinctPaths(sourcePath, destinationPath, reportPath, statePath) {
|
|
808
|
+
const paths = [
|
|
809
|
+
sourcePath,
|
|
810
|
+
destinationPath,
|
|
811
|
+
reportPath,
|
|
812
|
+
statePath
|
|
813
|
+
];
|
|
814
|
+
if (new Set(paths).size !== paths.length) throw new Error("v3 export paths must be distinct");
|
|
815
|
+
if (sourcePath === destinationPath || sourcePath === reportPath) throw new Error("v3 export cannot overwrite its source");
|
|
816
|
+
}
|
|
817
|
+
function assertNoSourceAliases(sourcePath, paths) {
|
|
818
|
+
const source = node_fs.default.statSync(sourcePath);
|
|
819
|
+
for (const candidate of paths) {
|
|
820
|
+
if (!node_fs.default.existsSync(candidate)) continue;
|
|
821
|
+
const stat = node_fs.default.statSync(candidate);
|
|
822
|
+
if (stat.dev === source.dev && stat.ino === source.ino) throw new Error(`v3 export path aliases its source: ${candidate}`);
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
function assertStatePaths(sourcePath, state) {
|
|
826
|
+
const paths = [
|
|
827
|
+
sourcePath,
|
|
828
|
+
state.destinationPath,
|
|
829
|
+
state.reportPath,
|
|
830
|
+
state.stagingPath,
|
|
831
|
+
state.reportStagingPath
|
|
832
|
+
];
|
|
833
|
+
if (new Set(paths).size !== paths.length) throw new Error("Invalid v3 export state paths");
|
|
834
|
+
assertNoSourceAliases(sourcePath, paths.slice(1));
|
|
835
|
+
}
|
|
836
|
+
async function exportWhileOwned(sourcePath, destinationPath, reportPath, statePath, lease) {
|
|
837
|
+
await lease.assertQuiescent();
|
|
838
|
+
const snapshot = readSourceSnapshot(sourcePath);
|
|
839
|
+
assertNoSourceAliases(sourcePath, [
|
|
840
|
+
destinationPath,
|
|
841
|
+
reportPath,
|
|
842
|
+
statePath
|
|
843
|
+
]);
|
|
844
|
+
const state = parseState(statePath);
|
|
845
|
+
if (state !== void 0) {
|
|
846
|
+
assertStatePaths(sourcePath, state);
|
|
847
|
+
if (state.sourcePath !== sourcePath || state.destinationPath !== destinationPath || state.reportPath !== reportPath || state.sourceSha256 !== snapshot.sourceSha256 || !sameIdentity(state.sourceIdentity, snapshot.identity)) throw new Error("v3 export state does not match source");
|
|
848
|
+
if (state.phase === "published") {
|
|
849
|
+
if (!node_fs.default.existsSync(destinationPath) || !node_fs.default.existsSync(reportPath)) throw new Error("Published v3 export is incomplete");
|
|
850
|
+
if (digest(node_fs.default.readFileSync(destinationPath)) !== state.destinationSha256) throw new Error("Published v3 export was modified");
|
|
851
|
+
if (digest(node_fs.default.readFileSync(reportPath)) !== state.reportSha256) throw new Error("Published v3 loss report was modified");
|
|
852
|
+
const report = JSON.parse(node_fs.default.readFileSync(reportPath, "utf8"));
|
|
853
|
+
return {
|
|
854
|
+
status: "already-published",
|
|
855
|
+
sourcePath,
|
|
856
|
+
destinationPath,
|
|
857
|
+
reportPath,
|
|
858
|
+
statePath,
|
|
859
|
+
sourceSha256: snapshot.sourceSha256,
|
|
860
|
+
losses: report.losses
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
if (state === void 0) {
|
|
865
|
+
if (node_fs.default.existsSync(destinationPath) || node_fs.default.existsSync(reportPath)) throw new Error("Refusing to overwrite an existing v3 export or loss report");
|
|
866
|
+
const parsed = readJsonLines(snapshot.content);
|
|
867
|
+
const entryWrites = parsed.writes.filter((write) => write.kind === "entry");
|
|
868
|
+
const usageWrites = parsed.writes.filter((write) => write.kind === "usage");
|
|
869
|
+
const valueWrites = parsed.writes.filter((write) => write.kind === "value");
|
|
870
|
+
const listWrites = parsed.writes.filter((write) => write.kind === "list");
|
|
871
|
+
const losses = [...parsed.losses];
|
|
872
|
+
if (parsed.header.parentSessionId !== void 0) losses.push({
|
|
873
|
+
code: "parent-session-id",
|
|
874
|
+
detail: "v4 parentSessionId has no v3 path representation",
|
|
875
|
+
record: { parentSessionId: parsed.header.parentSessionId }
|
|
876
|
+
});
|
|
877
|
+
const entryRecords = convertEntries(entryWrites, usageWrites, losses);
|
|
878
|
+
const provenance = readMetadataProvenance(sourcePath, snapshot, parsed, entryRecords);
|
|
879
|
+
const convertedValues = convertValues(snapshot.sourceSha256, valueWrites, new Set(entryRecords.map((entry) => requireString(entry.id, "converted entry id"))), provenance, losses);
|
|
880
|
+
const records = [...orderEntriesForMainTip([...entryRecords], convertedValues.mainTipId, losses), ...convertedValues.records];
|
|
881
|
+
for (const write of listWrites) losses.push({
|
|
882
|
+
code: "list-not-representable",
|
|
883
|
+
detail: `List ${write.namespace}/${write.key} is not representable in v3`,
|
|
884
|
+
record: write
|
|
885
|
+
});
|
|
886
|
+
const destinationContent = Buffer.from(serializeV3(parsed.header, records));
|
|
887
|
+
const report = {
|
|
888
|
+
version: 1,
|
|
889
|
+
format: "doompi-v4-to-v3-loss-report",
|
|
890
|
+
sourcePath,
|
|
891
|
+
sourceSha256: snapshot.sourceSha256,
|
|
892
|
+
destinationPath,
|
|
893
|
+
losses
|
|
894
|
+
};
|
|
895
|
+
const reportContent = Buffer.from(`${JSON.stringify(report, null, 2)}\n`);
|
|
896
|
+
const stagedPath = `${destinationPath}.${process.pid}.${(0, node_crypto.randomUUID)()}.staging`;
|
|
897
|
+
const reportStagingPath = `${reportPath}.${process.pid}.${(0, node_crypto.randomUUID)()}.staging`;
|
|
898
|
+
let stagedCreated = false;
|
|
899
|
+
let reportStagingCreated = false;
|
|
900
|
+
try {
|
|
901
|
+
writeExclusiveText(stagedPath, destinationContent.toString("utf8"));
|
|
902
|
+
stagedCreated = true;
|
|
903
|
+
writeExclusiveText(reportStagingPath, reportContent.toString("utf8"));
|
|
904
|
+
reportStagingCreated = true;
|
|
905
|
+
} catch (error) {
|
|
906
|
+
if (stagedCreated) removeIfPresent(stagedPath);
|
|
907
|
+
if (reportStagingCreated) removeIfPresent(reportStagingPath);
|
|
908
|
+
throw error;
|
|
909
|
+
}
|
|
910
|
+
const nextState = {
|
|
911
|
+
version: EXPORT_STATE_VERSION,
|
|
912
|
+
operation: EXPORT_OPERATION,
|
|
913
|
+
phase: "staged",
|
|
914
|
+
sourcePath,
|
|
915
|
+
destinationPath,
|
|
916
|
+
reportPath,
|
|
917
|
+
sourceSha256: snapshot.sourceSha256,
|
|
918
|
+
sourceIdentity: snapshot.identity,
|
|
919
|
+
destinationSha256: digest(destinationContent),
|
|
920
|
+
reportSha256: digest(reportContent),
|
|
921
|
+
stagingPath: stagedPath,
|
|
922
|
+
reportStagingPath
|
|
923
|
+
};
|
|
924
|
+
try {
|
|
925
|
+
writeState(statePath, nextState);
|
|
926
|
+
} catch (error) {
|
|
927
|
+
if (stagedCreated) removeIfPresent(stagedPath);
|
|
928
|
+
if (reportStagingCreated) removeIfPresent(reportStagingPath);
|
|
929
|
+
throw error;
|
|
930
|
+
}
|
|
931
|
+
await lease.assertQuiescent();
|
|
932
|
+
assertSourceUnchanged(sourcePath, snapshot);
|
|
933
|
+
publishDistinct(stagedPath, destinationPath, nextState.destinationSha256);
|
|
934
|
+
await lease.assertQuiescent();
|
|
935
|
+
assertSourceUnchanged(sourcePath, snapshot);
|
|
936
|
+
publishDistinct(reportStagingPath, reportPath, nextState.reportSha256);
|
|
937
|
+
await lease.assertQuiescent();
|
|
938
|
+
assertSourceUnchanged(sourcePath, snapshot);
|
|
939
|
+
writeState(statePath, {
|
|
940
|
+
...nextState,
|
|
941
|
+
phase: "published"
|
|
942
|
+
}, nextState);
|
|
943
|
+
return {
|
|
944
|
+
status: "published",
|
|
945
|
+
sourcePath,
|
|
946
|
+
destinationPath,
|
|
947
|
+
reportPath,
|
|
948
|
+
statePath,
|
|
949
|
+
sourceSha256: snapshot.sourceSha256,
|
|
950
|
+
losses
|
|
951
|
+
};
|
|
952
|
+
}
|
|
953
|
+
await lease.assertQuiescent();
|
|
954
|
+
assertSourceUnchanged(sourcePath, snapshot);
|
|
955
|
+
if (!node_fs.default.existsSync(destinationPath)) {
|
|
956
|
+
if (!node_fs.default.existsSync(state.stagingPath)) throw new Error("Interrupted v3 export is missing its staged export");
|
|
957
|
+
publishDistinct(state.stagingPath, destinationPath, state.destinationSha256, true);
|
|
958
|
+
} else if (digest(node_fs.default.readFileSync(destinationPath)) !== state.destinationSha256) throw new Error("Existing v3 export does not match interrupted state");
|
|
959
|
+
await lease.assertQuiescent();
|
|
960
|
+
assertSourceUnchanged(sourcePath, snapshot);
|
|
961
|
+
if (!node_fs.default.existsSync(reportPath)) {
|
|
962
|
+
if (!node_fs.default.existsSync(state.reportStagingPath)) throw new Error("Interrupted v3 export is missing its staged loss report");
|
|
963
|
+
publishDistinct(state.reportStagingPath, reportPath, state.reportSha256, true);
|
|
964
|
+
} else if (digest(node_fs.default.readFileSync(reportPath)) !== state.reportSha256) throw new Error("Existing v3 loss report does not match interrupted state");
|
|
965
|
+
await lease.assertQuiescent();
|
|
966
|
+
assertSourceUnchanged(sourcePath, snapshot);
|
|
967
|
+
writeState(statePath, {
|
|
968
|
+
...state,
|
|
969
|
+
phase: "published"
|
|
970
|
+
}, state);
|
|
971
|
+
const report = JSON.parse(node_fs.default.readFileSync(reportPath, "utf8"));
|
|
972
|
+
return {
|
|
973
|
+
status: "published",
|
|
974
|
+
sourcePath,
|
|
975
|
+
destinationPath,
|
|
976
|
+
reportPath,
|
|
977
|
+
statePath,
|
|
978
|
+
sourceSha256: snapshot.sourceSha256,
|
|
979
|
+
losses: report.losses
|
|
980
|
+
};
|
|
981
|
+
}
|
|
982
|
+
async function exportV4ToV3(options) {
|
|
983
|
+
const sourcePath = node_path.default.resolve(options.sourcePath);
|
|
984
|
+
const destinationPath = node_path.default.resolve(options.destinationPath);
|
|
985
|
+
const reportPath = node_path.default.resolve(options.reportPath ?? `${destinationPath}.loss.json`);
|
|
986
|
+
const statePath = node_path.default.resolve(options.statePath ?? `${destinationPath}.export-state.json`);
|
|
987
|
+
assertDistinctPaths(sourcePath, destinationPath, reportPath, statePath);
|
|
988
|
+
const lease = await options.owner.acquire(sourcePath);
|
|
989
|
+
let result;
|
|
990
|
+
try {
|
|
991
|
+
result = await exportWhileOwned(sourcePath, destinationPath, reportPath, statePath, lease);
|
|
992
|
+
} catch (error) {
|
|
993
|
+
try {
|
|
994
|
+
await lease.release();
|
|
995
|
+
} catch {}
|
|
996
|
+
throw error;
|
|
997
|
+
}
|
|
998
|
+
await lease.release();
|
|
999
|
+
return result;
|
|
1000
|
+
}
|
|
1001
|
+
//#endregion
|
|
1002
|
+
exports.exportV4ToV3 = exportV4ToV3;
|
|
1003
|
+
|
|
1004
|
+
//# sourceMappingURL=v3-export.cjs.map
|