@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,136 @@
|
|
|
1
|
+
const require_voiceReloadHandoff = require("../../constants/voiceReloadHandoff.cjs");
|
|
2
|
+
const require_voiceReloadHandoff$1 = require("../../schemas/voiceReloadHandoff.cjs");
|
|
3
|
+
let typebox_value = require("typebox/value");
|
|
4
|
+
//#region src/services/voiceReloadHandoff/index.ts
|
|
5
|
+
/** The sole exact global allowed for Voice continuity across module reload. */
|
|
6
|
+
const REGISTRY_SYMBOL = Symbol.for(require_voiceReloadHandoff.VOICE_RELOAD_HANDOFF_REGISTRY_KEY);
|
|
7
|
+
var VoiceReloadHandoffError = class extends Error {
|
|
8
|
+
constructor(message) {
|
|
9
|
+
super(message);
|
|
10
|
+
this.name = "VoiceReloadHandoffError";
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
function registry() {
|
|
14
|
+
const globalRegistry = globalThis;
|
|
15
|
+
const existing = globalRegistry[REGISTRY_SYMBOL];
|
|
16
|
+
if (existing) return existing;
|
|
17
|
+
const created = { records: /* @__PURE__ */ new Map() };
|
|
18
|
+
globalRegistry[REGISTRY_SYMBOL] = created;
|
|
19
|
+
return created;
|
|
20
|
+
}
|
|
21
|
+
function validationError(label, schema, value) {
|
|
22
|
+
const [first] = (0, typebox_value.Errors)(schema, value);
|
|
23
|
+
return new VoiceReloadHandoffError(`Invalid ${label}${first ? ` at ${first.instancePath || "/"}: ${first.message}` : ""}.`);
|
|
24
|
+
}
|
|
25
|
+
function validateIdentity(identity) {
|
|
26
|
+
if (!(0, typebox_value.Check)(require_voiceReloadHandoff$1.VoiceReloadHandoffIdentitySchema, identity)) throw validationError("voice reload handoff identity", require_voiceReloadHandoff$1.VoiceReloadHandoffIdentitySchema, identity);
|
|
27
|
+
return {
|
|
28
|
+
sessionId: identity.sessionId,
|
|
29
|
+
hostGeneration: identity.hostGeneration
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function validNow(runtime) {
|
|
33
|
+
const now = runtime.now();
|
|
34
|
+
if (!Number.isInteger(now) || now < 0) throw new VoiceReloadHandoffError("Voice reload handoff clock is invalid.");
|
|
35
|
+
return now;
|
|
36
|
+
}
|
|
37
|
+
function cloneRecord(record) {
|
|
38
|
+
return {
|
|
39
|
+
...record,
|
|
40
|
+
domains: [...record.domains]
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function pruneExpired(now) {
|
|
44
|
+
for (const [token, pending] of registry().records) if (pending.record.expiresAt <= now) registry().records.delete(token);
|
|
45
|
+
}
|
|
46
|
+
function matchesIdentity(record, identity) {
|
|
47
|
+
return record.sessionId === identity.sessionId && record.hostGeneration === identity.hostGeneration;
|
|
48
|
+
}
|
|
49
|
+
/** Creates an accessor over the exact cross-reload registry with explicit time and token dependencies. */
|
|
50
|
+
function createVoiceReloadHandoffStore(runtime) {
|
|
51
|
+
const store = {
|
|
52
|
+
prepare(session, request) {
|
|
53
|
+
const now = validNow(runtime);
|
|
54
|
+
pruneExpired(now);
|
|
55
|
+
if (!session.active) throw new VoiceReloadHandoffError("The voice session is no longer active.");
|
|
56
|
+
const identity = validateIdentity({
|
|
57
|
+
sessionId: session.sessionId,
|
|
58
|
+
hostGeneration: session.hostGeneration
|
|
59
|
+
});
|
|
60
|
+
if (!(0, typebox_value.Check)(require_voiceReloadHandoff$1.VoiceReloadHandoffRequestSchema, request)) throw validationError("voice reload handoff request", require_voiceReloadHandoff$1.VoiceReloadHandoffRequestSchema, request);
|
|
61
|
+
const kind = request.kind ?? "domain-switch";
|
|
62
|
+
const domains = [...request.domains ?? []];
|
|
63
|
+
if (kind === "major-mode-switch" && request.majorMode === void 0) throw new VoiceReloadHandoffError("Major-mode reload handoffs require a major mode.");
|
|
64
|
+
if (kind === "profile-switch" && request.profile === void 0) throw new VoiceReloadHandoffError("Profile reload handoffs require a profile.");
|
|
65
|
+
if (kind === "domain-switch" && request.majorMode !== void 0) throw new VoiceReloadHandoffError("Domain reload handoffs cannot include a major mode.");
|
|
66
|
+
if (kind === "major-mode-switch" && domains.length > 0) throw new VoiceReloadHandoffError("Major-mode reload handoffs cannot include domains.");
|
|
67
|
+
if (kind !== "profile-switch" && request.profile !== void 0) throw new VoiceReloadHandoffError("Only profile reload handoffs can include a profile.");
|
|
68
|
+
if (kind === "profile-switch" && request.majorMode !== void 0) throw new VoiceReloadHandoffError("Profile reload handoffs cannot include a major mode.");
|
|
69
|
+
if (kind === "profile-switch" && domains.length > 0) throw new VoiceReloadHandoffError("Profile reload handoffs cannot include domains.");
|
|
70
|
+
const token = `voice-reload:${runtime.createToken()}`;
|
|
71
|
+
if (token.length > 512 || registry().records.has(token)) throw new VoiceReloadHandoffError("Voice reload handoff token is invalid or already active.");
|
|
72
|
+
const record = {
|
|
73
|
+
token,
|
|
74
|
+
...identity,
|
|
75
|
+
operationId: request.operationId,
|
|
76
|
+
kind,
|
|
77
|
+
domains,
|
|
78
|
+
...request.majorMode === void 0 ? {} : { majorMode: request.majorMode },
|
|
79
|
+
...request.profile === void 0 ? {} : { profile: request.profile },
|
|
80
|
+
createdAt: now,
|
|
81
|
+
expiresAt: now + require_voiceReloadHandoff.VOICE_RELOAD_HANDOFF_TTL_MS
|
|
82
|
+
};
|
|
83
|
+
if (!(0, typebox_value.Check)(require_voiceReloadHandoff$1.VoiceReloadHandoffSchema, record)) throw validationError("voice reload handoff", require_voiceReloadHandoff$1.VoiceReloadHandoffSchema, record);
|
|
84
|
+
registry().records.set(token, {
|
|
85
|
+
record,
|
|
86
|
+
state: "pending"
|
|
87
|
+
});
|
|
88
|
+
let closed = false;
|
|
89
|
+
return Object.freeze({
|
|
90
|
+
token,
|
|
91
|
+
commit() {
|
|
92
|
+
if (closed) return false;
|
|
93
|
+
closed = true;
|
|
94
|
+
return store.commit(token, identity);
|
|
95
|
+
},
|
|
96
|
+
discard() {
|
|
97
|
+
if (closed) return false;
|
|
98
|
+
closed = true;
|
|
99
|
+
return store.discard(token, identity);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
accept(token, identity) {
|
|
104
|
+
pruneExpired(validNow(runtime));
|
|
105
|
+
const validatedIdentity = validateIdentity(identity);
|
|
106
|
+
const pending = registry().records.get(token);
|
|
107
|
+
if (!pending || pending.state !== "pending" || !matchesIdentity(pending.record, validatedIdentity)) return;
|
|
108
|
+
pending.state = "committed";
|
|
109
|
+
return cloneRecord(pending.record);
|
|
110
|
+
},
|
|
111
|
+
commit(token, identity) {
|
|
112
|
+
return store.accept(token, identity) !== void 0;
|
|
113
|
+
},
|
|
114
|
+
discard(token, identity) {
|
|
115
|
+
pruneExpired(validNow(runtime));
|
|
116
|
+
const validatedIdentity = validateIdentity(identity);
|
|
117
|
+
const pending = registry().records.get(token);
|
|
118
|
+
if (!pending || !matchesIdentity(pending.record, validatedIdentity)) return false;
|
|
119
|
+
return registry().records.delete(token);
|
|
120
|
+
},
|
|
121
|
+
consume(sessionId, token) {
|
|
122
|
+
pruneExpired(validNow(runtime));
|
|
123
|
+
if (sessionId.length === 0 || sessionId.length > 256) throw new VoiceReloadHandoffError("Voice reload handoff session id is invalid.");
|
|
124
|
+
const [candidate] = [...registry().records.entries()].filter(([candidateToken, pending]) => pending.state === "committed" && pending.record.sessionId === sessionId && (token === void 0 || candidateToken === token)).sort((left, right) => right[1].record.createdAt - left[1].record.createdAt);
|
|
125
|
+
if (!candidate) return void 0;
|
|
126
|
+
registry().records.delete(candidate[0]);
|
|
127
|
+
return cloneRecord(candidate[1].record);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
return Object.freeze(store);
|
|
131
|
+
}
|
|
132
|
+
//#endregion
|
|
133
|
+
exports.VoiceReloadHandoffError = VoiceReloadHandoffError;
|
|
134
|
+
exports.createVoiceReloadHandoffStore = createVoiceReloadHandoffStore;
|
|
135
|
+
|
|
136
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["VOICE_RELOAD_HANDOFF_REGISTRY_KEY","Errors","Check","VoiceReloadHandoffIdentitySchema","VoiceReloadHandoffRequestSchema","VOICE_RELOAD_HANDOFF_TTL_MS","VoiceReloadHandoffSchema"],"sources":["../../../src/services/voiceReloadHandoff/index.ts"],"sourcesContent":["import { type TSchema } from 'typebox';\nimport { Check, Errors } from 'typebox/value';\n\nimport {\n VOICE_RELOAD_HANDOFF_REGISTRY_KEY,\n VOICE_RELOAD_HANDOFF_TTL_MS,\n MAX_SESSION_ID_LENGTH,\n MAX_TOKEN_LENGTH,\n} from '../../constants/voiceReloadHandoff';\nimport {\n type VoiceReloadHandoffKind,\n VoiceReloadHandoffIdentitySchema,\n type VoiceReloadHandoffIdentity,\n VoiceReloadHandoffRequestSchema,\n VoiceReloadHandoffSchema,\n type VoiceReloadHandoff,\n} from '../../schemas/voiceReloadHandoff';\nimport type { VoiceToolSessionHandle } from '../voiceToolsContract';\n\n/** The sole exact global allowed for Voice continuity across module reload. */\n\nconst REGISTRY_SYMBOL = Symbol.for(VOICE_RELOAD_HANDOFF_REGISTRY_KEY);\n\nexport interface VoiceReloadHandoffRequest {\n readonly operationId: string;\n readonly kind?: VoiceReloadHandoffKind;\n readonly domains?: readonly string[];\n readonly majorMode?: string;\n readonly profile?: string;\n}\n\nexport interface VoiceReloadHandoffHandle {\n readonly token: string;\n commit(): boolean;\n discard(): boolean;\n}\n\nexport interface VoiceReloadHandoffRuntime {\n now(): number;\n createToken(): string;\n}\n\nexport interface VoiceReloadHandoffStore {\n prepare(\n session: Pick<VoiceToolSessionHandle, 'active' | 'hostGeneration' | 'sessionId'>,\n request: VoiceReloadHandoffRequest,\n ): VoiceReloadHandoffHandle;\n accept(token: string, identity: VoiceReloadHandoffIdentity): VoiceReloadHandoff | undefined;\n commit(token: string, identity: VoiceReloadHandoffIdentity): boolean;\n discard(token: string, identity: VoiceReloadHandoffIdentity): boolean;\n /** The replacement generation consumes a committed record by stable session id. */\n consume(sessionId: string, token?: string): VoiceReloadHandoff | undefined;\n}\n\nexport class VoiceReloadHandoffError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'VoiceReloadHandoffError';\n }\n}\n\ninterface PendingHandoff {\n readonly record: VoiceReloadHandoff;\n state: 'pending' | 'committed';\n}\n\ninterface VoiceReloadHandoffRegistry {\n readonly records: Map<string, PendingHandoff>;\n}\n\ninterface VoiceReloadHandoffGlobal {\n [REGISTRY_SYMBOL]?: VoiceReloadHandoffRegistry;\n}\n\nfunction registry(): VoiceReloadHandoffRegistry {\n const globalRegistry = globalThis as VoiceReloadHandoffGlobal;\n const existing = globalRegistry[REGISTRY_SYMBOL];\n if (existing) return existing;\n const created = { records: new Map<string, PendingHandoff>() };\n globalRegistry[REGISTRY_SYMBOL] = created;\n return created;\n}\n\nfunction validationError(label: string, schema: TSchema, value: unknown): VoiceReloadHandoffError {\n const [first] = Errors(schema, value);\n return new VoiceReloadHandoffError(\n `Invalid ${label}${first ? ` at ${first.instancePath || '/'}: ${first.message}` : ''}.`,\n );\n}\n\nfunction validateIdentity(identity: VoiceReloadHandoffIdentity): VoiceReloadHandoffIdentity {\n if (!Check(VoiceReloadHandoffIdentitySchema, identity)) {\n throw validationError('voice reload handoff identity', VoiceReloadHandoffIdentitySchema, identity);\n }\n return { sessionId: identity.sessionId, hostGeneration: identity.hostGeneration };\n}\n\nfunction validNow(runtime: VoiceReloadHandoffRuntime): number {\n const now = runtime.now();\n if (!Number.isInteger(now) || now < 0) throw new VoiceReloadHandoffError('Voice reload handoff clock is invalid.');\n return now;\n}\n\nfunction cloneRecord(record: VoiceReloadHandoff): VoiceReloadHandoff {\n return {\n ...record,\n domains: [...record.domains],\n };\n}\n\nfunction pruneExpired(now: number): void {\n for (const [token, pending] of registry().records) {\n if (pending.record.expiresAt <= now) registry().records.delete(token);\n }\n}\n\nfunction matchesIdentity(record: VoiceReloadHandoff, identity: VoiceReloadHandoffIdentity): boolean {\n return record.sessionId === identity.sessionId && record.hostGeneration === identity.hostGeneration;\n}\n\n/** Creates an accessor over the exact cross-reload registry with explicit time and token dependencies. */\nexport function createVoiceReloadHandoffStore(runtime: VoiceReloadHandoffRuntime): VoiceReloadHandoffStore {\n const store: VoiceReloadHandoffStore = {\n prepare(session, request) {\n const now = validNow(runtime);\n pruneExpired(now);\n if (!session.active) throw new VoiceReloadHandoffError('The voice session is no longer active.');\n const identity = validateIdentity({ sessionId: session.sessionId, hostGeneration: session.hostGeneration });\n if (!Check(VoiceReloadHandoffRequestSchema, request)) {\n throw validationError('voice reload handoff request', VoiceReloadHandoffRequestSchema, request);\n }\n const kind = request.kind ?? 'domain-switch';\n const domains = [...(request.domains ?? [])];\n if (kind === 'major-mode-switch' && request.majorMode === undefined) {\n throw new VoiceReloadHandoffError('Major-mode reload handoffs require a major mode.');\n }\n if (kind === 'profile-switch' && request.profile === undefined) {\n throw new VoiceReloadHandoffError('Profile reload handoffs require a profile.');\n }\n if (kind === 'domain-switch' && request.majorMode !== undefined) {\n throw new VoiceReloadHandoffError('Domain reload handoffs cannot include a major mode.');\n }\n if (kind === 'major-mode-switch' && domains.length > 0) {\n throw new VoiceReloadHandoffError('Major-mode reload handoffs cannot include domains.');\n }\n if (kind !== 'profile-switch' && request.profile !== undefined) {\n throw new VoiceReloadHandoffError('Only profile reload handoffs can include a profile.');\n }\n if (kind === 'profile-switch' && request.majorMode !== undefined) {\n throw new VoiceReloadHandoffError('Profile reload handoffs cannot include a major mode.');\n }\n if (kind === 'profile-switch' && domains.length > 0) {\n throw new VoiceReloadHandoffError('Profile reload handoffs cannot include domains.');\n }\n const token = `voice-reload:${runtime.createToken()}`;\n if (token.length > MAX_TOKEN_LENGTH || registry().records.has(token)) {\n throw new VoiceReloadHandoffError('Voice reload handoff token is invalid or already active.');\n }\n const record: VoiceReloadHandoff = {\n token,\n ...identity,\n operationId: request.operationId,\n kind,\n domains,\n ...(request.majorMode === undefined ? {} : { majorMode: request.majorMode }),\n ...(request.profile === undefined ? {} : { profile: request.profile }),\n createdAt: now,\n expiresAt: now + VOICE_RELOAD_HANDOFF_TTL_MS,\n };\n if (!Check(VoiceReloadHandoffSchema, record)) {\n throw validationError('voice reload handoff', VoiceReloadHandoffSchema, record);\n }\n registry().records.set(token, { record, state: 'pending' });\n let closed = false;\n return Object.freeze({\n token,\n commit() {\n if (closed) return false;\n closed = true;\n return store.commit(token, identity);\n },\n discard() {\n if (closed) return false;\n closed = true;\n return store.discard(token, identity);\n },\n });\n },\n accept(token, identity) {\n const now = validNow(runtime);\n pruneExpired(now);\n const validatedIdentity = validateIdentity(identity);\n const pending = registry().records.get(token);\n if (!pending || pending.state !== 'pending' || !matchesIdentity(pending.record, validatedIdentity)) {\n return undefined;\n }\n pending.state = 'committed';\n return cloneRecord(pending.record);\n },\n commit(token, identity) {\n return store.accept(token, identity) !== undefined;\n },\n discard(token, identity) {\n const now = validNow(runtime);\n pruneExpired(now);\n const validatedIdentity = validateIdentity(identity);\n const pending = registry().records.get(token);\n if (!pending || !matchesIdentity(pending.record, validatedIdentity)) return false;\n return registry().records.delete(token);\n },\n consume(sessionId, token) {\n const now = validNow(runtime);\n pruneExpired(now);\n if (sessionId.length === 0 || sessionId.length > MAX_SESSION_ID_LENGTH) {\n throw new VoiceReloadHandoffError('Voice reload handoff session id is invalid.');\n }\n const candidates = [...registry().records.entries()]\n .filter(\n ([candidateToken, pending]) =>\n pending.state === 'committed' &&\n pending.record.sessionId === sessionId &&\n (token === undefined || candidateToken === token),\n )\n .sort((left, right) => right[1].record.createdAt - left[1].record.createdAt);\n const [candidate] = candidates;\n if (!candidate) return undefined;\n registry().records.delete(candidate[0]);\n return cloneRecord(candidate[1].record);\n },\n };\n return Object.freeze(store);\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { VoiceReloadHandoff, VoiceReloadHandoffIdentity, VoiceReloadHandoffKind } from "../../schemas/voiceReloadHandoff.cjs";
|
|
2
|
+
import { VoiceToolSessionHandle } from "../voiceToolsContract/index.cjs";
|
|
3
|
+
//#region src/services/voiceReloadHandoff/index.d.ts
|
|
4
|
+
export interface VoiceReloadHandoffRequest {
|
|
5
|
+
readonly operationId: string;
|
|
6
|
+
readonly kind?: VoiceReloadHandoffKind;
|
|
7
|
+
readonly domains?: readonly string[];
|
|
8
|
+
readonly majorMode?: string;
|
|
9
|
+
readonly profile?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface VoiceReloadHandoffHandle {
|
|
12
|
+
readonly token: string;
|
|
13
|
+
commit(): boolean;
|
|
14
|
+
discard(): boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface VoiceReloadHandoffRuntime {
|
|
17
|
+
now(): number;
|
|
18
|
+
createToken(): string;
|
|
19
|
+
}
|
|
20
|
+
export interface VoiceReloadHandoffStore {
|
|
21
|
+
prepare(session: Pick<VoiceToolSessionHandle, 'active' | 'hostGeneration' | 'sessionId'>, request: VoiceReloadHandoffRequest): VoiceReloadHandoffHandle;
|
|
22
|
+
accept(token: string, identity: VoiceReloadHandoffIdentity): VoiceReloadHandoff | undefined;
|
|
23
|
+
commit(token: string, identity: VoiceReloadHandoffIdentity): boolean;
|
|
24
|
+
discard(token: string, identity: VoiceReloadHandoffIdentity): boolean;
|
|
25
|
+
/** The replacement generation consumes a committed record by stable session id. */
|
|
26
|
+
consume(sessionId: string, token?: string): VoiceReloadHandoff | undefined;
|
|
27
|
+
}
|
|
28
|
+
export declare class VoiceReloadHandoffError extends Error {
|
|
29
|
+
constructor(message: string);
|
|
30
|
+
}
|
|
31
|
+
/** Creates an accessor over the exact cross-reload registry with explicit time and token dependencies. */
|
|
32
|
+
export declare function createVoiceReloadHandoffStore(runtime: VoiceReloadHandoffRuntime): VoiceReloadHandoffStore;
|
|
33
|
+
//#endregion
|
|
34
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/services/voiceReloadHandoff/index.ts"],"mappings":";;;iBAuBiB;WACN;WACA,OAAO;WACP;WACA;WACA;;iBAGM;WACN;EACT;EACA;;iBAGe;EACf;EACA;;iBAGe;EACf,QACE,SAAS,KAAK,oEACd,SAAS,4BACR;EACH,OAAO,eAAe,UAAU,6BAA6B;EAC7D,OAAO,eAAe,UAAU;EAChC,QAAQ,eAAe,UAAU;;EAEjC,QAAQ,mBAAmB,iBAAiB;;qBAGjC,gCAAgC;EAC3C,YAAY;;;wBAkEE,8BAA8B,SAAS,4BAA4B"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { VoiceReloadHandoff, VoiceReloadHandoffIdentity, VoiceReloadHandoffKind } from "../../schemas/voiceReloadHandoff.mjs";
|
|
2
|
+
import { VoiceToolSessionHandle } from "../voiceToolsContract/index.mjs";
|
|
3
|
+
//#region src/services/voiceReloadHandoff/index.d.ts
|
|
4
|
+
export interface VoiceReloadHandoffRequest {
|
|
5
|
+
readonly operationId: string;
|
|
6
|
+
readonly kind?: VoiceReloadHandoffKind;
|
|
7
|
+
readonly domains?: readonly string[];
|
|
8
|
+
readonly majorMode?: string;
|
|
9
|
+
readonly profile?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface VoiceReloadHandoffHandle {
|
|
12
|
+
readonly token: string;
|
|
13
|
+
commit(): boolean;
|
|
14
|
+
discard(): boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface VoiceReloadHandoffRuntime {
|
|
17
|
+
now(): number;
|
|
18
|
+
createToken(): string;
|
|
19
|
+
}
|
|
20
|
+
export interface VoiceReloadHandoffStore {
|
|
21
|
+
prepare(session: Pick<VoiceToolSessionHandle, 'active' | 'hostGeneration' | 'sessionId'>, request: VoiceReloadHandoffRequest): VoiceReloadHandoffHandle;
|
|
22
|
+
accept(token: string, identity: VoiceReloadHandoffIdentity): VoiceReloadHandoff | undefined;
|
|
23
|
+
commit(token: string, identity: VoiceReloadHandoffIdentity): boolean;
|
|
24
|
+
discard(token: string, identity: VoiceReloadHandoffIdentity): boolean;
|
|
25
|
+
/** The replacement generation consumes a committed record by stable session id. */
|
|
26
|
+
consume(sessionId: string, token?: string): VoiceReloadHandoff | undefined;
|
|
27
|
+
}
|
|
28
|
+
export declare class VoiceReloadHandoffError extends Error {
|
|
29
|
+
constructor(message: string);
|
|
30
|
+
}
|
|
31
|
+
/** Creates an accessor over the exact cross-reload registry with explicit time and token dependencies. */
|
|
32
|
+
export declare function createVoiceReloadHandoffStore(runtime: VoiceReloadHandoffRuntime): VoiceReloadHandoffStore;
|
|
33
|
+
//#endregion
|
|
34
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/services/voiceReloadHandoff/index.ts"],"mappings":";;;iBAuBiB;WACN;WACA,OAAO;WACP;WACA;WACA;;iBAGM;WACN;EACT;EACA;;iBAGe;EACf;EACA;;iBAGe;EACf,QACE,SAAS,KAAK,oEACd,SAAS,4BACR;EACH,OAAO,eAAe,UAAU,6BAA6B;EAC7D,OAAO,eAAe,UAAU;EAChC,QAAQ,eAAe,UAAU;;EAEjC,QAAQ,mBAAmB,iBAAiB;;qBAGjC,gCAAgC;EAC3C,YAAY;;;wBAkEE,8BAA8B,SAAS,4BAA4B"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { VOICE_RELOAD_HANDOFF_REGISTRY_KEY, VOICE_RELOAD_HANDOFF_TTL_MS } from "../../constants/voiceReloadHandoff.mjs";
|
|
2
|
+
import { VoiceReloadHandoffIdentitySchema, VoiceReloadHandoffRequestSchema, VoiceReloadHandoffSchema } from "../../schemas/voiceReloadHandoff.mjs";
|
|
3
|
+
import { Check, Errors } from "typebox/value";
|
|
4
|
+
//#region src/services/voiceReloadHandoff/index.ts
|
|
5
|
+
/** The sole exact global allowed for Voice continuity across module reload. */
|
|
6
|
+
const REGISTRY_SYMBOL = Symbol.for(VOICE_RELOAD_HANDOFF_REGISTRY_KEY);
|
|
7
|
+
var VoiceReloadHandoffError = class extends Error {
|
|
8
|
+
constructor(message) {
|
|
9
|
+
super(message);
|
|
10
|
+
this.name = "VoiceReloadHandoffError";
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
function registry() {
|
|
14
|
+
const globalRegistry = globalThis;
|
|
15
|
+
const existing = globalRegistry[REGISTRY_SYMBOL];
|
|
16
|
+
if (existing) return existing;
|
|
17
|
+
const created = { records: /* @__PURE__ */ new Map() };
|
|
18
|
+
globalRegistry[REGISTRY_SYMBOL] = created;
|
|
19
|
+
return created;
|
|
20
|
+
}
|
|
21
|
+
function validationError(label, schema, value) {
|
|
22
|
+
const [first] = Errors(schema, value);
|
|
23
|
+
return new VoiceReloadHandoffError(`Invalid ${label}${first ? ` at ${first.instancePath || "/"}: ${first.message}` : ""}.`);
|
|
24
|
+
}
|
|
25
|
+
function validateIdentity(identity) {
|
|
26
|
+
if (!Check(VoiceReloadHandoffIdentitySchema, identity)) throw validationError("voice reload handoff identity", VoiceReloadHandoffIdentitySchema, identity);
|
|
27
|
+
return {
|
|
28
|
+
sessionId: identity.sessionId,
|
|
29
|
+
hostGeneration: identity.hostGeneration
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function validNow(runtime) {
|
|
33
|
+
const now = runtime.now();
|
|
34
|
+
if (!Number.isInteger(now) || now < 0) throw new VoiceReloadHandoffError("Voice reload handoff clock is invalid.");
|
|
35
|
+
return now;
|
|
36
|
+
}
|
|
37
|
+
function cloneRecord(record) {
|
|
38
|
+
return {
|
|
39
|
+
...record,
|
|
40
|
+
domains: [...record.domains]
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function pruneExpired(now) {
|
|
44
|
+
for (const [token, pending] of registry().records) if (pending.record.expiresAt <= now) registry().records.delete(token);
|
|
45
|
+
}
|
|
46
|
+
function matchesIdentity(record, identity) {
|
|
47
|
+
return record.sessionId === identity.sessionId && record.hostGeneration === identity.hostGeneration;
|
|
48
|
+
}
|
|
49
|
+
/** Creates an accessor over the exact cross-reload registry with explicit time and token dependencies. */
|
|
50
|
+
function createVoiceReloadHandoffStore(runtime) {
|
|
51
|
+
const store = {
|
|
52
|
+
prepare(session, request) {
|
|
53
|
+
const now = validNow(runtime);
|
|
54
|
+
pruneExpired(now);
|
|
55
|
+
if (!session.active) throw new VoiceReloadHandoffError("The voice session is no longer active.");
|
|
56
|
+
const identity = validateIdentity({
|
|
57
|
+
sessionId: session.sessionId,
|
|
58
|
+
hostGeneration: session.hostGeneration
|
|
59
|
+
});
|
|
60
|
+
if (!Check(VoiceReloadHandoffRequestSchema, request)) throw validationError("voice reload handoff request", VoiceReloadHandoffRequestSchema, request);
|
|
61
|
+
const kind = request.kind ?? "domain-switch";
|
|
62
|
+
const domains = [...request.domains ?? []];
|
|
63
|
+
if (kind === "major-mode-switch" && request.majorMode === void 0) throw new VoiceReloadHandoffError("Major-mode reload handoffs require a major mode.");
|
|
64
|
+
if (kind === "profile-switch" && request.profile === void 0) throw new VoiceReloadHandoffError("Profile reload handoffs require a profile.");
|
|
65
|
+
if (kind === "domain-switch" && request.majorMode !== void 0) throw new VoiceReloadHandoffError("Domain reload handoffs cannot include a major mode.");
|
|
66
|
+
if (kind === "major-mode-switch" && domains.length > 0) throw new VoiceReloadHandoffError("Major-mode reload handoffs cannot include domains.");
|
|
67
|
+
if (kind !== "profile-switch" && request.profile !== void 0) throw new VoiceReloadHandoffError("Only profile reload handoffs can include a profile.");
|
|
68
|
+
if (kind === "profile-switch" && request.majorMode !== void 0) throw new VoiceReloadHandoffError("Profile reload handoffs cannot include a major mode.");
|
|
69
|
+
if (kind === "profile-switch" && domains.length > 0) throw new VoiceReloadHandoffError("Profile reload handoffs cannot include domains.");
|
|
70
|
+
const token = `voice-reload:${runtime.createToken()}`;
|
|
71
|
+
if (token.length > 512 || registry().records.has(token)) throw new VoiceReloadHandoffError("Voice reload handoff token is invalid or already active.");
|
|
72
|
+
const record = {
|
|
73
|
+
token,
|
|
74
|
+
...identity,
|
|
75
|
+
operationId: request.operationId,
|
|
76
|
+
kind,
|
|
77
|
+
domains,
|
|
78
|
+
...request.majorMode === void 0 ? {} : { majorMode: request.majorMode },
|
|
79
|
+
...request.profile === void 0 ? {} : { profile: request.profile },
|
|
80
|
+
createdAt: now,
|
|
81
|
+
expiresAt: now + VOICE_RELOAD_HANDOFF_TTL_MS
|
|
82
|
+
};
|
|
83
|
+
if (!Check(VoiceReloadHandoffSchema, record)) throw validationError("voice reload handoff", VoiceReloadHandoffSchema, record);
|
|
84
|
+
registry().records.set(token, {
|
|
85
|
+
record,
|
|
86
|
+
state: "pending"
|
|
87
|
+
});
|
|
88
|
+
let closed = false;
|
|
89
|
+
return Object.freeze({
|
|
90
|
+
token,
|
|
91
|
+
commit() {
|
|
92
|
+
if (closed) return false;
|
|
93
|
+
closed = true;
|
|
94
|
+
return store.commit(token, identity);
|
|
95
|
+
},
|
|
96
|
+
discard() {
|
|
97
|
+
if (closed) return false;
|
|
98
|
+
closed = true;
|
|
99
|
+
return store.discard(token, identity);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
accept(token, identity) {
|
|
104
|
+
pruneExpired(validNow(runtime));
|
|
105
|
+
const validatedIdentity = validateIdentity(identity);
|
|
106
|
+
const pending = registry().records.get(token);
|
|
107
|
+
if (!pending || pending.state !== "pending" || !matchesIdentity(pending.record, validatedIdentity)) return;
|
|
108
|
+
pending.state = "committed";
|
|
109
|
+
return cloneRecord(pending.record);
|
|
110
|
+
},
|
|
111
|
+
commit(token, identity) {
|
|
112
|
+
return store.accept(token, identity) !== void 0;
|
|
113
|
+
},
|
|
114
|
+
discard(token, identity) {
|
|
115
|
+
pruneExpired(validNow(runtime));
|
|
116
|
+
const validatedIdentity = validateIdentity(identity);
|
|
117
|
+
const pending = registry().records.get(token);
|
|
118
|
+
if (!pending || !matchesIdentity(pending.record, validatedIdentity)) return false;
|
|
119
|
+
return registry().records.delete(token);
|
|
120
|
+
},
|
|
121
|
+
consume(sessionId, token) {
|
|
122
|
+
pruneExpired(validNow(runtime));
|
|
123
|
+
if (sessionId.length === 0 || sessionId.length > 256) throw new VoiceReloadHandoffError("Voice reload handoff session id is invalid.");
|
|
124
|
+
const [candidate] = [...registry().records.entries()].filter(([candidateToken, pending]) => pending.state === "committed" && pending.record.sessionId === sessionId && (token === void 0 || candidateToken === token)).sort((left, right) => right[1].record.createdAt - left[1].record.createdAt);
|
|
125
|
+
if (!candidate) return void 0;
|
|
126
|
+
registry().records.delete(candidate[0]);
|
|
127
|
+
return cloneRecord(candidate[1].record);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
return Object.freeze(store);
|
|
131
|
+
}
|
|
132
|
+
//#endregion
|
|
133
|
+
export { VoiceReloadHandoffError, createVoiceReloadHandoffStore };
|
|
134
|
+
|
|
135
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/services/voiceReloadHandoff/index.ts"],"sourcesContent":["import { type TSchema } from 'typebox';\nimport { Check, Errors } from 'typebox/value';\n\nimport {\n VOICE_RELOAD_HANDOFF_REGISTRY_KEY,\n VOICE_RELOAD_HANDOFF_TTL_MS,\n MAX_SESSION_ID_LENGTH,\n MAX_TOKEN_LENGTH,\n} from '../../constants/voiceReloadHandoff';\nimport {\n type VoiceReloadHandoffKind,\n VoiceReloadHandoffIdentitySchema,\n type VoiceReloadHandoffIdentity,\n VoiceReloadHandoffRequestSchema,\n VoiceReloadHandoffSchema,\n type VoiceReloadHandoff,\n} from '../../schemas/voiceReloadHandoff';\nimport type { VoiceToolSessionHandle } from '../voiceToolsContract';\n\n/** The sole exact global allowed for Voice continuity across module reload. */\n\nconst REGISTRY_SYMBOL = Symbol.for(VOICE_RELOAD_HANDOFF_REGISTRY_KEY);\n\nexport interface VoiceReloadHandoffRequest {\n readonly operationId: string;\n readonly kind?: VoiceReloadHandoffKind;\n readonly domains?: readonly string[];\n readonly majorMode?: string;\n readonly profile?: string;\n}\n\nexport interface VoiceReloadHandoffHandle {\n readonly token: string;\n commit(): boolean;\n discard(): boolean;\n}\n\nexport interface VoiceReloadHandoffRuntime {\n now(): number;\n createToken(): string;\n}\n\nexport interface VoiceReloadHandoffStore {\n prepare(\n session: Pick<VoiceToolSessionHandle, 'active' | 'hostGeneration' | 'sessionId'>,\n request: VoiceReloadHandoffRequest,\n ): VoiceReloadHandoffHandle;\n accept(token: string, identity: VoiceReloadHandoffIdentity): VoiceReloadHandoff | undefined;\n commit(token: string, identity: VoiceReloadHandoffIdentity): boolean;\n discard(token: string, identity: VoiceReloadHandoffIdentity): boolean;\n /** The replacement generation consumes a committed record by stable session id. */\n consume(sessionId: string, token?: string): VoiceReloadHandoff | undefined;\n}\n\nexport class VoiceReloadHandoffError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'VoiceReloadHandoffError';\n }\n}\n\ninterface PendingHandoff {\n readonly record: VoiceReloadHandoff;\n state: 'pending' | 'committed';\n}\n\ninterface VoiceReloadHandoffRegistry {\n readonly records: Map<string, PendingHandoff>;\n}\n\ninterface VoiceReloadHandoffGlobal {\n [REGISTRY_SYMBOL]?: VoiceReloadHandoffRegistry;\n}\n\nfunction registry(): VoiceReloadHandoffRegistry {\n const globalRegistry = globalThis as VoiceReloadHandoffGlobal;\n const existing = globalRegistry[REGISTRY_SYMBOL];\n if (existing) return existing;\n const created = { records: new Map<string, PendingHandoff>() };\n globalRegistry[REGISTRY_SYMBOL] = created;\n return created;\n}\n\nfunction validationError(label: string, schema: TSchema, value: unknown): VoiceReloadHandoffError {\n const [first] = Errors(schema, value);\n return new VoiceReloadHandoffError(\n `Invalid ${label}${first ? ` at ${first.instancePath || '/'}: ${first.message}` : ''}.`,\n );\n}\n\nfunction validateIdentity(identity: VoiceReloadHandoffIdentity): VoiceReloadHandoffIdentity {\n if (!Check(VoiceReloadHandoffIdentitySchema, identity)) {\n throw validationError('voice reload handoff identity', VoiceReloadHandoffIdentitySchema, identity);\n }\n return { sessionId: identity.sessionId, hostGeneration: identity.hostGeneration };\n}\n\nfunction validNow(runtime: VoiceReloadHandoffRuntime): number {\n const now = runtime.now();\n if (!Number.isInteger(now) || now < 0) throw new VoiceReloadHandoffError('Voice reload handoff clock is invalid.');\n return now;\n}\n\nfunction cloneRecord(record: VoiceReloadHandoff): VoiceReloadHandoff {\n return {\n ...record,\n domains: [...record.domains],\n };\n}\n\nfunction pruneExpired(now: number): void {\n for (const [token, pending] of registry().records) {\n if (pending.record.expiresAt <= now) registry().records.delete(token);\n }\n}\n\nfunction matchesIdentity(record: VoiceReloadHandoff, identity: VoiceReloadHandoffIdentity): boolean {\n return record.sessionId === identity.sessionId && record.hostGeneration === identity.hostGeneration;\n}\n\n/** Creates an accessor over the exact cross-reload registry with explicit time and token dependencies. */\nexport function createVoiceReloadHandoffStore(runtime: VoiceReloadHandoffRuntime): VoiceReloadHandoffStore {\n const store: VoiceReloadHandoffStore = {\n prepare(session, request) {\n const now = validNow(runtime);\n pruneExpired(now);\n if (!session.active) throw new VoiceReloadHandoffError('The voice session is no longer active.');\n const identity = validateIdentity({ sessionId: session.sessionId, hostGeneration: session.hostGeneration });\n if (!Check(VoiceReloadHandoffRequestSchema, request)) {\n throw validationError('voice reload handoff request', VoiceReloadHandoffRequestSchema, request);\n }\n const kind = request.kind ?? 'domain-switch';\n const domains = [...(request.domains ?? [])];\n if (kind === 'major-mode-switch' && request.majorMode === undefined) {\n throw new VoiceReloadHandoffError('Major-mode reload handoffs require a major mode.');\n }\n if (kind === 'profile-switch' && request.profile === undefined) {\n throw new VoiceReloadHandoffError('Profile reload handoffs require a profile.');\n }\n if (kind === 'domain-switch' && request.majorMode !== undefined) {\n throw new VoiceReloadHandoffError('Domain reload handoffs cannot include a major mode.');\n }\n if (kind === 'major-mode-switch' && domains.length > 0) {\n throw new VoiceReloadHandoffError('Major-mode reload handoffs cannot include domains.');\n }\n if (kind !== 'profile-switch' && request.profile !== undefined) {\n throw new VoiceReloadHandoffError('Only profile reload handoffs can include a profile.');\n }\n if (kind === 'profile-switch' && request.majorMode !== undefined) {\n throw new VoiceReloadHandoffError('Profile reload handoffs cannot include a major mode.');\n }\n if (kind === 'profile-switch' && domains.length > 0) {\n throw new VoiceReloadHandoffError('Profile reload handoffs cannot include domains.');\n }\n const token = `voice-reload:${runtime.createToken()}`;\n if (token.length > MAX_TOKEN_LENGTH || registry().records.has(token)) {\n throw new VoiceReloadHandoffError('Voice reload handoff token is invalid or already active.');\n }\n const record: VoiceReloadHandoff = {\n token,\n ...identity,\n operationId: request.operationId,\n kind,\n domains,\n ...(request.majorMode === undefined ? {} : { majorMode: request.majorMode }),\n ...(request.profile === undefined ? {} : { profile: request.profile }),\n createdAt: now,\n expiresAt: now + VOICE_RELOAD_HANDOFF_TTL_MS,\n };\n if (!Check(VoiceReloadHandoffSchema, record)) {\n throw validationError('voice reload handoff', VoiceReloadHandoffSchema, record);\n }\n registry().records.set(token, { record, state: 'pending' });\n let closed = false;\n return Object.freeze({\n token,\n commit() {\n if (closed) return false;\n closed = true;\n return store.commit(token, identity);\n },\n discard() {\n if (closed) return false;\n closed = true;\n return store.discard(token, identity);\n },\n });\n },\n accept(token, identity) {\n const now = validNow(runtime);\n pruneExpired(now);\n const validatedIdentity = validateIdentity(identity);\n const pending = registry().records.get(token);\n if (!pending || pending.state !== 'pending' || !matchesIdentity(pending.record, validatedIdentity)) {\n return undefined;\n }\n pending.state = 'committed';\n return cloneRecord(pending.record);\n },\n commit(token, identity) {\n return store.accept(token, identity) !== undefined;\n },\n discard(token, identity) {\n const now = validNow(runtime);\n pruneExpired(now);\n const validatedIdentity = validateIdentity(identity);\n const pending = registry().records.get(token);\n if (!pending || !matchesIdentity(pending.record, validatedIdentity)) return false;\n return registry().records.delete(token);\n },\n consume(sessionId, token) {\n const now = validNow(runtime);\n pruneExpired(now);\n if (sessionId.length === 0 || sessionId.length > MAX_SESSION_ID_LENGTH) {\n throw new VoiceReloadHandoffError('Voice reload handoff session id is invalid.');\n }\n const candidates = [...registry().records.entries()]\n .filter(\n ([candidateToken, pending]) =>\n pending.state === 'committed' &&\n pending.record.sessionId === sessionId &&\n (token === undefined || candidateToken === token),\n )\n .sort((left, right) => right[1].record.createdAt - left[1].record.createdAt);\n const [candidate] = candidates;\n if (!candidate) return undefined;\n registry().records.delete(candidate[0]);\n return cloneRecord(candidate[1].record);\n },\n };\n return Object.freeze(store);\n}\n"],"mappings":";;;;;AAqBA,MAAM,kBAAkB,OAAO,IAAI,iCAAiC;AAiCpE,IAAa,0BAAb,cAA6C,MAAM;CACjD,YAAY,SAAiB;EAC3B,MAAM,OAAO;EACb,KAAK,OAAO;CACd;AACF;AAeA,SAAS,WAAuC;CAC9C,MAAM,iBAAiB;CACvB,MAAM,WAAW,eAAe;CAChC,IAAI,UAAU,OAAO;CACrB,MAAM,UAAU,EAAE,yBAAS,IAAI,IAA4B,EAAE;CAC7D,eAAe,mBAAmB;CAClC,OAAO;AACT;AAEA,SAAS,gBAAgB,OAAe,QAAiB,OAAyC;CAChG,MAAM,CAAC,SAAS,OAAO,QAAQ,KAAK;CACpC,OAAO,IAAI,wBACT,WAAW,QAAQ,QAAQ,OAAO,MAAM,gBAAgB,IAAI,IAAI,MAAM,YAAY,GAAG,EACvF;AACF;AAEA,SAAS,iBAAiB,UAAkE;CAC1F,IAAI,CAAC,MAAM,kCAAkC,QAAQ,GACnD,MAAM,gBAAgB,iCAAiC,kCAAkC,QAAQ;CAEnG,OAAO;EAAE,WAAW,SAAS;EAAW,gBAAgB,SAAS;CAAe;AAClF;AAEA,SAAS,SAAS,SAA4C;CAC5D,MAAM,MAAM,QAAQ,IAAI;CACxB,IAAI,CAAC,OAAO,UAAU,GAAG,KAAK,MAAM,GAAG,MAAM,IAAI,wBAAwB,wCAAwC;CACjH,OAAO;AACT;AAEA,SAAS,YAAY,QAAgD;CACnE,OAAO;EACL,GAAG;EACH,SAAS,CAAC,GAAG,OAAO,OAAO;CAC7B;AACF;AAEA,SAAS,aAAa,KAAmB;CACvC,KAAK,MAAM,CAAC,OAAO,YAAY,SAAS,CAAC,CAAC,SACxC,IAAI,QAAQ,OAAO,aAAa,KAAK,SAAS,CAAC,CAAC,QAAQ,OAAO,KAAK;AAExE;AAEA,SAAS,gBAAgB,QAA4B,UAA+C;CAClG,OAAO,OAAO,cAAc,SAAS,aAAa,OAAO,mBAAmB,SAAS;AACvF;;AAGA,SAAgB,8BAA8B,SAA6D;CACzG,MAAM,QAAiC;EACrC,QAAQ,SAAS,SAAS;GACxB,MAAM,MAAM,SAAS,OAAO;GAC5B,aAAa,GAAG;GAChB,IAAI,CAAC,QAAQ,QAAQ,MAAM,IAAI,wBAAwB,wCAAwC;GAC/F,MAAM,WAAW,iBAAiB;IAAE,WAAW,QAAQ;IAAW,gBAAgB,QAAQ;GAAe,CAAC;GAC1G,IAAI,CAAC,MAAM,iCAAiC,OAAO,GACjD,MAAM,gBAAgB,gCAAgC,iCAAiC,OAAO;GAEhG,MAAM,OAAO,QAAQ,QAAQ;GAC7B,MAAM,UAAU,CAAC,GAAI,QAAQ,WAAW,CAAC,CAAE;GAC3C,IAAI,SAAS,uBAAuB,QAAQ,cAAc,KAAA,GACxD,MAAM,IAAI,wBAAwB,kDAAkD;GAEtF,IAAI,SAAS,oBAAoB,QAAQ,YAAY,KAAA,GACnD,MAAM,IAAI,wBAAwB,4CAA4C;GAEhF,IAAI,SAAS,mBAAmB,QAAQ,cAAc,KAAA,GACpD,MAAM,IAAI,wBAAwB,qDAAqD;GAEzF,IAAI,SAAS,uBAAuB,QAAQ,SAAS,GACnD,MAAM,IAAI,wBAAwB,oDAAoD;GAExF,IAAI,SAAS,oBAAoB,QAAQ,YAAY,KAAA,GACnD,MAAM,IAAI,wBAAwB,qDAAqD;GAEzF,IAAI,SAAS,oBAAoB,QAAQ,cAAc,KAAA,GACrD,MAAM,IAAI,wBAAwB,sDAAsD;GAE1F,IAAI,SAAS,oBAAoB,QAAQ,SAAS,GAChD,MAAM,IAAI,wBAAwB,iDAAiD;GAErF,MAAM,QAAQ,gBAAgB,QAAQ,YAAY;GAClD,IAAI,MAAM,SAAA,OAA6B,SAAS,CAAC,CAAC,QAAQ,IAAI,KAAK,GACjE,MAAM,IAAI,wBAAwB,0DAA0D;GAE9F,MAAM,SAA6B;IACjC;IACA,GAAG;IACH,aAAa,QAAQ;IACrB;IACA;IACA,GAAI,QAAQ,cAAc,KAAA,IAAY,CAAC,IAAI,EAAE,WAAW,QAAQ,UAAU;IAC1E,GAAI,QAAQ,YAAY,KAAA,IAAY,CAAC,IAAI,EAAE,SAAS,QAAQ,QAAQ;IACpE,WAAW;IACX,WAAW,MAAM;GACnB;GACA,IAAI,CAAC,MAAM,0BAA0B,MAAM,GACzC,MAAM,gBAAgB,wBAAwB,0BAA0B,MAAM;GAEhF,SAAS,CAAC,CAAC,QAAQ,IAAI,OAAO;IAAE;IAAQ,OAAO;GAAU,CAAC;GAC1D,IAAI,SAAS;GACb,OAAO,OAAO,OAAO;IACnB;IACA,SAAS;KACP,IAAI,QAAQ,OAAO;KACnB,SAAS;KACT,OAAO,MAAM,OAAO,OAAO,QAAQ;IACrC;IACA,UAAU;KACR,IAAI,QAAQ,OAAO;KACnB,SAAS;KACT,OAAO,MAAM,QAAQ,OAAO,QAAQ;IACtC;GACF,CAAC;EACH;EACA,OAAO,OAAO,UAAU;GAEtB,aADY,SAAS,OACN,CAAC;GAChB,MAAM,oBAAoB,iBAAiB,QAAQ;GACnD,MAAM,UAAU,SAAS,CAAC,CAAC,QAAQ,IAAI,KAAK;GAC5C,IAAI,CAAC,WAAW,QAAQ,UAAU,aAAa,CAAC,gBAAgB,QAAQ,QAAQ,iBAAiB,GAC/F;GAEF,QAAQ,QAAQ;GAChB,OAAO,YAAY,QAAQ,MAAM;EACnC;EACA,OAAO,OAAO,UAAU;GACtB,OAAO,MAAM,OAAO,OAAO,QAAQ,MAAM,KAAA;EAC3C;EACA,QAAQ,OAAO,UAAU;GAEvB,aADY,SAAS,OACN,CAAC;GAChB,MAAM,oBAAoB,iBAAiB,QAAQ;GACnD,MAAM,UAAU,SAAS,CAAC,CAAC,QAAQ,IAAI,KAAK;GAC5C,IAAI,CAAC,WAAW,CAAC,gBAAgB,QAAQ,QAAQ,iBAAiB,GAAG,OAAO;GAC5E,OAAO,SAAS,CAAC,CAAC,QAAQ,OAAO,KAAK;EACxC;EACA,QAAQ,WAAW,OAAO;GAExB,aADY,SAAS,OACN,CAAC;GAChB,IAAI,UAAU,WAAW,KAAK,UAAU,SAAA,KACtC,MAAM,IAAI,wBAAwB,6CAA6C;GAUjF,MAAM,CAAC,aARY,CAAC,GAAG,SAAS,CAAC,CAAC,QAAQ,QAAQ,CAAC,CAAC,CACjD,QACE,CAAC,gBAAgB,aAChB,QAAQ,UAAU,eAClB,QAAQ,OAAO,cAAc,cAC5B,UAAU,KAAA,KAAa,mBAAmB,MAC/C,CAAC,CACA,MAAM,MAAM,UAAU,MAAM,EAAE,CAAC,OAAO,YAAY,KAAK,EAAE,CAAC,OAAO,SACvC;GAC7B,IAAI,CAAC,WAAW,OAAO,KAAA;GACvB,SAAS,CAAC,CAAC,QAAQ,OAAO,UAAU,EAAE;GACtC,OAAO,YAAY,UAAU,EAAE,CAAC,MAAM;EACxC;CACF;CACA,OAAO,OAAO,OAAO,KAAK;AAC5B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const require_voiceTools = require("../../constants/voiceTools.cjs");
|
|
2
|
+
//#region src/services/voiceToolsContract/index.ts
|
|
3
|
+
var VoiceToolError = class extends Error {
|
|
4
|
+
code;
|
|
5
|
+
retryable;
|
|
6
|
+
constructor(code, message, retryable = false) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.name = "VoiceToolError";
|
|
9
|
+
this.code = code;
|
|
10
|
+
this.retryable = retryable;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
function readDoomVoiceToolsService(context) {
|
|
14
|
+
return context.get(require_voiceTools.DOOM_VOICE_TOOLS_SERVICE);
|
|
15
|
+
}
|
|
16
|
+
function requireDoomVoiceToolsService(context) {
|
|
17
|
+
const service = readDoomVoiceToolsService(context);
|
|
18
|
+
if (!service) throw new Error("Doom voice tools are unavailable. Load @agimon-ai/doompi-voice.");
|
|
19
|
+
return service;
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.VoiceToolError = VoiceToolError;
|
|
23
|
+
exports.readDoomVoiceToolsService = readDoomVoiceToolsService;
|
|
24
|
+
exports.requireDoomVoiceToolsService = requireDoomVoiceToolsService;
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["DOOM_VOICE_TOOLS_SERVICE"],"sources":["../../../src/services/voiceToolsContract/index.ts"],"sourcesContent":["import type { Context } from '@deepseek-ai/cordis';\nimport type { TSchema } from 'typebox';\n\nimport { DOOM_VOICE_TOOLS_SERVICE } from '../../constants/voiceTools';\nimport type {\n VoiceToolBatchResult,\n VoiceToolCatalogSnapshot,\n VoiceToolDescribeInput,\n VoiceToolErrorCode,\n VoiceToolUseInput,\n} from '../../schemas/voiceTools';\n\nexport interface VoiceToolDescriptor {\n readonly source: string;\n readonly id: string;\n readonly name: string;\n readonly label: string;\n readonly description: string;\n readonly order: number;\n readonly inputSchema: TSchema;\n readonly resultSchema: TSchema;\n readonly timeoutMs?: number;\n}\n\nexport interface VoiceToolExecutionContext<Context = unknown> {\n readonly sessionId: string;\n readonly hostGeneration: string;\n readonly operationId: string;\n readonly batchIndex: number;\n readonly batchSize: number;\n readonly signal: AbortSignal;\n readonly context: Context;\n}\n\nexport interface VoiceToolDefinition<Context = unknown> {\n readonly descriptor: VoiceToolDescriptor;\n execute(input: unknown, execution: VoiceToolExecutionContext<Context>): unknown;\n}\n\nexport interface VoiceToolRegistrationHandle {\n readonly source: string;\n readonly id: string;\n readonly registrationGeneration: string;\n dispose(): void;\n}\n\nexport interface VoiceToolSessionHandle<Context = unknown> {\n readonly sessionId: string;\n readonly hostGeneration: string;\n readonly active: boolean;\n setActive(active: boolean): void;\n subscribe(listener: () => void): () => void;\n describe(input?: VoiceToolDescribeInput): VoiceToolCatalogSnapshot;\n executeBatch(\n input: VoiceToolUseInput,\n context: Context,\n options?: VoiceToolExecuteOptions,\n ): Promise<VoiceToolBatchResult>;\n useVoiceTools(\n input: VoiceToolUseInput,\n context: Context,\n options?: VoiceToolExecuteOptions,\n ): Promise<VoiceToolBatchResult>;\n dispose(): void;\n}\n\nexport interface VoiceToolExecuteOptions {\n readonly signal?: AbortSignal;\n readonly operationId?: string;\n}\n\nexport interface VoiceToolRegistrationOptions<Context = unknown> {\n readonly sessionId?: string;\n readonly context?: Context;\n}\n\n/** Shared Cordis contract implemented by an optional voice-tool provider. */\nexport interface DoomVoiceToolsService<SessionContext = unknown> {\n readonly generation: string;\n register<ContributionContext = SessionContext>(\n definition: VoiceToolDefinition<ContributionContext>,\n options?: VoiceToolRegistrationOptions<ContributionContext>,\n ): VoiceToolRegistrationHandle;\n bindSession(sessionId: string, context?: SessionContext): VoiceToolSessionHandle<SessionContext>;\n readSession(sessionId: string): VoiceToolSessionHandle<SessionContext> | undefined;\n subscribeSession(\n sessionId: string,\n listener: (session: VoiceToolSessionHandle<SessionContext> | undefined) => void,\n ): () => void;\n dispose(): void;\n}\n\ndeclare module '@deepseek-ai/cordis' {\n interface Context {\n 'doom/voice-tools': DoomVoiceToolsService;\n }\n}\n\nexport class VoiceToolError extends Error {\n readonly code: VoiceToolErrorCode;\n readonly retryable: boolean;\n\n constructor(code: VoiceToolErrorCode, message: string, retryable = false) {\n super(message);\n this.name = 'VoiceToolError';\n this.code = code;\n this.retryable = retryable;\n }\n}\n\nexport function readDoomVoiceToolsService(context: Context): DoomVoiceToolsService | undefined {\n return context.get(DOOM_VOICE_TOOLS_SERVICE) as DoomVoiceToolsService | undefined;\n}\n\nexport function requireDoomVoiceToolsService(context: Context): DoomVoiceToolsService {\n const service = readDoomVoiceToolsService(context);\n if (!service) throw new Error('Doom voice tools are unavailable. Load @agimon-ai/doompi-voice.');\n return service;\n}\n"],"mappings":";;AAkGA,IAAa,iBAAb,cAAoC,MAAM;CACxC;CACA;CAEA,YAAY,MAA0B,SAAiB,YAAY,OAAO;EACxE,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,KAAK,OAAO;EACZ,KAAK,YAAY;CACnB;AACF;AAEA,SAAgB,0BAA0B,SAAqD;CAC7F,OAAO,QAAQ,IAAIA,mBAAAA,wBAAwB;AAC7C;AAEA,SAAgB,6BAA6B,SAAyC;CACpF,MAAM,UAAU,0BAA0B,OAAO;CACjD,IAAI,CAAC,SAAS,MAAM,IAAI,MAAM,iEAAiE;CAC/F,OAAO;AACT"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { VoiceToolBatchResult, VoiceToolCatalogSnapshot, VoiceToolDescribeInput, VoiceToolErrorCode, VoiceToolUseInput } from "../../schemas/voiceTools.cjs";
|
|
2
|
+
import { TSchema } from "typebox";
|
|
3
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
4
|
+
//#region src/services/voiceToolsContract/index.d.ts
|
|
5
|
+
export interface VoiceToolDescriptor {
|
|
6
|
+
readonly source: string;
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly label: string;
|
|
10
|
+
readonly description: string;
|
|
11
|
+
readonly order: number;
|
|
12
|
+
readonly inputSchema: TSchema;
|
|
13
|
+
readonly resultSchema: TSchema;
|
|
14
|
+
readonly timeoutMs?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface VoiceToolExecutionContext<Context = unknown> {
|
|
17
|
+
readonly sessionId: string;
|
|
18
|
+
readonly hostGeneration: string;
|
|
19
|
+
readonly operationId: string;
|
|
20
|
+
readonly batchIndex: number;
|
|
21
|
+
readonly batchSize: number;
|
|
22
|
+
readonly signal: AbortSignal;
|
|
23
|
+
readonly context: Context;
|
|
24
|
+
}
|
|
25
|
+
export interface VoiceToolDefinition<Context = unknown> {
|
|
26
|
+
readonly descriptor: VoiceToolDescriptor;
|
|
27
|
+
execute(input: unknown, execution: VoiceToolExecutionContext<Context>): unknown;
|
|
28
|
+
}
|
|
29
|
+
export interface VoiceToolRegistrationHandle {
|
|
30
|
+
readonly source: string;
|
|
31
|
+
readonly id: string;
|
|
32
|
+
readonly registrationGeneration: string;
|
|
33
|
+
dispose(): void;
|
|
34
|
+
}
|
|
35
|
+
export interface VoiceToolSessionHandle<Context = unknown> {
|
|
36
|
+
readonly sessionId: string;
|
|
37
|
+
readonly hostGeneration: string;
|
|
38
|
+
readonly active: boolean;
|
|
39
|
+
setActive(active: boolean): void;
|
|
40
|
+
subscribe(listener: () => void): () => void;
|
|
41
|
+
describe(input?: VoiceToolDescribeInput): VoiceToolCatalogSnapshot;
|
|
42
|
+
executeBatch(input: VoiceToolUseInput, context: Context, options?: VoiceToolExecuteOptions): Promise<VoiceToolBatchResult>;
|
|
43
|
+
useVoiceTools(input: VoiceToolUseInput, context: Context, options?: VoiceToolExecuteOptions): Promise<VoiceToolBatchResult>;
|
|
44
|
+
dispose(): void;
|
|
45
|
+
}
|
|
46
|
+
export interface VoiceToolExecuteOptions {
|
|
47
|
+
readonly signal?: AbortSignal;
|
|
48
|
+
readonly operationId?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface VoiceToolRegistrationOptions<Context = unknown> {
|
|
51
|
+
readonly sessionId?: string;
|
|
52
|
+
readonly context?: Context;
|
|
53
|
+
}
|
|
54
|
+
/** Shared Cordis contract implemented by an optional voice-tool provider. */
|
|
55
|
+
export interface DoomVoiceToolsService<SessionContext = unknown> {
|
|
56
|
+
readonly generation: string;
|
|
57
|
+
register<ContributionContext = SessionContext>(definition: VoiceToolDefinition<ContributionContext>, options?: VoiceToolRegistrationOptions<ContributionContext>): VoiceToolRegistrationHandle;
|
|
58
|
+
bindSession(sessionId: string, context?: SessionContext): VoiceToolSessionHandle<SessionContext>;
|
|
59
|
+
readSession(sessionId: string): VoiceToolSessionHandle<SessionContext> | undefined;
|
|
60
|
+
subscribeSession(sessionId: string, listener: (session: VoiceToolSessionHandle<SessionContext> | undefined) => void): () => void;
|
|
61
|
+
dispose(): void;
|
|
62
|
+
}
|
|
63
|
+
declare module '@deepseek-ai/cordis' {
|
|
64
|
+
interface Context {
|
|
65
|
+
'doom/voice-tools': DoomVoiceToolsService;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export declare class VoiceToolError extends Error {
|
|
69
|
+
readonly code: VoiceToolErrorCode;
|
|
70
|
+
readonly retryable: boolean;
|
|
71
|
+
constructor(code: VoiceToolErrorCode, message: string, retryable?: boolean);
|
|
72
|
+
}
|
|
73
|
+
export declare function readDoomVoiceToolsService(context: Context): DoomVoiceToolsService | undefined;
|
|
74
|
+
export declare function requireDoomVoiceToolsService(context: Context): DoomVoiceToolsService;
|
|
75
|
+
//#endregion
|
|
76
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/services/voiceToolsContract/index.ts"],"mappings":";;;;iBAYiB;WACN;WACA;WACA;WACA;WACA;WACA;WACA,aAAa;WACb,cAAc;WACd;;iBAGM,0BAA0B;WAChC;WACA;WACA;WACA;WACA;WACA,QAAQ;WACR,SAAS;;iBAGH,oBAAoB;WAC1B,YAAY;EACrB,QAAQ,gBAAgB,WAAW,0BAA0B;;iBAG9C;WACN;WACA;WACA;EACT;;iBAGe,uBAAuB;WAC7B;WACA;WACA;EACT,UAAU;EACV,UAAU;EACV,SAAS,QAAQ,yBAAyB;EAC1C,aACE,OAAO,mBACP,SAAS,SACT,UAAU,0BACT,QAAQ;EACX,cACE,OAAO,mBACP,SAAS,SACT,UAAU,0BACT,QAAQ;EACX;;iBAGe;WACN,SAAS;WACT;;iBAGM,6BAA6B;WACnC;WACA,UAAU;;;iBAIJ,sBAAsB;WAC5B;EACT,SAAS,sBAAsB,gBAC7B,YAAY,oBAAoB,sBAChC,UAAU,6BAA6B,uBACtC;EACH,YAAY,mBAAmB,UAAU,iBAAiB,uBAAuB;EACjF,YAAY,oBAAoB,uBAAuB;EACvD,iBACE,mBACA,WAAW,SAAS,uBAAuB;EAE7C;;;YAIU;IACR,oBAAoB;;;qBAIX,uBAAuB;WACzB,MAAM;WACN;EAET,YAAY,MAAM,oBAAoB,iBAAiB;;wBAQzC,0BAA0B,SAAS,UAAU;wBAI7C,6BAA6B,SAAS,UAAU"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { VoiceToolBatchResult, VoiceToolCatalogSnapshot, VoiceToolDescribeInput, VoiceToolErrorCode, VoiceToolUseInput } from "../../schemas/voiceTools.mjs";
|
|
2
|
+
import { TSchema } from "typebox";
|
|
3
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
4
|
+
//#region src/services/voiceToolsContract/index.d.ts
|
|
5
|
+
export interface VoiceToolDescriptor {
|
|
6
|
+
readonly source: string;
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly label: string;
|
|
10
|
+
readonly description: string;
|
|
11
|
+
readonly order: number;
|
|
12
|
+
readonly inputSchema: TSchema;
|
|
13
|
+
readonly resultSchema: TSchema;
|
|
14
|
+
readonly timeoutMs?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface VoiceToolExecutionContext<Context = unknown> {
|
|
17
|
+
readonly sessionId: string;
|
|
18
|
+
readonly hostGeneration: string;
|
|
19
|
+
readonly operationId: string;
|
|
20
|
+
readonly batchIndex: number;
|
|
21
|
+
readonly batchSize: number;
|
|
22
|
+
readonly signal: AbortSignal;
|
|
23
|
+
readonly context: Context;
|
|
24
|
+
}
|
|
25
|
+
export interface VoiceToolDefinition<Context = unknown> {
|
|
26
|
+
readonly descriptor: VoiceToolDescriptor;
|
|
27
|
+
execute(input: unknown, execution: VoiceToolExecutionContext<Context>): unknown;
|
|
28
|
+
}
|
|
29
|
+
export interface VoiceToolRegistrationHandle {
|
|
30
|
+
readonly source: string;
|
|
31
|
+
readonly id: string;
|
|
32
|
+
readonly registrationGeneration: string;
|
|
33
|
+
dispose(): void;
|
|
34
|
+
}
|
|
35
|
+
export interface VoiceToolSessionHandle<Context = unknown> {
|
|
36
|
+
readonly sessionId: string;
|
|
37
|
+
readonly hostGeneration: string;
|
|
38
|
+
readonly active: boolean;
|
|
39
|
+
setActive(active: boolean): void;
|
|
40
|
+
subscribe(listener: () => void): () => void;
|
|
41
|
+
describe(input?: VoiceToolDescribeInput): VoiceToolCatalogSnapshot;
|
|
42
|
+
executeBatch(input: VoiceToolUseInput, context: Context, options?: VoiceToolExecuteOptions): Promise<VoiceToolBatchResult>;
|
|
43
|
+
useVoiceTools(input: VoiceToolUseInput, context: Context, options?: VoiceToolExecuteOptions): Promise<VoiceToolBatchResult>;
|
|
44
|
+
dispose(): void;
|
|
45
|
+
}
|
|
46
|
+
export interface VoiceToolExecuteOptions {
|
|
47
|
+
readonly signal?: AbortSignal;
|
|
48
|
+
readonly operationId?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface VoiceToolRegistrationOptions<Context = unknown> {
|
|
51
|
+
readonly sessionId?: string;
|
|
52
|
+
readonly context?: Context;
|
|
53
|
+
}
|
|
54
|
+
/** Shared Cordis contract implemented by an optional voice-tool provider. */
|
|
55
|
+
export interface DoomVoiceToolsService<SessionContext = unknown> {
|
|
56
|
+
readonly generation: string;
|
|
57
|
+
register<ContributionContext = SessionContext>(definition: VoiceToolDefinition<ContributionContext>, options?: VoiceToolRegistrationOptions<ContributionContext>): VoiceToolRegistrationHandle;
|
|
58
|
+
bindSession(sessionId: string, context?: SessionContext): VoiceToolSessionHandle<SessionContext>;
|
|
59
|
+
readSession(sessionId: string): VoiceToolSessionHandle<SessionContext> | undefined;
|
|
60
|
+
subscribeSession(sessionId: string, listener: (session: VoiceToolSessionHandle<SessionContext> | undefined) => void): () => void;
|
|
61
|
+
dispose(): void;
|
|
62
|
+
}
|
|
63
|
+
declare module '@deepseek-ai/cordis' {
|
|
64
|
+
interface Context {
|
|
65
|
+
'doom/voice-tools': DoomVoiceToolsService;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export declare class VoiceToolError extends Error {
|
|
69
|
+
readonly code: VoiceToolErrorCode;
|
|
70
|
+
readonly retryable: boolean;
|
|
71
|
+
constructor(code: VoiceToolErrorCode, message: string, retryable?: boolean);
|
|
72
|
+
}
|
|
73
|
+
export declare function readDoomVoiceToolsService(context: Context): DoomVoiceToolsService | undefined;
|
|
74
|
+
export declare function requireDoomVoiceToolsService(context: Context): DoomVoiceToolsService;
|
|
75
|
+
//#endregion
|
|
76
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/services/voiceToolsContract/index.ts"],"mappings":";;;;iBAYiB;WACN;WACA;WACA;WACA;WACA;WACA;WACA,aAAa;WACb,cAAc;WACd;;iBAGM,0BAA0B;WAChC;WACA;WACA;WACA;WACA;WACA,QAAQ;WACR,SAAS;;iBAGH,oBAAoB;WAC1B,YAAY;EACrB,QAAQ,gBAAgB,WAAW,0BAA0B;;iBAG9C;WACN;WACA;WACA;EACT;;iBAGe,uBAAuB;WAC7B;WACA;WACA;EACT,UAAU;EACV,UAAU;EACV,SAAS,QAAQ,yBAAyB;EAC1C,aACE,OAAO,mBACP,SAAS,SACT,UAAU,0BACT,QAAQ;EACX,cACE,OAAO,mBACP,SAAS,SACT,UAAU,0BACT,QAAQ;EACX;;iBAGe;WACN,SAAS;WACT;;iBAGM,6BAA6B;WACnC;WACA,UAAU;;;iBAIJ,sBAAsB;WAC5B;EACT,SAAS,sBAAsB,gBAC7B,YAAY,oBAAoB,sBAChC,UAAU,6BAA6B,uBACtC;EACH,YAAY,mBAAmB,UAAU,iBAAiB,uBAAuB;EACjF,YAAY,oBAAoB,uBAAuB;EACvD,iBACE,mBACA,WAAW,SAAS,uBAAuB;EAE7C;;;YAIU;IACR,oBAAoB;;;qBAIX,uBAAuB;WACzB,MAAM;WACN;EAET,YAAY,MAAM,oBAAoB,iBAAiB;;wBAQzC,0BAA0B,SAAS,UAAU;wBAI7C,6BAA6B,SAAS,UAAU"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DOOM_VOICE_TOOLS_SERVICE } from "../../constants/voiceTools.mjs";
|
|
2
|
+
//#region src/services/voiceToolsContract/index.ts
|
|
3
|
+
var VoiceToolError = class extends Error {
|
|
4
|
+
code;
|
|
5
|
+
retryable;
|
|
6
|
+
constructor(code, message, retryable = false) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.name = "VoiceToolError";
|
|
9
|
+
this.code = code;
|
|
10
|
+
this.retryable = retryable;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
function readDoomVoiceToolsService(context) {
|
|
14
|
+
return context.get(DOOM_VOICE_TOOLS_SERVICE);
|
|
15
|
+
}
|
|
16
|
+
function requireDoomVoiceToolsService(context) {
|
|
17
|
+
const service = readDoomVoiceToolsService(context);
|
|
18
|
+
if (!service) throw new Error("Doom voice tools are unavailable. Load @agimon-ai/doompi-voice.");
|
|
19
|
+
return service;
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { VoiceToolError, readDoomVoiceToolsService, requireDoomVoiceToolsService };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=index.mjs.map
|