@agimon-ai/doompi-core 0.0.1-alpha.100
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/agentModel.cjs +4 -0
- package/dist/agentModel.d.mts +2 -0
- package/dist/agentModel.mjs +2 -0
- package/dist/apiContracts.cjs +2009 -0
- package/dist/apiContracts.cjs.map +1 -0
- package/dist/apiContracts.d.mts +1018 -0
- package/dist/apiContracts.d.mts.map +1 -0
- package/dist/apiContracts.mjs +1989 -0
- package/dist/apiContracts.mjs.map +1 -0
- package/dist/askUser.cjs +8 -0
- package/dist/askUser.d.mts +2 -0
- package/dist/askUser.mjs +2 -0
- package/dist/authorTools.cjs +5 -0
- package/dist/authorTools.d.mts +2 -0
- package/dist/authorTools.mjs +2 -0
- package/dist/backgroundWork.cjs +7 -0
- package/dist/backgroundWork.d.mts +2 -0
- package/dist/backgroundWork.mjs +2 -0
- package/dist/bundleAssetPolicy.cjs +5 -0
- package/dist/bundleAssetPolicy.d.mts +2 -0
- package/dist/bundleAssetPolicy.mjs +2 -0
- package/dist/childProcess.cjs +15 -0
- package/dist/childProcess.d.mts +2 -0
- package/dist/childProcess.mjs +2 -0
- package/dist/childSession.cjs +8 -0
- package/dist/childSession.d.mts +3 -0
- package/dist/childSession.mjs +3 -0
- package/dist/cockpitContainer.cjs +4 -0
- package/dist/cockpitContainer.d.mts +2 -0
- package/dist/cockpitContainer.mjs +2 -0
- package/dist/config.cjs +13 -0
- package/dist/config.d.mts +3 -0
- package/dist/config.mjs +2 -0
- package/dist/contextApi.cjs +10 -0
- package/dist/contextApi.d.mts +4 -0
- package/dist/contextApi.mjs +3 -0
- package/dist/contextContributions.cjs +7 -0
- package/dist/contextContributions.d.mts +3 -0
- package/dist/contextContributions.mjs +3 -0
- package/dist/contextDetail.cjs +65 -0
- package/dist/contextDetail.cjs.map +1 -0
- package/dist/contextDetail.d.mts +19 -0
- package/dist/contextDetail.d.mts.map +1 -0
- package/dist/contextDetail.mjs +64 -0
- package/dist/contextDetail.mjs.map +1 -0
- package/dist/contextDetailStore.cjs +100 -0
- package/dist/contextDetailStore.cjs.map +1 -0
- package/dist/contextDetailStore.d.mts +19 -0
- package/dist/contextDetailStore.d.mts.map +1 -0
- package/dist/contextDetailStore.mjs +91 -0
- package/dist/contextDetailStore.mjs.map +1 -0
- package/dist/contextProjection.cjs +121 -0
- package/dist/contextProjection.cjs.map +1 -0
- package/dist/contextProjection.d.mts +130 -0
- package/dist/contextProjection.d.mts.map +1 -0
- package/dist/contextProjection.mjs +117 -0
- package/dist/contextProjection.mjs.map +1 -0
- package/dist/cordisHost.cjs +11 -0
- package/dist/cordisHost.d.mts +2 -0
- package/dist/cordisHost.mjs +2 -0
- package/dist/delegation.cjs +18 -0
- package/dist/delegation.d.mts +2 -0
- package/dist/delegation.mjs +2 -0
- package/dist/doomPackage.cjs +61 -0
- package/dist/doomPackage.cjs.map +1 -0
- package/dist/doomPackage.d.mts +17 -0
- package/dist/doomPackage.d.mts.map +1 -0
- package/dist/doomPackage.mjs +54 -0
- package/dist/doomPackage.mjs.map +1 -0
- package/dist/executionBudget.cjs +231 -0
- package/dist/executionBudget.cjs.map +1 -0
- package/dist/executionBudget.d.mts +11 -0
- package/dist/executionBudget.d.mts.map +1 -0
- package/dist/executionBudget.mjs +225 -0
- package/dist/executionBudget.mjs.map +1 -0
- package/dist/extensionFile.cjs +24 -0
- package/dist/extensionFile.d.mts +3 -0
- package/dist/extensionFile.mjs +2 -0
- package/dist/footer.cjs +6 -0
- package/dist/footer.d.mts +2 -0
- package/dist/footer.mjs +2 -0
- package/dist/headless.cjs +9 -0
- package/dist/headless.d.mts +2 -0
- package/dist/headless.mjs +2 -0
- package/dist/headlessHub.cjs +914 -0
- package/dist/headlessHub.cjs.map +1 -0
- package/dist/headlessHub.d.mts +157 -0
- package/dist/headlessHub.d.mts.map +1 -0
- package/dist/headlessHub.mjs +911 -0
- package/dist/headlessHub.mjs.map +1 -0
- package/dist/headlessServer.cjs +910 -0
- package/dist/headlessServer.cjs.map +1 -0
- package/dist/headlessServer.d.mts +64 -0
- package/dist/headlessServer.d.mts.map +1 -0
- package/dist/headlessServer.mjs +904 -0
- package/dist/headlessServer.mjs.map +1 -0
- package/dist/headlessSessionHost.cjs +0 -0
- package/dist/headlessSessionHost.d.mts +71 -0
- package/dist/headlessSessionHost.d.mts.map +1 -0
- package/dist/headlessSessionHost.mjs +1 -0
- package/dist/headlessSessionManager.cjs +51 -0
- package/dist/headlessSessionManager.cjs.map +1 -0
- package/dist/headlessSessionManager.d.mts +6 -0
- package/dist/headlessSessionManager.d.mts.map +1 -0
- package/dist/headlessSessionManager.mjs +50 -0
- package/dist/headlessSessionManager.mjs.map +1 -0
- package/dist/help.cjs +24 -0
- package/dist/help.d.mts +3 -0
- package/dist/help.mjs +3 -0
- package/dist/history.cjs +25 -0
- package/dist/history.d.mts +10 -0
- package/dist/history.mjs +10 -0
- package/dist/historyImport.cjs +553 -0
- package/dist/historyImport.cjs.map +1 -0
- package/dist/historyImport.d.mts +76 -0
- package/dist/historyImport.d.mts.map +1 -0
- package/dist/historyImport.mjs +547 -0
- package/dist/historyImport.mjs.map +1 -0
- package/dist/historyOwnership.cjs +253 -0
- package/dist/historyOwnership.cjs.map +1 -0
- package/dist/historyOwnership.d.mts +23 -0
- package/dist/historyOwnership.d.mts.map +1 -0
- package/dist/historyOwnership.mjs +247 -0
- package/dist/historyOwnership.mjs.map +1 -0
- package/dist/hubChannel.cjs +4 -0
- package/dist/hubChannel.d.mts +2 -0
- package/dist/hubChannel.mjs +2 -0
- package/dist/index.cjs +44 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.mjs +6 -0
- package/dist/json.cjs +6 -0
- package/dist/json.d.mts +2 -0
- package/dist/json.mjs +2 -0
- package/dist/jsonlSessionRepo.cjs +217 -0
- package/dist/jsonlSessionRepo.cjs.map +1 -0
- package/dist/jsonlSessionRepo.d.mts +7 -0
- package/dist/jsonlSessionRepo.d.mts.map +1 -0
- package/dist/jsonlSessionRepo.mjs +212 -0
- package/dist/jsonlSessionRepo.mjs.map +1 -0
- package/dist/kernel.cjs +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.mts +2 -0
- package/dist/leader.mjs +2 -0
- package/dist/logSinkTelemetry.cjs +5 -0
- package/dist/logSinkTelemetry.d.mts +2 -0
- package/dist/logSinkTelemetry.mjs +2 -0
- package/dist/machineApi.cjs +92 -0
- package/dist/machineApi.cjs.map +1 -0
- package/dist/machineApi.d.mts +7 -0
- package/dist/machineApi.d.mts.map +1 -0
- package/dist/machineApi.mjs +88 -0
- package/dist/machineApi.mjs.map +1 -0
- package/dist/main.cjs +11 -0
- package/dist/main.d.mts +5 -0
- package/dist/main.mjs +4 -0
- package/dist/mcpFacet.cjs +12 -0
- package/dist/mcpFacet.d.mts +4 -0
- package/dist/mcpFacet.mjs +4 -0
- package/dist/mcpProjection.cjs +16 -0
- package/dist/mcpProjection.d.mts +2 -0
- package/dist/mcpProjection.mjs +2 -0
- package/dist/mcpSchemaCost.cjs +195 -0
- package/dist/mcpSchemaCost.cjs.map +1 -0
- package/dist/mcpSchemaCost.d.mts +35 -0
- package/dist/mcpSchemaCost.d.mts.map +1 -0
- package/dist/mcpSchemaCost.mjs +190 -0
- package/dist/mcpSchemaCost.mjs.map +1 -0
- package/dist/mcpSession.cjs +9 -0
- package/dist/mcpSession.d.mts +2 -0
- package/dist/mcpSession.mjs +2 -0
- package/dist/mcpStatus.cjs +7 -0
- package/dist/mcpStatus.d.mts +2 -0
- package/dist/mcpStatus.mjs +2 -0
- package/dist/mcpToolResolver.cjs +5 -0
- package/dist/mcpToolResolver.d.mts +2 -0
- package/dist/mcpToolResolver.mjs +2 -0
- package/dist/mcpWidget.cjs +0 -0
- package/dist/mcpWidget.d.mts +2 -0
- package/dist/mcpWidget.mjs +1 -0
- package/dist/moduleResolution.cjs +405 -0
- package/dist/moduleResolution.cjs.map +1 -0
- package/dist/moduleResolution.d.mts +67 -0
- package/dist/moduleResolution.d.mts.map +1 -0
- package/dist/moduleResolution.mjs +389 -0
- package/dist/moduleResolution.mjs.map +1 -0
- package/dist/narration.cjs +10 -0
- package/dist/narration.d.mts +2 -0
- package/dist/narration.mjs +2 -0
- package/dist/notification.cjs +17 -0
- package/dist/notification.d.mts +2 -0
- package/dist/notification.mjs +2 -0
- package/dist/packageApi.cjs +16 -0
- package/dist/packageApi.d.mts +3 -0
- package/dist/packageApi.mjs +3 -0
- package/dist/packageApiServer.cjs +191 -0
- package/dist/packageApiServer.cjs.map +1 -0
- package/dist/packageApiServer.d.mts +57 -0
- package/dist/packageApiServer.d.mts.map +1 -0
- package/dist/packageApiServer.mjs +189 -0
- package/dist/packageApiServer.mjs.map +1 -0
- package/dist/piExtension.cjs +13 -0
- package/dist/piExtension.d.mts +5 -0
- package/dist/piExtension.mjs +4 -0
- package/dist/piSettings.cjs +12 -0
- package/dist/piSettings.d.mts +2 -0
- package/dist/piSettings.mjs +2 -0
- package/dist/pluginProtocol.cjs +10 -0
- package/dist/pluginProtocol.d.mts +2 -0
- package/dist/pluginProtocol.mjs +2 -0
- package/dist/profileIdentity.cjs +6 -0
- package/dist/profileIdentity.d.mts +2 -0
- package/dist/profileIdentity.mjs +2 -0
- package/dist/protocol.cjs +10 -0
- package/dist/protocol.d.mts +2 -0
- package/dist/protocol.mjs +2 -0
- package/dist/readiness.cjs +8 -0
- package/dist/readiness.d.mts +2 -0
- package/dist/readiness.mjs +2 -0
- package/dist/relaunchHandoff.cjs +6 -0
- package/dist/relaunchHandoff.d.mts +2 -0
- package/dist/relaunchHandoff.mjs +2 -0
- package/dist/remoteApi.cjs +42 -0
- package/dist/remoteApi.cjs.map +1 -0
- package/dist/remoteApi.d.mts +7 -0
- package/dist/remoteApi.d.mts.map +1 -0
- package/dist/remoteApi.mjs +41 -0
- package/dist/remoteApi.mjs.map +1 -0
- package/dist/remoteRuntime.cjs +460 -0
- package/dist/remoteRuntime.cjs.map +1 -0
- package/dist/remoteRuntime.d.mts +28 -0
- package/dist/remoteRuntime.d.mts.map +1 -0
- package/dist/remoteRuntime.mjs +456 -0
- package/dist/remoteRuntime.mjs.map +1 -0
- package/dist/runtimeConfig.cjs +232 -0
- package/dist/runtimeConfig.cjs.map +1 -0
- package/dist/runtimeConfig.d.mts +313 -0
- package/dist/runtimeConfig.d.mts.map +1 -0
- package/dist/runtimeConfig.mjs +221 -0
- package/dist/runtimeConfig.mjs.map +1 -0
- package/dist/runtimeContextApi.cjs +64 -0
- package/dist/runtimeContextApi.cjs.map +1 -0
- package/dist/runtimeContextApi.d.mts +16 -0
- package/dist/runtimeContextApi.d.mts.map +1 -0
- package/dist/runtimeContextApi.mjs +62 -0
- package/dist/runtimeContextApi.mjs.map +1 -0
- package/dist/runtimeCordisHost.cjs +193 -0
- package/dist/runtimeCordisHost.cjs.map +1 -0
- package/dist/runtimeCordisHost.d.mts +63 -0
- package/dist/runtimeCordisHost.d.mts.map +1 -0
- package/dist/runtimeCordisHost.mjs +184 -0
- package/dist/runtimeCordisHost.mjs.map +1 -0
- package/dist/runtimeHeadlessSessionManager.cjs +0 -0
- package/dist/runtimeHeadlessSessionManager.d.mts +18 -0
- package/dist/runtimeHeadlessSessionManager.d.mts.map +1 -0
- package/dist/runtimeHeadlessSessionManager.mjs +1 -0
- package/dist/runtimeIdentity.cjs +26 -0
- package/dist/runtimeIdentity.cjs.map +1 -0
- package/dist/runtimeIdentity.d.mts +7 -0
- package/dist/runtimeIdentity.d.mts.map +1 -0
- package/dist/runtimeIdentity.mjs +21 -0
- package/dist/runtimeIdentity.mjs.map +1 -0
- package/dist/runtimeJson.cjs +46 -0
- package/dist/runtimeJson.cjs.map +1 -0
- package/dist/runtimeJson.d.mts +22 -0
- package/dist/runtimeJson.d.mts.map +1 -0
- package/dist/runtimeJson.mjs +39 -0
- package/dist/runtimeJson.mjs.map +1 -0
- package/dist/runtimeLogSinkTelemetry.cjs +102 -0
- package/dist/runtimeLogSinkTelemetry.cjs.map +1 -0
- package/dist/runtimeLogSinkTelemetry.d.mts +49 -0
- package/dist/runtimeLogSinkTelemetry.d.mts.map +1 -0
- package/dist/runtimeLogSinkTelemetry.mjs +99 -0
- package/dist/runtimeLogSinkTelemetry.mjs.map +1 -0
- package/dist/runtimePiExtension.cjs +339 -0
- package/dist/runtimePiExtension.cjs.map +1 -0
- package/dist/runtimePiExtension.d.mts +160 -0
- package/dist/runtimePiExtension.d.mts.map +1 -0
- package/dist/runtimePiExtension.mjs +333 -0
- package/dist/runtimePiExtension.mjs.map +1 -0
- package/dist/runtimePiSettings.cjs +116 -0
- package/dist/runtimePiSettings.cjs.map +1 -0
- package/dist/runtimePiSettings.d.mts +29 -0
- package/dist/runtimePiSettings.d.mts.map +1 -0
- package/dist/runtimePiSettings.mjs +103 -0
- package/dist/runtimePiSettings.mjs.map +1 -0
- package/dist/runtimeProtocol.cjs +223 -0
- package/dist/runtimeProtocol.cjs.map +1 -0
- package/dist/runtimeProtocol.d.mts +84 -0
- package/dist/runtimeProtocol.d.mts.map +1 -0
- package/dist/runtimeProtocol.mjs +215 -0
- package/dist/runtimeProtocol.mjs.map +1 -0
- package/dist/runtimeToolNames.cjs +51 -0
- package/dist/runtimeToolNames.cjs.map +1 -0
- package/dist/runtimeToolNames.d.mts +24 -0
- package/dist/runtimeToolNames.d.mts.map +1 -0
- package/dist/runtimeToolNames.mjs +49 -0
- package/dist/runtimeToolNames.mjs.map +1 -0
- package/dist/runtimeTransition.cjs +27 -0
- package/dist/runtimeTransition.cjs.map +1 -0
- package/dist/runtimeTransition.d.mts +114 -0
- package/dist/runtimeTransition.d.mts.map +1 -0
- package/dist/runtimeTransition.mjs +24 -0
- package/dist/runtimeTransition.mjs.map +1 -0
- package/dist/sandboxHarness.cjs +6 -0
- package/dist/sandboxHarness.d.mts +2 -0
- package/dist/sandboxHarness.mjs +2 -0
- package/dist/server.cjs +17 -0
- package/dist/server.d.mts +10 -0
- package/dist/server.mjs +7 -0
- package/dist/serverFacet.cjs +30 -0
- package/dist/serverFacet.d.mts +8 -0
- package/dist/serverFacet.mjs +8 -0
- package/dist/serverTelemetry.cjs +25 -0
- package/dist/serverTelemetry.cjs.map +1 -0
- package/dist/serverTelemetry.d.mts +12 -0
- package/dist/serverTelemetry.d.mts.map +1 -0
- package/dist/serverTelemetry.mjs +23 -0
- package/dist/serverTelemetry.mjs.map +1 -0
- package/dist/sessionFilesApi.cjs +96 -0
- package/dist/sessionFilesApi.cjs.map +1 -0
- package/dist/sessionFilesApi.d.mts +7 -0
- package/dist/sessionFilesApi.d.mts.map +1 -0
- package/dist/sessionFilesApi.mjs +91 -0
- package/dist/sessionFilesApi.mjs.map +1 -0
- package/dist/sessionMcp.cjs +6 -0
- package/dist/sessionMcp.d.mts +5 -0
- package/dist/sessionMcp.mjs +3 -0
- package/dist/sessionProtocol.cjs +8 -0
- package/dist/sessionProtocol.d.mts +3 -0
- package/dist/sessionProtocol.mjs +2 -0
- package/dist/skills.cjs +9 -0
- package/dist/skills.d.mts +2 -0
- package/dist/skills.mjs +2 -0
- package/dist/sqliteHistoryImport.cjs +151 -0
- package/dist/sqliteHistoryImport.cjs.map +1 -0
- package/dist/sqliteHistoryImport.d.mts +8 -0
- package/dist/sqliteHistoryImport.d.mts.map +1 -0
- package/dist/sqliteHistoryImport.mjs +146 -0
- package/dist/sqliteHistoryImport.mjs.map +1 -0
- package/dist/sqliteSessionStorage.cjs +53 -0
- package/dist/sqliteSessionStorage.cjs.map +1 -0
- package/dist/sqliteSessionStorage.d.mts +7 -0
- package/dist/sqliteSessionStorage.d.mts.map +1 -0
- package/dist/sqliteSessionStorage.mjs +49 -0
- package/dist/sqliteSessionStorage.mjs.map +1 -0
- package/dist/src/constants/authorTools.cjs +10 -0
- package/dist/src/constants/authorTools.cjs.map +1 -0
- package/dist/src/constants/authorTools.d.mts +6 -0
- package/dist/src/constants/authorTools.d.mts.map +1 -0
- package/dist/src/constants/authorTools.mjs +8 -0
- package/dist/src/constants/authorTools.mjs.map +1 -0
- package/dist/src/constants/contextApi.cjs +28 -0
- package/dist/src/constants/contextApi.cjs.map +1 -0
- package/dist/src/constants/contextApi.d.mts +21 -0
- package/dist/src/constants/contextApi.d.mts.map +1 -0
- package/dist/src/constants/contextApi.mjs +23 -0
- package/dist/src/constants/contextApi.mjs.map +1 -0
- package/dist/src/constants/remote.cjs +90 -0
- package/dist/src/constants/remote.cjs.map +1 -0
- package/dist/src/constants/remote.mjs +69 -0
- package/dist/src/constants/remote.mjs.map +1 -0
- package/dist/src/constants/voiceReloadHandoff.cjs +12 -0
- package/dist/src/constants/voiceReloadHandoff.cjs.map +1 -0
- package/dist/src/constants/voiceReloadHandoff.d.mts +7 -0
- package/dist/src/constants/voiceReloadHandoff.d.mts.map +1 -0
- package/dist/src/constants/voiceReloadHandoff.mjs +9 -0
- package/dist/src/constants/voiceReloadHandoff.mjs.map +1 -0
- package/dist/src/constants/voiceTools.cjs +96 -0
- package/dist/src/constants/voiceTools.cjs.map +1 -0
- package/dist/src/constants/voiceTools.d.mts +58 -0
- package/dist/src/constants/voiceTools.d.mts.map +1 -0
- package/dist/src/constants/voiceTools.mjs +60 -0
- package/dist/src/constants/voiceTools.mjs.map +1 -0
- package/dist/src/extensions/extensionFile.cjs +165 -0
- package/dist/src/extensions/extensionFile.cjs.map +1 -0
- package/dist/src/extensions/extensionFile.d.mts +79 -0
- package/dist/src/extensions/extensionFile.d.mts.map +1 -0
- package/dist/src/extensions/extensionFile.mjs +144 -0
- package/dist/src/extensions/extensionFile.mjs.map +1 -0
- package/dist/src/extensions/serverPlugin.cjs +106 -0
- package/dist/src/extensions/serverPlugin.cjs.map +1 -0
- package/dist/src/extensions/serverPlugin.d.mts +5 -0
- package/dist/src/extensions/serverPlugin.d.mts.map +1 -0
- package/dist/src/extensions/serverPlugin.mjs +106 -0
- package/dist/src/extensions/serverPlugin.mjs.map +1 -0
- package/dist/src/extensions/webPlugin.cjs +131 -0
- package/dist/src/extensions/webPlugin.cjs.map +1 -0
- package/dist/src/extensions/webPlugin.d.mts +66 -0
- package/dist/src/extensions/webPlugin.d.mts.map +1 -0
- package/dist/src/extensions/webPlugin.mjs +110 -0
- package/dist/src/extensions/webPlugin.mjs.map +1 -0
- package/dist/src/pi/piSessionRuntime.cjs +572 -0
- package/dist/src/pi/piSessionRuntime.cjs.map +1 -0
- package/dist/src/pi/piSessionRuntime.d.mts +43 -0
- package/dist/src/pi/piSessionRuntime.d.mts.map +1 -0
- package/dist/src/pi/piSessionRuntime.mjs +571 -0
- package/dist/src/pi/piSessionRuntime.mjs.map +1 -0
- package/dist/src/pi/piWebSocketListener.cjs +115 -0
- package/dist/src/pi/piWebSocketListener.cjs.map +1 -0
- package/dist/src/pi/piWebSocketListener.mjs +115 -0
- package/dist/src/pi/piWebSocketListener.mjs.map +1 -0
- package/dist/src/schemas/agentModel.cjs +33 -0
- package/dist/src/schemas/agentModel.cjs.map +1 -0
- package/dist/src/schemas/agentModel.d.mts +26 -0
- package/dist/src/schemas/agentModel.d.mts.map +1 -0
- package/dist/src/schemas/agentModel.mjs +32 -0
- package/dist/src/schemas/agentModel.mjs.map +1 -0
- package/dist/src/schemas/apiContracts.d.mts +58 -0
- package/dist/src/schemas/apiContracts.d.mts.map +1 -0
- package/dist/src/schemas/askUser.cjs +42 -0
- package/dist/src/schemas/askUser.cjs.map +1 -0
- package/dist/src/schemas/askUser.d.mts +47 -0
- package/dist/src/schemas/askUser.d.mts.map +1 -0
- package/dist/src/schemas/askUser.mjs +37 -0
- package/dist/src/schemas/askUser.mjs.map +1 -0
- package/dist/src/schemas/backgroundWork.cjs +31 -0
- package/dist/src/schemas/backgroundWork.cjs.map +1 -0
- package/dist/src/schemas/backgroundWork.d.mts +72 -0
- package/dist/src/schemas/backgroundWork.d.mts.map +1 -0
- package/dist/src/schemas/backgroundWork.mjs +27 -0
- package/dist/src/schemas/backgroundWork.mjs.map +1 -0
- package/dist/src/schemas/childProcess.cjs +67 -0
- package/dist/src/schemas/childProcess.cjs.map +1 -0
- package/dist/src/schemas/childProcess.d.mts +30 -0
- package/dist/src/schemas/childProcess.d.mts.map +1 -0
- package/dist/src/schemas/childProcess.mjs +55 -0
- package/dist/src/schemas/childProcess.mjs.map +1 -0
- package/dist/src/schemas/cockpitContainer.cjs +31 -0
- package/dist/src/schemas/cockpitContainer.cjs.map +1 -0
- package/dist/src/schemas/cockpitContainer.d.mts +80 -0
- package/dist/src/schemas/cockpitContainer.d.mts.map +1 -0
- package/dist/src/schemas/cockpitContainer.mjs +30 -0
- package/dist/src/schemas/cockpitContainer.mjs.map +1 -0
- package/dist/src/schemas/contextContributions.cjs +17 -0
- package/dist/src/schemas/contextContributions.cjs.map +1 -0
- package/dist/src/schemas/contextContributions.d.mts +49 -0
- package/dist/src/schemas/contextContributions.d.mts.map +1 -0
- package/dist/src/schemas/contextContributions.mjs +15 -0
- package/dist/src/schemas/contextContributions.mjs.map +1 -0
- package/dist/src/schemas/delegation.cjs +91 -0
- package/dist/src/schemas/delegation.cjs.map +1 -0
- package/dist/src/schemas/delegation.d.mts +95 -0
- package/dist/src/schemas/delegation.d.mts.map +1 -0
- package/dist/src/schemas/delegation.mjs +76 -0
- package/dist/src/schemas/delegation.mjs.map +1 -0
- package/dist/src/schemas/extensionFile.d.mts +136 -0
- package/dist/src/schemas/extensionFile.d.mts.map +1 -0
- package/dist/src/schemas/footer.cjs +48 -0
- package/dist/src/schemas/footer.cjs.map +1 -0
- package/dist/src/schemas/footer.d.mts +48 -0
- package/dist/src/schemas/footer.d.mts.map +1 -0
- package/dist/src/schemas/footer.mjs +45 -0
- package/dist/src/schemas/footer.mjs.map +1 -0
- package/dist/src/schemas/headless.cjs +44 -0
- package/dist/src/schemas/headless.cjs.map +1 -0
- package/dist/src/schemas/headless.d.mts +370 -0
- package/dist/src/schemas/headless.d.mts.map +1 -0
- package/dist/src/schemas/headless.mjs +38 -0
- package/dist/src/schemas/headless.mjs.map +1 -0
- package/dist/src/schemas/help.cjs +281 -0
- package/dist/src/schemas/help.cjs.map +1 -0
- package/dist/src/schemas/help.d.mts +119 -0
- package/dist/src/schemas/help.d.mts.map +1 -0
- package/dist/src/schemas/help.mjs +262 -0
- package/dist/src/schemas/help.mjs.map +1 -0
- package/dist/src/schemas/hubChannel.cjs +20 -0
- package/dist/src/schemas/hubChannel.cjs.map +1 -0
- package/dist/src/schemas/hubChannel.d.mts +236 -0
- package/dist/src/schemas/hubChannel.d.mts.map +1 -0
- package/dist/src/schemas/hubChannel.mjs +19 -0
- package/dist/src/schemas/hubChannel.mjs.map +1 -0
- package/dist/src/schemas/leader.cjs +57 -0
- package/dist/src/schemas/leader.cjs.map +1 -0
- package/dist/src/schemas/leader.d.mts +107 -0
- package/dist/src/schemas/leader.d.mts.map +1 -0
- package/dist/src/schemas/leader.mjs +51 -0
- package/dist/src/schemas/leader.mjs.map +1 -0
- package/dist/src/schemas/mcpBundle.cjs +92 -0
- package/dist/src/schemas/mcpBundle.cjs.map +1 -0
- package/dist/src/schemas/mcpBundle.d.mts +33 -0
- package/dist/src/schemas/mcpBundle.d.mts.map +1 -0
- package/dist/src/schemas/mcpBundle.mjs +90 -0
- package/dist/src/schemas/mcpBundle.mjs.map +1 -0
- package/dist/src/schemas/mcpFacet.cjs +24 -0
- package/dist/src/schemas/mcpFacet.cjs.map +1 -0
- package/dist/src/schemas/mcpFacet.d.mts +91 -0
- package/dist/src/schemas/mcpFacet.d.mts.map +1 -0
- package/dist/src/schemas/mcpFacet.mjs +21 -0
- package/dist/src/schemas/mcpFacet.mjs.map +1 -0
- package/dist/src/schemas/mcpProjection.cjs +117 -0
- package/dist/src/schemas/mcpProjection.cjs.map +1 -0
- package/dist/src/schemas/mcpProjection.d.mts +124 -0
- package/dist/src/schemas/mcpProjection.d.mts.map +1 -0
- package/dist/src/schemas/mcpProjection.mjs +104 -0
- package/dist/src/schemas/mcpProjection.mjs.map +1 -0
- package/dist/src/schemas/mcpSession.cjs +57 -0
- package/dist/src/schemas/mcpSession.cjs.map +1 -0
- package/dist/src/schemas/mcpSession.d.mts +57 -0
- package/dist/src/schemas/mcpSession.d.mts.map +1 -0
- package/dist/src/schemas/mcpSession.mjs +51 -0
- package/dist/src/schemas/mcpSession.mjs.map +1 -0
- package/dist/src/schemas/mcpStatus.cjs +52 -0
- package/dist/src/schemas/mcpStatus.cjs.map +1 -0
- package/dist/src/schemas/mcpStatus.d.mts +73 -0
- package/dist/src/schemas/mcpStatus.d.mts.map +1 -0
- package/dist/src/schemas/mcpStatus.mjs +48 -0
- package/dist/src/schemas/mcpStatus.mjs.map +1 -0
- package/dist/src/schemas/mcpToolResolver.cjs +17 -0
- package/dist/src/schemas/mcpToolResolver.cjs.map +1 -0
- package/dist/src/schemas/mcpToolResolver.d.mts +24 -0
- package/dist/src/schemas/mcpToolResolver.d.mts.map +1 -0
- package/dist/src/schemas/mcpToolResolver.mjs +15 -0
- package/dist/src/schemas/mcpToolResolver.mjs.map +1 -0
- package/dist/src/schemas/narration.cjs +54 -0
- package/dist/src/schemas/narration.cjs.map +1 -0
- package/dist/src/schemas/narration.d.mts +29 -0
- package/dist/src/schemas/narration.d.mts.map +1 -0
- package/dist/src/schemas/narration.mjs +47 -0
- package/dist/src/schemas/narration.mjs.map +1 -0
- package/dist/src/schemas/notification.cjs +122 -0
- package/dist/src/schemas/notification.cjs.map +1 -0
- package/dist/src/schemas/notification.d.mts +48 -0
- package/dist/src/schemas/notification.d.mts.map +1 -0
- package/dist/src/schemas/notification.mjs +108 -0
- package/dist/src/schemas/notification.mjs.map +1 -0
- package/dist/src/schemas/packageApi.cjs +73 -0
- package/dist/src/schemas/packageApi.cjs.map +1 -0
- package/dist/src/schemas/packageApi.d.mts +249 -0
- package/dist/src/schemas/packageApi.d.mts.map +1 -0
- package/dist/src/schemas/packageApi.mjs +64 -0
- package/dist/src/schemas/packageApi.mjs.map +1 -0
- package/dist/src/schemas/piTool.cjs +26 -0
- package/dist/src/schemas/piTool.cjs.map +1 -0
- package/dist/src/schemas/piTool.d.mts +25 -0
- package/dist/src/schemas/piTool.d.mts.map +1 -0
- package/dist/src/schemas/piTool.mjs +26 -0
- package/dist/src/schemas/piTool.mjs.map +1 -0
- package/dist/src/schemas/pluginContributions.cjs +19 -0
- package/dist/src/schemas/pluginContributions.cjs.map +1 -0
- package/dist/src/schemas/pluginContributions.d.mts +56 -0
- package/dist/src/schemas/pluginContributions.d.mts.map +1 -0
- package/dist/src/schemas/pluginContributions.mjs +18 -0
- package/dist/src/schemas/pluginContributions.mjs.map +1 -0
- package/dist/src/schemas/pluginProtocol.cjs +103 -0
- package/dist/src/schemas/pluginProtocol.cjs.map +1 -0
- package/dist/src/schemas/pluginProtocol.d.mts +68 -0
- package/dist/src/schemas/pluginProtocol.d.mts.map +1 -0
- package/dist/src/schemas/pluginProtocol.mjs +96 -0
- package/dist/src/schemas/pluginProtocol.mjs.map +1 -0
- package/dist/src/schemas/profileIdentity.cjs +67 -0
- package/dist/src/schemas/profileIdentity.cjs.map +1 -0
- package/dist/src/schemas/profileIdentity.d.mts +50 -0
- package/dist/src/schemas/profileIdentity.d.mts.map +1 -0
- package/dist/src/schemas/profileIdentity.mjs +64 -0
- package/dist/src/schemas/profileIdentity.mjs.map +1 -0
- package/dist/src/schemas/readiness.cjs +251 -0
- package/dist/src/schemas/readiness.cjs.map +1 -0
- package/dist/src/schemas/readiness.d.mts +84 -0
- package/dist/src/schemas/readiness.d.mts.map +1 -0
- package/dist/src/schemas/readiness.mjs +246 -0
- package/dist/src/schemas/readiness.mjs.map +1 -0
- package/dist/src/schemas/relaunchHandoff.cjs +47 -0
- package/dist/src/schemas/relaunchHandoff.cjs.map +1 -0
- package/dist/src/schemas/relaunchHandoff.d.mts +25 -0
- package/dist/src/schemas/relaunchHandoff.d.mts.map +1 -0
- package/dist/src/schemas/relaunchHandoff.mjs +44 -0
- package/dist/src/schemas/relaunchHandoff.mjs.map +1 -0
- package/dist/src/schemas/sandboxHarness.cjs +29 -0
- package/dist/src/schemas/sandboxHarness.cjs.map +1 -0
- package/dist/src/schemas/sandboxHarness.d.mts +39 -0
- package/dist/src/schemas/sandboxHarness.d.mts.map +1 -0
- package/dist/src/schemas/sandboxHarness.mjs +26 -0
- package/dist/src/schemas/sandboxHarness.mjs.map +1 -0
- package/dist/src/schemas/serverBundle.cjs +79 -0
- package/dist/src/schemas/serverBundle.cjs.map +1 -0
- package/dist/src/schemas/serverBundle.d.mts +34 -0
- package/dist/src/schemas/serverBundle.d.mts.map +1 -0
- package/dist/src/schemas/serverBundle.mjs +77 -0
- package/dist/src/schemas/serverBundle.mjs.map +1 -0
- package/dist/src/schemas/serverFacet.cjs +102 -0
- package/dist/src/schemas/serverFacet.cjs.map +1 -0
- package/dist/src/schemas/serverFacet.d.mts +141 -0
- package/dist/src/schemas/serverFacet.d.mts.map +1 -0
- package/dist/src/schemas/serverFacet.mjs +93 -0
- package/dist/src/schemas/serverFacet.mjs.map +1 -0
- package/dist/src/schemas/sessionMcpActivity.d.mts +45 -0
- package/dist/src/schemas/sessionMcpActivity.d.mts.map +1 -0
- package/dist/src/schemas/sessionProtocol.cjs +17 -0
- package/dist/src/schemas/sessionProtocol.cjs.map +1 -0
- package/dist/src/schemas/sessionProtocol.d.mts +308 -0
- package/dist/src/schemas/sessionProtocol.d.mts.map +1 -0
- package/dist/src/schemas/sessionProtocol.mjs +12 -0
- package/dist/src/schemas/sessionProtocol.mjs.map +1 -0
- package/dist/src/schemas/sessionUpdates.d.mts +34 -0
- package/dist/src/schemas/sessionUpdates.d.mts.map +1 -0
- package/dist/src/schemas/skills.cjs +115 -0
- package/dist/src/schemas/skills.cjs.map +1 -0
- package/dist/src/schemas/skills.d.mts +65 -0
- package/dist/src/schemas/skills.d.mts.map +1 -0
- package/dist/src/schemas/skills.mjs +109 -0
- package/dist/src/schemas/skills.mjs.map +1 -0
- package/dist/src/schemas/toolOverrides.cjs +17 -0
- package/dist/src/schemas/toolOverrides.cjs.map +1 -0
- package/dist/src/schemas/toolOverrides.d.mts +29 -0
- package/dist/src/schemas/toolOverrides.d.mts.map +1 -0
- package/dist/src/schemas/toolOverrides.mjs +15 -0
- package/dist/src/schemas/toolOverrides.mjs.map +1 -0
- package/dist/src/schemas/toolSurface.cjs +17 -0
- package/dist/src/schemas/toolSurface.cjs.map +1 -0
- package/dist/src/schemas/toolSurface.d.mts +70 -0
- package/dist/src/schemas/toolSurface.d.mts.map +1 -0
- package/dist/src/schemas/toolSurface.mjs +15 -0
- package/dist/src/schemas/toolSurface.mjs.map +1 -0
- package/dist/src/schemas/uiHub.cjs +17 -0
- package/dist/src/schemas/uiHub.cjs.map +1 -0
- package/dist/src/schemas/uiHub.d.mts +23 -0
- package/dist/src/schemas/uiHub.d.mts.map +1 -0
- package/dist/src/schemas/uiHub.mjs +15 -0
- package/dist/src/schemas/uiHub.mjs.map +1 -0
- package/dist/src/schemas/voiceReloadHandoff.cjs +78 -0
- package/dist/src/schemas/voiceReloadHandoff.cjs.map +1 -0
- package/dist/src/schemas/voiceReloadHandoff.d.mts +31 -0
- package/dist/src/schemas/voiceReloadHandoff.d.mts.map +1 -0
- package/dist/src/schemas/voiceReloadHandoff.mjs +75 -0
- package/dist/src/schemas/voiceReloadHandoff.mjs.map +1 -0
- package/dist/src/schemas/voiceTools.cjs +205 -0
- package/dist/src/schemas/voiceTools.cjs.map +1 -0
- package/dist/src/schemas/voiceTools.d.mts +120 -0
- package/dist/src/schemas/voiceTools.d.mts.map +1 -0
- package/dist/src/schemas/voiceTools.mjs +194 -0
- package/dist/src/schemas/voiceTools.mjs.map +1 -0
- package/dist/src/server/devProxyForward.cjs +141 -0
- package/dist/src/server/devProxyForward.cjs.map +1 -0
- package/dist/src/server/devProxyForward.mjs +139 -0
- package/dist/src/server/devProxyForward.mjs.map +1 -0
- package/dist/src/server/devProxyRoutes.cjs +97 -0
- package/dist/src/server/devProxyRoutes.cjs.map +1 -0
- package/dist/src/server/devProxyRoutes.mjs +97 -0
- package/dist/src/server/devProxyRoutes.mjs.map +1 -0
- package/dist/src/server/devProxySocket.cjs +87 -0
- package/dist/src/server/devProxySocket.cjs.map +1 -0
- package/dist/src/server/devProxySocket.mjs +87 -0
- package/dist/src/server/devProxySocket.mjs.map +1 -0
- package/dist/src/server/directHarnessRuntime.cjs +1964 -0
- package/dist/src/server/directHarnessRuntime.cjs.map +1 -0
- package/dist/src/server/directHarnessRuntime.d.mts +3 -0
- package/dist/src/server/directHarnessRuntime.mjs +1958 -0
- package/dist/src/server/directHarnessRuntime.mjs.map +1 -0
- package/dist/src/server/harnessErrorMessage.cjs +13 -0
- package/dist/src/server/harnessErrorMessage.cjs.map +1 -0
- package/dist/src/server/harnessErrorMessage.mjs +13 -0
- package/dist/src/server/harnessErrorMessage.mjs.map +1 -0
- package/dist/src/server/headlessProtocol.cjs +366 -0
- package/dist/src/server/headlessProtocol.cjs.map +1 -0
- package/dist/src/server/headlessProtocol.mjs +366 -0
- package/dist/src/server/headlessProtocol.mjs.map +1 -0
- package/dist/src/server/jsonlTranscriptReader.cjs +85 -0
- package/dist/src/server/jsonlTranscriptReader.cjs.map +1 -0
- package/dist/src/server/jsonlTranscriptReader.mjs +83 -0
- package/dist/src/server/jsonlTranscriptReader.mjs.map +1 -0
- package/dist/src/server/mcpBundleLoader.cjs +115 -0
- package/dist/src/server/mcpBundleLoader.cjs.map +1 -0
- package/dist/src/server/mcpBundleLoader.d.mts +27 -0
- package/dist/src/server/mcpBundleLoader.d.mts.map +1 -0
- package/dist/src/server/mcpBundleLoader.mjs +111 -0
- package/dist/src/server/mcpBundleLoader.mjs.map +1 -0
- package/dist/src/server/nativeChildTranscriptReader.cjs +20 -0
- package/dist/src/server/nativeChildTranscriptReader.cjs.map +1 -0
- package/dist/src/server/nativeChildTranscriptReader.mjs +18 -0
- package/dist/src/server/nativeChildTranscriptReader.mjs.map +1 -0
- package/dist/src/server/remoteRoutes.cjs +386 -0
- package/dist/src/server/remoteRoutes.cjs.map +1 -0
- package/dist/src/server/remoteRoutes.mjs +386 -0
- package/dist/src/server/remoteRoutes.mjs.map +1 -0
- package/dist/src/server/serverFacetLoader.cjs +220 -0
- package/dist/src/server/serverFacetLoader.cjs.map +1 -0
- package/dist/src/server/serverFacetLoader.d.mts +77 -0
- package/dist/src/server/serverFacetLoader.d.mts.map +1 -0
- package/dist/src/server/serverFacetLoader.mjs +215 -0
- package/dist/src/server/serverFacetLoader.mjs.map +1 -0
- package/dist/src/server/sessionMcpHandler.cjs +494 -0
- package/dist/src/server/sessionMcpHandler.cjs.map +1 -0
- package/dist/src/server/sessionMcpHandler.d.mts +47 -0
- package/dist/src/server/sessionMcpHandler.d.mts.map +1 -0
- package/dist/src/server/sessionMcpHandler.mjs +493 -0
- package/dist/src/server/sessionMcpHandler.mjs.map +1 -0
- package/dist/src/server/sessionMcpRoutes.cjs +780 -0
- package/dist/src/server/sessionMcpRoutes.cjs.map +1 -0
- package/dist/src/server/sessionMcpRoutes.mjs +775 -0
- package/dist/src/server/sessionMcpRoutes.mjs.map +1 -0
- package/dist/src/server/threadJournals.cjs +172 -0
- package/dist/src/server/threadJournals.cjs.map +1 -0
- package/dist/src/server/threadJournals.mjs +169 -0
- package/dist/src/server/threadJournals.mjs.map +1 -0
- package/dist/src/services/acpSessionUpdates/index.cjs +129 -0
- package/dist/src/services/acpSessionUpdates/index.cjs.map +1 -0
- package/dist/src/services/acpSessionUpdates/index.mjs +129 -0
- package/dist/src/services/acpSessionUpdates/index.mjs.map +1 -0
- package/dist/src/services/apiSurfaceAssert/index.cjs +60 -0
- package/dist/src/services/apiSurfaceAssert/index.cjs.map +1 -0
- package/dist/src/services/apiSurfaceAssert/index.d.mts +24 -0
- package/dist/src/services/apiSurfaceAssert/index.d.mts.map +1 -0
- package/dist/src/services/apiSurfaceAssert/index.mjs +60 -0
- package/dist/src/services/apiSurfaceAssert/index.mjs.map +1 -0
- package/dist/src/services/bundlePublication/index.cjs +88 -0
- package/dist/src/services/bundlePublication/index.cjs.map +1 -0
- package/dist/src/services/bundlePublication/index.mjs +85 -0
- package/dist/src/services/bundlePublication/index.mjs.map +1 -0
- package/dist/src/services/contextApiUrls/index.cjs +14 -0
- package/dist/src/services/contextApiUrls/index.cjs.map +1 -0
- package/dist/src/services/contextApiUrls/index.d.mts +6 -0
- package/dist/src/services/contextApiUrls/index.d.mts.map +1 -0
- package/dist/src/services/contextApiUrls/index.mjs +14 -0
- package/dist/src/services/contextApiUrls/index.mjs.map +1 -0
- package/dist/src/services/contextContributions/index.cjs +79 -0
- package/dist/src/services/contextContributions/index.cjs.map +1 -0
- package/dist/src/services/contextContributions/index.d.mts +6 -0
- package/dist/src/services/contextContributions/index.d.mts.map +1 -0
- package/dist/src/services/contextContributions/index.mjs +79 -0
- package/dist/src/services/contextContributions/index.mjs.map +1 -0
- package/dist/src/services/contextUsage/index.cjs +27 -0
- package/dist/src/services/contextUsage/index.cjs.map +1 -0
- package/dist/src/services/contextUsage/index.mjs +25 -0
- package/dist/src/services/contextUsage/index.mjs.map +1 -0
- package/dist/src/services/devProxyPolicy/index.cjs +168 -0
- package/dist/src/services/devProxyPolicy/index.cjs.map +1 -0
- package/dist/src/services/devProxyPolicy/index.mjs +165 -0
- package/dist/src/services/devProxyPolicy/index.mjs.map +1 -0
- package/dist/src/services/devProxyStore/index.cjs +107 -0
- package/dist/src/services/devProxyStore/index.cjs.map +1 -0
- package/dist/src/services/devProxyStore/index.mjs +104 -0
- package/dist/src/services/devProxyStore/index.mjs.map +1 -0
- package/dist/src/services/deviceAuth/index.cjs +125 -0
- package/dist/src/services/deviceAuth/index.cjs.map +1 -0
- package/dist/src/services/deviceAuth/index.d.mts +9 -0
- package/dist/src/services/deviceAuth/index.d.mts.map +1 -0
- package/dist/src/services/deviceAuth/index.mjs +125 -0
- package/dist/src/services/deviceAuth/index.mjs.map +1 -0
- package/dist/src/services/deviceSessions/index.cjs +147 -0
- package/dist/src/services/deviceSessions/index.cjs.map +1 -0
- package/dist/src/services/deviceSessions/index.d.mts +15 -0
- package/dist/src/services/deviceSessions/index.d.mts.map +1 -0
- package/dist/src/services/deviceSessions/index.mjs +141 -0
- package/dist/src/services/deviceSessions/index.mjs.map +1 -0
- package/dist/src/services/headlessClient/index.cjs +125 -0
- package/dist/src/services/headlessClient/index.cjs.map +1 -0
- package/dist/src/services/headlessClient/index.mjs +125 -0
- package/dist/src/services/headlessClient/index.mjs.map +1 -0
- package/dist/src/services/historyCreationFileSystem/index.cjs +115 -0
- package/dist/src/services/historyCreationFileSystem/index.cjs.map +1 -0
- package/dist/src/services/historyCreationFileSystem/index.mjs +115 -0
- package/dist/src/services/historyCreationFileSystem/index.mjs.map +1 -0
- package/dist/src/services/hubChannelHarness/index.cjs +50 -0
- package/dist/src/services/hubChannelHarness/index.cjs.map +1 -0
- package/dist/src/services/hubChannelHarness/index.d.mts +17 -0
- package/dist/src/services/hubChannelHarness/index.d.mts.map +1 -0
- package/dist/src/services/hubChannelHarness/index.mjs +50 -0
- package/dist/src/services/hubChannelHarness/index.mjs.map +1 -0
- package/dist/src/services/kernel/index.cjs +147 -0
- package/dist/src/services/kernel/index.cjs.map +1 -0
- package/dist/src/services/kernel/index.d.mts +9 -0
- package/dist/src/services/kernel/index.d.mts.map +1 -0
- package/dist/src/services/kernel/index.mjs +147 -0
- package/dist/src/services/kernel/index.mjs.map +1 -0
- package/dist/src/services/loginFlow/index.cjs +131 -0
- package/dist/src/services/loginFlow/index.cjs.map +1 -0
- package/dist/src/services/loginFlow/index.mjs +131 -0
- package/dist/src/services/loginFlow/index.mjs.map +1 -0
- package/dist/src/services/loopbackAddress/index.cjs +58 -0
- package/dist/src/services/loopbackAddress/index.cjs.map +1 -0
- package/dist/src/services/loopbackAddress/index.mjs +56 -0
- package/dist/src/services/loopbackAddress/index.mjs.map +1 -0
- package/dist/src/services/openSessionRegistry/index.cjs +144 -0
- package/dist/src/services/openSessionRegistry/index.cjs.map +1 -0
- package/dist/src/services/openSessionRegistry/index.d.mts +40 -0
- package/dist/src/services/openSessionRegistry/index.d.mts.map +1 -0
- package/dist/src/services/openSessionRegistry/index.mjs +141 -0
- package/dist/src/services/openSessionRegistry/index.mjs.map +1 -0
- package/dist/src/services/packageApiHarness/index.cjs +36 -0
- package/dist/src/services/packageApiHarness/index.cjs.map +1 -0
- package/dist/src/services/packageApiHarness/index.d.mts +40 -0
- package/dist/src/services/packageApiHarness/index.d.mts.map +1 -0
- package/dist/src/services/packageApiHarness/index.mjs +36 -0
- package/dist/src/services/packageApiHarness/index.mjs.map +1 -0
- package/dist/src/services/packageResource/index.cjs +54 -0
- package/dist/src/services/packageResource/index.cjs.map +1 -0
- package/dist/src/services/packageResource/index.d.mts +26 -0
- package/dist/src/services/packageResource/index.d.mts.map +1 -0
- package/dist/src/services/packageResource/index.mjs +51 -0
- package/dist/src/services/packageResource/index.mjs.map +1 -0
- package/dist/src/services/pairingFlow/index.cjs +145 -0
- package/dist/src/services/pairingFlow/index.cjs.map +1 -0
- package/dist/src/services/pairingFlow/index.d.mts +44 -0
- package/dist/src/services/pairingFlow/index.d.mts.map +1 -0
- package/dist/src/services/pairingFlow/index.mjs +145 -0
- package/dist/src/services/pairingFlow/index.mjs.map +1 -0
- package/dist/src/services/pairingPage/index.cjs +450 -0
- package/dist/src/services/pairingPage/index.cjs.map +1 -0
- package/dist/src/services/pairingPage/index.mjs +447 -0
- package/dist/src/services/pairingPage/index.mjs.map +1 -0
- package/dist/src/services/piExtensionHost/index.cjs +821 -0
- package/dist/src/services/piExtensionHost/index.cjs.map +1 -0
- package/dist/src/services/piExtensionHost/index.mjs +817 -0
- package/dist/src/services/piExtensionHost/index.mjs.map +1 -0
- package/dist/src/services/piHelpTools/index.cjs +68 -0
- package/dist/src/services/piHelpTools/index.cjs.map +1 -0
- package/dist/src/services/piHelpTools/index.d.mts +10 -0
- package/dist/src/services/piHelpTools/index.d.mts.map +1 -0
- package/dist/src/services/piHelpTools/index.mjs +68 -0
- package/dist/src/services/piHelpTools/index.mjs.map +1 -0
- package/dist/src/services/piSessionEntries/index.cjs +112 -0
- package/dist/src/services/piSessionEntries/index.cjs.map +1 -0
- package/dist/src/services/piSessionEntries/index.mjs +108 -0
- package/dist/src/services/piSessionEntries/index.mjs.map +1 -0
- package/dist/src/services/pluginLifecycle/index.cjs +71 -0
- package/dist/src/services/pluginLifecycle/index.cjs.map +1 -0
- package/dist/src/services/pluginLifecycle/index.d.mts +11 -0
- package/dist/src/services/pluginLifecycle/index.d.mts.map +1 -0
- package/dist/src/services/pluginLifecycle/index.mjs +71 -0
- package/dist/src/services/pluginLifecycle/index.mjs.map +1 -0
- package/dist/src/services/providerAuth/index.cjs +156 -0
- package/dist/src/services/providerAuth/index.cjs.map +1 -0
- package/dist/src/services/providerAuth/index.mjs +154 -0
- package/dist/src/services/providerAuth/index.mjs.map +1 -0
- package/dist/src/services/remoteAccess/index.cjs +396 -0
- package/dist/src/services/remoteAccess/index.cjs.map +1 -0
- package/dist/src/services/remoteAccess/index.d.mts +81 -0
- package/dist/src/services/remoteAccess/index.d.mts.map +1 -0
- package/dist/src/services/remoteAccess/index.mjs +396 -0
- package/dist/src/services/remoteAccess/index.mjs.map +1 -0
- package/dist/src/services/remoteAccessSettings/index.cjs +151 -0
- package/dist/src/services/remoteAccessSettings/index.cjs.map +1 -0
- package/dist/src/services/remoteAccessSettings/index.mjs +149 -0
- package/dist/src/services/remoteAccessSettings/index.mjs.map +1 -0
- package/dist/src/services/remoteAccessStore/index.cjs +126 -0
- package/dist/src/services/remoteAccessStore/index.cjs.map +1 -0
- package/dist/src/services/remoteAccessStore/index.mjs +121 -0
- package/dist/src/services/remoteAccessStore/index.mjs.map +1 -0
- package/dist/src/services/remoteGuardPolicy/index.cjs +190 -0
- package/dist/src/services/remoteGuardPolicy/index.cjs.map +1 -0
- package/dist/src/services/remoteGuardPolicy/index.d.mts +7 -0
- package/dist/src/services/remoteGuardPolicy/index.d.mts.map +1 -0
- package/dist/src/services/remoteGuardPolicy/index.mjs +186 -0
- package/dist/src/services/remoteGuardPolicy/index.mjs.map +1 -0
- package/dist/src/services/requestReceipts/index.cjs +161 -0
- package/dist/src/services/requestReceipts/index.cjs.map +1 -0
- package/dist/src/services/requestReceipts/index.d.mts +11 -0
- package/dist/src/services/requestReceipts/index.d.mts.map +1 -0
- package/dist/src/services/requestReceipts/index.mjs +161 -0
- package/dist/src/services/requestReceipts/index.mjs.map +1 -0
- package/dist/src/services/rpcTranscript/index.cjs +590 -0
- package/dist/src/services/rpcTranscript/index.cjs.map +1 -0
- package/dist/src/services/rpcTranscript/index.d.mts +50 -0
- package/dist/src/services/rpcTranscript/index.d.mts.map +1 -0
- package/dist/src/services/rpcTranscript/index.mjs +589 -0
- package/dist/src/services/rpcTranscript/index.mjs.map +1 -0
- package/dist/src/services/serverFacet/index.cjs +197 -0
- package/dist/src/services/serverFacet/index.cjs.map +1 -0
- package/dist/src/services/serverFacet/index.d.mts +31 -0
- package/dist/src/services/serverFacet/index.d.mts.map +1 -0
- package/dist/src/services/serverFacet/index.mjs +197 -0
- package/dist/src/services/serverFacet/index.mjs.map +1 -0
- package/dist/src/services/sessionGitStatus/index.cjs +46 -0
- package/dist/src/services/sessionGitStatus/index.cjs.map +1 -0
- package/dist/src/services/sessionGitStatus/index.mjs +46 -0
- package/dist/src/services/sessionGitStatus/index.mjs.map +1 -0
- package/dist/src/services/sessionGitStatus/type.d.mts +8 -0
- package/dist/src/services/sessionGitStatus/type.d.mts.map +1 -0
- package/dist/src/services/sessionMcpActivity/index.cjs +115 -0
- package/dist/src/services/sessionMcpActivity/index.cjs.map +1 -0
- package/dist/src/services/sessionMcpActivity/index.mjs +111 -0
- package/dist/src/services/sessionMcpActivity/index.mjs.map +1 -0
- package/dist/src/services/sessionMcpAuthorization/index.cjs +432 -0
- package/dist/src/services/sessionMcpAuthorization/index.cjs.map +1 -0
- package/dist/src/services/sessionMcpAuthorization/index.d.mts +123 -0
- package/dist/src/services/sessionMcpAuthorization/index.d.mts.map +1 -0
- package/dist/src/services/sessionMcpAuthorization/index.mjs +430 -0
- package/dist/src/services/sessionMcpAuthorization/index.mjs.map +1 -0
- package/dist/src/services/sessionMcpConversations/index.cjs +217 -0
- package/dist/src/services/sessionMcpConversations/index.cjs.map +1 -0
- package/dist/src/services/sessionMcpConversations/index.mjs +212 -0
- package/dist/src/services/sessionMcpConversations/index.mjs.map +1 -0
- package/dist/src/services/sessionMcpRegistrationStore/index.cjs +86 -0
- package/dist/src/services/sessionMcpRegistrationStore/index.cjs.map +1 -0
- package/dist/src/services/sessionMcpRegistrationStore/index.mjs +83 -0
- package/dist/src/services/sessionMcpRegistrationStore/index.mjs.map +1 -0
- package/dist/src/services/sessionPresentation/index.cjs +119 -0
- package/dist/src/services/sessionPresentation/index.cjs.map +1 -0
- package/dist/src/services/sessionPresentation/index.mjs +119 -0
- package/dist/src/services/sessionPresentation/index.mjs.map +1 -0
- package/dist/src/services/sqliteSessionHistory/index.cjs +105 -0
- package/dist/src/services/sqliteSessionHistory/index.cjs.map +1 -0
- package/dist/src/services/sqliteSessionHistory/index.d.mts +29 -0
- package/dist/src/services/sqliteSessionHistory/index.d.mts.map +1 -0
- package/dist/src/services/sqliteSessionHistory/index.mjs +100 -0
- package/dist/src/services/sqliteSessionHistory/index.mjs.map +1 -0
- package/dist/src/services/sqliteTranscriptReader/index.cjs +70 -0
- package/dist/src/services/sqliteTranscriptReader/index.cjs.map +1 -0
- package/dist/src/services/sqliteTranscriptReader/index.d.mts +14 -0
- package/dist/src/services/sqliteTranscriptReader/index.d.mts.map +1 -0
- package/dist/src/services/sqliteTranscriptReader/index.mjs +67 -0
- package/dist/src/services/sqliteTranscriptReader/index.mjs.map +1 -0
- package/dist/src/services/toolCost/index.cjs +47 -0
- package/dist/src/services/toolCost/index.cjs.map +1 -0
- package/dist/src/services/toolCost/index.d.mts +38 -0
- package/dist/src/services/toolCost/index.d.mts.map +1 -0
- package/dist/src/services/toolCost/index.mjs +46 -0
- package/dist/src/services/toolCost/index.mjs.map +1 -0
- package/dist/src/services/toolOverrides/index.cjs +45 -0
- package/dist/src/services/toolOverrides/index.cjs.map +1 -0
- package/dist/src/services/toolOverrides/index.d.mts +6 -0
- package/dist/src/services/toolOverrides/index.d.mts.map +1 -0
- package/dist/src/services/toolOverrides/index.mjs +45 -0
- package/dist/src/services/toolOverrides/index.mjs.map +1 -0
- package/dist/src/services/toolPrompt/index.cjs +13 -0
- package/dist/src/services/toolPrompt/index.cjs.map +1 -0
- package/dist/src/services/toolPrompt/index.mjs +13 -0
- package/dist/src/services/toolPrompt/index.mjs.map +1 -0
- package/dist/src/services/toolSurface/index.cjs +134 -0
- package/dist/src/services/toolSurface/index.cjs.map +1 -0
- package/dist/src/services/toolSurface/index.d.mts +19 -0
- package/dist/src/services/toolSurface/index.d.mts.map +1 -0
- package/dist/src/services/toolSurface/index.mjs +134 -0
- package/dist/src/services/toolSurface/index.mjs.map +1 -0
- package/dist/src/services/traceContext/index.cjs +13 -0
- package/dist/src/services/traceContext/index.cjs.map +1 -0
- package/dist/src/services/traceContext/index.mjs +13 -0
- package/dist/src/services/traceContext/index.mjs.map +1 -0
- package/dist/src/services/transcriptPages/index.cjs +74 -0
- package/dist/src/services/transcriptPages/index.cjs.map +1 -0
- package/dist/src/services/transcriptPages/index.mjs +73 -0
- package/dist/src/services/transcriptPages/index.mjs.map +1 -0
- package/dist/src/services/tunnelOutput/index.cjs +58 -0
- package/dist/src/services/tunnelOutput/index.cjs.map +1 -0
- package/dist/src/services/tunnelOutput/index.mjs +54 -0
- package/dist/src/services/tunnelOutput/index.mjs.map +1 -0
- package/dist/src/services/tunnelProcess/index.cjs +487 -0
- package/dist/src/services/tunnelProcess/index.cjs.map +1 -0
- package/dist/src/services/tunnelProcess/index.mjs +481 -0
- package/dist/src/services/tunnelProcess/index.mjs.map +1 -0
- package/dist/src/services/voiceReloadHandoff/index.cjs +136 -0
- package/dist/src/services/voiceReloadHandoff/index.cjs.map +1 -0
- package/dist/src/services/voiceReloadHandoff/index.d.mts +34 -0
- package/dist/src/services/voiceReloadHandoff/index.d.mts.map +1 -0
- package/dist/src/services/voiceReloadHandoff/index.mjs +135 -0
- package/dist/src/services/voiceReloadHandoff/index.mjs.map +1 -0
- package/dist/src/services/voiceToolsContract/index.cjs +26 -0
- package/dist/src/services/voiceToolsContract/index.cjs.map +1 -0
- package/dist/src/services/voiceToolsContract/index.d.mts +76 -0
- package/dist/src/services/voiceToolsContract/index.d.mts.map +1 -0
- package/dist/src/services/voiceToolsContract/index.mjs +24 -0
- package/dist/src/services/voiceToolsContract/index.mjs.map +1 -0
- package/dist/src/services/webauthn/index.cjs +262 -0
- package/dist/src/services/webauthn/index.cjs.map +1 -0
- package/dist/src/services/webauthn/index.d.mts +39 -0
- package/dist/src/services/webauthn/index.d.mts.map +1 -0
- package/dist/src/services/webauthn/index.mjs +262 -0
- package/dist/src/services/webauthn/index.mjs.map +1 -0
- package/dist/src/services/webauthnPolicy/index.cjs +163 -0
- package/dist/src/services/webauthnPolicy/index.cjs.map +1 -0
- package/dist/src/services/webauthnPolicy/index.d.mts +41 -0
- package/dist/src/services/webauthnPolicy/index.d.mts.map +1 -0
- package/dist/src/services/webauthnPolicy/index.mjs +156 -0
- package/dist/src/services/webauthnPolicy/index.mjs.map +1 -0
- package/dist/src/services/workspaceRegistry/index.cjs +151 -0
- package/dist/src/services/workspaceRegistry/index.cjs.map +1 -0
- package/dist/src/services/workspaceRegistry/index.d.mts +47 -0
- package/dist/src/services/workspaceRegistry/index.d.mts.map +1 -0
- package/dist/src/services/workspaceRegistry/index.mjs +144 -0
- package/dist/src/services/workspaceRegistry/index.mjs.map +1 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.cjs +261 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.cjs.map +1 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.d.mts +32 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.d.mts.map +1 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.mjs +254 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.mjs.map +1 -0
- package/dist/src/systems/child/adapters/nativeChildRuntimes.cjs +28 -0
- package/dist/src/systems/child/adapters/nativeChildRuntimes.cjs.map +1 -0
- package/dist/src/systems/child/adapters/nativeChildRuntimes.mjs +25 -0
- package/dist/src/systems/child/adapters/nativeChildRuntimes.mjs.map +1 -0
- package/dist/src/systems/child/services/childSession/index.cjs +219 -0
- package/dist/src/systems/child/services/childSession/index.cjs.map +1 -0
- package/dist/src/systems/child/services/childSession/index.d.mts +14 -0
- package/dist/src/systems/child/services/childSession/index.d.mts.map +1 -0
- package/dist/src/systems/child/services/childSession/index.mjs +219 -0
- package/dist/src/systems/child/services/childSession/index.mjs.map +1 -0
- package/dist/src/systems/child/types/childSession.cjs +19 -0
- package/dist/src/systems/child/types/childSession.cjs.map +1 -0
- package/dist/src/systems/child/types/childSession.d.mts +148 -0
- package/dist/src/systems/child/types/childSession.d.mts.map +1 -0
- package/dist/src/systems/child/types/childSession.mjs +16 -0
- package/dist/src/systems/child/types/childSession.mjs.map +1 -0
- package/dist/src/systems/main/adapters/headlessHost.cjs +554 -0
- package/dist/src/systems/main/adapters/headlessHost.cjs.map +1 -0
- package/dist/src/systems/main/adapters/headlessHost.d.mts +111 -0
- package/dist/src/systems/main/adapters/headlessHost.d.mts.map +1 -0
- package/dist/src/systems/main/adapters/headlessHost.mjs +552 -0
- package/dist/src/systems/main/adapters/headlessHost.mjs.map +1 -0
- package/dist/src/systems/main/adapters/headlessSessionHost.cjs +1293 -0
- package/dist/src/systems/main/adapters/headlessSessionHost.cjs.map +1 -0
- package/dist/src/systems/main/adapters/headlessSessionHost.d.mts +14 -0
- package/dist/src/systems/main/adapters/headlessSessionHost.d.mts.map +1 -0
- package/dist/src/systems/main/adapters/headlessSessionHost.mjs +1288 -0
- package/dist/src/systems/main/adapters/headlessSessionHost.mjs.map +1 -0
- package/dist/src/systems/main/types/headlessHost.d.mts +36 -0
- package/dist/src/systems/main/types/headlessHost.d.mts.map +1 -0
- package/dist/src/testing/pi/extensionScenarios.cjs +73 -0
- package/dist/src/testing/pi/extensionScenarios.cjs.map +1 -0
- package/dist/src/testing/pi/extensionScenarios.d.mts +41 -0
- package/dist/src/testing/pi/extensionScenarios.d.mts.map +1 -0
- package/dist/src/testing/pi/extensionScenarios.mjs +73 -0
- package/dist/src/testing/pi/extensionScenarios.mjs.map +1 -0
- package/dist/src/testing/pi/testHost.cjs +398 -0
- package/dist/src/testing/pi/testHost.cjs.map +1 -0
- package/dist/src/testing/pi/testHost.d.mts +160 -0
- package/dist/src/testing/pi/testHost.d.mts.map +1 -0
- package/dist/src/testing/pi/testHost.mjs +398 -0
- package/dist/src/testing/pi/testHost.mjs.map +1 -0
- package/dist/src/types/config.d.mts +20 -0
- package/dist/src/types/config.d.mts.map +1 -0
- package/dist/src/types/kernel.d.mts +69 -0
- package/dist/src/types/kernel.d.mts.map +1 -0
- package/dist/src/types/remote.d.mts +124 -0
- package/dist/src/types/remote.d.mts.map +1 -0
- package/dist/src/types/server/directHarnessRuntime.d.mts +209 -0
- package/dist/src/types/server/directHarnessRuntime.d.mts.map +1 -0
- package/dist/src/types/server/session.d.mts +5 -0
- package/dist/src/types/server/session.d.mts.map +1 -0
- package/dist/src/types/server/sessionToolSurface.d.mts +44 -0
- package/dist/src/types/server/sessionToolSurface.d.mts.map +1 -0
- package/dist/src/web/models/globalStore.cjs +23 -0
- package/dist/src/web/models/globalStore.cjs.map +1 -0
- package/dist/src/web/models/globalStore.d.mts +6 -0
- package/dist/src/web/models/globalStore.d.mts.map +1 -0
- package/dist/src/web/models/globalStore.mjs +23 -0
- package/dist/src/web/models/globalStore.mjs.map +1 -0
- package/dist/src/web/models/sessionStore.cjs +56 -0
- package/dist/src/web/models/sessionStore.cjs.map +1 -0
- package/dist/src/web/models/sessionStore.d.mts +14 -0
- package/dist/src/web/models/sessionStore.d.mts.map +1 -0
- package/dist/src/web/models/sessionStore.mjs +56 -0
- package/dist/src/web/models/sessionStore.mjs.map +1 -0
- package/dist/src/web/models/workspaceStore.cjs +50 -0
- package/dist/src/web/models/workspaceStore.cjs.map +1 -0
- package/dist/src/web/models/workspaceStore.d.mts +18 -0
- package/dist/src/web/models/workspaceStore.d.mts.map +1 -0
- package/dist/src/web/models/workspaceStore.mjs +50 -0
- package/dist/src/web/models/workspaceStore.mjs.map +1 -0
- package/dist/src/web/schemas/bundleAssetPolicy.cjs +20 -0
- package/dist/src/web/schemas/bundleAssetPolicy.cjs.map +1 -0
- package/dist/src/web/schemas/bundleAssetPolicy.d.mts +10 -0
- package/dist/src/web/schemas/bundleAssetPolicy.d.mts.map +1 -0
- package/dist/src/web/schemas/bundleAssetPolicy.mjs +18 -0
- package/dist/src/web/schemas/bundleAssetPolicy.mjs.map +1 -0
- package/dist/src/web/schemas/template.cjs +15 -0
- package/dist/src/web/schemas/template.cjs.map +1 -0
- package/dist/src/web/schemas/template.d.mts +6 -0
- package/dist/src/web/schemas/template.d.mts.map +1 -0
- package/dist/src/web/schemas/template.mjs +15 -0
- package/dist/src/web/schemas/template.mjs.map +1 -0
- package/dist/src/web/services/apiClient/index.cjs +156 -0
- package/dist/src/web/services/apiClient/index.cjs.map +1 -0
- package/dist/src/web/services/apiClient/index.d.mts +152 -0
- package/dist/src/web/services/apiClient/index.d.mts.map +1 -0
- package/dist/src/web/services/apiClient/index.mjs +154 -0
- package/dist/src/web/services/apiClient/index.mjs.map +1 -0
- package/dist/src/web/services/apiPaths/index.cjs +83 -0
- package/dist/src/web/services/apiPaths/index.cjs.map +1 -0
- package/dist/src/web/services/apiPaths/index.d.mts +81 -0
- package/dist/src/web/services/apiPaths/index.d.mts.map +1 -0
- package/dist/src/web/services/apiPaths/index.mjs +78 -0
- package/dist/src/web/services/apiPaths/index.mjs.map +1 -0
- package/dist/src/web/services/apiRoutes/index.cjs +47 -0
- package/dist/src/web/services/apiRoutes/index.cjs.map +1 -0
- package/dist/src/web/services/apiRoutes/index.d.mts +21 -0
- package/dist/src/web/services/apiRoutes/index.d.mts.map +1 -0
- package/dist/src/web/services/apiRoutes/index.mjs +43 -0
- package/dist/src/web/services/apiRoutes/index.mjs.map +1 -0
- package/dist/src/web/services/mcpWidget.cjs +9 -0
- package/dist/src/web/services/mcpWidget.cjs.map +1 -0
- package/dist/src/web/services/mcpWidget.d.mts +6 -0
- package/dist/src/web/services/mcpWidget.d.mts.map +1 -0
- package/dist/src/web/services/mcpWidget.mjs +9 -0
- package/dist/src/web/services/mcpWidget.mjs.map +1 -0
- package/dist/src/web/services/sessionRegistry/index.cjs +70 -0
- package/dist/src/web/services/sessionRegistry/index.cjs.map +1 -0
- package/dist/src/web/services/sessionRegistry/index.d.mts +29 -0
- package/dist/src/web/services/sessionRegistry/index.d.mts.map +1 -0
- package/dist/src/web/services/sessionRegistry/index.mjs +66 -0
- package/dist/src/web/services/sessionRegistry/index.mjs.map +1 -0
- package/dist/src/web/services/testing/channels.cjs +11 -0
- package/dist/src/web/services/testing/channels.cjs.map +1 -0
- package/dist/src/web/services/testing/channels.d.mts +8 -0
- package/dist/src/web/services/testing/channels.d.mts.map +1 -0
- package/dist/src/web/services/testing/channels.mjs +11 -0
- package/dist/src/web/services/testing/channels.mjs.map +1 -0
- package/dist/src/web/services/testing/index.cjs +27 -0
- package/dist/src/web/services/testing/index.cjs.map +1 -0
- package/dist/src/web/services/testing/index.d.mts +31 -0
- package/dist/src/web/services/testing/index.d.mts.map +1 -0
- package/dist/src/web/services/testing/index.mjs +27 -0
- package/dist/src/web/services/testing/index.mjs.map +1 -0
- package/dist/src/web/services/testing/rpcStub.cjs +58 -0
- package/dist/src/web/services/testing/rpcStub.cjs.map +1 -0
- package/dist/src/web/services/testing/rpcStub.d.mts +37 -0
- package/dist/src/web/services/testing/rpcStub.d.mts.map +1 -0
- package/dist/src/web/services/testing/rpcStub.mjs +58 -0
- package/dist/src/web/services/testing/rpcStub.mjs.map +1 -0
- package/dist/src/web/services/testing/slotProps.cjs +91 -0
- package/dist/src/web/services/testing/slotProps.cjs.map +1 -0
- package/dist/src/web/services/testing/slotProps.d.mts +69 -0
- package/dist/src/web/services/testing/slotProps.d.mts.map +1 -0
- package/dist/src/web/services/testing/slotProps.mjs +90 -0
- package/dist/src/web/services/testing/slotProps.mjs.map +1 -0
- package/dist/src/web/services/testing/templateRail.cjs +128 -0
- package/dist/src/web/services/testing/templateRail.cjs.map +1 -0
- package/dist/src/web/services/testing/templateRail.d.mts +31 -0
- package/dist/src/web/services/testing/templateRail.d.mts.map +1 -0
- package/dist/src/web/services/testing/templateRail.mjs +126 -0
- package/dist/src/web/services/testing/templateRail.mjs.map +1 -0
- package/dist/src/web/services/toolResult/index.cjs +30 -0
- package/dist/src/web/services/toolResult/index.cjs.map +1 -0
- package/dist/src/web/services/toolResult/index.d.mts +14 -0
- package/dist/src/web/services/toolResult/index.d.mts.map +1 -0
- package/dist/src/web/services/toolResult/index.mjs +29 -0
- package/dist/src/web/services/toolResult/index.mjs.map +1 -0
- package/dist/src/web/types/extensionFile.d.mts +59 -0
- package/dist/src/web/types/extensionFile.d.mts.map +1 -0
- package/dist/src/web/types/mcpWidget.d.mts +14 -0
- package/dist/src/web/types/mcpWidget.d.mts.map +1 -0
- package/dist/src/web/types/modelContext.d.mts +43 -0
- package/dist/src/web/types/modelContext.d.mts.map +1 -0
- package/dist/src/web/types/sessionRegistry.d.mts +43 -0
- package/dist/src/web/types/sessionRegistry.d.mts.map +1 -0
- package/dist/src/web/types/template.d.mts +155 -0
- package/dist/src/web/types/template.d.mts.map +1 -0
- package/dist/src/web/types/webPlugin.d.mts +896 -0
- package/dist/src/web/types/webPlugin.d.mts.map +1 -0
- package/dist/syncLocation.cjs +244 -0
- package/dist/syncLocation.cjs.map +1 -0
- package/dist/syncLocation.d.mts +37 -0
- package/dist/syncLocation.d.mts.map +1 -0
- package/dist/syncLocation.mjs +231 -0
- package/dist/syncLocation.mjs.map +1 -0
- package/dist/syncRegistration.cjs +171 -0
- package/dist/syncRegistration.cjs.map +1 -0
- package/dist/syncRegistration.d.mts +48 -0
- package/dist/syncRegistration.d.mts.map +1 -0
- package/dist/syncRegistration.mjs +159 -0
- package/dist/syncRegistration.mjs.map +1 -0
- package/dist/syncStateContract.cjs +19 -0
- package/dist/syncStateContract.cjs.map +1 -0
- package/dist/syncStateContract.d.mts +14 -0
- package/dist/syncStateContract.d.mts.map +1 -0
- package/dist/syncStateContract.mjs +16 -0
- package/dist/syncStateContract.mjs.map +1 -0
- package/dist/terminalPiChildSessionService.cjs +267 -0
- package/dist/terminalPiChildSessionService.cjs.map +1 -0
- package/dist/terminalPiChildSessionService.d.mts +42 -0
- package/dist/terminalPiChildSessionService.d.mts.map +1 -0
- package/dist/terminalPiChildSessionService.mjs +260 -0
- package/dist/terminalPiChildSessionService.mjs.map +1 -0
- package/dist/testing.cjs +11 -0
- package/dist/testing.d.mts +6 -0
- package/dist/testing.mjs +6 -0
- package/dist/toolInventory.cjs +136 -0
- package/dist/toolInventory.cjs.map +1 -0
- package/dist/toolInventory.d.mts +66 -0
- package/dist/toolInventory.d.mts.map +1 -0
- package/dist/toolInventory.mjs +133 -0
- package/dist/toolInventory.mjs.map +1 -0
- package/dist/toolNames.cjs +4 -0
- package/dist/toolNames.d.mts +2 -0
- package/dist/toolNames.mjs +2 -0
- package/dist/toolOverrides.cjs +7 -0
- package/dist/toolOverrides.d.mts +3 -0
- package/dist/toolOverrides.mjs +3 -0
- package/dist/toolSurface.cjs +7 -0
- package/dist/toolSurface.d.mts +3 -0
- package/dist/toolSurface.mjs +3 -0
- package/dist/transition.cjs +5 -0
- package/dist/transition.d.cjs +5 -0
- package/dist/transition.d.mts +2 -0
- package/dist/transition.mjs +2 -0
- package/dist/transitionClassifier.cjs +112 -0
- package/dist/transitionClassifier.cjs.map +1 -0
- package/dist/transitionClassifier.d.mts +18 -0
- package/dist/transitionClassifier.d.mts.map +1 -0
- package/dist/transitionClassifier.mjs +111 -0
- package/dist/transitionClassifier.mjs.map +1 -0
- package/dist/transitionCoordinator.cjs +131 -0
- package/dist/transitionCoordinator.cjs.map +1 -0
- package/dist/transitionCoordinator.d.mts +16 -0
- package/dist/transitionCoordinator.d.mts.map +1 -0
- package/dist/transitionCoordinator.mjs +130 -0
- package/dist/transitionCoordinator.mjs.map +1 -0
- package/dist/typesContextApi.cjs +0 -0
- package/dist/typesContextApi.d.mts +73 -0
- package/dist/typesContextApi.d.mts.map +1 -0
- package/dist/typesContextApi.mjs +1 -0
- package/dist/uiHub.cjs +5 -0
- package/dist/uiHub.d.mts +2 -0
- package/dist/uiHub.mjs +2 -0
- package/dist/v3Export.cjs +1004 -0
- package/dist/v3Export.cjs.map +1 -0
- package/dist/v3Export.d.mts +34 -0
- package/dist/v3Export.d.mts.map +1 -0
- package/dist/v3Export.mjs +1000 -0
- package/dist/v3Export.mjs.map +1 -0
- package/dist/voiceReloadHandoff.cjs +14 -0
- package/dist/voiceReloadHandoff.d.mts +4 -0
- package/dist/voiceReloadHandoff.mjs +4 -0
- package/dist/voiceTools.cjs +56 -0
- package/dist/voiceTools.d.mts +4 -0
- package/dist/voiceTools.mjs +4 -0
- package/dist/web.cjs +64 -0
- package/dist/web.d.mts +19 -0
- package/dist/web.mjs +13 -0
- package/dist/webCompositions.cjs +100 -0
- package/dist/webCompositions.cjs.map +1 -0
- package/dist/webCompositions.d.mts +20 -0
- package/dist/webCompositions.d.mts.map +1 -0
- package/dist/webCompositions.mjs +95 -0
- package/dist/webCompositions.mjs.map +1 -0
- package/dist/webTesting.cjs +14 -0
- package/dist/webTesting.d.mts +6 -0
- package/dist/webTesting.mjs +6 -0
- package/package.json +616 -0
|
@@ -0,0 +1,911 @@
|
|
|
1
|
+
import { createDoomServerHost } from "./src/services/serverFacet/index.mjs";
|
|
2
|
+
import { installServerFacets } from "./src/server/serverFacetLoader.mjs";
|
|
3
|
+
import "./serverFacet.mjs";
|
|
4
|
+
import { AGENT_SETTLED_ENTRY_TYPE } from "./src/server/directHarnessRuntime.mjs";
|
|
5
|
+
import { createDoomPluginRegistry } from "./src/schemas/pluginProtocol.mjs";
|
|
6
|
+
import "./pluginProtocol.mjs";
|
|
7
|
+
import { PROFILE_ICON_MIME_TYPES } from "./src/schemas/profileIdentity.mjs";
|
|
8
|
+
import { readSessionGitStatus } from "./src/services/sessionGitStatus/index.mjs";
|
|
9
|
+
import crypto from "node:crypto";
|
|
10
|
+
import { BACKGROUND_CONTEXT } from "@earendil-works/pi-agent-core/harness/context";
|
|
11
|
+
//#region src/server/headlessHub.ts
|
|
12
|
+
const AUTHORIZATION_HEADER = "authorization";
|
|
13
|
+
const CHANNEL_PRIORITY = {
|
|
14
|
+
global: 0,
|
|
15
|
+
workspace: 1,
|
|
16
|
+
session: 2
|
|
17
|
+
};
|
|
18
|
+
const ICON_VERSION_LENGTH = 12;
|
|
19
|
+
const ICON_DATA_URL = /^data:([a-z/+.-]+);base64,([A-Za-z0-9+/=]+)$/u;
|
|
20
|
+
/**
|
|
21
|
+
* When a reopened session last settled, from the marker its runtime journals at every run end.
|
|
22
|
+
* Without it a session with a whole history would read as fresh until its next turn.
|
|
23
|
+
*/
|
|
24
|
+
async function lastSettledAt(host) {
|
|
25
|
+
try {
|
|
26
|
+
const entry = await host.runtime.lane.findEntry({
|
|
27
|
+
type: "custom",
|
|
28
|
+
customType: AGENT_SETTLED_ENTRY_TYPE,
|
|
29
|
+
order: "newestFirst"
|
|
30
|
+
}, BACKGROUND_CONTEXT);
|
|
31
|
+
const data = entry?.type === "custom" ? entry.data : void 0;
|
|
32
|
+
return typeof data?.timestamp === "number" && Number.isFinite(data.timestamp) ? new Date(data.timestamp).toISOString() : void 0;
|
|
33
|
+
} catch {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function scopeOf(session) {
|
|
38
|
+
return {
|
|
39
|
+
sessionId: session.id,
|
|
40
|
+
...session.workspaceId === void 0 ? {} : { workspaceId: session.workspaceId },
|
|
41
|
+
cwd: session.cwd,
|
|
42
|
+
...session.environment === void 0 ? {} : { environment: session.environment },
|
|
43
|
+
...session.host.sessionContext === void 0 ? {} : { sessionContext: session.host.sessionContext }
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/** Owns direct, same-process session and channel state for presentation adapters. */
|
|
47
|
+
function createHeadlessHub(options) {
|
|
48
|
+
const sessions = /* @__PURE__ */ new Map();
|
|
49
|
+
const pendingSetups = /* @__PURE__ */ new Map();
|
|
50
|
+
const present = (session) => pendingSetups.has(session.id) ? {
|
|
51
|
+
...session,
|
|
52
|
+
pendingSetups: pendingSetups.get(session.id)
|
|
53
|
+
} : session;
|
|
54
|
+
const pluginRegistry = createDoomPluginRegistry();
|
|
55
|
+
const channels = /* @__PURE__ */ new Map();
|
|
56
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
57
|
+
const subscriptions = /* @__PURE__ */ new Set();
|
|
58
|
+
const sessionCleanups = /* @__PURE__ */ new Map();
|
|
59
|
+
const presentationCleanups = /* @__PURE__ */ new Map();
|
|
60
|
+
/** Profile icons by session, kept out of summaries because each can be hundreds of kilobytes. */
|
|
61
|
+
const avatarIcons = /* @__PURE__ */ new Map();
|
|
62
|
+
const sessionShutdowns = /* @__PURE__ */ new Map();
|
|
63
|
+
const directEventListeners = /* @__PURE__ */ new Map();
|
|
64
|
+
const directEventLatest = /* @__PURE__ */ new Map();
|
|
65
|
+
const maxDirectEventLatest = 4096;
|
|
66
|
+
const communicationEndpoints = /* @__PURE__ */ new Map();
|
|
67
|
+
let closed = false;
|
|
68
|
+
const mounts = /* @__PURE__ */ new Map();
|
|
69
|
+
const workspaces = /* @__PURE__ */ new Map();
|
|
70
|
+
const worktreeProvisioners = /* @__PURE__ */ new Map();
|
|
71
|
+
let sessionService;
|
|
72
|
+
const mountKey = (mount) => mount.scope === "global" ? "global" : mount.scope === "workspace" ? `workspace:${mount.workspaceId}` : `session:${mount.sessionId}`;
|
|
73
|
+
const belongs = (mount, session) => mount.scope === "global" || (mount.scope === "workspace" ? session.workspaceId === mount.workspaceId : session.id === mount.sessionId);
|
|
74
|
+
const canClose = (mount, session) => belongs(mount, session) || mount.scope === "session" && session.parentSessionId === mount.sessionId;
|
|
75
|
+
const canCommunicate = (sourceId, targetId) => {
|
|
76
|
+
if (closed || sourceId === targetId) return false;
|
|
77
|
+
const source = sessions.get(sourceId);
|
|
78
|
+
const target = sessions.get(targetId);
|
|
79
|
+
return source !== void 0 && target !== void 0 && (source.parentSessionId === target.id || target.parentSessionId === source.id);
|
|
80
|
+
};
|
|
81
|
+
const registerReservedWorktreeProvisioner = (mount, provisioner) => {
|
|
82
|
+
const key = mountKey(mount);
|
|
83
|
+
if (worktreeProvisioners.has(key)) throw new Error("A worktree provisioner is already registered.");
|
|
84
|
+
worktreeProvisioners.set(key, {
|
|
85
|
+
mount,
|
|
86
|
+
provisioner
|
|
87
|
+
});
|
|
88
|
+
return () => {
|
|
89
|
+
if (worktreeProvisioners.get(key)?.provisioner === provisioner) worktreeProvisioners.delete(key);
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
const worktreeProvisionerFor = (parent) => {
|
|
93
|
+
let provisioner;
|
|
94
|
+
let priority = -1;
|
|
95
|
+
for (const { mount, provisioner: candidate } of worktreeProvisioners.values()) {
|
|
96
|
+
if (!belongs(mount, parent) || CHANNEL_PRIORITY[mount.scope] <= priority) continue;
|
|
97
|
+
provisioner = candidate;
|
|
98
|
+
priority = CHANNEL_PRIORITY[mount.scope];
|
|
99
|
+
}
|
|
100
|
+
return provisioner;
|
|
101
|
+
};
|
|
102
|
+
const selectedChannels = (session) => {
|
|
103
|
+
const selected = /* @__PURE__ */ new Map();
|
|
104
|
+
for (const started of channels.values()) {
|
|
105
|
+
if (!belongs(started.mount, session)) continue;
|
|
106
|
+
const previous = selected.get(started.channel.frameType);
|
|
107
|
+
if (!previous || CHANNEL_PRIORITY[started.mount.scope] > CHANNEL_PRIORITY[previous.mount.scope]) selected.set(started.channel.frameType, started);
|
|
108
|
+
}
|
|
109
|
+
return [...selected.values()];
|
|
110
|
+
};
|
|
111
|
+
const selectedChannel = (session, frameType) => selectedChannels(session).find((started) => started.channel.frameType === frameType);
|
|
112
|
+
/**
|
|
113
|
+
* One channel serves a session: the narrowest mount that reaches it. A package that
|
|
114
|
+
* registers the same channel globally and per workspace would otherwise run two
|
|
115
|
+
* sources against one session, and only the narrower one can publish or receive.
|
|
116
|
+
*
|
|
117
|
+
* Compared by mount scope rather than identity so a channel being started already
|
|
118
|
+
* knows which sessions it is taking over.
|
|
119
|
+
*/
|
|
120
|
+
const serves = (mount, frameType, session) => {
|
|
121
|
+
if (!belongs(mount, session)) return false;
|
|
122
|
+
const current = selectedChannel(session, frameType);
|
|
123
|
+
return current === void 0 || CHANNEL_PRIORITY[mount.scope] >= CHANNEL_PRIORITY[current.mount.scope];
|
|
124
|
+
};
|
|
125
|
+
const directEventKey = (frameType, sessionId) => `${frameType}\0${sessionId}`;
|
|
126
|
+
const directEvents = {
|
|
127
|
+
publish(frameType, sessionId, payload) {
|
|
128
|
+
if (closed) return;
|
|
129
|
+
const key = directEventKey(frameType, sessionId);
|
|
130
|
+
directEventLatest.set(key, payload);
|
|
131
|
+
while (directEventLatest.size > maxDirectEventLatest) {
|
|
132
|
+
const oldest = directEventLatest.keys().next().value;
|
|
133
|
+
if (oldest === void 0) break;
|
|
134
|
+
directEventLatest.delete(oldest);
|
|
135
|
+
}
|
|
136
|
+
const listeners = directEventListeners.get(key);
|
|
137
|
+
if (listeners === void 0) return;
|
|
138
|
+
for (const listener of listeners) listener(payload);
|
|
139
|
+
},
|
|
140
|
+
subscribe(frameType, sessionId, listener, options) {
|
|
141
|
+
if (closed) return () => void 0;
|
|
142
|
+
const key = directEventKey(frameType, sessionId);
|
|
143
|
+
const listeners = directEventListeners.get(key) ?? /* @__PURE__ */ new Set();
|
|
144
|
+
listeners.add(listener);
|
|
145
|
+
directEventListeners.set(key, listeners);
|
|
146
|
+
if (options?.replayLatest && directEventLatest.has(key)) listener(directEventLatest.get(key));
|
|
147
|
+
let released = false;
|
|
148
|
+
return () => {
|
|
149
|
+
if (released) return;
|
|
150
|
+
released = true;
|
|
151
|
+
listeners.delete(listener);
|
|
152
|
+
if (listeners.size === 0) directEventListeners.delete(key);
|
|
153
|
+
};
|
|
154
|
+
},
|
|
155
|
+
clearSession(sessionId) {
|
|
156
|
+
const suffix = `\0${sessionId}`;
|
|
157
|
+
for (const key of directEventLatest.keys()) if (key.endsWith(suffix)) directEventLatest.delete(key);
|
|
158
|
+
},
|
|
159
|
+
close() {
|
|
160
|
+
directEventListeners.clear();
|
|
161
|
+
directEventLatest.clear();
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
const announceCommunicationReady = (sessionId) => {
|
|
165
|
+
const current = communicationEndpoints.get(sessionId);
|
|
166
|
+
if (current?.ready !== true) return;
|
|
167
|
+
for (const [peerSessionId, peer] of communicationEndpoints) {
|
|
168
|
+
if (!peer.ready || !canCommunicate(sessionId, peerSessionId)) continue;
|
|
169
|
+
for (const listener of current.readyListeners) listener(peerSessionId);
|
|
170
|
+
for (const listener of peer.readyListeners) listener(sessionId);
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
const bindCommunication = (sessionId) => {
|
|
174
|
+
const existing = communicationEndpoints.get(sessionId);
|
|
175
|
+
if (existing !== void 0) return existing.endpoint;
|
|
176
|
+
const listeners = /* @__PURE__ */ new Map();
|
|
177
|
+
const readyListeners = /* @__PURE__ */ new Set();
|
|
178
|
+
let endpoint;
|
|
179
|
+
const record = {
|
|
180
|
+
listeners,
|
|
181
|
+
readyListeners,
|
|
182
|
+
ready: false,
|
|
183
|
+
get endpoint() {
|
|
184
|
+
return endpoint;
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
endpoint = {
|
|
188
|
+
sessionId,
|
|
189
|
+
publish(targetSessionId, type, payload) {
|
|
190
|
+
if (!canCommunicate(sessionId, targetSessionId)) return false;
|
|
191
|
+
const target = communicationEndpoints.get(targetSessionId);
|
|
192
|
+
if (target?.ready !== true) return false;
|
|
193
|
+
for (const listener of target.listeners.get(type) ?? []) listener(sessionId, payload);
|
|
194
|
+
return true;
|
|
195
|
+
},
|
|
196
|
+
subscribe(type, listener) {
|
|
197
|
+
const current = listeners.get(type) ?? /* @__PURE__ */ new Set();
|
|
198
|
+
current.add(listener);
|
|
199
|
+
listeners.set(type, current);
|
|
200
|
+
return () => {
|
|
201
|
+
current.delete(listener);
|
|
202
|
+
if (current.size === 0) listeners.delete(type);
|
|
203
|
+
};
|
|
204
|
+
},
|
|
205
|
+
onPeerReady(listener) {
|
|
206
|
+
readyListeners.add(listener);
|
|
207
|
+
if (!record.ready) {
|
|
208
|
+
record.ready = true;
|
|
209
|
+
announceCommunicationReady(sessionId);
|
|
210
|
+
}
|
|
211
|
+
return () => readyListeners.delete(listener);
|
|
212
|
+
},
|
|
213
|
+
close() {
|
|
214
|
+
if (communicationEndpoints.get(sessionId)?.endpoint !== endpoint) return;
|
|
215
|
+
communicationEndpoints.delete(sessionId);
|
|
216
|
+
listeners.clear();
|
|
217
|
+
readyListeners.clear();
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
communicationEndpoints.set(sessionId, record);
|
|
221
|
+
return endpoint;
|
|
222
|
+
};
|
|
223
|
+
const queuedEvents = [];
|
|
224
|
+
let publishing = false;
|
|
225
|
+
const emit = (event) => {
|
|
226
|
+
if (closed) return;
|
|
227
|
+
queuedEvents.push(event.kind === "upsert" ? {
|
|
228
|
+
...event,
|
|
229
|
+
session: present(event.session)
|
|
230
|
+
} : event);
|
|
231
|
+
if (publishing) return;
|
|
232
|
+
publishing = true;
|
|
233
|
+
try {
|
|
234
|
+
for (let index = 0; index < queuedEvents.length; index += 1) for (const listener of listeners) listener(queuedEvents[index]);
|
|
235
|
+
} finally {
|
|
236
|
+
queuedEvents.length = 0;
|
|
237
|
+
publishing = false;
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
const sessionScopes = () => [...sessions.values()].map(scopeOf);
|
|
241
|
+
const publish = (frameType, sessionId, payload, connectionId) => {
|
|
242
|
+
if (!sessions.has(sessionId)) return;
|
|
243
|
+
emit({
|
|
244
|
+
kind: "channel",
|
|
245
|
+
frameType,
|
|
246
|
+
sessionId,
|
|
247
|
+
payload,
|
|
248
|
+
...connectionId === void 0 ? {} : { connectionId }
|
|
249
|
+
});
|
|
250
|
+
};
|
|
251
|
+
/**
|
|
252
|
+
* Hub-owned calls carry the hub credential, so a session API can tell them from a
|
|
253
|
+
* browser call it must not trust. Browser traffic reaches a session API through
|
|
254
|
+
* requestApi instead, and keeps the headers its caller sent.
|
|
255
|
+
*/
|
|
256
|
+
const hubAuthenticated = (request) => {
|
|
257
|
+
const token = options.hubToken?.();
|
|
258
|
+
if (token === void 0 || token === "") return request;
|
|
259
|
+
const headers = new Headers(request.headers);
|
|
260
|
+
if (headers.has(AUTHORIZATION_HEADER)) return request;
|
|
261
|
+
headers.set(AUTHORIZATION_HEADER, `Bearer ${token}`);
|
|
262
|
+
return {
|
|
263
|
+
...request,
|
|
264
|
+
headers
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
const reservationsFor = (mount) => {
|
|
268
|
+
const reservations = options.sessionReservations;
|
|
269
|
+
if (!reservations) return void 0;
|
|
270
|
+
const check = (parentId) => {
|
|
271
|
+
const parent = sessions.get(parentId);
|
|
272
|
+
if (!parent || !belongs(mount, parent)) throw new Error("Parent session is outside this mount.");
|
|
273
|
+
};
|
|
274
|
+
return {
|
|
275
|
+
read: (id, parentId) => {
|
|
276
|
+
check(parentId);
|
|
277
|
+
return reservations.read(id, parentId);
|
|
278
|
+
},
|
|
279
|
+
prepare: (id, parentId, cwd) => {
|
|
280
|
+
check(parentId);
|
|
281
|
+
return reservations.prepare(id, parentId, cwd);
|
|
282
|
+
},
|
|
283
|
+
complete: (id, parentId) => {
|
|
284
|
+
check(parentId);
|
|
285
|
+
return reservations.complete(id, parentId);
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
const channelHost = (frameType, mount) => ({
|
|
290
|
+
sessions: () => sessionScopes().filter((scope) => {
|
|
291
|
+
const session = sessions.get(scope.sessionId);
|
|
292
|
+
return session !== void 0 && serves(mount, frameType, session);
|
|
293
|
+
}),
|
|
294
|
+
sessionService: {
|
|
295
|
+
reservations: reservationsFor(mount),
|
|
296
|
+
create: async (request) => {
|
|
297
|
+
if (mount.scope === "workspace" && request.parentSessionId === void 0) {
|
|
298
|
+
if (request.reservationId !== void 0) throw new Error("A reserved session requires its owning parent.");
|
|
299
|
+
if (options.createSession === void 0) throw new Error("The cockpit session service cannot create sessions in this host.");
|
|
300
|
+
return options.createSession(request, { workspaceId: mount.workspaceId });
|
|
301
|
+
}
|
|
302
|
+
if (mount.scope !== "global") {
|
|
303
|
+
const parent = request.parentSessionId === void 0 ? void 0 : sessions.get(request.parentSessionId);
|
|
304
|
+
if (!parent || !belongs(mount, parent)) throw new Error("Parent session is outside this mount.");
|
|
305
|
+
}
|
|
306
|
+
return sessionService.create(request);
|
|
307
|
+
},
|
|
308
|
+
close: async (id) => {
|
|
309
|
+
const session = sessions.get(id);
|
|
310
|
+
if (session === void 0) {
|
|
311
|
+
const shutdown = sessionShutdowns.get(id);
|
|
312
|
+
if (shutdown !== void 0) {
|
|
313
|
+
if (!canClose(mount, shutdown.session)) throw new Error("Session is outside this mount.");
|
|
314
|
+
await shutdown.promise;
|
|
315
|
+
}
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
if (!canClose(mount, session)) throw new Error("Session is outside this mount.");
|
|
319
|
+
await sessionService.close(id);
|
|
320
|
+
},
|
|
321
|
+
isLive: (id) => sessionService.isLive(id),
|
|
322
|
+
registerReservedWorktreeProvisioner: (provisioner) => registerReservedWorktreeProvisioner(mount, provisioner),
|
|
323
|
+
canCommunicate: (sourceId, targetId) => {
|
|
324
|
+
const source = sessions.get(sourceId);
|
|
325
|
+
return source !== void 0 && belongs(mount, source) && sessionService.canCommunicate?.(sourceId, targetId) === true;
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
directEvents: {
|
|
329
|
+
publish: (type, id, payload) => {
|
|
330
|
+
const session = sessions.get(id);
|
|
331
|
+
if (session && serves(mount, frameType, session)) directEvents.publish(type, id, payload);
|
|
332
|
+
},
|
|
333
|
+
subscribe: (type, id, listener, subscriptionOptions) => {
|
|
334
|
+
const session = sessions.get(id);
|
|
335
|
+
return session && serves(mount, frameType, session) ? directEvents.subscribe(type, id, listener, subscriptionOptions) : () => void 0;
|
|
336
|
+
},
|
|
337
|
+
close: () => void 0
|
|
338
|
+
},
|
|
339
|
+
publish: (sessionId, payload) => {
|
|
340
|
+
const session = sessions.get(sessionId);
|
|
341
|
+
if (session && serves(mount, frameType, session)) publish(frameType, sessionId, payload);
|
|
342
|
+
},
|
|
343
|
+
publishToConnection: (connectionId, sessionId, payload) => {
|
|
344
|
+
const session = sessions.get(sessionId);
|
|
345
|
+
if (connectionId === "" || !session || !serves(mount, frameType, session)) return false;
|
|
346
|
+
publish(frameType, sessionId, payload, connectionId);
|
|
347
|
+
return true;
|
|
348
|
+
},
|
|
349
|
+
requestSessionApi: async (scope, request) => {
|
|
350
|
+
const session = sessions.get(scope.sessionId);
|
|
351
|
+
if (!session || !belongs(mount, session)) return Response.json({ error: "Session not found." }, { status: 404 });
|
|
352
|
+
if (options.requestSessionApi === void 0) return Response.json({ error: "Session API unavailable." }, { status: 404 });
|
|
353
|
+
return options.requestSessionApi(scope, hubAuthenticated(request));
|
|
354
|
+
},
|
|
355
|
+
...options.computerUse === void 0 ? {} : { computerUse: {
|
|
356
|
+
get available() {
|
|
357
|
+
return options.computerUse.available;
|
|
358
|
+
},
|
|
359
|
+
request(scope, request) {
|
|
360
|
+
const session = sessions.get(scope.sessionId);
|
|
361
|
+
if (!session || !belongs(mount, session)) throw new Error("Computer-use session is outside this mount.");
|
|
362
|
+
return options.computerUse.request(scopeOf(session), request);
|
|
363
|
+
}
|
|
364
|
+
} },
|
|
365
|
+
onNotice: (message) => options.onNotice?.(message)
|
|
366
|
+
});
|
|
367
|
+
const startChannel = (channel, mount) => {
|
|
368
|
+
const key = `${mountKey(mount)}:${channel.frameType}`;
|
|
369
|
+
if (channels.has(key)) {
|
|
370
|
+
options.onNotice?.(`hub channel '${channel.frameType}' is already registered`);
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
try {
|
|
374
|
+
const displaced = /* @__PURE__ */ new Map();
|
|
375
|
+
for (const session of sessions.values()) {
|
|
376
|
+
if (!belongs(mount, session)) continue;
|
|
377
|
+
const previous = selectedChannel(session, channel.frameType);
|
|
378
|
+
if (previous !== void 0) displaced.set(session.id, previous);
|
|
379
|
+
}
|
|
380
|
+
const source = channel.start(channelHost(channel.frameType, mount));
|
|
381
|
+
const started = {
|
|
382
|
+
channel,
|
|
383
|
+
source,
|
|
384
|
+
mount
|
|
385
|
+
};
|
|
386
|
+
channels.set(key, started);
|
|
387
|
+
for (const session of sessions.values()) {
|
|
388
|
+
if (selectedChannel(session, channel.frameType) !== started) continue;
|
|
389
|
+
displaced.get(session.id)?.source.sessionRemoved?.(session.id);
|
|
390
|
+
source.sessionAdded?.(scopeOf(session));
|
|
391
|
+
}
|
|
392
|
+
return started;
|
|
393
|
+
} catch (error) {
|
|
394
|
+
options.onNotice?.(`hub channel '${channel.frameType}' failed (${String(error)})`);
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
const releaseChannel = (channel, started) => {
|
|
399
|
+
const key = `${mountKey(started.mount)}:${channel.frameType}`;
|
|
400
|
+
if (channels.get(key) !== started) return;
|
|
401
|
+
const served = [...sessions.values()].filter((session) => selectedChannel(session, channel.frameType) === started);
|
|
402
|
+
channels.delete(key);
|
|
403
|
+
started.source.close();
|
|
404
|
+
for (const session of served) selectedChannel(session, channel.frameType)?.source.sessionAdded?.(scopeOf(session));
|
|
405
|
+
};
|
|
406
|
+
const receiveMountedChannel = (mount, sessionId, frameType, payload, connectionId) => {
|
|
407
|
+
if (!connectionId) return false;
|
|
408
|
+
const session = sessions.get(sessionId);
|
|
409
|
+
if (!session || !belongs(mount, session)) return false;
|
|
410
|
+
const started = channels.get(`${mountKey(mount)}:${frameType}`);
|
|
411
|
+
if (!started?.channel.receive) return false;
|
|
412
|
+
started.channel.receive(scopeOf(session), payload, { connectionId });
|
|
413
|
+
return true;
|
|
414
|
+
};
|
|
415
|
+
const unregisterSession = (sessionId, options) => {
|
|
416
|
+
const current = sessions.get(sessionId);
|
|
417
|
+
if (current === void 0) return;
|
|
418
|
+
const cleanup = sessionCleanups.get(sessionId);
|
|
419
|
+
if (cleanup !== void 0) subscriptions.delete(cleanup);
|
|
420
|
+
communicationEndpoints.get(sessionId)?.endpoint.close();
|
|
421
|
+
for (const { source } of selectedChannels(current)) source.sessionRemoved?.(sessionId);
|
|
422
|
+
sessions.delete(sessionId);
|
|
423
|
+
sessionCleanups.delete(sessionId);
|
|
424
|
+
presentationCleanups.get(sessionId)?.();
|
|
425
|
+
presentationCleanups.delete(sessionId);
|
|
426
|
+
avatarIcons.delete(sessionId);
|
|
427
|
+
directEvents.clearSession?.(sessionId);
|
|
428
|
+
emit({
|
|
429
|
+
kind: "removed",
|
|
430
|
+
sessionId,
|
|
431
|
+
...options?.keepDormant === true ? { dormant: true } : {}
|
|
432
|
+
});
|
|
433
|
+
};
|
|
434
|
+
const startSessionShutdown = (session, closeOptions) => {
|
|
435
|
+
const existing = sessionShutdowns.get(session.id);
|
|
436
|
+
if (existing !== void 0) return existing.promise;
|
|
437
|
+
const shutdown = {
|
|
438
|
+
session,
|
|
439
|
+
promise: Promise.resolve(),
|
|
440
|
+
pending: true
|
|
441
|
+
};
|
|
442
|
+
const promise = Promise.resolve().then(() => closeOptions === void 0 ? options.manager.closeSession(session.id) : options.manager.closeSession(session.id, closeOptions));
|
|
443
|
+
shutdown.promise = promise;
|
|
444
|
+
sessionShutdowns.set(session.id, shutdown);
|
|
445
|
+
promise.then(() => {
|
|
446
|
+
shutdown.pending = false;
|
|
447
|
+
if (sessionShutdowns.get(session.id) === shutdown) sessionShutdowns.delete(session.id);
|
|
448
|
+
}, () => {
|
|
449
|
+
shutdown.pending = false;
|
|
450
|
+
});
|
|
451
|
+
return promise;
|
|
452
|
+
};
|
|
453
|
+
const register = (session) => {
|
|
454
|
+
if (closed) throw new Error("The headless hub is closed.");
|
|
455
|
+
if (sessions.has(session.id)) throw new Error(`Session '${session.id}' is already registered.`);
|
|
456
|
+
if (sessionShutdowns.get(session.id)?.pending) throw new Error(`Session '${session.id}' is still shutting down.`);
|
|
457
|
+
sessionShutdowns.delete(session.id);
|
|
458
|
+
let current = {
|
|
459
|
+
...session,
|
|
460
|
+
updatedAt: session.updatedAt ?? session.createdAt,
|
|
461
|
+
phase: session.phase ?? "idle",
|
|
462
|
+
phaseSince: session.phaseSince ?? session.createdAt,
|
|
463
|
+
pendingMessageCount: session.pendingMessageCount ?? 0,
|
|
464
|
+
everPrompted: session.everPrompted ?? false,
|
|
465
|
+
awaitingInput: session.awaitingInput ?? false
|
|
466
|
+
};
|
|
467
|
+
sessions.set(session.id, current);
|
|
468
|
+
announceCommunicationReady(session.id);
|
|
469
|
+
const refreshGit = () => {
|
|
470
|
+
(options.readGitStatus ?? readSessionGitStatus)(session.cwd).then((git) => {
|
|
471
|
+
if (closed || sessions.get(session.id)?.host !== session.host) return;
|
|
472
|
+
if (git?.branch === current.git?.branch && git?.dirty === current.git?.dirty) return;
|
|
473
|
+
const { git: _previous, ...rest } = current;
|
|
474
|
+
current = git === void 0 ? rest : {
|
|
475
|
+
...rest,
|
|
476
|
+
git
|
|
477
|
+
};
|
|
478
|
+
sessions.set(session.id, current);
|
|
479
|
+
emit({
|
|
480
|
+
kind: "upsert",
|
|
481
|
+
session: current
|
|
482
|
+
});
|
|
483
|
+
}, (error) => options.onNotice?.(`session ${session.id} git status failed (${error instanceof Error ? error.message : String(error)})`));
|
|
484
|
+
};
|
|
485
|
+
const stopPresentation = session.host.onPresentationFrame((frame) => {
|
|
486
|
+
if (sessions.get(session.id)?.host !== session.host) return;
|
|
487
|
+
const type = typeof frame.type === "string" ? frame.type : "";
|
|
488
|
+
if (type !== "agent_start" && type !== "agent_settled" && type !== "message_end" && type !== "session_info_changed" && type !== "extension_ui_request" && type !== "extension_ui_answered") return;
|
|
489
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
490
|
+
const phase = type === "agent_start" ? "turn" : type === "agent_settled" ? "idle" : current.phase;
|
|
491
|
+
const phaseChanged = phase !== current.phase;
|
|
492
|
+
const method = typeof frame.method === "string" ? frame.method : "";
|
|
493
|
+
const awaitingInput = type === "extension_ui_request" && [
|
|
494
|
+
"select",
|
|
495
|
+
"confirm",
|
|
496
|
+
"input",
|
|
497
|
+
"editor"
|
|
498
|
+
].includes(method) ? true : type === "extension_ui_answered" || type === "agent_settled" ? false : current.awaitingInput;
|
|
499
|
+
current = {
|
|
500
|
+
...current,
|
|
501
|
+
name: type === "session_info_changed" && typeof frame.name === "string" ? frame.name : current.name,
|
|
502
|
+
updatedAt: now,
|
|
503
|
+
phase,
|
|
504
|
+
phaseSince: phaseChanged ? now : current.phaseSince,
|
|
505
|
+
everPrompted: current.everPrompted || type === "agent_start",
|
|
506
|
+
awaitingInput,
|
|
507
|
+
...type === "agent_settled" ? { lastSettledAt: now } : {}
|
|
508
|
+
};
|
|
509
|
+
sessions.set(session.id, current);
|
|
510
|
+
emit({
|
|
511
|
+
kind: "upsert",
|
|
512
|
+
session: current
|
|
513
|
+
});
|
|
514
|
+
if (type === "agent_settled") refreshGit();
|
|
515
|
+
});
|
|
516
|
+
let registered = false;
|
|
517
|
+
const applyProfile = (profileName) => {
|
|
518
|
+
if (closed || sessions.get(session.id)?.host !== session.host) return;
|
|
519
|
+
let identity;
|
|
520
|
+
if (profileName) {
|
|
521
|
+
const root = session.workspaceId && workspaces.get(session.workspaceId)?.root || session.cwd;
|
|
522
|
+
try {
|
|
523
|
+
identity = options.resolveProfileIdentity?.(root, profileName);
|
|
524
|
+
} catch (error) {
|
|
525
|
+
options.onNotice?.(`session ${session.id} profile "${profileName}" could not be resolved (${error instanceof Error ? error.message : String(error)})`);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
const icon = identity?.icon;
|
|
529
|
+
if (icon) avatarIcons.set(session.id, icon);
|
|
530
|
+
else avatarIcons.delete(session.id);
|
|
531
|
+
const profile = profileName ? {
|
|
532
|
+
name: profileName,
|
|
533
|
+
...identity?.displayName ? { displayName: identity.displayName } : {},
|
|
534
|
+
...icon ? { iconVersion: crypto.createHash("sha256").update(icon).digest("hex").slice(0, ICON_VERSION_LENGTH) } : {}
|
|
535
|
+
} : void 0;
|
|
536
|
+
const previous = current.profile;
|
|
537
|
+
if (previous?.name === profile?.name && previous?.displayName === profile?.displayName && previous?.iconVersion === profile?.iconVersion) return;
|
|
538
|
+
const { profile: _previous, ...rest } = current;
|
|
539
|
+
current = profile === void 0 ? rest : {
|
|
540
|
+
...rest,
|
|
541
|
+
profile
|
|
542
|
+
};
|
|
543
|
+
sessions.set(session.id, current);
|
|
544
|
+
if (registered) emit({
|
|
545
|
+
kind: "upsert",
|
|
546
|
+
session: current
|
|
547
|
+
});
|
|
548
|
+
};
|
|
549
|
+
const stopSelection = session.host.onSelection?.((selection) => applyProfile(selection.profile));
|
|
550
|
+
presentationCleanups.set(session.id, () => {
|
|
551
|
+
stopPresentation();
|
|
552
|
+
stopSelection?.();
|
|
553
|
+
});
|
|
554
|
+
for (const { source } of selectedChannels(current)) source.sessionAdded?.(scopeOf(session));
|
|
555
|
+
const active = () => sessions.get(session.id)?.host === session.host && !closed;
|
|
556
|
+
const cleanup = () => {
|
|
557
|
+
subscriptions.delete(cleanup);
|
|
558
|
+
sessionCleanups.delete(session.id);
|
|
559
|
+
if (!active()) return;
|
|
560
|
+
closeSession(session.id).catch((error) => options.onNotice?.(`session ${session.id} cleanup failed (${error instanceof Error ? error.message : String(error)})`));
|
|
561
|
+
};
|
|
562
|
+
sessionCleanups.set(session.id, cleanup);
|
|
563
|
+
session.host.runtime.exited.then(cleanup, cleanup);
|
|
564
|
+
subscriptions.add(cleanup);
|
|
565
|
+
registered = true;
|
|
566
|
+
emit({
|
|
567
|
+
kind: "upsert",
|
|
568
|
+
session: current
|
|
569
|
+
});
|
|
570
|
+
refreshGit();
|
|
571
|
+
};
|
|
572
|
+
const closeSession = async (sessionId, closeOptions) => {
|
|
573
|
+
const pending = sessionShutdowns.get(sessionId);
|
|
574
|
+
if (pending !== void 0) {
|
|
575
|
+
await pending.promise;
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
const session = sessions.get(sessionId);
|
|
579
|
+
if (session === void 0) return;
|
|
580
|
+
unregisterSession(sessionId, closeOptions);
|
|
581
|
+
await startSessionShutdown(session, closeOptions);
|
|
582
|
+
};
|
|
583
|
+
const promptTarget = (sessionId, parentSessionId) => {
|
|
584
|
+
const session = closed ? void 0 : sessions.get(sessionId);
|
|
585
|
+
if (session === void 0) throw new Error("The session is not live.");
|
|
586
|
+
if (parentSessionId !== void 0 && session.parentSessionId !== parentSessionId) throw new Error("Only the parent session can drive this session.");
|
|
587
|
+
return session;
|
|
588
|
+
};
|
|
589
|
+
sessionService = {
|
|
590
|
+
create: async (request) => {
|
|
591
|
+
if (options.createSession === void 0) throw new Error("The cockpit session service cannot create sessions in this host.");
|
|
592
|
+
return options.createSession(request);
|
|
593
|
+
},
|
|
594
|
+
close: closeSession,
|
|
595
|
+
isLive: (sessionId) => !closed && sessions.has(sessionId),
|
|
596
|
+
prompt: async (sessionId, text, promptOptions) => {
|
|
597
|
+
promptOptions?.signal?.throwIfAborted();
|
|
598
|
+
const { settled } = await promptTarget(sessionId, promptOptions?.parentSessionId).host.runtime.submitPrompt(text);
|
|
599
|
+
return { settled };
|
|
600
|
+
},
|
|
601
|
+
abort: async (sessionId, abortOptions) => {
|
|
602
|
+
await promptTarget(sessionId, abortOptions?.parentSessionId).host.runtime.abort();
|
|
603
|
+
},
|
|
604
|
+
steer: async (sessionId, message, steerOptions) => {
|
|
605
|
+
await promptTarget(sessionId, steerOptions?.parentSessionId).host.runtime.steer(message);
|
|
606
|
+
},
|
|
607
|
+
release: async (sessionId, releaseOptions) => {
|
|
608
|
+
promptTarget(sessionId, releaseOptions?.parentSessionId);
|
|
609
|
+
await closeSession(sessionId, { keepDormant: true });
|
|
610
|
+
},
|
|
611
|
+
reservations: options.sessionReservations,
|
|
612
|
+
provisionReservedWorktree: async (request) => {
|
|
613
|
+
const parent = sessions.get(request.parentSessionId);
|
|
614
|
+
const provisioner = parent === void 0 ? void 0 : worktreeProvisionerFor(parent);
|
|
615
|
+
if (provisioner === void 0) throw new Error("Automatic conversation worktree provisioning is unavailable.");
|
|
616
|
+
return provisioner(request);
|
|
617
|
+
},
|
|
618
|
+
registerReservedWorktreeProvisioner: (provisioner) => registerReservedWorktreeProvisioner({ scope: "global" }, provisioner),
|
|
619
|
+
canCommunicate,
|
|
620
|
+
bindCommunication
|
|
621
|
+
};
|
|
622
|
+
const mountFacets = async (facets, suppliedContext) => {
|
|
623
|
+
if (closed) throw new Error("The headless hub is closed.");
|
|
624
|
+
const context = suppliedContext ?? {
|
|
625
|
+
scope: "global",
|
|
626
|
+
...options.hubToken?.() === void 0 ? {} : { hubToken: options.hubToken() },
|
|
627
|
+
sessionService,
|
|
628
|
+
directEvents,
|
|
629
|
+
onNotice: (message) => options.onNotice?.(message)
|
|
630
|
+
};
|
|
631
|
+
if (context.scope === "session") throw new Error("Session facets belong to their session host.");
|
|
632
|
+
if (context.scope === "workspace" && (!context.workspaceId || !context.workspaceRoot)) throw new Error("Workspace mounts require an admitted identity and root.");
|
|
633
|
+
const mount = context.scope === "global" ? { scope: "global" } : {
|
|
634
|
+
scope: "workspace",
|
|
635
|
+
workspaceId: context.workspaceId
|
|
636
|
+
};
|
|
637
|
+
const key = mountKey(mount);
|
|
638
|
+
if (mounts.has(key)) throw new Error(`The '${key}' facets are already mounted.`);
|
|
639
|
+
const host = createDoomServerHost({
|
|
640
|
+
scope: context.scope,
|
|
641
|
+
context: {
|
|
642
|
+
...context,
|
|
643
|
+
sessionService: channelHost("", mount).sessionService,
|
|
644
|
+
directEvents: channelHost("", mount).directEvents,
|
|
645
|
+
receiveChannel: (sessionId, frameType, payload, connectionId) => receiveMountedChannel(mount, sessionId, frameType, payload, connectionId)
|
|
646
|
+
},
|
|
647
|
+
mountChannel: (channel) => {
|
|
648
|
+
const started = startChannel(channel, mount);
|
|
649
|
+
if (started === void 0) return {
|
|
650
|
+
mounted: false,
|
|
651
|
+
dispose: () => void 0
|
|
652
|
+
};
|
|
653
|
+
return {
|
|
654
|
+
mounted: true,
|
|
655
|
+
dispose: () => releaseChannel(channel, started)
|
|
656
|
+
};
|
|
657
|
+
},
|
|
658
|
+
pluginRegistry
|
|
659
|
+
});
|
|
660
|
+
try {
|
|
661
|
+
const installed = await installServerFacets({
|
|
662
|
+
host,
|
|
663
|
+
facets,
|
|
664
|
+
onNotice: options.onNotice
|
|
665
|
+
});
|
|
666
|
+
if (closed) {
|
|
667
|
+
await installed.dispose();
|
|
668
|
+
throw new Error("The headless hub was closed while mounting facets.");
|
|
669
|
+
}
|
|
670
|
+
mounts.set(key, {
|
|
671
|
+
host,
|
|
672
|
+
installed
|
|
673
|
+
});
|
|
674
|
+
if (mount.scope === "workspace") {
|
|
675
|
+
const workspace = {
|
|
676
|
+
id: mount.workspaceId,
|
|
677
|
+
root: context.workspaceRoot,
|
|
678
|
+
available: true
|
|
679
|
+
};
|
|
680
|
+
workspaces.set(mount.workspaceId, workspace);
|
|
681
|
+
emit({
|
|
682
|
+
kind: "workspace_upsert",
|
|
683
|
+
workspace
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
} catch (error) {
|
|
687
|
+
host.dispose();
|
|
688
|
+
throw error;
|
|
689
|
+
}
|
|
690
|
+
};
|
|
691
|
+
return {
|
|
692
|
+
sessionService,
|
|
693
|
+
directEvents,
|
|
694
|
+
...options.computerUse === void 0 ? {} : { computerUse: options.computerUse },
|
|
695
|
+
snapshot: () => [...sessions.values()].map(present),
|
|
696
|
+
session: (sessionId) => {
|
|
697
|
+
const session = sessions.get(sessionId);
|
|
698
|
+
return session === void 0 ? void 0 : present(session);
|
|
699
|
+
},
|
|
700
|
+
setPendingSessionSetups(sessionId, pending) {
|
|
701
|
+
if (JSON.stringify(pendingSetups.get(sessionId) ?? []) === JSON.stringify(pending)) return;
|
|
702
|
+
pendingSetups.set(sessionId, Object.freeze([...pending]));
|
|
703
|
+
const session = sessions.get(sessionId);
|
|
704
|
+
if (session) emit({
|
|
705
|
+
kind: "upsert",
|
|
706
|
+
session: present(session)
|
|
707
|
+
});
|
|
708
|
+
},
|
|
709
|
+
runtime: (sessionId) => sessions.get(sessionId)?.host.runtime,
|
|
710
|
+
sessionAvatar(sessionId) {
|
|
711
|
+
const match = ICON_DATA_URL.exec(avatarIcons.get(sessionId) ?? "");
|
|
712
|
+
const mimeType = match?.[1];
|
|
713
|
+
if (match === null || !PROFILE_ICON_MIME_TYPES.includes(mimeType ?? "")) return void 0;
|
|
714
|
+
return {
|
|
715
|
+
mimeType,
|
|
716
|
+
bytes: Buffer.from(match[2], "base64")
|
|
717
|
+
};
|
|
718
|
+
},
|
|
719
|
+
onEvent(listener) {
|
|
720
|
+
listeners.add(listener);
|
|
721
|
+
return () => listeners.delete(listener);
|
|
722
|
+
},
|
|
723
|
+
register,
|
|
724
|
+
notifySessionRemoved(sessionId) {
|
|
725
|
+
emit({
|
|
726
|
+
kind: "removed",
|
|
727
|
+
sessionId
|
|
728
|
+
});
|
|
729
|
+
},
|
|
730
|
+
mountFacets,
|
|
731
|
+
workspaces: () => [...workspaces.values()],
|
|
732
|
+
registerWorkspace(workspace) {
|
|
733
|
+
workspaces.set(workspace.id, workspace);
|
|
734
|
+
emit({
|
|
735
|
+
kind: "workspace_upsert",
|
|
736
|
+
workspace
|
|
737
|
+
});
|
|
738
|
+
},
|
|
739
|
+
admitWorkspace: async (request) => {
|
|
740
|
+
if (!options.admitWorkspace) throw new Error("Workspace admission is unavailable.");
|
|
741
|
+
return options.admitWorkspace(request);
|
|
742
|
+
},
|
|
743
|
+
async removeWorkspace(id) {
|
|
744
|
+
if ([...sessions.values()].some((session) => session.workspaceId === id)) throw new Error("Workspace still has live sessions.");
|
|
745
|
+
const key = mountKey({
|
|
746
|
+
scope: "workspace",
|
|
747
|
+
workspaceId: id
|
|
748
|
+
});
|
|
749
|
+
const mounted = mounts.get(key);
|
|
750
|
+
if (!workspaces.has(id)) return;
|
|
751
|
+
options.onWorkspaceRemoved?.(id);
|
|
752
|
+
workspaces.delete(id);
|
|
753
|
+
emit({
|
|
754
|
+
kind: "workspace_removed",
|
|
755
|
+
workspaceId: id
|
|
756
|
+
});
|
|
757
|
+
if (!mounted) return;
|
|
758
|
+
mounts.delete(key);
|
|
759
|
+
try {
|
|
760
|
+
await mounted.installed.dispose();
|
|
761
|
+
} finally {
|
|
762
|
+
mounted.host.dispose();
|
|
763
|
+
}
|
|
764
|
+
},
|
|
765
|
+
async requestApi(mount, basePath, request) {
|
|
766
|
+
if (closed) return Response.json({ error: "Server is closed." }, { status: 503 });
|
|
767
|
+
if (mount.scope === "session") {
|
|
768
|
+
const session = sessions.get(mount.sessionId);
|
|
769
|
+
if (!session || !options.requestSessionApi) return Response.json({ error: "Session not found." }, { status: 404 });
|
|
770
|
+
const url = new URL(request.url);
|
|
771
|
+
return options.requestSessionApi(scopeOf(session), {
|
|
772
|
+
basePath,
|
|
773
|
+
path: `${url.pathname}${url.search}`,
|
|
774
|
+
method: request.method,
|
|
775
|
+
headers: request.headers,
|
|
776
|
+
signal: request.signal,
|
|
777
|
+
body: request.body === null ? void 0 : new Uint8Array(await request.arrayBuffer())
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
const handler = mounts.get(mountKey(mount))?.host.handlerFor(basePath);
|
|
781
|
+
if (!handler) return Response.json({ error: `API '${basePath}' is not mounted in ${mountKey(mount)}.` }, { status: 404 });
|
|
782
|
+
return handler.fetch(request);
|
|
783
|
+
},
|
|
784
|
+
pluginRegistry,
|
|
785
|
+
invokePlugin: (call, direction, caller) => pluginRegistry.invoke(call, direction, caller),
|
|
786
|
+
async create(sessionOptions) {
|
|
787
|
+
const id = sessionOptions.sessionId;
|
|
788
|
+
if (closed) throw new Error("The headless hub is closed.");
|
|
789
|
+
if (sessions.has(id)) throw new Error(`Session '${id}' is already registered.`);
|
|
790
|
+
if (sessionShutdowns.get(id)?.pending) throw new Error(`Session '${id}' is still shutting down.`);
|
|
791
|
+
const host = await options.manager.create(sessionOptions);
|
|
792
|
+
const settledAt = await lastSettledAt(host);
|
|
793
|
+
const session = {
|
|
794
|
+
id: sessionOptions.sessionId,
|
|
795
|
+
workspaceId: sessionOptions.workspaceId,
|
|
796
|
+
webComposition: sessionOptions.webComposition,
|
|
797
|
+
name: sessionOptions.sessionName,
|
|
798
|
+
cwd: sessionOptions.cwd,
|
|
799
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
800
|
+
...sessionOptions.parentSessionId === void 0 ? {} : { parentSessionId: sessionOptions.parentSessionId },
|
|
801
|
+
...sessionOptions.sessionProvenance === void 0 ? {} : { sessionProvenance: sessionOptions.sessionProvenance },
|
|
802
|
+
environment: sessionOptions.environment,
|
|
803
|
+
...settledAt === void 0 ? {} : {
|
|
804
|
+
everPrompted: true,
|
|
805
|
+
lastSettledAt: settledAt
|
|
806
|
+
},
|
|
807
|
+
host
|
|
808
|
+
};
|
|
809
|
+
try {
|
|
810
|
+
register(session);
|
|
811
|
+
} catch (error) {
|
|
812
|
+
await Promise.resolve(options.manager.closeSession(id)).catch((closeError) => options.onNotice?.(`Session '${id}' could not be closed after a failed registration: ${String(closeError)}`));
|
|
813
|
+
throw error;
|
|
814
|
+
}
|
|
815
|
+
return session;
|
|
816
|
+
},
|
|
817
|
+
closeSession,
|
|
818
|
+
async requestSessionApi(scope, request) {
|
|
819
|
+
if (closed || !sessions.has(scope.sessionId)) return Response.json({ error: "Session not found." }, { status: 404 });
|
|
820
|
+
if (options.requestSessionApi === void 0) return Response.json({ error: "Session API unavailable." }, { status: 404 });
|
|
821
|
+
return options.requestSessionApi(scope, request);
|
|
822
|
+
},
|
|
823
|
+
registerChannel(channel, mount = { scope: "global" }) {
|
|
824
|
+
const started = startChannel(channel, mount);
|
|
825
|
+
if (started === void 0) return () => void 0;
|
|
826
|
+
return () => releaseChannel(channel, started);
|
|
827
|
+
},
|
|
828
|
+
channelTypes: () => [...new Set([...channels.values()].map(({ channel }) => channel.frameType))],
|
|
829
|
+
channelFrames(sessionId) {
|
|
830
|
+
const session = sessions.get(sessionId);
|
|
831
|
+
if (session === void 0) return [];
|
|
832
|
+
const scope = scopeOf(session);
|
|
833
|
+
const frames = [];
|
|
834
|
+
for (const { channel, source } of selectedChannels(session)) {
|
|
835
|
+
const type = channel.frameType;
|
|
836
|
+
const payload = source.payloadFor(scope);
|
|
837
|
+
if (payload !== void 0) frames.push({
|
|
838
|
+
type,
|
|
839
|
+
sessionId,
|
|
840
|
+
payload
|
|
841
|
+
});
|
|
842
|
+
}
|
|
843
|
+
return frames;
|
|
844
|
+
},
|
|
845
|
+
threadJournal(sessionId, threadId) {
|
|
846
|
+
const session = sessions.get(sessionId);
|
|
847
|
+
if (session === void 0) return void 0;
|
|
848
|
+
const scope = scopeOf(session);
|
|
849
|
+
for (const { source } of selectedChannels(session)) {
|
|
850
|
+
const journal = source.threadJournal?.(scope, threadId);
|
|
851
|
+
if (journal !== void 0) return journal;
|
|
852
|
+
}
|
|
853
|
+
},
|
|
854
|
+
receiveChannel(sessionId, frameType, payload, connectionId, desktopAuthorized = false) {
|
|
855
|
+
if (connectionId === "") return;
|
|
856
|
+
const session = sessions.get(sessionId);
|
|
857
|
+
const started = session && selectedChannels(session).find(({ channel }) => channel.frameType === frameType);
|
|
858
|
+
if (session === void 0 || started === void 0) return;
|
|
859
|
+
started.channel.receive?.(scopeOf(session), payload, {
|
|
860
|
+
connectionId,
|
|
861
|
+
...desktopAuthorized ? { desktopAuthorized: true } : {}
|
|
862
|
+
});
|
|
863
|
+
},
|
|
864
|
+
disconnectChannels(connectionId) {
|
|
865
|
+
if (connectionId === "") return;
|
|
866
|
+
for (const { channel } of channels.values()) channel.disconnected?.({ connectionId });
|
|
867
|
+
},
|
|
868
|
+
async close() {
|
|
869
|
+
if (closed) return;
|
|
870
|
+
const ids = [...sessions.keys()];
|
|
871
|
+
closed = true;
|
|
872
|
+
directEvents.close();
|
|
873
|
+
for (const unsubscribe of subscriptions) unsubscribe();
|
|
874
|
+
subscriptions.clear();
|
|
875
|
+
for (const cleanup of presentationCleanups.values()) cleanup();
|
|
876
|
+
presentationCleanups.clear();
|
|
877
|
+
const failures = [];
|
|
878
|
+
for (const mounted of [...mounts.values()].reverse()) {
|
|
879
|
+
try {
|
|
880
|
+
await mounted.installed.dispose();
|
|
881
|
+
} catch (error) {
|
|
882
|
+
failures.push(error);
|
|
883
|
+
}
|
|
884
|
+
try {
|
|
885
|
+
mounted.host.dispose();
|
|
886
|
+
} catch (error) {
|
|
887
|
+
failures.push(error);
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
mounts.clear();
|
|
891
|
+
pluginRegistry.dispose();
|
|
892
|
+
workspaces.clear();
|
|
893
|
+
for (const { source } of channels.values()) source.close();
|
|
894
|
+
channels.clear();
|
|
895
|
+
listeners.clear();
|
|
896
|
+
const shutdowns = [...sessionShutdowns.values()].filter(({ pending }) => pending).map(({ promise }) => promise);
|
|
897
|
+
for (const id of ids) {
|
|
898
|
+
const session = sessions.get(id);
|
|
899
|
+
if (session !== void 0 && !sessionShutdowns.has(id)) shutdowns.push(startSessionShutdown(session));
|
|
900
|
+
}
|
|
901
|
+
sessions.clear();
|
|
902
|
+
const outcomes = await Promise.allSettled(shutdowns);
|
|
903
|
+
for (const outcome of outcomes) if (outcome.status === "rejected") failures.push(outcome.reason);
|
|
904
|
+
if (failures.length) throw new AggregateError(failures, "Mount shutdown failed");
|
|
905
|
+
}
|
|
906
|
+
};
|
|
907
|
+
}
|
|
908
|
+
//#endregion
|
|
909
|
+
export { createHeadlessHub };
|
|
910
|
+
|
|
911
|
+
//# sourceMappingURL=headlessHub.mjs.map
|