@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,16 @@
|
|
|
1
|
+
import { DoomApi, DoomApiHandler } from "./schemas/packageApi.mjs";
|
|
2
|
+
import "./package-api.mjs";
|
|
3
|
+
import { readContextDetail } from "./context-detail-store.mjs";
|
|
4
|
+
//#region src/server/contextApi.d.ts
|
|
5
|
+
export interface ContextApiOptions {
|
|
6
|
+
/** The session these routes answer for; absent when the host is the hub. */
|
|
7
|
+
sessionId?: string;
|
|
8
|
+
/** Session environment admitted by the host. */
|
|
9
|
+
environment?: Readonly<Record<string, string | undefined>>;
|
|
10
|
+
/** Injectable for tests; defaults to the file the agent writes. */
|
|
11
|
+
readDetail?: typeof readContextDetail;
|
|
12
|
+
}
|
|
13
|
+
export declare function createContextApi(options?: ContextApiOptions): DoomApiHandler;
|
|
14
|
+
export declare const api: DoomApi;
|
|
15
|
+
//#endregion
|
|
16
|
+
//# sourceMappingURL=runtime-context-api.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-context-api.d.mts","names":[],"sources":["../src/server/contextApi.ts"],"mappings":";;;;iBA6BiB;;EAEf;;EAEA,cAAc,SAAS;;EAEvB,oBAAoB;;wBAGN,iBAAiB,UAAS,oBAAyB;qBAgCtD,KAAK"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { API_BASE_PATH, KIND_QUERY_PARAM, NAME_QUERY_PARAM } from "./constants/contextApi.mjs";
|
|
2
|
+
import { findContextItem, readContextDetail } from "./context-detail-store.mjs";
|
|
3
|
+
//#region src/server/contextApi.ts
|
|
4
|
+
/**
|
|
5
|
+
* What one row of the composition actually is, on request.
|
|
6
|
+
*
|
|
7
|
+
* The context panel prices every tool and skill the session carries, and the
|
|
8
|
+
* figure is only half an answer: the reader deciding whether a package earns
|
|
9
|
+
* its thousand tokens wants the prose and the schema behind it. Those are too
|
|
10
|
+
* large to push, and they are wanted one row at a time, so they are served
|
|
11
|
+
* here instead and fetched on the click.
|
|
12
|
+
*
|
|
13
|
+
* The agent writes the store; this reads it. The two are separate processes
|
|
14
|
+
* and the inventory only exists inside the agent, which is the same split
|
|
15
|
+
* every other package-owned API in the repository lives with.
|
|
16
|
+
*/
|
|
17
|
+
function json(body, status) {
|
|
18
|
+
return new Response(JSON.stringify(body), {
|
|
19
|
+
status,
|
|
20
|
+
headers: { "content-type": "application/json; charset=utf-8" }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function isItemKind(value) {
|
|
24
|
+
return value === "tool" || value === "skill";
|
|
25
|
+
}
|
|
26
|
+
function createContextApi(options = {}) {
|
|
27
|
+
const readDetail = options.readDetail ?? readContextDetail;
|
|
28
|
+
return {
|
|
29
|
+
fetch(request) {
|
|
30
|
+
const url = new URL(request.url);
|
|
31
|
+
if (url.pathname !== "/item") return json({ error: "No such route." }, 404);
|
|
32
|
+
if (request.method !== "GET") return json({ error: "Only GET is served here." }, 405);
|
|
33
|
+
if (options.sessionId === void 0) return json({ error: "This host serves no session." }, 404);
|
|
34
|
+
const itemKind = url.searchParams.get(KIND_QUERY_PARAM);
|
|
35
|
+
const name = url.searchParams.get(NAME_QUERY_PARAM);
|
|
36
|
+
if (!isItemKind(itemKind)) return json({ error: "Ask for a tool or a skill." }, 400);
|
|
37
|
+
if (name === null || name === "") return json({ error: "Name the item to describe." }, 400);
|
|
38
|
+
const file = options.readDetail ? options.readDetail(options.sessionId, options.environment) : options.environment === void 0 ? void 0 : readDetail(options.sessionId, options.environment);
|
|
39
|
+
if (file === void 0) return json({ error: "This session has not reported its composition yet." }, 404);
|
|
40
|
+
const item = findContextItem(file, itemKind, name);
|
|
41
|
+
if (item === void 0) return json({ error: `The session carries no ${itemKind} called ${name}.` }, 404);
|
|
42
|
+
return json({
|
|
43
|
+
revision: file.revision,
|
|
44
|
+
item
|
|
45
|
+
}, 200);
|
|
46
|
+
},
|
|
47
|
+
close: () => {}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
const api = {
|
|
51
|
+
basePath: API_BASE_PATH,
|
|
52
|
+
start(context) {
|
|
53
|
+
return createContextApi({
|
|
54
|
+
...context.sessionId === void 0 ? {} : { sessionId: context.sessionId },
|
|
55
|
+
...context.environment === void 0 ? {} : { environment: context.environment }
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
export { api, createContextApi };
|
|
61
|
+
|
|
62
|
+
//# sourceMappingURL=runtime-context-api.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-context-api.mjs","names":[],"sources":["../src/server/contextApi.ts"],"sourcesContent":["import { API_BASE_PATH, ITEM_ROUTE, KIND_QUERY_PARAM, NAME_QUERY_PARAM } from '../constants/contextApi';\nimport type { DoomApi, DoomApiContext, DoomApiHandler } from '../exports/packageApi';\nimport { findContextItem, readContextDetail } from '../services/contextDetailStore';\n\n/**\n * What one row of the composition actually is, on request.\n *\n * The context panel prices every tool and skill the session carries, and the\n * figure is only half an answer: the reader deciding whether a package earns\n * its thousand tokens wants the prose and the schema behind it. Those are too\n * large to push, and they are wanted one row at a time, so they are served\n * here instead and fetched on the click.\n *\n * The agent writes the store; this reads it. The two are separate processes\n * and the inventory only exists inside the agent, which is the same split\n * every other package-owned API in the repository lives with.\n */\n\nfunction json(body: unknown, status: number): Response {\n return new Response(JSON.stringify(body), {\n status,\n headers: { 'content-type': 'application/json; charset=utf-8' },\n });\n}\n\nfunction isItemKind(value: string | null): value is 'tool' | 'skill' {\n return value === 'tool' || value === 'skill';\n}\n\nexport interface ContextApiOptions {\n /** The session these routes answer for; absent when the host is the hub. */\n sessionId?: string;\n /** Session environment admitted by the host. */\n environment?: Readonly<Record<string, string | undefined>>;\n /** Injectable for tests; defaults to the file the agent writes. */\n readDetail?: typeof readContextDetail;\n}\n\nexport function createContextApi(options: ContextApiOptions = {}): DoomApiHandler {\n const readDetail = options.readDetail ?? readContextDetail;\n return {\n fetch(request: Request): Response {\n const url = new URL(request.url);\n if (url.pathname !== ITEM_ROUTE) return json({ error: 'No such route.' }, 404);\n if (request.method !== 'GET') return json({ error: 'Only GET is served here.' }, 405);\n if (options.sessionId === undefined) return json({ error: 'This host serves no session.' }, 404);\n\n const itemKind = url.searchParams.get(KIND_QUERY_PARAM);\n const name = url.searchParams.get(NAME_QUERY_PARAM);\n if (!isItemKind(itemKind)) return json({ error: 'Ask for a tool or a skill.' }, 400);\n if (name === null || name === '') return json({ error: 'Name the item to describe.' }, 400);\n\n const file = options.readDetail\n ? options.readDetail(options.sessionId, options.environment)\n : options.environment === undefined\n ? undefined\n : readDetail(options.sessionId, options.environment);\n // A session that has not published yet is the ordinary state for the\n // first half-second of its life, and says so rather than looking broken.\n if (file === undefined) {\n return json({ error: 'This session has not reported its composition yet.' }, 404);\n }\n const item = findContextItem(file, itemKind, name);\n if (item === undefined) return json({ error: `The session carries no ${itemKind} called ${name}.` }, 404);\n return json({ revision: file.revision, item }, 200);\n },\n close: () => {},\n };\n}\n\nexport const api: DoomApi = {\n basePath: API_BASE_PATH,\n start(context: DoomApiContext): DoomApiHandler {\n return createContextApi({\n ...(context.sessionId === undefined ? {} : { sessionId: context.sessionId }),\n ...(context.environment === undefined ? {} : { environment: context.environment }),\n });\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAkBA,SAAS,KAAK,MAAe,QAA0B;CACrD,OAAO,IAAI,SAAS,KAAK,UAAU,IAAI,GAAG;EACxC;EACA,SAAS,EAAE,gBAAgB,kCAAkC;CAC/D,CAAC;AACH;AAEA,SAAS,WAAW,OAAiD;CACnE,OAAO,UAAU,UAAU,UAAU;AACvC;AAWA,SAAgB,iBAAiB,UAA6B,CAAC,GAAmB;CAChF,MAAM,aAAa,QAAQ,cAAc;CACzC,OAAO;EACL,MAAM,SAA4B;GAChC,MAAM,MAAM,IAAI,IAAI,QAAQ,GAAG;GAC/B,IAAI,IAAI,aAAA,SAAyB,OAAO,KAAK,EAAE,OAAO,iBAAiB,GAAG,GAAG;GAC7E,IAAI,QAAQ,WAAW,OAAO,OAAO,KAAK,EAAE,OAAO,2BAA2B,GAAG,GAAG;GACpF,IAAI,QAAQ,cAAc,KAAA,GAAW,OAAO,KAAK,EAAE,OAAO,+BAA+B,GAAG,GAAG;GAE/F,MAAM,WAAW,IAAI,aAAa,IAAI,gBAAgB;GACtD,MAAM,OAAO,IAAI,aAAa,IAAI,gBAAgB;GAClD,IAAI,CAAC,WAAW,QAAQ,GAAG,OAAO,KAAK,EAAE,OAAO,6BAA6B,GAAG,GAAG;GACnF,IAAI,SAAS,QAAQ,SAAS,IAAI,OAAO,KAAK,EAAE,OAAO,6BAA6B,GAAG,GAAG;GAE1F,MAAM,OAAO,QAAQ,aACjB,QAAQ,WAAW,QAAQ,WAAW,QAAQ,WAAW,IACzD,QAAQ,gBAAgB,KAAA,IACtB,KAAA,IACA,WAAW,QAAQ,WAAW,QAAQ,WAAW;GAGvD,IAAI,SAAS,KAAA,GACX,OAAO,KAAK,EAAE,OAAO,qDAAqD,GAAG,GAAG;GAElF,MAAM,OAAO,gBAAgB,MAAM,UAAU,IAAI;GACjD,IAAI,SAAS,KAAA,GAAW,OAAO,KAAK,EAAE,OAAO,0BAA0B,SAAS,UAAU,KAAK,GAAG,GAAG,GAAG;GACxG,OAAO,KAAK;IAAE,UAAU,KAAK;IAAU;GAAK,GAAG,GAAG;EACpD;EACA,aAAa,CAAC;CAChB;AACF;AAEA,MAAa,MAAe;CAC1B,UAAU;CACV,MAAM,SAAyC;EAC7C,OAAO,iBAAiB;GACtB,GAAI,QAAQ,cAAc,KAAA,IAAY,CAAC,IAAI,EAAE,WAAW,QAAQ,UAAU;GAC1E,GAAI,QAAQ,gBAAgB,KAAA,IAAY,CAAC,IAAI,EAAE,aAAa,QAAQ,YAAY;EAClF,CAAC;CACH;AACF"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_contextContributions = require("./schemas/contextContributions.cjs");
|
|
3
|
+
const require_index = require("./services/contextContributions/index.cjs");
|
|
4
|
+
const require_toolOverrides = require("./schemas/toolOverrides.cjs");
|
|
5
|
+
const require_toolSurface = require("./schemas/toolSurface.cjs");
|
|
6
|
+
const require_index$1 = require("./services/toolOverrides/index.cjs");
|
|
7
|
+
const require_index$2 = require("./services/toolSurface/index.cjs");
|
|
8
|
+
let _deepseek_ai_cordis = require("@deepseek-ai/cordis");
|
|
9
|
+
//#region src/pi/cordisHost.ts
|
|
10
|
+
const DOOM_CORDIS_HOST_ABI_VERSION = 1;
|
|
11
|
+
const DOOM_CORDIS_HOST_QUERY_CHANNEL = "doom:cordis:host:v1:query";
|
|
12
|
+
const DOOM_CORDIS_RUNTIME_SERVICE = "doom/runtime";
|
|
13
|
+
const DOOM_CORDIS_SESSION_SERVICE = "doom/session";
|
|
14
|
+
const HOST_PROTOCOL = "doom.cordis.host";
|
|
15
|
+
const DEFAULT_HOST_SOURCE = "@agimon-ai/doompi/cordis-host";
|
|
16
|
+
function requireDoomCordisSession(context) {
|
|
17
|
+
const session = context.get(DOOM_CORDIS_SESSION_SERVICE);
|
|
18
|
+
if (!session) throw new Error("Doom Cordis session service is unavailable.");
|
|
19
|
+
return session;
|
|
20
|
+
}
|
|
21
|
+
function isRecord(value) {
|
|
22
|
+
return typeof value === "object" && value !== null;
|
|
23
|
+
}
|
|
24
|
+
function asHostQuery(value) {
|
|
25
|
+
if (!isRecord(value)) return void 0;
|
|
26
|
+
if (value.protocol !== HOST_PROTOCOL || value.abiVersion !== 1 || value.kind !== "query" || typeof value.requestId !== "string" || value.requestId.length === 0 || typeof value.source !== "string" || value.source.length === 0 || typeof value.accept !== "function") return;
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
function asHostResponder(value) {
|
|
30
|
+
if (!isRecord(value)) throw new Error("The Doom Cordis host returned an invalid discovery response.");
|
|
31
|
+
if (value.protocol !== HOST_PROTOCOL) throw new Error("The Doom Cordis host returned an invalid protocol identifier.");
|
|
32
|
+
if (value.abiVersion !== 1) throw new Error(`The Doom Cordis host ABI is incompatible: expected ${String(1)}, received ${String(value.abiVersion)}.`);
|
|
33
|
+
if (typeof value.hostId !== "string" || value.hostId.length === 0) throw new Error("The Doom Cordis host returned an invalid host identifier.");
|
|
34
|
+
if (!_deepseek_ai_cordis.Context.is(value.root)) throw new Error("The Doom Cordis host returned a value that is not a Cordis Context.");
|
|
35
|
+
if (!isRecord(value.runtime) || value.runtime.abiVersion !== 1 || value.runtime.hostId !== value.hostId || typeof value.acquire !== "function" || typeof value.shutdown !== "function" || !isRecord(value.ready) || typeof value.ready.then !== "function") throw new Error("The Doom Cordis host returned incomplete runtime metadata.");
|
|
36
|
+
return value;
|
|
37
|
+
}
|
|
38
|
+
function discoverHosts(pi, source) {
|
|
39
|
+
const responses = [];
|
|
40
|
+
const request = {
|
|
41
|
+
protocol: HOST_PROTOCOL,
|
|
42
|
+
abiVersion: 1,
|
|
43
|
+
kind: "query",
|
|
44
|
+
requestId: `${source}:${crypto.randomUUID()}`,
|
|
45
|
+
source,
|
|
46
|
+
accept(response) {
|
|
47
|
+
responses.push(asHostResponder(response));
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
pi.events.emit(DOOM_CORDIS_HOST_QUERY_CHANNEL, request);
|
|
51
|
+
return responses;
|
|
52
|
+
}
|
|
53
|
+
function exactlyOneHost(responses, source) {
|
|
54
|
+
if (responses.length <= 1) return responses[0];
|
|
55
|
+
const hostIds = responses.map(({ hostId }) => hostId).join(", ");
|
|
56
|
+
throw new Error(`Multiple Doom Cordis hosts answered ${source}: ${hostIds}.`);
|
|
57
|
+
}
|
|
58
|
+
function runtimeProvider(ctx, service) {
|
|
59
|
+
ctx.provide(DOOM_CORDIS_RUNTIME_SERVICE, service);
|
|
60
|
+
ctx.provide(require_toolOverrides.DOOM_TOOL_OVERRIDES_SERVICE, require_index$1.createDoomToolOverridesService(service.generation));
|
|
61
|
+
}
|
|
62
|
+
function sessionProvider(ctx, service, pi) {
|
|
63
|
+
ctx.provide(DOOM_CORDIS_SESSION_SERVICE, service);
|
|
64
|
+
ctx.provide(require_contextContributions.DOOM_CONTEXT_CONTRIBUTIONS_SERVICE, require_index.createDoomContextContributionsService(service.generation));
|
|
65
|
+
ctx.provide(require_toolSurface.DOOM_TOOL_SURFACE_SERVICE, require_index$2.createDoomToolSurface({
|
|
66
|
+
generation: service.generation,
|
|
67
|
+
allTools: () => pi.getAllTools().map((tool) => tool.name),
|
|
68
|
+
activeTools: () => pi.getActiveTools(),
|
|
69
|
+
setActiveTools: (names) => pi.setActiveTools(names)
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Installs the sole Cordis application root for one Pi extension runner.
|
|
74
|
+
*
|
|
75
|
+
* The versioned EventBus query is intentional: Pi may hand independently
|
|
76
|
+
* loaded factories different ExtensionAPI wrapper objects, while their event
|
|
77
|
+
* buses still address the same runner.
|
|
78
|
+
*/
|
|
79
|
+
async function installDoomCordisHost(pi, options) {
|
|
80
|
+
const source = options.source ?? DEFAULT_HOST_SOURCE;
|
|
81
|
+
const existing = exactlyOneHost(discoverHosts(pi, source), source);
|
|
82
|
+
if (existing) throw new Error(`A Doom Cordis host is already installed: ${existing.hostId}.`);
|
|
83
|
+
const root = new _deepseek_ai_cordis.Context();
|
|
84
|
+
const runtime = Object.freeze({
|
|
85
|
+
abiVersion: 1,
|
|
86
|
+
hostId: `doom-cordis:${crypto.randomUUID()}`,
|
|
87
|
+
generation: `doom-runtime:${crypto.randomUUID()}`,
|
|
88
|
+
mode: options.mode
|
|
89
|
+
});
|
|
90
|
+
const ready = root.plugin(runtimeProvider, runtime).await().then(() => void 0);
|
|
91
|
+
let sessionFiber;
|
|
92
|
+
let sessionGeneration = 0;
|
|
93
|
+
let sessionQueue = Promise.resolve();
|
|
94
|
+
let leaseCount = 0;
|
|
95
|
+
let shutdownPromise;
|
|
96
|
+
let responder;
|
|
97
|
+
let disposeQuerySubscription = () => void 0;
|
|
98
|
+
const controller = {
|
|
99
|
+
root,
|
|
100
|
+
runtime,
|
|
101
|
+
shutdown() {
|
|
102
|
+
shutdownPromise ??= (async () => {
|
|
103
|
+
disposeQuerySubscription();
|
|
104
|
+
await ready.catch(() => void 0);
|
|
105
|
+
await sessionQueue.catch(() => void 0);
|
|
106
|
+
await sessionFiber?.dispose();
|
|
107
|
+
sessionFiber = void 0;
|
|
108
|
+
await root.fiber.dispose();
|
|
109
|
+
})();
|
|
110
|
+
return shutdownPromise;
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
responder = {
|
|
114
|
+
protocol: HOST_PROTOCOL,
|
|
115
|
+
abiVersion: 1,
|
|
116
|
+
hostId: runtime.hostId,
|
|
117
|
+
root,
|
|
118
|
+
runtime,
|
|
119
|
+
ready,
|
|
120
|
+
acquire() {
|
|
121
|
+
if (shutdownPromise) throw new Error(`The Doom Cordis host is shutting down: ${runtime.hostId}.`);
|
|
122
|
+
leaseCount += 1;
|
|
123
|
+
let released = false;
|
|
124
|
+
return {
|
|
125
|
+
root,
|
|
126
|
+
runtime,
|
|
127
|
+
async dispose() {
|
|
128
|
+
if (released) return;
|
|
129
|
+
released = true;
|
|
130
|
+
leaseCount -= 1;
|
|
131
|
+
if (options.mode === "standalone" && leaseCount === 0) await controller.shutdown();
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
},
|
|
135
|
+
shutdown: () => controller.shutdown()
|
|
136
|
+
};
|
|
137
|
+
try {
|
|
138
|
+
disposeQuerySubscription = pi.events.on(DOOM_CORDIS_HOST_QUERY_CHANNEL, (value) => {
|
|
139
|
+
const query = asHostQuery(value);
|
|
140
|
+
if (query) query.accept(responder);
|
|
141
|
+
});
|
|
142
|
+
pi.on("session_start", (event, context) => {
|
|
143
|
+
sessionQueue = sessionQueue.catch(() => void 0).then(async () => {
|
|
144
|
+
if (shutdownPromise) return;
|
|
145
|
+
await sessionFiber?.dispose();
|
|
146
|
+
sessionGeneration += 1;
|
|
147
|
+
const service = Object.freeze({
|
|
148
|
+
sessionId: context.sessionManager.getSessionId(),
|
|
149
|
+
generation: `${runtime.generation}:${String(sessionGeneration)}`,
|
|
150
|
+
reason: event.reason,
|
|
151
|
+
context
|
|
152
|
+
});
|
|
153
|
+
sessionFiber = root.plugin((ctx, value) => {
|
|
154
|
+
sessionProvider(ctx, value, pi);
|
|
155
|
+
}, service);
|
|
156
|
+
await sessionFiber.await();
|
|
157
|
+
});
|
|
158
|
+
return sessionQueue;
|
|
159
|
+
});
|
|
160
|
+
if (options.mode === "standalone") pi.on("session_shutdown", () => {
|
|
161
|
+
disposeQuerySubscription();
|
|
162
|
+
});
|
|
163
|
+
await ready;
|
|
164
|
+
} catch (error) {
|
|
165
|
+
await controller.shutdown();
|
|
166
|
+
throw error;
|
|
167
|
+
}
|
|
168
|
+
return controller;
|
|
169
|
+
}
|
|
170
|
+
/** Resolves the composed host installed by the canonical runtime. */
|
|
171
|
+
async function connectDoomCordisHost(pi, source) {
|
|
172
|
+
const responder = exactlyOneHost(discoverHosts(pi, source), source);
|
|
173
|
+
if (!responder) throw new Error("The composed Doom Cordis host is unavailable. Ensure cordisHost is the first extension.");
|
|
174
|
+
await responder.ready;
|
|
175
|
+
return responder.acquire();
|
|
176
|
+
}
|
|
177
|
+
/** Ends the host discovered on this runner. Repeated finalization is a no-op. */
|
|
178
|
+
async function finalizeDoomCordisHost(pi, source) {
|
|
179
|
+
await exactlyOneHost(discoverHosts(pi, source), source)?.shutdown();
|
|
180
|
+
}
|
|
181
|
+
//#endregion
|
|
182
|
+
exports.DOOM_CORDIS_HOST_ABI_VERSION = DOOM_CORDIS_HOST_ABI_VERSION;
|
|
183
|
+
exports.DOOM_CORDIS_HOST_QUERY_CHANNEL = DOOM_CORDIS_HOST_QUERY_CHANNEL;
|
|
184
|
+
exports.DOOM_CORDIS_RUNTIME_SERVICE = DOOM_CORDIS_RUNTIME_SERVICE;
|
|
185
|
+
exports.DOOM_CORDIS_SESSION_SERVICE = DOOM_CORDIS_SESSION_SERVICE;
|
|
186
|
+
exports.connectDoomCordisHost = connectDoomCordisHost;
|
|
187
|
+
exports.finalizeDoomCordisHost = finalizeDoomCordisHost;
|
|
188
|
+
exports.installDoomCordisHost = installDoomCordisHost;
|
|
189
|
+
exports.requireDoomCordisSession = requireDoomCordisSession;
|
|
190
|
+
|
|
191
|
+
//# sourceMappingURL=runtime-cordis-host.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-cordis-host.cjs","names":["Context","DOOM_TOOL_OVERRIDES_SERVICE","createDoomToolOverridesService","DOOM_CONTEXT_CONTRIBUTIONS_SERVICE","createDoomContextContributionsService","DOOM_TOOL_SURFACE_SERVICE","createDoomToolSurface"],"sources":["../src/pi/cordisHost.ts"],"sourcesContent":["import { Context, type Fiber } from '@deepseek-ai/cordis';\nimport type { ExtensionAPI, ExtensionContext, SessionStartEvent } from '@earendil-works/pi-coding-agent';\n\nimport { DOOM_CONTEXT_CONTRIBUTIONS_SERVICE } from '../schemas/contextContributions';\nimport { DOOM_TOOL_OVERRIDES_SERVICE } from '../schemas/toolOverrides';\nimport { DOOM_TOOL_SURFACE_SERVICE } from '../schemas/toolSurface';\nimport { createDoomContextContributionsService } from '../services/contextContributions';\nimport { createDoomToolOverridesService } from '../services/toolOverrides';\nimport { createDoomToolSurface } from '../services/toolSurface';\n\nexport const DOOM_CORDIS_HOST_ABI_VERSION = 1 as const;\nexport const DOOM_CORDIS_HOST_QUERY_CHANNEL = 'doom:cordis:host:v1:query';\nexport const DOOM_CORDIS_RUNTIME_SERVICE = 'doom/runtime';\nexport const DOOM_CORDIS_SESSION_SERVICE = 'doom/session';\nconst HOST_PROTOCOL = 'doom.cordis.host';\nconst DEFAULT_HOST_SOURCE = '@agimon-ai/doompi/cordis-host';\n\nexport type DoomCordisHostMode = 'composed' | 'standalone';\n\nexport interface DoomCordisRuntimeService {\n readonly abiVersion: typeof DOOM_CORDIS_HOST_ABI_VERSION;\n readonly hostId: string;\n readonly generation: string;\n readonly mode: DoomCordisHostMode;\n}\n\nexport interface DoomCordisSessionService {\n readonly sessionId: string;\n readonly generation: string;\n readonly reason: SessionStartEvent['reason'];\n readonly context: ExtensionContext;\n}\n\nexport function requireDoomCordisSession(context: Context): DoomCordisSessionService {\n const session = context.get(DOOM_CORDIS_SESSION_SERVICE) as DoomCordisSessionService | undefined;\n if (!session) throw new Error('Doom Cordis session service is unavailable.');\n return session;\n}\n\nexport interface DoomCordisHostConnection {\n readonly root: Context;\n readonly runtime: DoomCordisRuntimeService;\n /** Releases this consumer's lease. It never disposes a composed host. */\n dispose(): Promise<void>;\n}\n\nexport interface DoomCordisHostController {\n readonly root: Context;\n readonly runtime: DoomCordisRuntimeService;\n /** Recursively disposes the session and application plugin tree. */\n shutdown(): Promise<void>;\n}\n\nexport interface InstallDoomCordisHostOptions {\n readonly mode: DoomCordisHostMode;\n readonly source?: string;\n}\n\ndeclare module '@deepseek-ai/cordis' {\n interface Context {\n 'doom/runtime': DoomCordisRuntimeService;\n 'doom/session': DoomCordisSessionService;\n }\n}\n\ninterface HostQuery {\n readonly protocol: typeof HOST_PROTOCOL;\n readonly abiVersion: typeof DOOM_CORDIS_HOST_ABI_VERSION;\n readonly kind: 'query';\n readonly requestId: string;\n readonly source: string;\n readonly accept: (response: unknown) => void;\n}\n\ninterface HostResponder {\n readonly protocol: typeof HOST_PROTOCOL;\n readonly abiVersion: typeof DOOM_CORDIS_HOST_ABI_VERSION;\n readonly hostId: string;\n readonly root: Context;\n readonly runtime: DoomCordisRuntimeService;\n readonly ready: Promise<void>;\n acquire(): DoomCordisHostConnection;\n shutdown(): Promise<void>;\n}\n\nfunction isRecord(value: unknown): value is Record<PropertyKey, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nfunction asHostQuery(value: unknown): HostQuery | undefined {\n if (!isRecord(value)) return undefined;\n if (\n value.protocol !== HOST_PROTOCOL ||\n value.abiVersion !== DOOM_CORDIS_HOST_ABI_VERSION ||\n value.kind !== 'query' ||\n typeof value.requestId !== 'string' ||\n value.requestId.length === 0 ||\n typeof value.source !== 'string' ||\n value.source.length === 0 ||\n typeof value.accept !== 'function'\n ) {\n return undefined;\n }\n return value as unknown as HostQuery;\n}\n\nfunction asHostResponder(value: unknown): HostResponder {\n if (!isRecord(value)) throw new Error('The Doom Cordis host returned an invalid discovery response.');\n if (value.protocol !== HOST_PROTOCOL) {\n throw new Error('The Doom Cordis host returned an invalid protocol identifier.');\n }\n if (value.abiVersion !== DOOM_CORDIS_HOST_ABI_VERSION) {\n throw new Error(\n `The Doom Cordis host ABI is incompatible: expected ${String(DOOM_CORDIS_HOST_ABI_VERSION)}, received ${String(value.abiVersion)}.`,\n );\n }\n if (typeof value.hostId !== 'string' || value.hostId.length === 0) {\n throw new Error('The Doom Cordis host returned an invalid host identifier.');\n }\n if (!Context.is(value.root)) {\n throw new Error('The Doom Cordis host returned a value that is not a Cordis Context.');\n }\n if (\n !isRecord(value.runtime) ||\n value.runtime.abiVersion !== DOOM_CORDIS_HOST_ABI_VERSION ||\n value.runtime.hostId !== value.hostId ||\n typeof value.acquire !== 'function' ||\n typeof value.shutdown !== 'function' ||\n !isRecord(value.ready) ||\n typeof value.ready.then !== 'function'\n ) {\n throw new Error('The Doom Cordis host returned incomplete runtime metadata.');\n }\n return value as unknown as HostResponder;\n}\n\nfunction discoverHosts(pi: Pick<ExtensionAPI, 'events'>, source: string): HostResponder[] {\n const responses: HostResponder[] = [];\n const request: HostQuery = {\n protocol: HOST_PROTOCOL,\n abiVersion: DOOM_CORDIS_HOST_ABI_VERSION,\n kind: 'query',\n requestId: `${source}:${crypto.randomUUID()}`,\n source,\n accept(response) {\n responses.push(asHostResponder(response));\n },\n };\n pi.events.emit(DOOM_CORDIS_HOST_QUERY_CHANNEL, request);\n return responses;\n}\n\nfunction exactlyOneHost(responses: readonly HostResponder[], source: string): HostResponder | undefined {\n if (responses.length <= 1) return responses[0];\n const hostIds = responses.map(({ hostId }) => hostId).join(', ');\n throw new Error(`Multiple Doom Cordis hosts answered ${source}: ${hostIds}.`);\n}\n\nfunction runtimeProvider(ctx: Context, service: DoomCordisRuntimeService): void {\n ctx.provide(DOOM_CORDIS_RUNTIME_SERVICE, service);\n ctx.provide(DOOM_TOOL_OVERRIDES_SERVICE, createDoomToolOverridesService(service.generation));\n}\n\nfunction sessionProvider(ctx: Context, service: DoomCordisSessionService, pi: ExtensionAPI): void {\n ctx.provide(DOOM_CORDIS_SESSION_SERVICE, service);\n ctx.provide(DOOM_CONTEXT_CONTRIBUTIONS_SERVICE, createDoomContextContributionsService(service.generation));\n ctx.provide(\n DOOM_TOOL_SURFACE_SERVICE,\n createDoomToolSurface({\n generation: service.generation,\n allTools: () => pi.getAllTools().map((tool) => tool.name),\n activeTools: () => pi.getActiveTools(),\n setActiveTools: (names) => pi.setActiveTools(names),\n }),\n );\n}\n\n/**\n * Installs the sole Cordis application root for one Pi extension runner.\n *\n * The versioned EventBus query is intentional: Pi may hand independently\n * loaded factories different ExtensionAPI wrapper objects, while their event\n * buses still address the same runner.\n */\nexport async function installDoomCordisHost(\n pi: ExtensionAPI,\n options: InstallDoomCordisHostOptions,\n): Promise<DoomCordisHostController> {\n const source = options.source ?? DEFAULT_HOST_SOURCE;\n const existing = exactlyOneHost(discoverHosts(pi, source), source);\n if (existing) throw new Error(`A Doom Cordis host is already installed: ${existing.hostId}.`);\n\n // This is the one intentional Context constructor for DoomPi extension code.\n const root = new Context();\n const runtime: DoomCordisRuntimeService = Object.freeze({\n abiVersion: DOOM_CORDIS_HOST_ABI_VERSION,\n hostId: `doom-cordis:${crypto.randomUUID()}`,\n generation: `doom-runtime:${crypto.randomUUID()}`,\n mode: options.mode,\n });\n const runtimeFiber = root.plugin(runtimeProvider, runtime);\n const ready = runtimeFiber.await().then(() => undefined);\n let sessionFiber: Fiber | undefined;\n let sessionGeneration = 0;\n let sessionQueue = Promise.resolve();\n let leaseCount = 0;\n let shutdownPromise: Promise<void> | undefined;\n let responder: HostResponder;\n let disposeQuerySubscription = (): void => undefined;\n\n const controller: DoomCordisHostController = {\n root,\n runtime,\n shutdown() {\n shutdownPromise ??= (async () => {\n disposeQuerySubscription();\n await ready.catch(() => undefined);\n await sessionQueue.catch(() => undefined);\n await sessionFiber?.dispose();\n sessionFiber = undefined;\n await root.fiber.dispose();\n })();\n return shutdownPromise;\n },\n };\n\n responder = {\n protocol: HOST_PROTOCOL,\n abiVersion: DOOM_CORDIS_HOST_ABI_VERSION,\n hostId: runtime.hostId,\n root,\n runtime,\n ready,\n acquire() {\n if (shutdownPromise) throw new Error(`The Doom Cordis host is shutting down: ${runtime.hostId}.`);\n leaseCount += 1;\n let released = false;\n return {\n root,\n runtime,\n async dispose() {\n if (released) return;\n released = true;\n leaseCount -= 1;\n if (options.mode === 'standalone' && leaseCount === 0) await controller.shutdown();\n },\n };\n },\n shutdown: () => controller.shutdown(),\n };\n try {\n disposeQuerySubscription = pi.events.on(DOOM_CORDIS_HOST_QUERY_CHANNEL, (value) => {\n const query = asHostQuery(value);\n if (query) query.accept(responder);\n });\n pi.on('session_start', (event, context) => {\n sessionQueue = sessionQueue\n .catch(() => undefined)\n .then(async () => {\n // Pi owns its listener table and can retain this callback across a\n // replacement. A start delivered after finalization belongs to the\n // stale graph and must not revive or fail the next one.\n if (shutdownPromise) return;\n await sessionFiber?.dispose();\n sessionGeneration += 1;\n const service: DoomCordisSessionService = Object.freeze({\n sessionId: context.sessionManager.getSessionId(),\n generation: `${runtime.generation}:${String(sessionGeneration)}`,\n reason: event.reason,\n context,\n });\n sessionFiber = root.plugin((ctx: Context, value: DoomCordisSessionService) => {\n sessionProvider(ctx, value, pi);\n }, service);\n await sessionFiber.await();\n });\n return sessionQueue;\n });\n if (options.mode === 'standalone') {\n pi.on('session_shutdown', () => {\n disposeQuerySubscription();\n });\n }\n await ready;\n } catch (error) {\n await controller.shutdown();\n throw error;\n }\n return controller;\n}\n\n/** Resolves the composed host installed by the canonical runtime. */\nexport async function connectDoomCordisHost(pi: ExtensionAPI, source: string): Promise<DoomCordisHostConnection> {\n const responder = exactlyOneHost(discoverHosts(pi, source), source);\n if (!responder)\n throw new Error('The composed Doom Cordis host is unavailable. Ensure cordisHost is the first extension.');\n await responder.ready;\n return responder.acquire();\n}\n\n/** Ends the host discovered on this runner. Repeated finalization is a no-op. */\nexport async function finalizeDoomCordisHost(pi: Pick<ExtensionAPI, 'events'>, source: string): Promise<void> {\n const responder = exactlyOneHost(discoverHosts(pi, source), source);\n await responder?.shutdown();\n}\n"],"mappings":";;;;;;;;;AAUA,MAAa,+BAA+B;AAC5C,MAAa,iCAAiC;AAC9C,MAAa,8BAA8B;AAC3C,MAAa,8BAA8B;AAC3C,MAAM,gBAAgB;AACtB,MAAM,sBAAsB;AAkB5B,SAAgB,yBAAyB,SAA4C;CACnF,MAAM,UAAU,QAAQ,IAAI,2BAA2B;CACvD,IAAI,CAAC,SAAS,MAAM,IAAI,MAAM,6CAA6C;CAC3E,OAAO;AACT;AAgDA,SAAS,SAAS,OAAuD;CACvE,OAAO,OAAO,UAAU,YAAY,UAAU;AAChD;AAEA,SAAS,YAAY,OAAuC;CAC1D,IAAI,CAAC,SAAS,KAAK,GAAG,OAAO,KAAA;CAC7B,IACE,MAAM,aAAa,iBACnB,MAAM,eAAA,KACN,MAAM,SAAS,WACf,OAAO,MAAM,cAAc,YAC3B,MAAM,UAAU,WAAW,KAC3B,OAAO,MAAM,WAAW,YACxB,MAAM,OAAO,WAAW,KACxB,OAAO,MAAM,WAAW,YAExB;CAEF,OAAO;AACT;AAEA,SAAS,gBAAgB,OAA+B;CACtD,IAAI,CAAC,SAAS,KAAK,GAAG,MAAM,IAAI,MAAM,8DAA8D;CACpG,IAAI,MAAM,aAAa,eACrB,MAAM,IAAI,MAAM,+DAA+D;CAEjF,IAAI,MAAM,eAAA,GACR,MAAM,IAAI,MACR,sDAAsD,OAAA,CAAmC,EAAE,aAAa,OAAO,MAAM,UAAU,EAAE,EACnI;CAEF,IAAI,OAAO,MAAM,WAAW,YAAY,MAAM,OAAO,WAAW,GAC9D,MAAM,IAAI,MAAM,2DAA2D;CAE7E,IAAI,CAACA,oBAAAA,QAAQ,GAAG,MAAM,IAAI,GACxB,MAAM,IAAI,MAAM,qEAAqE;CAEvF,IACE,CAAC,SAAS,MAAM,OAAO,KACvB,MAAM,QAAQ,eAAA,KACd,MAAM,QAAQ,WAAW,MAAM,UAC/B,OAAO,MAAM,YAAY,cACzB,OAAO,MAAM,aAAa,cAC1B,CAAC,SAAS,MAAM,KAAK,KACrB,OAAO,MAAM,MAAM,SAAS,YAE5B,MAAM,IAAI,MAAM,4DAA4D;CAE9E,OAAO;AACT;AAEA,SAAS,cAAc,IAAkC,QAAiC;CACxF,MAAM,YAA6B,CAAC;CACpC,MAAM,UAAqB;EACzB,UAAU;EACV,YAAA;EACA,MAAM;EACN,WAAW,GAAG,OAAO,GAAG,OAAO,WAAW;EAC1C;EACA,OAAO,UAAU;GACf,UAAU,KAAK,gBAAgB,QAAQ,CAAC;EAC1C;CACF;CACA,GAAG,OAAO,KAAK,gCAAgC,OAAO;CACtD,OAAO;AACT;AAEA,SAAS,eAAe,WAAqC,QAA2C;CACtG,IAAI,UAAU,UAAU,GAAG,OAAO,UAAU;CAC5C,MAAM,UAAU,UAAU,KAAK,EAAE,aAAa,MAAM,CAAC,CAAC,KAAK,IAAI;CAC/D,MAAM,IAAI,MAAM,uCAAuC,OAAO,IAAI,QAAQ,EAAE;AAC9E;AAEA,SAAS,gBAAgB,KAAc,SAAyC;CAC9E,IAAI,QAAQ,6BAA6B,OAAO;CAChD,IAAI,QAAQC,sBAAAA,6BAA6BC,gBAAAA,+BAA+B,QAAQ,UAAU,CAAC;AAC7F;AAEA,SAAS,gBAAgB,KAAc,SAAmC,IAAwB;CAChG,IAAI,QAAQ,6BAA6B,OAAO;CAChD,IAAI,QAAQC,6BAAAA,oCAAoCC,cAAAA,sCAAsC,QAAQ,UAAU,CAAC;CACzG,IAAI,QACFC,oBAAAA,2BACAC,gBAAAA,sBAAsB;EACpB,YAAY,QAAQ;EACpB,gBAAgB,GAAG,YAAY,CAAC,CAAC,KAAK,SAAS,KAAK,IAAI;EACxD,mBAAmB,GAAG,eAAe;EACrC,iBAAiB,UAAU,GAAG,eAAe,KAAK;CACpD,CAAC,CACH;AACF;;;;;;;;AASA,eAAsB,sBACpB,IACA,SACmC;CACnC,MAAM,SAAS,QAAQ,UAAU;CACjC,MAAM,WAAW,eAAe,cAAc,IAAI,MAAM,GAAG,MAAM;CACjE,IAAI,UAAU,MAAM,IAAI,MAAM,4CAA4C,SAAS,OAAO,EAAE;CAG5F,MAAM,OAAO,IAAIN,oBAAAA,QAAQ;CACzB,MAAM,UAAoC,OAAO,OAAO;EACtD,YAAA;EACA,QAAQ,eAAe,OAAO,WAAW;EACzC,YAAY,gBAAgB,OAAO,WAAW;EAC9C,MAAM,QAAQ;CAChB,CAAC;CAED,MAAM,QADe,KAAK,OAAO,iBAAiB,OACzB,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,KAAA,CAAS;CACvD,IAAI;CACJ,IAAI,oBAAoB;CACxB,IAAI,eAAe,QAAQ,QAAQ;CACnC,IAAI,aAAa;CACjB,IAAI;CACJ,IAAI;CACJ,IAAI,iCAAuC,KAAA;CAE3C,MAAM,aAAuC;EAC3C;EACA;EACA,WAAW;GACT,qBAAqB,YAAY;IAC/B,yBAAyB;IACzB,MAAM,MAAM,YAAY,KAAA,CAAS;IACjC,MAAM,aAAa,YAAY,KAAA,CAAS;IACxC,MAAM,cAAc,QAAQ;IAC5B,eAAe,KAAA;IACf,MAAM,KAAK,MAAM,QAAQ;GAC3B,EAAA,CAAG;GACH,OAAO;EACT;CACF;CAEA,YAAY;EACV,UAAU;EACV,YAAA;EACA,QAAQ,QAAQ;EAChB;EACA;EACA;EACA,UAAU;GACR,IAAI,iBAAiB,MAAM,IAAI,MAAM,0CAA0C,QAAQ,OAAO,EAAE;GAChG,cAAc;GACd,IAAI,WAAW;GACf,OAAO;IACL;IACA;IACA,MAAM,UAAU;KACd,IAAI,UAAU;KACd,WAAW;KACX,cAAc;KACd,IAAI,QAAQ,SAAS,gBAAgB,eAAe,GAAG,MAAM,WAAW,SAAS;IACnF;GACF;EACF;EACA,gBAAgB,WAAW,SAAS;CACtC;CACA,IAAI;EACF,2BAA2B,GAAG,OAAO,GAAG,iCAAiC,UAAU;GACjF,MAAM,QAAQ,YAAY,KAAK;GAC/B,IAAI,OAAO,MAAM,OAAO,SAAS;EACnC,CAAC;EACD,GAAG,GAAG,kBAAkB,OAAO,YAAY;GACzC,eAAe,aACZ,YAAY,KAAA,CAAS,CAAC,CACtB,KAAK,YAAY;IAIhB,IAAI,iBAAiB;IACrB,MAAM,cAAc,QAAQ;IAC5B,qBAAqB;IACrB,MAAM,UAAoC,OAAO,OAAO;KACtD,WAAW,QAAQ,eAAe,aAAa;KAC/C,YAAY,GAAG,QAAQ,WAAW,GAAG,OAAO,iBAAiB;KAC7D,QAAQ,MAAM;KACd;IACF,CAAC;IACD,eAAe,KAAK,QAAQ,KAAc,UAAoC;KAC5E,gBAAgB,KAAK,OAAO,EAAE;IAChC,GAAG,OAAO;IACV,MAAM,aAAa,MAAM;GAC3B,CAAC;GACH,OAAO;EACT,CAAC;EACD,IAAI,QAAQ,SAAS,cACnB,GAAG,GAAG,0BAA0B;GAC9B,yBAAyB;EAC3B,CAAC;EAEH,MAAM;CACR,SAAS,OAAO;EACd,MAAM,WAAW,SAAS;EAC1B,MAAM;CACR;CACA,OAAO;AACT;;AAGA,eAAsB,sBAAsB,IAAkB,QAAmD;CAC/G,MAAM,YAAY,eAAe,cAAc,IAAI,MAAM,GAAG,MAAM;CAClE,IAAI,CAAC,WACH,MAAM,IAAI,MAAM,yFAAyF;CAC3G,MAAM,UAAU;CAChB,OAAO,UAAU,QAAQ;AAC3B;;AAGA,eAAsB,uBAAuB,IAAkC,QAA+B;CAE5G,MADkB,eAAe,cAAc,IAAI,MAAM,GAAG,MAC9C,CAAC,EAAE,SAAS;AAC5B"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
2
|
+
import { ExtensionAPI, ExtensionContext, SessionStartEvent } from "@earendil-works/pi-coding-agent";
|
|
3
|
+
//#region src/pi/cordisHost.d.ts
|
|
4
|
+
export declare const DOOM_CORDIS_HOST_ABI_VERSION: 1;
|
|
5
|
+
export declare const DOOM_CORDIS_HOST_QUERY_CHANNEL = "doom:cordis:host:v1:query";
|
|
6
|
+
export declare const DOOM_CORDIS_RUNTIME_SERVICE = "doom/runtime";
|
|
7
|
+
export declare const DOOM_CORDIS_SESSION_SERVICE = "doom/session";
|
|
8
|
+
export type DoomCordisHostMode = 'composed' | 'standalone';
|
|
9
|
+
export interface DoomCordisRuntimeService {
|
|
10
|
+
readonly abiVersion: typeof DOOM_CORDIS_HOST_ABI_VERSION;
|
|
11
|
+
readonly hostId: string;
|
|
12
|
+
readonly generation: string;
|
|
13
|
+
readonly mode: DoomCordisHostMode;
|
|
14
|
+
}
|
|
15
|
+
export interface DoomCordisSessionService {
|
|
16
|
+
readonly sessionId: string;
|
|
17
|
+
readonly generation: string;
|
|
18
|
+
readonly reason: SessionStartEvent['reason'];
|
|
19
|
+
readonly context: ExtensionContext;
|
|
20
|
+
}
|
|
21
|
+
export declare function requireDoomCordisSession(context: Context): DoomCordisSessionService;
|
|
22
|
+
export interface DoomCordisHostConnection {
|
|
23
|
+
readonly root: Context;
|
|
24
|
+
readonly runtime: DoomCordisRuntimeService;
|
|
25
|
+
/** Releases this consumer's lease. It never disposes a composed host. */
|
|
26
|
+
dispose(): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
export interface DoomCordisHostController {
|
|
29
|
+
readonly root: Context;
|
|
30
|
+
readonly runtime: DoomCordisRuntimeService;
|
|
31
|
+
/** Recursively disposes the session and application plugin tree. */
|
|
32
|
+
shutdown(): Promise<void>;
|
|
33
|
+
}
|
|
34
|
+
export interface InstallDoomCordisHostOptions {
|
|
35
|
+
readonly mode: DoomCordisHostMode;
|
|
36
|
+
readonly source?: string;
|
|
37
|
+
}
|
|
38
|
+
declare module '@deepseek-ai/cordis' {
|
|
39
|
+
interface Context {
|
|
40
|
+
'doom/runtime': DoomCordisRuntimeService;
|
|
41
|
+
'doom/session': DoomCordisSessionService;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Installs the sole Cordis application root for one Pi extension runner.
|
|
46
|
+
*
|
|
47
|
+
* The versioned EventBus query is intentional: Pi may hand independently
|
|
48
|
+
* loaded factories different ExtensionAPI wrapper objects, while their event
|
|
49
|
+
* buses still address the same runner.
|
|
50
|
+
*/
|
|
51
|
+
export declare function installDoomCordisHost(pi: ExtensionAPI, options: InstallDoomCordisHostOptions): Promise<DoomCordisHostController>;
|
|
52
|
+
/** Resolves the composed host installed by the canonical runtime. */
|
|
53
|
+
export declare function connectDoomCordisHost(pi: ExtensionAPI, source: string): Promise<DoomCordisHostConnection>;
|
|
54
|
+
/** Ends the host discovered on this runner. Repeated finalization is a no-op. */
|
|
55
|
+
export declare function finalizeDoomCordisHost(pi: Pick<ExtensionAPI, 'events'>, source: string): Promise<void>;
|
|
56
|
+
//#endregion
|
|
57
|
+
//# sourceMappingURL=runtime-cordis-host.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-cordis-host.d.cts","names":[],"sources":["../src/pi/cordisHost.ts"],"mappings":";;;qBAUa;qBACA;qBACA;qBACA;YAID;iBAEK;WACN,mBAAmB;WACnB;WACA;WACA,MAAM;;iBAGA;WACN;WACA;WACA,QAAQ;WACR,SAAS;;wBAGJ,yBAAyB,SAAS,UAAU;iBAM3C;WACN,MAAM;WACN,SAAS;;EAElB,WAAW;;iBAGI;WACN,MAAM;WACN,SAAS;;EAElB,YAAY;;iBAGG;WACN,MAAM;WACN;;;YAIC;IACR,gBAAgB;IAChB,gBAAgB;;;;;;;;;;wBA2HE,sBACpB,IAAI,cACJ,SAAS,+BACR,QAAQ;;wBAyGW,sBAAsB,IAAI,cAAc,iBAAiB,QAAQ;;wBASjE,uBAAuB,IAAI,KAAK,yBAAyB,iBAAiB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
2
|
+
import { ExtensionAPI, ExtensionContext, SessionStartEvent } from "@earendil-works/pi-coding-agent";
|
|
3
|
+
//#region src/pi/cordisHost.d.ts
|
|
4
|
+
export declare const DOOM_CORDIS_HOST_ABI_VERSION: 1;
|
|
5
|
+
export declare const DOOM_CORDIS_HOST_QUERY_CHANNEL = "doom:cordis:host:v1:query";
|
|
6
|
+
export declare const DOOM_CORDIS_RUNTIME_SERVICE = "doom/runtime";
|
|
7
|
+
export declare const DOOM_CORDIS_SESSION_SERVICE = "doom/session";
|
|
8
|
+
export type DoomCordisHostMode = 'composed' | 'standalone';
|
|
9
|
+
export interface DoomCordisRuntimeService {
|
|
10
|
+
readonly abiVersion: typeof DOOM_CORDIS_HOST_ABI_VERSION;
|
|
11
|
+
readonly hostId: string;
|
|
12
|
+
readonly generation: string;
|
|
13
|
+
readonly mode: DoomCordisHostMode;
|
|
14
|
+
}
|
|
15
|
+
export interface DoomCordisSessionService {
|
|
16
|
+
readonly sessionId: string;
|
|
17
|
+
readonly generation: string;
|
|
18
|
+
readonly reason: SessionStartEvent['reason'];
|
|
19
|
+
readonly context: ExtensionContext;
|
|
20
|
+
}
|
|
21
|
+
export declare function requireDoomCordisSession(context: Context): DoomCordisSessionService;
|
|
22
|
+
export interface DoomCordisHostConnection {
|
|
23
|
+
readonly root: Context;
|
|
24
|
+
readonly runtime: DoomCordisRuntimeService;
|
|
25
|
+
/** Releases this consumer's lease. It never disposes a composed host. */
|
|
26
|
+
dispose(): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
export interface DoomCordisHostController {
|
|
29
|
+
readonly root: Context;
|
|
30
|
+
readonly runtime: DoomCordisRuntimeService;
|
|
31
|
+
/** Recursively disposes the session and application plugin tree. */
|
|
32
|
+
shutdown(): Promise<void>;
|
|
33
|
+
}
|
|
34
|
+
export interface InstallDoomCordisHostOptions {
|
|
35
|
+
readonly mode: DoomCordisHostMode;
|
|
36
|
+
readonly source?: string;
|
|
37
|
+
}
|
|
38
|
+
declare module '@deepseek-ai/cordis' {
|
|
39
|
+
interface Context {
|
|
40
|
+
'doom/runtime': DoomCordisRuntimeService;
|
|
41
|
+
'doom/session': DoomCordisSessionService;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Installs the sole Cordis application root for one Pi extension runner.
|
|
46
|
+
*
|
|
47
|
+
* The versioned EventBus query is intentional: Pi may hand independently
|
|
48
|
+
* loaded factories different ExtensionAPI wrapper objects, while their event
|
|
49
|
+
* buses still address the same runner.
|
|
50
|
+
*/
|
|
51
|
+
export declare function installDoomCordisHost(pi: ExtensionAPI, options: InstallDoomCordisHostOptions): Promise<DoomCordisHostController>;
|
|
52
|
+
/** Resolves the composed host installed by the canonical runtime. */
|
|
53
|
+
export declare function connectDoomCordisHost(pi: ExtensionAPI, source: string): Promise<DoomCordisHostConnection>;
|
|
54
|
+
/** Ends the host discovered on this runner. Repeated finalization is a no-op. */
|
|
55
|
+
export declare function finalizeDoomCordisHost(pi: Pick<ExtensionAPI, 'events'>, source: string): Promise<void>;
|
|
56
|
+
//#endregion
|
|
57
|
+
//# sourceMappingURL=runtime-cordis-host.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-cordis-host.d.mts","names":[],"sources":["../src/pi/cordisHost.ts"],"mappings":";;;qBAUa;qBACA;qBACA;qBACA;YAID;iBAEK;WACN,mBAAmB;WACnB;WACA;WACA,MAAM;;iBAGA;WACN;WACA;WACA,QAAQ;WACR,SAAS;;wBAGJ,yBAAyB,SAAS,UAAU;iBAM3C;WACN,MAAM;WACN,SAAS;;EAElB,WAAW;;iBAGI;WACN,MAAM;WACN,SAAS;;EAElB,YAAY;;iBAGG;WACN,MAAM;WACN;;;YAIC;IACR,gBAAgB;IAChB,gBAAgB;;;;;;;;;;wBA2HE,sBACpB,IAAI,cACJ,SAAS,+BACR,QAAQ;;wBAyGW,sBAAsB,IAAI,cAAc,iBAAiB,QAAQ;;wBASjE,uBAAuB,IAAI,KAAK,yBAAyB,iBAAiB"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { DOOM_CONTEXT_CONTRIBUTIONS_SERVICE } from "./schemas/contextContributions.mjs";
|
|
2
|
+
import { createDoomContextContributionsService } from "./services/contextContributions/index.mjs";
|
|
3
|
+
import { DOOM_TOOL_OVERRIDES_SERVICE } from "./schemas/toolOverrides.mjs";
|
|
4
|
+
import { DOOM_TOOL_SURFACE_SERVICE } from "./schemas/toolSurface.mjs";
|
|
5
|
+
import { createDoomToolOverridesService } from "./services/toolOverrides/index.mjs";
|
|
6
|
+
import { createDoomToolSurface } from "./services/toolSurface/index.mjs";
|
|
7
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
8
|
+
//#region src/pi/cordisHost.ts
|
|
9
|
+
const DOOM_CORDIS_HOST_ABI_VERSION = 1;
|
|
10
|
+
const DOOM_CORDIS_HOST_QUERY_CHANNEL = "doom:cordis:host:v1:query";
|
|
11
|
+
const DOOM_CORDIS_RUNTIME_SERVICE = "doom/runtime";
|
|
12
|
+
const DOOM_CORDIS_SESSION_SERVICE = "doom/session";
|
|
13
|
+
const HOST_PROTOCOL = "doom.cordis.host";
|
|
14
|
+
const DEFAULT_HOST_SOURCE = "@agimon-ai/doompi/cordis-host";
|
|
15
|
+
function requireDoomCordisSession(context) {
|
|
16
|
+
const session = context.get(DOOM_CORDIS_SESSION_SERVICE);
|
|
17
|
+
if (!session) throw new Error("Doom Cordis session service is unavailable.");
|
|
18
|
+
return session;
|
|
19
|
+
}
|
|
20
|
+
function isRecord(value) {
|
|
21
|
+
return typeof value === "object" && value !== null;
|
|
22
|
+
}
|
|
23
|
+
function asHostQuery(value) {
|
|
24
|
+
if (!isRecord(value)) return void 0;
|
|
25
|
+
if (value.protocol !== HOST_PROTOCOL || value.abiVersion !== 1 || value.kind !== "query" || typeof value.requestId !== "string" || value.requestId.length === 0 || typeof value.source !== "string" || value.source.length === 0 || typeof value.accept !== "function") return;
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
function asHostResponder(value) {
|
|
29
|
+
if (!isRecord(value)) throw new Error("The Doom Cordis host returned an invalid discovery response.");
|
|
30
|
+
if (value.protocol !== HOST_PROTOCOL) throw new Error("The Doom Cordis host returned an invalid protocol identifier.");
|
|
31
|
+
if (value.abiVersion !== 1) throw new Error(`The Doom Cordis host ABI is incompatible: expected ${String(1)}, received ${String(value.abiVersion)}.`);
|
|
32
|
+
if (typeof value.hostId !== "string" || value.hostId.length === 0) throw new Error("The Doom Cordis host returned an invalid host identifier.");
|
|
33
|
+
if (!Context.is(value.root)) throw new Error("The Doom Cordis host returned a value that is not a Cordis Context.");
|
|
34
|
+
if (!isRecord(value.runtime) || value.runtime.abiVersion !== 1 || value.runtime.hostId !== value.hostId || typeof value.acquire !== "function" || typeof value.shutdown !== "function" || !isRecord(value.ready) || typeof value.ready.then !== "function") throw new Error("The Doom Cordis host returned incomplete runtime metadata.");
|
|
35
|
+
return value;
|
|
36
|
+
}
|
|
37
|
+
function discoverHosts(pi, source) {
|
|
38
|
+
const responses = [];
|
|
39
|
+
const request = {
|
|
40
|
+
protocol: HOST_PROTOCOL,
|
|
41
|
+
abiVersion: 1,
|
|
42
|
+
kind: "query",
|
|
43
|
+
requestId: `${source}:${crypto.randomUUID()}`,
|
|
44
|
+
source,
|
|
45
|
+
accept(response) {
|
|
46
|
+
responses.push(asHostResponder(response));
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
pi.events.emit(DOOM_CORDIS_HOST_QUERY_CHANNEL, request);
|
|
50
|
+
return responses;
|
|
51
|
+
}
|
|
52
|
+
function exactlyOneHost(responses, source) {
|
|
53
|
+
if (responses.length <= 1) return responses[0];
|
|
54
|
+
const hostIds = responses.map(({ hostId }) => hostId).join(", ");
|
|
55
|
+
throw new Error(`Multiple Doom Cordis hosts answered ${source}: ${hostIds}.`);
|
|
56
|
+
}
|
|
57
|
+
function runtimeProvider(ctx, service) {
|
|
58
|
+
ctx.provide(DOOM_CORDIS_RUNTIME_SERVICE, service);
|
|
59
|
+
ctx.provide(DOOM_TOOL_OVERRIDES_SERVICE, createDoomToolOverridesService(service.generation));
|
|
60
|
+
}
|
|
61
|
+
function sessionProvider(ctx, service, pi) {
|
|
62
|
+
ctx.provide(DOOM_CORDIS_SESSION_SERVICE, service);
|
|
63
|
+
ctx.provide(DOOM_CONTEXT_CONTRIBUTIONS_SERVICE, createDoomContextContributionsService(service.generation));
|
|
64
|
+
ctx.provide(DOOM_TOOL_SURFACE_SERVICE, createDoomToolSurface({
|
|
65
|
+
generation: service.generation,
|
|
66
|
+
allTools: () => pi.getAllTools().map((tool) => tool.name),
|
|
67
|
+
activeTools: () => pi.getActiveTools(),
|
|
68
|
+
setActiveTools: (names) => pi.setActiveTools(names)
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Installs the sole Cordis application root for one Pi extension runner.
|
|
73
|
+
*
|
|
74
|
+
* The versioned EventBus query is intentional: Pi may hand independently
|
|
75
|
+
* loaded factories different ExtensionAPI wrapper objects, while their event
|
|
76
|
+
* buses still address the same runner.
|
|
77
|
+
*/
|
|
78
|
+
async function installDoomCordisHost(pi, options) {
|
|
79
|
+
const source = options.source ?? DEFAULT_HOST_SOURCE;
|
|
80
|
+
const existing = exactlyOneHost(discoverHosts(pi, source), source);
|
|
81
|
+
if (existing) throw new Error(`A Doom Cordis host is already installed: ${existing.hostId}.`);
|
|
82
|
+
const root = new Context();
|
|
83
|
+
const runtime = Object.freeze({
|
|
84
|
+
abiVersion: 1,
|
|
85
|
+
hostId: `doom-cordis:${crypto.randomUUID()}`,
|
|
86
|
+
generation: `doom-runtime:${crypto.randomUUID()}`,
|
|
87
|
+
mode: options.mode
|
|
88
|
+
});
|
|
89
|
+
const ready = root.plugin(runtimeProvider, runtime).await().then(() => void 0);
|
|
90
|
+
let sessionFiber;
|
|
91
|
+
let sessionGeneration = 0;
|
|
92
|
+
let sessionQueue = Promise.resolve();
|
|
93
|
+
let leaseCount = 0;
|
|
94
|
+
let shutdownPromise;
|
|
95
|
+
let responder;
|
|
96
|
+
let disposeQuerySubscription = () => void 0;
|
|
97
|
+
const controller = {
|
|
98
|
+
root,
|
|
99
|
+
runtime,
|
|
100
|
+
shutdown() {
|
|
101
|
+
shutdownPromise ??= (async () => {
|
|
102
|
+
disposeQuerySubscription();
|
|
103
|
+
await ready.catch(() => void 0);
|
|
104
|
+
await sessionQueue.catch(() => void 0);
|
|
105
|
+
await sessionFiber?.dispose();
|
|
106
|
+
sessionFiber = void 0;
|
|
107
|
+
await root.fiber.dispose();
|
|
108
|
+
})();
|
|
109
|
+
return shutdownPromise;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
responder = {
|
|
113
|
+
protocol: HOST_PROTOCOL,
|
|
114
|
+
abiVersion: 1,
|
|
115
|
+
hostId: runtime.hostId,
|
|
116
|
+
root,
|
|
117
|
+
runtime,
|
|
118
|
+
ready,
|
|
119
|
+
acquire() {
|
|
120
|
+
if (shutdownPromise) throw new Error(`The Doom Cordis host is shutting down: ${runtime.hostId}.`);
|
|
121
|
+
leaseCount += 1;
|
|
122
|
+
let released = false;
|
|
123
|
+
return {
|
|
124
|
+
root,
|
|
125
|
+
runtime,
|
|
126
|
+
async dispose() {
|
|
127
|
+
if (released) return;
|
|
128
|
+
released = true;
|
|
129
|
+
leaseCount -= 1;
|
|
130
|
+
if (options.mode === "standalone" && leaseCount === 0) await controller.shutdown();
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
},
|
|
134
|
+
shutdown: () => controller.shutdown()
|
|
135
|
+
};
|
|
136
|
+
try {
|
|
137
|
+
disposeQuerySubscription = pi.events.on(DOOM_CORDIS_HOST_QUERY_CHANNEL, (value) => {
|
|
138
|
+
const query = asHostQuery(value);
|
|
139
|
+
if (query) query.accept(responder);
|
|
140
|
+
});
|
|
141
|
+
pi.on("session_start", (event, context) => {
|
|
142
|
+
sessionQueue = sessionQueue.catch(() => void 0).then(async () => {
|
|
143
|
+
if (shutdownPromise) return;
|
|
144
|
+
await sessionFiber?.dispose();
|
|
145
|
+
sessionGeneration += 1;
|
|
146
|
+
const service = Object.freeze({
|
|
147
|
+
sessionId: context.sessionManager.getSessionId(),
|
|
148
|
+
generation: `${runtime.generation}:${String(sessionGeneration)}`,
|
|
149
|
+
reason: event.reason,
|
|
150
|
+
context
|
|
151
|
+
});
|
|
152
|
+
sessionFiber = root.plugin((ctx, value) => {
|
|
153
|
+
sessionProvider(ctx, value, pi);
|
|
154
|
+
}, service);
|
|
155
|
+
await sessionFiber.await();
|
|
156
|
+
});
|
|
157
|
+
return sessionQueue;
|
|
158
|
+
});
|
|
159
|
+
if (options.mode === "standalone") pi.on("session_shutdown", () => {
|
|
160
|
+
disposeQuerySubscription();
|
|
161
|
+
});
|
|
162
|
+
await ready;
|
|
163
|
+
} catch (error) {
|
|
164
|
+
await controller.shutdown();
|
|
165
|
+
throw error;
|
|
166
|
+
}
|
|
167
|
+
return controller;
|
|
168
|
+
}
|
|
169
|
+
/** Resolves the composed host installed by the canonical runtime. */
|
|
170
|
+
async function connectDoomCordisHost(pi, source) {
|
|
171
|
+
const responder = exactlyOneHost(discoverHosts(pi, source), source);
|
|
172
|
+
if (!responder) throw new Error("The composed Doom Cordis host is unavailable. Ensure cordisHost is the first extension.");
|
|
173
|
+
await responder.ready;
|
|
174
|
+
return responder.acquire();
|
|
175
|
+
}
|
|
176
|
+
/** Ends the host discovered on this runner. Repeated finalization is a no-op. */
|
|
177
|
+
async function finalizeDoomCordisHost(pi, source) {
|
|
178
|
+
await exactlyOneHost(discoverHosts(pi, source), source)?.shutdown();
|
|
179
|
+
}
|
|
180
|
+
//#endregion
|
|
181
|
+
export { DOOM_CORDIS_HOST_ABI_VERSION, DOOM_CORDIS_HOST_QUERY_CHANNEL, DOOM_CORDIS_RUNTIME_SERVICE, DOOM_CORDIS_SESSION_SERVICE, connectDoomCordisHost, finalizeDoomCordisHost, installDoomCordisHost, requireDoomCordisSession };
|
|
182
|
+
|
|
183
|
+
//# sourceMappingURL=runtime-cordis-host.mjs.map
|