@agimon-ai/po-core 0.0.0-alpha.0
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 +7 -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 +2094 -0
- package/dist/apiContracts.cjs.map +1 -0
- package/dist/apiContracts.d.mts +1086 -0
- package/dist/apiContracts.d.mts.map +1 -0
- package/dist/apiContracts.mjs +2074 -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 +9 -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 +9 -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 +12 -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 +96 -0
- package/dist/contextDetailStore.cjs.map +1 -0
- package/dist/contextDetailStore.d.mts +21 -0
- package/dist/contextDetailStore.d.mts.map +1 -0
- package/dist/contextDetailStore.mjs +87 -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 +13 -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 +232 -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 +226 -0
- package/dist/executionBudget.mjs.map +1 -0
- package/dist/extensionFile.cjs +19 -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 +16 -0
- package/dist/headless.d.mts +2 -0
- package/dist/headless.mjs +2 -0
- package/dist/headlessHub.cjs +1008 -0
- package/dist/headlessHub.cjs.map +1 -0
- package/dist/headlessHub.d.mts +176 -0
- package/dist/headlessHub.d.mts.map +1 -0
- package/dist/headlessHub.mjs +1005 -0
- package/dist/headlessHub.mjs.map +1 -0
- package/dist/headlessServer.cjs +956 -0
- package/dist/headlessServer.cjs.map +1 -0
- package/dist/headlessServer.d.mts +66 -0
- package/dist/headlessServer.d.mts.map +1 -0
- package/dist/headlessServer.mjs +949 -0
- package/dist/headlessServer.mjs.map +1 -0
- package/dist/headlessSessionHost.cjs +0 -0
- package/dist/headlessSessionHost.d.mts +89 -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/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 +44 -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 +42 -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 +9 -0
- package/dist/mcpFacet.d.mts +4 -0
- package/dist/mcpFacet.mjs +3 -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 +412 -0
- package/dist/moduleResolution.cjs.map +1 -0
- package/dist/moduleResolution.d.mts +72 -0
- package/dist/moduleResolution.d.mts.map +1 -0
- package/dist/moduleResolution.mjs +396 -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/native.cjs +29 -0
- package/dist/native.d.mts +12 -0
- package/dist/native.mjs +8 -0
- package/dist/notification.cjs +17 -0
- package/dist/notification.d.mts +2 -0
- package/dist/notification.mjs +2 -0
- package/dist/packageApi.cjs +17 -0
- package/dist/packageApi.d.mts +3 -0
- package/dist/packageApi.mjs +3 -0
- package/dist/packageApiServer.cjs +196 -0
- package/dist/packageApiServer.cjs.map +1 -0
- package/dist/packageApiServer.d.mts +62 -0
- package/dist/packageApiServer.d.mts.map +1 -0
- package/dist/packageApiServer.mjs +194 -0
- package/dist/packageApiServer.mjs.map +1 -0
- package/dist/piSettings.cjs +20 -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/remoteApi.cjs +45 -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 +44 -0
- package/dist/remoteApi.mjs.map +1 -0
- package/dist/remoteRuntime.cjs +498 -0
- package/dist/remoteRuntime.cjs.map +1 -0
- package/dist/remoteRuntime.d.mts +36 -0
- package/dist/remoteRuntime.d.mts.map +1 -0
- package/dist/remoteRuntime.mjs +494 -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 +223 -0
- package/dist/runtimeCordisHost.cjs.map +1 -0
- package/dist/runtimeCordisHost.d.mts +78 -0
- package/dist/runtimeCordisHost.d.mts.map +1 -0
- package/dist/runtimeCordisHost.mjs +212 -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/runtimePackages.cjs +120 -0
- package/dist/runtimePackages.cjs.map +1 -0
- package/dist/runtimePackages.d.mts +57 -0
- package/dist/runtimePackages.d.mts.map +1 -0
- package/dist/runtimePackages.mjs +110 -0
- package/dist/runtimePackages.mjs.map +1 -0
- package/dist/runtimePiSettings.cjs +257 -0
- package/dist/runtimePiSettings.cjs.map +1 -0
- package/dist/runtimePiSettings.d.mts +70 -0
- package/dist/runtimePiSettings.d.mts.map +1 -0
- package/dist/runtimePiSettings.mjs +235 -0
- package/dist/runtimePiSettings.mjs.map +1 -0
- package/dist/runtimeProtocol.cjs +228 -0
- package/dist/runtimeProtocol.cjs.map +1 -0
- package/dist/runtimeProtocol.d.mts +86 -0
- package/dist/runtimeProtocol.d.mts.map +1 -0
- package/dist/runtimeProtocol.mjs +219 -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 +34 -0
- package/dist/serverFacet.d.mts +10 -0
- package/dist/serverFacet.mjs +9 -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/sqliteSessionStorage.cjs +168 -0
- package/dist/sqliteSessionStorage.cjs.map +1 -0
- package/dist/sqliteSessionStorage.d.mts +35 -0
- package/dist/sqliteSessionStorage.d.mts.map +1 -0
- package/dist/sqliteSessionStorage.mjs +158 -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 +31 -0
- package/dist/src/constants/contextApi.cjs.map +1 -0
- package/dist/src/constants/contextApi.d.mts +23 -0
- package/dist/src/constants/contextApi.d.mts.map +1 -0
- package/dist/src/constants/contextApi.mjs +25 -0
- package/dist/src/constants/contextApi.mjs.map +1 -0
- package/dist/src/constants/nativeHost.cjs +56 -0
- package/dist/src/constants/nativeHost.cjs.map +1 -0
- package/dist/src/constants/nativeHost.d.mts +21 -0
- package/dist/src/constants/nativeHost.d.mts.map +1 -0
- package/dist/src/constants/nativeHost.mjs +53 -0
- package/dist/src/constants/nativeHost.mjs.map +1 -0
- package/dist/src/constants/remote.cjs +132 -0
- package/dist/src/constants/remote.cjs.map +1 -0
- package/dist/src/constants/remote.mjs +99 -0
- package/dist/src/constants/remote.mjs.map +1 -0
- package/dist/src/constants/sessionFiles.cjs +27 -0
- package/dist/src/constants/sessionFiles.cjs.map +1 -0
- package/dist/src/constants/sessionFiles.mjs +25 -0
- package/dist/src/constants/sessionFiles.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 +140 -0
- package/dist/src/extensions/extensionFile.cjs.map +1 -0
- package/dist/src/extensions/extensionFile.d.mts +69 -0
- package/dist/src/extensions/extensionFile.d.mts.map +1 -0
- package/dist/src/extensions/extensionFile.mjs +124 -0
- package/dist/src/extensions/extensionFile.mjs.map +1 -0
- package/dist/src/extensions/serverPlugin.cjs +107 -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 +107 -0
- package/dist/src/extensions/serverPlugin.mjs.map +1 -0
- package/dist/src/extensions/webPlugin.cjs +136 -0
- package/dist/src/extensions/webPlugin.cjs.map +1 -0
- package/dist/src/extensions/webPlugin.d.mts +68 -0
- package/dist/src/extensions/webPlugin.d.mts.map +1 -0
- package/dist/src/extensions/webPlugin.mjs +114 -0
- package/dist/src/extensions/webPlugin.mjs.map +1 -0
- package/dist/src/pi/piSessionRuntime.cjs +625 -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 +624 -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 +44 -0
- package/dist/src/schemas/backgroundWork.cjs.map +1 -0
- package/dist/src/schemas/backgroundWork.d.mts +76 -0
- package/dist/src/schemas/backgroundWork.d.mts.map +1 -0
- package/dist/src/schemas/backgroundWork.mjs +38 -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 +116 -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 +97 -0
- package/dist/src/schemas/headless.cjs.map +1 -0
- package/dist/src/schemas/headless.d.mts +472 -0
- package/dist/src/schemas/headless.d.mts.map +1 -0
- package/dist/src/schemas/headless.mjs +84 -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 +271 -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.d.mts +13 -0
- package/dist/src/schemas/mcpBundle.d.mts.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 +76 -0
- package/dist/src/schemas/packageApi.cjs.map +1 -0
- package/dist/src/schemas/packageApi.d.mts +302 -0
- package/dist/src/schemas/packageApi.d.mts.map +1 -0
- package/dist/src/schemas/packageApi.mjs +66 -0
- package/dist/src/schemas/packageApi.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 +70 -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/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.d.mts +19 -0
- package/dist/src/schemas/serverBundle.d.mts.map +1 -0
- package/dist/src/schemas/serverFacet.cjs +111 -0
- package/dist/src/schemas/serverFacet.cjs.map +1 -0
- package/dist/src/schemas/serverFacet.d.mts +152 -0
- package/dist/src/schemas/serverFacet.d.mts.map +1 -0
- package/dist/src/schemas/serverFacet.mjs +101 -0
- package/dist/src/schemas/serverFacet.mjs.map +1 -0
- package/dist/src/schemas/sessionMcpActivity.d.mts +47 -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 +313 -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 +93 -0
- package/dist/src/server/devProxySocket.cjs.map +1 -0
- package/dist/src/server/devProxySocket.d.mts +25 -0
- package/dist/src/server/devProxySocket.d.mts.map +1 -0
- package/dist/src/server/devProxySocket.mjs +93 -0
- package/dist/src/server/devProxySocket.mjs.map +1 -0
- package/dist/src/server/directHarnessRuntime.cjs +2387 -0
- package/dist/src/server/directHarnessRuntime.cjs.map +1 -0
- package/dist/src/server/directHarnessRuntime.d.mts +4 -0
- package/dist/src/server/directHarnessRuntime.mjs +2384 -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 +382 -0
- package/dist/src/server/headlessProtocol.cjs.map +1 -0
- package/dist/src/server/headlessProtocol.mjs +382 -0
- package/dist/src/server/headlessProtocol.mjs.map +1 -0
- package/dist/src/server/liveImport.cjs +37 -0
- package/dist/src/server/liveImport.cjs.map +1 -0
- package/dist/src/server/liveImport.d.mts +27 -0
- package/dist/src/server/liveImport.d.mts.map +1 -0
- package/dist/src/server/liveImport.mjs +34 -0
- package/dist/src/server/liveImport.mjs.map +1 -0
- package/dist/src/server/mcpBundleLoader.cjs +108 -0
- package/dist/src/server/mcpBundleLoader.cjs.map +1 -0
- package/dist/src/server/mcpBundleLoader.d.mts +46 -0
- package/dist/src/server/mcpBundleLoader.d.mts.map +1 -0
- package/dist/src/server/mcpBundleLoader.mjs +107 -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 +463 -0
- package/dist/src/server/remoteRoutes.cjs.map +1 -0
- package/dist/src/server/remoteRoutes.mjs +463 -0
- package/dist/src/server/remoteRoutes.mjs.map +1 -0
- package/dist/src/server/serverFacetLoader.cjs +214 -0
- package/dist/src/server/serverFacetLoader.cjs.map +1 -0
- package/dist/src/server/serverFacetLoader.d.mts +72 -0
- package/dist/src/server/serverFacetLoader.d.mts.map +1 -0
- package/dist/src/server/serverFacetLoader.mjs +212 -0
- package/dist/src/server/serverFacetLoader.mjs.map +1 -0
- package/dist/src/server/sessionMcpHandler.cjs +585 -0
- package/dist/src/server/sessionMcpHandler.cjs.map +1 -0
- package/dist/src/server/sessionMcpHandler.d.mts +50 -0
- package/dist/src/server/sessionMcpHandler.d.mts.map +1 -0
- package/dist/src/server/sessionMcpHandler.mjs +582 -0
- package/dist/src/server/sessionMcpHandler.mjs.map +1 -0
- package/dist/src/server/sessionMcpRoutes.cjs +809 -0
- package/dist/src/server/sessionMcpRoutes.cjs.map +1 -0
- package/dist/src/server/sessionMcpRoutes.mjs +804 -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 +89 -0
- package/dist/src/services/bundlePublication/index.cjs.map +1 -0
- package/dist/src/services/bundlePublication/index.mjs +86 -0
- package/dist/src/services/bundlePublication/index.mjs.map +1 -0
- package/dist/src/services/contextApiUrls/index.cjs +53 -0
- package/dist/src/services/contextApiUrls/index.cjs.map +1 -0
- package/dist/src/services/contextApiUrls/index.d.mts +8 -0
- package/dist/src/services/contextApiUrls/index.d.mts.map +1 -0
- package/dist/src/services/contextApiUrls/index.mjs +52 -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 +146 -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 +146 -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 +18 -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/deviceTrust/index.cjs +294 -0
- package/dist/src/services/deviceTrust/index.cjs.map +1 -0
- package/dist/src/services/deviceTrust/index.mjs +282 -0
- package/dist/src/services/deviceTrust/index.mjs.map +1 -0
- package/dist/src/services/durableNavigation/index.cjs +46 -0
- package/dist/src/services/durableNavigation/index.cjs.map +1 -0
- package/dist/src/services/durableNavigation/index.mjs +45 -0
- package/dist/src/services/durableNavigation/index.mjs.map +1 -0
- package/dist/src/services/headlessClient/index.cjs +126 -0
- package/dist/src/services/headlessClient/index.cjs.map +1 -0
- package/dist/src/services/headlessClient/index.mjs +126 -0
- package/dist/src/services/headlessClient/index.mjs.map +1 -0
- package/dist/src/services/historyImport/index.cjs +8 -0
- package/dist/src/services/historyImport/index.cjs.map +1 -0
- package/dist/src/services/historyImport/index.d.mts +68 -0
- package/dist/src/services/historyImport/index.d.mts.map +1 -0
- package/dist/src/services/historyImport/index.mjs +8 -0
- package/dist/src/services/historyImport/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 +134 -0
- package/dist/src/services/openSessionRegistry/index.cjs.map +1 -0
- package/dist/src/services/openSessionRegistry/index.d.mts +36 -0
- package/dist/src/services/openSessionRegistry/index.d.mts.map +1 -0
- package/dist/src/services/openSessionRegistry/index.mjs +131 -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 +889 -0
- package/dist/src/services/piExtensionHost/index.cjs.map +1 -0
- package/dist/src/services/piExtensionHost/index.mjs +885 -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 +121 -0
- package/dist/src/services/piSessionEntries/index.cjs.map +1 -0
- package/dist/src/services/piSessionEntries/index.mjs +117 -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 +8 -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/publicFileShares/index.cjs +192 -0
- package/dist/src/services/publicFileShares/index.cjs.map +1 -0
- package/dist/src/services/publicFileShares/index.d.mts +16 -0
- package/dist/src/services/publicFileShares/index.d.mts.map +1 -0
- package/dist/src/services/publicFileShares/index.mjs +188 -0
- package/dist/src/services/publicFileShares/index.mjs.map +1 -0
- package/dist/src/services/remoteAccess/index.cjs +567 -0
- package/dist/src/services/remoteAccess/index.cjs.map +1 -0
- package/dist/src/services/remoteAccess/index.d.mts +121 -0
- package/dist/src/services/remoteAccess/index.d.mts.map +1 -0
- package/dist/src/services/remoteAccess/index.mjs +567 -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 +197 -0
- package/dist/src/services/remoteAccessStore/index.cjs.map +1 -0
- package/dist/src/services/remoteAccessStore/index.mjs +192 -0
- package/dist/src/services/remoteAccessStore/index.mjs.map +1 -0
- package/dist/src/services/remoteGuardPolicy/index.cjs +200 -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 +196 -0
- package/dist/src/services/remoteGuardPolicy/index.mjs.map +1 -0
- package/dist/src/services/requestReceipts/index.cjs +167 -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 +167 -0
- package/dist/src/services/requestReceipts/index.mjs.map +1 -0
- package/dist/src/services/rpcTranscript/index.cjs +633 -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 +632 -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/sessionAttachments/index.cjs +111 -0
- package/dist/src/services/sessionAttachments/index.cjs.map +1 -0
- package/dist/src/services/sessionAttachments/index.d.mts +11 -0
- package/dist/src/services/sessionAttachments/index.d.mts.map +1 -0
- package/dist/src/services/sessionAttachments/index.mjs +107 -0
- package/dist/src/services/sessionAttachments/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 +473 -0
- package/dist/src/services/sessionMcpAuthorization/index.cjs.map +1 -0
- package/dist/src/services/sessionMcpAuthorization/index.d.mts +125 -0
- package/dist/src/services/sessionMcpAuthorization/index.d.mts.map +1 -0
- package/dist/src/services/sessionMcpAuthorization/index.mjs +469 -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 +120 -0
- package/dist/src/services/sessionPresentation/index.cjs.map +1 -0
- package/dist/src/services/sessionPresentation/index.mjs +120 -0
- package/dist/src/services/sessionPresentation/index.mjs.map +1 -0
- package/dist/src/services/sqliteSessionHistory/index.cjs +97 -0
- package/dist/src/services/sqliteSessionHistory/index.cjs.map +1 -0
- package/dist/src/services/sqliteSessionHistory/index.d.mts +28 -0
- package/dist/src/services/sqliteSessionHistory/index.d.mts.map +1 -0
- package/dist/src/services/sqliteSessionHistory/index.mjs +92 -0
- package/dist/src/services/sqliteSessionHistory/index.mjs.map +1 -0
- package/dist/src/services/sqliteTranscriptReader/index.cjs +67 -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 +65 -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 +117 -0
- package/dist/src/services/transcriptPages/index.cjs.map +1 -0
- package/dist/src/services/transcriptPages/index.mjs +115 -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 +174 -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 +167 -0
- package/dist/src/services/webauthnPolicy/index.mjs.map +1 -0
- package/dist/src/services/workspaceRegistry/index.cjs +187 -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 +179 -0
- package/dist/src/services/workspaceRegistry/index.mjs.map +1 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.cjs +466 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.cjs.map +1 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.d.mts +36 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.d.mts.map +1 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.mjs +457 -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 +21 -0
- package/dist/src/systems/child/types/childSession.cjs.map +1 -0
- package/dist/src/systems/child/types/childSession.d.mts +182 -0
- package/dist/src/systems/child/types/childSession.d.mts.map +1 -0
- package/dist/src/systems/child/types/childSession.mjs +17 -0
- package/dist/src/systems/child/types/childSession.mjs.map +1 -0
- package/dist/src/systems/main/adapters/headlessHost.cjs +597 -0
- package/dist/src/systems/main/adapters/headlessHost.cjs.map +1 -0
- package/dist/src/systems/main/adapters/headlessHost.d.mts +116 -0
- package/dist/src/systems/main/adapters/headlessHost.d.mts.map +1 -0
- package/dist/src/systems/main/adapters/headlessHost.mjs +595 -0
- package/dist/src/systems/main/adapters/headlessHost.mjs.map +1 -0
- package/dist/src/systems/main/adapters/headlessSessionHost.cjs +1668 -0
- package/dist/src/systems/main/adapters/headlessSessionHost.cjs.map +1 -0
- package/dist/src/systems/main/adapters/headlessSessionHost.d.mts +20 -0
- package/dist/src/systems/main/adapters/headlessSessionHost.d.mts.map +1 -0
- package/dist/src/systems/main/adapters/headlessSessionHost.mjs +1663 -0
- package/dist/src/systems/main/adapters/headlessSessionHost.mjs.map +1 -0
- package/dist/src/systems/main/types/headlessHost.d.mts +37 -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 +399 -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 +399 -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 +152 -0
- package/dist/src/types/remote.d.mts.map +1 -0
- package/dist/src/types/server/directHarnessRuntime.d.mts +526 -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 +35 -0
- package/dist/src/web/schemas/template.cjs.map +1 -0
- package/dist/src/web/schemas/template.d.mts +9 -0
- package/dist/src/web/schemas/template.d.mts.map +1 -0
- package/dist/src/web/schemas/template.mjs +34 -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 +97 -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 +96 -0
- package/dist/src/web/services/testing/slotProps.mjs.map +1 -0
- package/dist/src/web/services/testing/templateRail.cjs +156 -0
- package/dist/src/web/services/testing/templateRail.cjs.map +1 -0
- package/dist/src/web/services/testing/templateRail.d.mts +32 -0
- package/dist/src/web/services/testing/templateRail.d.mts.map +1 -0
- package/dist/src/web/services/testing/templateRail.mjs +154 -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 +62 -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/nativeTemplate.d.mts +29 -0
- package/dist/src/web/types/nativeTemplate.d.mts.map +1 -0
- package/dist/src/web/types/sessionRegistry.d.mts +46 -0
- package/dist/src/web/types/sessionRegistry.d.mts.map +1 -0
- package/dist/src/web/types/template.d.mts +135 -0
- package/dist/src/web/types/template.d.mts.map +1 -0
- package/dist/src/web/types/webPlugin.d.mts +915 -0
- package/dist/src/web/types/webPlugin.d.mts.map +1 -0
- package/dist/terminalPiChildSessionService.cjs +324 -0
- package/dist/terminalPiChildSessionService.cjs.map +1 -0
- package/dist/terminalPiChildSessionService.d.mts +46 -0
- package/dist/terminalPiChildSessionService.d.mts.map +1 -0
- package/dist/terminalPiChildSessionService.mjs +318 -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 +79 -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 +10 -0
- package/dist/v3Export.cjs.map +1 -0
- package/dist/v3Export.d.mts +35 -0
- package/dist/v3Export.d.mts.map +1 -0
- package/dist/v3Export.mjs +9 -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 +65 -0
- package/dist/web.d.mts +20 -0
- package/dist/web.mjs +13 -0
- package/dist/webCompositions.cjs +181 -0
- package/dist/webCompositions.cjs.map +1 -0
- package/dist/webCompositions.d.mts +79 -0
- package/dist/webCompositions.d.mts.map +1 -0
- package/dist/webCompositions.mjs +174 -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 +586 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readiness.mjs","names":[],"sources":["../../../src/schemas/readiness.ts"],"sourcesContent":["import type { Context } from '@deepseek-ai/cordis';\n\n/** Cordis service name for session-scoped package initialization. */\nexport const DOOM_READINESS_SERVICE = 'doom/readiness';\n\n/** Stable machine-readable failures produced by the readiness contract. */\nexport const DOOM_READINESS_ERROR_CODE = {\n cancelled: 'DOOM_READINESS_CANCELLED',\n disposed: 'DOOM_READINESS_DISPOSED',\n duplicate: 'DOOM_READINESS_DUPLICATE',\n failed: 'DOOM_READINESS_FAILED',\n invalidArgument: 'DOOM_READINESS_INVALID_ARGUMENT',\n unavailable: 'DOOM_READINESS_UNAVAILABLE',\n waitAborted: 'DOOM_READINESS_WAIT_ABORTED',\n} as const;\n\nexport type DoomReadinessErrorCode = (typeof DOOM_READINESS_ERROR_CODE)[keyof typeof DOOM_READINESS_ERROR_CODE];\nexport type DoomReadinessState = 'pending' | 'ready' | 'degraded' | 'failed' | 'cancelled';\n\nexport interface DoomReadinessErrorDetail {\n readonly code: DoomReadinessErrorCode;\n readonly message: string;\n}\n\n/** Immutable public state for the latest generation of one package. */\nexport interface DoomReadinessSnapshot {\n readonly packageId: string;\n readonly generation: string;\n readonly state: DoomReadinessState;\n readonly diagnostics: readonly string[];\n readonly error?: DoomReadinessErrorDetail;\n}\n\nexport interface DoomReadinessTaskResult<TValue> {\n readonly value: TValue;\n readonly diagnostics?: readonly string[];\n}\n\nexport type DoomReadinessTask<TValue> = (signal: AbortSignal) => Promise<DoomReadinessTaskResult<TValue>>;\n\nexport interface DoomReadinessWaitOptions {\n readonly signal?: AbortSignal;\n}\n\nexport interface DoomReadinessHandle<TValue> {\n readonly packageId: string;\n readonly generation: string;\n /** Waits for this package only. Degraded initialization still returns its value. */\n wait(options?: DoomReadinessWaitOptions): Promise<TValue>;\n /** Reads this handle's generation, even after a newer generation replaces it. */\n snapshot(): DoomReadinessSnapshot;\n}\n\nexport interface DoomReadinessNotification {\n readonly packageId: string;\n readonly generation: string;\n readonly state: 'degraded' | 'failed';\n readonly diagnostics: readonly string[];\n readonly error?: DoomReadinessErrorDetail;\n}\n\nexport interface DoomReadinessCoordinatorOptions {\n /** Called once when a task becomes degraded or failed. */\n readonly notify?: (notification: DoomReadinessNotification) => void | Promise<void>;\n}\n\nexport interface DoomReadinessCoordinator {\n start<TValue>(packageId: string, generation: string, task: DoomReadinessTask<TValue>): DoomReadinessHandle<TValue>;\n /** Reads the latest generation registered for a package. */\n read(packageId: string): DoomReadinessSnapshot | undefined;\n /** Reads the latest generation of every registered package. */\n snapshots(): readonly DoomReadinessSnapshot[];\n /** Aborts pending work and waits for every started task to settle. */\n dispose(): Promise<void>;\n}\n\ninterface ReadinessRecord {\n readonly token: symbol;\n readonly packageId: string;\n readonly generation: string;\n readonly controller: AbortController;\n readonly terminal: Promise<void>;\n readonly resolveTerminal: () => void;\n operation: Promise<unknown>;\n state: DoomReadinessState;\n diagnostics: readonly string[];\n error?: DoomReadinessError;\n value?: unknown;\n hasValue: boolean;\n notified: boolean;\n}\n\nexport interface DoomReadinessErrorOptions {\n readonly packageId?: string;\n readonly generation?: string;\n readonly cause?: unknown;\n}\n\n/** Error returned to package callers without exposing task-specific rejection shapes. */\nexport class DoomReadinessError extends Error {\n readonly code: DoomReadinessErrorCode;\n readonly packageId?: string;\n readonly generation?: string;\n\n constructor(code: DoomReadinessErrorCode, message: string, input: DoomReadinessErrorOptions = {}) {\n super(message, input.cause === undefined ? undefined : { cause: input.cause });\n this.name = 'DoomReadinessError';\n this.code = code;\n this.packageId = input.packageId;\n this.generation = input.generation;\n }\n}\n\nfunction createTerminal(): { readonly promise: Promise<void>; readonly resolve: () => void } {\n let resolve = (): void => undefined;\n const promise = new Promise<void>((settle) => {\n resolve = settle;\n });\n return { promise, resolve };\n}\n\nfunction frozenDiagnostics(diagnostics: readonly string[] | undefined): readonly string[] {\n if (diagnostics === undefined) return Object.freeze([]);\n if (!Array.isArray(diagnostics) || diagnostics.some((diagnostic) => typeof diagnostic !== 'string')) {\n throw new TypeError('Doom readiness task diagnostics must be an array of strings.');\n }\n return Object.freeze([...diagnostics]);\n}\n\nfunction errorDetail(error: DoomReadinessError | undefined): DoomReadinessErrorDetail | undefined {\n return error === undefined ? undefined : Object.freeze({ code: error.code, message: error.message });\n}\n\nfunction recordSnapshot(record: ReadinessRecord): DoomReadinessSnapshot {\n return Object.freeze({\n packageId: record.packageId,\n generation: record.generation,\n state: record.state,\n diagnostics: record.diagnostics,\n ...(record.error === undefined ? {} : { error: errorDetail(record.error) }),\n });\n}\n\nfunction rethrowAsync(error: unknown): void {\n queueMicrotask(() => {\n throw error instanceof Error ? error : new Error(String(error));\n });\n}\n\nfunction waitAbortedError(record: ReadinessRecord, signal: AbortSignal): DoomReadinessError {\n return new DoomReadinessError(\n DOOM_READINESS_ERROR_CODE.waitAborted,\n `Waiting for Doom package '${record.packageId}' readiness was aborted.`,\n { packageId: record.packageId, generation: record.generation, cause: signal.reason },\n );\n}\n\nfunction waitForTerminal(record: ReadinessRecord, signal: AbortSignal | undefined): Promise<void> {\n if (signal === undefined) return record.terminal;\n if (signal.aborted) return Promise.reject(waitAbortedError(record, signal));\n\n return new Promise<void>((resolve, reject) => {\n const onAbort = (): void => {\n reject(waitAbortedError(record, signal));\n };\n signal.addEventListener('abort', onAbort, { once: true });\n void record.terminal.then(() => {\n signal.removeEventListener('abort', onAbort);\n resolve();\n });\n });\n}\n\n/** Creates the session-scoped coordinator value published through Cordis. */\nexport function createDoomReadinessCoordinator(\n options: DoomReadinessCoordinatorOptions = {},\n): DoomReadinessCoordinator {\n const records = new Map<string, ReadinessRecord>();\n let disposed = false;\n let disposal: Promise<void> | undefined;\n\n const current = (record: ReadinessRecord): boolean =>\n !disposed && records.get(record.packageId)?.token === record.token && record.state === 'pending';\n\n const notify = (record: ReadinessRecord): void => {\n if (record.notified || (record.state !== 'degraded' && record.state !== 'failed')) return;\n record.notified = true;\n const notification = Object.freeze({\n packageId: record.packageId,\n generation: record.generation,\n state: record.state,\n diagnostics: record.diagnostics,\n ...(record.error === undefined ? {} : { error: errorDetail(record.error) }),\n });\n if (options.notify) void Promise.resolve(options.notify(notification)).catch(rethrowAsync);\n };\n\n const finish = (\n record: ReadinessRecord,\n state: Exclude<DoomReadinessState, 'pending'>,\n input: {\n readonly value?: unknown;\n readonly hasValue?: boolean;\n readonly diagnostics?: readonly string[];\n readonly error?: DoomReadinessError;\n } = {},\n ): void => {\n if (!current(record)) return;\n record.state = state;\n record.value = input.value;\n record.hasValue = input.hasValue ?? false;\n record.diagnostics = input.diagnostics ?? Object.freeze([]);\n record.error = input.error;\n record.resolveTerminal();\n notify(record);\n };\n\n const handleFor = <TValue>(record: ReadinessRecord): DoomReadinessHandle<TValue> =>\n Object.freeze({\n packageId: record.packageId,\n generation: record.generation,\n snapshot: () => recordSnapshot(record),\n wait: async (waitOptions: DoomReadinessWaitOptions = {}): Promise<TValue> => {\n await waitForTerminal(record, waitOptions.signal);\n if (record.state === 'ready' || record.state === 'degraded') {\n if (!record.hasValue) {\n throw new DoomReadinessError(\n DOOM_READINESS_ERROR_CODE.failed,\n `Doom package '${record.packageId}' readiness completed without a value.`,\n { packageId: record.packageId, generation: record.generation },\n );\n }\n return record.value as TValue;\n }\n if (record.error) throw record.error;\n throw new DoomReadinessError(\n DOOM_READINESS_ERROR_CODE.failed,\n `Doom package '${record.packageId}' readiness did not complete.`,\n { packageId: record.packageId, generation: record.generation },\n );\n },\n });\n\n return Object.freeze({\n start<TValue>(packageId: string, generation: string, task: DoomReadinessTask<TValue>): DoomReadinessHandle<TValue> {\n if (disposed) {\n throw new DoomReadinessError(\n DOOM_READINESS_ERROR_CODE.disposed,\n 'The Doom readiness coordinator has been disposed.',\n { packageId, generation },\n );\n }\n if (typeof packageId !== 'string' || packageId.trim().length === 0) {\n throw new DoomReadinessError(\n DOOM_READINESS_ERROR_CODE.invalidArgument,\n 'Doom readiness requires a non-empty package id.',\n { packageId, generation },\n );\n }\n if (typeof generation !== 'string' || generation.trim().length === 0) {\n throw new DoomReadinessError(\n DOOM_READINESS_ERROR_CODE.invalidArgument,\n 'Doom readiness requires a non-empty generation.',\n { packageId, generation },\n );\n }\n if (typeof task !== 'function') {\n throw new DoomReadinessError(\n DOOM_READINESS_ERROR_CODE.invalidArgument,\n 'Doom readiness requires an initialization task.',\n { packageId, generation },\n );\n }\n\n const previous = records.get(packageId);\n if (previous?.state === 'pending') {\n throw new DoomReadinessError(\n DOOM_READINESS_ERROR_CODE.duplicate,\n `Doom package '${packageId}' already has live readiness work.`,\n { packageId, generation },\n );\n }\n\n const terminal = createTerminal();\n const controller = new AbortController();\n const record: ReadinessRecord = {\n token: Symbol(packageId),\n packageId,\n generation,\n controller,\n terminal: terminal.promise,\n resolveTerminal: terminal.resolve,\n operation: Promise.resolve(),\n state: 'pending',\n diagnostics: Object.freeze([]),\n hasValue: false,\n notified: false,\n };\n records.set(packageId, record);\n\n const operation = Promise.resolve().then(() => {\n if (controller.signal.aborted) throw controller.signal.reason;\n return task(controller.signal);\n });\n record.operation = operation;\n void operation\n .then(\n (result) => {\n if (!current(record)) return;\n if (result === null || typeof result !== 'object' || !Object.hasOwn(result, 'value')) {\n finish(record, 'failed', {\n error: new DoomReadinessError(\n DOOM_READINESS_ERROR_CODE.failed,\n `Doom package '${packageId}' returned an invalid readiness result.`,\n { packageId, generation },\n ),\n });\n return;\n }\n try {\n const diagnostics = frozenDiagnostics(result.diagnostics);\n finish(record, diagnostics.length === 0 ? 'ready' : 'degraded', {\n value: result.value,\n hasValue: true,\n diagnostics,\n });\n } catch (error) {\n finish(record, 'failed', {\n error: new DoomReadinessError(\n DOOM_READINESS_ERROR_CODE.failed,\n `Doom package '${packageId}' returned an invalid readiness result.`,\n { packageId, generation, cause: error },\n ),\n });\n }\n },\n (error: unknown) => {\n finish(record, 'failed', {\n error: new DoomReadinessError(\n DOOM_READINESS_ERROR_CODE.failed,\n `Doom package '${packageId}' readiness failed: ${error instanceof Error ? error.message : String(error)}`,\n { packageId, generation, cause: error },\n ),\n });\n },\n )\n .catch(rethrowAsync);\n\n return handleFor<TValue>(record);\n },\n\n read(packageId: string): DoomReadinessSnapshot | undefined {\n const record = records.get(packageId);\n return record === undefined ? undefined : recordSnapshot(record);\n },\n\n snapshots(): readonly DoomReadinessSnapshot[] {\n return Object.freeze([...records.values()].map(recordSnapshot));\n },\n\n dispose(): Promise<void> {\n if (disposal) return disposal;\n disposed = true;\n const operations = [...records.values()].map((record) => {\n if (record.state === 'pending') {\n const error = new DoomReadinessError(\n DOOM_READINESS_ERROR_CODE.cancelled,\n `Doom package '${record.packageId}' readiness was cancelled.`,\n { packageId: record.packageId, generation: record.generation },\n );\n record.state = 'cancelled';\n record.error = error;\n record.resolveTerminal();\n record.controller.abort(error);\n }\n return record.operation;\n });\n disposal = Promise.allSettled(operations).then(() => undefined);\n return disposal;\n },\n });\n}\n\n/** Reads the coordinator visible to the current Cordis plugin context. */\nexport function readDoomReadinessCoordinator(ctx: Context): DoomReadinessCoordinator | undefined {\n return ctx.get(DOOM_READINESS_SERVICE) as DoomReadinessCoordinator | undefined;\n}\n\n/** Reads the coordinator or reports that Config has not published session readiness. */\nexport function requireDoomReadinessCoordinator(ctx: Context): DoomReadinessCoordinator {\n const coordinator = readDoomReadinessCoordinator(ctx);\n if (coordinator) return coordinator;\n throw new DoomReadinessError(\n DOOM_READINESS_ERROR_CODE.unavailable,\n 'Doom readiness is unavailable. Load the Po Config core.',\n );\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/schemas/sandboxHarness.ts
|
|
2
|
+
/**
|
|
3
|
+
* Sandbox harness contract.
|
|
4
|
+
*
|
|
5
|
+
* A layer package that owns sandboxed launches exports a module at the
|
|
6
|
+
* `./sandbox-harness` subpath. The harness resolves that module from the
|
|
7
|
+
* selected composition and delegates the whole launch to it, so core never
|
|
8
|
+
* depends on a concrete sandbox technology.
|
|
9
|
+
*/
|
|
10
|
+
/** Exports subpath a sandbox-owning layer package declares. */
|
|
11
|
+
const SANDBOX_HARNESS_EXPORT_SUBPATH = "./sandbox-harness";
|
|
12
|
+
/** Marks a process that already runs inside a Po sandbox. */
|
|
13
|
+
const PO_SANDBOX_ENV = "PO_SANDBOX";
|
|
14
|
+
const SANDBOX_FLAG = "1";
|
|
15
|
+
/** True inside a sandboxed session, which is how a provider refuses to nest. */
|
|
16
|
+
function insideSandbox(environment = process.env) {
|
|
17
|
+
return environment[PO_SANDBOX_ENV] === SANDBOX_FLAG;
|
|
18
|
+
}
|
|
19
|
+
/** Narrowing guard for a dynamically imported sandbox harness entry. */
|
|
20
|
+
function isSandboxHarnessModule(value) {
|
|
21
|
+
return typeof value === "object" && value !== null && typeof value.launchSandbox === "function";
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
exports.PO_SANDBOX_ENV = PO_SANDBOX_ENV;
|
|
25
|
+
exports.SANDBOX_HARNESS_EXPORT_SUBPATH = SANDBOX_HARNESS_EXPORT_SUBPATH;
|
|
26
|
+
exports.insideSandbox = insideSandbox;
|
|
27
|
+
exports.isSandboxHarnessModule = isSandboxHarnessModule;
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=sandboxHarness.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandboxHarness.cjs","names":[],"sources":["../../../src/schemas/sandboxHarness.ts"],"sourcesContent":["/**\n * Sandbox harness contract.\n *\n * A layer package that owns sandboxed launches exports a module at the\n * `./sandbox-harness` subpath. The harness resolves that module from the\n * selected composition and delegates the whole launch to it, so core never\n * depends on a concrete sandbox technology.\n */\n\n/** Exports subpath a sandbox-owning layer package declares. */\nexport const SANDBOX_HARNESS_EXPORT_SUBPATH = './sandbox-harness';\n\n/** Marks a process that already runs inside a Po sandbox. */\nexport const PO_SANDBOX_ENV = 'PO_SANDBOX';\n\nconst SANDBOX_FLAG = '1';\n\n/** True inside a sandboxed session, which is how a provider refuses to nest. */\nexport function insideSandbox(environment: NodeJS.ProcessEnv = process.env): boolean {\n return environment[PO_SANDBOX_ENV] === SANDBOX_FLAG;\n}\n\n/** One sandboxed launch, owned end to end by the providing layer. */\nexport interface SandboxLaunchRequest {\n /** Repository the sandbox mounts and works against. */\n repoRoot: string;\n /** Working directory of the launch, expected to sit inside the mounted repository. */\n cwd: string;\n /**\n * Harness arguments the in-sandbox launcher replays. Never contains the\n * sandbox flag itself: a sandboxed launch must not provision another.\n */\n forwardArgs: string[];\n /** Host environment the provider filters before any of it enters the sandbox. */\n environment: NodeJS.ProcessEnv;\n /** Receives one human-readable line per provisioning decision. */\n onProgress?: (message: string) => void;\n}\n\nexport interface SandboxHarnessModule {\n /** Provisions the sandbox, runs the launch inside it, and reports the exit code. */\n launchSandbox(request: SandboxLaunchRequest): Promise<number>;\n}\n\n/** Narrowing guard for a dynamically imported sandbox harness entry. */\nexport function isSandboxHarnessModule(value: unknown): value is SandboxHarnessModule {\n return (\n typeof value === 'object' &&\n value !== null &&\n typeof (value as { launchSandbox?: unknown }).launchSandbox === 'function'\n );\n}\n"],"mappings":";;;;;;;;;;AAUA,MAAa,iCAAiC;;AAG9C,MAAa,iBAAiB;AAE9B,MAAM,eAAe;;AAGrB,SAAgB,cAAc,cAAiC,QAAQ,KAAc;CACnF,OAAO,YAAY,oBAAoB;AACzC;;AAyBA,SAAgB,uBAAuB,OAA+C;CACpF,OACE,OAAO,UAAU,YACjB,UAAU,QACV,OAAQ,MAAsC,kBAAkB;AAEpE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
//#region src/schemas/sandboxHarness.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Sandbox harness contract.
|
|
4
|
+
*
|
|
5
|
+
* A layer package that owns sandboxed launches exports a module at the
|
|
6
|
+
* `./sandbox-harness` subpath. The harness resolves that module from the
|
|
7
|
+
* selected composition and delegates the whole launch to it, so core never
|
|
8
|
+
* depends on a concrete sandbox technology.
|
|
9
|
+
*/
|
|
10
|
+
/** Exports subpath a sandbox-owning layer package declares. */
|
|
11
|
+
export declare const SANDBOX_HARNESS_EXPORT_SUBPATH = "./sandbox-harness";
|
|
12
|
+
/** Marks a process that already runs inside a Po sandbox. */
|
|
13
|
+
export declare const PO_SANDBOX_ENV = "PO_SANDBOX";
|
|
14
|
+
/** True inside a sandboxed session, which is how a provider refuses to nest. */
|
|
15
|
+
export declare function insideSandbox(environment?: NodeJS.ProcessEnv): boolean;
|
|
16
|
+
/** One sandboxed launch, owned end to end by the providing layer. */
|
|
17
|
+
export interface SandboxLaunchRequest {
|
|
18
|
+
/** Repository the sandbox mounts and works against. */
|
|
19
|
+
repoRoot: string;
|
|
20
|
+
/** Working directory of the launch, expected to sit inside the mounted repository. */
|
|
21
|
+
cwd: string;
|
|
22
|
+
/**
|
|
23
|
+
* Harness arguments the in-sandbox launcher replays. Never contains the
|
|
24
|
+
* sandbox flag itself: a sandboxed launch must not provision another.
|
|
25
|
+
*/
|
|
26
|
+
forwardArgs: string[];
|
|
27
|
+
/** Host environment the provider filters before any of it enters the sandbox. */
|
|
28
|
+
environment: NodeJS.ProcessEnv;
|
|
29
|
+
/** Receives one human-readable line per provisioning decision. */
|
|
30
|
+
onProgress?: (message: string) => void;
|
|
31
|
+
}
|
|
32
|
+
export interface SandboxHarnessModule {
|
|
33
|
+
/** Provisions the sandbox, runs the launch inside it, and reports the exit code. */
|
|
34
|
+
launchSandbox(request: SandboxLaunchRequest): Promise<number>;
|
|
35
|
+
}
|
|
36
|
+
/** Narrowing guard for a dynamically imported sandbox harness entry. */
|
|
37
|
+
export declare function isSandboxHarnessModule(value: unknown): value is SandboxHarnessModule;
|
|
38
|
+
//#endregion
|
|
39
|
+
//# sourceMappingURL=sandboxHarness.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandboxHarness.d.mts","names":[],"sources":["../../../src/schemas/sandboxHarness.ts"],"mappings":";;;;;;;;;;qBAUa;;qBAGA;;wBAKG,cAAc,cAAa,OAAO;;iBAKjC;;EAEf;;EAEA;;;;;EAKA;;EAEA,aAAa,OAAO;;EAEpB,cAAc;;iBAGC;;EAEf,cAAc,SAAS,uBAAuB;;;wBAIhC,uBAAuB,iBAAiB,SAAS"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region src/schemas/sandboxHarness.ts
|
|
2
|
+
/**
|
|
3
|
+
* Sandbox harness contract.
|
|
4
|
+
*
|
|
5
|
+
* A layer package that owns sandboxed launches exports a module at the
|
|
6
|
+
* `./sandbox-harness` subpath. The harness resolves that module from the
|
|
7
|
+
* selected composition and delegates the whole launch to it, so core never
|
|
8
|
+
* depends on a concrete sandbox technology.
|
|
9
|
+
*/
|
|
10
|
+
/** Exports subpath a sandbox-owning layer package declares. */
|
|
11
|
+
const SANDBOX_HARNESS_EXPORT_SUBPATH = "./sandbox-harness";
|
|
12
|
+
/** Marks a process that already runs inside a Po sandbox. */
|
|
13
|
+
const PO_SANDBOX_ENV = "PO_SANDBOX";
|
|
14
|
+
const SANDBOX_FLAG = "1";
|
|
15
|
+
/** True inside a sandboxed session, which is how a provider refuses to nest. */
|
|
16
|
+
function insideSandbox(environment = process.env) {
|
|
17
|
+
return environment[PO_SANDBOX_ENV] === SANDBOX_FLAG;
|
|
18
|
+
}
|
|
19
|
+
/** Narrowing guard for a dynamically imported sandbox harness entry. */
|
|
20
|
+
function isSandboxHarnessModule(value) {
|
|
21
|
+
return typeof value === "object" && value !== null && typeof value.launchSandbox === "function";
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { PO_SANDBOX_ENV, SANDBOX_HARNESS_EXPORT_SUBPATH, insideSandbox, isSandboxHarnessModule };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=sandboxHarness.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandboxHarness.mjs","names":[],"sources":["../../../src/schemas/sandboxHarness.ts"],"sourcesContent":["/**\n * Sandbox harness contract.\n *\n * A layer package that owns sandboxed launches exports a module at the\n * `./sandbox-harness` subpath. The harness resolves that module from the\n * selected composition and delegates the whole launch to it, so core never\n * depends on a concrete sandbox technology.\n */\n\n/** Exports subpath a sandbox-owning layer package declares. */\nexport const SANDBOX_HARNESS_EXPORT_SUBPATH = './sandbox-harness';\n\n/** Marks a process that already runs inside a Po sandbox. */\nexport const PO_SANDBOX_ENV = 'PO_SANDBOX';\n\nconst SANDBOX_FLAG = '1';\n\n/** True inside a sandboxed session, which is how a provider refuses to nest. */\nexport function insideSandbox(environment: NodeJS.ProcessEnv = process.env): boolean {\n return environment[PO_SANDBOX_ENV] === SANDBOX_FLAG;\n}\n\n/** One sandboxed launch, owned end to end by the providing layer. */\nexport interface SandboxLaunchRequest {\n /** Repository the sandbox mounts and works against. */\n repoRoot: string;\n /** Working directory of the launch, expected to sit inside the mounted repository. */\n cwd: string;\n /**\n * Harness arguments the in-sandbox launcher replays. Never contains the\n * sandbox flag itself: a sandboxed launch must not provision another.\n */\n forwardArgs: string[];\n /** Host environment the provider filters before any of it enters the sandbox. */\n environment: NodeJS.ProcessEnv;\n /** Receives one human-readable line per provisioning decision. */\n onProgress?: (message: string) => void;\n}\n\nexport interface SandboxHarnessModule {\n /** Provisions the sandbox, runs the launch inside it, and reports the exit code. */\n launchSandbox(request: SandboxLaunchRequest): Promise<number>;\n}\n\n/** Narrowing guard for a dynamically imported sandbox harness entry. */\nexport function isSandboxHarnessModule(value: unknown): value is SandboxHarnessModule {\n return (\n typeof value === 'object' &&\n value !== null &&\n typeof (value as { launchSandbox?: unknown }).launchSandbox === 'function'\n );\n}\n"],"mappings":";;;;;;;;;;AAUA,MAAa,iCAAiC;;AAG9C,MAAa,iBAAiB;AAE9B,MAAM,eAAe;;AAGrB,SAAgB,cAAc,cAAiC,QAAQ,KAAc;CACnF,OAAO,YAAY,oBAAoB;AACzC;;AAyBA,SAAgB,uBAAuB,OAA+C;CACpF,OACE,OAAO,UAAU,YACjB,UAAU,QACV,OAAQ,MAAsC,kBAAkB;AAEpE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DoomApiScope } from "./packageApi.mjs";
|
|
2
|
+
//#region src/schemas/serverBundle.d.ts
|
|
3
|
+
/** Every occurrence that can activate a package in this repository. */
|
|
4
|
+
export interface DoomServerBundleOwner {
|
|
5
|
+
readonly majorMode: string;
|
|
6
|
+
readonly layer: string;
|
|
7
|
+
}
|
|
8
|
+
export interface DoomServerBundleEntry {
|
|
9
|
+
readonly packageName: string;
|
|
10
|
+
/** The declared package-relative source entry, retained for attribution. */
|
|
11
|
+
readonly entry: string;
|
|
12
|
+
/** Absolute path of the package's built module; the live loader imports it from its content URL. */
|
|
13
|
+
readonly module: string;
|
|
14
|
+
readonly scopes: readonly DoomApiScope[];
|
|
15
|
+
readonly owners: readonly DoomServerBundleOwner[];
|
|
16
|
+
readonly required: boolean;
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
//# sourceMappingURL=serverBundle.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serverBundle.d.mts","names":[],"sources":["../../../src/schemas/serverBundle.ts"],"mappings":";;;iBAGiB;WACN;WACA;;iBAGM;WACN;;WAEA;;WAEA;WACA,iBAAiB;WACjB,iBAAiB;WACjB"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
//#region src/schemas/serverFacet.ts
|
|
2
|
+
/** The host a server facet contributes to. */
|
|
3
|
+
const DOOM_SERVER_HOST_SERVICE = "doom/server-host";
|
|
4
|
+
function readDoomServerHost(context) {
|
|
5
|
+
return context.get(DOOM_SERVER_HOST_SERVICE);
|
|
6
|
+
}
|
|
7
|
+
function requireDoomServerHost(context) {
|
|
8
|
+
const service = readDoomServerHost(context);
|
|
9
|
+
if (!service) throw new Error("The Doom server host is unavailable. Start a Doom server first.");
|
|
10
|
+
return service;
|
|
11
|
+
}
|
|
12
|
+
/** The package.json field a package declares its server facet under. */
|
|
13
|
+
const DOOM_SERVER_FACET_MANIFEST_FIELD = "poServer";
|
|
14
|
+
/** The default export a facet module must provide, so a host can install it. */
|
|
15
|
+
const DOOM_SERVER_FACET_EXPORT = "default";
|
|
16
|
+
/** Read pure root metadata without initializing or mounting the root. */
|
|
17
|
+
function composeServerProviderOverrides(...roots) {
|
|
18
|
+
return (context) => roots.flatMap((root) => {
|
|
19
|
+
if (typeof root !== "function" && typeof root !== "object" || root === null) return [];
|
|
20
|
+
const callback = root.providerOverrides;
|
|
21
|
+
return typeof callback === "function" ? callback(context) : [];
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/** Capture schema inference before heterogeneous methods enter a contribution array. */
|
|
25
|
+
function defineServerMethod(definition, handler) {
|
|
26
|
+
return { register: (host) => host.registerMethod(definition, handler) };
|
|
27
|
+
}
|
|
28
|
+
var DoomServerFacetManifestError = class extends Error {
|
|
29
|
+
constructor(packageDir, message) {
|
|
30
|
+
super(`${DOOM_SERVER_FACET_MANIFEST_FIELD} manifest in ${packageDir}: ${message}`);
|
|
31
|
+
this.name = "DoomServerFacetManifestError";
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
function isRecord(value) {
|
|
35
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
36
|
+
}
|
|
37
|
+
/** Narrows a module's default export, so a broken package is a notice rather than a crash. */
|
|
38
|
+
function isDoomServerFacet(value) {
|
|
39
|
+
return isRecord(value) && typeof value.apply === "function";
|
|
40
|
+
}
|
|
41
|
+
function normalizePath(packageDir, field, value) {
|
|
42
|
+
if (typeof value !== "string" || !value.startsWith("./") || value.includes("..")) throw new DoomServerFacetManifestError(packageDir, `${field} must be a package-relative ./path with no '..'.`);
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
function normalizeScopes(packageDir, value) {
|
|
46
|
+
if (value === void 0) throw new DoomServerFacetManifestError(packageDir, "scopes must be declared explicitly.");
|
|
47
|
+
if (!Array.isArray(value) || value.length === 0) throw new DoomServerFacetManifestError(packageDir, "scopes must name 'global', 'workspace', or 'session'.");
|
|
48
|
+
const scopes = [];
|
|
49
|
+
for (const scope of value) {
|
|
50
|
+
if (scope !== "session" && scope !== "global" && scope !== "workspace") throw new DoomServerFacetManifestError(packageDir, `Unknown scope '${String(scope)}'; resync for the three-level host.`);
|
|
51
|
+
if (!scopes.includes(scope)) scopes.push(scope);
|
|
52
|
+
}
|
|
53
|
+
return scopes;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Validates one package.json's `poServer` block.
|
|
57
|
+
*
|
|
58
|
+
* `dist` is required because a host imports the built entry the package ships,
|
|
59
|
+
* never its source.
|
|
60
|
+
*/
|
|
61
|
+
function declaredServerFacetsOf(packageDir, manifest) {
|
|
62
|
+
const declared = manifest[DOOM_SERVER_FACET_MANIFEST_FIELD];
|
|
63
|
+
if (declared === void 0) return [];
|
|
64
|
+
if (!isRecord(declared)) throw new DoomServerFacetManifestError(packageDir, "the block must be an object naming entry and dist.");
|
|
65
|
+
const entry = normalizePath(packageDir, "entry", declared.entry);
|
|
66
|
+
if (declared.dist === void 0) throw new DoomServerFacetManifestError(packageDir, "dist is required: a host imports the built entry the package ships, never its source.");
|
|
67
|
+
const dist = normalizePath(packageDir, "dist", declared.dist);
|
|
68
|
+
if (declared.required !== void 0 && typeof declared.required !== "boolean") throw new DoomServerFacetManifestError(packageDir, "required must be a boolean.");
|
|
69
|
+
return [{
|
|
70
|
+
packageName: typeof manifest.name === "string" ? manifest.name : packageDir,
|
|
71
|
+
packageDir,
|
|
72
|
+
entry,
|
|
73
|
+
dist,
|
|
74
|
+
scopes: normalizeScopes(packageDir, declared.scopes),
|
|
75
|
+
...typeof declared.required === "boolean" ? { required: declared.required } : {}
|
|
76
|
+
}];
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The deterministic order hosts install in. A package appears once: the first
|
|
80
|
+
* directory claiming a package name keeps it and the later one is dropped with
|
|
81
|
+
* a notice, so a duplicated install never installs a facet twice.
|
|
82
|
+
*/
|
|
83
|
+
function orderServerFacets(facets, onNotice = () => void 0) {
|
|
84
|
+
const sorted = [...facets].sort((left, right) => left.packageName.localeCompare(right.packageName) || left.packageDir.localeCompare(right.packageDir));
|
|
85
|
+
const owners = /* @__PURE__ */ new Map();
|
|
86
|
+
const kept = [];
|
|
87
|
+
for (const facet of sorted) {
|
|
88
|
+
const holder = owners.get(facet.packageName);
|
|
89
|
+
if (holder !== void 0) {
|
|
90
|
+
onNotice(`server facet '${facet.packageName}' from ${facet.packageDir} is skipped: ${holder.packageDir} already claims it.`);
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
owners.set(facet.packageName, facet);
|
|
94
|
+
kept.push(facet);
|
|
95
|
+
}
|
|
96
|
+
return kept;
|
|
97
|
+
}
|
|
98
|
+
//#endregion
|
|
99
|
+
exports.DOOM_SERVER_FACET_EXPORT = DOOM_SERVER_FACET_EXPORT;
|
|
100
|
+
exports.DOOM_SERVER_FACET_MANIFEST_FIELD = DOOM_SERVER_FACET_MANIFEST_FIELD;
|
|
101
|
+
exports.DOOM_SERVER_HOST_SERVICE = DOOM_SERVER_HOST_SERVICE;
|
|
102
|
+
exports.DoomServerFacetManifestError = DoomServerFacetManifestError;
|
|
103
|
+
exports.composeServerProviderOverrides = composeServerProviderOverrides;
|
|
104
|
+
exports.declaredServerFacetsOf = declaredServerFacetsOf;
|
|
105
|
+
exports.defineServerMethod = defineServerMethod;
|
|
106
|
+
exports.isDoomServerFacet = isDoomServerFacet;
|
|
107
|
+
exports.orderServerFacets = orderServerFacets;
|
|
108
|
+
exports.readDoomServerHost = readDoomServerHost;
|
|
109
|
+
exports.requireDoomServerHost = requireDoomServerHost;
|
|
110
|
+
|
|
111
|
+
//# sourceMappingURL=serverFacet.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serverFacet.cjs","names":[],"sources":["../../../src/schemas/serverFacet.ts"],"sourcesContent":["import type { Context } from '@deepseek-ai/cordis';\n/**\n * The server facet a package installs into a headless host.\n *\n * A package already ships a Pi extension facet for the agent process. This is\n * the second facet: one cordis plugin that a session server or the cockpit hub\n * installs, through which the package contributes its HTTP surface and any\n * behaviour that has to run outside the agent.\n *\n * A facet is installed and disposed like every other Doom contribution. It\n * registers its API from inside that lifecycle, so server behaviour has a clear\n * owner and disposer.\n */\nimport type { Static, TSchema } from 'typebox';\n\nimport type { DoomHeadlessHostService, DoomHeadlessToolRestriction } from './headless';\nimport type { DoomHeadlessTool, DoomHeadlessCommand } from './headless';\nimport type { DoomHubChannel } from './hubChannel';\nimport type { DoomApi, DoomApiContext, DoomApiScope } from './packageApi';\nimport type { DoomPluginTool, DoomPluginCommand } from './pluginContributions';\nimport type { DoomPluginCaller, DoomPluginMethod } from './pluginProtocol';\nimport type { DoomToolRestrictionDefinition } from './toolSurface';\n\n/** The host a server facet contributes to. */\nexport const DOOM_SERVER_HOST_SERVICE = 'doom/server-host';\n\nexport interface DoomServerRegistration {\n /** Whether the API was mounted. A refused registration is a no-op handle. */\n readonly mounted?: boolean;\n /** Unmount the surface and close its handler. Idempotent. */\n dispose(): void;\n}\n\n/**\n * What a facet is handed when it installs.\n *\n * `scope` is fixed for the life of the host: a session server never becomes a\n * hub. A facet that only makes sense in one scope returns early in the other\n * rather than declaring itself twice.\n */\nexport interface DoomServerHostService {\n readonly scope: DoomApiScope;\n /** Identity and host-lent capabilities, the same record an API is started with. */\n readonly context: DoomApiContext;\n /**\n * Mount an API under its own base path. A base path already claimed by an\n * earlier facet is refused with a notice and a no-op handle. The same\n * failure posture applies when the API cannot start or the host is disposed.\n */\n registerApi(api: DoomApi): DoomServerRegistration;\n /** Register a live event source under this host's lifecycle. */\n registerChannel(channel: DoomHubChannel): DoomServerRegistration;\n /** Mount a typed call at this host's exact scope. */\n registerMethod<TInput extends TSchema, TOutput extends TSchema>(\n definition: DoomPluginMethod<TInput, TOutput>,\n handler: (input: Static<TInput>, caller: DoomPluginCaller) => Static<TOutput> | Promise<Static<TOutput>>,\n ): DoomServerRegistration;\n /** Base paths currently mounted, in mount order. */\n mounted(): readonly string[];\n /** Channel frame types currently mounted, in mount order. */\n mountedChannels(): readonly string[];\n}\n\ndeclare module '@deepseek-ai/cordis' {\n interface Context {\n 'doom/server-host': DoomServerHostService;\n }\n}\n\nexport function readDoomServerHost(context: Context): DoomServerHostService | undefined {\n return context.get(DOOM_SERVER_HOST_SERVICE) as DoomServerHostService | undefined;\n}\n\nexport function requireDoomServerHost(context: Context): DoomServerHostService {\n const service = readDoomServerHost(context);\n if (!service) throw new Error('The Doom server host is unavailable. Start a Doom server first.');\n return service;\n}\n\n/** The package.json field a package declares its server facet under. */\nexport const DOOM_SERVER_FACET_MANIFEST_FIELD = 'poServer';\n\n/** The default export a facet module must provide, so a host can install it. */\nexport const DOOM_SERVER_FACET_EXPORT = 'default';\n\n/**\n * One package's server contributions, as a Cordis object plugin.\n *\n * The object form rather than a bare function, because it is the only shape\n * that declares its own `inject`. That matters to a host: a plugin carrying\n * its dependencies is a single fiber, so `fiber.await()` settles once `apply`\n * has run, and the host can decide whether to open a listener from a mount\n * table it knows is complete. A function facet calling `ctx.inject` inside\n * itself mounts a child fiber that the host has no handle on.\n *\n * A returned function is the disposer, run when the host's root unwinds.\n */\nexport interface DoomServerProviderOverride {\n readonly name: string;\n readonly baseUrl: string;\n}\nexport type DoomServerProviderOverrides = (context: {\n readonly environment: Readonly<Record<string, string | undefined>>;\n}) => readonly DoomServerProviderOverride[];\n\n/** Read pure root metadata without initializing or mounting the root. */\nexport function composeServerProviderOverrides(...roots: readonly unknown[]): DoomServerProviderOverrides {\n return (context) =>\n roots.flatMap((root) => {\n if ((typeof root !== 'function' && typeof root !== 'object') || root === null) return [];\n const callback = (root as { providerOverrides?: DoomServerProviderOverrides }).providerOverrides;\n return typeof callback === 'function' ? callback(context) : [];\n });\n}\n\nexport interface DoomServerFacet {\n readonly providerOverrides?: DoomServerProviderOverrides;\n readonly inject?: readonly string[];\n apply(context: Context): void | (() => void | Promise<void>) | Promise<void | (() => void | Promise<void>)>;\n}\n\n/** One instance belongs to one mounted server scope. */\nexport interface DoomServerPluginContext {\n readonly context: Context;\n readonly host: DoomServerHostService;\n readonly agent?: DoomHeadlessHostService;\n readonly signal: AbortSignal;\n}\n\nexport interface DoomServerMethod {\n register(host: DoomServerHostService): DoomServerRegistration;\n}\n\n/** Capture schema inference before heterogeneous methods enter a contribution array. */\nexport function defineServerMethod<TInput extends TSchema, TOutput extends TSchema>(\n definition: DoomPluginMethod<TInput, TOutput>,\n handler: (input: Static<TInput>, caller: DoomPluginCaller) => Static<TOutput> | Promise<Static<TOutput>>,\n): DoomServerMethod {\n return { register: (host) => host.registerMethod(definition, handler) };\n}\n\nexport interface DoomServerPluginScope {\n readonly services?: readonly Parameters<Context['plugin']>[0][];\n readonly channels?: readonly (() => DoomHubChannel)[];\n readonly api?: readonly DoomApi[];\n readonly methods?: readonly DoomServerMethod[];\n readonly onStart?: (context: DoomServerPluginContext) => void | Promise<void>;\n readonly onStop?: (context: DoomServerPluginContext) => void | Promise<void>;\n readonly onDispose?: (context: DoomServerPluginContext) => void | Promise<void>;\n}\n\nexport interface DoomServerSessionPlugin extends DoomServerPluginScope {\n readonly tools?: readonly (DoomHeadlessTool | DoomPluginTool)[];\n readonly commands?: readonly (DoomHeadlessCommand | DoomPluginCommand)[];\n readonly resources?: readonly Parameters<DoomHeadlessHostService['registerResource']>[0][];\n readonly hooks?: readonly Parameters<DoomHeadlessHostService['registerHook']>[0][];\n readonly toolRestrictions?: readonly (\n | DoomHeadlessToolRestriction\n | DoomToolRestrictionDefinition<() => DoomHeadlessToolRestriction>\n )[];\n readonly activities?: readonly Parameters<DoomHeadlessHostService['registerActivity']>[0][];\n}\n\ntype ScopeDeclaration<TScope> = TScope | ((context: DoomServerPluginContext) => TScope | Promise<TScope>);\n// Explicitly forbid session contributions even when a factory returns an inferred object.\ntype NonSessionScope = DoomServerPluginScope & {\n readonly [K in Exclude<keyof DoomServerSessionPlugin, keyof DoomServerPluginScope>]?: never;\n};\nexport interface DoomServerPluginDefinition {\n readonly providerOverrides?: DoomServerProviderOverrides;\n readonly name: string;\n readonly inject?: readonly string[];\n readonly global?: ScopeDeclaration<NonSessionScope>;\n readonly workspace?: ScopeDeclaration<NonSessionScope>;\n readonly session?: ScopeDeclaration<DoomServerSessionPlugin>;\n}\n\n/** One package's validated declaration. */\nexport interface DeclaredServerFacet {\n packageName: string;\n packageDir: string;\n /** Package-relative ./path to the source entry. */\n entry: string;\n /** Package-relative ./path to the built entry, which is what a host imports. */\n dist: string;\n /** Scopes this facet is installed into; both when the package names neither. */\n scopes: readonly DoomApiScope[];\n /** A selected host cannot be ready without this package's runtime capability. */\n required?: boolean;\n}\n\nexport class DoomServerFacetManifestError extends Error {\n constructor(packageDir: string, message: string) {\n super(`${DOOM_SERVER_FACET_MANIFEST_FIELD} manifest in ${packageDir}: ${message}`);\n this.name = 'DoomServerFacetManifestError';\n }\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** Narrows a module's default export, so a broken package is a notice rather than a crash. */\nexport function isDoomServerFacet(value: unknown): value is DoomServerFacet {\n return isRecord(value) && typeof value.apply === 'function';\n}\n\nfunction normalizePath(packageDir: string, field: string, value: unknown): string {\n if (typeof value !== 'string' || !value.startsWith('./') || value.includes('..')) {\n throw new DoomServerFacetManifestError(packageDir, `${field} must be a package-relative ./path with no '..'.`);\n }\n return value;\n}\n\nfunction normalizeScopes(packageDir: string, value: unknown): readonly DoomApiScope[] {\n if (value === undefined) throw new DoomServerFacetManifestError(packageDir, 'scopes must be declared explicitly.');\n if (!Array.isArray(value) || value.length === 0) {\n throw new DoomServerFacetManifestError(packageDir, \"scopes must name 'global', 'workspace', or 'session'.\");\n }\n const scopes: DoomApiScope[] = [];\n for (const scope of value) {\n if (scope !== 'session' && scope !== 'global' && scope !== 'workspace') {\n throw new DoomServerFacetManifestError(\n packageDir,\n `Unknown scope '${String(scope)}'; resync for the three-level host.`,\n );\n }\n if (!scopes.includes(scope)) scopes.push(scope);\n }\n return scopes;\n}\n\n/**\n * Validates one package.json's `poServer` block.\n *\n * `dist` is required because a host imports the built entry the package ships,\n * never its source.\n */\nexport function declaredServerFacetsOf(packageDir: string, manifest: Record<string, unknown>): DeclaredServerFacet[] {\n const declared = manifest[DOOM_SERVER_FACET_MANIFEST_FIELD];\n if (declared === undefined) return [];\n if (!isRecord(declared)) {\n throw new DoomServerFacetManifestError(packageDir, 'the block must be an object naming entry and dist.');\n }\n const entry = normalizePath(packageDir, 'entry', declared.entry);\n if (declared.dist === undefined) {\n throw new DoomServerFacetManifestError(\n packageDir,\n 'dist is required: a host imports the built entry the package ships, never its source.',\n );\n }\n const dist = normalizePath(packageDir, 'dist', declared.dist);\n if (declared.required !== undefined && typeof declared.required !== 'boolean') {\n throw new DoomServerFacetManifestError(packageDir, 'required must be a boolean.');\n }\n return [\n {\n packageName: typeof manifest.name === 'string' ? manifest.name : packageDir,\n packageDir,\n entry,\n dist,\n scopes: normalizeScopes(packageDir, declared.scopes),\n ...(typeof declared.required === 'boolean' ? { required: declared.required } : {}),\n },\n ];\n}\n\n/**\n * The deterministic order hosts install in. A package appears once: the first\n * directory claiming a package name keeps it and the later one is dropped with\n * a notice, so a duplicated install never installs a facet twice.\n */\nexport function orderServerFacets(\n facets: readonly DeclaredServerFacet[],\n onNotice: (message: string) => void = () => undefined,\n): DeclaredServerFacet[] {\n const sorted = [...facets].sort(\n (left, right) =>\n left.packageName.localeCompare(right.packageName) || left.packageDir.localeCompare(right.packageDir),\n );\n const owners = new Map<string, DeclaredServerFacet>();\n const kept: DeclaredServerFacet[] = [];\n for (const facet of sorted) {\n const holder = owners.get(facet.packageName);\n if (holder !== undefined) {\n onNotice(\n `server facet '${facet.packageName}' from ${facet.packageDir} is skipped: ${holder.packageDir} already claims it.`,\n );\n continue;\n }\n owners.set(facet.packageName, facet);\n kept.push(facet);\n }\n return kept;\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { DoomHubChannel } from "./hubChannel.mjs";
|
|
2
|
+
import { DoomApi, DoomApiContext, DoomApiScope } from "./packageApi.mjs";
|
|
3
|
+
import { DoomHeadlessCommand, DoomHeadlessHostService, DoomHeadlessTool, DoomHeadlessToolRestriction } from "./headless.mjs";
|
|
4
|
+
import { DoomPluginCommand, DoomPluginTool } from "./pluginContributions.mjs";
|
|
5
|
+
import { DoomPluginCaller, DoomPluginMethod } from "./pluginProtocol.mjs";
|
|
6
|
+
import { DoomToolRestrictionDefinition } from "./toolSurface.mjs";
|
|
7
|
+
import { Static, TSchema } from "typebox";
|
|
8
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
9
|
+
//#region src/schemas/serverFacet.d.ts
|
|
10
|
+
/** The host a server facet contributes to. */
|
|
11
|
+
export declare const DOOM_SERVER_HOST_SERVICE = "doom/server-host";
|
|
12
|
+
export interface DoomServerRegistration {
|
|
13
|
+
/** Whether the API was mounted. A refused registration is a no-op handle. */
|
|
14
|
+
readonly mounted?: boolean;
|
|
15
|
+
/** Unmount the surface and close its handler. Idempotent. */
|
|
16
|
+
dispose(): void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* What a facet is handed when it installs.
|
|
20
|
+
*
|
|
21
|
+
* `scope` is fixed for the life of the host: a session server never becomes a
|
|
22
|
+
* hub. A facet that only makes sense in one scope returns early in the other
|
|
23
|
+
* rather than declaring itself twice.
|
|
24
|
+
*/
|
|
25
|
+
export interface DoomServerHostService {
|
|
26
|
+
readonly scope: DoomApiScope;
|
|
27
|
+
/** Identity and host-lent capabilities, the same record an API is started with. */
|
|
28
|
+
readonly context: DoomApiContext;
|
|
29
|
+
/**
|
|
30
|
+
* Mount an API under its own base path. A base path already claimed by an
|
|
31
|
+
* earlier facet is refused with a notice and a no-op handle. The same
|
|
32
|
+
* failure posture applies when the API cannot start or the host is disposed.
|
|
33
|
+
*/
|
|
34
|
+
registerApi(api: DoomApi): DoomServerRegistration;
|
|
35
|
+
/** Register a live event source under this host's lifecycle. */
|
|
36
|
+
registerChannel(channel: DoomHubChannel): DoomServerRegistration;
|
|
37
|
+
/** Mount a typed call at this host's exact scope. */
|
|
38
|
+
registerMethod<TInput extends TSchema, TOutput extends TSchema>(definition: DoomPluginMethod<TInput, TOutput>, handler: (input: Static<TInput>, caller: DoomPluginCaller) => Static<TOutput> | Promise<Static<TOutput>>): DoomServerRegistration;
|
|
39
|
+
/** Base paths currently mounted, in mount order. */
|
|
40
|
+
mounted(): readonly string[];
|
|
41
|
+
/** Channel frame types currently mounted, in mount order. */
|
|
42
|
+
mountedChannels(): readonly string[];
|
|
43
|
+
}
|
|
44
|
+
declare module '@deepseek-ai/cordis' {
|
|
45
|
+
interface Context {
|
|
46
|
+
'doom/server-host': DoomServerHostService;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export declare function readDoomServerHost(context: Context): DoomServerHostService | undefined;
|
|
50
|
+
export declare function requireDoomServerHost(context: Context): DoomServerHostService;
|
|
51
|
+
/** The package.json field a package declares its server facet under. */
|
|
52
|
+
export declare const DOOM_SERVER_FACET_MANIFEST_FIELD = "poServer";
|
|
53
|
+
/** The default export a facet module must provide, so a host can install it. */
|
|
54
|
+
export declare const DOOM_SERVER_FACET_EXPORT = "default";
|
|
55
|
+
/**
|
|
56
|
+
* One package's server contributions, as a Cordis object plugin.
|
|
57
|
+
*
|
|
58
|
+
* The object form rather than a bare function, because it is the only shape
|
|
59
|
+
* that declares its own `inject`. That matters to a host: a plugin carrying
|
|
60
|
+
* its dependencies is a single fiber, so `fiber.await()` settles once `apply`
|
|
61
|
+
* has run, and the host can decide whether to open a listener from a mount
|
|
62
|
+
* table it knows is complete. A function facet calling `ctx.inject` inside
|
|
63
|
+
* itself mounts a child fiber that the host has no handle on.
|
|
64
|
+
*
|
|
65
|
+
* A returned function is the disposer, run when the host's root unwinds.
|
|
66
|
+
*/
|
|
67
|
+
export interface DoomServerProviderOverride {
|
|
68
|
+
readonly name: string;
|
|
69
|
+
readonly baseUrl: string;
|
|
70
|
+
}
|
|
71
|
+
export type DoomServerProviderOverrides = (context: {
|
|
72
|
+
readonly environment: Readonly<Record<string, string | undefined>>;
|
|
73
|
+
}) => readonly DoomServerProviderOverride[];
|
|
74
|
+
/** Read pure root metadata without initializing or mounting the root. */
|
|
75
|
+
export declare function composeServerProviderOverrides(...roots: readonly unknown[]): DoomServerProviderOverrides;
|
|
76
|
+
export interface DoomServerFacet {
|
|
77
|
+
readonly providerOverrides?: DoomServerProviderOverrides;
|
|
78
|
+
readonly inject?: readonly string[];
|
|
79
|
+
apply(context: Context): void | (() => void | Promise<void>) | Promise<void | (() => void | Promise<void>)>;
|
|
80
|
+
}
|
|
81
|
+
/** One instance belongs to one mounted server scope. */
|
|
82
|
+
export interface DoomServerPluginContext {
|
|
83
|
+
readonly context: Context;
|
|
84
|
+
readonly host: DoomServerHostService;
|
|
85
|
+
readonly agent?: DoomHeadlessHostService;
|
|
86
|
+
readonly signal: AbortSignal;
|
|
87
|
+
}
|
|
88
|
+
export interface DoomServerMethod {
|
|
89
|
+
register(host: DoomServerHostService): DoomServerRegistration;
|
|
90
|
+
}
|
|
91
|
+
/** Capture schema inference before heterogeneous methods enter a contribution array. */
|
|
92
|
+
export declare function defineServerMethod<TInput extends TSchema, TOutput extends TSchema>(definition: DoomPluginMethod<TInput, TOutput>, handler: (input: Static<TInput>, caller: DoomPluginCaller) => Static<TOutput> | Promise<Static<TOutput>>): DoomServerMethod;
|
|
93
|
+
export interface DoomServerPluginScope {
|
|
94
|
+
readonly services?: readonly Parameters<Context['plugin']>[0][];
|
|
95
|
+
readonly channels?: readonly (() => DoomHubChannel)[];
|
|
96
|
+
readonly api?: readonly DoomApi[];
|
|
97
|
+
readonly methods?: readonly DoomServerMethod[];
|
|
98
|
+
readonly onStart?: (context: DoomServerPluginContext) => void | Promise<void>;
|
|
99
|
+
readonly onStop?: (context: DoomServerPluginContext) => void | Promise<void>;
|
|
100
|
+
readonly onDispose?: (context: DoomServerPluginContext) => void | Promise<void>;
|
|
101
|
+
}
|
|
102
|
+
export interface DoomServerSessionPlugin extends DoomServerPluginScope {
|
|
103
|
+
readonly tools?: readonly (DoomHeadlessTool | DoomPluginTool)[];
|
|
104
|
+
readonly commands?: readonly (DoomHeadlessCommand | DoomPluginCommand)[];
|
|
105
|
+
readonly resources?: readonly Parameters<DoomHeadlessHostService['registerResource']>[0][];
|
|
106
|
+
readonly hooks?: readonly Parameters<DoomHeadlessHostService['registerHook']>[0][];
|
|
107
|
+
readonly toolRestrictions?: readonly (DoomHeadlessToolRestriction | DoomToolRestrictionDefinition<() => DoomHeadlessToolRestriction>)[];
|
|
108
|
+
readonly activities?: readonly Parameters<DoomHeadlessHostService['registerActivity']>[0][];
|
|
109
|
+
}
|
|
110
|
+
type ScopeDeclaration<TScope> = TScope | ((context: DoomServerPluginContext) => TScope | Promise<TScope>);
|
|
111
|
+
type NonSessionScope = DoomServerPluginScope & { readonly [K in Exclude<keyof DoomServerSessionPlugin, keyof DoomServerPluginScope>]?: never; };
|
|
112
|
+
export interface DoomServerPluginDefinition {
|
|
113
|
+
readonly providerOverrides?: DoomServerProviderOverrides;
|
|
114
|
+
readonly name: string;
|
|
115
|
+
readonly inject?: readonly string[];
|
|
116
|
+
readonly global?: ScopeDeclaration<NonSessionScope>;
|
|
117
|
+
readonly workspace?: ScopeDeclaration<NonSessionScope>;
|
|
118
|
+
readonly session?: ScopeDeclaration<DoomServerSessionPlugin>;
|
|
119
|
+
}
|
|
120
|
+
/** One package's validated declaration. */
|
|
121
|
+
export interface DeclaredServerFacet {
|
|
122
|
+
packageName: string;
|
|
123
|
+
packageDir: string;
|
|
124
|
+
/** Package-relative ./path to the source entry. */
|
|
125
|
+
entry: string;
|
|
126
|
+
/** Package-relative ./path to the built entry, which is what a host imports. */
|
|
127
|
+
dist: string;
|
|
128
|
+
/** Scopes this facet is installed into; both when the package names neither. */
|
|
129
|
+
scopes: readonly DoomApiScope[];
|
|
130
|
+
/** A selected host cannot be ready without this package's runtime capability. */
|
|
131
|
+
required?: boolean;
|
|
132
|
+
}
|
|
133
|
+
export declare class DoomServerFacetManifestError extends Error {
|
|
134
|
+
constructor(packageDir: string, message: string);
|
|
135
|
+
}
|
|
136
|
+
/** Narrows a module's default export, so a broken package is a notice rather than a crash. */
|
|
137
|
+
export declare function isDoomServerFacet(value: unknown): value is DoomServerFacet;
|
|
138
|
+
/**
|
|
139
|
+
* Validates one package.json's `poServer` block.
|
|
140
|
+
*
|
|
141
|
+
* `dist` is required because a host imports the built entry the package ships,
|
|
142
|
+
* never its source.
|
|
143
|
+
*/
|
|
144
|
+
export declare function declaredServerFacetsOf(packageDir: string, manifest: Record<string, unknown>): DeclaredServerFacet[];
|
|
145
|
+
/**
|
|
146
|
+
* The deterministic order hosts install in. A package appears once: the first
|
|
147
|
+
* directory claiming a package name keeps it and the later one is dropped with
|
|
148
|
+
* a notice, so a duplicated install never installs a facet twice.
|
|
149
|
+
*/
|
|
150
|
+
export declare function orderServerFacets(facets: readonly DeclaredServerFacet[], onNotice?: (message: string) => void): DeclaredServerFacet[];
|
|
151
|
+
//#endregion
|
|
152
|
+
//# sourceMappingURL=serverFacet.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serverFacet.d.mts","names":[],"sources":["../../../src/schemas/serverFacet.ts"],"mappings":";;;;;;;;;;qBAwBa;iBAEI;;WAEN;;EAET;;;;;;;;;iBAUe;WACN,OAAO;;WAEP,SAAS;;;;;;EAMlB,YAAY,KAAK,UAAU;;EAE3B,gBAAgB,SAAS,iBAAiB;;EAE1C,eAAe,eAAe,SAAS,gBAAgB,SACrD,YAAY,iBAAiB,QAAQ,UACrC,UAAU,OAAO,OAAO,SAAS,QAAQ,qBAAqB,OAAO,WAAW,QAAQ,OAAO,YAC9F;;EAEH;;EAEA;;;YAIU;IACR,oBAAoB;;;wBAIR,mBAAmB,SAAS,UAAU;wBAItC,sBAAsB,SAAS,UAAU;;qBAO5C;;qBAGA;;;;;;;;;;;;;iBAcI;WACN;WACA;;YAEC,+BAA+B;WAChC,aAAa,SAAS;eAClB;;wBAGC,kCAAkC,4BAA4B;iBAS7D;WACN,oBAAoB;WACpB;EACT,MAAM,SAAS,+BAA+B,iBAAiB,6BAA6B;;;iBAI7E;WACN,SAAS;WACT,MAAM;WACN,QAAQ;WACR,QAAQ;;iBAGF;EACf,SAAS,MAAM,wBAAwB;;;wBAIzB,mBAAmB,eAAe,SAAS,gBAAgB,SACzE,YAAY,iBAAiB,QAAQ,UACrC,UAAU,OAAO,OAAO,SAAS,QAAQ,qBAAqB,OAAO,WAAW,QAAQ,OAAO,YAC9F;iBAIc;WACN,oBAAoB,WAAW;WAC/B,2BAA2B;WAC3B,eAAe;WACf,mBAAmB;WACnB,WAAW,SAAS,mCAAmC;WACvD,UAAU,SAAS,mCAAmC;WACtD,aAAa,SAAS,mCAAmC;;iBAGnD,gCAAgC;WACtC,kBAAkB,mBAAmB;WACrC,qBAAqB,sBAAsB;WAC3C,qBAAqB,WAAW;WAChC,iBAAiB,WAAW;WAC5B,6BACL,8BACA,oCAAoC;WAE/B,sBAAsB,WAAW;;KAGvC,iBAAiB,UAAU,WAAW,SAAS,4BAA4B,SAAS,QAAQ;KAE5F,kBAAkB,oCACX,KAAK,cAAc,+BAA+B;iBAE7C;WACN,oBAAoB;WACpB;WACA;WACA,SAAS,iBAAiB;WAC1B,YAAY,iBAAiB;WAC7B,UAAU,iBAAiB;;;iBAIrB;EACf;EACA;;EAEA;;EAEA;;EAEA,iBAAiB;;EAEjB;;qBAGW,qCAAqC;EAChD,YAAY,oBAAoB;;;wBAWlB,kBAAkB,iBAAiB,SAAS;;;;;;;wBAmC5C,uBAAuB,oBAAoB,UAAU,0BAA0B;;;;;;wBAkC/E,kBACd,iBAAiB,uBACjB,YAAW,2BACV"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
//#region src/schemas/serverFacet.ts
|
|
2
|
+
/** The host a server facet contributes to. */
|
|
3
|
+
const DOOM_SERVER_HOST_SERVICE = "doom/server-host";
|
|
4
|
+
function readDoomServerHost(context) {
|
|
5
|
+
return context.get(DOOM_SERVER_HOST_SERVICE);
|
|
6
|
+
}
|
|
7
|
+
function requireDoomServerHost(context) {
|
|
8
|
+
const service = readDoomServerHost(context);
|
|
9
|
+
if (!service) throw new Error("The Doom server host is unavailable. Start a Doom server first.");
|
|
10
|
+
return service;
|
|
11
|
+
}
|
|
12
|
+
/** The package.json field a package declares its server facet under. */
|
|
13
|
+
const DOOM_SERVER_FACET_MANIFEST_FIELD = "poServer";
|
|
14
|
+
/** The default export a facet module must provide, so a host can install it. */
|
|
15
|
+
const DOOM_SERVER_FACET_EXPORT = "default";
|
|
16
|
+
/** Read pure root metadata without initializing or mounting the root. */
|
|
17
|
+
function composeServerProviderOverrides(...roots) {
|
|
18
|
+
return (context) => roots.flatMap((root) => {
|
|
19
|
+
if (typeof root !== "function" && typeof root !== "object" || root === null) return [];
|
|
20
|
+
const callback = root.providerOverrides;
|
|
21
|
+
return typeof callback === "function" ? callback(context) : [];
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/** Capture schema inference before heterogeneous methods enter a contribution array. */
|
|
25
|
+
function defineServerMethod(definition, handler) {
|
|
26
|
+
return { register: (host) => host.registerMethod(definition, handler) };
|
|
27
|
+
}
|
|
28
|
+
var DoomServerFacetManifestError = class extends Error {
|
|
29
|
+
constructor(packageDir, message) {
|
|
30
|
+
super(`${DOOM_SERVER_FACET_MANIFEST_FIELD} manifest in ${packageDir}: ${message}`);
|
|
31
|
+
this.name = "DoomServerFacetManifestError";
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
function isRecord(value) {
|
|
35
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
36
|
+
}
|
|
37
|
+
/** Narrows a module's default export, so a broken package is a notice rather than a crash. */
|
|
38
|
+
function isDoomServerFacet(value) {
|
|
39
|
+
return isRecord(value) && typeof value.apply === "function";
|
|
40
|
+
}
|
|
41
|
+
function normalizePath(packageDir, field, value) {
|
|
42
|
+
if (typeof value !== "string" || !value.startsWith("./") || value.includes("..")) throw new DoomServerFacetManifestError(packageDir, `${field} must be a package-relative ./path with no '..'.`);
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
function normalizeScopes(packageDir, value) {
|
|
46
|
+
if (value === void 0) throw new DoomServerFacetManifestError(packageDir, "scopes must be declared explicitly.");
|
|
47
|
+
if (!Array.isArray(value) || value.length === 0) throw new DoomServerFacetManifestError(packageDir, "scopes must name 'global', 'workspace', or 'session'.");
|
|
48
|
+
const scopes = [];
|
|
49
|
+
for (const scope of value) {
|
|
50
|
+
if (scope !== "session" && scope !== "global" && scope !== "workspace") throw new DoomServerFacetManifestError(packageDir, `Unknown scope '${String(scope)}'; resync for the three-level host.`);
|
|
51
|
+
if (!scopes.includes(scope)) scopes.push(scope);
|
|
52
|
+
}
|
|
53
|
+
return scopes;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Validates one package.json's `poServer` block.
|
|
57
|
+
*
|
|
58
|
+
* `dist` is required because a host imports the built entry the package ships,
|
|
59
|
+
* never its source.
|
|
60
|
+
*/
|
|
61
|
+
function declaredServerFacetsOf(packageDir, manifest) {
|
|
62
|
+
const declared = manifest[DOOM_SERVER_FACET_MANIFEST_FIELD];
|
|
63
|
+
if (declared === void 0) return [];
|
|
64
|
+
if (!isRecord(declared)) throw new DoomServerFacetManifestError(packageDir, "the block must be an object naming entry and dist.");
|
|
65
|
+
const entry = normalizePath(packageDir, "entry", declared.entry);
|
|
66
|
+
if (declared.dist === void 0) throw new DoomServerFacetManifestError(packageDir, "dist is required: a host imports the built entry the package ships, never its source.");
|
|
67
|
+
const dist = normalizePath(packageDir, "dist", declared.dist);
|
|
68
|
+
if (declared.required !== void 0 && typeof declared.required !== "boolean") throw new DoomServerFacetManifestError(packageDir, "required must be a boolean.");
|
|
69
|
+
return [{
|
|
70
|
+
packageName: typeof manifest.name === "string" ? manifest.name : packageDir,
|
|
71
|
+
packageDir,
|
|
72
|
+
entry,
|
|
73
|
+
dist,
|
|
74
|
+
scopes: normalizeScopes(packageDir, declared.scopes),
|
|
75
|
+
...typeof declared.required === "boolean" ? { required: declared.required } : {}
|
|
76
|
+
}];
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The deterministic order hosts install in. A package appears once: the first
|
|
80
|
+
* directory claiming a package name keeps it and the later one is dropped with
|
|
81
|
+
* a notice, so a duplicated install never installs a facet twice.
|
|
82
|
+
*/
|
|
83
|
+
function orderServerFacets(facets, onNotice = () => void 0) {
|
|
84
|
+
const sorted = [...facets].sort((left, right) => left.packageName.localeCompare(right.packageName) || left.packageDir.localeCompare(right.packageDir));
|
|
85
|
+
const owners = /* @__PURE__ */ new Map();
|
|
86
|
+
const kept = [];
|
|
87
|
+
for (const facet of sorted) {
|
|
88
|
+
const holder = owners.get(facet.packageName);
|
|
89
|
+
if (holder !== void 0) {
|
|
90
|
+
onNotice(`server facet '${facet.packageName}' from ${facet.packageDir} is skipped: ${holder.packageDir} already claims it.`);
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
owners.set(facet.packageName, facet);
|
|
94
|
+
kept.push(facet);
|
|
95
|
+
}
|
|
96
|
+
return kept;
|
|
97
|
+
}
|
|
98
|
+
//#endregion
|
|
99
|
+
export { DOOM_SERVER_FACET_EXPORT, DOOM_SERVER_FACET_MANIFEST_FIELD, DOOM_SERVER_HOST_SERVICE, DoomServerFacetManifestError, composeServerProviderOverrides, declaredServerFacetsOf, defineServerMethod, isDoomServerFacet, orderServerFacets, readDoomServerHost, requireDoomServerHost };
|
|
100
|
+
|
|
101
|
+
//# sourceMappingURL=serverFacet.mjs.map
|