@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 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/services/webauthn/index.ts"],"sourcesContent":["import { randomBytes } from 'node:crypto';\n\nimport {\n generateAuthenticationOptions,\n generateRegistrationOptions,\n verifyAuthenticationResponse,\n verifyRegistrationResponse,\n} from '@simplewebauthn/server';\n\nimport {\n CEREMONY_TTL_MS,\n STEP_UP_CHALLENGE_TTL_MS,\n type StepUpAction,\n type StoredCredential,\n challengeIsFresh,\n counterVerdict,\n relyingPartyId,\n} from '../webauthnPolicy';\n\nconst ID_BYTES = 8;\nconst CEREMONY_ID_BYTES = 16;\nconst USER_ID_BYTES = 16;\nconst MAX_PENDING_CEREMONIES = 256;\nconst RP_NAME = 'DoomPi cockpit';\n/** One synthetic owner: there is exactly one person here, and passkeys need a subject. */\nconst OWNER_NAME = 'this machine';\nexport interface WebAuthnOptions {\n /** The tunnel origin, or undefined while remote access is off. */\n publicOrigin: () => string | undefined;\n credentials: () => readonly StoredCredential[];\n saveCredential: (credential: StoredCredential) => void;\n removeCredential: (id: string) => boolean;\n now?: () => number;\n onNotice?: (message: string) => void;\n}\n\nexport type PasskeySupport = { supported: true; rpId: string } | { supported: false; reason: string };\n\nexport interface BegunCeremony {\n ceremonyId: string;\n options: Record<string, unknown>;\n}\n\nexport interface WebAuthn {\n /** Whether the current tunnel can carry passkeys at all. */\n support(): PasskeySupport;\n beginRegistration(caller: string, label: string): Promise<BegunCeremony | undefined>;\n finishRegistration(\n ceremonyId: string,\n caller: string,\n response: unknown,\n label: string,\n ): Promise<{ ok: true; id: string } | { ok: false; error: string }>;\n beginAuthentication(caller: string): Promise<BegunCeremony | undefined>;\n finishAuthentication(\n ceremonyId: string,\n caller: string,\n response: unknown,\n ): Promise<{ ok: true; credential: StoredCredential } | { ok: false; error: string }>;\n /** Mints a challenge bound to one caller and action, good once and briefly. */\n beginStepUp(caller: string, action: StepUpAction): Promise<BegunCeremony | undefined>;\n finishStepUp(ceremonyId: string, caller: string, action: StepUpAction, response: unknown): Promise<boolean>;\n clearChallenges(): void;\n}\n\ntype CeremonyType = 'registration' | 'authentication' | 'step-up';\n\ninterface PendingChallenge {\n challenge: string;\n issuedAt: number;\n caller: string;\n type: CeremonyType;\n /** Present for a step-up, so a challenge minted for one action cannot authorise another. */\n action?: StepUpAction;\n}\n\nfunction describe(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n\n/**\n * Passkeys over the tunnel, and the step-up gate in front of the two actions a\n * live session should not be enough for.\n *\n * `rpID` and `expectedOrigin` come from the configured tunnel hostname, never\n * from the request. That is the entire scope of a credential, so a caller that\n * could influence it could mint credentials against somebody else's origin.\n */\nexport function createWebAuthn(options: WebAuthnOptions): WebAuthn {\n const now = options.now ?? ((): number => Date.now());\n const notice = options.onNotice ?? ((): void => {});\n /** One synthetic subject, stable for the life of the process. */\n const userId = randomBytes(USER_ID_BYTES);\n const pending = new Map<string, PendingChallenge>();\n\n const support = (): PasskeySupport => {\n const origin = options.publicOrigin();\n const rpId = relyingPartyId(origin);\n if (origin === undefined) return { supported: false, reason: 'Remote access is not on.' };\n if (rpId === undefined) {\n return {\n supported: false,\n reason:\n 'A quick tunnel gets a new hostname every start, so a passkey registered now would not work again. Configure a named tunnel to use passkeys.',\n };\n }\n return { supported: true, rpId };\n };\n\n const ceremonyKey = (id: string, caller: string, type: CeremonyType): string => `${type}\\u0000${caller}\\u0000${id}`;\n const ttlFor = (held: PendingChallenge): number =>\n held.type === 'step-up' ? STEP_UP_CHALLENGE_TTL_MS : CEREMONY_TTL_MS;\n\n const sweepPending = (): void => {\n const at = now();\n for (const [id, held] of pending) {\n if (!challengeIsFresh(held.issuedAt, at, ttlFor(held))) pending.delete(id);\n }\n };\n\n const remember = (type: CeremonyType, caller: string, challenge: string, action?: StepUpAction): string => {\n sweepPending();\n while (pending.size >= MAX_PENDING_CEREMONIES) {\n const oldest = pending.keys().next().value as string | undefined;\n if (oldest === undefined) break;\n pending.delete(oldest);\n }\n let id: string;\n do {\n id = randomBytes(CEREMONY_ID_BYTES).toString('base64url');\n } while (pending.has(ceremonyKey(id, caller, type)));\n pending.set(ceremonyKey(id, caller, type), {\n challenge,\n issuedAt: now(),\n caller,\n type,\n ...(action === undefined ? {} : { action }),\n });\n return id;\n };\n\n const take = (id: string, caller: string, type: CeremonyType, action?: StepUpAction): string | undefined => {\n const key = ceremonyKey(id, caller, type);\n const held = pending.get(key);\n if (held === undefined) return undefined;\n if (!challengeIsFresh(held.issuedAt, now(), ttlFor(held))) {\n pending.delete(key);\n return undefined;\n }\n if (held.caller !== caller || held.type !== type || held.action !== action) return undefined;\n pending.delete(key);\n return held.challenge;\n };\n\n return {\n support,\n\n async beginRegistration(caller, label) {\n const ready = support();\n if (!ready.supported) return undefined;\n const options_ = await generateRegistrationOptions({\n rpName: RP_NAME,\n rpID: ready.rpId,\n userID: userId,\n userName: OWNER_NAME,\n userDisplayName: label,\n attestationType: 'none',\n // Discoverable so a return visit is one gesture with nothing typed,\n // and platform so the key lands in the phone's secure enclave rather\n // than on a roaming key the user has to carry.\n authenticatorSelection: {\n residentKey: 'required',\n userVerification: 'required',\n authenticatorAttachment: 'platform',\n },\n excludeCredentials: options.credentials().map((credential) => ({ id: credential.credentialId })),\n });\n const ceremonyId = remember('registration', caller, options_.challenge);\n return { ceremonyId, options: options_ as unknown as Record<string, unknown> };\n },\n\n async finishRegistration(ceremonyId, caller, response, label) {\n const ready = support();\n if (!ready.supported) return { ok: false, error: ready.reason };\n const challenge = take(ceremonyId, caller, 'registration');\n if (challenge === undefined) return { ok: false, error: 'That registration expired. Try again.' };\n try {\n const verification = await verifyRegistrationResponse({\n response: response as Parameters<typeof verifyRegistrationResponse>[0]['response'],\n expectedChallenge: challenge,\n expectedOrigin: `https://${ready.rpId}`,\n expectedRPID: ready.rpId,\n requireUserVerification: true,\n });\n if (!verification.verified || verification.registrationInfo === undefined) {\n return { ok: false, error: 'That passkey could not be verified.' };\n }\n const info = verification.registrationInfo;\n const at = now();\n const credential: StoredCredential = {\n id: randomBytes(ID_BYTES).toString('hex'),\n credentialId: info.credential.id,\n publicKey: Buffer.from(info.credential.publicKey).toString('base64url'),\n counter: info.credential.counter,\n transports: info.credential.transports ?? [],\n label,\n createdAt: at,\n lastUsedAt: at,\n };\n options.saveCredential(credential);\n notice(`registered a passkey for ${label}`);\n return { ok: true, id: credential.id };\n } catch (error) {\n return { ok: false, error: describe(error) };\n }\n },\n\n async beginAuthentication(caller) {\n const ready = support();\n if (!ready.supported) return undefined;\n const options_ = await generateAuthenticationOptions({\n rpID: ready.rpId,\n userVerification: 'required',\n });\n const ceremonyId = remember('authentication', caller, options_.challenge);\n return { ceremonyId, options: options_ as unknown as Record<string, unknown> };\n },\n\n async finishAuthentication(ceremonyId, caller, response) {\n const ready = support();\n if (!ready.supported) return { ok: false, error: ready.reason };\n const challenge = take(ceremonyId, caller, 'authentication');\n if (challenge === undefined) return { ok: false, error: 'That sign-in expired. Try again.' };\n return await verifyAgainst(challenge, ready.rpId, response);\n },\n\n async beginStepUp(caller, action) {\n const ready = support();\n if (!ready.supported) return undefined;\n const options_ = await generateAuthenticationOptions({\n rpID: ready.rpId,\n userVerification: 'required',\n });\n const ceremonyId = remember('step-up', caller, options_.challenge, action);\n return { ceremonyId, options: options_ as unknown as Record<string, unknown> };\n },\n\n async finishStepUp(ceremonyId, caller, action, response) {\n const ready = support();\n if (!ready.supported) return false;\n const challenge = take(ceremonyId, caller, 'step-up', action);\n if (challenge === undefined) return false;\n return (await verifyAgainst(challenge, ready.rpId, response)).ok;\n },\n\n clearChallenges() {\n pending.clear();\n },\n };\n\n async function verifyAgainst(\n challenge: string,\n rpId: string,\n response: unknown,\n ): Promise<{ ok: true; credential: StoredCredential } | { ok: false; error: string }> {\n const presented = (response as { id?: unknown }).id;\n if (typeof presented !== 'string') return { ok: false, error: 'That response named no credential.' };\n const stored = options.credentials().find((candidate) => candidate.credentialId === presented);\n if (stored === undefined) return { ok: false, error: 'That passkey is not registered here.' };\n try {\n const verification = await verifyAuthenticationResponse({\n response: response as Parameters<typeof verifyAuthenticationResponse>[0]['response'],\n expectedChallenge: challenge,\n expectedOrigin: `https://${rpId}`,\n expectedRPID: rpId,\n requireUserVerification: true,\n credential: {\n id: stored.credentialId,\n publicKey: new Uint8Array(Buffer.from(stored.publicKey, 'base64url')),\n counter: stored.counter,\n transports: stored.transports as never,\n },\n });\n if (!verification.verified) return { ok: false, error: 'That passkey did not verify.' };\n const presentedCounter = verification.authenticationInfo.newCounter;\n if (counterVerdict(stored.counter, presentedCounter) === 'clone-suspected') {\n // Two things are signing with one key. The credential is burnt.\n options.removeCredential(stored.id);\n notice(`revoked passkey ${stored.label}: its signature counter went backwards, which means a clone`);\n return { ok: false, error: 'That passkey looks cloned and has been revoked.' };\n }\n const updated: StoredCredential = { ...stored, counter: presentedCounter, lastUsedAt: now() };\n options.saveCredential(updated);\n return { ok: true, credential: updated };\n } catch (error) {\n return { ok: false, error: describe(error) };\n }\n }\n}\n"],"mappings":";;;;AAmBA,MAAM,WAAW;AACjB,MAAM,oBAAoB;AAC1B,MAAM,gBAAgB;AACtB,MAAM,yBAAyB;AAC/B,MAAM,UAAU;;AAEhB,MAAM,aAAa;AAmDnB,SAAS,SAAS,OAAwB;CACxC,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAC9D;;;;;;;;;AAUA,SAAgB,eAAe,SAAoC;CACjE,MAAM,MAAM,QAAQ,cAAsB,KAAK,IAAI;CACnD,MAAM,SAAS,QAAQ,mBAAyB,CAAC;;CAEjD,MAAM,SAAS,YAAY,aAAa;CACxC,MAAM,0BAAU,IAAI,IAA8B;CAElD,MAAM,gBAAgC;EACpC,MAAM,SAAS,QAAQ,aAAa;EACpC,MAAM,OAAO,eAAe,MAAM;EAClC,IAAI,WAAW,KAAA,GAAW,OAAO;GAAE,WAAW;GAAO,QAAQ;EAA2B;EACxF,IAAI,SAAS,KAAA,GACX,OAAO;GACL,WAAW;GACX,QACE;EACJ;EAEF,OAAO;GAAE,WAAW;GAAM;EAAK;CACjC;CAEA,MAAM,eAAe,IAAY,QAAgB,SAA+B,GAAG,KAAK,QAAQ,OAAO,QAAQ;CAC/G,MAAM,UAAU,SACd,KAAK,SAAS,YAAY,2BAA2B;CAEvD,MAAM,qBAA2B;EAC/B,MAAM,KAAK,IAAI;EACf,KAAK,MAAM,CAAC,IAAI,SAAS,SACvB,IAAI,CAAC,iBAAiB,KAAK,UAAU,IAAI,OAAO,IAAI,CAAC,GAAG,QAAQ,OAAO,EAAE;CAE7E;CAEA,MAAM,YAAY,MAAoB,QAAgB,WAAmB,WAAkC;EACzG,aAAa;EACb,OAAO,QAAQ,QAAQ,wBAAwB;GAC7C,MAAM,SAAS,QAAQ,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;GACrC,IAAI,WAAW,KAAA,GAAW;GAC1B,QAAQ,OAAO,MAAM;EACvB;EACA,IAAI;EACJ;GACE,KAAK,YAAY,iBAAiB,CAAC,CAAC,SAAS,WAAW;SACjD,QAAQ,IAAI,YAAY,IAAI,QAAQ,IAAI,CAAC;EAClD,QAAQ,IAAI,YAAY,IAAI,QAAQ,IAAI,GAAG;GACzC;GACA,UAAU,IAAI;GACd;GACA;GACA,GAAI,WAAW,KAAA,IAAY,CAAC,IAAI,EAAE,OAAO;EAC3C,CAAC;EACD,OAAO;CACT;CAEA,MAAM,QAAQ,IAAY,QAAgB,MAAoB,WAA8C;EAC1G,MAAM,MAAM,YAAY,IAAI,QAAQ,IAAI;EACxC,MAAM,OAAO,QAAQ,IAAI,GAAG;EAC5B,IAAI,SAAS,KAAA,GAAW,OAAO,KAAA;EAC/B,IAAI,CAAC,iBAAiB,KAAK,UAAU,IAAI,GAAG,OAAO,IAAI,CAAC,GAAG;GACzD,QAAQ,OAAO,GAAG;GAClB;EACF;EACA,IAAI,KAAK,WAAW,UAAU,KAAK,SAAS,QAAQ,KAAK,WAAW,QAAQ,OAAO,KAAA;EACnF,QAAQ,OAAO,GAAG;EAClB,OAAO,KAAK;CACd;CAEA,OAAO;EACL;EAEA,MAAM,kBAAkB,QAAQ,OAAO;GACrC,MAAM,QAAQ,QAAQ;GACtB,IAAI,CAAC,MAAM,WAAW,OAAO,KAAA;GAC7B,MAAM,WAAW,MAAM,4BAA4B;IACjD,QAAQ;IACR,MAAM,MAAM;IACZ,QAAQ;IACR,UAAU;IACV,iBAAiB;IACjB,iBAAiB;IAIjB,wBAAwB;KACtB,aAAa;KACb,kBAAkB;KAClB,yBAAyB;IAC3B;IACA,oBAAoB,QAAQ,YAAY,CAAC,CAAC,KAAK,gBAAgB,EAAE,IAAI,WAAW,aAAa,EAAE;GACjG,CAAC;GAED,OAAO;IAAE,YADU,SAAS,gBAAgB,QAAQ,SAAS,SAC3C;IAAG,SAAS;GAA+C;EAC/E;EAEA,MAAM,mBAAmB,YAAY,QAAQ,UAAU,OAAO;GAC5D,MAAM,QAAQ,QAAQ;GACtB,IAAI,CAAC,MAAM,WAAW,OAAO;IAAE,IAAI;IAAO,OAAO,MAAM;GAAO;GAC9D,MAAM,YAAY,KAAK,YAAY,QAAQ,cAAc;GACzD,IAAI,cAAc,KAAA,GAAW,OAAO;IAAE,IAAI;IAAO,OAAO;GAAwC;GAChG,IAAI;IACF,MAAM,eAAe,MAAM,2BAA2B;KAC1C;KACV,mBAAmB;KACnB,gBAAgB,WAAW,MAAM;KACjC,cAAc,MAAM;KACpB,yBAAyB;IAC3B,CAAC;IACD,IAAI,CAAC,aAAa,YAAY,aAAa,qBAAqB,KAAA,GAC9D,OAAO;KAAE,IAAI;KAAO,OAAO;IAAsC;IAEnE,MAAM,OAAO,aAAa;IAC1B,MAAM,KAAK,IAAI;IACf,MAAM,aAA+B;KACnC,IAAI,YAAY,QAAQ,CAAC,CAAC,SAAS,KAAK;KACxC,cAAc,KAAK,WAAW;KAC9B,WAAW,OAAO,KAAK,KAAK,WAAW,SAAS,CAAC,CAAC,SAAS,WAAW;KACtE,SAAS,KAAK,WAAW;KACzB,YAAY,KAAK,WAAW,cAAc,CAAC;KAC3C;KACA,WAAW;KACX,YAAY;IACd;IACA,QAAQ,eAAe,UAAU;IACjC,OAAO,4BAA4B,OAAO;IAC1C,OAAO;KAAE,IAAI;KAAM,IAAI,WAAW;IAAG;GACvC,SAAS,OAAO;IACd,OAAO;KAAE,IAAI;KAAO,OAAO,SAAS,KAAK;IAAE;GAC7C;EACF;EAEA,MAAM,oBAAoB,QAAQ;GAChC,MAAM,QAAQ,QAAQ;GACtB,IAAI,CAAC,MAAM,WAAW,OAAO,KAAA;GAC7B,MAAM,WAAW,MAAM,8BAA8B;IACnD,MAAM,MAAM;IACZ,kBAAkB;GACpB,CAAC;GAED,OAAO;IAAE,YADU,SAAS,kBAAkB,QAAQ,SAAS,SAC7C;IAAG,SAAS;GAA+C;EAC/E;EAEA,MAAM,qBAAqB,YAAY,QAAQ,UAAU;GACvD,MAAM,QAAQ,QAAQ;GACtB,IAAI,CAAC,MAAM,WAAW,OAAO;IAAE,IAAI;IAAO,OAAO,MAAM;GAAO;GAC9D,MAAM,YAAY,KAAK,YAAY,QAAQ,gBAAgB;GAC3D,IAAI,cAAc,KAAA,GAAW,OAAO;IAAE,IAAI;IAAO,OAAO;GAAmC;GAC3F,OAAO,MAAM,cAAc,WAAW,MAAM,MAAM,QAAQ;EAC5D;EAEA,MAAM,YAAY,QAAQ,QAAQ;GAChC,MAAM,QAAQ,QAAQ;GACtB,IAAI,CAAC,MAAM,WAAW,OAAO,KAAA;GAC7B,MAAM,WAAW,MAAM,8BAA8B;IACnD,MAAM,MAAM;IACZ,kBAAkB;GACpB,CAAC;GAED,OAAO;IAAE,YADU,SAAS,WAAW,QAAQ,SAAS,WAAW,MACjD;IAAG,SAAS;GAA+C;EAC/E;EAEA,MAAM,aAAa,YAAY,QAAQ,QAAQ,UAAU;GACvD,MAAM,QAAQ,QAAQ;GACtB,IAAI,CAAC,MAAM,WAAW,OAAO;GAC7B,MAAM,YAAY,KAAK,YAAY,QAAQ,WAAW,MAAM;GAC5D,IAAI,cAAc,KAAA,GAAW,OAAO;GACpC,QAAQ,MAAM,cAAc,WAAW,MAAM,MAAM,QAAQ,EAAA,CAAG;EAChE;EAEA,kBAAkB;GAChB,QAAQ,MAAM;EAChB;CACF;CAEA,eAAe,cACb,WACA,MACA,UACoF;EACpF,MAAM,YAAa,SAA8B;EACjD,IAAI,OAAO,cAAc,UAAU,OAAO;GAAE,IAAI;GAAO,OAAO;EAAqC;EACnG,MAAM,SAAS,QAAQ,YAAY,CAAC,CAAC,MAAM,cAAc,UAAU,iBAAiB,SAAS;EAC7F,IAAI,WAAW,KAAA,GAAW,OAAO;GAAE,IAAI;GAAO,OAAO;EAAuC;EAC5F,IAAI;GACF,MAAM,eAAe,MAAM,6BAA6B;IAC5C;IACV,mBAAmB;IACnB,gBAAgB,WAAW;IAC3B,cAAc;IACd,yBAAyB;IACzB,YAAY;KACV,IAAI,OAAO;KACX,WAAW,IAAI,WAAW,OAAO,KAAK,OAAO,WAAW,WAAW,CAAC;KACpE,SAAS,OAAO;KAChB,YAAY,OAAO;IACrB;GACF,CAAC;GACD,IAAI,CAAC,aAAa,UAAU,OAAO;IAAE,IAAI;IAAO,OAAO;GAA+B;GACtF,MAAM,mBAAmB,aAAa,mBAAmB;GACzD,IAAI,eAAe,OAAO,SAAS,gBAAgB,MAAM,mBAAmB;IAE1E,QAAQ,iBAAiB,OAAO,EAAE;IAClC,OAAO,mBAAmB,OAAO,MAAM,4DAA4D;IACnG,OAAO;KAAE,IAAI;KAAO,OAAO;IAAkD;GAC/E;GACA,MAAM,UAA4B;IAAE,GAAG;IAAQ,SAAS;IAAkB,YAAY,IAAI;GAAE;GAC5F,QAAQ,eAAe,OAAO;GAC9B,OAAO;IAAE,IAAI;IAAM,YAAY;GAAQ;EACzC,SAAS,OAAO;GACd,OAAO;IAAE,IAAI;IAAO,OAAO,SAAS,KAAK;GAAE;EAC7C;CACF;AACF"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
//#region src/services/webauthnPolicy/index.ts
|
|
2
|
+
/**
|
|
3
|
+
* What a passkey is allowed to prove, and for how long.
|
|
4
|
+
*
|
|
5
|
+
* A session cookie is a bearer token: whoever holds the bytes is you. A passkey
|
|
6
|
+
* is a private key in the device's secure enclave that never leaves it, so the
|
|
7
|
+
* cookie stops being the only thing between a stolen phone and this machine.
|
|
8
|
+
* The cookie does not go away, because a WebSocket cannot run a ceremony per
|
|
9
|
+
* frame; what changes is that the cookie is short-lived, re-mintable with a
|
|
10
|
+
* gesture rather than a QR, and insufficient on its own for the actions below.
|
|
11
|
+
*
|
|
12
|
+
* The crypto lives in the adapter. This file is the policy: which actions need
|
|
13
|
+
* a fresh signature, how long a challenge is good for, and when a counter says
|
|
14
|
+
* the credential has been cloned.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Actions that need a fresh gesture even from a live session.
|
|
18
|
+
*
|
|
19
|
+
* These are escalation paths rather than ordinary prompting or tool approval:
|
|
20
|
+
* credentials redirect machine traffic, sessions run code in a selected directory,
|
|
21
|
+
* repository writes change future sessions, and live MCP operations may start local
|
|
22
|
+
* processes or contact remote servers.
|
|
23
|
+
*/
|
|
24
|
+
const STEP_UP_ACTIONS = [
|
|
25
|
+
"provider.login",
|
|
26
|
+
"provider.logout",
|
|
27
|
+
"session.create",
|
|
28
|
+
"settings.write",
|
|
29
|
+
"mcp.discover",
|
|
30
|
+
"mcp.authorize",
|
|
31
|
+
"computer-use.activate"
|
|
32
|
+
];
|
|
33
|
+
/** Short enough that a captured challenge is useless, long enough for a slow Face ID. */
|
|
34
|
+
const STEP_UP_CHALLENGE_TTL_MS = 6e4;
|
|
35
|
+
/** A registration or sign-in ceremony the user has to complete. */
|
|
36
|
+
const CEREMONY_TTL_MS = 12e4;
|
|
37
|
+
/**
|
|
38
|
+
* Which action, if any, a request is attempting.
|
|
39
|
+
*
|
|
40
|
+
* Matched here rather than at each route so the list of gated operations is one
|
|
41
|
+
* readable table instead of three call sites that can drift apart. Anything not
|
|
42
|
+
* named is not gated, which is the safe default only because the gate is an
|
|
43
|
+
* addition to the session check rather than a replacement for it.
|
|
44
|
+
*/
|
|
45
|
+
const GATED_ROUTES = [
|
|
46
|
+
{
|
|
47
|
+
method: "POST",
|
|
48
|
+
pattern: /^\/api\/sessions$/u,
|
|
49
|
+
action: "session.create"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
method: "POST",
|
|
53
|
+
pattern: /^\/api\/sessions\/[^/]+\/resume$/u,
|
|
54
|
+
action: "session.create"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
method: "POST",
|
|
58
|
+
pattern: /^\/api\/global\/plugin\/doompi\/logins$/u,
|
|
59
|
+
action: "provider.login"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
method: "POST",
|
|
63
|
+
pattern: /^\/api\/global\/plugin\/doompi\/logins\/[^/]+\/answer$/u,
|
|
64
|
+
action: "provider.login"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
method: "DELETE",
|
|
68
|
+
pattern: /^\/api\/global\/plugin\/doompi\/providers\/[^/]+$/u,
|
|
69
|
+
action: "provider.logout"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
method: "PUT",
|
|
73
|
+
pattern: /^\/api\/(?:global|workspaces\/[^/]+)\/plugin\/config\/(?:value|repository\/selection|images)$/u,
|
|
74
|
+
action: "settings.write"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
method: "POST",
|
|
78
|
+
pattern: /^\/api\/auth\/logins\/[^/]+\/answer$/u,
|
|
79
|
+
action: "provider.login"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
method: "DELETE",
|
|
83
|
+
pattern: /^\/api\/auth\/providers\/[^/]+$/u,
|
|
84
|
+
action: "provider.logout"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
method: "PUT",
|
|
88
|
+
pattern: /^\/api\/settings\/(?:value|repository\/selection)$/u,
|
|
89
|
+
action: "settings.write"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
method: "POST",
|
|
93
|
+
pattern: /^\/api\/plugin\/mcp\/repository\/discover$/u,
|
|
94
|
+
action: "mcp.discover"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
method: "POST",
|
|
98
|
+
pattern: /^\/api\/plugin\/mcp\/repository\/authorize$/u,
|
|
99
|
+
action: "mcp.authorize"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
method: "DELETE",
|
|
103
|
+
pattern: /^\/api\/plugin\/mcp\/repository\/authorize\/[^/]+$/u,
|
|
104
|
+
action: "mcp.authorize"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
method: "POST",
|
|
108
|
+
pattern: /^\/api\/plugin\/computer-use\/activate$/u,
|
|
109
|
+
action: "computer-use.activate"
|
|
110
|
+
}
|
|
111
|
+
];
|
|
112
|
+
function stepUpActionFor(method, path) {
|
|
113
|
+
const wanted = method.toUpperCase();
|
|
114
|
+
return GATED_ROUTES.find((route) => route.method === wanted && route.pattern.test(path))?.action;
|
|
115
|
+
}
|
|
116
|
+
function isStepUpAction(value) {
|
|
117
|
+
return typeof value === "string" && STEP_UP_ACTIONS.includes(value);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Whether a signature counter moved the way a real authenticator moves it.
|
|
121
|
+
*
|
|
122
|
+
* A counter that stays at zero means the authenticator does not implement one,
|
|
123
|
+
* which is common and not a signal. A counter that goes backwards or repeats
|
|
124
|
+
* while claiming to count means two things are signing with the same key, which
|
|
125
|
+
* is the definition of a cloned credential.
|
|
126
|
+
*/
|
|
127
|
+
function counterVerdict(stored, presented) {
|
|
128
|
+
if (stored === 0 && presented === 0) return "ok";
|
|
129
|
+
return presented > stored ? "ok" : "clone-suspected";
|
|
130
|
+
}
|
|
131
|
+
/** Whether a ceremony or step-up challenge is still live. */
|
|
132
|
+
function challengeIsFresh(issuedAt, now, ttlMs) {
|
|
133
|
+
return now - issuedAt < ttlMs;
|
|
134
|
+
}
|
|
135
|
+
/** A quick tunnel's domain; its hostname rotates on every start. */
|
|
136
|
+
const ROTATING_SUFFIX = ".trycloudflare.com";
|
|
137
|
+
/** Dotted-quad, and the bracketed form a URL uses for v6. */
|
|
138
|
+
const IPV4 = /^\d{1,3}(?:\.\d{1,3}){3}$/u;
|
|
139
|
+
/**
|
|
140
|
+
* The relying party id a passkey is bound to.
|
|
141
|
+
*
|
|
142
|
+
* Derived from the configured tunnel hostname and nothing else, never from a
|
|
143
|
+
* request header: `rpID` is the entire scope of a credential, so a caller who
|
|
144
|
+
* could influence it could mint credentials against somebody else's origin.
|
|
145
|
+
*
|
|
146
|
+
* Three things are refused rather than accepted and regretted later:
|
|
147
|
+
*
|
|
148
|
+
* - A quick tunnel, whose hostname rotates on every start, so a passkey
|
|
149
|
+
* registered now would silently stop working on the next one.
|
|
150
|
+
* - An IP address, which WebAuthn does not accept as a relying party id at all;
|
|
151
|
+
* registering against one fails in the browser rather than here, which is a
|
|
152
|
+
* much worse place to find out.
|
|
153
|
+
* - Anything without a dot, which cannot be a public tunnel hostname.
|
|
154
|
+
*/
|
|
155
|
+
function relyingPartyId(publicOrigin) {
|
|
156
|
+
if (publicOrigin === void 0) return void 0;
|
|
157
|
+
let host;
|
|
158
|
+
try {
|
|
159
|
+
host = new URL(publicOrigin).hostname.toLowerCase();
|
|
160
|
+
} catch {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
if (host.endsWith(ROTATING_SUFFIX)) return void 0;
|
|
164
|
+
if (IPV4.test(host) || host.startsWith("[")) return void 0;
|
|
165
|
+
if (!host.includes(".")) return void 0;
|
|
166
|
+
return host;
|
|
167
|
+
}
|
|
168
|
+
//#endregion
|
|
169
|
+
exports.CEREMONY_TTL_MS = CEREMONY_TTL_MS;
|
|
170
|
+
exports.STEP_UP_ACTIONS = STEP_UP_ACTIONS;
|
|
171
|
+
exports.STEP_UP_CHALLENGE_TTL_MS = STEP_UP_CHALLENGE_TTL_MS;
|
|
172
|
+
exports.challengeIsFresh = challengeIsFresh;
|
|
173
|
+
exports.counterVerdict = counterVerdict;
|
|
174
|
+
exports.isStepUpAction = isStepUpAction;
|
|
175
|
+
exports.relyingPartyId = relyingPartyId;
|
|
176
|
+
exports.stepUpActionFor = stepUpActionFor;
|
|
177
|
+
|
|
178
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../../src/services/webauthnPolicy/index.ts"],"sourcesContent":["/**\n * What a passkey is allowed to prove, and for how long.\n *\n * A session cookie is a bearer token: whoever holds the bytes is you. A passkey\n * is a private key in the device's secure enclave that never leaves it, so the\n * cookie stops being the only thing between a stolen phone and this machine.\n * The cookie does not go away, because a WebSocket cannot run a ceremony per\n * frame; what changes is that the cookie is short-lived, re-mintable with a\n * gesture rather than a QR, and insufficient on its own for the actions below.\n *\n * The crypto lives in the adapter. This file is the policy: which actions need\n * a fresh signature, how long a challenge is good for, and when a counter says\n * the credential has been cloned.\n */\n\n/**\n * Actions that need a fresh gesture even from a live session.\n *\n * These are escalation paths rather than ordinary prompting or tool approval:\n * credentials redirect machine traffic, sessions run code in a selected directory,\n * repository writes change future sessions, and live MCP operations may start local\n * processes or contact remote servers.\n */\nexport const STEP_UP_ACTIONS = [\n 'provider.login',\n 'provider.logout',\n 'session.create',\n 'settings.write',\n 'mcp.discover',\n 'mcp.authorize',\n 'computer-use.activate',\n] as const;\n\nexport type StepUpAction = (typeof STEP_UP_ACTIONS)[number];\n\n/** Short enough that a captured challenge is useless, long enough for a slow Face ID. */\nexport const STEP_UP_CHALLENGE_TTL_MS = 60_000;\n/** A registration or sign-in ceremony the user has to complete. */\nexport const CEREMONY_TTL_MS = 120_000;\n\n/**\n * Which action, if any, a request is attempting.\n *\n * Matched here rather than at each route so the list of gated operations is one\n * readable table instead of three call sites that can drift apart. Anything not\n * named is not gated, which is the safe default only because the gate is an\n * addition to the session check rather than a replacement for it.\n */\nconst GATED_ROUTES: readonly { method: string; pattern: RegExp; action: StepUpAction }[] = [\n { method: 'POST', pattern: /^\\/api\\/sessions$/u, action: 'session.create' },\n { method: 'POST', pattern: /^\\/api\\/sessions\\/[^/]+\\/resume$/u, action: 'session.create' },\n { method: 'POST', pattern: /^\\/api\\/global\\/plugin\\/doompi\\/logins$/u, action: 'provider.login' },\n { method: 'POST', pattern: /^\\/api\\/global\\/plugin\\/doompi\\/logins\\/[^/]+\\/answer$/u, action: 'provider.login' },\n { method: 'DELETE', pattern: /^\\/api\\/global\\/plugin\\/doompi\\/providers\\/[^/]+$/u, action: 'provider.logout' },\n {\n method: 'PUT',\n pattern: /^\\/api\\/(?:global|workspaces\\/[^/]+)\\/plugin\\/config\\/(?:value|repository\\/selection|images)$/u,\n action: 'settings.write',\n },\n { method: 'POST', pattern: /^\\/api\\/auth\\/logins\\/[^/]+\\/answer$/u, action: 'provider.login' },\n { method: 'DELETE', pattern: /^\\/api\\/auth\\/providers\\/[^/]+$/u, action: 'provider.logout' },\n { method: 'PUT', pattern: /^\\/api\\/settings\\/(?:value|repository\\/selection)$/u, action: 'settings.write' },\n { method: 'POST', pattern: /^\\/api\\/plugin\\/mcp\\/repository\\/discover$/u, action: 'mcp.discover' },\n { method: 'POST', pattern: /^\\/api\\/plugin\\/mcp\\/repository\\/authorize$/u, action: 'mcp.authorize' },\n { method: 'DELETE', pattern: /^\\/api\\/plugin\\/mcp\\/repository\\/authorize\\/[^/]+$/u, action: 'mcp.authorize' },\n { method: 'POST', pattern: /^\\/api\\/plugin\\/computer-use\\/activate$/u, action: 'computer-use.activate' },\n];\nexport function stepUpActionFor(method: string, path: string): StepUpAction | undefined {\n const wanted = method.toUpperCase();\n return GATED_ROUTES.find((route) => route.method === wanted && route.pattern.test(path))?.action;\n}\n\nexport function isStepUpAction(value: unknown): value is StepUpAction {\n return typeof value === 'string' && (STEP_UP_ACTIONS as readonly string[]).includes(value);\n}\n\nexport interface StoredCredential {\n /** Opaque handle for display and revocation. */\n id: string;\n /** The authenticator's credential id, base64url, as WebAuthn reports it. */\n credentialId: string;\n /** Base64url public key; the private half never leaves the device. */\n publicKey: string;\n /** Signature counter, for clone detection. */\n counter: number;\n transports: string[];\n label: string;\n createdAt: number;\n lastUsedAt: number;\n}\n\nexport type CounterVerdict = 'ok' | 'clone-suspected';\n\n/**\n * Whether a signature counter moved the way a real authenticator moves it.\n *\n * A counter that stays at zero means the authenticator does not implement one,\n * which is common and not a signal. A counter that goes backwards or repeats\n * while claiming to count means two things are signing with the same key, which\n * is the definition of a cloned credential.\n */\nexport function counterVerdict(stored: number, presented: number): CounterVerdict {\n if (stored === 0 && presented === 0) return 'ok';\n return presented > stored ? 'ok' : 'clone-suspected';\n}\n\n/** Whether a ceremony or step-up challenge is still live. */\nexport function challengeIsFresh(issuedAt: number, now: number, ttlMs: number): boolean {\n return now - issuedAt < ttlMs;\n}\n\n/** A quick tunnel's domain; its hostname rotates on every start. */\nconst ROTATING_SUFFIX = '.trycloudflare.com';\n/** Dotted-quad, and the bracketed form a URL uses for v6. */\nconst IPV4 = /^\\d{1,3}(?:\\.\\d{1,3}){3}$/u;\n\n/**\n * The relying party id a passkey is bound to.\n *\n * Derived from the configured tunnel hostname and nothing else, never from a\n * request header: `rpID` is the entire scope of a credential, so a caller who\n * could influence it could mint credentials against somebody else's origin.\n *\n * Three things are refused rather than accepted and regretted later:\n *\n * - A quick tunnel, whose hostname rotates on every start, so a passkey\n * registered now would silently stop working on the next one.\n * - An IP address, which WebAuthn does not accept as a relying party id at all;\n * registering against one fails in the browser rather than here, which is a\n * much worse place to find out.\n * - Anything without a dot, which cannot be a public tunnel hostname.\n */\nexport function relyingPartyId(publicOrigin: string | undefined): string | undefined {\n if (publicOrigin === undefined) return undefined;\n let host: string;\n try {\n host = new URL(publicOrigin).hostname.toLowerCase();\n } catch {\n return undefined;\n }\n if (host.endsWith(ROTATING_SUFFIX)) return undefined;\n if (IPV4.test(host) || host.startsWith('[')) return undefined;\n if (!host.includes('.')) return undefined;\n return host;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;AAKA,MAAa,2BAA2B;;AAExC,MAAa,kBAAkB;;;;;;;;;AAU/B,MAAM,eAAqF;CACzF;EAAE,QAAQ;EAAQ,SAAS;EAAsB,QAAQ;CAAiB;CAC1E;EAAE,QAAQ;EAAQ,SAAS;EAAqC,QAAQ;CAAiB;CACzF;EAAE,QAAQ;EAAQ,SAAS;EAA4C,QAAQ;CAAiB;CAChG;EAAE,QAAQ;EAAQ,SAAS;EAA2D,QAAQ;CAAiB;CAC/G;EAAE,QAAQ;EAAU,SAAS;EAAsD,QAAQ;CAAkB;CAC7G;EACE,QAAQ;EACR,SAAS;EACT,QAAQ;CACV;CACA;EAAE,QAAQ;EAAQ,SAAS;EAAyC,QAAQ;CAAiB;CAC7F;EAAE,QAAQ;EAAU,SAAS;EAAoC,QAAQ;CAAkB;CAC3F;EAAE,QAAQ;EAAO,SAAS;EAAuD,QAAQ;CAAiB;CAC1G;EAAE,QAAQ;EAAQ,SAAS;EAA+C,QAAQ;CAAe;CACjG;EAAE,QAAQ;EAAQ,SAAS;EAAgD,QAAQ;CAAgB;CACnG;EAAE,QAAQ;EAAU,SAAS;EAAuD,QAAQ;CAAgB;CAC5G;EAAE,QAAQ;EAAQ,SAAS;EAA4C,QAAQ;CAAwB;AACzG;AACA,SAAgB,gBAAgB,QAAgB,MAAwC;CACtF,MAAM,SAAS,OAAO,YAAY;CAClC,OAAO,aAAa,MAAM,UAAU,MAAM,WAAW,UAAU,MAAM,QAAQ,KAAK,IAAI,CAAC,CAAC,EAAE;AAC5F;AAEA,SAAgB,eAAe,OAAuC;CACpE,OAAO,OAAO,UAAU,YAAa,gBAAsC,SAAS,KAAK;AAC3F;;;;;;;;;AA2BA,SAAgB,eAAe,QAAgB,WAAmC;CAChF,IAAI,WAAW,KAAK,cAAc,GAAG,OAAO;CAC5C,OAAO,YAAY,SAAS,OAAO;AACrC;;AAGA,SAAgB,iBAAiB,UAAkB,KAAa,OAAwB;CACtF,OAAO,MAAM,WAAW;AAC1B;;AAGA,MAAM,kBAAkB;;AAExB,MAAM,OAAO;;;;;;;;;;;;;;;;;AAkBb,SAAgB,eAAe,cAAsD;CACnF,IAAI,iBAAiB,KAAA,GAAW,OAAO,KAAA;CACvC,IAAI;CACJ,IAAI;EACF,OAAO,IAAI,IAAI,YAAY,CAAC,CAAC,SAAS,YAAY;CACpD,QAAQ;EACN;CACF;CACA,IAAI,KAAK,SAAS,eAAe,GAAG,OAAO,KAAA;CAC3C,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,WAAW,GAAG,GAAG,OAAO,KAAA;CACpD,IAAI,CAAC,KAAK,SAAS,GAAG,GAAG,OAAO,KAAA;CAChC,OAAO;AACT"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//#region src/services/webauthnPolicy/index.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* What a passkey is allowed to prove, and for how long.
|
|
4
|
+
*
|
|
5
|
+
* A session cookie is a bearer token: whoever holds the bytes is you. A passkey
|
|
6
|
+
* is a private key in the device's secure enclave that never leaves it, so the
|
|
7
|
+
* cookie stops being the only thing between a stolen phone and this machine.
|
|
8
|
+
* The cookie does not go away, because a WebSocket cannot run a ceremony per
|
|
9
|
+
* frame; what changes is that the cookie is short-lived, re-mintable with a
|
|
10
|
+
* gesture rather than a QR, and insufficient on its own for the actions below.
|
|
11
|
+
*
|
|
12
|
+
* The crypto lives in the adapter. This file is the policy: which actions need
|
|
13
|
+
* a fresh signature, how long a challenge is good for, and when a counter says
|
|
14
|
+
* the credential has been cloned.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Actions that need a fresh gesture even from a live session.
|
|
18
|
+
*
|
|
19
|
+
* These are escalation paths rather than ordinary prompting or tool approval:
|
|
20
|
+
* credentials redirect machine traffic, sessions run code in a selected directory,
|
|
21
|
+
* repository writes change future sessions, and live MCP operations may start local
|
|
22
|
+
* processes or contact remote servers.
|
|
23
|
+
*/
|
|
24
|
+
export declare const STEP_UP_ACTIONS: readonly ['provider.login', 'provider.logout', 'session.create', 'settings.write', 'mcp.discover', 'mcp.authorize', 'computer-use.activate'];
|
|
25
|
+
export type StepUpAction = (typeof STEP_UP_ACTIONS)[number];
|
|
26
|
+
export interface StoredCredential {
|
|
27
|
+
/** Opaque handle for display and revocation. */
|
|
28
|
+
id: string;
|
|
29
|
+
/** The authenticator's credential id, base64url, as WebAuthn reports it. */
|
|
30
|
+
credentialId: string;
|
|
31
|
+
/** Base64url public key; the private half never leaves the device. */
|
|
32
|
+
publicKey: string;
|
|
33
|
+
/** Signature counter, for clone detection. */
|
|
34
|
+
counter: number;
|
|
35
|
+
transports: string[];
|
|
36
|
+
label: string;
|
|
37
|
+
createdAt: number;
|
|
38
|
+
lastUsedAt: number;
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/services/webauthnPolicy/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;qBAuBa;YAUD,uBAAuB;iBA2ClB;;EAEf;;EAEA;;EAEA;;EAEA;EACA;EACA;EACA;EACA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//#region src/services/webauthnPolicy/index.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* What a passkey is allowed to prove, and for how long.
|
|
4
|
+
*
|
|
5
|
+
* A session cookie is a bearer token: whoever holds the bytes is you. A passkey
|
|
6
|
+
* is a private key in the device's secure enclave that never leaves it, so the
|
|
7
|
+
* cookie stops being the only thing between a stolen phone and this machine.
|
|
8
|
+
* The cookie does not go away, because a WebSocket cannot run a ceremony per
|
|
9
|
+
* frame; what changes is that the cookie is short-lived, re-mintable with a
|
|
10
|
+
* gesture rather than a QR, and insufficient on its own for the actions below.
|
|
11
|
+
*
|
|
12
|
+
* The crypto lives in the adapter. This file is the policy: which actions need
|
|
13
|
+
* a fresh signature, how long a challenge is good for, and when a counter says
|
|
14
|
+
* the credential has been cloned.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Actions that need a fresh gesture even from a live session.
|
|
18
|
+
*
|
|
19
|
+
* These are escalation paths rather than ordinary prompting or tool approval:
|
|
20
|
+
* credentials redirect machine traffic, sessions run code in a selected directory,
|
|
21
|
+
* repository writes change future sessions, and live MCP operations may start local
|
|
22
|
+
* processes or contact remote servers.
|
|
23
|
+
*/
|
|
24
|
+
export declare const STEP_UP_ACTIONS: readonly ['provider.login', 'provider.logout', 'session.create', 'settings.write', 'mcp.discover', 'mcp.authorize', 'computer-use.activate'];
|
|
25
|
+
export type StepUpAction = (typeof STEP_UP_ACTIONS)[number];
|
|
26
|
+
export interface StoredCredential {
|
|
27
|
+
/** Opaque handle for display and revocation. */
|
|
28
|
+
id: string;
|
|
29
|
+
/** The authenticator's credential id, base64url, as WebAuthn reports it. */
|
|
30
|
+
credentialId: string;
|
|
31
|
+
/** Base64url public key; the private half never leaves the device. */
|
|
32
|
+
publicKey: string;
|
|
33
|
+
/** Signature counter, for clone detection. */
|
|
34
|
+
counter: number;
|
|
35
|
+
transports: string[];
|
|
36
|
+
label: string;
|
|
37
|
+
createdAt: number;
|
|
38
|
+
lastUsedAt: number;
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/services/webauthnPolicy/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;qBAuBa;YAUD,uBAAuB;iBA2ClB;;EAEf;;EAEA;;EAEA;;EAEA;EACA;EACA;EACA;EACA"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
//#region src/services/webauthnPolicy/index.ts
|
|
2
|
+
/**
|
|
3
|
+
* What a passkey is allowed to prove, and for how long.
|
|
4
|
+
*
|
|
5
|
+
* A session cookie is a bearer token: whoever holds the bytes is you. A passkey
|
|
6
|
+
* is a private key in the device's secure enclave that never leaves it, so the
|
|
7
|
+
* cookie stops being the only thing between a stolen phone and this machine.
|
|
8
|
+
* The cookie does not go away, because a WebSocket cannot run a ceremony per
|
|
9
|
+
* frame; what changes is that the cookie is short-lived, re-mintable with a
|
|
10
|
+
* gesture rather than a QR, and insufficient on its own for the actions below.
|
|
11
|
+
*
|
|
12
|
+
* The crypto lives in the adapter. This file is the policy: which actions need
|
|
13
|
+
* a fresh signature, how long a challenge is good for, and when a counter says
|
|
14
|
+
* the credential has been cloned.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Actions that need a fresh gesture even from a live session.
|
|
18
|
+
*
|
|
19
|
+
* These are escalation paths rather than ordinary prompting or tool approval:
|
|
20
|
+
* credentials redirect machine traffic, sessions run code in a selected directory,
|
|
21
|
+
* repository writes change future sessions, and live MCP operations may start local
|
|
22
|
+
* processes or contact remote servers.
|
|
23
|
+
*/
|
|
24
|
+
const STEP_UP_ACTIONS = [
|
|
25
|
+
"provider.login",
|
|
26
|
+
"provider.logout",
|
|
27
|
+
"session.create",
|
|
28
|
+
"settings.write",
|
|
29
|
+
"mcp.discover",
|
|
30
|
+
"mcp.authorize",
|
|
31
|
+
"computer-use.activate"
|
|
32
|
+
];
|
|
33
|
+
/** Short enough that a captured challenge is useless, long enough for a slow Face ID. */
|
|
34
|
+
const STEP_UP_CHALLENGE_TTL_MS = 6e4;
|
|
35
|
+
/** A registration or sign-in ceremony the user has to complete. */
|
|
36
|
+
const CEREMONY_TTL_MS = 12e4;
|
|
37
|
+
/**
|
|
38
|
+
* Which action, if any, a request is attempting.
|
|
39
|
+
*
|
|
40
|
+
* Matched here rather than at each route so the list of gated operations is one
|
|
41
|
+
* readable table instead of three call sites that can drift apart. Anything not
|
|
42
|
+
* named is not gated, which is the safe default only because the gate is an
|
|
43
|
+
* addition to the session check rather than a replacement for it.
|
|
44
|
+
*/
|
|
45
|
+
const GATED_ROUTES = [
|
|
46
|
+
{
|
|
47
|
+
method: "POST",
|
|
48
|
+
pattern: /^\/api\/sessions$/u,
|
|
49
|
+
action: "session.create"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
method: "POST",
|
|
53
|
+
pattern: /^\/api\/sessions\/[^/]+\/resume$/u,
|
|
54
|
+
action: "session.create"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
method: "POST",
|
|
58
|
+
pattern: /^\/api\/global\/plugin\/doompi\/logins$/u,
|
|
59
|
+
action: "provider.login"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
method: "POST",
|
|
63
|
+
pattern: /^\/api\/global\/plugin\/doompi\/logins\/[^/]+\/answer$/u,
|
|
64
|
+
action: "provider.login"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
method: "DELETE",
|
|
68
|
+
pattern: /^\/api\/global\/plugin\/doompi\/providers\/[^/]+$/u,
|
|
69
|
+
action: "provider.logout"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
method: "PUT",
|
|
73
|
+
pattern: /^\/api\/(?:global|workspaces\/[^/]+)\/plugin\/config\/(?:value|repository\/selection|images)$/u,
|
|
74
|
+
action: "settings.write"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
method: "POST",
|
|
78
|
+
pattern: /^\/api\/auth\/logins\/[^/]+\/answer$/u,
|
|
79
|
+
action: "provider.login"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
method: "DELETE",
|
|
83
|
+
pattern: /^\/api\/auth\/providers\/[^/]+$/u,
|
|
84
|
+
action: "provider.logout"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
method: "PUT",
|
|
88
|
+
pattern: /^\/api\/settings\/(?:value|repository\/selection)$/u,
|
|
89
|
+
action: "settings.write"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
method: "POST",
|
|
93
|
+
pattern: /^\/api\/plugin\/mcp\/repository\/discover$/u,
|
|
94
|
+
action: "mcp.discover"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
method: "POST",
|
|
98
|
+
pattern: /^\/api\/plugin\/mcp\/repository\/authorize$/u,
|
|
99
|
+
action: "mcp.authorize"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
method: "DELETE",
|
|
103
|
+
pattern: /^\/api\/plugin\/mcp\/repository\/authorize\/[^/]+$/u,
|
|
104
|
+
action: "mcp.authorize"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
method: "POST",
|
|
108
|
+
pattern: /^\/api\/plugin\/computer-use\/activate$/u,
|
|
109
|
+
action: "computer-use.activate"
|
|
110
|
+
}
|
|
111
|
+
];
|
|
112
|
+
function stepUpActionFor(method, path) {
|
|
113
|
+
const wanted = method.toUpperCase();
|
|
114
|
+
return GATED_ROUTES.find((route) => route.method === wanted && route.pattern.test(path))?.action;
|
|
115
|
+
}
|
|
116
|
+
function isStepUpAction(value) {
|
|
117
|
+
return typeof value === "string" && STEP_UP_ACTIONS.includes(value);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Whether a signature counter moved the way a real authenticator moves it.
|
|
121
|
+
*
|
|
122
|
+
* A counter that stays at zero means the authenticator does not implement one,
|
|
123
|
+
* which is common and not a signal. A counter that goes backwards or repeats
|
|
124
|
+
* while claiming to count means two things are signing with the same key, which
|
|
125
|
+
* is the definition of a cloned credential.
|
|
126
|
+
*/
|
|
127
|
+
function counterVerdict(stored, presented) {
|
|
128
|
+
if (stored === 0 && presented === 0) return "ok";
|
|
129
|
+
return presented > stored ? "ok" : "clone-suspected";
|
|
130
|
+
}
|
|
131
|
+
/** Whether a ceremony or step-up challenge is still live. */
|
|
132
|
+
function challengeIsFresh(issuedAt, now, ttlMs) {
|
|
133
|
+
return now - issuedAt < ttlMs;
|
|
134
|
+
}
|
|
135
|
+
/** A quick tunnel's domain; its hostname rotates on every start. */
|
|
136
|
+
const ROTATING_SUFFIX = ".trycloudflare.com";
|
|
137
|
+
/** Dotted-quad, and the bracketed form a URL uses for v6. */
|
|
138
|
+
const IPV4 = /^\d{1,3}(?:\.\d{1,3}){3}$/u;
|
|
139
|
+
/**
|
|
140
|
+
* The relying party id a passkey is bound to.
|
|
141
|
+
*
|
|
142
|
+
* Derived from the configured tunnel hostname and nothing else, never from a
|
|
143
|
+
* request header: `rpID` is the entire scope of a credential, so a caller who
|
|
144
|
+
* could influence it could mint credentials against somebody else's origin.
|
|
145
|
+
*
|
|
146
|
+
* Three things are refused rather than accepted and regretted later:
|
|
147
|
+
*
|
|
148
|
+
* - A quick tunnel, whose hostname rotates on every start, so a passkey
|
|
149
|
+
* registered now would silently stop working on the next one.
|
|
150
|
+
* - An IP address, which WebAuthn does not accept as a relying party id at all;
|
|
151
|
+
* registering against one fails in the browser rather than here, which is a
|
|
152
|
+
* much worse place to find out.
|
|
153
|
+
* - Anything without a dot, which cannot be a public tunnel hostname.
|
|
154
|
+
*/
|
|
155
|
+
function relyingPartyId(publicOrigin) {
|
|
156
|
+
if (publicOrigin === void 0) return void 0;
|
|
157
|
+
let host;
|
|
158
|
+
try {
|
|
159
|
+
host = new URL(publicOrigin).hostname.toLowerCase();
|
|
160
|
+
} catch {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
if (host.endsWith(ROTATING_SUFFIX)) return void 0;
|
|
164
|
+
if (IPV4.test(host) || host.startsWith("[")) return void 0;
|
|
165
|
+
if (!host.includes(".")) return void 0;
|
|
166
|
+
return host;
|
|
167
|
+
}
|
|
168
|
+
//#endregion
|
|
169
|
+
export { CEREMONY_TTL_MS, STEP_UP_ACTIONS, STEP_UP_CHALLENGE_TTL_MS, challengeIsFresh, counterVerdict, isStepUpAction, relyingPartyId, stepUpActionFor };
|
|
170
|
+
|
|
171
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/services/webauthnPolicy/index.ts"],"sourcesContent":["/**\n * What a passkey is allowed to prove, and for how long.\n *\n * A session cookie is a bearer token: whoever holds the bytes is you. A passkey\n * is a private key in the device's secure enclave that never leaves it, so the\n * cookie stops being the only thing between a stolen phone and this machine.\n * The cookie does not go away, because a WebSocket cannot run a ceremony per\n * frame; what changes is that the cookie is short-lived, re-mintable with a\n * gesture rather than a QR, and insufficient on its own for the actions below.\n *\n * The crypto lives in the adapter. This file is the policy: which actions need\n * a fresh signature, how long a challenge is good for, and when a counter says\n * the credential has been cloned.\n */\n\n/**\n * Actions that need a fresh gesture even from a live session.\n *\n * These are escalation paths rather than ordinary prompting or tool approval:\n * credentials redirect machine traffic, sessions run code in a selected directory,\n * repository writes change future sessions, and live MCP operations may start local\n * processes or contact remote servers.\n */\nexport const STEP_UP_ACTIONS = [\n 'provider.login',\n 'provider.logout',\n 'session.create',\n 'settings.write',\n 'mcp.discover',\n 'mcp.authorize',\n 'computer-use.activate',\n] as const;\n\nexport type StepUpAction = (typeof STEP_UP_ACTIONS)[number];\n\n/** Short enough that a captured challenge is useless, long enough for a slow Face ID. */\nexport const STEP_UP_CHALLENGE_TTL_MS = 60_000;\n/** A registration or sign-in ceremony the user has to complete. */\nexport const CEREMONY_TTL_MS = 120_000;\n\n/**\n * Which action, if any, a request is attempting.\n *\n * Matched here rather than at each route so the list of gated operations is one\n * readable table instead of three call sites that can drift apart. Anything not\n * named is not gated, which is the safe default only because the gate is an\n * addition to the session check rather than a replacement for it.\n */\nconst GATED_ROUTES: readonly { method: string; pattern: RegExp; action: StepUpAction }[] = [\n { method: 'POST', pattern: /^\\/api\\/sessions$/u, action: 'session.create' },\n { method: 'POST', pattern: /^\\/api\\/sessions\\/[^/]+\\/resume$/u, action: 'session.create' },\n { method: 'POST', pattern: /^\\/api\\/global\\/plugin\\/doompi\\/logins$/u, action: 'provider.login' },\n { method: 'POST', pattern: /^\\/api\\/global\\/plugin\\/doompi\\/logins\\/[^/]+\\/answer$/u, action: 'provider.login' },\n { method: 'DELETE', pattern: /^\\/api\\/global\\/plugin\\/doompi\\/providers\\/[^/]+$/u, action: 'provider.logout' },\n {\n method: 'PUT',\n pattern: /^\\/api\\/(?:global|workspaces\\/[^/]+)\\/plugin\\/config\\/(?:value|repository\\/selection|images)$/u,\n action: 'settings.write',\n },\n { method: 'POST', pattern: /^\\/api\\/auth\\/logins\\/[^/]+\\/answer$/u, action: 'provider.login' },\n { method: 'DELETE', pattern: /^\\/api\\/auth\\/providers\\/[^/]+$/u, action: 'provider.logout' },\n { method: 'PUT', pattern: /^\\/api\\/settings\\/(?:value|repository\\/selection)$/u, action: 'settings.write' },\n { method: 'POST', pattern: /^\\/api\\/plugin\\/mcp\\/repository\\/discover$/u, action: 'mcp.discover' },\n { method: 'POST', pattern: /^\\/api\\/plugin\\/mcp\\/repository\\/authorize$/u, action: 'mcp.authorize' },\n { method: 'DELETE', pattern: /^\\/api\\/plugin\\/mcp\\/repository\\/authorize\\/[^/]+$/u, action: 'mcp.authorize' },\n { method: 'POST', pattern: /^\\/api\\/plugin\\/computer-use\\/activate$/u, action: 'computer-use.activate' },\n];\nexport function stepUpActionFor(method: string, path: string): StepUpAction | undefined {\n const wanted = method.toUpperCase();\n return GATED_ROUTES.find((route) => route.method === wanted && route.pattern.test(path))?.action;\n}\n\nexport function isStepUpAction(value: unknown): value is StepUpAction {\n return typeof value === 'string' && (STEP_UP_ACTIONS as readonly string[]).includes(value);\n}\n\nexport interface StoredCredential {\n /** Opaque handle for display and revocation. */\n id: string;\n /** The authenticator's credential id, base64url, as WebAuthn reports it. */\n credentialId: string;\n /** Base64url public key; the private half never leaves the device. */\n publicKey: string;\n /** Signature counter, for clone detection. */\n counter: number;\n transports: string[];\n label: string;\n createdAt: number;\n lastUsedAt: number;\n}\n\nexport type CounterVerdict = 'ok' | 'clone-suspected';\n\n/**\n * Whether a signature counter moved the way a real authenticator moves it.\n *\n * A counter that stays at zero means the authenticator does not implement one,\n * which is common and not a signal. A counter that goes backwards or repeats\n * while claiming to count means two things are signing with the same key, which\n * is the definition of a cloned credential.\n */\nexport function counterVerdict(stored: number, presented: number): CounterVerdict {\n if (stored === 0 && presented === 0) return 'ok';\n return presented > stored ? 'ok' : 'clone-suspected';\n}\n\n/** Whether a ceremony or step-up challenge is still live. */\nexport function challengeIsFresh(issuedAt: number, now: number, ttlMs: number): boolean {\n return now - issuedAt < ttlMs;\n}\n\n/** A quick tunnel's domain; its hostname rotates on every start. */\nconst ROTATING_SUFFIX = '.trycloudflare.com';\n/** Dotted-quad, and the bracketed form a URL uses for v6. */\nconst IPV4 = /^\\d{1,3}(?:\\.\\d{1,3}){3}$/u;\n\n/**\n * The relying party id a passkey is bound to.\n *\n * Derived from the configured tunnel hostname and nothing else, never from a\n * request header: `rpID` is the entire scope of a credential, so a caller who\n * could influence it could mint credentials against somebody else's origin.\n *\n * Three things are refused rather than accepted and regretted later:\n *\n * - A quick tunnel, whose hostname rotates on every start, so a passkey\n * registered now would silently stop working on the next one.\n * - An IP address, which WebAuthn does not accept as a relying party id at all;\n * registering against one fails in the browser rather than here, which is a\n * much worse place to find out.\n * - Anything without a dot, which cannot be a public tunnel hostname.\n */\nexport function relyingPartyId(publicOrigin: string | undefined): string | undefined {\n if (publicOrigin === undefined) return undefined;\n let host: string;\n try {\n host = new URL(publicOrigin).hostname.toLowerCase();\n } catch {\n return undefined;\n }\n if (host.endsWith(ROTATING_SUFFIX)) return undefined;\n if (IPV4.test(host) || host.startsWith('[')) return undefined;\n if (!host.includes('.')) return undefined;\n return host;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;AAKA,MAAa,2BAA2B;;AAExC,MAAa,kBAAkB;;;;;;;;;AAU/B,MAAM,eAAqF;CACzF;EAAE,QAAQ;EAAQ,SAAS;EAAsB,QAAQ;CAAiB;CAC1E;EAAE,QAAQ;EAAQ,SAAS;EAAqC,QAAQ;CAAiB;CACzF;EAAE,QAAQ;EAAQ,SAAS;EAA4C,QAAQ;CAAiB;CAChG;EAAE,QAAQ;EAAQ,SAAS;EAA2D,QAAQ;CAAiB;CAC/G;EAAE,QAAQ;EAAU,SAAS;EAAsD,QAAQ;CAAkB;CAC7G;EACE,QAAQ;EACR,SAAS;EACT,QAAQ;CACV;CACA;EAAE,QAAQ;EAAQ,SAAS;EAAyC,QAAQ;CAAiB;CAC7F;EAAE,QAAQ;EAAU,SAAS;EAAoC,QAAQ;CAAkB;CAC3F;EAAE,QAAQ;EAAO,SAAS;EAAuD,QAAQ;CAAiB;CAC1G;EAAE,QAAQ;EAAQ,SAAS;EAA+C,QAAQ;CAAe;CACjG;EAAE,QAAQ;EAAQ,SAAS;EAAgD,QAAQ;CAAgB;CACnG;EAAE,QAAQ;EAAU,SAAS;EAAuD,QAAQ;CAAgB;CAC5G;EAAE,QAAQ;EAAQ,SAAS;EAA4C,QAAQ;CAAwB;AACzG;AACA,SAAgB,gBAAgB,QAAgB,MAAwC;CACtF,MAAM,SAAS,OAAO,YAAY;CAClC,OAAO,aAAa,MAAM,UAAU,MAAM,WAAW,UAAU,MAAM,QAAQ,KAAK,IAAI,CAAC,CAAC,EAAE;AAC5F;AAEA,SAAgB,eAAe,OAAuC;CACpE,OAAO,OAAO,UAAU,YAAa,gBAAsC,SAAS,KAAK;AAC3F;;;;;;;;;AA2BA,SAAgB,eAAe,QAAgB,WAAmC;CAChF,IAAI,WAAW,KAAK,cAAc,GAAG,OAAO;CAC5C,OAAO,YAAY,SAAS,OAAO;AACrC;;AAGA,SAAgB,iBAAiB,UAAkB,KAAa,OAAwB;CACtF,OAAO,MAAM,WAAW;AAC1B;;AAGA,MAAM,kBAAkB;;AAExB,MAAM,OAAO;;;;;;;;;;;;;;;;;AAkBb,SAAgB,eAAe,cAAsD;CACnF,IAAI,iBAAiB,KAAA,GAAW,OAAO,KAAA;CACvC,IAAI;CACJ,IAAI;EACF,OAAO,IAAI,IAAI,YAAY,CAAC,CAAC,SAAS,YAAY;CACpD,QAAQ;EACN;CACF;CACA,IAAI,KAAK,SAAS,eAAe,GAAG,OAAO,KAAA;CAC3C,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,WAAW,GAAG,GAAG,OAAO,KAAA;CACpD,IAAI,CAAC,KAAK,SAAS,GAAG,GAAG,OAAO,KAAA;CAChC,OAAO;AACT"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
let node_fs = require("node:fs");
|
|
4
|
+
node_fs = require_runtime.__toESM(node_fs, 1);
|
|
5
|
+
let node_path = require("node:path");
|
|
6
|
+
node_path = require_runtime.__toESM(node_path, 1);
|
|
7
|
+
//#region src/server/sessionFilesApi.ts
|
|
8
|
+
const EXCLUDED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
|
|
9
|
+
const FILE_QUERY_TIMEOUT_MS = 2e3;
|
|
10
|
+
const MAX_FILE_RESULTS = 50;
|
|
11
|
+
async function listSessionFiles(cwd, query, signal) {
|
|
12
|
+
const deadline = Date.now() + FILE_QUERY_TIMEOUT_MS;
|
|
13
|
+
const pending = [""];
|
|
14
|
+
const matches = [];
|
|
15
|
+
while (pending.length > 0) {
|
|
16
|
+
if (signal.aborted) throw signal.reason instanceof Error ? signal.reason : /* @__PURE__ */ new Error("File completion was aborted.");
|
|
17
|
+
if (Date.now() > deadline) throw new Error("File completion timed out.");
|
|
18
|
+
const relativeDirectory = pending.pop();
|
|
19
|
+
if (relativeDirectory === void 0) break;
|
|
20
|
+
const entries = await node_fs.default.promises.readdir(node_path.default.join(cwd, relativeDirectory), { withFileTypes: true });
|
|
21
|
+
for (const entry of entries) {
|
|
22
|
+
const relativePath = node_path.default.join(relativeDirectory, entry.name);
|
|
23
|
+
if (entry.isDirectory() && !EXCLUDED_DIRECTORIES.has(entry.name)) pending.push(relativePath);
|
|
24
|
+
else if (entry.isFile()) {
|
|
25
|
+
const file = relativePath.split(node_path.default.sep).join("/");
|
|
26
|
+
if (file.toLowerCase().includes(query)) matches.push(file);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return matches.sort().slice(0, MAX_FILE_RESULTS);
|
|
31
|
+
}
|
|
32
|
+
/** Bounded, read-only file completion rooted in the owning session. */
|
|
33
|
+
const sessionFilesApi = {
|
|
34
|
+
basePath: "files",
|
|
35
|
+
start(context) {
|
|
36
|
+
if (context.scope !== "session" || !context.cwd) throw new Error("File completion requires a session.");
|
|
37
|
+
const cwd = context.cwd;
|
|
38
|
+
let closed = false;
|
|
39
|
+
return {
|
|
40
|
+
async fetch(request) {
|
|
41
|
+
if (closed) return new Response(null, { status: 503 });
|
|
42
|
+
const url = new URL(request.url);
|
|
43
|
+
if (request.method !== "GET" || url.pathname !== "/") return new Response(null, { status: 404 });
|
|
44
|
+
const query = (url.searchParams.get("q") ?? "").toLowerCase();
|
|
45
|
+
if (query.length > 256) return Response.json({ error: "File query is too long." }, { status: 400 });
|
|
46
|
+
try {
|
|
47
|
+
return Response.json({ files: await listSessionFiles(cwd, query, request.signal) });
|
|
48
|
+
} catch {
|
|
49
|
+
return Response.json({ error: "File completion could not be read." }, { status: 503 });
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
close() {
|
|
53
|
+
closed = true;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
//#endregion
|
|
59
|
+
exports.sessionFilesApi = sessionFilesApi;
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=session-files-api.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-files-api.cjs","names":["fs","path"],"sources":["../src/server/sessionFilesApi.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\nimport type { DoomApi } from '../exports/packageApi';\n\nconst EXCLUDED_DIRECTORIES = new Set(['.git', 'node_modules']);\nconst FILE_QUERY_TIMEOUT_MS = 2000;\nconst MAX_FILE_RESULTS = 50;\n\nasync function listSessionFiles(cwd: string, query: string, signal: AbortSignal): Promise<string[]> {\n const deadline = Date.now() + FILE_QUERY_TIMEOUT_MS;\n const pending = [''];\n const matches: string[] = [];\n\n while (pending.length > 0) {\n if (signal.aborted) {\n throw signal.reason instanceof Error ? signal.reason : new Error('File completion was aborted.');\n }\n if (Date.now() > deadline) throw new Error('File completion timed out.');\n const relativeDirectory = pending.pop();\n if (relativeDirectory === undefined) break;\n const entries = await fs.promises.readdir(path.join(cwd, relativeDirectory), { withFileTypes: true });\n for (const entry of entries) {\n const relativePath = path.join(relativeDirectory, entry.name);\n if (entry.isDirectory() && !EXCLUDED_DIRECTORIES.has(entry.name)) {\n pending.push(relativePath);\n } else if (entry.isFile()) {\n const file = relativePath.split(path.sep).join('/');\n if (file.toLowerCase().includes(query)) matches.push(file);\n }\n }\n }\n\n return matches.sort().slice(0, MAX_FILE_RESULTS);\n}\n\n/** Bounded, read-only file completion rooted in the owning session. */\nexport const sessionFilesApi: DoomApi = {\n basePath: 'files',\n start(context) {\n if (context.scope !== 'session' || !context.cwd) throw new Error('File completion requires a session.');\n const cwd = context.cwd;\n let closed = false;\n return {\n async fetch(request) {\n if (closed) return new Response(null, { status: 503 });\n const url = new URL(request.url);\n if (request.method !== 'GET' || url.pathname !== '/') return new Response(null, { status: 404 });\n const query = (url.searchParams.get('q') ?? '').toLowerCase();\n if (query.length > 256) return Response.json({ error: 'File query is too long.' }, { status: 400 });\n try {\n return Response.json({ files: await listSessionFiles(cwd, query, request.signal) });\n } catch {\n return Response.json({ error: 'File completion could not be read.' }, { status: 503 });\n }\n },\n close() {\n closed = true;\n },\n };\n },\n};\n"],"mappings":";;;;;;;AAKA,MAAM,uCAAuB,IAAI,IAAI,CAAC,QAAQ,cAAc,CAAC;AAC7D,MAAM,wBAAwB;AAC9B,MAAM,mBAAmB;AAEzB,eAAe,iBAAiB,KAAa,OAAe,QAAwC;CAClG,MAAM,WAAW,KAAK,IAAI,IAAI;CAC9B,MAAM,UAAU,CAAC,EAAE;CACnB,MAAM,UAAoB,CAAC;CAE3B,OAAO,QAAQ,SAAS,GAAG;EACzB,IAAI,OAAO,SACT,MAAM,OAAO,kBAAkB,QAAQ,OAAO,yBAAS,IAAI,MAAM,8BAA8B;EAEjG,IAAI,KAAK,IAAI,IAAI,UAAU,MAAM,IAAI,MAAM,4BAA4B;EACvE,MAAM,oBAAoB,QAAQ,IAAI;EACtC,IAAI,sBAAsB,KAAA,GAAW;EACrC,MAAM,UAAU,MAAMA,QAAAA,QAAG,SAAS,QAAQC,UAAAA,QAAK,KAAK,KAAK,iBAAiB,GAAG,EAAE,eAAe,KAAK,CAAC;EACpG,KAAK,MAAM,SAAS,SAAS;GAC3B,MAAM,eAAeA,UAAAA,QAAK,KAAK,mBAAmB,MAAM,IAAI;GAC5D,IAAI,MAAM,YAAY,KAAK,CAAC,qBAAqB,IAAI,MAAM,IAAI,GAC7D,QAAQ,KAAK,YAAY;QACpB,IAAI,MAAM,OAAO,GAAG;IACzB,MAAM,OAAO,aAAa,MAAMA,UAAAA,QAAK,GAAG,CAAC,CAAC,KAAK,GAAG;IAClD,IAAI,KAAK,YAAY,CAAC,CAAC,SAAS,KAAK,GAAG,QAAQ,KAAK,IAAI;GAC3D;EACF;CACF;CAEA,OAAO,QAAQ,KAAK,CAAC,CAAC,MAAM,GAAG,gBAAgB;AACjD;;AAGA,MAAa,kBAA2B;CACtC,UAAU;CACV,MAAM,SAAS;EACb,IAAI,QAAQ,UAAU,aAAa,CAAC,QAAQ,KAAK,MAAM,IAAI,MAAM,qCAAqC;EACtG,MAAM,MAAM,QAAQ;EACpB,IAAI,SAAS;EACb,OAAO;GACL,MAAM,MAAM,SAAS;IACnB,IAAI,QAAQ,OAAO,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC;IACrD,MAAM,MAAM,IAAI,IAAI,QAAQ,GAAG;IAC/B,IAAI,QAAQ,WAAW,SAAS,IAAI,aAAa,KAAK,OAAO,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC;IAC/F,MAAM,SAAS,IAAI,aAAa,IAAI,GAAG,KAAK,GAAA,CAAI,YAAY;IAC5D,IAAI,MAAM,SAAS,KAAK,OAAO,SAAS,KAAK,EAAE,OAAO,0BAA0B,GAAG,EAAE,QAAQ,IAAI,CAAC;IAClG,IAAI;KACF,OAAO,SAAS,KAAK,EAAE,OAAO,MAAM,iBAAiB,KAAK,OAAO,QAAQ,MAAM,EAAE,CAAC;IACpF,QAAQ;KACN,OAAO,SAAS,KAAK,EAAE,OAAO,qCAAqC,GAAG,EAAE,QAAQ,IAAI,CAAC;IACvF;GACF;GACA,QAAQ;IACN,SAAS;GACX;EACF;CACF;AACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DoomApi } from "./schemas/packageApi.cjs";
|
|
2
|
+
import "./package-api.cjs";
|
|
3
|
+
//#region src/server/sessionFilesApi.d.ts
|
|
4
|
+
/** Bounded, read-only file completion rooted in the owning session. */
|
|
5
|
+
export declare const sessionFilesApi: DoomApi;
|
|
6
|
+
//#endregion
|
|
7
|
+
//# sourceMappingURL=session-files-api.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-files-api.d.cts","names":[],"sources":["../src/server/sessionFilesApi.ts"],"mappings":";;;;qBAqCa,iBAAiB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DoomApi } from "./schemas/packageApi.mjs";
|
|
2
|
+
import "./package-api.mjs";
|
|
3
|
+
//#region src/server/sessionFilesApi.d.ts
|
|
4
|
+
/** Bounded, read-only file completion rooted in the owning session. */
|
|
5
|
+
export declare const sessionFilesApi: DoomApi;
|
|
6
|
+
//#endregion
|
|
7
|
+
//# sourceMappingURL=session-files-api.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-files-api.d.mts","names":[],"sources":["../src/server/sessionFilesApi.ts"],"mappings":";;;;qBAqCa,iBAAiB"}
|