@agimon-ai/doompi-core 0.0.1-alpha.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +5 -0
- package/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/agentModel.cjs +4 -0
- package/dist/agentModel.d.mts +2 -0
- package/dist/agentModel.mjs +2 -0
- package/dist/apiContracts.cjs +2009 -0
- package/dist/apiContracts.cjs.map +1 -0
- package/dist/apiContracts.d.mts +1018 -0
- package/dist/apiContracts.d.mts.map +1 -0
- package/dist/apiContracts.mjs +1989 -0
- package/dist/apiContracts.mjs.map +1 -0
- package/dist/askUser.cjs +8 -0
- package/dist/askUser.d.mts +2 -0
- package/dist/askUser.mjs +2 -0
- package/dist/authorTools.cjs +5 -0
- package/dist/authorTools.d.mts +2 -0
- package/dist/authorTools.mjs +2 -0
- package/dist/backgroundWork.cjs +7 -0
- package/dist/backgroundWork.d.mts +2 -0
- package/dist/backgroundWork.mjs +2 -0
- package/dist/bundleAssetPolicy.cjs +5 -0
- package/dist/bundleAssetPolicy.d.mts +2 -0
- package/dist/bundleAssetPolicy.mjs +2 -0
- package/dist/childProcess.cjs +15 -0
- package/dist/childProcess.d.mts +2 -0
- package/dist/childProcess.mjs +2 -0
- package/dist/childSession.cjs +8 -0
- package/dist/childSession.d.mts +3 -0
- package/dist/childSession.mjs +3 -0
- package/dist/cockpitContainer.cjs +4 -0
- package/dist/cockpitContainer.d.mts +2 -0
- package/dist/cockpitContainer.mjs +2 -0
- package/dist/config.cjs +13 -0
- package/dist/config.d.mts +3 -0
- package/dist/config.mjs +2 -0
- package/dist/contextApi.cjs +10 -0
- package/dist/contextApi.d.mts +4 -0
- package/dist/contextApi.mjs +3 -0
- package/dist/contextContributions.cjs +7 -0
- package/dist/contextContributions.d.mts +3 -0
- package/dist/contextContributions.mjs +3 -0
- package/dist/contextDetail.cjs +65 -0
- package/dist/contextDetail.cjs.map +1 -0
- package/dist/contextDetail.d.mts +19 -0
- package/dist/contextDetail.d.mts.map +1 -0
- package/dist/contextDetail.mjs +64 -0
- package/dist/contextDetail.mjs.map +1 -0
- package/dist/contextDetailStore.cjs +100 -0
- package/dist/contextDetailStore.cjs.map +1 -0
- package/dist/contextDetailStore.d.mts +19 -0
- package/dist/contextDetailStore.d.mts.map +1 -0
- package/dist/contextDetailStore.mjs +91 -0
- package/dist/contextDetailStore.mjs.map +1 -0
- package/dist/contextProjection.cjs +121 -0
- package/dist/contextProjection.cjs.map +1 -0
- package/dist/contextProjection.d.mts +130 -0
- package/dist/contextProjection.d.mts.map +1 -0
- package/dist/contextProjection.mjs +117 -0
- package/dist/contextProjection.mjs.map +1 -0
- package/dist/cordisHost.cjs +11 -0
- package/dist/cordisHost.d.mts +2 -0
- package/dist/cordisHost.mjs +2 -0
- package/dist/delegation.cjs +18 -0
- package/dist/delegation.d.mts +2 -0
- package/dist/delegation.mjs +2 -0
- package/dist/doomPackage.cjs +61 -0
- package/dist/doomPackage.cjs.map +1 -0
- package/dist/doomPackage.d.mts +17 -0
- package/dist/doomPackage.d.mts.map +1 -0
- package/dist/doomPackage.mjs +54 -0
- package/dist/doomPackage.mjs.map +1 -0
- package/dist/executionBudget.cjs +231 -0
- package/dist/executionBudget.cjs.map +1 -0
- package/dist/executionBudget.d.mts +11 -0
- package/dist/executionBudget.d.mts.map +1 -0
- package/dist/executionBudget.mjs +225 -0
- package/dist/executionBudget.mjs.map +1 -0
- package/dist/extensionFile.cjs +24 -0
- package/dist/extensionFile.d.mts +3 -0
- package/dist/extensionFile.mjs +2 -0
- package/dist/footer.cjs +6 -0
- package/dist/footer.d.mts +2 -0
- package/dist/footer.mjs +2 -0
- package/dist/headless.cjs +9 -0
- package/dist/headless.d.mts +2 -0
- package/dist/headless.mjs +2 -0
- package/dist/headlessHub.cjs +914 -0
- package/dist/headlessHub.cjs.map +1 -0
- package/dist/headlessHub.d.mts +157 -0
- package/dist/headlessHub.d.mts.map +1 -0
- package/dist/headlessHub.mjs +911 -0
- package/dist/headlessHub.mjs.map +1 -0
- package/dist/headlessServer.cjs +910 -0
- package/dist/headlessServer.cjs.map +1 -0
- package/dist/headlessServer.d.mts +64 -0
- package/dist/headlessServer.d.mts.map +1 -0
- package/dist/headlessServer.mjs +904 -0
- package/dist/headlessServer.mjs.map +1 -0
- package/dist/headlessSessionHost.cjs +0 -0
- package/dist/headlessSessionHost.d.mts +71 -0
- package/dist/headlessSessionHost.d.mts.map +1 -0
- package/dist/headlessSessionHost.mjs +1 -0
- package/dist/headlessSessionManager.cjs +51 -0
- package/dist/headlessSessionManager.cjs.map +1 -0
- package/dist/headlessSessionManager.d.mts +6 -0
- package/dist/headlessSessionManager.d.mts.map +1 -0
- package/dist/headlessSessionManager.mjs +50 -0
- package/dist/headlessSessionManager.mjs.map +1 -0
- package/dist/help.cjs +24 -0
- package/dist/help.d.mts +3 -0
- package/dist/help.mjs +3 -0
- package/dist/history.cjs +25 -0
- package/dist/history.d.mts +10 -0
- package/dist/history.mjs +10 -0
- package/dist/historyImport.cjs +553 -0
- package/dist/historyImport.cjs.map +1 -0
- package/dist/historyImport.d.mts +76 -0
- package/dist/historyImport.d.mts.map +1 -0
- package/dist/historyImport.mjs +547 -0
- package/dist/historyImport.mjs.map +1 -0
- package/dist/historyOwnership.cjs +253 -0
- package/dist/historyOwnership.cjs.map +1 -0
- package/dist/historyOwnership.d.mts +23 -0
- package/dist/historyOwnership.d.mts.map +1 -0
- package/dist/historyOwnership.mjs +247 -0
- package/dist/historyOwnership.mjs.map +1 -0
- package/dist/hubChannel.cjs +4 -0
- package/dist/hubChannel.d.mts +2 -0
- package/dist/hubChannel.mjs +2 -0
- package/dist/index.cjs +44 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.mjs +6 -0
- package/dist/json.cjs +6 -0
- package/dist/json.d.mts +2 -0
- package/dist/json.mjs +2 -0
- package/dist/jsonlSessionRepo.cjs +217 -0
- package/dist/jsonlSessionRepo.cjs.map +1 -0
- package/dist/jsonlSessionRepo.d.mts +7 -0
- package/dist/jsonlSessionRepo.d.mts.map +1 -0
- package/dist/jsonlSessionRepo.mjs +212 -0
- package/dist/jsonlSessionRepo.mjs.map +1 -0
- package/dist/kernel.cjs +3 -0
- package/dist/kernel.d.mts +3 -0
- package/dist/kernel.mjs +2 -0
- package/dist/leader.cjs +9 -0
- package/dist/leader.d.mts +2 -0
- package/dist/leader.mjs +2 -0
- package/dist/logSinkTelemetry.cjs +5 -0
- package/dist/logSinkTelemetry.d.mts +2 -0
- package/dist/logSinkTelemetry.mjs +2 -0
- package/dist/machineApi.cjs +92 -0
- package/dist/machineApi.cjs.map +1 -0
- package/dist/machineApi.d.mts +7 -0
- package/dist/machineApi.d.mts.map +1 -0
- package/dist/machineApi.mjs +88 -0
- package/dist/machineApi.mjs.map +1 -0
- package/dist/main.cjs +11 -0
- package/dist/main.d.mts +5 -0
- package/dist/main.mjs +4 -0
- package/dist/mcpFacet.cjs +12 -0
- package/dist/mcpFacet.d.mts +4 -0
- package/dist/mcpFacet.mjs +4 -0
- package/dist/mcpProjection.cjs +16 -0
- package/dist/mcpProjection.d.mts +2 -0
- package/dist/mcpProjection.mjs +2 -0
- package/dist/mcpSchemaCost.cjs +195 -0
- package/dist/mcpSchemaCost.cjs.map +1 -0
- package/dist/mcpSchemaCost.d.mts +35 -0
- package/dist/mcpSchemaCost.d.mts.map +1 -0
- package/dist/mcpSchemaCost.mjs +190 -0
- package/dist/mcpSchemaCost.mjs.map +1 -0
- package/dist/mcpSession.cjs +9 -0
- package/dist/mcpSession.d.mts +2 -0
- package/dist/mcpSession.mjs +2 -0
- package/dist/mcpStatus.cjs +7 -0
- package/dist/mcpStatus.d.mts +2 -0
- package/dist/mcpStatus.mjs +2 -0
- package/dist/mcpToolResolver.cjs +5 -0
- package/dist/mcpToolResolver.d.mts +2 -0
- package/dist/mcpToolResolver.mjs +2 -0
- package/dist/mcpWidget.cjs +0 -0
- package/dist/mcpWidget.d.mts +2 -0
- package/dist/mcpWidget.mjs +1 -0
- package/dist/moduleResolution.cjs +405 -0
- package/dist/moduleResolution.cjs.map +1 -0
- package/dist/moduleResolution.d.mts +67 -0
- package/dist/moduleResolution.d.mts.map +1 -0
- package/dist/moduleResolution.mjs +389 -0
- package/dist/moduleResolution.mjs.map +1 -0
- package/dist/narration.cjs +10 -0
- package/dist/narration.d.mts +2 -0
- package/dist/narration.mjs +2 -0
- package/dist/notification.cjs +17 -0
- package/dist/notification.d.mts +2 -0
- package/dist/notification.mjs +2 -0
- package/dist/packageApi.cjs +16 -0
- package/dist/packageApi.d.mts +3 -0
- package/dist/packageApi.mjs +3 -0
- package/dist/packageApiServer.cjs +191 -0
- package/dist/packageApiServer.cjs.map +1 -0
- package/dist/packageApiServer.d.mts +57 -0
- package/dist/packageApiServer.d.mts.map +1 -0
- package/dist/packageApiServer.mjs +189 -0
- package/dist/packageApiServer.mjs.map +1 -0
- package/dist/piExtension.cjs +13 -0
- package/dist/piExtension.d.mts +5 -0
- package/dist/piExtension.mjs +4 -0
- package/dist/piSettings.cjs +12 -0
- package/dist/piSettings.d.mts +2 -0
- package/dist/piSettings.mjs +2 -0
- package/dist/pluginProtocol.cjs +10 -0
- package/dist/pluginProtocol.d.mts +2 -0
- package/dist/pluginProtocol.mjs +2 -0
- package/dist/profileIdentity.cjs +6 -0
- package/dist/profileIdentity.d.mts +2 -0
- package/dist/profileIdentity.mjs +2 -0
- package/dist/protocol.cjs +10 -0
- package/dist/protocol.d.mts +2 -0
- package/dist/protocol.mjs +2 -0
- package/dist/readiness.cjs +8 -0
- package/dist/readiness.d.mts +2 -0
- package/dist/readiness.mjs +2 -0
- package/dist/relaunchHandoff.cjs +6 -0
- package/dist/relaunchHandoff.d.mts +2 -0
- package/dist/relaunchHandoff.mjs +2 -0
- package/dist/remoteApi.cjs +42 -0
- package/dist/remoteApi.cjs.map +1 -0
- package/dist/remoteApi.d.mts +7 -0
- package/dist/remoteApi.d.mts.map +1 -0
- package/dist/remoteApi.mjs +41 -0
- package/dist/remoteApi.mjs.map +1 -0
- package/dist/remoteRuntime.cjs +460 -0
- package/dist/remoteRuntime.cjs.map +1 -0
- package/dist/remoteRuntime.d.mts +28 -0
- package/dist/remoteRuntime.d.mts.map +1 -0
- package/dist/remoteRuntime.mjs +456 -0
- package/dist/remoteRuntime.mjs.map +1 -0
- package/dist/runtimeConfig.cjs +232 -0
- package/dist/runtimeConfig.cjs.map +1 -0
- package/dist/runtimeConfig.d.mts +313 -0
- package/dist/runtimeConfig.d.mts.map +1 -0
- package/dist/runtimeConfig.mjs +221 -0
- package/dist/runtimeConfig.mjs.map +1 -0
- package/dist/runtimeContextApi.cjs +64 -0
- package/dist/runtimeContextApi.cjs.map +1 -0
- package/dist/runtimeContextApi.d.mts +16 -0
- package/dist/runtimeContextApi.d.mts.map +1 -0
- package/dist/runtimeContextApi.mjs +62 -0
- package/dist/runtimeContextApi.mjs.map +1 -0
- package/dist/runtimeCordisHost.cjs +193 -0
- package/dist/runtimeCordisHost.cjs.map +1 -0
- package/dist/runtimeCordisHost.d.mts +63 -0
- package/dist/runtimeCordisHost.d.mts.map +1 -0
- package/dist/runtimeCordisHost.mjs +184 -0
- package/dist/runtimeCordisHost.mjs.map +1 -0
- package/dist/runtimeHeadlessSessionManager.cjs +0 -0
- package/dist/runtimeHeadlessSessionManager.d.mts +18 -0
- package/dist/runtimeHeadlessSessionManager.d.mts.map +1 -0
- package/dist/runtimeHeadlessSessionManager.mjs +1 -0
- package/dist/runtimeIdentity.cjs +26 -0
- package/dist/runtimeIdentity.cjs.map +1 -0
- package/dist/runtimeIdentity.d.mts +7 -0
- package/dist/runtimeIdentity.d.mts.map +1 -0
- package/dist/runtimeIdentity.mjs +21 -0
- package/dist/runtimeIdentity.mjs.map +1 -0
- package/dist/runtimeJson.cjs +46 -0
- package/dist/runtimeJson.cjs.map +1 -0
- package/dist/runtimeJson.d.mts +22 -0
- package/dist/runtimeJson.d.mts.map +1 -0
- package/dist/runtimeJson.mjs +39 -0
- package/dist/runtimeJson.mjs.map +1 -0
- package/dist/runtimeLogSinkTelemetry.cjs +102 -0
- package/dist/runtimeLogSinkTelemetry.cjs.map +1 -0
- package/dist/runtimeLogSinkTelemetry.d.mts +49 -0
- package/dist/runtimeLogSinkTelemetry.d.mts.map +1 -0
- package/dist/runtimeLogSinkTelemetry.mjs +99 -0
- package/dist/runtimeLogSinkTelemetry.mjs.map +1 -0
- package/dist/runtimePiExtension.cjs +339 -0
- package/dist/runtimePiExtension.cjs.map +1 -0
- package/dist/runtimePiExtension.d.mts +160 -0
- package/dist/runtimePiExtension.d.mts.map +1 -0
- package/dist/runtimePiExtension.mjs +333 -0
- package/dist/runtimePiExtension.mjs.map +1 -0
- package/dist/runtimePiSettings.cjs +116 -0
- package/dist/runtimePiSettings.cjs.map +1 -0
- package/dist/runtimePiSettings.d.mts +29 -0
- package/dist/runtimePiSettings.d.mts.map +1 -0
- package/dist/runtimePiSettings.mjs +103 -0
- package/dist/runtimePiSettings.mjs.map +1 -0
- package/dist/runtimeProtocol.cjs +223 -0
- package/dist/runtimeProtocol.cjs.map +1 -0
- package/dist/runtimeProtocol.d.mts +84 -0
- package/dist/runtimeProtocol.d.mts.map +1 -0
- package/dist/runtimeProtocol.mjs +215 -0
- package/dist/runtimeProtocol.mjs.map +1 -0
- package/dist/runtimeToolNames.cjs +51 -0
- package/dist/runtimeToolNames.cjs.map +1 -0
- package/dist/runtimeToolNames.d.mts +24 -0
- package/dist/runtimeToolNames.d.mts.map +1 -0
- package/dist/runtimeToolNames.mjs +49 -0
- package/dist/runtimeToolNames.mjs.map +1 -0
- package/dist/runtimeTransition.cjs +27 -0
- package/dist/runtimeTransition.cjs.map +1 -0
- package/dist/runtimeTransition.d.mts +114 -0
- package/dist/runtimeTransition.d.mts.map +1 -0
- package/dist/runtimeTransition.mjs +24 -0
- package/dist/runtimeTransition.mjs.map +1 -0
- package/dist/sandboxHarness.cjs +6 -0
- package/dist/sandboxHarness.d.mts +2 -0
- package/dist/sandboxHarness.mjs +2 -0
- package/dist/server.cjs +17 -0
- package/dist/server.d.mts +10 -0
- package/dist/server.mjs +7 -0
- package/dist/serverFacet.cjs +30 -0
- package/dist/serverFacet.d.mts +8 -0
- package/dist/serverFacet.mjs +8 -0
- package/dist/serverTelemetry.cjs +25 -0
- package/dist/serverTelemetry.cjs.map +1 -0
- package/dist/serverTelemetry.d.mts +12 -0
- package/dist/serverTelemetry.d.mts.map +1 -0
- package/dist/serverTelemetry.mjs +23 -0
- package/dist/serverTelemetry.mjs.map +1 -0
- package/dist/sessionFilesApi.cjs +96 -0
- package/dist/sessionFilesApi.cjs.map +1 -0
- package/dist/sessionFilesApi.d.mts +7 -0
- package/dist/sessionFilesApi.d.mts.map +1 -0
- package/dist/sessionFilesApi.mjs +91 -0
- package/dist/sessionFilesApi.mjs.map +1 -0
- package/dist/sessionMcp.cjs +6 -0
- package/dist/sessionMcp.d.mts +5 -0
- package/dist/sessionMcp.mjs +3 -0
- package/dist/sessionProtocol.cjs +8 -0
- package/dist/sessionProtocol.d.mts +3 -0
- package/dist/sessionProtocol.mjs +2 -0
- package/dist/skills.cjs +9 -0
- package/dist/skills.d.mts +2 -0
- package/dist/skills.mjs +2 -0
- package/dist/sqliteHistoryImport.cjs +151 -0
- package/dist/sqliteHistoryImport.cjs.map +1 -0
- package/dist/sqliteHistoryImport.d.mts +8 -0
- package/dist/sqliteHistoryImport.d.mts.map +1 -0
- package/dist/sqliteHistoryImport.mjs +146 -0
- package/dist/sqliteHistoryImport.mjs.map +1 -0
- package/dist/sqliteSessionStorage.cjs +53 -0
- package/dist/sqliteSessionStorage.cjs.map +1 -0
- package/dist/sqliteSessionStorage.d.mts +7 -0
- package/dist/sqliteSessionStorage.d.mts.map +1 -0
- package/dist/sqliteSessionStorage.mjs +49 -0
- package/dist/sqliteSessionStorage.mjs.map +1 -0
- package/dist/src/constants/authorTools.cjs +10 -0
- package/dist/src/constants/authorTools.cjs.map +1 -0
- package/dist/src/constants/authorTools.d.mts +6 -0
- package/dist/src/constants/authorTools.d.mts.map +1 -0
- package/dist/src/constants/authorTools.mjs +8 -0
- package/dist/src/constants/authorTools.mjs.map +1 -0
- package/dist/src/constants/contextApi.cjs +28 -0
- package/dist/src/constants/contextApi.cjs.map +1 -0
- package/dist/src/constants/contextApi.d.mts +21 -0
- package/dist/src/constants/contextApi.d.mts.map +1 -0
- package/dist/src/constants/contextApi.mjs +23 -0
- package/dist/src/constants/contextApi.mjs.map +1 -0
- package/dist/src/constants/remote.cjs +90 -0
- package/dist/src/constants/remote.cjs.map +1 -0
- package/dist/src/constants/remote.mjs +69 -0
- package/dist/src/constants/remote.mjs.map +1 -0
- package/dist/src/constants/voiceReloadHandoff.cjs +12 -0
- package/dist/src/constants/voiceReloadHandoff.cjs.map +1 -0
- package/dist/src/constants/voiceReloadHandoff.d.mts +7 -0
- package/dist/src/constants/voiceReloadHandoff.d.mts.map +1 -0
- package/dist/src/constants/voiceReloadHandoff.mjs +9 -0
- package/dist/src/constants/voiceReloadHandoff.mjs.map +1 -0
- package/dist/src/constants/voiceTools.cjs +96 -0
- package/dist/src/constants/voiceTools.cjs.map +1 -0
- package/dist/src/constants/voiceTools.d.mts +58 -0
- package/dist/src/constants/voiceTools.d.mts.map +1 -0
- package/dist/src/constants/voiceTools.mjs +60 -0
- package/dist/src/constants/voiceTools.mjs.map +1 -0
- package/dist/src/extensions/extensionFile.cjs +165 -0
- package/dist/src/extensions/extensionFile.cjs.map +1 -0
- package/dist/src/extensions/extensionFile.d.mts +79 -0
- package/dist/src/extensions/extensionFile.d.mts.map +1 -0
- package/dist/src/extensions/extensionFile.mjs +144 -0
- package/dist/src/extensions/extensionFile.mjs.map +1 -0
- package/dist/src/extensions/serverPlugin.cjs +106 -0
- package/dist/src/extensions/serverPlugin.cjs.map +1 -0
- package/dist/src/extensions/serverPlugin.d.mts +5 -0
- package/dist/src/extensions/serverPlugin.d.mts.map +1 -0
- package/dist/src/extensions/serverPlugin.mjs +106 -0
- package/dist/src/extensions/serverPlugin.mjs.map +1 -0
- package/dist/src/extensions/webPlugin.cjs +131 -0
- package/dist/src/extensions/webPlugin.cjs.map +1 -0
- package/dist/src/extensions/webPlugin.d.mts +66 -0
- package/dist/src/extensions/webPlugin.d.mts.map +1 -0
- package/dist/src/extensions/webPlugin.mjs +110 -0
- package/dist/src/extensions/webPlugin.mjs.map +1 -0
- package/dist/src/pi/piSessionRuntime.cjs +572 -0
- package/dist/src/pi/piSessionRuntime.cjs.map +1 -0
- package/dist/src/pi/piSessionRuntime.d.mts +43 -0
- package/dist/src/pi/piSessionRuntime.d.mts.map +1 -0
- package/dist/src/pi/piSessionRuntime.mjs +571 -0
- package/dist/src/pi/piSessionRuntime.mjs.map +1 -0
- package/dist/src/pi/piWebSocketListener.cjs +115 -0
- package/dist/src/pi/piWebSocketListener.cjs.map +1 -0
- package/dist/src/pi/piWebSocketListener.mjs +115 -0
- package/dist/src/pi/piWebSocketListener.mjs.map +1 -0
- package/dist/src/schemas/agentModel.cjs +33 -0
- package/dist/src/schemas/agentModel.cjs.map +1 -0
- package/dist/src/schemas/agentModel.d.mts +26 -0
- package/dist/src/schemas/agentModel.d.mts.map +1 -0
- package/dist/src/schemas/agentModel.mjs +32 -0
- package/dist/src/schemas/agentModel.mjs.map +1 -0
- package/dist/src/schemas/apiContracts.d.mts +58 -0
- package/dist/src/schemas/apiContracts.d.mts.map +1 -0
- package/dist/src/schemas/askUser.cjs +42 -0
- package/dist/src/schemas/askUser.cjs.map +1 -0
- package/dist/src/schemas/askUser.d.mts +47 -0
- package/dist/src/schemas/askUser.d.mts.map +1 -0
- package/dist/src/schemas/askUser.mjs +37 -0
- package/dist/src/schemas/askUser.mjs.map +1 -0
- package/dist/src/schemas/backgroundWork.cjs +31 -0
- package/dist/src/schemas/backgroundWork.cjs.map +1 -0
- package/dist/src/schemas/backgroundWork.d.mts +72 -0
- package/dist/src/schemas/backgroundWork.d.mts.map +1 -0
- package/dist/src/schemas/backgroundWork.mjs +27 -0
- package/dist/src/schemas/backgroundWork.mjs.map +1 -0
- package/dist/src/schemas/childProcess.cjs +67 -0
- package/dist/src/schemas/childProcess.cjs.map +1 -0
- package/dist/src/schemas/childProcess.d.mts +30 -0
- package/dist/src/schemas/childProcess.d.mts.map +1 -0
- package/dist/src/schemas/childProcess.mjs +55 -0
- package/dist/src/schemas/childProcess.mjs.map +1 -0
- package/dist/src/schemas/cockpitContainer.cjs +31 -0
- package/dist/src/schemas/cockpitContainer.cjs.map +1 -0
- package/dist/src/schemas/cockpitContainer.d.mts +80 -0
- package/dist/src/schemas/cockpitContainer.d.mts.map +1 -0
- package/dist/src/schemas/cockpitContainer.mjs +30 -0
- package/dist/src/schemas/cockpitContainer.mjs.map +1 -0
- package/dist/src/schemas/contextContributions.cjs +17 -0
- package/dist/src/schemas/contextContributions.cjs.map +1 -0
- package/dist/src/schemas/contextContributions.d.mts +49 -0
- package/dist/src/schemas/contextContributions.d.mts.map +1 -0
- package/dist/src/schemas/contextContributions.mjs +15 -0
- package/dist/src/schemas/contextContributions.mjs.map +1 -0
- package/dist/src/schemas/delegation.cjs +91 -0
- package/dist/src/schemas/delegation.cjs.map +1 -0
- package/dist/src/schemas/delegation.d.mts +95 -0
- package/dist/src/schemas/delegation.d.mts.map +1 -0
- package/dist/src/schemas/delegation.mjs +76 -0
- package/dist/src/schemas/delegation.mjs.map +1 -0
- package/dist/src/schemas/extensionFile.d.mts +136 -0
- package/dist/src/schemas/extensionFile.d.mts.map +1 -0
- package/dist/src/schemas/footer.cjs +48 -0
- package/dist/src/schemas/footer.cjs.map +1 -0
- package/dist/src/schemas/footer.d.mts +48 -0
- package/dist/src/schemas/footer.d.mts.map +1 -0
- package/dist/src/schemas/footer.mjs +45 -0
- package/dist/src/schemas/footer.mjs.map +1 -0
- package/dist/src/schemas/headless.cjs +44 -0
- package/dist/src/schemas/headless.cjs.map +1 -0
- package/dist/src/schemas/headless.d.mts +370 -0
- package/dist/src/schemas/headless.d.mts.map +1 -0
- package/dist/src/schemas/headless.mjs +38 -0
- package/dist/src/schemas/headless.mjs.map +1 -0
- package/dist/src/schemas/help.cjs +281 -0
- package/dist/src/schemas/help.cjs.map +1 -0
- package/dist/src/schemas/help.d.mts +119 -0
- package/dist/src/schemas/help.d.mts.map +1 -0
- package/dist/src/schemas/help.mjs +262 -0
- package/dist/src/schemas/help.mjs.map +1 -0
- package/dist/src/schemas/hubChannel.cjs +20 -0
- package/dist/src/schemas/hubChannel.cjs.map +1 -0
- package/dist/src/schemas/hubChannel.d.mts +236 -0
- package/dist/src/schemas/hubChannel.d.mts.map +1 -0
- package/dist/src/schemas/hubChannel.mjs +19 -0
- package/dist/src/schemas/hubChannel.mjs.map +1 -0
- package/dist/src/schemas/leader.cjs +57 -0
- package/dist/src/schemas/leader.cjs.map +1 -0
- package/dist/src/schemas/leader.d.mts +107 -0
- package/dist/src/schemas/leader.d.mts.map +1 -0
- package/dist/src/schemas/leader.mjs +51 -0
- package/dist/src/schemas/leader.mjs.map +1 -0
- package/dist/src/schemas/mcpBundle.cjs +92 -0
- package/dist/src/schemas/mcpBundle.cjs.map +1 -0
- package/dist/src/schemas/mcpBundle.d.mts +33 -0
- package/dist/src/schemas/mcpBundle.d.mts.map +1 -0
- package/dist/src/schemas/mcpBundle.mjs +90 -0
- package/dist/src/schemas/mcpBundle.mjs.map +1 -0
- package/dist/src/schemas/mcpFacet.cjs +24 -0
- package/dist/src/schemas/mcpFacet.cjs.map +1 -0
- package/dist/src/schemas/mcpFacet.d.mts +91 -0
- package/dist/src/schemas/mcpFacet.d.mts.map +1 -0
- package/dist/src/schemas/mcpFacet.mjs +21 -0
- package/dist/src/schemas/mcpFacet.mjs.map +1 -0
- package/dist/src/schemas/mcpProjection.cjs +117 -0
- package/dist/src/schemas/mcpProjection.cjs.map +1 -0
- package/dist/src/schemas/mcpProjection.d.mts +124 -0
- package/dist/src/schemas/mcpProjection.d.mts.map +1 -0
- package/dist/src/schemas/mcpProjection.mjs +104 -0
- package/dist/src/schemas/mcpProjection.mjs.map +1 -0
- package/dist/src/schemas/mcpSession.cjs +57 -0
- package/dist/src/schemas/mcpSession.cjs.map +1 -0
- package/dist/src/schemas/mcpSession.d.mts +57 -0
- package/dist/src/schemas/mcpSession.d.mts.map +1 -0
- package/dist/src/schemas/mcpSession.mjs +51 -0
- package/dist/src/schemas/mcpSession.mjs.map +1 -0
- package/dist/src/schemas/mcpStatus.cjs +52 -0
- package/dist/src/schemas/mcpStatus.cjs.map +1 -0
- package/dist/src/schemas/mcpStatus.d.mts +73 -0
- package/dist/src/schemas/mcpStatus.d.mts.map +1 -0
- package/dist/src/schemas/mcpStatus.mjs +48 -0
- package/dist/src/schemas/mcpStatus.mjs.map +1 -0
- package/dist/src/schemas/mcpToolResolver.cjs +17 -0
- package/dist/src/schemas/mcpToolResolver.cjs.map +1 -0
- package/dist/src/schemas/mcpToolResolver.d.mts +24 -0
- package/dist/src/schemas/mcpToolResolver.d.mts.map +1 -0
- package/dist/src/schemas/mcpToolResolver.mjs +15 -0
- package/dist/src/schemas/mcpToolResolver.mjs.map +1 -0
- package/dist/src/schemas/narration.cjs +54 -0
- package/dist/src/schemas/narration.cjs.map +1 -0
- package/dist/src/schemas/narration.d.mts +29 -0
- package/dist/src/schemas/narration.d.mts.map +1 -0
- package/dist/src/schemas/narration.mjs +47 -0
- package/dist/src/schemas/narration.mjs.map +1 -0
- package/dist/src/schemas/notification.cjs +122 -0
- package/dist/src/schemas/notification.cjs.map +1 -0
- package/dist/src/schemas/notification.d.mts +48 -0
- package/dist/src/schemas/notification.d.mts.map +1 -0
- package/dist/src/schemas/notification.mjs +108 -0
- package/dist/src/schemas/notification.mjs.map +1 -0
- package/dist/src/schemas/packageApi.cjs +73 -0
- package/dist/src/schemas/packageApi.cjs.map +1 -0
- package/dist/src/schemas/packageApi.d.mts +249 -0
- package/dist/src/schemas/packageApi.d.mts.map +1 -0
- package/dist/src/schemas/packageApi.mjs +64 -0
- package/dist/src/schemas/packageApi.mjs.map +1 -0
- package/dist/src/schemas/piTool.cjs +26 -0
- package/dist/src/schemas/piTool.cjs.map +1 -0
- package/dist/src/schemas/piTool.d.mts +25 -0
- package/dist/src/schemas/piTool.d.mts.map +1 -0
- package/dist/src/schemas/piTool.mjs +26 -0
- package/dist/src/schemas/piTool.mjs.map +1 -0
- package/dist/src/schemas/pluginContributions.cjs +19 -0
- package/dist/src/schemas/pluginContributions.cjs.map +1 -0
- package/dist/src/schemas/pluginContributions.d.mts +56 -0
- package/dist/src/schemas/pluginContributions.d.mts.map +1 -0
- package/dist/src/schemas/pluginContributions.mjs +18 -0
- package/dist/src/schemas/pluginContributions.mjs.map +1 -0
- package/dist/src/schemas/pluginProtocol.cjs +103 -0
- package/dist/src/schemas/pluginProtocol.cjs.map +1 -0
- package/dist/src/schemas/pluginProtocol.d.mts +68 -0
- package/dist/src/schemas/pluginProtocol.d.mts.map +1 -0
- package/dist/src/schemas/pluginProtocol.mjs +96 -0
- package/dist/src/schemas/pluginProtocol.mjs.map +1 -0
- package/dist/src/schemas/profileIdentity.cjs +67 -0
- package/dist/src/schemas/profileIdentity.cjs.map +1 -0
- package/dist/src/schemas/profileIdentity.d.mts +50 -0
- package/dist/src/schemas/profileIdentity.d.mts.map +1 -0
- package/dist/src/schemas/profileIdentity.mjs +64 -0
- package/dist/src/schemas/profileIdentity.mjs.map +1 -0
- package/dist/src/schemas/readiness.cjs +251 -0
- package/dist/src/schemas/readiness.cjs.map +1 -0
- package/dist/src/schemas/readiness.d.mts +84 -0
- package/dist/src/schemas/readiness.d.mts.map +1 -0
- package/dist/src/schemas/readiness.mjs +246 -0
- package/dist/src/schemas/readiness.mjs.map +1 -0
- package/dist/src/schemas/relaunchHandoff.cjs +47 -0
- package/dist/src/schemas/relaunchHandoff.cjs.map +1 -0
- package/dist/src/schemas/relaunchHandoff.d.mts +25 -0
- package/dist/src/schemas/relaunchHandoff.d.mts.map +1 -0
- package/dist/src/schemas/relaunchHandoff.mjs +44 -0
- package/dist/src/schemas/relaunchHandoff.mjs.map +1 -0
- package/dist/src/schemas/sandboxHarness.cjs +29 -0
- package/dist/src/schemas/sandboxHarness.cjs.map +1 -0
- package/dist/src/schemas/sandboxHarness.d.mts +39 -0
- package/dist/src/schemas/sandboxHarness.d.mts.map +1 -0
- package/dist/src/schemas/sandboxHarness.mjs +26 -0
- package/dist/src/schemas/sandboxHarness.mjs.map +1 -0
- package/dist/src/schemas/serverBundle.cjs +79 -0
- package/dist/src/schemas/serverBundle.cjs.map +1 -0
- package/dist/src/schemas/serverBundle.d.mts +34 -0
- package/dist/src/schemas/serverBundle.d.mts.map +1 -0
- package/dist/src/schemas/serverBundle.mjs +77 -0
- package/dist/src/schemas/serverBundle.mjs.map +1 -0
- package/dist/src/schemas/serverFacet.cjs +102 -0
- package/dist/src/schemas/serverFacet.cjs.map +1 -0
- package/dist/src/schemas/serverFacet.d.mts +141 -0
- package/dist/src/schemas/serverFacet.d.mts.map +1 -0
- package/dist/src/schemas/serverFacet.mjs +93 -0
- package/dist/src/schemas/serverFacet.mjs.map +1 -0
- package/dist/src/schemas/sessionMcpActivity.d.mts +45 -0
- package/dist/src/schemas/sessionMcpActivity.d.mts.map +1 -0
- package/dist/src/schemas/sessionProtocol.cjs +17 -0
- package/dist/src/schemas/sessionProtocol.cjs.map +1 -0
- package/dist/src/schemas/sessionProtocol.d.mts +308 -0
- package/dist/src/schemas/sessionProtocol.d.mts.map +1 -0
- package/dist/src/schemas/sessionProtocol.mjs +12 -0
- package/dist/src/schemas/sessionProtocol.mjs.map +1 -0
- package/dist/src/schemas/sessionUpdates.d.mts +34 -0
- package/dist/src/schemas/sessionUpdates.d.mts.map +1 -0
- package/dist/src/schemas/skills.cjs +115 -0
- package/dist/src/schemas/skills.cjs.map +1 -0
- package/dist/src/schemas/skills.d.mts +65 -0
- package/dist/src/schemas/skills.d.mts.map +1 -0
- package/dist/src/schemas/skills.mjs +109 -0
- package/dist/src/schemas/skills.mjs.map +1 -0
- package/dist/src/schemas/toolOverrides.cjs +17 -0
- package/dist/src/schemas/toolOverrides.cjs.map +1 -0
- package/dist/src/schemas/toolOverrides.d.mts +29 -0
- package/dist/src/schemas/toolOverrides.d.mts.map +1 -0
- package/dist/src/schemas/toolOverrides.mjs +15 -0
- package/dist/src/schemas/toolOverrides.mjs.map +1 -0
- package/dist/src/schemas/toolSurface.cjs +17 -0
- package/dist/src/schemas/toolSurface.cjs.map +1 -0
- package/dist/src/schemas/toolSurface.d.mts +70 -0
- package/dist/src/schemas/toolSurface.d.mts.map +1 -0
- package/dist/src/schemas/toolSurface.mjs +15 -0
- package/dist/src/schemas/toolSurface.mjs.map +1 -0
- package/dist/src/schemas/uiHub.cjs +17 -0
- package/dist/src/schemas/uiHub.cjs.map +1 -0
- package/dist/src/schemas/uiHub.d.mts +23 -0
- package/dist/src/schemas/uiHub.d.mts.map +1 -0
- package/dist/src/schemas/uiHub.mjs +15 -0
- package/dist/src/schemas/uiHub.mjs.map +1 -0
- package/dist/src/schemas/voiceReloadHandoff.cjs +78 -0
- package/dist/src/schemas/voiceReloadHandoff.cjs.map +1 -0
- package/dist/src/schemas/voiceReloadHandoff.d.mts +31 -0
- package/dist/src/schemas/voiceReloadHandoff.d.mts.map +1 -0
- package/dist/src/schemas/voiceReloadHandoff.mjs +75 -0
- package/dist/src/schemas/voiceReloadHandoff.mjs.map +1 -0
- package/dist/src/schemas/voiceTools.cjs +205 -0
- package/dist/src/schemas/voiceTools.cjs.map +1 -0
- package/dist/src/schemas/voiceTools.d.mts +120 -0
- package/dist/src/schemas/voiceTools.d.mts.map +1 -0
- package/dist/src/schemas/voiceTools.mjs +194 -0
- package/dist/src/schemas/voiceTools.mjs.map +1 -0
- package/dist/src/server/devProxyForward.cjs +141 -0
- package/dist/src/server/devProxyForward.cjs.map +1 -0
- package/dist/src/server/devProxyForward.mjs +139 -0
- package/dist/src/server/devProxyForward.mjs.map +1 -0
- package/dist/src/server/devProxyRoutes.cjs +97 -0
- package/dist/src/server/devProxyRoutes.cjs.map +1 -0
- package/dist/src/server/devProxyRoutes.mjs +97 -0
- package/dist/src/server/devProxyRoutes.mjs.map +1 -0
- package/dist/src/server/devProxySocket.cjs +87 -0
- package/dist/src/server/devProxySocket.cjs.map +1 -0
- package/dist/src/server/devProxySocket.mjs +87 -0
- package/dist/src/server/devProxySocket.mjs.map +1 -0
- package/dist/src/server/directHarnessRuntime.cjs +1964 -0
- package/dist/src/server/directHarnessRuntime.cjs.map +1 -0
- package/dist/src/server/directHarnessRuntime.d.mts +3 -0
- package/dist/src/server/directHarnessRuntime.mjs +1958 -0
- package/dist/src/server/directHarnessRuntime.mjs.map +1 -0
- package/dist/src/server/harnessErrorMessage.cjs +13 -0
- package/dist/src/server/harnessErrorMessage.cjs.map +1 -0
- package/dist/src/server/harnessErrorMessage.mjs +13 -0
- package/dist/src/server/harnessErrorMessage.mjs.map +1 -0
- package/dist/src/server/headlessProtocol.cjs +366 -0
- package/dist/src/server/headlessProtocol.cjs.map +1 -0
- package/dist/src/server/headlessProtocol.mjs +366 -0
- package/dist/src/server/headlessProtocol.mjs.map +1 -0
- package/dist/src/server/jsonlTranscriptReader.cjs +85 -0
- package/dist/src/server/jsonlTranscriptReader.cjs.map +1 -0
- package/dist/src/server/jsonlTranscriptReader.mjs +83 -0
- package/dist/src/server/jsonlTranscriptReader.mjs.map +1 -0
- package/dist/src/server/mcpBundleLoader.cjs +115 -0
- package/dist/src/server/mcpBundleLoader.cjs.map +1 -0
- package/dist/src/server/mcpBundleLoader.d.mts +27 -0
- package/dist/src/server/mcpBundleLoader.d.mts.map +1 -0
- package/dist/src/server/mcpBundleLoader.mjs +111 -0
- package/dist/src/server/mcpBundleLoader.mjs.map +1 -0
- package/dist/src/server/nativeChildTranscriptReader.cjs +20 -0
- package/dist/src/server/nativeChildTranscriptReader.cjs.map +1 -0
- package/dist/src/server/nativeChildTranscriptReader.mjs +18 -0
- package/dist/src/server/nativeChildTranscriptReader.mjs.map +1 -0
- package/dist/src/server/remoteRoutes.cjs +386 -0
- package/dist/src/server/remoteRoutes.cjs.map +1 -0
- package/dist/src/server/remoteRoutes.mjs +386 -0
- package/dist/src/server/remoteRoutes.mjs.map +1 -0
- package/dist/src/server/serverFacetLoader.cjs +220 -0
- package/dist/src/server/serverFacetLoader.cjs.map +1 -0
- package/dist/src/server/serverFacetLoader.d.mts +77 -0
- package/dist/src/server/serverFacetLoader.d.mts.map +1 -0
- package/dist/src/server/serverFacetLoader.mjs +215 -0
- package/dist/src/server/serverFacetLoader.mjs.map +1 -0
- package/dist/src/server/sessionMcpHandler.cjs +494 -0
- package/dist/src/server/sessionMcpHandler.cjs.map +1 -0
- package/dist/src/server/sessionMcpHandler.d.mts +47 -0
- package/dist/src/server/sessionMcpHandler.d.mts.map +1 -0
- package/dist/src/server/sessionMcpHandler.mjs +493 -0
- package/dist/src/server/sessionMcpHandler.mjs.map +1 -0
- package/dist/src/server/sessionMcpRoutes.cjs +780 -0
- package/dist/src/server/sessionMcpRoutes.cjs.map +1 -0
- package/dist/src/server/sessionMcpRoutes.mjs +775 -0
- package/dist/src/server/sessionMcpRoutes.mjs.map +1 -0
- package/dist/src/server/threadJournals.cjs +172 -0
- package/dist/src/server/threadJournals.cjs.map +1 -0
- package/dist/src/server/threadJournals.mjs +169 -0
- package/dist/src/server/threadJournals.mjs.map +1 -0
- package/dist/src/services/acpSessionUpdates/index.cjs +129 -0
- package/dist/src/services/acpSessionUpdates/index.cjs.map +1 -0
- package/dist/src/services/acpSessionUpdates/index.mjs +129 -0
- package/dist/src/services/acpSessionUpdates/index.mjs.map +1 -0
- package/dist/src/services/apiSurfaceAssert/index.cjs +60 -0
- package/dist/src/services/apiSurfaceAssert/index.cjs.map +1 -0
- package/dist/src/services/apiSurfaceAssert/index.d.mts +24 -0
- package/dist/src/services/apiSurfaceAssert/index.d.mts.map +1 -0
- package/dist/src/services/apiSurfaceAssert/index.mjs +60 -0
- package/dist/src/services/apiSurfaceAssert/index.mjs.map +1 -0
- package/dist/src/services/bundlePublication/index.cjs +88 -0
- package/dist/src/services/bundlePublication/index.cjs.map +1 -0
- package/dist/src/services/bundlePublication/index.mjs +85 -0
- package/dist/src/services/bundlePublication/index.mjs.map +1 -0
- package/dist/src/services/contextApiUrls/index.cjs +14 -0
- package/dist/src/services/contextApiUrls/index.cjs.map +1 -0
- package/dist/src/services/contextApiUrls/index.d.mts +6 -0
- package/dist/src/services/contextApiUrls/index.d.mts.map +1 -0
- package/dist/src/services/contextApiUrls/index.mjs +14 -0
- package/dist/src/services/contextApiUrls/index.mjs.map +1 -0
- package/dist/src/services/contextContributions/index.cjs +79 -0
- package/dist/src/services/contextContributions/index.cjs.map +1 -0
- package/dist/src/services/contextContributions/index.d.mts +6 -0
- package/dist/src/services/contextContributions/index.d.mts.map +1 -0
- package/dist/src/services/contextContributions/index.mjs +79 -0
- package/dist/src/services/contextContributions/index.mjs.map +1 -0
- package/dist/src/services/contextUsage/index.cjs +27 -0
- package/dist/src/services/contextUsage/index.cjs.map +1 -0
- package/dist/src/services/contextUsage/index.mjs +25 -0
- package/dist/src/services/contextUsage/index.mjs.map +1 -0
- package/dist/src/services/devProxyPolicy/index.cjs +168 -0
- package/dist/src/services/devProxyPolicy/index.cjs.map +1 -0
- package/dist/src/services/devProxyPolicy/index.mjs +165 -0
- package/dist/src/services/devProxyPolicy/index.mjs.map +1 -0
- package/dist/src/services/devProxyStore/index.cjs +107 -0
- package/dist/src/services/devProxyStore/index.cjs.map +1 -0
- package/dist/src/services/devProxyStore/index.mjs +104 -0
- package/dist/src/services/devProxyStore/index.mjs.map +1 -0
- package/dist/src/services/deviceAuth/index.cjs +125 -0
- package/dist/src/services/deviceAuth/index.cjs.map +1 -0
- package/dist/src/services/deviceAuth/index.d.mts +9 -0
- package/dist/src/services/deviceAuth/index.d.mts.map +1 -0
- package/dist/src/services/deviceAuth/index.mjs +125 -0
- package/dist/src/services/deviceAuth/index.mjs.map +1 -0
- package/dist/src/services/deviceSessions/index.cjs +147 -0
- package/dist/src/services/deviceSessions/index.cjs.map +1 -0
- package/dist/src/services/deviceSessions/index.d.mts +15 -0
- package/dist/src/services/deviceSessions/index.d.mts.map +1 -0
- package/dist/src/services/deviceSessions/index.mjs +141 -0
- package/dist/src/services/deviceSessions/index.mjs.map +1 -0
- package/dist/src/services/headlessClient/index.cjs +125 -0
- package/dist/src/services/headlessClient/index.cjs.map +1 -0
- package/dist/src/services/headlessClient/index.mjs +125 -0
- package/dist/src/services/headlessClient/index.mjs.map +1 -0
- package/dist/src/services/historyCreationFileSystem/index.cjs +115 -0
- package/dist/src/services/historyCreationFileSystem/index.cjs.map +1 -0
- package/dist/src/services/historyCreationFileSystem/index.mjs +115 -0
- package/dist/src/services/historyCreationFileSystem/index.mjs.map +1 -0
- package/dist/src/services/hubChannelHarness/index.cjs +50 -0
- package/dist/src/services/hubChannelHarness/index.cjs.map +1 -0
- package/dist/src/services/hubChannelHarness/index.d.mts +17 -0
- package/dist/src/services/hubChannelHarness/index.d.mts.map +1 -0
- package/dist/src/services/hubChannelHarness/index.mjs +50 -0
- package/dist/src/services/hubChannelHarness/index.mjs.map +1 -0
- package/dist/src/services/kernel/index.cjs +147 -0
- package/dist/src/services/kernel/index.cjs.map +1 -0
- package/dist/src/services/kernel/index.d.mts +9 -0
- package/dist/src/services/kernel/index.d.mts.map +1 -0
- package/dist/src/services/kernel/index.mjs +147 -0
- package/dist/src/services/kernel/index.mjs.map +1 -0
- package/dist/src/services/loginFlow/index.cjs +131 -0
- package/dist/src/services/loginFlow/index.cjs.map +1 -0
- package/dist/src/services/loginFlow/index.mjs +131 -0
- package/dist/src/services/loginFlow/index.mjs.map +1 -0
- package/dist/src/services/loopbackAddress/index.cjs +58 -0
- package/dist/src/services/loopbackAddress/index.cjs.map +1 -0
- package/dist/src/services/loopbackAddress/index.mjs +56 -0
- package/dist/src/services/loopbackAddress/index.mjs.map +1 -0
- package/dist/src/services/openSessionRegistry/index.cjs +144 -0
- package/dist/src/services/openSessionRegistry/index.cjs.map +1 -0
- package/dist/src/services/openSessionRegistry/index.d.mts +40 -0
- package/dist/src/services/openSessionRegistry/index.d.mts.map +1 -0
- package/dist/src/services/openSessionRegistry/index.mjs +141 -0
- package/dist/src/services/openSessionRegistry/index.mjs.map +1 -0
- package/dist/src/services/packageApiHarness/index.cjs +36 -0
- package/dist/src/services/packageApiHarness/index.cjs.map +1 -0
- package/dist/src/services/packageApiHarness/index.d.mts +40 -0
- package/dist/src/services/packageApiHarness/index.d.mts.map +1 -0
- package/dist/src/services/packageApiHarness/index.mjs +36 -0
- package/dist/src/services/packageApiHarness/index.mjs.map +1 -0
- package/dist/src/services/packageResource/index.cjs +54 -0
- package/dist/src/services/packageResource/index.cjs.map +1 -0
- package/dist/src/services/packageResource/index.d.mts +26 -0
- package/dist/src/services/packageResource/index.d.mts.map +1 -0
- package/dist/src/services/packageResource/index.mjs +51 -0
- package/dist/src/services/packageResource/index.mjs.map +1 -0
- package/dist/src/services/pairingFlow/index.cjs +145 -0
- package/dist/src/services/pairingFlow/index.cjs.map +1 -0
- package/dist/src/services/pairingFlow/index.d.mts +44 -0
- package/dist/src/services/pairingFlow/index.d.mts.map +1 -0
- package/dist/src/services/pairingFlow/index.mjs +145 -0
- package/dist/src/services/pairingFlow/index.mjs.map +1 -0
- package/dist/src/services/pairingPage/index.cjs +450 -0
- package/dist/src/services/pairingPage/index.cjs.map +1 -0
- package/dist/src/services/pairingPage/index.mjs +447 -0
- package/dist/src/services/pairingPage/index.mjs.map +1 -0
- package/dist/src/services/piExtensionHost/index.cjs +821 -0
- package/dist/src/services/piExtensionHost/index.cjs.map +1 -0
- package/dist/src/services/piExtensionHost/index.mjs +817 -0
- package/dist/src/services/piExtensionHost/index.mjs.map +1 -0
- package/dist/src/services/piHelpTools/index.cjs +68 -0
- package/dist/src/services/piHelpTools/index.cjs.map +1 -0
- package/dist/src/services/piHelpTools/index.d.mts +10 -0
- package/dist/src/services/piHelpTools/index.d.mts.map +1 -0
- package/dist/src/services/piHelpTools/index.mjs +68 -0
- package/dist/src/services/piHelpTools/index.mjs.map +1 -0
- package/dist/src/services/piSessionEntries/index.cjs +112 -0
- package/dist/src/services/piSessionEntries/index.cjs.map +1 -0
- package/dist/src/services/piSessionEntries/index.mjs +108 -0
- package/dist/src/services/piSessionEntries/index.mjs.map +1 -0
- package/dist/src/services/pluginLifecycle/index.cjs +71 -0
- package/dist/src/services/pluginLifecycle/index.cjs.map +1 -0
- package/dist/src/services/pluginLifecycle/index.d.mts +11 -0
- package/dist/src/services/pluginLifecycle/index.d.mts.map +1 -0
- package/dist/src/services/pluginLifecycle/index.mjs +71 -0
- package/dist/src/services/pluginLifecycle/index.mjs.map +1 -0
- package/dist/src/services/providerAuth/index.cjs +156 -0
- package/dist/src/services/providerAuth/index.cjs.map +1 -0
- package/dist/src/services/providerAuth/index.mjs +154 -0
- package/dist/src/services/providerAuth/index.mjs.map +1 -0
- package/dist/src/services/remoteAccess/index.cjs +396 -0
- package/dist/src/services/remoteAccess/index.cjs.map +1 -0
- package/dist/src/services/remoteAccess/index.d.mts +81 -0
- package/dist/src/services/remoteAccess/index.d.mts.map +1 -0
- package/dist/src/services/remoteAccess/index.mjs +396 -0
- package/dist/src/services/remoteAccess/index.mjs.map +1 -0
- package/dist/src/services/remoteAccessSettings/index.cjs +151 -0
- package/dist/src/services/remoteAccessSettings/index.cjs.map +1 -0
- package/dist/src/services/remoteAccessSettings/index.mjs +149 -0
- package/dist/src/services/remoteAccessSettings/index.mjs.map +1 -0
- package/dist/src/services/remoteAccessStore/index.cjs +126 -0
- package/dist/src/services/remoteAccessStore/index.cjs.map +1 -0
- package/dist/src/services/remoteAccessStore/index.mjs +121 -0
- package/dist/src/services/remoteAccessStore/index.mjs.map +1 -0
- package/dist/src/services/remoteGuardPolicy/index.cjs +190 -0
- package/dist/src/services/remoteGuardPolicy/index.cjs.map +1 -0
- package/dist/src/services/remoteGuardPolicy/index.d.mts +7 -0
- package/dist/src/services/remoteGuardPolicy/index.d.mts.map +1 -0
- package/dist/src/services/remoteGuardPolicy/index.mjs +186 -0
- package/dist/src/services/remoteGuardPolicy/index.mjs.map +1 -0
- package/dist/src/services/requestReceipts/index.cjs +161 -0
- package/dist/src/services/requestReceipts/index.cjs.map +1 -0
- package/dist/src/services/requestReceipts/index.d.mts +11 -0
- package/dist/src/services/requestReceipts/index.d.mts.map +1 -0
- package/dist/src/services/requestReceipts/index.mjs +161 -0
- package/dist/src/services/requestReceipts/index.mjs.map +1 -0
- package/dist/src/services/rpcTranscript/index.cjs +590 -0
- package/dist/src/services/rpcTranscript/index.cjs.map +1 -0
- package/dist/src/services/rpcTranscript/index.d.mts +50 -0
- package/dist/src/services/rpcTranscript/index.d.mts.map +1 -0
- package/dist/src/services/rpcTranscript/index.mjs +589 -0
- package/dist/src/services/rpcTranscript/index.mjs.map +1 -0
- package/dist/src/services/serverFacet/index.cjs +197 -0
- package/dist/src/services/serverFacet/index.cjs.map +1 -0
- package/dist/src/services/serverFacet/index.d.mts +31 -0
- package/dist/src/services/serverFacet/index.d.mts.map +1 -0
- package/dist/src/services/serverFacet/index.mjs +197 -0
- package/dist/src/services/serverFacet/index.mjs.map +1 -0
- package/dist/src/services/sessionGitStatus/index.cjs +46 -0
- package/dist/src/services/sessionGitStatus/index.cjs.map +1 -0
- package/dist/src/services/sessionGitStatus/index.mjs +46 -0
- package/dist/src/services/sessionGitStatus/index.mjs.map +1 -0
- package/dist/src/services/sessionGitStatus/type.d.mts +8 -0
- package/dist/src/services/sessionGitStatus/type.d.mts.map +1 -0
- package/dist/src/services/sessionMcpActivity/index.cjs +115 -0
- package/dist/src/services/sessionMcpActivity/index.cjs.map +1 -0
- package/dist/src/services/sessionMcpActivity/index.mjs +111 -0
- package/dist/src/services/sessionMcpActivity/index.mjs.map +1 -0
- package/dist/src/services/sessionMcpAuthorization/index.cjs +432 -0
- package/dist/src/services/sessionMcpAuthorization/index.cjs.map +1 -0
- package/dist/src/services/sessionMcpAuthorization/index.d.mts +123 -0
- package/dist/src/services/sessionMcpAuthorization/index.d.mts.map +1 -0
- package/dist/src/services/sessionMcpAuthorization/index.mjs +430 -0
- package/dist/src/services/sessionMcpAuthorization/index.mjs.map +1 -0
- package/dist/src/services/sessionMcpConversations/index.cjs +217 -0
- package/dist/src/services/sessionMcpConversations/index.cjs.map +1 -0
- package/dist/src/services/sessionMcpConversations/index.mjs +212 -0
- package/dist/src/services/sessionMcpConversations/index.mjs.map +1 -0
- package/dist/src/services/sessionMcpRegistrationStore/index.cjs +86 -0
- package/dist/src/services/sessionMcpRegistrationStore/index.cjs.map +1 -0
- package/dist/src/services/sessionMcpRegistrationStore/index.mjs +83 -0
- package/dist/src/services/sessionMcpRegistrationStore/index.mjs.map +1 -0
- package/dist/src/services/sessionPresentation/index.cjs +119 -0
- package/dist/src/services/sessionPresentation/index.cjs.map +1 -0
- package/dist/src/services/sessionPresentation/index.mjs +119 -0
- package/dist/src/services/sessionPresentation/index.mjs.map +1 -0
- package/dist/src/services/sqliteSessionHistory/index.cjs +105 -0
- package/dist/src/services/sqliteSessionHistory/index.cjs.map +1 -0
- package/dist/src/services/sqliteSessionHistory/index.d.mts +29 -0
- package/dist/src/services/sqliteSessionHistory/index.d.mts.map +1 -0
- package/dist/src/services/sqliteSessionHistory/index.mjs +100 -0
- package/dist/src/services/sqliteSessionHistory/index.mjs.map +1 -0
- package/dist/src/services/sqliteTranscriptReader/index.cjs +70 -0
- package/dist/src/services/sqliteTranscriptReader/index.cjs.map +1 -0
- package/dist/src/services/sqliteTranscriptReader/index.d.mts +14 -0
- package/dist/src/services/sqliteTranscriptReader/index.d.mts.map +1 -0
- package/dist/src/services/sqliteTranscriptReader/index.mjs +67 -0
- package/dist/src/services/sqliteTranscriptReader/index.mjs.map +1 -0
- package/dist/src/services/toolCost/index.cjs +47 -0
- package/dist/src/services/toolCost/index.cjs.map +1 -0
- package/dist/src/services/toolCost/index.d.mts +38 -0
- package/dist/src/services/toolCost/index.d.mts.map +1 -0
- package/dist/src/services/toolCost/index.mjs +46 -0
- package/dist/src/services/toolCost/index.mjs.map +1 -0
- package/dist/src/services/toolOverrides/index.cjs +45 -0
- package/dist/src/services/toolOverrides/index.cjs.map +1 -0
- package/dist/src/services/toolOverrides/index.d.mts +6 -0
- package/dist/src/services/toolOverrides/index.d.mts.map +1 -0
- package/dist/src/services/toolOverrides/index.mjs +45 -0
- package/dist/src/services/toolOverrides/index.mjs.map +1 -0
- package/dist/src/services/toolPrompt/index.cjs +13 -0
- package/dist/src/services/toolPrompt/index.cjs.map +1 -0
- package/dist/src/services/toolPrompt/index.mjs +13 -0
- package/dist/src/services/toolPrompt/index.mjs.map +1 -0
- package/dist/src/services/toolSurface/index.cjs +134 -0
- package/dist/src/services/toolSurface/index.cjs.map +1 -0
- package/dist/src/services/toolSurface/index.d.mts +19 -0
- package/dist/src/services/toolSurface/index.d.mts.map +1 -0
- package/dist/src/services/toolSurface/index.mjs +134 -0
- package/dist/src/services/toolSurface/index.mjs.map +1 -0
- package/dist/src/services/traceContext/index.cjs +13 -0
- package/dist/src/services/traceContext/index.cjs.map +1 -0
- package/dist/src/services/traceContext/index.mjs +13 -0
- package/dist/src/services/traceContext/index.mjs.map +1 -0
- package/dist/src/services/transcriptPages/index.cjs +74 -0
- package/dist/src/services/transcriptPages/index.cjs.map +1 -0
- package/dist/src/services/transcriptPages/index.mjs +73 -0
- package/dist/src/services/transcriptPages/index.mjs.map +1 -0
- package/dist/src/services/tunnelOutput/index.cjs +58 -0
- package/dist/src/services/tunnelOutput/index.cjs.map +1 -0
- package/dist/src/services/tunnelOutput/index.mjs +54 -0
- package/dist/src/services/tunnelOutput/index.mjs.map +1 -0
- package/dist/src/services/tunnelProcess/index.cjs +487 -0
- package/dist/src/services/tunnelProcess/index.cjs.map +1 -0
- package/dist/src/services/tunnelProcess/index.mjs +481 -0
- package/dist/src/services/tunnelProcess/index.mjs.map +1 -0
- package/dist/src/services/voiceReloadHandoff/index.cjs +136 -0
- package/dist/src/services/voiceReloadHandoff/index.cjs.map +1 -0
- package/dist/src/services/voiceReloadHandoff/index.d.mts +34 -0
- package/dist/src/services/voiceReloadHandoff/index.d.mts.map +1 -0
- package/dist/src/services/voiceReloadHandoff/index.mjs +135 -0
- package/dist/src/services/voiceReloadHandoff/index.mjs.map +1 -0
- package/dist/src/services/voiceToolsContract/index.cjs +26 -0
- package/dist/src/services/voiceToolsContract/index.cjs.map +1 -0
- package/dist/src/services/voiceToolsContract/index.d.mts +76 -0
- package/dist/src/services/voiceToolsContract/index.d.mts.map +1 -0
- package/dist/src/services/voiceToolsContract/index.mjs +24 -0
- package/dist/src/services/voiceToolsContract/index.mjs.map +1 -0
- package/dist/src/services/webauthn/index.cjs +262 -0
- package/dist/src/services/webauthn/index.cjs.map +1 -0
- package/dist/src/services/webauthn/index.d.mts +39 -0
- package/dist/src/services/webauthn/index.d.mts.map +1 -0
- package/dist/src/services/webauthn/index.mjs +262 -0
- package/dist/src/services/webauthn/index.mjs.map +1 -0
- package/dist/src/services/webauthnPolicy/index.cjs +163 -0
- package/dist/src/services/webauthnPolicy/index.cjs.map +1 -0
- package/dist/src/services/webauthnPolicy/index.d.mts +41 -0
- package/dist/src/services/webauthnPolicy/index.d.mts.map +1 -0
- package/dist/src/services/webauthnPolicy/index.mjs +156 -0
- package/dist/src/services/webauthnPolicy/index.mjs.map +1 -0
- package/dist/src/services/workspaceRegistry/index.cjs +151 -0
- package/dist/src/services/workspaceRegistry/index.cjs.map +1 -0
- package/dist/src/services/workspaceRegistry/index.d.mts +47 -0
- package/dist/src/services/workspaceRegistry/index.d.mts.map +1 -0
- package/dist/src/services/workspaceRegistry/index.mjs +144 -0
- package/dist/src/services/workspaceRegistry/index.mjs.map +1 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.cjs +261 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.cjs.map +1 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.d.mts +32 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.d.mts.map +1 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.mjs +254 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.mjs.map +1 -0
- package/dist/src/systems/child/adapters/nativeChildRuntimes.cjs +28 -0
- package/dist/src/systems/child/adapters/nativeChildRuntimes.cjs.map +1 -0
- package/dist/src/systems/child/adapters/nativeChildRuntimes.mjs +25 -0
- package/dist/src/systems/child/adapters/nativeChildRuntimes.mjs.map +1 -0
- package/dist/src/systems/child/services/childSession/index.cjs +219 -0
- package/dist/src/systems/child/services/childSession/index.cjs.map +1 -0
- package/dist/src/systems/child/services/childSession/index.d.mts +14 -0
- package/dist/src/systems/child/services/childSession/index.d.mts.map +1 -0
- package/dist/src/systems/child/services/childSession/index.mjs +219 -0
- package/dist/src/systems/child/services/childSession/index.mjs.map +1 -0
- package/dist/src/systems/child/types/childSession.cjs +19 -0
- package/dist/src/systems/child/types/childSession.cjs.map +1 -0
- package/dist/src/systems/child/types/childSession.d.mts +148 -0
- package/dist/src/systems/child/types/childSession.d.mts.map +1 -0
- package/dist/src/systems/child/types/childSession.mjs +16 -0
- package/dist/src/systems/child/types/childSession.mjs.map +1 -0
- package/dist/src/systems/main/adapters/headlessHost.cjs +554 -0
- package/dist/src/systems/main/adapters/headlessHost.cjs.map +1 -0
- package/dist/src/systems/main/adapters/headlessHost.d.mts +111 -0
- package/dist/src/systems/main/adapters/headlessHost.d.mts.map +1 -0
- package/dist/src/systems/main/adapters/headlessHost.mjs +552 -0
- package/dist/src/systems/main/adapters/headlessHost.mjs.map +1 -0
- package/dist/src/systems/main/adapters/headlessSessionHost.cjs +1293 -0
- package/dist/src/systems/main/adapters/headlessSessionHost.cjs.map +1 -0
- package/dist/src/systems/main/adapters/headlessSessionHost.d.mts +14 -0
- package/dist/src/systems/main/adapters/headlessSessionHost.d.mts.map +1 -0
- package/dist/src/systems/main/adapters/headlessSessionHost.mjs +1288 -0
- package/dist/src/systems/main/adapters/headlessSessionHost.mjs.map +1 -0
- package/dist/src/systems/main/types/headlessHost.d.mts +36 -0
- package/dist/src/systems/main/types/headlessHost.d.mts.map +1 -0
- package/dist/src/testing/pi/extensionScenarios.cjs +73 -0
- package/dist/src/testing/pi/extensionScenarios.cjs.map +1 -0
- package/dist/src/testing/pi/extensionScenarios.d.mts +41 -0
- package/dist/src/testing/pi/extensionScenarios.d.mts.map +1 -0
- package/dist/src/testing/pi/extensionScenarios.mjs +73 -0
- package/dist/src/testing/pi/extensionScenarios.mjs.map +1 -0
- package/dist/src/testing/pi/testHost.cjs +398 -0
- package/dist/src/testing/pi/testHost.cjs.map +1 -0
- package/dist/src/testing/pi/testHost.d.mts +160 -0
- package/dist/src/testing/pi/testHost.d.mts.map +1 -0
- package/dist/src/testing/pi/testHost.mjs +398 -0
- package/dist/src/testing/pi/testHost.mjs.map +1 -0
- package/dist/src/types/config.d.mts +20 -0
- package/dist/src/types/config.d.mts.map +1 -0
- package/dist/src/types/kernel.d.mts +69 -0
- package/dist/src/types/kernel.d.mts.map +1 -0
- package/dist/src/types/remote.d.mts +124 -0
- package/dist/src/types/remote.d.mts.map +1 -0
- package/dist/src/types/server/directHarnessRuntime.d.mts +209 -0
- package/dist/src/types/server/directHarnessRuntime.d.mts.map +1 -0
- package/dist/src/types/server/session.d.mts +5 -0
- package/dist/src/types/server/session.d.mts.map +1 -0
- package/dist/src/types/server/sessionToolSurface.d.mts +44 -0
- package/dist/src/types/server/sessionToolSurface.d.mts.map +1 -0
- package/dist/src/web/models/globalStore.cjs +23 -0
- package/dist/src/web/models/globalStore.cjs.map +1 -0
- package/dist/src/web/models/globalStore.d.mts +6 -0
- package/dist/src/web/models/globalStore.d.mts.map +1 -0
- package/dist/src/web/models/globalStore.mjs +23 -0
- package/dist/src/web/models/globalStore.mjs.map +1 -0
- package/dist/src/web/models/sessionStore.cjs +56 -0
- package/dist/src/web/models/sessionStore.cjs.map +1 -0
- package/dist/src/web/models/sessionStore.d.mts +14 -0
- package/dist/src/web/models/sessionStore.d.mts.map +1 -0
- package/dist/src/web/models/sessionStore.mjs +56 -0
- package/dist/src/web/models/sessionStore.mjs.map +1 -0
- package/dist/src/web/models/workspaceStore.cjs +50 -0
- package/dist/src/web/models/workspaceStore.cjs.map +1 -0
- package/dist/src/web/models/workspaceStore.d.mts +18 -0
- package/dist/src/web/models/workspaceStore.d.mts.map +1 -0
- package/dist/src/web/models/workspaceStore.mjs +50 -0
- package/dist/src/web/models/workspaceStore.mjs.map +1 -0
- package/dist/src/web/schemas/bundleAssetPolicy.cjs +20 -0
- package/dist/src/web/schemas/bundleAssetPolicy.cjs.map +1 -0
- package/dist/src/web/schemas/bundleAssetPolicy.d.mts +10 -0
- package/dist/src/web/schemas/bundleAssetPolicy.d.mts.map +1 -0
- package/dist/src/web/schemas/bundleAssetPolicy.mjs +18 -0
- package/dist/src/web/schemas/bundleAssetPolicy.mjs.map +1 -0
- package/dist/src/web/schemas/template.cjs +15 -0
- package/dist/src/web/schemas/template.cjs.map +1 -0
- package/dist/src/web/schemas/template.d.mts +6 -0
- package/dist/src/web/schemas/template.d.mts.map +1 -0
- package/dist/src/web/schemas/template.mjs +15 -0
- package/dist/src/web/schemas/template.mjs.map +1 -0
- package/dist/src/web/services/apiClient/index.cjs +156 -0
- package/dist/src/web/services/apiClient/index.cjs.map +1 -0
- package/dist/src/web/services/apiClient/index.d.mts +152 -0
- package/dist/src/web/services/apiClient/index.d.mts.map +1 -0
- package/dist/src/web/services/apiClient/index.mjs +154 -0
- package/dist/src/web/services/apiClient/index.mjs.map +1 -0
- package/dist/src/web/services/apiPaths/index.cjs +83 -0
- package/dist/src/web/services/apiPaths/index.cjs.map +1 -0
- package/dist/src/web/services/apiPaths/index.d.mts +81 -0
- package/dist/src/web/services/apiPaths/index.d.mts.map +1 -0
- package/dist/src/web/services/apiPaths/index.mjs +78 -0
- package/dist/src/web/services/apiPaths/index.mjs.map +1 -0
- package/dist/src/web/services/apiRoutes/index.cjs +47 -0
- package/dist/src/web/services/apiRoutes/index.cjs.map +1 -0
- package/dist/src/web/services/apiRoutes/index.d.mts +21 -0
- package/dist/src/web/services/apiRoutes/index.d.mts.map +1 -0
- package/dist/src/web/services/apiRoutes/index.mjs +43 -0
- package/dist/src/web/services/apiRoutes/index.mjs.map +1 -0
- package/dist/src/web/services/mcpWidget.cjs +9 -0
- package/dist/src/web/services/mcpWidget.cjs.map +1 -0
- package/dist/src/web/services/mcpWidget.d.mts +6 -0
- package/dist/src/web/services/mcpWidget.d.mts.map +1 -0
- package/dist/src/web/services/mcpWidget.mjs +9 -0
- package/dist/src/web/services/mcpWidget.mjs.map +1 -0
- package/dist/src/web/services/sessionRegistry/index.cjs +70 -0
- package/dist/src/web/services/sessionRegistry/index.cjs.map +1 -0
- package/dist/src/web/services/sessionRegistry/index.d.mts +29 -0
- package/dist/src/web/services/sessionRegistry/index.d.mts.map +1 -0
- package/dist/src/web/services/sessionRegistry/index.mjs +66 -0
- package/dist/src/web/services/sessionRegistry/index.mjs.map +1 -0
- package/dist/src/web/services/testing/channels.cjs +11 -0
- package/dist/src/web/services/testing/channels.cjs.map +1 -0
- package/dist/src/web/services/testing/channels.d.mts +8 -0
- package/dist/src/web/services/testing/channels.d.mts.map +1 -0
- package/dist/src/web/services/testing/channels.mjs +11 -0
- package/dist/src/web/services/testing/channels.mjs.map +1 -0
- package/dist/src/web/services/testing/index.cjs +27 -0
- package/dist/src/web/services/testing/index.cjs.map +1 -0
- package/dist/src/web/services/testing/index.d.mts +31 -0
- package/dist/src/web/services/testing/index.d.mts.map +1 -0
- package/dist/src/web/services/testing/index.mjs +27 -0
- package/dist/src/web/services/testing/index.mjs.map +1 -0
- package/dist/src/web/services/testing/rpcStub.cjs +58 -0
- package/dist/src/web/services/testing/rpcStub.cjs.map +1 -0
- package/dist/src/web/services/testing/rpcStub.d.mts +37 -0
- package/dist/src/web/services/testing/rpcStub.d.mts.map +1 -0
- package/dist/src/web/services/testing/rpcStub.mjs +58 -0
- package/dist/src/web/services/testing/rpcStub.mjs.map +1 -0
- package/dist/src/web/services/testing/slotProps.cjs +91 -0
- package/dist/src/web/services/testing/slotProps.cjs.map +1 -0
- package/dist/src/web/services/testing/slotProps.d.mts +69 -0
- package/dist/src/web/services/testing/slotProps.d.mts.map +1 -0
- package/dist/src/web/services/testing/slotProps.mjs +90 -0
- package/dist/src/web/services/testing/slotProps.mjs.map +1 -0
- package/dist/src/web/services/testing/templateRail.cjs +128 -0
- package/dist/src/web/services/testing/templateRail.cjs.map +1 -0
- package/dist/src/web/services/testing/templateRail.d.mts +31 -0
- package/dist/src/web/services/testing/templateRail.d.mts.map +1 -0
- package/dist/src/web/services/testing/templateRail.mjs +126 -0
- package/dist/src/web/services/testing/templateRail.mjs.map +1 -0
- package/dist/src/web/services/toolResult/index.cjs +30 -0
- package/dist/src/web/services/toolResult/index.cjs.map +1 -0
- package/dist/src/web/services/toolResult/index.d.mts +14 -0
- package/dist/src/web/services/toolResult/index.d.mts.map +1 -0
- package/dist/src/web/services/toolResult/index.mjs +29 -0
- package/dist/src/web/services/toolResult/index.mjs.map +1 -0
- package/dist/src/web/types/extensionFile.d.mts +59 -0
- package/dist/src/web/types/extensionFile.d.mts.map +1 -0
- package/dist/src/web/types/mcpWidget.d.mts +14 -0
- package/dist/src/web/types/mcpWidget.d.mts.map +1 -0
- package/dist/src/web/types/modelContext.d.mts +43 -0
- package/dist/src/web/types/modelContext.d.mts.map +1 -0
- package/dist/src/web/types/sessionRegistry.d.mts +43 -0
- package/dist/src/web/types/sessionRegistry.d.mts.map +1 -0
- package/dist/src/web/types/template.d.mts +155 -0
- package/dist/src/web/types/template.d.mts.map +1 -0
- package/dist/src/web/types/webPlugin.d.mts +896 -0
- package/dist/src/web/types/webPlugin.d.mts.map +1 -0
- package/dist/syncLocation.cjs +244 -0
- package/dist/syncLocation.cjs.map +1 -0
- package/dist/syncLocation.d.mts +37 -0
- package/dist/syncLocation.d.mts.map +1 -0
- package/dist/syncLocation.mjs +231 -0
- package/dist/syncLocation.mjs.map +1 -0
- package/dist/syncRegistration.cjs +171 -0
- package/dist/syncRegistration.cjs.map +1 -0
- package/dist/syncRegistration.d.mts +48 -0
- package/dist/syncRegistration.d.mts.map +1 -0
- package/dist/syncRegistration.mjs +159 -0
- package/dist/syncRegistration.mjs.map +1 -0
- package/dist/syncStateContract.cjs +19 -0
- package/dist/syncStateContract.cjs.map +1 -0
- package/dist/syncStateContract.d.mts +14 -0
- package/dist/syncStateContract.d.mts.map +1 -0
- package/dist/syncStateContract.mjs +16 -0
- package/dist/syncStateContract.mjs.map +1 -0
- package/dist/terminalPiChildSessionService.cjs +267 -0
- package/dist/terminalPiChildSessionService.cjs.map +1 -0
- package/dist/terminalPiChildSessionService.d.mts +42 -0
- package/dist/terminalPiChildSessionService.d.mts.map +1 -0
- package/dist/terminalPiChildSessionService.mjs +260 -0
- package/dist/terminalPiChildSessionService.mjs.map +1 -0
- package/dist/testing.cjs +11 -0
- package/dist/testing.d.mts +6 -0
- package/dist/testing.mjs +6 -0
- package/dist/toolInventory.cjs +136 -0
- package/dist/toolInventory.cjs.map +1 -0
- package/dist/toolInventory.d.mts +66 -0
- package/dist/toolInventory.d.mts.map +1 -0
- package/dist/toolInventory.mjs +133 -0
- package/dist/toolInventory.mjs.map +1 -0
- package/dist/toolNames.cjs +4 -0
- package/dist/toolNames.d.mts +2 -0
- package/dist/toolNames.mjs +2 -0
- package/dist/toolOverrides.cjs +7 -0
- package/dist/toolOverrides.d.mts +3 -0
- package/dist/toolOverrides.mjs +3 -0
- package/dist/toolSurface.cjs +7 -0
- package/dist/toolSurface.d.mts +3 -0
- package/dist/toolSurface.mjs +3 -0
- package/dist/transition.cjs +5 -0
- package/dist/transition.d.cjs +5 -0
- package/dist/transition.d.mts +2 -0
- package/dist/transition.mjs +2 -0
- package/dist/transitionClassifier.cjs +112 -0
- package/dist/transitionClassifier.cjs.map +1 -0
- package/dist/transitionClassifier.d.mts +18 -0
- package/dist/transitionClassifier.d.mts.map +1 -0
- package/dist/transitionClassifier.mjs +111 -0
- package/dist/transitionClassifier.mjs.map +1 -0
- package/dist/transitionCoordinator.cjs +131 -0
- package/dist/transitionCoordinator.cjs.map +1 -0
- package/dist/transitionCoordinator.d.mts +16 -0
- package/dist/transitionCoordinator.d.mts.map +1 -0
- package/dist/transitionCoordinator.mjs +130 -0
- package/dist/transitionCoordinator.mjs.map +1 -0
- package/dist/typesContextApi.cjs +0 -0
- package/dist/typesContextApi.d.mts +73 -0
- package/dist/typesContextApi.d.mts.map +1 -0
- package/dist/typesContextApi.mjs +1 -0
- package/dist/uiHub.cjs +5 -0
- package/dist/uiHub.d.mts +2 -0
- package/dist/uiHub.mjs +2 -0
- package/dist/v3Export.cjs +1004 -0
- package/dist/v3Export.cjs.map +1 -0
- package/dist/v3Export.d.mts +34 -0
- package/dist/v3Export.d.mts.map +1 -0
- package/dist/v3Export.mjs +1000 -0
- package/dist/v3Export.mjs.map +1 -0
- package/dist/voiceReloadHandoff.cjs +14 -0
- package/dist/voiceReloadHandoff.d.mts +4 -0
- package/dist/voiceReloadHandoff.mjs +4 -0
- package/dist/voiceTools.cjs +56 -0
- package/dist/voiceTools.d.mts +4 -0
- package/dist/voiceTools.mjs +4 -0
- package/dist/web.cjs +64 -0
- package/dist/web.d.mts +19 -0
- package/dist/web.mjs +13 -0
- package/dist/webCompositions.cjs +100 -0
- package/dist/webCompositions.cjs.map +1 -0
- package/dist/webCompositions.d.mts +20 -0
- package/dist/webCompositions.d.mts.map +1 -0
- package/dist/webCompositions.mjs +95 -0
- package/dist/webCompositions.mjs.map +1 -0
- package/dist/webTesting.cjs +14 -0
- package/dist/webTesting.d.mts +6 -0
- package/dist/webTesting.mjs +6 -0
- package/package.json +616 -0
|
@@ -0,0 +1,1989 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
2
|
+
import { Check } from "typebox/value";
|
|
3
|
+
import { PROTOCOL_VERSION } from "@earendil-works/pi-protocol";
|
|
4
|
+
import { defineService } from "@earendil-works/chord";
|
|
5
|
+
//#region src/schemas/apiContracts.ts
|
|
6
|
+
const DOOM_API_CONTRACT_VERSION = 1;
|
|
7
|
+
const DOOM_API_CONTRACT_FILE = "contracts.json";
|
|
8
|
+
const Schema = Type.Unsafe(Type.Union([Type.Boolean(), Type.Record(Type.String(), Type.Unknown())]));
|
|
9
|
+
const Scope = Type.Union([
|
|
10
|
+
Type.Literal("global"),
|
|
11
|
+
Type.Literal("workspace"),
|
|
12
|
+
Type.Literal("session")
|
|
13
|
+
]);
|
|
14
|
+
const Named = Type.String({ minLength: 1 });
|
|
15
|
+
const ResponseSchema = Type.Object({
|
|
16
|
+
description: Named,
|
|
17
|
+
contentType: Type.Optional(Named),
|
|
18
|
+
schema: Type.Optional(Schema),
|
|
19
|
+
events: Type.Optional(Type.Record(Named, Schema))
|
|
20
|
+
});
|
|
21
|
+
/** Data-only package entry. Schemas use JSON Schema draft-07, including TypeBox output; OpenAPI export translates tuple keywords. */
|
|
22
|
+
const DoomApiContractSchema = Type.Object({
|
|
23
|
+
version: Type.Literal(1),
|
|
24
|
+
protocols: Type.Optional(Type.Record(Named, Named)),
|
|
25
|
+
schemas: Type.Optional(Type.Record(Named, Schema)),
|
|
26
|
+
http: Type.Array(Type.Object({
|
|
27
|
+
id: Named,
|
|
28
|
+
scope: Scope,
|
|
29
|
+
/** Omit for host-owned absolute routes. */
|
|
30
|
+
basePath: Type.Optional(Type.String({ pattern: "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$" })),
|
|
31
|
+
path: Type.String({ pattern: "^/" }),
|
|
32
|
+
method: Type.Union([
|
|
33
|
+
Type.Literal("GET"),
|
|
34
|
+
Type.Literal("POST"),
|
|
35
|
+
Type.Literal("PUT"),
|
|
36
|
+
Type.Literal("PATCH"),
|
|
37
|
+
Type.Literal("DELETE"),
|
|
38
|
+
Type.Literal("HEAD"),
|
|
39
|
+
Type.Literal("OPTIONS")
|
|
40
|
+
]),
|
|
41
|
+
description: Named,
|
|
42
|
+
availability: Type.Optional(Named),
|
|
43
|
+
authentication: Type.Union([
|
|
44
|
+
Type.Literal("none"),
|
|
45
|
+
Type.Literal("owner"),
|
|
46
|
+
Type.Literal("device")
|
|
47
|
+
]),
|
|
48
|
+
parameters: Type.Optional(Type.Array(Type.Object({
|
|
49
|
+
name: Named,
|
|
50
|
+
in: Type.Union([
|
|
51
|
+
Type.Literal("path"),
|
|
52
|
+
Type.Literal("query"),
|
|
53
|
+
Type.Literal("header")
|
|
54
|
+
]),
|
|
55
|
+
required: Type.Boolean(),
|
|
56
|
+
schema: Schema
|
|
57
|
+
}))),
|
|
58
|
+
body: Type.Optional(Type.Object({
|
|
59
|
+
contentType: Named,
|
|
60
|
+
contentTypes: Type.Optional(Type.Array(Named, { minItems: 1 })),
|
|
61
|
+
required: Type.Boolean(),
|
|
62
|
+
schema: Schema
|
|
63
|
+
})),
|
|
64
|
+
responses: Type.Record(Type.String({ pattern: "^(?:[1-5][0-9]{2}|default)$" }), ResponseSchema, { minProperties: 1 })
|
|
65
|
+
})),
|
|
66
|
+
sockets: Type.Array(Type.Object({
|
|
67
|
+
id: Named,
|
|
68
|
+
scope: Scope,
|
|
69
|
+
description: Named,
|
|
70
|
+
availability: Type.Optional(Named),
|
|
71
|
+
service: Named,
|
|
72
|
+
member: Named,
|
|
73
|
+
direction: Type.Union([Type.Literal("client-to-server"), Type.Literal("server-to-client")]),
|
|
74
|
+
kind: Type.Union([
|
|
75
|
+
Type.Literal("method"),
|
|
76
|
+
Type.Literal("state"),
|
|
77
|
+
Type.Literal("channel")
|
|
78
|
+
]),
|
|
79
|
+
input: Schema,
|
|
80
|
+
output: Type.Optional(Schema),
|
|
81
|
+
errors: Type.Optional(Schema)
|
|
82
|
+
})),
|
|
83
|
+
/** Explicitly enumerate dynamic values whose shape is supplied at runtime. */
|
|
84
|
+
dynamic: Type.Array(Type.String({ minLength: 1 })),
|
|
85
|
+
gaps: Type.Optional(Type.Array(Named))
|
|
86
|
+
});
|
|
87
|
+
function defineApiContract(contract) {
|
|
88
|
+
return contract;
|
|
89
|
+
}
|
|
90
|
+
function parseApiContract(value) {
|
|
91
|
+
if (!Check(DoomApiContractSchema, value)) throw new Error("Invalid DoomPi API contract");
|
|
92
|
+
const contract = value;
|
|
93
|
+
const ids = /* @__PURE__ */ new Set();
|
|
94
|
+
for (const entry of [...contract.http, ...contract.sockets]) {
|
|
95
|
+
const key = `${entry.scope}:${entry.id}`;
|
|
96
|
+
if (ids.has(key)) throw new Error(`Duplicate API contract operation: ${key}`);
|
|
97
|
+
ids.add(key);
|
|
98
|
+
}
|
|
99
|
+
const visit = (item, ancestors) => {
|
|
100
|
+
if (item === null || typeof item === "string" || typeof item === "boolean") return;
|
|
101
|
+
if (typeof item === "number" && Number.isFinite(item)) return;
|
|
102
|
+
if (typeof item !== "object" || ancestors.has(item)) throw new Error("API contracts must contain finite JSON data");
|
|
103
|
+
ancestors.add(item);
|
|
104
|
+
for (const child of Object.values(item)) visit(child, ancestors);
|
|
105
|
+
ancestors.delete(item);
|
|
106
|
+
};
|
|
107
|
+
visit(contract, /* @__PURE__ */ new Set());
|
|
108
|
+
return contract;
|
|
109
|
+
}
|
|
110
|
+
function parseCompiledContracts(value) {
|
|
111
|
+
const PackageSchema = Type.Object({
|
|
112
|
+
packageName: Named,
|
|
113
|
+
packageVersion: Named,
|
|
114
|
+
scopes: Type.Array(Scope, { uniqueItems: true }),
|
|
115
|
+
owners: Type.Array(Type.Object({
|
|
116
|
+
majorMode: Named,
|
|
117
|
+
layer: Named
|
|
118
|
+
}), { minItems: 1 }),
|
|
119
|
+
contract: Type.Optional(DoomApiContractSchema),
|
|
120
|
+
problem: Type.Optional(Named),
|
|
121
|
+
module: Type.Optional(Type.String({ pattern: "^\\./[^\\\\%?#]+$" }))
|
|
122
|
+
});
|
|
123
|
+
const CompiledSchema = Type.Object({
|
|
124
|
+
version: Type.Literal(1),
|
|
125
|
+
generation: Named,
|
|
126
|
+
fingerprint: Type.String({ pattern: "^[a-f0-9]{64}$" }),
|
|
127
|
+
packages: Type.Array(PackageSchema)
|
|
128
|
+
});
|
|
129
|
+
if (!Check(CompiledSchema, value)) throw new Error("Invalid compiled API contracts");
|
|
130
|
+
const data = value;
|
|
131
|
+
const names = /* @__PURE__ */ new Set();
|
|
132
|
+
for (const entry of data.packages) {
|
|
133
|
+
if (names.has(entry.packageName) || entry.module?.split("/").includes("..")) throw new Error("Invalid compiled package contract");
|
|
134
|
+
names.add(entry.packageName);
|
|
135
|
+
if (entry.contract !== void 0) parseApiContract(entry.contract);
|
|
136
|
+
}
|
|
137
|
+
return data;
|
|
138
|
+
}
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region src/services/apiContracts/index.ts
|
|
141
|
+
/** Stable bytes for diffs and hashes, independent of object insertion order. */
|
|
142
|
+
function canonicalContractJson(value) {
|
|
143
|
+
const ordered = (item) => {
|
|
144
|
+
if (Array.isArray(item)) return item.map(ordered);
|
|
145
|
+
if (item !== null && typeof item === "object") return Object.fromEntries(Object.entries(item).sort(([a], [b]) => a.localeCompare(b, "en")).map(([key, child]) => [key, ordered(child)]));
|
|
146
|
+
return item;
|
|
147
|
+
};
|
|
148
|
+
return `${JSON.stringify(ordered(value), null, 2)}\n`;
|
|
149
|
+
}
|
|
150
|
+
const componentName = (value) => value.replace(/[^a-zA-Z0-9.-]/gu, (character) => `_${character.codePointAt(0).toString(16)}_`);
|
|
151
|
+
const pluginPrefix = (scope) => scope === "global" ? "/api/plugins" : scope === "workspace" ? "/api/workspaces/{workspaceId}/plugins" : "/api/workspaces/{workspaceId}/sessions/{sessionId}/plugins";
|
|
152
|
+
/** Compose declarations only. No handlers, lifecycle hooks, or platform resources are loaded. */
|
|
153
|
+
function createApiDocuments(selections) {
|
|
154
|
+
const paths = {};
|
|
155
|
+
const schemas = {};
|
|
156
|
+
const messages = {};
|
|
157
|
+
const operations = {};
|
|
158
|
+
const channelMessages = {
|
|
159
|
+
global: {},
|
|
160
|
+
workspace: {},
|
|
161
|
+
session: {}
|
|
162
|
+
};
|
|
163
|
+
const manifest = {
|
|
164
|
+
version: 1,
|
|
165
|
+
complete: true,
|
|
166
|
+
protocols: {},
|
|
167
|
+
selections: [],
|
|
168
|
+
packages: [],
|
|
169
|
+
gaps: [],
|
|
170
|
+
dynamic: []
|
|
171
|
+
};
|
|
172
|
+
const socketAddresses = /* @__PURE__ */ new Set();
|
|
173
|
+
const schema = (id, value) => {
|
|
174
|
+
const name = componentName(id);
|
|
175
|
+
if (schemas[name] !== void 0) throw new Error(`Conflicting schema: ${id}`);
|
|
176
|
+
const relocate = (child) => {
|
|
177
|
+
if (Array.isArray(child)) return child.map(relocate);
|
|
178
|
+
if (child === null || typeof child !== "object") return child;
|
|
179
|
+
return Object.fromEntries(Object.entries(child).map(([key, entry]) => {
|
|
180
|
+
if (key === "$id") throw new Error(`Schema ${id} must use local references, not $id`);
|
|
181
|
+
if (key === "$ref" && typeof entry === "string") {
|
|
182
|
+
if (!entry.startsWith("#/")) throw new Error(`Unresolved schema reference in ${id}: ${entry}`);
|
|
183
|
+
return [key, `#/components/schemas/${name}${entry.slice(1)}`];
|
|
184
|
+
}
|
|
185
|
+
return [key, relocate(entry)];
|
|
186
|
+
}));
|
|
187
|
+
};
|
|
188
|
+
schemas[name] = relocate(value);
|
|
189
|
+
return { $ref: `#/components/schemas/${name}` };
|
|
190
|
+
};
|
|
191
|
+
for (const selected of [...selections].sort((a, b) => a.scope.localeCompare(b.scope))) {
|
|
192
|
+
manifest.selections.push({
|
|
193
|
+
scope: selected.scope,
|
|
194
|
+
majorMode: selected.majorMode,
|
|
195
|
+
activeLayers: [...selected.activeLayers].sort(),
|
|
196
|
+
generation: selected.compiled.generation,
|
|
197
|
+
fingerprint: selected.compiled.fingerprint
|
|
198
|
+
});
|
|
199
|
+
for (const entry of [...selected.compiled.packages].sort((a, b) => a.packageName.localeCompare(b.packageName))) {
|
|
200
|
+
if (!entry.scopes.includes(selected.scope) || !entry.owners.some((owner) => owner.majorMode === selected.majorMode && (owner.layer === "default" || selected.activeLayers.includes(owner.layer)))) continue;
|
|
201
|
+
manifest.packages.push({
|
|
202
|
+
name: entry.packageName,
|
|
203
|
+
version: entry.packageVersion,
|
|
204
|
+
scope: selected.scope
|
|
205
|
+
});
|
|
206
|
+
if (!entry.contract || entry.problem) {
|
|
207
|
+
manifest.gaps.push({
|
|
208
|
+
packageName: entry.packageName,
|
|
209
|
+
scope: selected.scope,
|
|
210
|
+
reason: entry.problem ?? "No contract declaration"
|
|
211
|
+
});
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
const contract = parseApiContract(entry.contract);
|
|
215
|
+
for (const [name, value] of Object.entries(contract.schemas ?? {})) schema(`${entry.packageName}.${selected.scope}.${name}`, value);
|
|
216
|
+
for (const [name, version] of Object.entries(contract.protocols ?? {})) {
|
|
217
|
+
if (manifest.protocols[name] !== void 0 && manifest.protocols[name] !== version) throw new Error(`Conflicting ${name} protocol versions`);
|
|
218
|
+
manifest.protocols[name] = version;
|
|
219
|
+
}
|
|
220
|
+
manifest.gaps.push(...(contract.gaps ?? []).map((reason) => ({
|
|
221
|
+
packageName: entry.packageName,
|
|
222
|
+
scope: selected.scope,
|
|
223
|
+
reason
|
|
224
|
+
})));
|
|
225
|
+
manifest.dynamic.push(...contract.dynamic.map((value) => `${entry.packageName}: ${value}`));
|
|
226
|
+
for (const route of contract.http.filter((route) => route.scope === selected.scope)) {
|
|
227
|
+
const id = `${entry.packageName}.${route.scope}.${route.id}`;
|
|
228
|
+
const pathname = `${route.basePath === void 0 ? "" : route.basePath === "settings" ? `${route.scope === "global" ? "/api" : "/api/workspaces/{workspaceId}"}/settings` : `${pluginPrefix(route.scope)}/${route.basePath}`}${route.path === "/" ? "" : route.path}`;
|
|
229
|
+
const method = route.method.toLowerCase();
|
|
230
|
+
const path = paths[pathname] ??= {};
|
|
231
|
+
if (path[method]) throw new Error(`Conflicting HTTP contract: ${route.method} ${pathname}`);
|
|
232
|
+
const parameters = (route.parameters ?? []).map((parameter) => ({
|
|
233
|
+
...parameter,
|
|
234
|
+
schema: schema(`${id}.${parameter.in}.${parameter.name}`, parameter.schema)
|
|
235
|
+
}));
|
|
236
|
+
for (const match of pathname.matchAll(/\{([^}]+)\}/gu)) if (!parameters.some((parameter) => parameter.in === "path" && parameter.name === match[1])) parameters.push({
|
|
237
|
+
name: match[1],
|
|
238
|
+
in: "path",
|
|
239
|
+
required: true,
|
|
240
|
+
schema: schema(`${id}.path.${match[1]}`, {
|
|
241
|
+
type: "string",
|
|
242
|
+
minLength: 1
|
|
243
|
+
})
|
|
244
|
+
});
|
|
245
|
+
path[method] = {
|
|
246
|
+
operationId: componentName(id),
|
|
247
|
+
description: route.description,
|
|
248
|
+
parameters,
|
|
249
|
+
security: route.authentication === "none" ? [] : [{ [route.authentication]: [] }],
|
|
250
|
+
"x-doompi": {
|
|
251
|
+
packageName: entry.packageName,
|
|
252
|
+
scope: route.scope,
|
|
253
|
+
...route.availability ? { availability: route.availability } : {}
|
|
254
|
+
},
|
|
255
|
+
...route.body ? { requestBody: {
|
|
256
|
+
required: route.body.required,
|
|
257
|
+
content: Object.fromEntries((route.body.contentTypes ?? [route.body.contentType]).map((mediaType) => [mediaType, { schema: schema(`${id}.body.${mediaType}`, route.body.schema) }]))
|
|
258
|
+
} } : {},
|
|
259
|
+
responses: Object.fromEntries(Object.entries(route.responses).map(([status, response]) => [status, {
|
|
260
|
+
description: response.description,
|
|
261
|
+
...response.events ? { "x-sse-events": Object.fromEntries(Object.entries(response.events).map(([name, payload]) => [name, schema(`${id}.event.${name}`, payload)])) } : {},
|
|
262
|
+
...response.schema === void 0 ? {} : { content: { [response.contentType ?? "application/json"]: { schema: schema(`${id}.response.${status}`, response.schema) } } }
|
|
263
|
+
}]))
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
for (const socket of contract.sockets.filter((socket) => socket.scope === selected.scope)) {
|
|
267
|
+
const address = `${socket.scope}:${socket.direction}:${socket.kind}:${socket.service}:${socket.member}`;
|
|
268
|
+
if (socketAddresses.has(address)) throw new Error(`Conflicting socket contract: ${address}`);
|
|
269
|
+
socketAddresses.add(address);
|
|
270
|
+
for (const channel of socket.scope === "global" ? ["global"] : [socket.scope, "global"]) {
|
|
271
|
+
const id = componentName(`${entry.packageName}.${socket.scope}.${socket.id}${channel === socket.scope ? "" : ".aggregate"}`);
|
|
272
|
+
const addMessage = (suffix, payload) => {
|
|
273
|
+
const name = `${id}.${suffix}`;
|
|
274
|
+
messages[name] = {
|
|
275
|
+
name,
|
|
276
|
+
payload: schema(name, payload)
|
|
277
|
+
};
|
|
278
|
+
channelMessages[channel][name] = { $ref: `#/components/messages/${name}` };
|
|
279
|
+
return `#/channels/${channel}/messages/${name}`;
|
|
280
|
+
};
|
|
281
|
+
const request = addMessage("input", socket.input);
|
|
282
|
+
const replies = socket.output === void 0 ? [] : [{ $ref: addMessage("output", socket.output) }];
|
|
283
|
+
if (socket.errors !== void 0) replies.push({ $ref: addMessage("error", socket.errors) });
|
|
284
|
+
operations[id] = {
|
|
285
|
+
action: socket.direction === "client-to-server" ? "receive" : "send",
|
|
286
|
+
channel: { $ref: `#/channels/${channel}` },
|
|
287
|
+
messages: [{ $ref: request }],
|
|
288
|
+
description: socket.description,
|
|
289
|
+
...replies.length ? { reply: {
|
|
290
|
+
channel: { $ref: `#/channels/${channel}` },
|
|
291
|
+
messages: replies
|
|
292
|
+
} } : {},
|
|
293
|
+
"x-doompi": {
|
|
294
|
+
service: socket.service,
|
|
295
|
+
member: socket.member,
|
|
296
|
+
scope: socket.scope,
|
|
297
|
+
kind: socket.kind,
|
|
298
|
+
transportScope: channel,
|
|
299
|
+
...socket.availability ? { availability: socket.availability } : {}
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
manifest.complete = manifest.gaps.length === 0;
|
|
307
|
+
manifest.dynamic = [...new Set(manifest.dynamic)].sort();
|
|
308
|
+
const info = {
|
|
309
|
+
title: "DoomPi compiled client API",
|
|
310
|
+
version: "1"
|
|
311
|
+
};
|
|
312
|
+
const openapi = {
|
|
313
|
+
openapi: "3.1.1",
|
|
314
|
+
info,
|
|
315
|
+
paths,
|
|
316
|
+
components: {
|
|
317
|
+
schemas: openApiSchemas(schemas),
|
|
318
|
+
securitySchemes: {
|
|
319
|
+
owner: {
|
|
320
|
+
type: "apiKey",
|
|
321
|
+
in: "header",
|
|
322
|
+
name: "x-doompi-token"
|
|
323
|
+
},
|
|
324
|
+
device: {
|
|
325
|
+
type: "apiKey",
|
|
326
|
+
in: "cookie",
|
|
327
|
+
name: "__Host-doompi_device",
|
|
328
|
+
description: "Admitted device credentials and purpose-bound sealed channel; see remote authentication operations."
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
const asyncapi = {
|
|
334
|
+
asyncapi: "3.0.0",
|
|
335
|
+
info,
|
|
336
|
+
channels: Object.fromEntries(Object.entries(channelMessages).map(([scope, messages]) => [scope, {
|
|
337
|
+
address: scope === "global" ? "/api/ws" : scope === "workspace" ? "/api/workspaces/{workspaceId}/ws" : "/api/workspaces/{workspaceId}/sessions/{sessionId}/ws",
|
|
338
|
+
...scope === "global" ? {} : { parameters: {
|
|
339
|
+
workspaceId: { description: "Admitted workspace identity." },
|
|
340
|
+
...scope === "session" ? { sessionId: { description: "Session owned by this workspace." } } : {}
|
|
341
|
+
} },
|
|
342
|
+
messages,
|
|
343
|
+
description: "Decoded Pi/Chord values over framed CBOR. The global hub socket aggregates all scopes; workspace and session sockets restrict session access and package calls to their addressed scope. Remote paired-device sockets seal the same bytes."
|
|
344
|
+
}])),
|
|
345
|
+
operations,
|
|
346
|
+
components: {
|
|
347
|
+
schemas: asyncApiSchemas(schemas),
|
|
348
|
+
messages
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
for (const document of [openapi, asyncapi]) {
|
|
352
|
+
const visit = (value) => {
|
|
353
|
+
if (value === null || typeof value !== "object") return;
|
|
354
|
+
for (const [key, child] of Object.entries(value)) if (key === "$ref" && typeof child === "string") {
|
|
355
|
+
let target = document;
|
|
356
|
+
for (const segment of child.slice(2).split("/")) {
|
|
357
|
+
if (target === null || typeof target !== "object") throw new Error(`Unresolved API reference: ${child}`);
|
|
358
|
+
target = Reflect.get(target, segment.replace(/~1/gu, "/").replace(/~0/gu, "~"));
|
|
359
|
+
}
|
|
360
|
+
if (target === void 0) throw new Error(`Unresolved API reference: ${child}`);
|
|
361
|
+
} else visit(child);
|
|
362
|
+
};
|
|
363
|
+
visit(document);
|
|
364
|
+
}
|
|
365
|
+
return {
|
|
366
|
+
openapi,
|
|
367
|
+
asyncapi,
|
|
368
|
+
manifest
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
/** TypeBox uses draft-07 tuple keywords; OpenAPI 3.1 evaluates the 2020-12 vocabulary. */
|
|
372
|
+
function openApiSchemas(value) {
|
|
373
|
+
if (Array.isArray(value)) return value.map(openApiSchemas);
|
|
374
|
+
if (value === null || typeof value !== "object") return value;
|
|
375
|
+
const source = value;
|
|
376
|
+
const result = {};
|
|
377
|
+
for (const [key, child] of Object.entries(source)) if (key === "items" && Array.isArray(child)) {
|
|
378
|
+
if (child.length) result.prefixItems = child.map(openApiSchemas);
|
|
379
|
+
else {
|
|
380
|
+
result.items = false;
|
|
381
|
+
result.maxItems = 0;
|
|
382
|
+
}
|
|
383
|
+
} else if (key === "additionalItems" && Array.isArray(source.items)) result.items = openApiSchemas(child);
|
|
384
|
+
else if (key === "dependencies" && child !== null && typeof child === "object") {
|
|
385
|
+
const required = {};
|
|
386
|
+
const schemas = {};
|
|
387
|
+
for (const [name, dependency] of Object.entries(child)) if (Array.isArray(dependency)) required[name] = dependency;
|
|
388
|
+
else schemas[name] = openApiSchemas(dependency);
|
|
389
|
+
if (Object.keys(required).length) result.dependentRequired = required;
|
|
390
|
+
if (Object.keys(schemas).length) result.dependentSchemas = schemas;
|
|
391
|
+
} else if (key === "$schema") result.$schema = "https://json-schema.org/draft/2020-12/schema";
|
|
392
|
+
else result[key] = openApiSchemas(child);
|
|
393
|
+
return result;
|
|
394
|
+
}
|
|
395
|
+
function asyncApiSchemas(schemas) {
|
|
396
|
+
const convert = (value) => {
|
|
397
|
+
if (Array.isArray(value)) return value.map(convert);
|
|
398
|
+
if (value === null || typeof value !== "object") return value;
|
|
399
|
+
const result = {};
|
|
400
|
+
for (const [key, child] of Object.entries(value)) if (key === "$ref" && typeof child === "string") result[key] = child.replace(/^(#\/components\/schemas\/[^/]+)(.*)$/u, "$1/schema$2");
|
|
401
|
+
else if (key === "items" && Array.isArray(child) && child.length === 0) {
|
|
402
|
+
result.items = false;
|
|
403
|
+
result.maxItems = 0;
|
|
404
|
+
} else result[key] = convert(child);
|
|
405
|
+
return result;
|
|
406
|
+
};
|
|
407
|
+
return Object.fromEntries(Object.entries(schemas).map(([name, schema]) => [name, {
|
|
408
|
+
schemaFormat: "application/schema+json;version=draft-07",
|
|
409
|
+
schema: convert(schema)
|
|
410
|
+
}]));
|
|
411
|
+
}
|
|
412
|
+
//#endregion
|
|
413
|
+
//#region src/constants/contextApi.ts
|
|
414
|
+
/**
|
|
415
|
+
* What one entry in the composition actually is, for a reader who clicked it.
|
|
416
|
+
*
|
|
417
|
+
* The projection prices the composition and stops there: names, owners, and
|
|
418
|
+
* integer counts, small enough to republish whenever the composition changes.
|
|
419
|
+
* The prose and the schema behind a figure are an order of magnitude larger and
|
|
420
|
+
* are wanted one row at a time, so they travel on request instead. This module
|
|
421
|
+
* is the contract both ends of that request share, and it is deliberately free
|
|
422
|
+
* of Node imports so a browser can hold it too.
|
|
423
|
+
*/
|
|
424
|
+
/** Where a host mounts this package's API; the segment after /api/plugins/. */
|
|
425
|
+
const API_BASE_PATH = "context";
|
|
426
|
+
const ITEM_ROUTE = "/item";
|
|
427
|
+
//#endregion
|
|
428
|
+
//#region src/schemas/httpApiContracts.ts
|
|
429
|
+
const Text$2 = Type.String();
|
|
430
|
+
const Optional$2 = Type.Optional;
|
|
431
|
+
const Strings$1 = Type.Array(Text$2);
|
|
432
|
+
const Flag$2 = Type.Boolean();
|
|
433
|
+
const NumberValue$2 = Type.Number();
|
|
434
|
+
const ApiErrorSchema = Type.Object({
|
|
435
|
+
error: Text$2,
|
|
436
|
+
hash: Optional$2(Text$2)
|
|
437
|
+
});
|
|
438
|
+
const ApiOkSchema = Type.Object({ ok: Type.Literal(true) });
|
|
439
|
+
const Json$2 = Type.Unknown({ description: "Value whose schema is supplied by the selected runtime contribution." });
|
|
440
|
+
/** Common JSON response construction; status and payload remain explicit at the declaration. */
|
|
441
|
+
function jsonApiResponses(schema, status = 200) {
|
|
442
|
+
return {
|
|
443
|
+
[status]: {
|
|
444
|
+
description: "Successful response",
|
|
445
|
+
contentType: "application/json",
|
|
446
|
+
schema
|
|
447
|
+
},
|
|
448
|
+
"400": {
|
|
449
|
+
description: "Invalid request",
|
|
450
|
+
schema: ApiErrorSchema
|
|
451
|
+
},
|
|
452
|
+
"401": {
|
|
453
|
+
description: "Authentication required",
|
|
454
|
+
schema: ApiErrorSchema
|
|
455
|
+
},
|
|
456
|
+
"403": {
|
|
457
|
+
description: "Request is not authorized",
|
|
458
|
+
schema: ApiErrorSchema
|
|
459
|
+
},
|
|
460
|
+
"404": {
|
|
461
|
+
description: "Resource or capability unavailable",
|
|
462
|
+
schema: ApiErrorSchema
|
|
463
|
+
},
|
|
464
|
+
"409": {
|
|
465
|
+
description: "Conflicting state",
|
|
466
|
+
schema: ApiErrorSchema
|
|
467
|
+
},
|
|
468
|
+
"422": {
|
|
469
|
+
description: "Invalid operation",
|
|
470
|
+
schema: ApiErrorSchema
|
|
471
|
+
},
|
|
472
|
+
"500": {
|
|
473
|
+
description: "Host operation failed",
|
|
474
|
+
schema: ApiErrorSchema
|
|
475
|
+
},
|
|
476
|
+
"502": {
|
|
477
|
+
description: "Provider failed",
|
|
478
|
+
schema: ApiErrorSchema
|
|
479
|
+
},
|
|
480
|
+
"503": {
|
|
481
|
+
description: "Service unavailable",
|
|
482
|
+
schema: ApiErrorSchema
|
|
483
|
+
}
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
const WebCompositionSchema = Type.Object({
|
|
487
|
+
id: Text$2,
|
|
488
|
+
scope: Type.Union([
|
|
489
|
+
Type.Literal("global"),
|
|
490
|
+
Type.Literal("workspace"),
|
|
491
|
+
Type.Literal("session")
|
|
492
|
+
]),
|
|
493
|
+
revision: NumberValue$2,
|
|
494
|
+
manifestUrl: Text$2,
|
|
495
|
+
rawAssetBaseUrl: Text$2,
|
|
496
|
+
verifiedAssetBaseUrl: Text$2,
|
|
497
|
+
entryPath: Text$2,
|
|
498
|
+
stylePaths: Strings$1,
|
|
499
|
+
channels: Strings$1
|
|
500
|
+
});
|
|
501
|
+
const SessionSummarySchema = Type.Object({
|
|
502
|
+
id: Text$2,
|
|
503
|
+
workspaceId: Optional$2(Text$2),
|
|
504
|
+
webComposition: Optional$2(WebCompositionSchema),
|
|
505
|
+
name: Text$2,
|
|
506
|
+
cwd: Text$2,
|
|
507
|
+
createdAt: Text$2,
|
|
508
|
+
updatedAt: Text$2,
|
|
509
|
+
phase: Type.Union([
|
|
510
|
+
Type.Literal("idle"),
|
|
511
|
+
Type.Literal("turn"),
|
|
512
|
+
Type.Literal("compaction"),
|
|
513
|
+
Type.Literal("retry")
|
|
514
|
+
]),
|
|
515
|
+
phaseSince: Text$2,
|
|
516
|
+
attach: Type.Literal("attached"),
|
|
517
|
+
pendingMessageCount: NumberValue$2,
|
|
518
|
+
everPrompted: Flag$2,
|
|
519
|
+
awaitingInput: Flag$2,
|
|
520
|
+
lastSettledAt: Optional$2(Text$2),
|
|
521
|
+
git: Optional$2(Type.Object({
|
|
522
|
+
branch: Text$2,
|
|
523
|
+
dirty: Flag$2
|
|
524
|
+
})),
|
|
525
|
+
profile: Optional$2(Type.Object({
|
|
526
|
+
name: Text$2,
|
|
527
|
+
displayName: Optional$2(Text$2),
|
|
528
|
+
iconVersion: Optional$2(Text$2)
|
|
529
|
+
})),
|
|
530
|
+
parentSessionId: Optional$2(Text$2),
|
|
531
|
+
sessionProvenance: Optional$2(Text$2),
|
|
532
|
+
pendingSetups: Optional$2(Type.Array(Type.Object({
|
|
533
|
+
id: Text$2,
|
|
534
|
+
name: Text$2,
|
|
535
|
+
createdAt: Text$2,
|
|
536
|
+
cwd: Optional$2(Text$2),
|
|
537
|
+
setupKind: Optional$2(Type.Union([Type.Literal("managed-worktree"), Type.Literal("existing-directory")])),
|
|
538
|
+
status: Optional$2(Type.Union([
|
|
539
|
+
Type.Literal("provisioning"),
|
|
540
|
+
Type.Literal("failed"),
|
|
541
|
+
Type.Literal("interrupted")
|
|
542
|
+
])),
|
|
543
|
+
errorCode: Optional$2(Type.Union([Type.Literal("SESSION_WORKTREE_PROVISION_FAILED"), Type.Literal("SESSION_UNAVAILABLE")]))
|
|
544
|
+
}))),
|
|
545
|
+
/** Present and true for a recorded session the server has not reopened yet. */
|
|
546
|
+
dormant: Optional$2(Flag$2)
|
|
547
|
+
});
|
|
548
|
+
const HubSnapshotFrameSchema = Type.Object({
|
|
549
|
+
type: Type.Literal("sessions_snapshot"),
|
|
550
|
+
sessions: Type.Array(SessionSummarySchema)
|
|
551
|
+
});
|
|
552
|
+
const HubUpsertFrameSchema = Type.Object({
|
|
553
|
+
type: Type.Literal("session_upsert"),
|
|
554
|
+
session: SessionSummarySchema
|
|
555
|
+
});
|
|
556
|
+
const HubRemovedFrameSchema = Type.Object({
|
|
557
|
+
type: Type.Literal("session_removed"),
|
|
558
|
+
sessionId: Text$2
|
|
559
|
+
});
|
|
560
|
+
const Workspace = Type.Object({
|
|
561
|
+
id: Text$2,
|
|
562
|
+
root: Text$2,
|
|
563
|
+
name: Optional$2(Text$2),
|
|
564
|
+
available: Optional$2(Flag$2)
|
|
565
|
+
});
|
|
566
|
+
const WorkspaceSnapshotFrameSchema = Type.Object({
|
|
567
|
+
type: Type.Literal("workspaces_snapshot"),
|
|
568
|
+
workspaces: Type.Array(Workspace)
|
|
569
|
+
});
|
|
570
|
+
const WorkspaceUpsertFrameSchema = Type.Object({
|
|
571
|
+
type: Type.Literal("workspace_upsert"),
|
|
572
|
+
workspace: Workspace
|
|
573
|
+
});
|
|
574
|
+
const WorkspaceRemovedFrameSchema = Type.Object({
|
|
575
|
+
type: Type.Literal("workspace_removed"),
|
|
576
|
+
workspaceId: Text$2
|
|
577
|
+
});
|
|
578
|
+
const SavedSession = Type.Object({
|
|
579
|
+
id: Text$2,
|
|
580
|
+
name: Optional$2(Text$2),
|
|
581
|
+
firstMessage: Text$2,
|
|
582
|
+
createdAt: Text$2,
|
|
583
|
+
updatedAt: Text$2,
|
|
584
|
+
messageCount: NumberValue$2
|
|
585
|
+
});
|
|
586
|
+
const query = (name, schema = Text$2, required = false) => ({
|
|
587
|
+
name,
|
|
588
|
+
in: "query",
|
|
589
|
+
required,
|
|
590
|
+
schema
|
|
591
|
+
});
|
|
592
|
+
const body = (schema) => ({
|
|
593
|
+
contentType: "application/json",
|
|
594
|
+
required: true,
|
|
595
|
+
schema
|
|
596
|
+
});
|
|
597
|
+
const host = (id, path, method, result, extra = {}) => ({
|
|
598
|
+
id,
|
|
599
|
+
path,
|
|
600
|
+
method,
|
|
601
|
+
scope: "global",
|
|
602
|
+
authentication: "owner",
|
|
603
|
+
description: id,
|
|
604
|
+
responses: jsonApiResponses(result),
|
|
605
|
+
...extra
|
|
606
|
+
});
|
|
607
|
+
const Binary = Type.String({ contentEncoding: "binary" });
|
|
608
|
+
const headlessHttpContracts = [
|
|
609
|
+
host("health", "/api/health", "GET", Type.Object({
|
|
610
|
+
ok: Type.Literal(true),
|
|
611
|
+
role: Type.Literal("hub"),
|
|
612
|
+
protocol: Type.Literal(1),
|
|
613
|
+
sessions: NumberValue$2
|
|
614
|
+
}), { authentication: "none" }),
|
|
615
|
+
host("telemetry.browser", "/api/telemetry/browser", "POST", ApiOkSchema, { body: body(Type.Object({
|
|
616
|
+
v: Type.Literal(1),
|
|
617
|
+
events: Type.Array(Type.Object({
|
|
618
|
+
name: Type.String({ pattern: "^web\\.browser\\.[a-z_]{1,40}$" }),
|
|
619
|
+
duration_ms: Optional$2(NumberValue$2),
|
|
620
|
+
count: Optional$2(NumberValue$2)
|
|
621
|
+
}), { maxItems: 10 })
|
|
622
|
+
})) }),
|
|
623
|
+
host("compositions", "/api/compositions", "GET", Type.Object({
|
|
624
|
+
global: Optional$2(WebCompositionSchema),
|
|
625
|
+
publicKey: Optional$2(Text$2),
|
|
626
|
+
shell: Optional$2(Type.Object({
|
|
627
|
+
publicKey: Text$2,
|
|
628
|
+
revision: NumberValue$2
|
|
629
|
+
})),
|
|
630
|
+
workspaces: Type.Array(Type.Object({
|
|
631
|
+
id: Text$2,
|
|
632
|
+
root: Text$2,
|
|
633
|
+
webComposition: Optional$2(WebCompositionSchema)
|
|
634
|
+
}))
|
|
635
|
+
})),
|
|
636
|
+
host("directories", "/api/directories", "GET", Type.Object({ directories: Strings$1 }), { parameters: [query("q")] }),
|
|
637
|
+
host("directories.children", "/api/directories/children", "GET", Type.Object({
|
|
638
|
+
path: Text$2,
|
|
639
|
+
parent: Optional$2(Text$2),
|
|
640
|
+
directories: Strings$1
|
|
641
|
+
}), { parameters: [query("path")] }),
|
|
642
|
+
host("sessions.list", "/api/workspaces/{workspaceId}/sessions", "GET", Type.Object({ sessions: Type.Array(SessionSummarySchema) })),
|
|
643
|
+
host("sessions.create", "/api/workspaces/{workspaceId}/sessions", "POST", Type.Object({ sessionId: Text$2 }), {
|
|
644
|
+
body: body(Type.Object({ name: Optional$2(Text$2) })),
|
|
645
|
+
responses: jsonApiResponses(Type.Object({ sessionId: Text$2 }), 201)
|
|
646
|
+
}),
|
|
647
|
+
host("sessions.get", "/api/workspaces/{workspaceId}/sessions/{sessionId}", "GET", SessionSummarySchema),
|
|
648
|
+
host("sessions.delete", "/api/workspaces/{workspaceId}/sessions/{sessionId}", "DELETE", ApiOkSchema),
|
|
649
|
+
host("sessions.history", "/api/workspaces/{workspaceId}/sessions/{sessionId}/history", "GET", Type.Object({ sessions: Type.Array(SavedSession) }), { availability: "Host provides sessionHistory" }),
|
|
650
|
+
host("sessions.restart", "/api/workspaces/{workspaceId}/sessions/{sessionId}/restart", "POST", ApiOkSchema, { availability: "Host provides restartSession" }),
|
|
651
|
+
host("sessions.revive", "/api/workspaces/{workspaceId}/sessions/{sessionId}/revive", "POST", ApiOkSchema, { availability: "Host provides reviveSession" }),
|
|
652
|
+
host("sessions.resume", "/api/workspaces/{workspaceId}/sessions/{sessionId}/resume", "POST", Type.Object({ sessionId: Text$2 }), {
|
|
653
|
+
availability: "Host provides resumeSession",
|
|
654
|
+
body: body(Type.Object({ targetSessionId: Type.String({ pattern: "^[A-Za-z0-9_-]+$" }) }))
|
|
655
|
+
}),
|
|
656
|
+
host("sessions.file", "/api/workspaces/{workspaceId}/sessions/{sessionId}/file", "GET", Binary, {
|
|
657
|
+
parameters: [query("path", Text$2, true)],
|
|
658
|
+
responses: {
|
|
659
|
+
...jsonApiResponses(Binary),
|
|
660
|
+
"200": {
|
|
661
|
+
description: "File bytes, MIME type follows the file extension",
|
|
662
|
+
contentType: "*/*",
|
|
663
|
+
schema: Binary
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
}),
|
|
667
|
+
host("sessions.channels", "/api/workspaces/{workspaceId}/sessions/{sessionId}/channels", "GET", Type.Object({ channels: Type.Array(Type.Object({
|
|
668
|
+
type: Text$2,
|
|
669
|
+
sessionId: Text$2,
|
|
670
|
+
payload: Json$2
|
|
671
|
+
})) })),
|
|
672
|
+
host("sessions.channel.send", "/api/workspaces/{workspaceId}/sessions/{sessionId}/channel/{frameType}", "POST", ApiOkSchema, {
|
|
673
|
+
body: body(Json$2),
|
|
674
|
+
responses: jsonApiResponses(ApiOkSchema, 202),
|
|
675
|
+
description: "Deliver a payload to the selected channel contract identified by frameType."
|
|
676
|
+
}),
|
|
677
|
+
host("workspaces.list", "/api/workspaces", "GET", Type.Object({ workspaces: Type.Array(Workspace) })),
|
|
678
|
+
host("workspaces.admit", "/api/workspaces", "POST", Type.Object({ workspace: Workspace }), {
|
|
679
|
+
body: body(Type.Object({
|
|
680
|
+
root: Optional$2(Text$2),
|
|
681
|
+
name: Optional$2(Text$2)
|
|
682
|
+
})),
|
|
683
|
+
responses: jsonApiResponses(Type.Object({ workspace: Workspace }), 201)
|
|
684
|
+
}),
|
|
685
|
+
host("workspaces.get", "/api/workspaces/{workspaceId}", "GET", Type.Object({ workspace: Workspace })),
|
|
686
|
+
host("workspaces.history", "/api/workspaces/{workspaceId}/history", "GET", Type.Object({ sessions: Type.Array(SavedSession) }), { availability: "Host provides workspaceHistory" }),
|
|
687
|
+
host("workspaces.resume", "/api/workspaces/{workspaceId}/resume", "POST", Type.Object({ sessionId: Text$2 }), {
|
|
688
|
+
availability: "Host provides resumeWorkspaceSession",
|
|
689
|
+
body: body(Type.Object({ targetSessionId: Type.String({ pattern: "^[A-Za-z0-9_-]+$" }) }))
|
|
690
|
+
}),
|
|
691
|
+
host("workspaces.remove", "/api/workspaces/{workspaceId}", "DELETE", ApiOkSchema),
|
|
692
|
+
host("events", "/api/events", "GET", Text$2, { responses: {
|
|
693
|
+
"200": {
|
|
694
|
+
description: "SSE session and workspace snapshots, membership changes, and selected channel frames. Selected extension channel payloads are defined by the corresponding AsyncAPI channel operations.",
|
|
695
|
+
events: {
|
|
696
|
+
sessions_snapshot: HubSnapshotFrameSchema,
|
|
697
|
+
session_upsert: HubUpsertFrameSchema,
|
|
698
|
+
session_removed: HubRemovedFrameSchema,
|
|
699
|
+
workspaces_snapshot: WorkspaceSnapshotFrameSchema,
|
|
700
|
+
workspace_upsert: WorkspaceUpsertFrameSchema,
|
|
701
|
+
workspace_removed: WorkspaceRemovedFrameSchema
|
|
702
|
+
},
|
|
703
|
+
contentType: "text/event-stream",
|
|
704
|
+
schema: Text$2
|
|
705
|
+
},
|
|
706
|
+
"401": {
|
|
707
|
+
description: "Authentication required",
|
|
708
|
+
schema: ApiErrorSchema
|
|
709
|
+
}
|
|
710
|
+
} })
|
|
711
|
+
];
|
|
712
|
+
const AuthType = Type.Union([Type.Literal("api_key"), Type.Literal("oauth")]);
|
|
713
|
+
const Provider = Type.Object({
|
|
714
|
+
id: Text$2,
|
|
715
|
+
name: Text$2,
|
|
716
|
+
methods: Type.Array(Type.Object({
|
|
717
|
+
type: AuthType,
|
|
718
|
+
label: Text$2
|
|
719
|
+
})),
|
|
720
|
+
authenticated: Optional$2(Type.Object({
|
|
721
|
+
type: AuthType,
|
|
722
|
+
source: Optional$2(Text$2)
|
|
723
|
+
}))
|
|
724
|
+
});
|
|
725
|
+
const LoginEvent = Type.Union([
|
|
726
|
+
Type.Object({
|
|
727
|
+
type: Type.Literal("info"),
|
|
728
|
+
message: Text$2,
|
|
729
|
+
links: Optional$2(Type.Array(Type.Object({
|
|
730
|
+
url: Text$2,
|
|
731
|
+
label: Optional$2(Text$2)
|
|
732
|
+
})))
|
|
733
|
+
}),
|
|
734
|
+
Type.Object({
|
|
735
|
+
type: Type.Literal("auth_url"),
|
|
736
|
+
url: Text$2,
|
|
737
|
+
instructions: Optional$2(Text$2)
|
|
738
|
+
}),
|
|
739
|
+
Type.Object({
|
|
740
|
+
type: Type.Literal("device_code"),
|
|
741
|
+
userCode: Text$2,
|
|
742
|
+
verificationUri: Text$2,
|
|
743
|
+
intervalSeconds: Optional$2(NumberValue$2),
|
|
744
|
+
expiresInSeconds: Optional$2(NumberValue$2)
|
|
745
|
+
}),
|
|
746
|
+
Type.Object({
|
|
747
|
+
type: Type.Literal("progress"),
|
|
748
|
+
message: Text$2
|
|
749
|
+
})
|
|
750
|
+
]);
|
|
751
|
+
const LoginFlowSchema = Type.Object({
|
|
752
|
+
id: Text$2,
|
|
753
|
+
providerId: Text$2,
|
|
754
|
+
providerName: Text$2,
|
|
755
|
+
type: AuthType,
|
|
756
|
+
status: Type.Union([
|
|
757
|
+
Type.Literal("running"),
|
|
758
|
+
Type.Literal("succeeded"),
|
|
759
|
+
Type.Literal("failed"),
|
|
760
|
+
Type.Literal("cancelled")
|
|
761
|
+
]),
|
|
762
|
+
events: Type.Array(LoginEvent),
|
|
763
|
+
prompt: Optional$2(Type.Object({
|
|
764
|
+
id: Text$2,
|
|
765
|
+
type: Type.Union([
|
|
766
|
+
Type.Literal("text"),
|
|
767
|
+
Type.Literal("secret"),
|
|
768
|
+
Type.Literal("select"),
|
|
769
|
+
Type.Literal("manual_code")
|
|
770
|
+
]),
|
|
771
|
+
message: Text$2,
|
|
772
|
+
placeholder: Optional$2(Text$2),
|
|
773
|
+
options: Optional$2(Type.Array(Type.Object({
|
|
774
|
+
id: Text$2,
|
|
775
|
+
label: Text$2,
|
|
776
|
+
description: Optional$2(Text$2)
|
|
777
|
+
})))
|
|
778
|
+
})),
|
|
779
|
+
remote: Optional$2(Flag$2),
|
|
780
|
+
error: Optional$2(Text$2)
|
|
781
|
+
});
|
|
782
|
+
const Flow = Type.Object({ flow: LoginFlowSchema });
|
|
783
|
+
const machineHttpContracts = [
|
|
784
|
+
host("providers.list", "/providers", "GET", Type.Object({ providers: Type.Array(Provider) })),
|
|
785
|
+
host("models.list", "/models", "GET", Type.Object({ models: Type.Array(Type.Object({
|
|
786
|
+
value: Text$2,
|
|
787
|
+
label: Text$2,
|
|
788
|
+
group: Text$2
|
|
789
|
+
})) })),
|
|
790
|
+
host("providers.logout", "/providers/{providerId}", "DELETE", ApiOkSchema),
|
|
791
|
+
host("logins.create", "/logins", "POST", Flow, {
|
|
792
|
+
body: body(Type.Object({
|
|
793
|
+
providerId: Text$2,
|
|
794
|
+
type: AuthType
|
|
795
|
+
})),
|
|
796
|
+
responses: jsonApiResponses(Flow, 201)
|
|
797
|
+
}),
|
|
798
|
+
host("logins.get", "/logins/{flowId}", "GET", Flow),
|
|
799
|
+
host("logins.cancel", "/logins/{flowId}", "DELETE", Flow),
|
|
800
|
+
host("logins.answer", "/logins/{flowId}/answer", "POST", Flow, { body: body(Type.Object({
|
|
801
|
+
promptId: Text$2,
|
|
802
|
+
value: Text$2
|
|
803
|
+
})) })
|
|
804
|
+
].map((route) => ({
|
|
805
|
+
...route,
|
|
806
|
+
basePath: "doompi"
|
|
807
|
+
}));
|
|
808
|
+
const Source = Type.Union([
|
|
809
|
+
Type.Literal("extension"),
|
|
810
|
+
Type.Literal("mcp"),
|
|
811
|
+
Type.Literal("plugin"),
|
|
812
|
+
Type.Literal("core")
|
|
813
|
+
]);
|
|
814
|
+
const Detail = Type.Union([
|
|
815
|
+
Type.Object({
|
|
816
|
+
itemKind: Type.Literal("tool"),
|
|
817
|
+
name: Text$2,
|
|
818
|
+
owner: Text$2,
|
|
819
|
+
source: Source,
|
|
820
|
+
active: Flag$2,
|
|
821
|
+
tokens: Type.Object({
|
|
822
|
+
schemaTokens: NumberValue$2,
|
|
823
|
+
promptTokens: NumberValue$2,
|
|
824
|
+
totalTokens: NumberValue$2
|
|
825
|
+
}),
|
|
826
|
+
description: Optional$2(Text$2),
|
|
827
|
+
promptSnippet: Optional$2(Text$2),
|
|
828
|
+
promptGuidelines: Optional$2(Strings$1),
|
|
829
|
+
parameters: Optional$2(Json$2)
|
|
830
|
+
}),
|
|
831
|
+
Type.Object({
|
|
832
|
+
itemKind: Type.Literal("skill"),
|
|
833
|
+
name: Text$2,
|
|
834
|
+
owner: Text$2,
|
|
835
|
+
source: Source,
|
|
836
|
+
active: Type.Literal(true),
|
|
837
|
+
tokens: NumberValue$2,
|
|
838
|
+
description: Text$2,
|
|
839
|
+
filePath: Optional$2(Text$2),
|
|
840
|
+
modelInvocable: Flag$2
|
|
841
|
+
}),
|
|
842
|
+
Type.Object({
|
|
843
|
+
itemKind: Type.Literal("prompt"),
|
|
844
|
+
name: Type.Literal("system"),
|
|
845
|
+
tokens: NumberValue$2,
|
|
846
|
+
stage: Type.Union([Type.Literal("base"), Type.Literal("effective")]),
|
|
847
|
+
text: Text$2
|
|
848
|
+
})
|
|
849
|
+
]);
|
|
850
|
+
const sessionHttpContracts = [{
|
|
851
|
+
...host("context.item", ITEM_ROUTE, "GET", Type.Object({
|
|
852
|
+
revision: NumberValue$2,
|
|
853
|
+
item: Detail
|
|
854
|
+
}), { parameters: [query("kind", Type.Union([
|
|
855
|
+
Type.Literal("tool"),
|
|
856
|
+
Type.Literal("skill"),
|
|
857
|
+
Type.Literal("prompt")
|
|
858
|
+
]), true), query("name", Text$2, true)] }),
|
|
859
|
+
scope: "session",
|
|
860
|
+
basePath: API_BASE_PATH
|
|
861
|
+
}, {
|
|
862
|
+
...host("files.complete", "/", "GET", Type.Object({ files: Strings$1 }), { parameters: [query("q", Type.String({ maxLength: 256 }))] }),
|
|
863
|
+
scope: "session",
|
|
864
|
+
basePath: "files"
|
|
865
|
+
}];
|
|
866
|
+
//#endregion
|
|
867
|
+
//#region src/schemas/remoteApiContracts.ts
|
|
868
|
+
const Text$1 = Type.String();
|
|
869
|
+
const NumberValue$1 = Type.Number();
|
|
870
|
+
const Optional$1 = Type.Optional;
|
|
871
|
+
const Flag$1 = Type.Boolean();
|
|
872
|
+
const JsonObject = Type.Record(Text$1, Type.Unknown({ description: "WebAuthn ceremony fields supplied and verified by the installed WebAuthn implementation." }));
|
|
873
|
+
const Tunnel = Type.Union([Type.Object({ kind: Type.Literal("quick") }), Type.Object({
|
|
874
|
+
kind: Type.Literal("named"),
|
|
875
|
+
hostname: Text$1,
|
|
876
|
+
name: Optional$1(Text$1),
|
|
877
|
+
tokenFile: Optional$1(Text$1),
|
|
878
|
+
configFile: Optional$1(Text$1)
|
|
879
|
+
})]);
|
|
880
|
+
const Settings = Type.Object({
|
|
881
|
+
autoCloseEnabled: Flag$1,
|
|
882
|
+
autoCloseMinutes: NumberValue$1,
|
|
883
|
+
sessionExpiryEnabled: Flag$1,
|
|
884
|
+
idleMinutes: NumberValue$1,
|
|
885
|
+
absoluteHours: NumberValue$1,
|
|
886
|
+
tunnel: Tunnel,
|
|
887
|
+
sandbox: Type.Object({
|
|
888
|
+
enabled: Flag$1,
|
|
889
|
+
workspaces: Type.Array(Text$1)
|
|
890
|
+
})
|
|
891
|
+
});
|
|
892
|
+
const State = Type.Object({
|
|
893
|
+
status: Type.Union([
|
|
894
|
+
Type.Literal("off"),
|
|
895
|
+
Type.Literal("starting"),
|
|
896
|
+
Type.Literal("on"),
|
|
897
|
+
Type.Literal("failed")
|
|
898
|
+
]),
|
|
899
|
+
publicUrl: Optional$1(Text$1),
|
|
900
|
+
startedAt: Optional$1(Text$1),
|
|
901
|
+
closesAt: Optional$1(Text$1),
|
|
902
|
+
error: Optional$1(Text$1),
|
|
903
|
+
devices: Type.Array(Type.Object({
|
|
904
|
+
id: Text$1,
|
|
905
|
+
label: Text$1,
|
|
906
|
+
userAgent: Text$1,
|
|
907
|
+
createdAt: Text$1,
|
|
908
|
+
lastSeenAt: Text$1,
|
|
909
|
+
self: Flag$1
|
|
910
|
+
})),
|
|
911
|
+
pending: Type.Array(Type.Object({
|
|
912
|
+
id: Text$1,
|
|
913
|
+
userAgent: Text$1,
|
|
914
|
+
edgeIp: Text$1,
|
|
915
|
+
createdAt: Text$1,
|
|
916
|
+
expiresAt: Text$1
|
|
917
|
+
})),
|
|
918
|
+
settings: Settings
|
|
919
|
+
});
|
|
920
|
+
const StateResponse = Type.Object({
|
|
921
|
+
state: State,
|
|
922
|
+
handingOver: Optional$1(Flag$1)
|
|
923
|
+
});
|
|
924
|
+
const Trust = Type.Object({
|
|
925
|
+
publicKey: Text$1,
|
|
926
|
+
fingerprint: Text$1,
|
|
927
|
+
revision: NumberValue$1
|
|
928
|
+
});
|
|
929
|
+
const Begun = Type.Object({
|
|
930
|
+
ceremonyId: Text$1,
|
|
931
|
+
options: JsonObject
|
|
932
|
+
});
|
|
933
|
+
const Finish = Type.Object({
|
|
934
|
+
ceremonyId: Text$1,
|
|
935
|
+
response: JsonObject
|
|
936
|
+
});
|
|
937
|
+
const SealedEnvelopeSchema = Type.Object({
|
|
938
|
+
v: Type.Literal(1),
|
|
939
|
+
n: Text$1,
|
|
940
|
+
c: Text$1
|
|
941
|
+
});
|
|
942
|
+
const SealedHttpRequestSchema = Type.Object({
|
|
943
|
+
v: Type.Literal(1),
|
|
944
|
+
method: Text$1,
|
|
945
|
+
target: Text$1,
|
|
946
|
+
headers: Type.Array(Type.Tuple([Text$1, Text$1])),
|
|
947
|
+
body: Optional$1(Text$1)
|
|
948
|
+
});
|
|
949
|
+
const SealedHttpResponseSchema = Type.Object({
|
|
950
|
+
v: Type.Literal(1),
|
|
951
|
+
status: NumberValue$1,
|
|
952
|
+
headers: Type.Array(Type.Tuple([Text$1, Text$1])),
|
|
953
|
+
body: Text$1
|
|
954
|
+
});
|
|
955
|
+
const route = (id, path, method, result, input, extra = {}) => ({
|
|
956
|
+
id: `remote.${id}`,
|
|
957
|
+
path: `/api/remote${path}`,
|
|
958
|
+
method,
|
|
959
|
+
scope: "global",
|
|
960
|
+
authentication: "owner",
|
|
961
|
+
description: `Remote Control ${id}.`,
|
|
962
|
+
availability: "Global host provides Remote Control. Tunnel routes additionally enforce device, origin and step-up policy.",
|
|
963
|
+
responses: {
|
|
964
|
+
...jsonApiResponses(result),
|
|
965
|
+
"429": {
|
|
966
|
+
description: "Rate limit exceeded",
|
|
967
|
+
schema: ApiErrorSchema
|
|
968
|
+
}
|
|
969
|
+
},
|
|
970
|
+
...input ? { body: {
|
|
971
|
+
contentType: "application/json",
|
|
972
|
+
required: true,
|
|
973
|
+
schema: input
|
|
974
|
+
} } : {},
|
|
975
|
+
...extra
|
|
976
|
+
});
|
|
977
|
+
const direct = [
|
|
978
|
+
route("state", "", "GET", StateResponse),
|
|
979
|
+
route("enable", "/enable", "POST", StateResponse, void 0, { responses: {
|
|
980
|
+
...jsonApiResponses(StateResponse),
|
|
981
|
+
"202": {
|
|
982
|
+
description: "Container handover started",
|
|
983
|
+
schema: StateResponse
|
|
984
|
+
}
|
|
985
|
+
} }),
|
|
986
|
+
route("disable", "/disable", "POST", StateResponse, void 0, { responses: {
|
|
987
|
+
...jsonApiResponses(StateResponse),
|
|
988
|
+
"202": {
|
|
989
|
+
description: "Tunnel closing",
|
|
990
|
+
schema: Type.Object({ status: Type.Literal("closing") })
|
|
991
|
+
}
|
|
992
|
+
} }),
|
|
993
|
+
route("codes", "/codes", "POST", Type.Object({
|
|
994
|
+
...Trust.properties,
|
|
995
|
+
code: Text$1,
|
|
996
|
+
manualCode: Text$1,
|
|
997
|
+
pairUrl: Text$1,
|
|
998
|
+
expiresAt: Text$1
|
|
999
|
+
}), void 0, { responses: jsonApiResponses(Type.Object({
|
|
1000
|
+
...Trust.properties,
|
|
1001
|
+
code: Text$1,
|
|
1002
|
+
manualCode: Text$1,
|
|
1003
|
+
pairUrl: Text$1,
|
|
1004
|
+
expiresAt: Text$1
|
|
1005
|
+
}), 201) }),
|
|
1006
|
+
route("approve", "/pairing/{id}/approve", "POST", StateResponse),
|
|
1007
|
+
route("deny", "/pairing/{id}/deny", "POST", StateResponse),
|
|
1008
|
+
route("revoke", "/devices/{id}", "DELETE", StateResponse),
|
|
1009
|
+
route("settings", "/settings", "PUT", Type.Object({ settings: Settings }), Type.Partial(Settings)),
|
|
1010
|
+
route("passkeys", "/passkeys", "GET", Type.Object({
|
|
1011
|
+
support: Type.Union([Type.Object({
|
|
1012
|
+
supported: Type.Literal(true),
|
|
1013
|
+
rpId: Text$1
|
|
1014
|
+
}), Type.Object({
|
|
1015
|
+
supported: Type.Literal(false),
|
|
1016
|
+
reason: Text$1
|
|
1017
|
+
})]),
|
|
1018
|
+
credentials: Type.Array(Type.Object({
|
|
1019
|
+
id: Text$1,
|
|
1020
|
+
label: Text$1,
|
|
1021
|
+
createdAt: Text$1,
|
|
1022
|
+
lastUsedAt: Text$1
|
|
1023
|
+
}))
|
|
1024
|
+
})),
|
|
1025
|
+
route("passkeys.remove", "/passkeys/{id}", "DELETE", ApiOkSchema),
|
|
1026
|
+
route("register.begin", "/passkeys/register/begin", "POST", Begun, void 0, { authentication: "device" }),
|
|
1027
|
+
route("register.finish", "/passkeys/register/finish", "POST", Type.Object({ id: Text$1 }), Finish, { authentication: "device" }),
|
|
1028
|
+
route("authenticate.begin", "/passkeys/authenticate/begin", "POST", Begun, void 0, { authentication: "none" }),
|
|
1029
|
+
route("authenticate.finish", "/passkeys/authenticate/finish", "POST", Type.Object({
|
|
1030
|
+
ok: Type.Literal(true),
|
|
1031
|
+
hostPublicKey: Text$1
|
|
1032
|
+
}), Finish, { authentication: "none" }),
|
|
1033
|
+
route("challenge", "/challenge", "POST", Begun, Type.Object({ action: Text$1 }), { authentication: "device" }),
|
|
1034
|
+
route("channel", "/channel", "POST", ApiOkSchema, Type.Object({
|
|
1035
|
+
clientPublicKey: Text$1,
|
|
1036
|
+
scope: Type.Union([
|
|
1037
|
+
Type.Literal("session"),
|
|
1038
|
+
Type.Literal("protocol"),
|
|
1039
|
+
Type.Literal("http")
|
|
1040
|
+
])
|
|
1041
|
+
}), { authentication: "device" }),
|
|
1042
|
+
route("request", "/request", "POST", SealedEnvelopeSchema, SealedEnvelopeSchema, {
|
|
1043
|
+
authentication: "device",
|
|
1044
|
+
description: "Sealed HTTP gateway. Decrypted requests/responses use the SealedHttpRequest and SealedHttpResponse envelopes."
|
|
1045
|
+
}),
|
|
1046
|
+
route("pair", "/pair", "POST", Type.Object({
|
|
1047
|
+
requestId: Text$1,
|
|
1048
|
+
status: Type.Literal("pending")
|
|
1049
|
+
}), Type.Object({ code: Type.String({ minLength: 1 }) }), {
|
|
1050
|
+
authentication: "none",
|
|
1051
|
+
responses: {
|
|
1052
|
+
...jsonApiResponses(Type.Object({
|
|
1053
|
+
requestId: Text$1,
|
|
1054
|
+
status: Type.Literal("pending")
|
|
1055
|
+
}), 202),
|
|
1056
|
+
"410": {
|
|
1057
|
+
description: "Pairing code is no longer valid",
|
|
1058
|
+
schema: ApiErrorSchema
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
}),
|
|
1062
|
+
route("pair.status", "/pair/status", "GET", Type.Object({
|
|
1063
|
+
status: Type.Union([
|
|
1064
|
+
Type.Literal("pending"),
|
|
1065
|
+
Type.Literal("approved"),
|
|
1066
|
+
Type.Literal("denied"),
|
|
1067
|
+
Type.Literal("expired"),
|
|
1068
|
+
Type.Literal("consumed")
|
|
1069
|
+
]),
|
|
1070
|
+
bundleTrust: Optional$1(Trust),
|
|
1071
|
+
hostPublicKey: Optional$1(Text$1)
|
|
1072
|
+
}), void 0, {
|
|
1073
|
+
authentication: "none",
|
|
1074
|
+
parameters: [{
|
|
1075
|
+
name: "request",
|
|
1076
|
+
in: "query",
|
|
1077
|
+
required: true,
|
|
1078
|
+
schema: Text$1
|
|
1079
|
+
}]
|
|
1080
|
+
})
|
|
1081
|
+
];
|
|
1082
|
+
const remoteHttpContracts = [
|
|
1083
|
+
route("frontend", "/frontend", "POST", ApiOkSchema, Type.Object({ origin: Text$1 }), {
|
|
1084
|
+
authentication: "owner",
|
|
1085
|
+
availability: "Internal loopback frontend registration; blocked by the browser proxy.",
|
|
1086
|
+
parameters: [{
|
|
1087
|
+
name: "x-doompi-web-registration",
|
|
1088
|
+
in: "header",
|
|
1089
|
+
required: true,
|
|
1090
|
+
schema: Text$1
|
|
1091
|
+
}]
|
|
1092
|
+
}),
|
|
1093
|
+
...direct,
|
|
1094
|
+
...direct.map((operation) => ({
|
|
1095
|
+
...operation,
|
|
1096
|
+
id: `${operation.id}.plugin`,
|
|
1097
|
+
basePath: "remote",
|
|
1098
|
+
path: operation.path.slice(11) || "/",
|
|
1099
|
+
authentication: "owner",
|
|
1100
|
+
availability: "Global Remote Control plugin mount, reached through the authenticated headless listener."
|
|
1101
|
+
})),
|
|
1102
|
+
{
|
|
1103
|
+
id: "remote.pair.page",
|
|
1104
|
+
scope: "global",
|
|
1105
|
+
path: "/pair",
|
|
1106
|
+
method: "GET",
|
|
1107
|
+
authentication: "none",
|
|
1108
|
+
availability: "Remote listener only",
|
|
1109
|
+
description: "Pairing and passkey bootstrap page.",
|
|
1110
|
+
responses: { "200": {
|
|
1111
|
+
description: "Pairing page",
|
|
1112
|
+
contentType: "text/html",
|
|
1113
|
+
schema: Text$1
|
|
1114
|
+
} }
|
|
1115
|
+
}
|
|
1116
|
+
];
|
|
1117
|
+
const Asset = Type.Object({
|
|
1118
|
+
path: Text$1,
|
|
1119
|
+
sha256: Type.String({ pattern: "^[a-f0-9]{64}$" }),
|
|
1120
|
+
byteLength: Type.Integer({ minimum: 0 }),
|
|
1121
|
+
contentType: Text$1
|
|
1122
|
+
});
|
|
1123
|
+
const Signed = Type.Object({
|
|
1124
|
+
manifest: Type.Object({
|
|
1125
|
+
version: Type.Literal(2),
|
|
1126
|
+
revision: Type.Integer({ minimum: 1 }),
|
|
1127
|
+
builtAt: NumberValue$1,
|
|
1128
|
+
assets: Type.Array(Asset)
|
|
1129
|
+
}),
|
|
1130
|
+
signature: Text$1,
|
|
1131
|
+
publicKey: Text$1
|
|
1132
|
+
});
|
|
1133
|
+
const bundleHttpContracts = [...["/bundle-manifest.json", "/api/web-plugins/{id}/{revision}/manifest"].flatMap((path) => ["GET", "HEAD"].map((method) => ({
|
|
1134
|
+
id: `bundle.${path}.${method}`,
|
|
1135
|
+
scope: "global",
|
|
1136
|
+
path,
|
|
1137
|
+
method,
|
|
1138
|
+
authentication: "owner",
|
|
1139
|
+
availability: "Host publishes a web bundle",
|
|
1140
|
+
description: "Read an immutable signed browser bundle manifest.",
|
|
1141
|
+
responses: method === "HEAD" ? {
|
|
1142
|
+
"200": { description: "Manifest response headers" },
|
|
1143
|
+
"404": { description: "Bundle not published" }
|
|
1144
|
+
} : jsonApiResponses(Signed)
|
|
1145
|
+
}))), ...["/bundle-assets/{revision}/{assetPath}", "/api/web-plugins/{id}/{revision}/assets/{assetPath}"].flatMap((path) => ["GET", "HEAD"].map((method) => ({
|
|
1146
|
+
id: `asset.${path}.${method}`,
|
|
1147
|
+
scope: "global",
|
|
1148
|
+
path,
|
|
1149
|
+
method,
|
|
1150
|
+
authentication: "owner",
|
|
1151
|
+
availability: "Host publishes a web bundle",
|
|
1152
|
+
description: "Read an asset from the signed manifest. assetPath may contain multiple path segments.",
|
|
1153
|
+
responses: {
|
|
1154
|
+
"200": {
|
|
1155
|
+
description: "Manifest-listed asset, original MIME type",
|
|
1156
|
+
...method === "GET" ? {
|
|
1157
|
+
contentType: "*/*",
|
|
1158
|
+
schema: Type.String({ contentEncoding: "binary" })
|
|
1159
|
+
} : {}
|
|
1160
|
+
},
|
|
1161
|
+
"404": { description: "Asset not published" }
|
|
1162
|
+
}
|
|
1163
|
+
})))];
|
|
1164
|
+
//#endregion
|
|
1165
|
+
//#region src/schemas/sessionProtocol.ts
|
|
1166
|
+
const DOOM_SESSION_SERVICE_ID = "doompi.session.v2";
|
|
1167
|
+
const DOOM_SESSION_MANAGEMENT_SERVICE_ID = "doompi.session-management.v1";
|
|
1168
|
+
defineService("doompi.hub.v1");
|
|
1169
|
+
defineService(DOOM_SESSION_SERVICE_ID);
|
|
1170
|
+
defineService(DOOM_SESSION_MANAGEMENT_SERVICE_ID);
|
|
1171
|
+
//#endregion
|
|
1172
|
+
//#region src/schemas/sessionApiContracts.ts
|
|
1173
|
+
const Text = Type.String();
|
|
1174
|
+
const NumberValue = Type.Number();
|
|
1175
|
+
const Flag = Type.Boolean();
|
|
1176
|
+
const Json$1 = Type.Unsafe(Type.Unknown({ description: "Strict JSON application value supplied by the active tool, journal entry, or extension; validated by the Pi codec." }));
|
|
1177
|
+
const Optional = Type.Optional;
|
|
1178
|
+
const Strings = Type.Array(Text);
|
|
1179
|
+
const Model = Type.Object({
|
|
1180
|
+
provider: Text,
|
|
1181
|
+
id: Text
|
|
1182
|
+
});
|
|
1183
|
+
const Thinking = Type.Union([
|
|
1184
|
+
Type.Literal("off"),
|
|
1185
|
+
Type.Literal("minimal"),
|
|
1186
|
+
Type.Literal("low"),
|
|
1187
|
+
Type.Literal("medium"),
|
|
1188
|
+
Type.Literal("high"),
|
|
1189
|
+
Type.Literal("max"),
|
|
1190
|
+
Type.Literal("xhigh")
|
|
1191
|
+
]);
|
|
1192
|
+
const Phase = Type.Union([
|
|
1193
|
+
Type.Literal("idle"),
|
|
1194
|
+
Type.Literal("turn"),
|
|
1195
|
+
Type.Literal("compaction"),
|
|
1196
|
+
Type.Literal("retry")
|
|
1197
|
+
]);
|
|
1198
|
+
const Image = Type.Object({
|
|
1199
|
+
type: Type.Literal("image"),
|
|
1200
|
+
data: Text,
|
|
1201
|
+
mimeType: Text
|
|
1202
|
+
});
|
|
1203
|
+
const TextPart = Type.Object({
|
|
1204
|
+
type: Type.Literal("text"),
|
|
1205
|
+
text: Text
|
|
1206
|
+
});
|
|
1207
|
+
const Content = Type.Union([Image, TextPart]);
|
|
1208
|
+
const User = Type.Object({
|
|
1209
|
+
id: Text,
|
|
1210
|
+
role: Type.Literal("user"),
|
|
1211
|
+
content: Type.Array(Content),
|
|
1212
|
+
timestamp: NumberValue
|
|
1213
|
+
});
|
|
1214
|
+
const Transcript = Type.Union([
|
|
1215
|
+
User,
|
|
1216
|
+
Type.Object({
|
|
1217
|
+
id: Text,
|
|
1218
|
+
role: Type.Literal("assistant"),
|
|
1219
|
+
content: Type.Array(Type.Union([
|
|
1220
|
+
TextPart,
|
|
1221
|
+
Type.Object({
|
|
1222
|
+
type: Type.Literal("thinking"),
|
|
1223
|
+
thinking: Text,
|
|
1224
|
+
redacted: Optional(Type.Literal(true))
|
|
1225
|
+
}),
|
|
1226
|
+
Type.Object({
|
|
1227
|
+
type: Type.Literal("toolCall"),
|
|
1228
|
+
toolCallId: Text,
|
|
1229
|
+
toolName: Text,
|
|
1230
|
+
input: Json$1
|
|
1231
|
+
})
|
|
1232
|
+
])),
|
|
1233
|
+
model: Model,
|
|
1234
|
+
status: Type.Union([
|
|
1235
|
+
Type.Literal("streaming"),
|
|
1236
|
+
Type.Literal("complete"),
|
|
1237
|
+
Type.Literal("aborted"),
|
|
1238
|
+
Type.Literal("error")
|
|
1239
|
+
]),
|
|
1240
|
+
stopReason: Optional(Type.Union([
|
|
1241
|
+
Type.Literal("stop"),
|
|
1242
|
+
Type.Literal("length"),
|
|
1243
|
+
Type.Literal("toolUse"),
|
|
1244
|
+
Type.Literal("aborted"),
|
|
1245
|
+
Type.Literal("error")
|
|
1246
|
+
])),
|
|
1247
|
+
errorMessage: Optional(Text),
|
|
1248
|
+
timestamp: NumberValue
|
|
1249
|
+
}),
|
|
1250
|
+
Type.Object({
|
|
1251
|
+
id: Text,
|
|
1252
|
+
role: Type.Literal("tool"),
|
|
1253
|
+
toolCallId: Text,
|
|
1254
|
+
toolName: Text,
|
|
1255
|
+
input: Json$1,
|
|
1256
|
+
content: Type.Array(Content),
|
|
1257
|
+
details: Optional(Json$1),
|
|
1258
|
+
status: Type.Union([
|
|
1259
|
+
Type.Literal("running"),
|
|
1260
|
+
Type.Literal("complete"),
|
|
1261
|
+
Type.Literal("error")
|
|
1262
|
+
]),
|
|
1263
|
+
isError: Flag,
|
|
1264
|
+
timestamp: NumberValue
|
|
1265
|
+
})
|
|
1266
|
+
]);
|
|
1267
|
+
const Usage = Type.Object({
|
|
1268
|
+
input: NumberValue,
|
|
1269
|
+
output: NumberValue,
|
|
1270
|
+
cacheRead: NumberValue,
|
|
1271
|
+
cacheWrite: NumberValue,
|
|
1272
|
+
total: NumberValue
|
|
1273
|
+
});
|
|
1274
|
+
const Message = Type.Object({
|
|
1275
|
+
text: Text,
|
|
1276
|
+
images: Optional(Type.Array(Image))
|
|
1277
|
+
});
|
|
1278
|
+
const Lifecycle = Type.Object({
|
|
1279
|
+
revision: NumberValue,
|
|
1280
|
+
operation: Type.Union([Type.Null(), Type.Object({
|
|
1281
|
+
id: Text,
|
|
1282
|
+
kind: Type.Union([
|
|
1283
|
+
Type.Literal("run"),
|
|
1284
|
+
Type.Literal("compaction"),
|
|
1285
|
+
Type.Literal("navigation")
|
|
1286
|
+
]),
|
|
1287
|
+
status: Type.Union([Type.Literal("open"), Type.Literal("aborting")])
|
|
1288
|
+
})]),
|
|
1289
|
+
paused: Flag,
|
|
1290
|
+
queue: Type.Array(Type.Object({
|
|
1291
|
+
id: Text,
|
|
1292
|
+
text: Text,
|
|
1293
|
+
images: Optional(Type.Array(Image)),
|
|
1294
|
+
delivery: Type.Union([
|
|
1295
|
+
Type.Literal("steer"),
|
|
1296
|
+
Type.Literal("followUp"),
|
|
1297
|
+
Type.Literal("nextRun")
|
|
1298
|
+
]),
|
|
1299
|
+
scheduling: Type.Union([Type.Literal("automatic"), Type.Literal("held")]),
|
|
1300
|
+
disposition: Type.Union([
|
|
1301
|
+
Type.Literal("pending"),
|
|
1302
|
+
Type.Literal("handoff"),
|
|
1303
|
+
Type.Literal("uncertain")
|
|
1304
|
+
])
|
|
1305
|
+
}))
|
|
1306
|
+
});
|
|
1307
|
+
const Frame = Type.Intersect([Type.Object({ type: Text }), Type.Record(Text, Json$1)], { description: "Discriminated extension presentation frame; selected channel schemas describe package payloads." });
|
|
1308
|
+
const HubClientFrame = Type.Union([
|
|
1309
|
+
Type.Object({
|
|
1310
|
+
type: Type.Union([Type.Literal("subscribe"), Type.Literal("unsubscribe")]),
|
|
1311
|
+
sessionId: Text
|
|
1312
|
+
}),
|
|
1313
|
+
Type.Object({
|
|
1314
|
+
type: Type.Union([Type.Literal("subscribe_thread"), Type.Literal("unsubscribe_thread")]),
|
|
1315
|
+
sessionId: Text,
|
|
1316
|
+
threadId: Text
|
|
1317
|
+
}),
|
|
1318
|
+
Type.Object({
|
|
1319
|
+
type: Type.String({ not: { enum: [
|
|
1320
|
+
"subscribe",
|
|
1321
|
+
"unsubscribe",
|
|
1322
|
+
"subscribe_thread",
|
|
1323
|
+
"unsubscribe_thread"
|
|
1324
|
+
] } }),
|
|
1325
|
+
sessionId: Text,
|
|
1326
|
+
payload: Json$1
|
|
1327
|
+
})
|
|
1328
|
+
]);
|
|
1329
|
+
const HubServerFrame = Type.Union([
|
|
1330
|
+
HubSnapshotFrameSchema,
|
|
1331
|
+
HubUpsertFrameSchema,
|
|
1332
|
+
HubRemovedFrameSchema,
|
|
1333
|
+
Type.Object({
|
|
1334
|
+
type: Type.Literal("thread_frame"),
|
|
1335
|
+
sessionId: Text,
|
|
1336
|
+
threadId: Text,
|
|
1337
|
+
frame: Frame
|
|
1338
|
+
}),
|
|
1339
|
+
Type.Object({
|
|
1340
|
+
type: Type.Literal("thread_backlog"),
|
|
1341
|
+
sessionId: Text,
|
|
1342
|
+
threadId: Text,
|
|
1343
|
+
frames: Type.Array(Frame)
|
|
1344
|
+
}),
|
|
1345
|
+
Type.Object({
|
|
1346
|
+
type: Type.String({ not: { enum: [
|
|
1347
|
+
"sessions_snapshot",
|
|
1348
|
+
"session_upsert",
|
|
1349
|
+
"session_removed",
|
|
1350
|
+
"workspaces_snapshot",
|
|
1351
|
+
"workspace_upsert",
|
|
1352
|
+
"workspace_removed",
|
|
1353
|
+
"thread_frame",
|
|
1354
|
+
"thread_backlog"
|
|
1355
|
+
] } }),
|
|
1356
|
+
sessionId: Text,
|
|
1357
|
+
payload: Json$1
|
|
1358
|
+
})
|
|
1359
|
+
]);
|
|
1360
|
+
const ProtocolEvent = Type.Object({
|
|
1361
|
+
sequence: NumberValue,
|
|
1362
|
+
frame: Frame
|
|
1363
|
+
});
|
|
1364
|
+
const Update = Type.Union([
|
|
1365
|
+
Type.Object({
|
|
1366
|
+
sessionUpdate: Type.Union([
|
|
1367
|
+
Type.Literal("user_message"),
|
|
1368
|
+
Type.Literal("agent_message"),
|
|
1369
|
+
Type.Literal("agent_thought")
|
|
1370
|
+
]),
|
|
1371
|
+
messageId: Text,
|
|
1372
|
+
content: Type.Array(Content)
|
|
1373
|
+
}),
|
|
1374
|
+
Type.Object({
|
|
1375
|
+
sessionUpdate: Type.Literal("tool_call_update"),
|
|
1376
|
+
toolCallId: Text,
|
|
1377
|
+
title: Optional(Text),
|
|
1378
|
+
kind: Optional(Text),
|
|
1379
|
+
status: Optional(Type.Union([
|
|
1380
|
+
Type.Literal("pending"),
|
|
1381
|
+
Type.Literal("in_progress"),
|
|
1382
|
+
Type.Literal("completed"),
|
|
1383
|
+
Type.Literal("failed"),
|
|
1384
|
+
Type.Literal("cancelled")
|
|
1385
|
+
])),
|
|
1386
|
+
content: Optional(Type.Array(Type.Object({
|
|
1387
|
+
type: Type.Literal("content"),
|
|
1388
|
+
content: Content
|
|
1389
|
+
}))),
|
|
1390
|
+
rawInput: Optional(Json$1),
|
|
1391
|
+
rawOutput: Optional(Json$1)
|
|
1392
|
+
}),
|
|
1393
|
+
Type.Object({
|
|
1394
|
+
sessionUpdate: Type.Literal("state_update"),
|
|
1395
|
+
state: Type.Union([
|
|
1396
|
+
Type.Literal("running"),
|
|
1397
|
+
Type.Literal("idle"),
|
|
1398
|
+
Type.Literal("requires_action")
|
|
1399
|
+
]),
|
|
1400
|
+
stopReason: Optional(Type.Union([
|
|
1401
|
+
Type.Literal("end_turn"),
|
|
1402
|
+
Type.Literal("max_tokens"),
|
|
1403
|
+
Type.Literal("max_turn_requests"),
|
|
1404
|
+
Type.Literal("refusal"),
|
|
1405
|
+
Type.Literal("cancelled"),
|
|
1406
|
+
Type.Unsafe(Type.String({ pattern: "^_" }))
|
|
1407
|
+
]))
|
|
1408
|
+
})
|
|
1409
|
+
]);
|
|
1410
|
+
const SessionServiceStateSchema = Type.Object({
|
|
1411
|
+
snapshot: Type.Object({
|
|
1412
|
+
id: Text,
|
|
1413
|
+
cwd: Text,
|
|
1414
|
+
name: Optional(Text),
|
|
1415
|
+
createdAt: NumberValue,
|
|
1416
|
+
updatedAt: NumberValue,
|
|
1417
|
+
phase: Phase,
|
|
1418
|
+
model: Model,
|
|
1419
|
+
thinkingLevel: Thinking,
|
|
1420
|
+
attached: Flag,
|
|
1421
|
+
locked: Flag,
|
|
1422
|
+
revision: NumberValue,
|
|
1423
|
+
queuedSteer: Type.Array(User),
|
|
1424
|
+
queuedSteerCount: NumberValue,
|
|
1425
|
+
lifecycle: Optional(Lifecycle)
|
|
1426
|
+
}),
|
|
1427
|
+
progress: Type.Union([Type.Null(), Type.Union([
|
|
1428
|
+
Type.Object({
|
|
1429
|
+
type: Type.Literal("item_started"),
|
|
1430
|
+
item: Transcript
|
|
1431
|
+
}),
|
|
1432
|
+
Type.Object({
|
|
1433
|
+
type: Type.Literal("item_updated"),
|
|
1434
|
+
item: Transcript
|
|
1435
|
+
}),
|
|
1436
|
+
Type.Object({
|
|
1437
|
+
type: Type.Literal("item_finished"),
|
|
1438
|
+
item: Transcript
|
|
1439
|
+
})
|
|
1440
|
+
])]),
|
|
1441
|
+
updates: Optional(Type.Array(Type.Object({
|
|
1442
|
+
sequence: NumberValue,
|
|
1443
|
+
update: Update
|
|
1444
|
+
}))),
|
|
1445
|
+
presentation: Optional(Type.Object({
|
|
1446
|
+
revision: NumberValue,
|
|
1447
|
+
dropped: NumberValue,
|
|
1448
|
+
resetRevision: Optional(NumberValue),
|
|
1449
|
+
events: Type.Array(ProtocolEvent),
|
|
1450
|
+
projections: Type.Array(ProtocolEvent)
|
|
1451
|
+
})),
|
|
1452
|
+
inFlight: Optional(Type.Array(Transcript))
|
|
1453
|
+
});
|
|
1454
|
+
const SessionMethodSchemas = {
|
|
1455
|
+
readTranscriptPage: {
|
|
1456
|
+
input: Type.Tuple([Type.Object({
|
|
1457
|
+
cursor: Optional(Text),
|
|
1458
|
+
direction: Optional(Type.Union([Type.Literal("older"), Type.Literal("newer")])),
|
|
1459
|
+
limit: Optional(NumberValue),
|
|
1460
|
+
threadId: Optional(Text)
|
|
1461
|
+
})]),
|
|
1462
|
+
output: Type.Object({
|
|
1463
|
+
entries: Type.Array(Json$1),
|
|
1464
|
+
startCursor: Type.Union([Text, Type.Null()]),
|
|
1465
|
+
endCursor: Type.Union([Text, Type.Null()]),
|
|
1466
|
+
olderCursor: Type.Union([Text, Type.Null()]),
|
|
1467
|
+
newerCursor: Type.Union([Text, Type.Null()]),
|
|
1468
|
+
generation: NumberValue,
|
|
1469
|
+
revision: NumberValue,
|
|
1470
|
+
context: Type.Array(Json$1),
|
|
1471
|
+
drafts: Type.Array(Transcript)
|
|
1472
|
+
})
|
|
1473
|
+
},
|
|
1474
|
+
prompt: { input: Type.Tuple([Type.Union([Text, Type.Object({
|
|
1475
|
+
...Message.properties,
|
|
1476
|
+
waitFor: Optional(Type.Union([Type.Literal("accepted"), Type.Literal("settled")]))
|
|
1477
|
+
})])]) },
|
|
1478
|
+
steer: { input: Type.Tuple([Type.Union([Text, Message])]) },
|
|
1479
|
+
abort: { input: Type.Tuple([]) },
|
|
1480
|
+
abortOperation: { input: Type.Tuple([Type.Object({ operationId: Text })]) },
|
|
1481
|
+
setModel: { input: Type.Tuple([Model]) },
|
|
1482
|
+
setThinking: { input: Type.Tuple([Thinking]) },
|
|
1483
|
+
followUp: { input: Type.Tuple([Message]) },
|
|
1484
|
+
enqueueAutomatic: {
|
|
1485
|
+
input: Type.Tuple([Message]),
|
|
1486
|
+
output: Type.Object({ id: Text })
|
|
1487
|
+
},
|
|
1488
|
+
removeQueued: {
|
|
1489
|
+
input: Type.Tuple([Type.Object({ id: Text })]),
|
|
1490
|
+
output: Type.Union([
|
|
1491
|
+
Type.Literal("removed"),
|
|
1492
|
+
Type.Literal("in_flight"),
|
|
1493
|
+
Type.Literal("already_consumed"),
|
|
1494
|
+
Type.Literal("not_found")
|
|
1495
|
+
])
|
|
1496
|
+
},
|
|
1497
|
+
promoteQueued: {
|
|
1498
|
+
input: Type.Tuple([Type.Object({
|
|
1499
|
+
id: Text,
|
|
1500
|
+
operationId: Text
|
|
1501
|
+
})]),
|
|
1502
|
+
output: Type.Union([
|
|
1503
|
+
Type.Literal("promoted"),
|
|
1504
|
+
Type.Literal("in_flight"),
|
|
1505
|
+
Type.Literal("target_changed"),
|
|
1506
|
+
Type.Literal("not_found")
|
|
1507
|
+
])
|
|
1508
|
+
},
|
|
1509
|
+
resumeQueue: { input: Type.Tuple([]) },
|
|
1510
|
+
clearQueue: {
|
|
1511
|
+
input: Type.Tuple([]),
|
|
1512
|
+
output: Type.Object({
|
|
1513
|
+
steering: Strings,
|
|
1514
|
+
followUp: Strings
|
|
1515
|
+
})
|
|
1516
|
+
},
|
|
1517
|
+
rewind: {
|
|
1518
|
+
input: Type.Tuple([Type.Object({
|
|
1519
|
+
itemId: Text,
|
|
1520
|
+
summarize: Optional(Flag),
|
|
1521
|
+
customInstructions: Optional(Text),
|
|
1522
|
+
replaceInstructions: Optional(Flag),
|
|
1523
|
+
label: Optional(Text)
|
|
1524
|
+
})]),
|
|
1525
|
+
output: Type.Object({
|
|
1526
|
+
editorText: Optional(Text),
|
|
1527
|
+
cancelled: Flag,
|
|
1528
|
+
aborted: Optional(Flag),
|
|
1529
|
+
summaryEntry: Optional(Type.Object({
|
|
1530
|
+
id: Text,
|
|
1531
|
+
parentId: Type.Union([Text, Type.Null()]),
|
|
1532
|
+
timestamp: Text,
|
|
1533
|
+
fromId: Text,
|
|
1534
|
+
summary: Text,
|
|
1535
|
+
details: Optional(Json$1),
|
|
1536
|
+
usage: Optional(Usage),
|
|
1537
|
+
fromHook: Optional(Flag)
|
|
1538
|
+
}))
|
|
1539
|
+
})
|
|
1540
|
+
},
|
|
1541
|
+
extensionUiResponse: { input: Type.Tuple([Type.Union([
|
|
1542
|
+
Type.Object({
|
|
1543
|
+
id: Text,
|
|
1544
|
+
value: Text
|
|
1545
|
+
}),
|
|
1546
|
+
Type.Object({
|
|
1547
|
+
id: Text,
|
|
1548
|
+
confirmed: Flag
|
|
1549
|
+
}),
|
|
1550
|
+
Type.Object({
|
|
1551
|
+
id: Text,
|
|
1552
|
+
cancelled: Type.Literal(true)
|
|
1553
|
+
})
|
|
1554
|
+
])]) },
|
|
1555
|
+
getState: {
|
|
1556
|
+
input: Type.Tuple([]),
|
|
1557
|
+
output: Type.Object({
|
|
1558
|
+
model: Optional(Model),
|
|
1559
|
+
thinkingLevel: Thinking,
|
|
1560
|
+
isStreaming: Flag,
|
|
1561
|
+
isCompacting: Flag,
|
|
1562
|
+
steeringMode: Type.Union([Type.Literal("all"), Type.Literal("one-at-a-time")]),
|
|
1563
|
+
followUpMode: Type.Union([Type.Literal("all"), Type.Literal("one-at-a-time")]),
|
|
1564
|
+
sessionFile: Optional(Text),
|
|
1565
|
+
sessionId: Text,
|
|
1566
|
+
sessionName: Optional(Text),
|
|
1567
|
+
autoCompactionEnabled: Flag,
|
|
1568
|
+
messageCount: NumberValue,
|
|
1569
|
+
pendingMessageCount: NumberValue,
|
|
1570
|
+
operationId: Optional(Text),
|
|
1571
|
+
executionStatus: Optional(Type.Union([Type.Literal("open"), Type.Literal("aborting")])),
|
|
1572
|
+
queuePaused: Optional(Flag),
|
|
1573
|
+
queueRevision: Optional(NumberValue)
|
|
1574
|
+
})
|
|
1575
|
+
},
|
|
1576
|
+
getSessionStats: {
|
|
1577
|
+
input: Type.Tuple([]),
|
|
1578
|
+
output: Type.Object({
|
|
1579
|
+
sessionFile: Optional(Text),
|
|
1580
|
+
sessionId: Text,
|
|
1581
|
+
totalMessages: NumberValue,
|
|
1582
|
+
tokens: Usage,
|
|
1583
|
+
cost: NumberValue,
|
|
1584
|
+
contextUsage: Optional(Type.Object({
|
|
1585
|
+
tokens: Type.Union([NumberValue, Type.Null()]),
|
|
1586
|
+
contextWindow: NumberValue,
|
|
1587
|
+
percent: Type.Union([NumberValue, Type.Null()])
|
|
1588
|
+
}))
|
|
1589
|
+
})
|
|
1590
|
+
},
|
|
1591
|
+
getCommands: {
|
|
1592
|
+
input: Type.Tuple([]),
|
|
1593
|
+
output: Type.Array(Type.Object({
|
|
1594
|
+
name: Text,
|
|
1595
|
+
description: Optional(Text),
|
|
1596
|
+
source: Type.Union([
|
|
1597
|
+
Type.Literal("extension"),
|
|
1598
|
+
Type.Literal("prompt"),
|
|
1599
|
+
Type.Literal("skill")
|
|
1600
|
+
]),
|
|
1601
|
+
sourceInfo: Optional(Type.Object({
|
|
1602
|
+
path: Text,
|
|
1603
|
+
source: Text,
|
|
1604
|
+
scope: Type.Union([
|
|
1605
|
+
Type.Literal("user"),
|
|
1606
|
+
Type.Literal("project"),
|
|
1607
|
+
Type.Literal("temporary")
|
|
1608
|
+
]),
|
|
1609
|
+
origin: Type.Union([Type.Literal("package"), Type.Literal("top-level")]),
|
|
1610
|
+
baseDir: Optional(Text)
|
|
1611
|
+
}))
|
|
1612
|
+
}))
|
|
1613
|
+
},
|
|
1614
|
+
getAvailableModels: {
|
|
1615
|
+
input: Type.Tuple([]),
|
|
1616
|
+
output: Type.Array(Model)
|
|
1617
|
+
},
|
|
1618
|
+
getAvailableThinkingLevels: {
|
|
1619
|
+
input: Type.Tuple([]),
|
|
1620
|
+
output: Type.Array(Thinking)
|
|
1621
|
+
},
|
|
1622
|
+
compact: {
|
|
1623
|
+
input: Type.Tuple([Type.Object({ customInstructions: Optional(Text) })]),
|
|
1624
|
+
output: Json$1
|
|
1625
|
+
},
|
|
1626
|
+
setName: { input: Type.Tuple([Text]) }
|
|
1627
|
+
};
|
|
1628
|
+
const ErrorSchema = Type.Object({
|
|
1629
|
+
code: Text,
|
|
1630
|
+
message: Text
|
|
1631
|
+
});
|
|
1632
|
+
const sessionSocketContracts = [
|
|
1633
|
+
...Object.entries(SessionMethodSchemas).map(([member, definition]) => ({
|
|
1634
|
+
id: `session.${member}`,
|
|
1635
|
+
scope: "session",
|
|
1636
|
+
service: DOOM_SESSION_SERVICE_ID,
|
|
1637
|
+
member,
|
|
1638
|
+
direction: "client-to-server",
|
|
1639
|
+
kind: "method",
|
|
1640
|
+
description: `Session ${member}. Arguments exclude the process-local Chord Context. A void result is omitted from the successful Pi response.`,
|
|
1641
|
+
...definition,
|
|
1642
|
+
errors: ErrorSchema
|
|
1643
|
+
})),
|
|
1644
|
+
{
|
|
1645
|
+
id: "session.state",
|
|
1646
|
+
scope: "session",
|
|
1647
|
+
service: DOOM_SESSION_SERVICE_ID,
|
|
1648
|
+
member: "state",
|
|
1649
|
+
direction: "server-to-client",
|
|
1650
|
+
kind: "state",
|
|
1651
|
+
input: SessionServiceStateSchema,
|
|
1652
|
+
description: "Reconstructed session state after Chord snapshot/delta decoding."
|
|
1653
|
+
},
|
|
1654
|
+
{
|
|
1655
|
+
id: "management.attach",
|
|
1656
|
+
scope: "global",
|
|
1657
|
+
service: DOOM_SESSION_MANAGEMENT_SERVICE_ID,
|
|
1658
|
+
member: "attach",
|
|
1659
|
+
direction: "client-to-server",
|
|
1660
|
+
kind: "method",
|
|
1661
|
+
input: Type.Tuple([Text]),
|
|
1662
|
+
errors: ErrorSchema,
|
|
1663
|
+
description: "Attach this presentation to a session. Pi publishes an out-of-band attachment update."
|
|
1664
|
+
},
|
|
1665
|
+
{
|
|
1666
|
+
id: "management.detach",
|
|
1667
|
+
scope: "global",
|
|
1668
|
+
service: DOOM_SESSION_MANAGEMENT_SERVICE_ID,
|
|
1669
|
+
member: "detach",
|
|
1670
|
+
direction: "client-to-server",
|
|
1671
|
+
kind: "method",
|
|
1672
|
+
input: Type.Tuple([]),
|
|
1673
|
+
errors: ErrorSchema,
|
|
1674
|
+
description: "Detach this presentation from its selected session."
|
|
1675
|
+
},
|
|
1676
|
+
{
|
|
1677
|
+
id: "hub.send",
|
|
1678
|
+
scope: "global",
|
|
1679
|
+
service: "doompi.hub.v1",
|
|
1680
|
+
member: "send",
|
|
1681
|
+
direction: "client-to-server",
|
|
1682
|
+
kind: "method",
|
|
1683
|
+
input: Type.Tuple([HubClientFrame]),
|
|
1684
|
+
errors: ErrorSchema,
|
|
1685
|
+
description: "Send a hub subscription, thread, history, or selected extension channel frame."
|
|
1686
|
+
},
|
|
1687
|
+
{
|
|
1688
|
+
id: "hub.state",
|
|
1689
|
+
scope: "global",
|
|
1690
|
+
service: "doompi.hub.v1",
|
|
1691
|
+
member: "state",
|
|
1692
|
+
direction: "server-to-client",
|
|
1693
|
+
kind: "state",
|
|
1694
|
+
input: Type.Object({ events: Type.Array(Type.Object({
|
|
1695
|
+
sequence: NumberValue,
|
|
1696
|
+
frame: HubServerFrame
|
|
1697
|
+
})) }),
|
|
1698
|
+
description: "Reconstructed hub event replay window. Frame discriminators identify session and selected extension updates."
|
|
1699
|
+
}
|
|
1700
|
+
];
|
|
1701
|
+
//#endregion
|
|
1702
|
+
//#region src/schemas/pluginProtocol.ts
|
|
1703
|
+
/** The address is always exact. A workspace call never resolves to a global service. */
|
|
1704
|
+
const DoomPluginMountSchema = Type.Union([
|
|
1705
|
+
Type.Object({ scope: Type.Literal("global") }, { additionalProperties: false }),
|
|
1706
|
+
Type.Object({
|
|
1707
|
+
scope: Type.Literal("workspace"),
|
|
1708
|
+
workspaceId: Type.String({ minLength: 1 })
|
|
1709
|
+
}, { additionalProperties: false }),
|
|
1710
|
+
Type.Object({
|
|
1711
|
+
scope: Type.Literal("session"),
|
|
1712
|
+
sessionId: Type.String({ minLength: 1 })
|
|
1713
|
+
}, { additionalProperties: false })
|
|
1714
|
+
]);
|
|
1715
|
+
const DoomPluginCallSchema = Type.Object({
|
|
1716
|
+
mount: DoomPluginMountSchema,
|
|
1717
|
+
service: Type.String({ minLength: 1 }),
|
|
1718
|
+
method: Type.String({ minLength: 1 }),
|
|
1719
|
+
input: Type.Unknown()
|
|
1720
|
+
}, { additionalProperties: false });
|
|
1721
|
+
defineService("doompi.plugin.v1");
|
|
1722
|
+
//#endregion
|
|
1723
|
+
//#region src/schemas/transportApiContracts.ts
|
|
1724
|
+
const S = Type.String({ minLength: 1 });
|
|
1725
|
+
const Json = Type.Unknown({ description: "JSON value; its application shape is defined by the addressed service member." });
|
|
1726
|
+
const E = Type.Object({
|
|
1727
|
+
code: S,
|
|
1728
|
+
message: Type.String()
|
|
1729
|
+
}, { additionalProperties: false });
|
|
1730
|
+
const ServerId = Type.String({ pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" });
|
|
1731
|
+
const Address = Type.Object({
|
|
1732
|
+
key: S,
|
|
1733
|
+
generation: Type.Integer({ minimum: 1 })
|
|
1734
|
+
}, { additionalProperties: false });
|
|
1735
|
+
const Mode = Type.Union([Type.Literal("singleton"), Type.Literal("keyed")]);
|
|
1736
|
+
const SessionTarget = Type.Object({
|
|
1737
|
+
serverId: ServerId,
|
|
1738
|
+
sessionId: S,
|
|
1739
|
+
attachmentId: S
|
|
1740
|
+
}, { additionalProperties: false });
|
|
1741
|
+
const Target = Type.Union([Type.Object({ serverId: ServerId }, { additionalProperties: false }), SessionTarget]);
|
|
1742
|
+
const ChordCallSchema = Type.Object({
|
|
1743
|
+
serviceId: S,
|
|
1744
|
+
member: S,
|
|
1745
|
+
args: Type.Array(Json),
|
|
1746
|
+
instance: Type.Optional(Address)
|
|
1747
|
+
}, { additionalProperties: false });
|
|
1748
|
+
const Segment = Type.Union([Type.String(), Type.Integer({ minimum: 0 })]);
|
|
1749
|
+
const Path = Type.Array(Segment);
|
|
1750
|
+
const PathRef = Type.Union([Path, Type.Integer({ minimum: 0 })]);
|
|
1751
|
+
const NonemptyPathRef = Type.Union([Type.Array(Segment, { minItems: 1 }), Type.Integer({ minimum: 0 })]);
|
|
1752
|
+
const Index = Type.Integer({ minimum: 0 });
|
|
1753
|
+
const ChordWireOpSchema = Type.Union([
|
|
1754
|
+
Type.Tuple([Type.Literal("r"), Json]),
|
|
1755
|
+
Type.Tuple([
|
|
1756
|
+
Type.Literal("s"),
|
|
1757
|
+
NonemptyPathRef,
|
|
1758
|
+
Json
|
|
1759
|
+
]),
|
|
1760
|
+
Type.Tuple([Type.Literal("s"), Json]),
|
|
1761
|
+
Type.Tuple([Type.Literal("d"), NonemptyPathRef]),
|
|
1762
|
+
Type.Tuple([Type.Literal("d")]),
|
|
1763
|
+
Type.Tuple([
|
|
1764
|
+
Type.Literal("a"),
|
|
1765
|
+
NonemptyPathRef,
|
|
1766
|
+
Type.String()
|
|
1767
|
+
]),
|
|
1768
|
+
Type.Tuple([Type.Literal("a"), Type.String()]),
|
|
1769
|
+
Type.Tuple([
|
|
1770
|
+
Type.Literal("t"),
|
|
1771
|
+
NonemptyPathRef,
|
|
1772
|
+
Index
|
|
1773
|
+
]),
|
|
1774
|
+
Type.Tuple([Type.Literal("t"), Index]),
|
|
1775
|
+
Type.Tuple([
|
|
1776
|
+
Type.Literal("p"),
|
|
1777
|
+
PathRef,
|
|
1778
|
+
Index,
|
|
1779
|
+
Index,
|
|
1780
|
+
Type.Array(Json)
|
|
1781
|
+
]),
|
|
1782
|
+
Type.Tuple([
|
|
1783
|
+
Type.Literal("p"),
|
|
1784
|
+
Index,
|
|
1785
|
+
Index,
|
|
1786
|
+
Type.Array(Json)
|
|
1787
|
+
]),
|
|
1788
|
+
Type.Tuple([
|
|
1789
|
+
Type.Literal("#"),
|
|
1790
|
+
Index,
|
|
1791
|
+
Path
|
|
1792
|
+
])
|
|
1793
|
+
], { description: "Chord delta tuples. Path dictionary references and omitted paths depend on earlier operations in this subscription; decode with the Chord delta decoder." });
|
|
1794
|
+
const Instance = Type.Object({
|
|
1795
|
+
instance: Type.Optional(Address),
|
|
1796
|
+
members: Type.Array(Type.Union([Type.Object({
|
|
1797
|
+
name: S,
|
|
1798
|
+
kind: Type.Literal("method")
|
|
1799
|
+
}), Type.Object({
|
|
1800
|
+
name: S,
|
|
1801
|
+
kind: Type.Literal("state"),
|
|
1802
|
+
sequence: Type.Integer({ minimum: 0 }),
|
|
1803
|
+
ops: Type.Array(ChordWireOpSchema)
|
|
1804
|
+
})]))
|
|
1805
|
+
});
|
|
1806
|
+
const ChordSnapshotSchema = Type.Object({
|
|
1807
|
+
serviceId: S,
|
|
1808
|
+
mode: Mode,
|
|
1809
|
+
instances: Type.Array(Instance)
|
|
1810
|
+
});
|
|
1811
|
+
const ChordUpdateSchema = Type.Union([
|
|
1812
|
+
Type.Object({
|
|
1813
|
+
type: Type.Literal("state"),
|
|
1814
|
+
instance: Type.Optional(Address),
|
|
1815
|
+
member: S,
|
|
1816
|
+
sequence: Type.Integer({ minimum: 1 }),
|
|
1817
|
+
ops: Type.Array(ChordWireOpSchema)
|
|
1818
|
+
}),
|
|
1819
|
+
Type.Object({ type: Type.Literal("unavailable") }),
|
|
1820
|
+
Type.Object({
|
|
1821
|
+
type: Type.Literal("replaced"),
|
|
1822
|
+
snapshot: Instance
|
|
1823
|
+
}),
|
|
1824
|
+
Type.Object({
|
|
1825
|
+
type: Type.Literal("spawned"),
|
|
1826
|
+
instance: Instance
|
|
1827
|
+
}),
|
|
1828
|
+
Type.Object({
|
|
1829
|
+
type: Type.Literal("closed"),
|
|
1830
|
+
instance: Address
|
|
1831
|
+
})
|
|
1832
|
+
]);
|
|
1833
|
+
const PiClientMessageSchema = Type.Union([
|
|
1834
|
+
Type.Object({
|
|
1835
|
+
type: Type.Literal("hello"),
|
|
1836
|
+
version: Type.Integer({ minimum: 0 })
|
|
1837
|
+
}),
|
|
1838
|
+
Type.Object({
|
|
1839
|
+
type: Type.Literal("request"),
|
|
1840
|
+
id: S,
|
|
1841
|
+
target: Target,
|
|
1842
|
+
call: ChordCallSchema
|
|
1843
|
+
}),
|
|
1844
|
+
Type.Object({
|
|
1845
|
+
type: Type.Literal("cancel"),
|
|
1846
|
+
id: S,
|
|
1847
|
+
target: Target
|
|
1848
|
+
})
|
|
1849
|
+
]);
|
|
1850
|
+
const PiServerMessageSchema = Type.Union([
|
|
1851
|
+
Type.Object({
|
|
1852
|
+
type: Type.Literal("hello"),
|
|
1853
|
+
version: Type.Literal(PROTOCOL_VERSION),
|
|
1854
|
+
serverId: ServerId
|
|
1855
|
+
}),
|
|
1856
|
+
Type.Object({
|
|
1857
|
+
type: Type.Literal("hello_error"),
|
|
1858
|
+
error: E
|
|
1859
|
+
}),
|
|
1860
|
+
Type.Object({
|
|
1861
|
+
type: Type.Literal("response"),
|
|
1862
|
+
id: S,
|
|
1863
|
+
ok: Type.Literal(true),
|
|
1864
|
+
result: Type.Optional(Json)
|
|
1865
|
+
}),
|
|
1866
|
+
Type.Object({
|
|
1867
|
+
type: Type.Literal("response"),
|
|
1868
|
+
id: S,
|
|
1869
|
+
ok: Type.Literal(false),
|
|
1870
|
+
error: E
|
|
1871
|
+
}),
|
|
1872
|
+
Type.Object({
|
|
1873
|
+
type: Type.Literal("service_update"),
|
|
1874
|
+
subscriptionId: S,
|
|
1875
|
+
update: ChordUpdateSchema
|
|
1876
|
+
}),
|
|
1877
|
+
Type.Object({
|
|
1878
|
+
type: Type.Literal("attachment"),
|
|
1879
|
+
attachment: Type.Union([SessionTarget, Type.Null()])
|
|
1880
|
+
})
|
|
1881
|
+
]);
|
|
1882
|
+
const transportSocketContracts = [
|
|
1883
|
+
{
|
|
1884
|
+
id: "pi.client",
|
|
1885
|
+
scope: "global",
|
|
1886
|
+
service: "$pi",
|
|
1887
|
+
member: "client",
|
|
1888
|
+
direction: "client-to-server",
|
|
1889
|
+
kind: "channel",
|
|
1890
|
+
input: PiClientMessageSchema,
|
|
1891
|
+
description: `Pi protocol ${PROTOCOL_VERSION} decoded client envelope. Encode with the public Pi codec and framing functions, then seal for WebSocket delivery.`
|
|
1892
|
+
},
|
|
1893
|
+
{
|
|
1894
|
+
id: "pi.server",
|
|
1895
|
+
scope: "global",
|
|
1896
|
+
service: "$pi",
|
|
1897
|
+
member: "server",
|
|
1898
|
+
direction: "server-to-client",
|
|
1899
|
+
kind: "channel",
|
|
1900
|
+
input: PiServerMessageSchema,
|
|
1901
|
+
description: "Pi decoded server envelope. Responses correlate by id; service updates correlate by subscriptionId."
|
|
1902
|
+
},
|
|
1903
|
+
{
|
|
1904
|
+
id: "chord.catalogue",
|
|
1905
|
+
scope: "global",
|
|
1906
|
+
service: "$chord.service",
|
|
1907
|
+
member: "catalogue",
|
|
1908
|
+
direction: "client-to-server",
|
|
1909
|
+
kind: "method",
|
|
1910
|
+
input: Type.Tuple([]),
|
|
1911
|
+
output: Type.Array(Type.Object({
|
|
1912
|
+
serviceId: S,
|
|
1913
|
+
mode: Mode
|
|
1914
|
+
})),
|
|
1915
|
+
errors: E,
|
|
1916
|
+
description: "Discover services at the selected Pi target."
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
id: "chord.subscribe",
|
|
1920
|
+
scope: "global",
|
|
1921
|
+
service: "$chord.service",
|
|
1922
|
+
member: "subscribe",
|
|
1923
|
+
direction: "client-to-server",
|
|
1924
|
+
kind: "method",
|
|
1925
|
+
input: Type.Tuple([
|
|
1926
|
+
S,
|
|
1927
|
+
S,
|
|
1928
|
+
Mode
|
|
1929
|
+
]),
|
|
1930
|
+
output: ChordSnapshotSchema,
|
|
1931
|
+
errors: E,
|
|
1932
|
+
description: "Subscribe with [subscriptionId, serviceId, mode]; subsequent Pi service_update messages contain Chord deltas."
|
|
1933
|
+
},
|
|
1934
|
+
{
|
|
1935
|
+
id: "chord.unsubscribe",
|
|
1936
|
+
scope: "global",
|
|
1937
|
+
service: "$chord.service",
|
|
1938
|
+
member: "unsubscribe",
|
|
1939
|
+
direction: "client-to-server",
|
|
1940
|
+
kind: "method",
|
|
1941
|
+
input: Type.Tuple([S]),
|
|
1942
|
+
errors: E,
|
|
1943
|
+
description: "Unsubscribe by subscriptionId."
|
|
1944
|
+
},
|
|
1945
|
+
{
|
|
1946
|
+
id: "plugin.invoke",
|
|
1947
|
+
scope: "global",
|
|
1948
|
+
service: "doompi.plugin.v1",
|
|
1949
|
+
member: "invoke",
|
|
1950
|
+
direction: "client-to-server",
|
|
1951
|
+
kind: "method",
|
|
1952
|
+
input: Type.Tuple([DoomPluginCallSchema]),
|
|
1953
|
+
output: Json,
|
|
1954
|
+
errors: E,
|
|
1955
|
+
description: "Invoke the selected scoped plugin method. Its declaration supplies input and output shapes."
|
|
1956
|
+
}
|
|
1957
|
+
];
|
|
1958
|
+
//#endregion
|
|
1959
|
+
//#region src/schemas/builtinApiContracts.ts
|
|
1960
|
+
const builtinApiContract = defineApiContract({
|
|
1961
|
+
version: 1,
|
|
1962
|
+
schemas: {
|
|
1963
|
+
SealedEnvelope: SealedEnvelopeSchema,
|
|
1964
|
+
SealedHttpRequest: SealedHttpRequestSchema,
|
|
1965
|
+
SealedHttpResponse: SealedHttpResponseSchema
|
|
1966
|
+
},
|
|
1967
|
+
protocols: {
|
|
1968
|
+
pi: String(PROTOCOL_VERSION),
|
|
1969
|
+
chord: "0.99.1",
|
|
1970
|
+
sealed: "1"
|
|
1971
|
+
},
|
|
1972
|
+
http: [
|
|
1973
|
+
...headlessHttpContracts,
|
|
1974
|
+
...machineHttpContracts,
|
|
1975
|
+
...sessionHttpContracts,
|
|
1976
|
+
...remoteHttpContracts,
|
|
1977
|
+
...bundleHttpContracts
|
|
1978
|
+
],
|
|
1979
|
+
sockets: [...sessionSocketContracts, ...transportSocketContracts],
|
|
1980
|
+
dynamic: [
|
|
1981
|
+
"WebAuthn options and credential responses follow the installed WebAuthn implementation.",
|
|
1982
|
+
"Tool inputs/results and journal entries contain runtime-defined JSON.",
|
|
1983
|
+
"Selected channel and presentation payload schemas are contributed by their owning package."
|
|
1984
|
+
]
|
|
1985
|
+
});
|
|
1986
|
+
//#endregion
|
|
1987
|
+
export { ApiErrorSchema, ApiOkSchema, ChordCallSchema, ChordSnapshotSchema, ChordUpdateSchema, ChordWireOpSchema, DOOM_API_CONTRACT_FILE, DOOM_API_CONTRACT_VERSION, DoomApiContractSchema, PiClientMessageSchema, PiServerMessageSchema, SessionMethodSchemas, SessionServiceStateSchema, builtinApiContract, canonicalContractJson, createApiDocuments, defineApiContract, jsonApiResponses, parseApiContract, parseCompiledContracts };
|
|
1988
|
+
|
|
1989
|
+
//# sourceMappingURL=apiContracts.mjs.map
|