@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 @@
|
|
|
1
|
+
{"version":3,"file":"webPlugin.d.mts","names":[],"sources":["../../../../src/web/types/webPlugin.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;YA6BY,sBAAsB,mBAAmB,OAAO;;;;;;;;;;iBAU3C,gBAAgB;EAC/B;;EAEA,OAAO,iBAAiB;;;iBAGT,aAAa;EAC5B;EACA;EACA;EACA,MAAM;;;;;;;;iBAQS;;EAEf;EACA;EACA,OAAO,cAA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EAEvB,eAAe,OAAO,sBAAsB;;EAE5C,SAAS;;;iBAGM;;EAEf,QAAQ;EACR,kBAAkB;EAClB,aAAa,OAAO;EACpB,mBAAmB;IACjB;MAAS;;MAAsB;MAAoB;;MAA0B;MAAkB;;IAC/F;IACA;IACA;MACE;EACJ,eAAe;;EAEf,wBAAwB,QAAQ;;EAEhC,qBAAqB,WAAW,YAAY;;EAE5C,iBAAiB,WAAW,OAAO;;iBAEpB;EACf;;EAEA,SAAS;EACT,YAAY;EACZ,UAAU;;EAEV,YAAY;EACZ,OAAO;;EAEP,YAAY;EACZ,WAAW;EACX,gBAAgB;EAChB,aAAa;EACb,iBAAiB;EACjB,WAAW;EACX,kBAAkB;;EAElB,iBAAiB;;EAEjB,qBAAqB;EACrB,iBAAiB;EACjB,eAAe;;EAEf,kBAAkB;EAClB,oBAAoB;;EAEpB,kBAAkB;;;;;;;;;;;;;;;EAelB,oBAAoB;EACpB,gBAAgB;;;;;;EAMhB,mBAAmB;;;;;EAKnB,mBAAmB;;;;;;EAMnB,iBAAiB;;;;;EAKjB,0BAA0B;;EAE1B,QAAQ;;EAER,QAAQ;;EAER,YAAY;;EAEZ,OAAO,SAAS;;YAGN;YACA,yBAAyB,KAAK,4BAA4B;YAE1D;EACN;;EACA;EAAoB;;EACpB;EAAkB;EAAqB"}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
let node_crypto = require("node:crypto");
|
|
4
|
+
node_crypto = require_runtime.__toESM(node_crypto, 1);
|
|
5
|
+
let node_fs = require("node:fs");
|
|
6
|
+
node_fs = require_runtime.__toESM(node_fs, 1);
|
|
7
|
+
let node_os = require("node:os");
|
|
8
|
+
node_os = require_runtime.__toESM(node_os, 1);
|
|
9
|
+
let node_path = require("node:path");
|
|
10
|
+
node_path = require_runtime.__toESM(node_path, 1);
|
|
11
|
+
//#region src/services/syncLocation/index.ts
|
|
12
|
+
const PI_DIRECTORY = ".pi";
|
|
13
|
+
const DOOM_CONFIG_DIRECTORY = ".doom";
|
|
14
|
+
const SYNC_DIRECTORY = "sync";
|
|
15
|
+
const WORKTREES_DIRECTORY = "worktrees";
|
|
16
|
+
const GENERATIONS_DIRECTORY = "generations";
|
|
17
|
+
const REGISTRATIONS_DIRECTORY = "registrations";
|
|
18
|
+
const SHARED_CACHE_DIRECTORY = "shared-cache";
|
|
19
|
+
const LEGACY_DOOM_DIRECTORY = "doom";
|
|
20
|
+
const GIT_DIRECTORY = ".git";
|
|
21
|
+
const COMMON_DIRECTORY_FILE = "commondir";
|
|
22
|
+
const IDENTITY_HEX_LENGTH = 32;
|
|
23
|
+
const LABEL_MAX_LENGTH = 48;
|
|
24
|
+
const DEFAULT_REPOSITORY_LABEL = "repo";
|
|
25
|
+
const DEFAULT_WORKTREE_LABEL = "worktree";
|
|
26
|
+
const LOCK_FILE = ".sync.lock";
|
|
27
|
+
const STALE_LOCK_MS = 3e5;
|
|
28
|
+
const LOCK_RETRY_INTERVAL_MS = 100;
|
|
29
|
+
const PRIVATE_DIRECTORY_MODE = 448;
|
|
30
|
+
const PRIVATE_FILE_MODE = 384;
|
|
31
|
+
function canonicalPath(target) {
|
|
32
|
+
const absolute = node_path.default.resolve(target);
|
|
33
|
+
try {
|
|
34
|
+
return node_fs.default.realpathSync.native(absolute);
|
|
35
|
+
} catch {
|
|
36
|
+
const parent = node_path.default.dirname(absolute);
|
|
37
|
+
if (parent === absolute) return absolute;
|
|
38
|
+
return node_path.default.join(canonicalPath(parent), node_path.default.basename(absolute));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function readGitDirectory(repositoryRoot) {
|
|
42
|
+
const gitPath = node_path.default.join(repositoryRoot, GIT_DIRECTORY);
|
|
43
|
+
try {
|
|
44
|
+
const stat = node_fs.default.statSync(gitPath);
|
|
45
|
+
if (stat.isDirectory()) return canonicalPath(gitPath);
|
|
46
|
+
if (!stat.isFile()) return void 0;
|
|
47
|
+
const match = /^gitdir:\s*(.+)$/imu.exec(node_fs.default.readFileSync(gitPath, "utf8").trim());
|
|
48
|
+
return match?.[1] ? canonicalPath(node_path.default.resolve(repositoryRoot, match[1].trim())) : void 0;
|
|
49
|
+
} catch {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/** The git data directory shared by every worktree of a repository, if the root is a git checkout. */
|
|
54
|
+
function gitCommonDirectory(repositoryRoot) {
|
|
55
|
+
const gitDirectory = readGitDirectory(repositoryRoot);
|
|
56
|
+
if (!gitDirectory) return void 0;
|
|
57
|
+
try {
|
|
58
|
+
const relative = node_fs.default.readFileSync(node_path.default.join(gitDirectory, COMMON_DIRECTORY_FILE), "utf8").trim();
|
|
59
|
+
return relative ? canonicalPath(node_path.default.resolve(gitDirectory, relative)) : gitDirectory;
|
|
60
|
+
} catch {
|
|
61
|
+
return gitDirectory;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function identityHash(value) {
|
|
65
|
+
return node_crypto.default.createHash("sha256").update(value, "utf8").digest("hex").slice(0, IDENTITY_HEX_LENGTH);
|
|
66
|
+
}
|
|
67
|
+
function sanitizeSyncLabel(value, fallback) {
|
|
68
|
+
const normalized = value.normalize("NFKD").replace(/[\u0300-\u036f]/gu, "").replace(/[^A-Za-z0-9._-]+/gu, "-").replace(/^[._-]+|[._-]+$/gu, "").slice(0, LABEL_MAX_LENGTH).replace(/[._-]+$/gu, "");
|
|
69
|
+
return normalized === "" || normalized === "." || normalized === ".." ? fallback : normalized;
|
|
70
|
+
}
|
|
71
|
+
function repositoryLabel(commonDirectory, repositoryRoot) {
|
|
72
|
+
if (!commonDirectory) return sanitizeSyncLabel(node_path.default.basename(repositoryRoot), DEFAULT_REPOSITORY_LABEL);
|
|
73
|
+
const base = node_path.default.basename(commonDirectory);
|
|
74
|
+
return sanitizeSyncLabel(base === GIT_DIRECTORY ? node_path.default.basename(node_path.default.dirname(commonDirectory)) : base, DEFAULT_REPOSITORY_LABEL);
|
|
75
|
+
}
|
|
76
|
+
function locationFor(root, commonDirectory, homeDirectory) {
|
|
77
|
+
const repositoryToken = commonDirectory ? `git:${commonDirectory}` : `root:${root}`;
|
|
78
|
+
const identity = {
|
|
79
|
+
repositoryId: identityHash(repositoryToken),
|
|
80
|
+
worktreeId: identityHash(`${repositoryToken}\0worktree:${root}`)
|
|
81
|
+
};
|
|
82
|
+
const repoLabel = repositoryLabel(commonDirectory, root);
|
|
83
|
+
const worktreeLabel = sanitizeSyncLabel(node_path.default.basename(root), DEFAULT_WORKTREE_LABEL);
|
|
84
|
+
const generatedRoot = node_path.default.join(node_path.default.resolve(homeDirectory), PI_DIRECTORY, DOOM_CONFIG_DIRECTORY, SYNC_DIRECTORY);
|
|
85
|
+
const registrationsDirectory = node_path.default.join(generatedRoot, REGISTRATIONS_DIRECTORY);
|
|
86
|
+
const repositoryDirectory = node_path.default.join(generatedRoot, `${repoLabel}--${identity.repositoryId}`);
|
|
87
|
+
const directory = node_path.default.join(repositoryDirectory, WORKTREES_DIRECTORY, `${worktreeLabel}--${identity.worktreeId}`);
|
|
88
|
+
const legacyDirectory = node_path.default.join(root, PI_DIRECTORY, LEGACY_DOOM_DIRECTORY);
|
|
89
|
+
return {
|
|
90
|
+
root,
|
|
91
|
+
identity,
|
|
92
|
+
repositoryLabel: repoLabel,
|
|
93
|
+
worktreeLabel,
|
|
94
|
+
generatedRoot,
|
|
95
|
+
registrationsDirectory,
|
|
96
|
+
registrationPath: node_path.default.join(registrationsDirectory, identity.repositoryId, `${identity.worktreeId}.json`),
|
|
97
|
+
repositoryDirectory,
|
|
98
|
+
sharedCacheDirectory: node_path.default.join(repositoryDirectory, SHARED_CACHE_DIRECTORY),
|
|
99
|
+
directory,
|
|
100
|
+
generationsDirectory: node_path.default.join(directory, GENERATIONS_DIRECTORY),
|
|
101
|
+
statePath: node_path.default.join(directory, "state.json"),
|
|
102
|
+
legacyDirectory,
|
|
103
|
+
legacyStatePath: node_path.default.join(legacyDirectory, "state.json")
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function resolveSyncLocation(repositoryRoot, homeDirectory = node_os.default.homedir()) {
|
|
107
|
+
const root = canonicalPath(repositoryRoot);
|
|
108
|
+
return locationFor(root, gitCommonDirectory(root), homeDirectory);
|
|
109
|
+
}
|
|
110
|
+
/** Resolves a linked worktree namespace even after that worktree directory has been removed. */
|
|
111
|
+
function resolveWorktreeSyncLocation(repositoryRoot, worktreeRoot, homeDirectory = node_os.default.homedir()) {
|
|
112
|
+
const commonDirectory = gitCommonDirectory(canonicalPath(repositoryRoot));
|
|
113
|
+
if (commonDirectory === void 0) throw new Error("A Git repository is required to resolve worktree sync storage.");
|
|
114
|
+
const root = canonicalPath(worktreeRoot);
|
|
115
|
+
const targetCommonDirectory = gitCommonDirectory(root);
|
|
116
|
+
if (targetCommonDirectory !== void 0 && targetCommonDirectory !== commonDirectory) throw new Error("The worktree belongs to a different Git repository.");
|
|
117
|
+
return locationFor(root, commonDirectory, homeDirectory);
|
|
118
|
+
}
|
|
119
|
+
const GENERATION_ID = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/u;
|
|
120
|
+
/** Resolves one immutable generation below its worktree namespace. */
|
|
121
|
+
function syncGenerationDirectory(location, generation) {
|
|
122
|
+
if (!GENERATION_ID.test(generation) || generation === "." || generation === "..") throw new Error(`Invalid Doom sync generation id: ${generation}`);
|
|
123
|
+
return node_path.default.join(location.generationsDirectory, generation);
|
|
124
|
+
}
|
|
125
|
+
function rejectSymlink(target) {
|
|
126
|
+
try {
|
|
127
|
+
if (node_fs.default.lstatSync(target).isSymbolicLink()) throw new Error(`Doom sync namespace must not contain a symbolic link: ${target}`);
|
|
128
|
+
} catch (error) {
|
|
129
|
+
if (error instanceof Error && "code" in error && error.code === "ENOENT") return;
|
|
130
|
+
throw error;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
function readLockRecord(lockPath) {
|
|
134
|
+
try {
|
|
135
|
+
const parsed = JSON.parse(node_fs.default.readFileSync(lockPath, "utf8"));
|
|
136
|
+
return typeof parsed.pid === "number" && typeof parsed.token === "string" ? {
|
|
137
|
+
pid: parsed.pid,
|
|
138
|
+
token: parsed.token
|
|
139
|
+
} : void 0;
|
|
140
|
+
} catch {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
function processIsAlive(processId) {
|
|
145
|
+
try {
|
|
146
|
+
process.kill(processId, 0);
|
|
147
|
+
return true;
|
|
148
|
+
} catch (error) {
|
|
149
|
+
return error instanceof Error && "code" in error && error.code === "EPERM";
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
function removeStaleLock(lockPath) {
|
|
153
|
+
try {
|
|
154
|
+
const stat = node_fs.default.statSync(lockPath);
|
|
155
|
+
const record = readLockRecord(lockPath);
|
|
156
|
+
if (record) {
|
|
157
|
+
if (processIsAlive(record.pid)) return;
|
|
158
|
+
} else if (Date.now() - stat.mtimeMs <= STALE_LOCK_MS) return;
|
|
159
|
+
node_fs.default.rmSync(lockPath, { force: true });
|
|
160
|
+
} catch (error) {
|
|
161
|
+
if (!(error instanceof Error && "code" in error && error.code === "ENOENT")) throw error;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/** Waits for and acquires the exclusive publisher lock for one worktree namespace. */
|
|
165
|
+
async function acquireSyncLocationLock(location) {
|
|
166
|
+
assertSyncLocationSafe(location);
|
|
167
|
+
await node_fs.default.promises.mkdir(location.directory, {
|
|
168
|
+
mode: PRIVATE_DIRECTORY_MODE,
|
|
169
|
+
recursive: true
|
|
170
|
+
});
|
|
171
|
+
await node_fs.default.promises.chmod(location.directory, PRIVATE_DIRECTORY_MODE);
|
|
172
|
+
const lockPath = node_path.default.join(location.directory, LOCK_FILE);
|
|
173
|
+
const record = {
|
|
174
|
+
pid: process.pid,
|
|
175
|
+
token: node_crypto.default.randomUUID()
|
|
176
|
+
};
|
|
177
|
+
let handle;
|
|
178
|
+
for (;;) {
|
|
179
|
+
removeStaleLock(lockPath);
|
|
180
|
+
try {
|
|
181
|
+
handle = await node_fs.default.promises.open(lockPath, "wx", PRIVATE_FILE_MODE);
|
|
182
|
+
break;
|
|
183
|
+
} catch (error) {
|
|
184
|
+
if (!(error instanceof Error && "code" in error && error.code === "EEXIST")) throw error;
|
|
185
|
+
await new Promise((resolve) => setTimeout(resolve, LOCK_RETRY_INTERVAL_MS));
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
await handle.writeFile(`${JSON.stringify(record)}\n`);
|
|
189
|
+
const heartbeat = setInterval(() => {
|
|
190
|
+
if (readLockRecord(lockPath)?.token !== record.token) return;
|
|
191
|
+
const now = /* @__PURE__ */ new Date();
|
|
192
|
+
node_fs.default.utimesSync(lockPath, now, now);
|
|
193
|
+
}, Math.floor(STALE_LOCK_MS / 3));
|
|
194
|
+
heartbeat.unref();
|
|
195
|
+
return async () => {
|
|
196
|
+
clearInterval(heartbeat);
|
|
197
|
+
await handle.close();
|
|
198
|
+
if (readLockRecord(lockPath)?.token === record.token) await node_fs.default.promises.rm(lockPath, { force: true });
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
/** Refuses generated namespace redirection before a writer creates or prunes it. */
|
|
202
|
+
function assertSyncLocationSafe(location) {
|
|
203
|
+
const syncRoot = node_path.default.dirname(location.repositoryDirectory);
|
|
204
|
+
const doomRoot = node_path.default.dirname(syncRoot);
|
|
205
|
+
const piRoot = node_path.default.dirname(doomRoot);
|
|
206
|
+
const worktreesRoot = node_path.default.dirname(location.directory);
|
|
207
|
+
const registrationRoot = node_path.default.dirname(location.registrationPath);
|
|
208
|
+
for (const target of [
|
|
209
|
+
piRoot,
|
|
210
|
+
doomRoot,
|
|
211
|
+
syncRoot,
|
|
212
|
+
location.registrationsDirectory,
|
|
213
|
+
registrationRoot,
|
|
214
|
+
location.repositoryDirectory,
|
|
215
|
+
worktreesRoot,
|
|
216
|
+
location.directory
|
|
217
|
+
]) rejectSymlink(target);
|
|
218
|
+
}
|
|
219
|
+
/** Deletes one worktree's generated state without touching repository-shared build objects. */
|
|
220
|
+
function removeSyncLocation(location) {
|
|
221
|
+
assertSyncLocationSafe(location);
|
|
222
|
+
node_fs.default.rmSync(location.directory, {
|
|
223
|
+
recursive: true,
|
|
224
|
+
force: true
|
|
225
|
+
});
|
|
226
|
+
node_fs.default.rmSync(location.registrationPath, { force: true });
|
|
227
|
+
for (const directory of [node_path.default.dirname(location.registrationPath), node_path.default.dirname(location.directory)]) try {
|
|
228
|
+
node_fs.default.rmdirSync(directory);
|
|
229
|
+
} catch (error) {
|
|
230
|
+
const code = error.code;
|
|
231
|
+
if (code !== "ENOENT" && code !== "ENOTEMPTY") throw error;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
//#endregion
|
|
235
|
+
exports.acquireSyncLocationLock = acquireSyncLocationLock;
|
|
236
|
+
exports.assertSyncLocationSafe = assertSyncLocationSafe;
|
|
237
|
+
exports.gitCommonDirectory = gitCommonDirectory;
|
|
238
|
+
exports.removeSyncLocation = removeSyncLocation;
|
|
239
|
+
exports.resolveSyncLocation = resolveSyncLocation;
|
|
240
|
+
exports.resolveWorktreeSyncLocation = resolveWorktreeSyncLocation;
|
|
241
|
+
exports.sanitizeSyncLabel = sanitizeSyncLabel;
|
|
242
|
+
exports.syncGenerationDirectory = syncGenerationDirectory;
|
|
243
|
+
|
|
244
|
+
//# sourceMappingURL=syncLocation.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syncLocation.cjs","names":["path","fs","crypto","os"],"sources":["../src/services/syncLocation/index.ts"],"sourcesContent":["import crypto from 'node:crypto';\nimport fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\n\nconst PI_DIRECTORY = '.pi';\nconst DOOM_CONFIG_DIRECTORY = '.doom';\nconst SYNC_DIRECTORY = 'sync';\nconst WORKTREES_DIRECTORY = 'worktrees';\nconst GENERATIONS_DIRECTORY = 'generations';\nconst REGISTRATIONS_DIRECTORY = 'registrations';\nconst SHARED_CACHE_DIRECTORY = 'shared-cache';\nconst LEGACY_DOOM_DIRECTORY = 'doom';\nconst GIT_DIRECTORY = '.git';\nconst COMMON_DIRECTORY_FILE = 'commondir';\nconst IDENTITY_HEX_LENGTH = 32;\nconst LABEL_MAX_LENGTH = 48;\nconst DEFAULT_REPOSITORY_LABEL = 'repo';\nconst DEFAULT_WORKTREE_LABEL = 'worktree';\nconst LOCK_FILE = '.sync.lock';\nconst STALE_LOCK_MS = 5 * 60 * 1000;\nconst LOCK_RETRY_INTERVAL_MS = 100;\nconst PRIVATE_DIRECTORY_MODE = 0o700;\nconst PRIVATE_FILE_MODE = 0o600;\n\nexport interface SyncIdentity {\n repositoryId: string;\n worktreeId: string;\n}\n\nexport interface SyncLocation {\n root: string;\n identity: SyncIdentity;\n repositoryLabel: string;\n worktreeLabel: string;\n generatedRoot: string;\n registrationsDirectory: string;\n registrationPath: string;\n repositoryDirectory: string;\n sharedCacheDirectory: string;\n directory: string;\n generationsDirectory: string;\n statePath: string;\n legacyDirectory: string;\n legacyStatePath: string;\n}\n\nfunction canonicalPath(target: string): string {\n const absolute = path.resolve(target);\n try {\n return fs.realpathSync.native(absolute);\n } catch {\n const parent = path.dirname(absolute);\n if (parent === absolute) return absolute;\n return path.join(canonicalPath(parent), path.basename(absolute));\n }\n}\n\nfunction readGitDirectory(repositoryRoot: string): string | undefined {\n const gitPath = path.join(repositoryRoot, GIT_DIRECTORY);\n try {\n const stat = fs.statSync(gitPath);\n if (stat.isDirectory()) return canonicalPath(gitPath);\n if (!stat.isFile()) return undefined;\n const match = /^gitdir:\\s*(.+)$/imu.exec(fs.readFileSync(gitPath, 'utf8').trim());\n return match?.[1] ? canonicalPath(path.resolve(repositoryRoot, match[1].trim())) : undefined;\n } catch {\n return undefined;\n }\n}\n\n/** The git data directory shared by every worktree of a repository, if the root is a git checkout. */\nexport function gitCommonDirectory(repositoryRoot: string): string | undefined {\n const gitDirectory = readGitDirectory(repositoryRoot);\n if (!gitDirectory) return undefined;\n try {\n const relative = fs.readFileSync(path.join(gitDirectory, COMMON_DIRECTORY_FILE), 'utf8').trim();\n return relative ? canonicalPath(path.resolve(gitDirectory, relative)) : gitDirectory;\n } catch {\n return gitDirectory;\n }\n}\n\nfunction identityHash(value: string): string {\n return crypto.createHash('sha256').update(value, 'utf8').digest('hex').slice(0, IDENTITY_HEX_LENGTH);\n}\n\nexport function sanitizeSyncLabel(value: string, fallback: string): string {\n const normalized = value\n .normalize('NFKD')\n .replace(/[\\u0300-\\u036f]/gu, '')\n .replace(/[^A-Za-z0-9._-]+/gu, '-')\n .replace(/^[._-]+|[._-]+$/gu, '')\n .slice(0, LABEL_MAX_LENGTH)\n .replace(/[._-]+$/gu, '');\n return normalized === '' || normalized === '.' || normalized === '..' ? fallback : normalized;\n}\n\nfunction repositoryLabel(commonDirectory: string | undefined, repositoryRoot: string): string {\n if (!commonDirectory) return sanitizeSyncLabel(path.basename(repositoryRoot), DEFAULT_REPOSITORY_LABEL);\n const base = path.basename(commonDirectory);\n const source = base === GIT_DIRECTORY ? path.basename(path.dirname(commonDirectory)) : base;\n return sanitizeSyncLabel(source, DEFAULT_REPOSITORY_LABEL);\n}\n\nfunction locationFor(root: string, commonDirectory: string | undefined, homeDirectory: string): SyncLocation {\n const repositoryToken = commonDirectory ? `git:${commonDirectory}` : `root:${root}`;\n const identity: SyncIdentity = {\n repositoryId: identityHash(repositoryToken),\n worktreeId: identityHash(`${repositoryToken}\\0worktree:${root}`),\n };\n const repoLabel = repositoryLabel(commonDirectory, root);\n const worktreeLabel = sanitizeSyncLabel(path.basename(root), DEFAULT_WORKTREE_LABEL);\n const generatedRoot = path.join(path.resolve(homeDirectory), PI_DIRECTORY, DOOM_CONFIG_DIRECTORY, SYNC_DIRECTORY);\n const registrationsDirectory = path.join(generatedRoot, REGISTRATIONS_DIRECTORY);\n const repositoryDirectory = path.join(generatedRoot, `${repoLabel}--${identity.repositoryId}`);\n const directory = path.join(repositoryDirectory, WORKTREES_DIRECTORY, `${worktreeLabel}--${identity.worktreeId}`);\n const legacyDirectory = path.join(root, PI_DIRECTORY, LEGACY_DOOM_DIRECTORY);\n return {\n root,\n identity,\n repositoryLabel: repoLabel,\n worktreeLabel,\n generatedRoot,\n registrationsDirectory,\n registrationPath: path.join(registrationsDirectory, identity.repositoryId, `${identity.worktreeId}.json`),\n repositoryDirectory,\n sharedCacheDirectory: path.join(repositoryDirectory, SHARED_CACHE_DIRECTORY),\n directory,\n generationsDirectory: path.join(directory, GENERATIONS_DIRECTORY),\n statePath: path.join(directory, 'state.json'),\n legacyDirectory,\n legacyStatePath: path.join(legacyDirectory, 'state.json'),\n };\n}\n\nexport function resolveSyncLocation(repositoryRoot: string, homeDirectory: string = os.homedir()): SyncLocation {\n const root = canonicalPath(repositoryRoot);\n return locationFor(root, gitCommonDirectory(root), homeDirectory);\n}\n\n/** Resolves a linked worktree namespace even after that worktree directory has been removed. */\nexport function resolveWorktreeSyncLocation(\n repositoryRoot: string,\n worktreeRoot: string,\n homeDirectory: string = os.homedir(),\n): SyncLocation {\n const commonDirectory = gitCommonDirectory(canonicalPath(repositoryRoot));\n if (commonDirectory === undefined) throw new Error('A Git repository is required to resolve worktree sync storage.');\n const root = canonicalPath(worktreeRoot);\n const targetCommonDirectory = gitCommonDirectory(root);\n if (targetCommonDirectory !== undefined && targetCommonDirectory !== commonDirectory) {\n throw new Error('The worktree belongs to a different Git repository.');\n }\n return locationFor(root, commonDirectory, homeDirectory);\n}\n\nconst GENERATION_ID = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/u;\n\n/** Resolves one immutable generation below its worktree namespace. */\nexport function syncGenerationDirectory(location: SyncLocation, generation: string): string {\n if (!GENERATION_ID.test(generation) || generation === '.' || generation === '..') {\n throw new Error(`Invalid Doom sync generation id: ${generation}`);\n }\n return path.join(location.generationsDirectory, generation);\n}\n\nfunction rejectSymlink(target: string): void {\n try {\n if (fs.lstatSync(target).isSymbolicLink()) {\n throw new Error(`Doom sync namespace must not contain a symbolic link: ${target}`);\n }\n } catch (error) {\n if (error instanceof Error && 'code' in error && error.code === 'ENOENT') return;\n throw error;\n }\n}\n\ninterface SyncLockRecord {\n pid: number;\n token: string;\n}\n\nfunction readLockRecord(lockPath: string): SyncLockRecord | undefined {\n try {\n const parsed = JSON.parse(fs.readFileSync(lockPath, 'utf8')) as { pid?: unknown; token?: unknown };\n return typeof parsed.pid === 'number' && typeof parsed.token === 'string'\n ? { pid: parsed.pid, token: parsed.token }\n : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction processIsAlive(processId: number): boolean {\n try {\n process.kill(processId, 0);\n return true;\n } catch (error) {\n return error instanceof Error && 'code' in error && error.code === 'EPERM';\n }\n}\n\nfunction removeStaleLock(lockPath: string): void {\n try {\n const stat = fs.statSync(lockPath);\n const record = readLockRecord(lockPath);\n if (record) {\n if (processIsAlive(record.pid)) return;\n } else if (Date.now() - stat.mtimeMs <= STALE_LOCK_MS) {\n // A publisher may have created the file but not written its record yet.\n return;\n }\n fs.rmSync(lockPath, { force: true });\n } catch (error) {\n if (!(error instanceof Error && 'code' in error && error.code === 'ENOENT')) throw error;\n }\n}\n\n/** Waits for and acquires the exclusive publisher lock for one worktree namespace. */\nexport async function acquireSyncLocationLock(location: SyncLocation): Promise<() => Promise<void>> {\n assertSyncLocationSafe(location);\n await fs.promises.mkdir(location.directory, { mode: PRIVATE_DIRECTORY_MODE, recursive: true });\n await fs.promises.chmod(location.directory, PRIVATE_DIRECTORY_MODE);\n const lockPath = path.join(location.directory, LOCK_FILE);\n const record: SyncLockRecord = { pid: process.pid, token: crypto.randomUUID() };\n let handle: fs.promises.FileHandle;\n for (;;) {\n removeStaleLock(lockPath);\n try {\n handle = await fs.promises.open(lockPath, 'wx', PRIVATE_FILE_MODE);\n break;\n } catch (error) {\n if (!(error instanceof Error && 'code' in error && error.code === 'EEXIST')) throw error;\n await new Promise((resolve) => setTimeout(resolve, LOCK_RETRY_INTERVAL_MS));\n }\n }\n await handle.writeFile(`${JSON.stringify(record)}\\n`);\n const heartbeat = setInterval(\n () => {\n if (readLockRecord(lockPath)?.token !== record.token) return;\n const now = new Date();\n fs.utimesSync(lockPath, now, now);\n },\n Math.floor(STALE_LOCK_MS / 3),\n );\n heartbeat.unref();\n return async () => {\n clearInterval(heartbeat);\n await handle.close();\n if (readLockRecord(lockPath)?.token === record.token) {\n await fs.promises.rm(lockPath, { force: true });\n }\n };\n}\n\n/** Refuses generated namespace redirection before a writer creates or prunes it. */\nexport function assertSyncLocationSafe(location: SyncLocation): void {\n const syncRoot = path.dirname(location.repositoryDirectory);\n const doomRoot = path.dirname(syncRoot);\n const piRoot = path.dirname(doomRoot);\n const worktreesRoot = path.dirname(location.directory);\n const registrationRoot = path.dirname(location.registrationPath);\n for (const target of [\n piRoot,\n doomRoot,\n syncRoot,\n location.registrationsDirectory,\n registrationRoot,\n location.repositoryDirectory,\n worktreesRoot,\n location.directory,\n ]) {\n rejectSymlink(target);\n }\n}\n\n/** Deletes one worktree's generated state without touching repository-shared build objects. */\nexport function removeSyncLocation(location: SyncLocation): void {\n assertSyncLocationSafe(location);\n fs.rmSync(location.directory, { recursive: true, force: true });\n fs.rmSync(location.registrationPath, { force: true });\n for (const directory of [path.dirname(location.registrationPath), path.dirname(location.directory)]) {\n try {\n fs.rmdirSync(directory);\n } catch (error) {\n const code = (error as NodeJS.ErrnoException).code;\n if (code !== 'ENOENT' && code !== 'ENOTEMPTY') throw error;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;AAKA,MAAM,eAAe;AACrB,MAAM,wBAAwB;AAC9B,MAAM,iBAAiB;AACvB,MAAM,sBAAsB;AAC5B,MAAM,wBAAwB;AAC9B,MAAM,0BAA0B;AAChC,MAAM,yBAAyB;AAC/B,MAAM,wBAAwB;AAC9B,MAAM,gBAAgB;AACtB,MAAM,wBAAwB;AAC9B,MAAM,sBAAsB;AAC5B,MAAM,mBAAmB;AACzB,MAAM,2BAA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SAAS;EACT;EACA,SAAS;CACX,GACE,cAAc,MAAM;AAExB;;AAGA,SAAgB,mBAAmB,UAA8B;CAC/D,uBAAuB,QAAQ;CAC/B,QAAA,QAAG,OAAO,SAAS,WAAW;EAAE,WAAW;EAAM,OAAO;CAAK,CAAC;CAC9D,QAAA,QAAG,OAAO,SAAS,kBAAkB,EAAE,OAAO,KAAK,CAAC;CACpD,KAAK,MAAM,aAAa,CAACA,UAAAA,QAAK,QAAQ,SAAS,gBAAgB,GAAGA,UAAAA,QAAK,QAAQ,SAAS,SAAS,CAAC,GAChG,IAAI;EACF,QAAA,QAAG,UAAU,SAAS;CACxB,SAAS,OAAO;EACd,MAAM,OAAQ,MAAgC;EAC9C,IAAI,SAAS,YAAY,SAAS,aAAa,MAAM;CACvD;AAEJ"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/services/syncLocation/index.d.ts
|
|
2
|
+
export interface SyncIdentity {
|
|
3
|
+
repositoryId: string;
|
|
4
|
+
worktreeId: string;
|
|
5
|
+
}
|
|
6
|
+
export interface SyncLocation {
|
|
7
|
+
root: string;
|
|
8
|
+
identity: SyncIdentity;
|
|
9
|
+
repositoryLabel: string;
|
|
10
|
+
worktreeLabel: string;
|
|
11
|
+
generatedRoot: string;
|
|
12
|
+
registrationsDirectory: string;
|
|
13
|
+
registrationPath: string;
|
|
14
|
+
repositoryDirectory: string;
|
|
15
|
+
sharedCacheDirectory: string;
|
|
16
|
+
directory: string;
|
|
17
|
+
generationsDirectory: string;
|
|
18
|
+
statePath: string;
|
|
19
|
+
legacyDirectory: string;
|
|
20
|
+
legacyStatePath: string;
|
|
21
|
+
}
|
|
22
|
+
/** The git data directory shared by every worktree of a repository, if the root is a git checkout. */
|
|
23
|
+
export declare function gitCommonDirectory(repositoryRoot: string): string | undefined;
|
|
24
|
+
export declare function sanitizeSyncLabel(value: string, fallback: string): string;
|
|
25
|
+
export declare function resolveSyncLocation(repositoryRoot: string, homeDirectory?: string): SyncLocation;
|
|
26
|
+
/** Resolves a linked worktree namespace even after that worktree directory has been removed. */
|
|
27
|
+
export declare function resolveWorktreeSyncLocation(repositoryRoot: string, worktreeRoot: string, homeDirectory?: string): SyncLocation;
|
|
28
|
+
/** Resolves one immutable generation below its worktree namespace. */
|
|
29
|
+
export declare function syncGenerationDirectory(location: SyncLocation, generation: string): string;
|
|
30
|
+
/** Waits for and acquires the exclusive publisher lock for one worktree namespace. */
|
|
31
|
+
export declare function acquireSyncLocationLock(location: SyncLocation): Promise<() => Promise<void>>;
|
|
32
|
+
/** Refuses generated namespace redirection before a writer creates or prunes it. */
|
|
33
|
+
export declare function assertSyncLocationSafe(location: SyncLocation): void;
|
|
34
|
+
/** Deletes one worktree's generated state without touching repository-shared build objects. */
|
|
35
|
+
export declare function removeSyncLocation(location: SyncLocation): void;
|
|
36
|
+
//#endregion
|
|
37
|
+
//# sourceMappingURL=syncLocation.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syncLocation.d.mts","names":[],"sources":["../src/services/syncLocation/index.ts"],"mappings":";iBAyBiB;EACf;EACA;;iBAGe;EACf;EACA,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;wBA4Bc,mBAAmB;wBAenB,kBAAkB,eAAe;wBAiDjC,oBAAoB,wBAAwB,yBAAuC;;wBAMnF,4BACd,wBACA,sBACA,yBACC;;wBAca,wBAAwB,UAAU,cAAc;;wBA4D1C,wBAAwB,UAAU,eAAe,cAAc;;wBAqCrE,uBAAuB,UAAU;;wBAqBjC,mBAAmB,UAAU"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import crypto from "node:crypto";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import os from "node:os";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
//#region src/services/syncLocation/index.ts
|
|
6
|
+
const PI_DIRECTORY = ".pi";
|
|
7
|
+
const DOOM_CONFIG_DIRECTORY = ".doom";
|
|
8
|
+
const SYNC_DIRECTORY = "sync";
|
|
9
|
+
const WORKTREES_DIRECTORY = "worktrees";
|
|
10
|
+
const GENERATIONS_DIRECTORY = "generations";
|
|
11
|
+
const REGISTRATIONS_DIRECTORY = "registrations";
|
|
12
|
+
const SHARED_CACHE_DIRECTORY = "shared-cache";
|
|
13
|
+
const LEGACY_DOOM_DIRECTORY = "doom";
|
|
14
|
+
const GIT_DIRECTORY = ".git";
|
|
15
|
+
const COMMON_DIRECTORY_FILE = "commondir";
|
|
16
|
+
const IDENTITY_HEX_LENGTH = 32;
|
|
17
|
+
const LABEL_MAX_LENGTH = 48;
|
|
18
|
+
const DEFAULT_REPOSITORY_LABEL = "repo";
|
|
19
|
+
const DEFAULT_WORKTREE_LABEL = "worktree";
|
|
20
|
+
const LOCK_FILE = ".sync.lock";
|
|
21
|
+
const STALE_LOCK_MS = 3e5;
|
|
22
|
+
const LOCK_RETRY_INTERVAL_MS = 100;
|
|
23
|
+
const PRIVATE_DIRECTORY_MODE = 448;
|
|
24
|
+
const PRIVATE_FILE_MODE = 384;
|
|
25
|
+
function canonicalPath(target) {
|
|
26
|
+
const absolute = path.resolve(target);
|
|
27
|
+
try {
|
|
28
|
+
return fs.realpathSync.native(absolute);
|
|
29
|
+
} catch {
|
|
30
|
+
const parent = path.dirname(absolute);
|
|
31
|
+
if (parent === absolute) return absolute;
|
|
32
|
+
return path.join(canonicalPath(parent), path.basename(absolute));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function readGitDirectory(repositoryRoot) {
|
|
36
|
+
const gitPath = path.join(repositoryRoot, GIT_DIRECTORY);
|
|
37
|
+
try {
|
|
38
|
+
const stat = fs.statSync(gitPath);
|
|
39
|
+
if (stat.isDirectory()) return canonicalPath(gitPath);
|
|
40
|
+
if (!stat.isFile()) return void 0;
|
|
41
|
+
const match = /^gitdir:\s*(.+)$/imu.exec(fs.readFileSync(gitPath, "utf8").trim());
|
|
42
|
+
return match?.[1] ? canonicalPath(path.resolve(repositoryRoot, match[1].trim())) : void 0;
|
|
43
|
+
} catch {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/** The git data directory shared by every worktree of a repository, if the root is a git checkout. */
|
|
48
|
+
function gitCommonDirectory(repositoryRoot) {
|
|
49
|
+
const gitDirectory = readGitDirectory(repositoryRoot);
|
|
50
|
+
if (!gitDirectory) return void 0;
|
|
51
|
+
try {
|
|
52
|
+
const relative = fs.readFileSync(path.join(gitDirectory, COMMON_DIRECTORY_FILE), "utf8").trim();
|
|
53
|
+
return relative ? canonicalPath(path.resolve(gitDirectory, relative)) : gitDirectory;
|
|
54
|
+
} catch {
|
|
55
|
+
return gitDirectory;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function identityHash(value) {
|
|
59
|
+
return crypto.createHash("sha256").update(value, "utf8").digest("hex").slice(0, IDENTITY_HEX_LENGTH);
|
|
60
|
+
}
|
|
61
|
+
function sanitizeSyncLabel(value, fallback) {
|
|
62
|
+
const normalized = value.normalize("NFKD").replace(/[\u0300-\u036f]/gu, "").replace(/[^A-Za-z0-9._-]+/gu, "-").replace(/^[._-]+|[._-]+$/gu, "").slice(0, LABEL_MAX_LENGTH).replace(/[._-]+$/gu, "");
|
|
63
|
+
return normalized === "" || normalized === "." || normalized === ".." ? fallback : normalized;
|
|
64
|
+
}
|
|
65
|
+
function repositoryLabel(commonDirectory, repositoryRoot) {
|
|
66
|
+
if (!commonDirectory) return sanitizeSyncLabel(path.basename(repositoryRoot), DEFAULT_REPOSITORY_LABEL);
|
|
67
|
+
const base = path.basename(commonDirectory);
|
|
68
|
+
return sanitizeSyncLabel(base === GIT_DIRECTORY ? path.basename(path.dirname(commonDirectory)) : base, DEFAULT_REPOSITORY_LABEL);
|
|
69
|
+
}
|
|
70
|
+
function locationFor(root, commonDirectory, homeDirectory) {
|
|
71
|
+
const repositoryToken = commonDirectory ? `git:${commonDirectory}` : `root:${root}`;
|
|
72
|
+
const identity = {
|
|
73
|
+
repositoryId: identityHash(repositoryToken),
|
|
74
|
+
worktreeId: identityHash(`${repositoryToken}\0worktree:${root}`)
|
|
75
|
+
};
|
|
76
|
+
const repoLabel = repositoryLabel(commonDirectory, root);
|
|
77
|
+
const worktreeLabel = sanitizeSyncLabel(path.basename(root), DEFAULT_WORKTREE_LABEL);
|
|
78
|
+
const generatedRoot = path.join(path.resolve(homeDirectory), PI_DIRECTORY, DOOM_CONFIG_DIRECTORY, SYNC_DIRECTORY);
|
|
79
|
+
const registrationsDirectory = path.join(generatedRoot, REGISTRATIONS_DIRECTORY);
|
|
80
|
+
const repositoryDirectory = path.join(generatedRoot, `${repoLabel}--${identity.repositoryId}`);
|
|
81
|
+
const directory = path.join(repositoryDirectory, WORKTREES_DIRECTORY, `${worktreeLabel}--${identity.worktreeId}`);
|
|
82
|
+
const legacyDirectory = path.join(root, PI_DIRECTORY, LEGACY_DOOM_DIRECTORY);
|
|
83
|
+
return {
|
|
84
|
+
root,
|
|
85
|
+
identity,
|
|
86
|
+
repositoryLabel: repoLabel,
|
|
87
|
+
worktreeLabel,
|
|
88
|
+
generatedRoot,
|
|
89
|
+
registrationsDirectory,
|
|
90
|
+
registrationPath: path.join(registrationsDirectory, identity.repositoryId, `${identity.worktreeId}.json`),
|
|
91
|
+
repositoryDirectory,
|
|
92
|
+
sharedCacheDirectory: path.join(repositoryDirectory, SHARED_CACHE_DIRECTORY),
|
|
93
|
+
directory,
|
|
94
|
+
generationsDirectory: path.join(directory, GENERATIONS_DIRECTORY),
|
|
95
|
+
statePath: path.join(directory, "state.json"),
|
|
96
|
+
legacyDirectory,
|
|
97
|
+
legacyStatePath: path.join(legacyDirectory, "state.json")
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
function resolveSyncLocation(repositoryRoot, homeDirectory = os.homedir()) {
|
|
101
|
+
const root = canonicalPath(repositoryRoot);
|
|
102
|
+
return locationFor(root, gitCommonDirectory(root), homeDirectory);
|
|
103
|
+
}
|
|
104
|
+
/** Resolves a linked worktree namespace even after that worktree directory has been removed. */
|
|
105
|
+
function resolveWorktreeSyncLocation(repositoryRoot, worktreeRoot, homeDirectory = os.homedir()) {
|
|
106
|
+
const commonDirectory = gitCommonDirectory(canonicalPath(repositoryRoot));
|
|
107
|
+
if (commonDirectory === void 0) throw new Error("A Git repository is required to resolve worktree sync storage.");
|
|
108
|
+
const root = canonicalPath(worktreeRoot);
|
|
109
|
+
const targetCommonDirectory = gitCommonDirectory(root);
|
|
110
|
+
if (targetCommonDirectory !== void 0 && targetCommonDirectory !== commonDirectory) throw new Error("The worktree belongs to a different Git repository.");
|
|
111
|
+
return locationFor(root, commonDirectory, homeDirectory);
|
|
112
|
+
}
|
|
113
|
+
const GENERATION_ID = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/u;
|
|
114
|
+
/** Resolves one immutable generation below its worktree namespace. */
|
|
115
|
+
function syncGenerationDirectory(location, generation) {
|
|
116
|
+
if (!GENERATION_ID.test(generation) || generation === "." || generation === "..") throw new Error(`Invalid Doom sync generation id: ${generation}`);
|
|
117
|
+
return path.join(location.generationsDirectory, generation);
|
|
118
|
+
}
|
|
119
|
+
function rejectSymlink(target) {
|
|
120
|
+
try {
|
|
121
|
+
if (fs.lstatSync(target).isSymbolicLink()) throw new Error(`Doom sync namespace must not contain a symbolic link: ${target}`);
|
|
122
|
+
} catch (error) {
|
|
123
|
+
if (error instanceof Error && "code" in error && error.code === "ENOENT") return;
|
|
124
|
+
throw error;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function readLockRecord(lockPath) {
|
|
128
|
+
try {
|
|
129
|
+
const parsed = JSON.parse(fs.readFileSync(lockPath, "utf8"));
|
|
130
|
+
return typeof parsed.pid === "number" && typeof parsed.token === "string" ? {
|
|
131
|
+
pid: parsed.pid,
|
|
132
|
+
token: parsed.token
|
|
133
|
+
} : void 0;
|
|
134
|
+
} catch {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function processIsAlive(processId) {
|
|
139
|
+
try {
|
|
140
|
+
process.kill(processId, 0);
|
|
141
|
+
return true;
|
|
142
|
+
} catch (error) {
|
|
143
|
+
return error instanceof Error && "code" in error && error.code === "EPERM";
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
function removeStaleLock(lockPath) {
|
|
147
|
+
try {
|
|
148
|
+
const stat = fs.statSync(lockPath);
|
|
149
|
+
const record = readLockRecord(lockPath);
|
|
150
|
+
if (record) {
|
|
151
|
+
if (processIsAlive(record.pid)) return;
|
|
152
|
+
} else if (Date.now() - stat.mtimeMs <= STALE_LOCK_MS) return;
|
|
153
|
+
fs.rmSync(lockPath, { force: true });
|
|
154
|
+
} catch (error) {
|
|
155
|
+
if (!(error instanceof Error && "code" in error && error.code === "ENOENT")) throw error;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/** Waits for and acquires the exclusive publisher lock for one worktree namespace. */
|
|
159
|
+
async function acquireSyncLocationLock(location) {
|
|
160
|
+
assertSyncLocationSafe(location);
|
|
161
|
+
await fs.promises.mkdir(location.directory, {
|
|
162
|
+
mode: PRIVATE_DIRECTORY_MODE,
|
|
163
|
+
recursive: true
|
|
164
|
+
});
|
|
165
|
+
await fs.promises.chmod(location.directory, PRIVATE_DIRECTORY_MODE);
|
|
166
|
+
const lockPath = path.join(location.directory, LOCK_FILE);
|
|
167
|
+
const record = {
|
|
168
|
+
pid: process.pid,
|
|
169
|
+
token: crypto.randomUUID()
|
|
170
|
+
};
|
|
171
|
+
let handle;
|
|
172
|
+
for (;;) {
|
|
173
|
+
removeStaleLock(lockPath);
|
|
174
|
+
try {
|
|
175
|
+
handle = await fs.promises.open(lockPath, "wx", PRIVATE_FILE_MODE);
|
|
176
|
+
break;
|
|
177
|
+
} catch (error) {
|
|
178
|
+
if (!(error instanceof Error && "code" in error && error.code === "EEXIST")) throw error;
|
|
179
|
+
await new Promise((resolve) => setTimeout(resolve, LOCK_RETRY_INTERVAL_MS));
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
await handle.writeFile(`${JSON.stringify(record)}\n`);
|
|
183
|
+
const heartbeat = setInterval(() => {
|
|
184
|
+
if (readLockRecord(lockPath)?.token !== record.token) return;
|
|
185
|
+
const now = /* @__PURE__ */ new Date();
|
|
186
|
+
fs.utimesSync(lockPath, now, now);
|
|
187
|
+
}, Math.floor(STALE_LOCK_MS / 3));
|
|
188
|
+
heartbeat.unref();
|
|
189
|
+
return async () => {
|
|
190
|
+
clearInterval(heartbeat);
|
|
191
|
+
await handle.close();
|
|
192
|
+
if (readLockRecord(lockPath)?.token === record.token) await fs.promises.rm(lockPath, { force: true });
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
/** Refuses generated namespace redirection before a writer creates or prunes it. */
|
|
196
|
+
function assertSyncLocationSafe(location) {
|
|
197
|
+
const syncRoot = path.dirname(location.repositoryDirectory);
|
|
198
|
+
const doomRoot = path.dirname(syncRoot);
|
|
199
|
+
const piRoot = path.dirname(doomRoot);
|
|
200
|
+
const worktreesRoot = path.dirname(location.directory);
|
|
201
|
+
const registrationRoot = path.dirname(location.registrationPath);
|
|
202
|
+
for (const target of [
|
|
203
|
+
piRoot,
|
|
204
|
+
doomRoot,
|
|
205
|
+
syncRoot,
|
|
206
|
+
location.registrationsDirectory,
|
|
207
|
+
registrationRoot,
|
|
208
|
+
location.repositoryDirectory,
|
|
209
|
+
worktreesRoot,
|
|
210
|
+
location.directory
|
|
211
|
+
]) rejectSymlink(target);
|
|
212
|
+
}
|
|
213
|
+
/** Deletes one worktree's generated state without touching repository-shared build objects. */
|
|
214
|
+
function removeSyncLocation(location) {
|
|
215
|
+
assertSyncLocationSafe(location);
|
|
216
|
+
fs.rmSync(location.directory, {
|
|
217
|
+
recursive: true,
|
|
218
|
+
force: true
|
|
219
|
+
});
|
|
220
|
+
fs.rmSync(location.registrationPath, { force: true });
|
|
221
|
+
for (const directory of [path.dirname(location.registrationPath), path.dirname(location.directory)]) try {
|
|
222
|
+
fs.rmdirSync(directory);
|
|
223
|
+
} catch (error) {
|
|
224
|
+
const code = error.code;
|
|
225
|
+
if (code !== "ENOENT" && code !== "ENOTEMPTY") throw error;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
//#endregion
|
|
229
|
+
export { acquireSyncLocationLock, assertSyncLocationSafe, gitCommonDirectory, removeSyncLocation, resolveSyncLocation, resolveWorktreeSyncLocation, sanitizeSyncLabel, syncGenerationDirectory };
|
|
230
|
+
|
|
231
|
+
//# sourceMappingURL=syncLocation.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syncLocation.mjs","names":[],"sources":["../src/services/syncLocation/index.ts"],"sourcesContent":["import crypto from 'node:crypto';\nimport fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\n\nconst PI_DIRECTORY = '.pi';\nconst DOOM_CONFIG_DIRECTORY = '.doom';\nconst SYNC_DIRECTORY = 'sync';\nconst WORKTREES_DIRECTORY = 'worktrees';\nconst GENERATIONS_DIRECTORY = 'generations';\nconst REGISTRATIONS_DIRECTORY = 'registrations';\nconst SHARED_CACHE_DIRECTORY = 'shared-cache';\nconst LEGACY_DOOM_DIRECTORY = 'doom';\nconst GIT_DIRECTORY = '.git';\nconst COMMON_DIRECTORY_FILE = 'commondir';\nconst IDENTITY_HEX_LENGTH = 32;\nconst LABEL_MAX_LENGTH = 48;\nconst DEFAULT_REPOSITORY_LABEL = 'repo';\nconst DEFAULT_WORKTREE_LABEL = 'worktree';\nconst LOCK_FILE = '.sync.lock';\nconst STALE_LOCK_MS = 5 * 60 * 1000;\nconst LOCK_RETRY_INTERVAL_MS = 100;\nconst PRIVATE_DIRECTORY_MODE = 0o700;\nconst PRIVATE_FILE_MODE = 0o600;\n\nexport interface SyncIdentity {\n repositoryId: string;\n worktreeId: string;\n}\n\nexport interface SyncLocation {\n root: string;\n identity: SyncIdentity;\n repositoryLabel: string;\n worktreeLabel: string;\n generatedRoot: string;\n registrationsDirectory: string;\n registrationPath: string;\n repositoryDirectory: string;\n sharedCacheDirectory: string;\n directory: string;\n generationsDirectory: string;\n statePath: string;\n legacyDirectory: string;\n legacyStatePath: string;\n}\n\nfunction canonicalPath(target: string): string {\n const absolute = path.resolve(target);\n try {\n return fs.realpathSync.native(absolute);\n } catch {\n const parent = path.dirname(absolute);\n if (parent === absolute) return absolute;\n return path.join(canonicalPath(parent), path.basename(absolute));\n }\n}\n\nfunction readGitDirectory(repositoryRoot: string): string | undefined {\n const gitPath = path.join(repositoryRoot, GIT_DIRECTORY);\n try {\n const stat = fs.statSync(gitPath);\n if (stat.isDirectory()) return canonicalPath(gitPath);\n if (!stat.isFile()) return undefined;\n const match = /^gitdir:\\s*(.+)$/imu.exec(fs.readFileSync(gitPath, 'utf8').trim());\n return match?.[1] ? canonicalPath(path.resolve(repositoryRoot, match[1].trim())) : undefined;\n } catch {\n return undefined;\n }\n}\n\n/** The git data directory shared by every worktree of a repository, if the root is a git checkout. */\nexport function gitCommonDirectory(repositoryRoot: string): string | undefined {\n const gitDirectory = readGitDirectory(repositoryRoot);\n if (!gitDirectory) return undefined;\n try {\n const relative = fs.readFileSync(path.join(gitDirectory, COMMON_DIRECTORY_FILE), 'utf8').trim();\n return relative ? canonicalPath(path.resolve(gitDirectory, relative)) : gitDirectory;\n } catch {\n return gitDirectory;\n }\n}\n\nfunction identityHash(value: string): string {\n return crypto.createHash('sha256').update(value, 'utf8').digest('hex').slice(0, IDENTITY_HEX_LENGTH);\n}\n\nexport function sanitizeSyncLabel(value: string, fallback: string): string {\n const normalized = value\n .normalize('NFKD')\n .replace(/[\\u0300-\\u036f]/gu, '')\n .replace(/[^A-Za-z0-9._-]+/gu, '-')\n .replace(/^[._-]+|[._-]+$/gu, '')\n .slice(0, LABEL_MAX_LENGTH)\n .replace(/[._-]+$/gu, '');\n return normalized === '' || normalized === '.' || normalized === '..' ? fallback : normalized;\n}\n\nfunction repositoryLabel(commonDirectory: string | undefined, repositoryRoot: string): string {\n if (!commonDirectory) return sanitizeSyncLabel(path.basename(repositoryRoot), DEFAULT_REPOSITORY_LABEL);\n const base = path.basename(commonDirectory);\n const source = base === GIT_DIRECTORY ? path.basename(path.dirname(commonDirectory)) : base;\n return sanitizeSyncLabel(source, DEFAULT_REPOSITORY_LABEL);\n}\n\nfunction locationFor(root: string, commonDirectory: string | undefined, homeDirectory: string): SyncLocation {\n const repositoryToken = commonDirectory ? `git:${commonDirectory}` : `root:${root}`;\n const identity: SyncIdentity = {\n repositoryId: identityHash(repositoryToken),\n worktreeId: identityHash(`${repositoryToken}\\0worktree:${root}`),\n };\n const repoLabel = repositoryLabel(commonDirectory, root);\n const worktreeLabel = sanitizeSyncLabel(path.basename(root), DEFAULT_WORKTREE_LABEL);\n const generatedRoot = path.join(path.resolve(homeDirectory), PI_DIRECTORY, DOOM_CONFIG_DIRECTORY, SYNC_DIRECTORY);\n const registrationsDirectory = path.join(generatedRoot, REGISTRATIONS_DIRECTORY);\n const repositoryDirectory = path.join(generatedRoot, `${repoLabel}--${identity.repositoryId}`);\n const directory = path.join(repositoryDirectory, WORKTREES_DIRECTORY, `${worktreeLabel}--${identity.worktreeId}`);\n const legacyDirectory = path.join(root, PI_DIRECTORY, LEGACY_DOOM_DIRECTORY);\n return {\n root,\n identity,\n repositoryLabel: repoLabel,\n worktreeLabel,\n generatedRoot,\n registrationsDirectory,\n registrationPath: path.join(registrationsDirectory, identity.repositoryId, `${identity.worktreeId}.json`),\n repositoryDirectory,\n sharedCacheDirectory: path.join(repositoryDirectory, SHARED_CACHE_DIRECTORY),\n directory,\n generationsDirectory: path.join(directory, GENERATIONS_DIRECTORY),\n statePath: path.join(directory, 'state.json'),\n legacyDirectory,\n legacyStatePath: path.join(legacyDirectory, 'state.json'),\n };\n}\n\nexport function resolveSyncLocation(repositoryRoot: string, homeDirectory: string = os.homedir()): SyncLocation {\n const root = canonicalPath(repositoryRoot);\n return locationFor(root, gitCommonDirectory(root), homeDirectory);\n}\n\n/** Resolves a linked worktree namespace even after that worktree directory has been removed. */\nexport function resolveWorktreeSyncLocation(\n repositoryRoot: string,\n worktreeRoot: string,\n homeDirectory: string = os.homedir(),\n): SyncLocation {\n const commonDirectory = gitCommonDirectory(canonicalPath(repositoryRoot));\n if (commonDirectory === undefined) throw new Error('A Git repository is required to resolve worktree sync storage.');\n const root = canonicalPath(worktreeRoot);\n const targetCommonDirectory = gitCommonDirectory(root);\n if (targetCommonDirectory !== undefined && targetCommonDirectory !== commonDirectory) {\n throw new Error('The worktree belongs to a different Git repository.');\n }\n return locationFor(root, commonDirectory, homeDirectory);\n}\n\nconst GENERATION_ID = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/u;\n\n/** Resolves one immutable generation below its worktree namespace. */\nexport function syncGenerationDirectory(location: SyncLocation, generation: string): string {\n if (!GENERATION_ID.test(generation) || generation === '.' || generation === '..') {\n throw new Error(`Invalid Doom sync generation id: ${generation}`);\n }\n return path.join(location.generationsDirectory, generation);\n}\n\nfunction rejectSymlink(target: string): void {\n try {\n if (fs.lstatSync(target).isSymbolicLink()) {\n throw new Error(`Doom sync namespace must not contain a symbolic link: ${target}`);\n }\n } catch (error) {\n if (error instanceof Error && 'code' in error && error.code === 'ENOENT') return;\n throw error;\n }\n}\n\ninterface SyncLockRecord {\n pid: number;\n token: string;\n}\n\nfunction readLockRecord(lockPath: string): SyncLockRecord | undefined {\n try {\n const parsed = JSON.parse(fs.readFileSync(lockPath, 'utf8')) as { pid?: unknown; token?: unknown };\n return typeof parsed.pid === 'number' && typeof parsed.token === 'string'\n ? { pid: parsed.pid, token: parsed.token }\n : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction processIsAlive(processId: number): boolean {\n try {\n process.kill(processId, 0);\n return true;\n } catch (error) {\n return error instanceof Error && 'code' in error && error.code === 'EPERM';\n }\n}\n\nfunction removeStaleLock(lockPath: string): void {\n try {\n const stat = fs.statSync(lockPath);\n const record = readLockRecord(lockPath);\n if (record) {\n if (processIsAlive(record.pid)) return;\n } else if (Date.now() - stat.mtimeMs <= STALE_LOCK_MS) {\n // A publisher may have created the file but not written its record yet.\n return;\n }\n fs.rmSync(lockPath, { force: true });\n } catch (error) {\n if (!(error instanceof Error && 'code' in error && error.code === 'ENOENT')) throw error;\n }\n}\n\n/** Waits for and acquires the exclusive publisher lock for one worktree namespace. */\nexport async function acquireSyncLocationLock(location: SyncLocation): Promise<() => Promise<void>> {\n assertSyncLocationSafe(location);\n await fs.promises.mkdir(location.directory, { mode: PRIVATE_DIRECTORY_MODE, recursive: true });\n await fs.promises.chmod(location.directory, PRIVATE_DIRECTORY_MODE);\n const lockPath = path.join(location.directory, LOCK_FILE);\n const record: SyncLockRecord = { pid: process.pid, token: crypto.randomUUID() };\n let handle: fs.promises.FileHandle;\n for (;;) {\n removeStaleLock(lockPath);\n try {\n handle = await fs.promises.open(lockPath, 'wx', PRIVATE_FILE_MODE);\n break;\n } catch (error) {\n if (!(error instanceof Error && 'code' in error && error.code === 'EEXIST')) throw error;\n await new Promise((resolve) => setTimeout(resolve, LOCK_RETRY_INTERVAL_MS));\n }\n }\n await handle.writeFile(`${JSON.stringify(record)}\\n`);\n const heartbeat = setInterval(\n () => {\n if (readLockRecord(lockPath)?.token !== record.token) return;\n const now = new Date();\n fs.utimesSync(lockPath, now, now);\n },\n Math.floor(STALE_LOCK_MS / 3),\n );\n heartbeat.unref();\n return async () => {\n clearInterval(heartbeat);\n await handle.close();\n if (readLockRecord(lockPath)?.token === record.token) {\n await fs.promises.rm(lockPath, { force: true });\n }\n };\n}\n\n/** Refuses generated namespace redirection before a writer creates or prunes it. */\nexport function assertSyncLocationSafe(location: SyncLocation): void {\n const syncRoot = path.dirname(location.repositoryDirectory);\n const doomRoot = path.dirname(syncRoot);\n const piRoot = path.dirname(doomRoot);\n const worktreesRoot = path.dirname(location.directory);\n const registrationRoot = path.dirname(location.registrationPath);\n for (const target of [\n piRoot,\n doomRoot,\n syncRoot,\n location.registrationsDirectory,\n registrationRoot,\n location.repositoryDirectory,\n worktreesRoot,\n location.directory,\n ]) {\n rejectSymlink(target);\n }\n}\n\n/** Deletes one worktree's generated state without touching repository-shared build objects. */\nexport function removeSyncLocation(location: SyncLocation): void {\n assertSyncLocationSafe(location);\n fs.rmSync(location.directory, { recursive: true, force: true });\n fs.rmSync(location.registrationPath, { force: true });\n for (const directory of [path.dirname(location.registrationPath), path.dirname(location.directory)]) {\n try {\n fs.rmdirSync(directory);\n } catch (error) {\n const code = (error as NodeJS.ErrnoException).code;\n if (code !== 'ENOENT' && code !== 'ENOTEMPTY') throw error;\n }\n }\n}\n"],"mappings":";;;;;AAKA,MAAM,eAAe;AACrB,MAAM,wBAAwB;AAC9B,MAAM,iBAAiB;AACvB,MAAM,sBAAsB;AAC5B,MAAM,wBAAwB;AAC9B,MAAM,0BAA0B;AAChC,MAAM,yBAAyB;AAC/B,MAAM,wBAAwB;AAC9B,MAAM,gBAAgB;AACtB,MAAM,wBAAwB;AAC9B,MAAM,sBAAsB;AAC5B,MAAM,mBAAmB;AACzB,MAAM,2BAA2B;AACjC,MAAM,yBAAyB;AAC/B,MAAM,YAAY;AAClB,MAAM,gBAAgB;AACtB,MAAM,yBAAyB;AAC/B,MAAM,yBAAyB;AAC/B,MAAM,oBAAoB;AAwB1B,SAAS,cAAc,QAAwB;CAC7C,MAAM,WAAW,KAAK,QAAQ,MAAM;CACpC,IAAI;EACF,OAAO,GAAG,aAAa,OAAO,QAAQ;CACxC,QAAQ;EACN,MAAM,SAAS,KAAK,QAAQ,QAAQ;EACpC,IAAI,WAAW,UAAU,OAAO;EAChC,OAAO,KAAK,KAAK,cAAc,MAAM,GAAG,KAAK,SAAS,QAAQ,CAAC;CACjE;AACF;AAEA,SAAS,iBAAiB,gBAA4C;CACpE,MAAM,UAAU,KAAK,KAAK,gBAAgB,aAAa;CACvD,IAAI;EACF,MAAM,OAAO,GAAG,SAAS,OAAO;EAChC,IAAI,KAAK,YAAY,GAAG,OAAO,cAAc,OAAO;EACpD,IAAI,CAAC,KAAK,OAAO,GAAG,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