@agimon-ai/po-core 0.0.0-alpha.21 → 0.0.0-alpha.210
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 -149
- package/NOTICE +1 -1
- package/README.md +40 -3
- package/dist/agentModel.cjs +4 -0
- package/dist/agentModel.d.mts +3 -1
- package/dist/agentModel.mjs +3 -1
- package/dist/apiContracts.cjs +631 -326
- package/dist/apiContracts.cjs.map +1 -1
- package/dist/apiContracts.d.mts +1252 -149
- package/dist/apiContracts.d.mts.map +1 -1
- package/dist/apiContracts.mjs +626 -323
- package/dist/apiContracts.mjs.map +1 -1
- package/dist/approval.cjs +17 -0
- package/dist/approval.d.mts +5 -0
- package/dist/approval.mjs +4 -0
- package/dist/backgroundWork.cjs +5 -0
- package/dist/backgroundWork.d.mts +2 -2
- package/dist/backgroundWork.mjs +1 -1
- package/dist/bundlePublicationWorker.cjs +30 -0
- package/dist/bundlePublicationWorker.cjs.map +1 -0
- package/dist/bundlePublicationWorker.d.mts +1 -0
- package/dist/bundlePublicationWorker.mjs +28 -0
- package/dist/bundlePublicationWorker.mjs.map +1 -0
- package/dist/childSession.d.mts +3 -2
- package/dist/clientDevices.cjs +4 -0
- package/dist/clientDevices.d.mts +3 -0
- package/dist/clientDevices.mjs +1 -0
- package/dist/clientMetadata.cjs +13 -0
- package/dist/clientMetadata.d.mts +4 -0
- package/dist/clientMetadata.mjs +3 -0
- package/dist/codemode.cjs +7 -0
- package/dist/codemode.d.mts +2 -0
- package/dist/codemode.mjs +1 -0
- package/dist/contextDetailStore.cjs +20 -12
- package/dist/contextDetailStore.cjs.map +1 -1
- package/dist/contextDetailStore.d.mts +7 -4
- package/dist/contextDetailStore.d.mts.map +1 -1
- package/dist/contextDetailStore.mjs +19 -11
- package/dist/contextDetailStore.mjs.map +1 -1
- package/dist/contextProjection.cjs +68 -8
- package/dist/contextProjection.cjs.map +1 -1
- package/dist/contextProjection.d.mts +34 -10
- package/dist/contextProjection.d.mts.map +1 -1
- package/dist/contextProjection.mjs +65 -9
- package/dist/contextProjection.mjs.map +1 -1
- package/dist/delegation.cjs +3 -0
- package/dist/delegation.d.mts +2 -2
- package/dist/delegation.mjs +1 -1
- package/dist/executionBudget.cjs +13 -5
- package/dist/executionBudget.cjs.map +1 -1
- package/dist/executionBudget.d.mts.map +1 -1
- package/dist/executionBudget.mjs +13 -5
- package/dist/executionBudget.mjs.map +1 -1
- package/dist/extensionFile.cjs +1 -2
- package/dist/extensionFile.d.mts +4 -4
- package/dist/extensionFile.mjs +3 -3
- package/dist/headless.cjs +22 -0
- package/dist/headless.d.mts +6 -2
- package/dist/headless.mjs +5 -1
- package/dist/headlessHub.cjs +941 -137
- package/dist/headlessHub.cjs.map +1 -1
- package/dist/headlessHub.d.mts +133 -25
- package/dist/headlessHub.d.mts.map +1 -1
- package/dist/headlessHub.mjs +938 -135
- package/dist/headlessHub.mjs.map +1 -1
- package/dist/headlessProtocol.cjs +331 -74
- package/dist/headlessProtocol.cjs.map +1 -1
- package/dist/headlessProtocol.d.mts +29 -3
- package/dist/headlessProtocol.d.mts.map +1 -1
- package/dist/headlessProtocol.mjs +335 -79
- package/dist/headlessProtocol.mjs.map +1 -1
- package/dist/headlessServer.cjs +1057 -219
- package/dist/headlessServer.cjs.map +1 -1
- package/dist/headlessServer.d.mts +140 -14
- package/dist/headlessServer.d.mts.map +1 -1
- package/dist/headlessServer.mjs +1057 -219
- package/dist/headlessServer.mjs.map +1 -1
- package/dist/headlessSessionHost.d.mts +65 -24
- package/dist/headlessSessionHost.d.mts.map +1 -1
- package/dist/headlessSessionManager.cjs +23 -16
- package/dist/headlessSessionManager.cjs.map +1 -1
- package/dist/headlessSessionManager.d.mts +1 -1
- package/dist/headlessSessionManager.d.mts.map +1 -1
- package/dist/headlessSessionManager.mjs +23 -16
- package/dist/headlessSessionManager.mjs.map +1 -1
- package/dist/help.cjs +6 -0
- package/dist/help.d.mts +2 -2
- package/dist/help.mjs +2 -2
- package/dist/history.cjs +7 -0
- package/dist/history.d.mts +5 -3
- package/dist/history.mjs +5 -2
- package/dist/historyOwnership.cjs +100 -71
- package/dist/historyOwnership.cjs.map +1 -1
- package/dist/historyOwnership.d.mts.map +1 -1
- package/dist/historyOwnership.mjs +103 -75
- package/dist/historyOwnership.mjs.map +1 -1
- package/dist/hubChannel.cjs +32 -0
- package/dist/hubChannel.d.mts +5 -3
- package/dist/hubChannel.mjs +5 -3
- package/dist/images.cjs +15 -0
- package/dist/images.d.mts +2 -0
- package/dist/images.mjs +1 -0
- package/dist/index.cjs +27 -0
- package/dist/index.d.mts +7 -3
- package/dist/index.mjs +7 -3
- package/dist/inputTemplate.cjs +5 -0
- package/dist/inputTemplate.d.mts +3 -0
- package/dist/inputTemplate.mjs +1 -0
- package/dist/interop/piCodingAgent.mjs +1 -0
- package/dist/lintReview.cjs +4 -0
- package/dist/lintReview.d.mts +2 -0
- package/dist/lintReview.mjs +1 -0
- package/dist/locale.cjs +19 -0
- package/dist/locale.d.mts +3 -0
- package/dist/locale.mjs +3 -0
- package/dist/machineApi.cjs +30 -81
- package/dist/machineApi.cjs.map +1 -1
- package/dist/machineApi.d.mts +1 -1
- package/dist/machineApi.d.mts.map +1 -1
- package/dist/machineApi.mjs +30 -79
- package/dist/machineApi.mjs.map +1 -1
- package/dist/main.cjs +6 -1
- package/dist/main.d.mts +3 -3
- package/dist/main.mjs +3 -3
- package/dist/mcp.cjs +7 -0
- package/dist/mcp.d.mts +2 -0
- package/dist/mcp.mjs +1 -0
- package/dist/mcpProjection.cjs +1 -0
- package/dist/mcpProjection.d.mts +2 -2
- package/dist/mcpProjection.mjs +1 -1
- package/dist/mcpSchemaCost.cjs +10 -10
- package/dist/mcpSchemaCost.cjs.map +1 -1
- package/dist/mcpSchemaCost.mjs +9 -9
- package/dist/mcpSchemaCost.mjs.map +1 -1
- package/dist/modelGateway.cjs +33 -0
- package/dist/modelGateway.d.mts +13 -0
- package/dist/modelGateway.mjs +10 -0
- package/dist/moduleResolution.cjs +18 -18
- package/dist/moduleResolution.cjs.map +1 -1
- package/dist/moduleResolution.d.mts +4 -4
- package/dist/moduleResolution.d.mts.map +1 -1
- package/dist/moduleResolution.mjs +17 -17
- package/dist/moduleResolution.mjs.map +1 -1
- package/dist/native.cjs +99 -13
- package/dist/native.d.mts +26 -9
- package/dist/native.mjs +20 -4
- package/dist/nodePlatform.cjs +42 -4
- package/dist/nodePlatform.cjs.map +1 -1
- package/dist/nodePlatform.d.mts +5 -0
- package/dist/nodePlatform.d.mts.map +1 -1
- package/dist/nodePlatform.mjs +42 -5
- package/dist/nodePlatform.mjs.map +1 -1
- package/dist/notification.cjs +1 -0
- package/dist/notification.d.mts +2 -2
- package/dist/notification.mjs +1 -1
- package/dist/operationHook.cjs +3 -0
- package/dist/operationHook.d.mts +2 -0
- package/dist/operationHook.mjs +1 -0
- package/dist/packageApi.cjs +9 -0
- package/dist/packageApi.d.mts +4 -2
- package/dist/packageApi.mjs +3 -2
- package/dist/packageApiServer.cjs +148 -40
- package/dist/packageApiServer.cjs.map +1 -1
- package/dist/packageApiServer.d.mts +34 -6
- package/dist/packageApiServer.d.mts.map +1 -1
- package/dist/packageApiServer.mjs +140 -36
- package/dist/packageApiServer.mjs.map +1 -1
- package/dist/pairingPage.cjs +6 -0
- package/dist/pairingPage.d.mts +2 -0
- package/dist/pairingPage.mjs +1 -0
- package/dist/personTimeZone.cjs +7 -0
- package/dist/personTimeZone.d.mts +2 -0
- package/dist/personTimeZone.mjs +1 -0
- package/dist/piSettings.cjs +2 -0
- package/dist/piSettings.d.mts +3 -3
- package/dist/piSettings.mjs +3 -3
- package/dist/platform.cjs +47 -2
- package/dist/platform.d.mts +11 -6
- package/dist/platform.mjs +11 -6
- package/dist/pluginProtocol.cjs +15 -0
- package/dist/pluginProtocol.d.mts +2 -2
- package/dist/pluginProtocol.mjs +1 -1
- package/dist/po-runtime-identity.json +1 -0
- package/dist/protocolTransport.cjs +7 -0
- package/dist/protocolTransport.d.mts +3 -0
- package/dist/protocolTransport.mjs +3 -0
- package/dist/providerAuth.cjs +8 -0
- package/dist/providerAuth.d.mts +4 -0
- package/dist/providerAuth.mjs +3 -0
- package/dist/remoteChildSession.cjs +6 -0
- package/dist/remoteChildSession.d.mts +3 -0
- package/dist/remoteChildSession.mjs +1 -0
- package/dist/remoteContract.cjs +42 -0
- package/dist/remoteContract.d.mts +4 -0
- package/dist/remoteContract.mjs +3 -0
- package/dist/remoteOrigin.cjs +4 -0
- package/dist/remoteOrigin.d.mts +2 -0
- package/dist/remoteOrigin.mjs +1 -0
- package/dist/runtimeContextApi.cjs +1 -1
- package/dist/runtimeContextApi.cjs.map +1 -1
- package/dist/runtimeContextApi.mjs +1 -1
- package/dist/runtimeContextApi.mjs.map +1 -1
- package/dist/runtimeCordisHost.cjs +9 -8
- package/dist/runtimeCordisHost.cjs.map +1 -1
- package/dist/runtimeCordisHost.d.mts +1 -1
- package/dist/runtimeCordisHost.d.mts.map +1 -1
- package/dist/runtimeCordisHost.mjs +3 -2
- package/dist/runtimeCordisHost.mjs.map +1 -1
- package/dist/runtimeEnvironment.cjs +6 -0
- package/dist/runtimeEnvironment.d.mts +2 -0
- package/dist/runtimeEnvironment.mjs +1 -0
- package/dist/runtimeHeadlessSessionManager.d.mts +1 -0
- package/dist/runtimeHeadlessSessionManager.d.mts.map +1 -1
- package/dist/runtimeIdentity.cjs.map +1 -1
- package/dist/runtimeIdentity.d.mts +1 -1
- package/dist/runtimeIdentity.mjs.map +1 -1
- package/dist/runtimeLogSinkTelemetry.cjs +4 -4
- package/dist/runtimeLogSinkTelemetry.cjs.map +1 -1
- package/dist/runtimeLogSinkTelemetry.d.mts +4 -3
- package/dist/runtimeLogSinkTelemetry.d.mts.map +1 -1
- package/dist/runtimeLogSinkTelemetry.mjs +4 -4
- package/dist/runtimeLogSinkTelemetry.mjs.map +1 -1
- package/dist/runtimePackages.cjs +27 -22
- package/dist/runtimePackages.cjs.map +1 -1
- package/dist/runtimePackages.d.mts +9 -1
- package/dist/runtimePackages.d.mts.map +1 -1
- package/dist/runtimePackages.mjs +26 -21
- package/dist/runtimePackages.mjs.map +1 -1
- package/dist/runtimePiSettings.cjs +2 -0
- package/dist/runtimePiSettings.d.mts +3 -3
- package/dist/runtimePiSettings.mjs +3 -3
- package/dist/runtimeTransition.cjs.map +1 -1
- package/dist/runtimeTransition.d.mts +7 -7
- package/dist/runtimeTransition.d.mts.map +1 -1
- package/dist/runtimeTransition.mjs.map +1 -1
- package/dist/sandboxIdentity.cjs +5 -0
- package/dist/sandboxIdentity.d.mts +2 -0
- package/dist/sandboxIdentity.mjs +1 -0
- package/dist/server.d.mts +3 -3
- package/dist/serverPlugin.cjs +45 -6
- package/dist/serverPlugin.d.mts +18 -5
- package/dist/serverPlugin.mjs +16 -3
- package/dist/serverTelemetry.cjs +2 -2
- package/dist/serverTelemetry.cjs.map +1 -1
- package/dist/serverTelemetry.d.mts +2 -1
- package/dist/serverTelemetry.d.mts.map +1 -1
- package/dist/serverTelemetry.mjs +1 -1
- package/dist/serverTelemetry.mjs.map +1 -1
- package/dist/sessionFilesApi.cjs +17 -6
- package/dist/sessionFilesApi.cjs.map +1 -1
- package/dist/sessionFilesApi.d.mts.map +1 -1
- package/dist/sessionFilesApi.mjs +17 -6
- package/dist/sessionFilesApi.mjs.map +1 -1
- package/dist/sessionMcpContract.cjs +18 -0
- package/dist/sessionMcpContract.d.mts +5 -0
- package/dist/sessionMcpContract.mjs +1 -0
- package/dist/sessionProtocol.cjs +24 -2
- package/dist/sessionProtocol.d.mts +6 -5
- package/dist/sessionProtocol.mjs +6 -5
- package/dist/skills.cjs +4 -0
- package/dist/skills.d.mts +2 -1
- package/dist/skills.mjs +3 -1
- package/dist/sqliteSessionStorage.cjs +20 -13
- package/dist/sqliteSessionStorage.cjs.map +1 -1
- package/dist/sqliteSessionStorage.d.mts +3 -3
- package/dist/sqliteSessionStorage.d.mts.map +1 -1
- package/dist/sqliteSessionStorage.mjs +19 -12
- package/dist/sqliteSessionStorage.mjs.map +1 -1
- package/dist/src/constants/agentSettled.d.mts +5 -0
- package/dist/src/constants/agentSettled.d.mts.map +1 -0
- package/dist/src/constants/cloud.cjs +11 -0
- package/dist/src/constants/cloud.cjs.map +1 -0
- package/dist/src/constants/cloud.d.mts +9 -0
- package/dist/src/constants/cloud.d.mts.map +1 -0
- package/dist/src/constants/cloud.mjs +11 -0
- package/dist/src/constants/cloud.mjs.map +1 -0
- package/dist/src/constants/fixedCore.cjs +38 -0
- package/dist/src/constants/fixedCore.cjs.map +1 -0
- package/dist/src/constants/fixedCore.d.mts +12 -0
- package/dist/src/constants/fixedCore.d.mts.map +1 -0
- package/dist/src/constants/fixedCore.mjs +38 -0
- package/dist/src/constants/fixedCore.mjs.map +1 -0
- package/dist/src/constants/globalSettings.cjs +10 -0
- package/dist/src/constants/globalSettings.cjs.map +1 -0
- package/dist/src/constants/globalSettings.d.mts +8 -0
- package/dist/src/constants/globalSettings.d.mts.map +1 -0
- package/dist/src/constants/globalSettings.mjs +10 -0
- package/dist/src/constants/globalSettings.mjs.map +1 -0
- package/dist/src/constants/modelGateway.cjs +48 -0
- package/dist/src/constants/modelGateway.cjs.map +1 -0
- package/dist/src/constants/modelGateway.d.mts +29 -0
- package/dist/src/constants/modelGateway.d.mts.map +1 -0
- package/dist/src/constants/modelGateway.mjs +42 -0
- package/dist/src/constants/modelGateway.mjs.map +1 -0
- package/dist/src/constants/nativeHost.cjs +11 -1
- package/dist/src/constants/nativeHost.cjs.map +1 -1
- package/dist/src/constants/nativeHost.d.mts +1 -1
- package/dist/src/constants/nativeHost.d.mts.map +1 -1
- package/dist/src/constants/nativeHost.mjs +11 -1
- package/dist/src/constants/nativeHost.mjs.map +1 -1
- package/dist/src/constants/remote.cjs +26 -14
- package/dist/src/constants/remote.cjs.map +1 -1
- package/dist/src/constants/remote.d.mts +105 -0
- package/dist/src/constants/remote.d.mts.map +1 -0
- package/dist/src/constants/remote.mjs +18 -10
- package/dist/src/constants/remote.mjs.map +1 -1
- package/dist/src/constants/sessionFiles.cjs +3 -0
- package/dist/src/constants/sessionFiles.cjs.map +1 -1
- package/dist/src/constants/sessionFiles.d.mts +9 -0
- package/dist/src/constants/sessionFiles.d.mts.map +1 -0
- package/dist/src/constants/sessionFiles.mjs +3 -1
- package/dist/src/constants/sessionFiles.mjs.map +1 -1
- package/dist/src/constants/template.cjs +13 -0
- package/dist/src/constants/template.cjs.map +1 -0
- package/dist/src/constants/template.d.mts +9 -0
- package/dist/src/constants/template.d.mts.map +1 -0
- package/dist/src/constants/template.mjs +11 -0
- package/dist/src/constants/template.mjs.map +1 -0
- package/dist/src/extensions/extensionFile.cjs +9 -10
- package/dist/src/extensions/extensionFile.cjs.map +1 -1
- package/dist/src/extensions/extensionFile.d.mts +16 -8
- package/dist/src/extensions/extensionFile.d.mts.map +1 -1
- package/dist/src/extensions/extensionFile.mjs +10 -10
- package/dist/src/extensions/extensionFile.mjs.map +1 -1
- package/dist/src/extensions/serverPlugin.cjs +55 -7
- package/dist/src/extensions/serverPlugin.cjs.map +1 -1
- package/dist/src/extensions/serverPlugin.d.mts +1 -1
- package/dist/src/extensions/serverPlugin.d.mts.map +1 -1
- package/dist/src/extensions/serverPlugin.mjs +53 -5
- package/dist/src/extensions/serverPlugin.mjs.map +1 -1
- package/dist/src/extensions/webPlugin.cjs +25 -2
- package/dist/src/extensions/webPlugin.cjs.map +1 -1
- package/dist/src/extensions/webPlugin.d.mts +10 -2
- package/dist/src/extensions/webPlugin.d.mts.map +1 -1
- package/dist/src/extensions/webPlugin.mjs +21 -2
- package/dist/src/extensions/webPlugin.mjs.map +1 -1
- package/dist/src/pi/piSessionRuntime.cjs +299 -132
- package/dist/src/pi/piSessionRuntime.cjs.map +1 -1
- package/dist/src/pi/piSessionRuntime.d.mts +45 -9
- package/dist/src/pi/piSessionRuntime.d.mts.map +1 -1
- package/dist/src/pi/piSessionRuntime.mjs +299 -133
- package/dist/src/pi/piSessionRuntime.mjs.map +1 -1
- package/dist/src/schemas/agentModel.cjs +1 -1
- package/dist/src/schemas/agentModel.cjs.map +1 -1
- package/dist/src/schemas/agentModel.d.mts +1 -1
- package/dist/src/schemas/agentModel.mjs +1 -1
- package/dist/src/schemas/agentModel.mjs.map +1 -1
- package/dist/src/schemas/agentRun.cjs +16 -0
- package/dist/src/schemas/agentRun.cjs.map +1 -0
- package/dist/src/schemas/agentRun.d.mts +48 -0
- package/dist/src/schemas/agentRun.d.mts.map +1 -0
- package/dist/src/schemas/agentRun.mjs +14 -0
- package/dist/src/schemas/agentRun.mjs.map +1 -0
- package/dist/src/schemas/apiContracts.d.mts +2 -2
- package/dist/src/schemas/apiContracts.d.mts.map +1 -1
- package/dist/src/schemas/approval.cjs +21 -0
- package/dist/src/schemas/approval.cjs.map +1 -0
- package/dist/src/schemas/approval.d.mts +82 -0
- package/dist/src/schemas/approval.d.mts.map +1 -0
- package/dist/src/schemas/approval.mjs +15 -0
- package/dist/src/schemas/approval.mjs.map +1 -0
- package/dist/src/schemas/approvalPrompt.cjs +103 -0
- package/dist/src/schemas/approvalPrompt.cjs.map +1 -0
- package/dist/src/schemas/approvalPrompt.d.mts +83 -0
- package/dist/src/schemas/approvalPrompt.d.mts.map +1 -0
- package/dist/src/schemas/approvalPrompt.mjs +99 -0
- package/dist/src/schemas/approvalPrompt.mjs.map +1 -0
- package/dist/src/schemas/askUser.d.mts.map +1 -1
- package/dist/src/schemas/backgroundWork.cjs +24 -2
- package/dist/src/schemas/backgroundWork.cjs.map +1 -1
- package/dist/src/schemas/backgroundWork.d.mts +11 -1
- package/dist/src/schemas/backgroundWork.d.mts.map +1 -1
- package/dist/src/schemas/backgroundWork.mjs +20 -3
- package/dist/src/schemas/backgroundWork.mjs.map +1 -1
- package/dist/src/schemas/brain.cjs +43 -0
- package/dist/src/schemas/brain.cjs.map +1 -0
- package/dist/src/schemas/brain.d.mts +107 -0
- package/dist/src/schemas/brain.d.mts.map +1 -0
- package/dist/src/schemas/brain.mjs +43 -0
- package/dist/src/schemas/brain.mjs.map +1 -0
- package/dist/src/schemas/childProcess.cjs +2 -1
- package/dist/src/schemas/childProcess.cjs.map +1 -1
- package/dist/src/schemas/childProcess.d.mts +1 -1
- package/dist/src/schemas/childProcess.d.mts.map +1 -1
- package/dist/src/schemas/childProcess.mjs +2 -1
- package/dist/src/schemas/childProcess.mjs.map +1 -1
- package/dist/src/schemas/childReport.cjs +42 -0
- package/dist/src/schemas/childReport.cjs.map +1 -0
- package/dist/src/schemas/childReport.d.mts +96 -0
- package/dist/src/schemas/childReport.d.mts.map +1 -0
- package/dist/src/schemas/childReport.mjs +35 -0
- package/dist/src/schemas/childReport.mjs.map +1 -0
- package/dist/src/schemas/clientDevices.d.mts +25 -0
- package/dist/src/schemas/clientDevices.d.mts.map +1 -0
- package/dist/src/schemas/clientMetadata.d.mts +27 -0
- package/dist/src/schemas/clientMetadata.d.mts.map +1 -0
- package/dist/src/schemas/codemode.cjs +34 -0
- package/dist/src/schemas/codemode.cjs.map +1 -0
- package/dist/src/schemas/codemode.d.mts +162 -0
- package/dist/src/schemas/codemode.d.mts.map +1 -0
- package/dist/src/schemas/codemode.mjs +30 -0
- package/dist/src/schemas/codemode.mjs.map +1 -0
- package/dist/src/schemas/delegation.cjs +35 -3
- package/dist/src/schemas/delegation.cjs.map +1 -1
- package/dist/src/schemas/delegation.d.mts +23 -0
- package/dist/src/schemas/delegation.d.mts.map +1 -1
- package/dist/src/schemas/delegation.mjs +33 -4
- package/dist/src/schemas/delegation.mjs.map +1 -1
- package/dist/src/schemas/extensionFile.d.mts +11 -5
- package/dist/src/schemas/extensionFile.d.mts.map +1 -1
- package/dist/src/schemas/federation.cjs +50 -0
- package/dist/src/schemas/federation.cjs.map +1 -0
- package/dist/src/schemas/federation.d.mts +376 -0
- package/dist/src/schemas/federation.d.mts.map +1 -0
- package/dist/src/schemas/federation.mjs +44 -0
- package/dist/src/schemas/federation.mjs.map +1 -0
- package/dist/src/schemas/headless.cjs +153 -5
- package/dist/src/schemas/headless.cjs.map +1 -1
- package/dist/src/schemas/headless.d.mts +409 -20
- package/dist/src/schemas/headless.d.mts.map +1 -1
- package/dist/src/schemas/headless.mjs +143 -6
- package/dist/src/schemas/headless.mjs.map +1 -1
- package/dist/src/schemas/help.cjs +22 -3
- package/dist/src/schemas/help.cjs.map +1 -1
- package/dist/src/schemas/help.d.mts +70 -3
- package/dist/src/schemas/help.d.mts.map +1 -1
- package/dist/src/schemas/help.mjs +17 -4
- package/dist/src/schemas/help.mjs.map +1 -1
- package/dist/src/schemas/home.cjs +35 -12
- package/dist/src/schemas/home.cjs.map +1 -1
- package/dist/src/schemas/home.d.mts +6 -0
- package/dist/src/schemas/home.d.mts.map +1 -1
- package/dist/src/schemas/home.mjs +34 -13
- package/dist/src/schemas/home.mjs.map +1 -1
- package/dist/src/schemas/hostServiceContracts.cjs +39 -0
- package/dist/src/schemas/hostServiceContracts.cjs.map +1 -0
- package/dist/src/schemas/hostServiceContracts.d.mts +26 -0
- package/dist/src/schemas/hostServiceContracts.d.mts.map +1 -0
- package/dist/src/schemas/hostServiceContracts.mjs +39 -0
- package/dist/src/schemas/hostServiceContracts.mjs.map +1 -0
- package/dist/src/schemas/hostServices.cjs +14 -0
- package/dist/src/schemas/hostServices.cjs.map +1 -0
- package/dist/src/schemas/hostServices.d.mts +45 -0
- package/dist/src/schemas/hostServices.d.mts.map +1 -0
- package/dist/src/schemas/hostServices.mjs +12 -0
- package/dist/src/schemas/hostServices.mjs.map +1 -0
- package/dist/src/schemas/hostTeam.cjs +15 -0
- package/dist/src/schemas/hostTeam.cjs.map +1 -0
- package/dist/src/schemas/hostTeam.d.mts +64 -0
- package/dist/src/schemas/hostTeam.d.mts.map +1 -0
- package/dist/src/schemas/hostTeam.mjs +13 -0
- package/dist/src/schemas/hostTeam.mjs.map +1 -0
- package/dist/src/schemas/httpApiContracts.cjs +282 -18
- package/dist/src/schemas/httpApiContracts.cjs.map +1 -1
- package/dist/src/schemas/httpApiContracts.mjs +282 -18
- package/dist/src/schemas/httpApiContracts.mjs.map +1 -1
- package/dist/src/schemas/hubChannel.cjs +132 -0
- package/dist/src/schemas/hubChannel.cjs.map +1 -1
- package/dist/src/schemas/hubChannel.d.mts +366 -15
- package/dist/src/schemas/hubChannel.d.mts.map +1 -1
- package/dist/src/schemas/hubChannel.mjs +116 -1
- package/dist/src/schemas/hubChannel.mjs.map +1 -1
- package/dist/src/schemas/humanIdentity.cjs +16 -0
- package/dist/src/schemas/humanIdentity.cjs.map +1 -0
- package/dist/src/schemas/humanIdentity.d.mts +39 -0
- package/dist/src/schemas/humanIdentity.d.mts.map +1 -0
- package/dist/src/schemas/humanIdentity.mjs +14 -0
- package/dist/src/schemas/humanIdentity.mjs.map +1 -0
- package/dist/src/schemas/identity.cjs +34 -0
- package/dist/src/schemas/identity.cjs.map +1 -0
- package/dist/src/schemas/identity.d.mts +193 -0
- package/dist/src/schemas/identity.d.mts.map +1 -0
- package/dist/src/schemas/identity.mjs +30 -0
- package/dist/src/schemas/identity.mjs.map +1 -0
- package/dist/src/schemas/lang.cjs +34 -0
- package/dist/src/schemas/lang.cjs.map +1 -0
- package/dist/src/schemas/lang.d.mts +37 -0
- package/dist/src/schemas/lang.d.mts.map +1 -0
- package/dist/src/schemas/lang.mjs +27 -0
- package/dist/src/schemas/lang.mjs.map +1 -0
- package/dist/src/schemas/leader.cjs +1 -1
- package/dist/src/schemas/leader.cjs.map +1 -1
- package/dist/src/schemas/leader.d.mts +1 -1
- package/dist/src/schemas/leader.d.mts.map +1 -1
- package/dist/src/schemas/leader.mjs +1 -1
- package/dist/src/schemas/leader.mjs.map +1 -1
- package/dist/src/schemas/lintReview.cjs +14 -0
- package/dist/src/schemas/lintReview.cjs.map +1 -0
- package/dist/src/schemas/lintReview.d.mts +75 -0
- package/dist/src/schemas/lintReview.d.mts.map +1 -0
- package/dist/src/schemas/lintReview.mjs +13 -0
- package/dist/src/schemas/lintReview.mjs.map +1 -0
- package/dist/src/schemas/locale.cjs +116 -0
- package/dist/src/schemas/locale.cjs.map +1 -0
- package/dist/src/schemas/locale.d.mts +40 -0
- package/dist/src/schemas/locale.d.mts.map +1 -0
- package/dist/src/schemas/locale.mjs +108 -0
- package/dist/src/schemas/locale.mjs.map +1 -0
- package/dist/src/schemas/mcp.cjs +17 -0
- package/dist/src/schemas/mcp.cjs.map +1 -0
- package/dist/src/schemas/mcp.d.mts +112 -0
- package/dist/src/schemas/mcp.d.mts.map +1 -0
- package/dist/src/schemas/mcp.mjs +13 -0
- package/dist/src/schemas/mcp.mjs.map +1 -0
- package/dist/src/schemas/mcpFacet.cjs.map +1 -1
- package/dist/src/schemas/mcpFacet.d.mts +4 -3
- package/dist/src/schemas/mcpFacet.d.mts.map +1 -1
- package/dist/src/schemas/mcpFacet.mjs.map +1 -1
- package/dist/src/schemas/mcpProjection.cjs +11 -1
- package/dist/src/schemas/mcpProjection.cjs.map +1 -1
- package/dist/src/schemas/mcpProjection.d.mts +10 -4
- package/dist/src/schemas/mcpProjection.d.mts.map +1 -1
- package/dist/src/schemas/mcpProjection.mjs +11 -2
- package/dist/src/schemas/mcpProjection.mjs.map +1 -1
- package/dist/src/schemas/mcpSession.d.mts +1 -1
- package/dist/src/schemas/modelGateway.cjs +143 -0
- package/dist/src/schemas/modelGateway.cjs.map +1 -0
- package/dist/src/schemas/modelGateway.d.mts +150 -0
- package/dist/src/schemas/modelGateway.d.mts.map +1 -0
- package/dist/src/schemas/modelGateway.mjs +135 -0
- package/dist/src/schemas/modelGateway.mjs.map +1 -0
- package/dist/src/schemas/narration.d.mts.map +1 -1
- package/dist/src/schemas/notification.cjs +59 -5
- package/dist/src/schemas/notification.cjs.map +1 -1
- package/dist/src/schemas/notification.d.mts +26 -0
- package/dist/src/schemas/notification.d.mts.map +1 -1
- package/dist/src/schemas/notification.mjs +59 -6
- package/dist/src/schemas/notification.mjs.map +1 -1
- package/dist/src/schemas/operationHook.cjs +180 -0
- package/dist/src/schemas/operationHook.cjs.map +1 -0
- package/dist/src/schemas/operationHook.d.mts +141 -0
- package/dist/src/schemas/operationHook.d.mts.map +1 -0
- package/dist/src/schemas/operationHook.mjs +180 -0
- package/dist/src/schemas/operationHook.mjs.map +1 -0
- package/dist/src/schemas/packageApi.cjs +76 -7
- package/dist/src/schemas/packageApi.cjs.map +1 -1
- package/dist/src/schemas/packageApi.d.mts +174 -30
- package/dist/src/schemas/packageApi.d.mts.map +1 -1
- package/dist/src/schemas/packageApi.mjs +70 -8
- package/dist/src/schemas/packageApi.mjs.map +1 -1
- package/dist/src/schemas/personTimeZone.cjs +29 -0
- package/dist/src/schemas/personTimeZone.cjs.map +1 -0
- package/dist/src/schemas/personTimeZone.d.mts +33 -0
- package/dist/src/schemas/personTimeZone.d.mts.map +1 -0
- package/dist/src/schemas/personTimeZone.mjs +25 -0
- package/dist/src/schemas/personTimeZone.mjs.map +1 -0
- package/dist/src/schemas/platform.cjs +48 -0
- package/dist/src/schemas/platform.cjs.map +1 -1
- package/dist/src/schemas/platform.d.mts +355 -11
- package/dist/src/schemas/platform.d.mts.map +1 -1
- package/dist/src/schemas/platform.mjs +34 -1
- package/dist/src/schemas/platform.mjs.map +1 -1
- package/dist/src/schemas/pluginCatalog.cjs +42 -0
- package/dist/src/schemas/pluginCatalog.cjs.map +1 -0
- package/dist/src/schemas/pluginCatalog.d.mts +67 -0
- package/dist/src/schemas/pluginCatalog.d.mts.map +1 -0
- package/dist/src/schemas/pluginCatalog.mjs +39 -0
- package/dist/src/schemas/pluginCatalog.mjs.map +1 -0
- package/dist/src/schemas/pluginContributions.cjs.map +1 -1
- package/dist/src/schemas/pluginContributions.d.mts +5 -2
- package/dist/src/schemas/pluginContributions.d.mts.map +1 -1
- package/dist/src/schemas/pluginContributions.mjs.map +1 -1
- package/dist/src/schemas/pluginProtocol.cjs +110 -10
- package/dist/src/schemas/pluginProtocol.cjs.map +1 -1
- package/dist/src/schemas/pluginProtocol.d.mts +63 -5
- package/dist/src/schemas/pluginProtocol.d.mts.map +1 -1
- package/dist/src/schemas/pluginProtocol.mjs +96 -11
- package/dist/src/schemas/pluginProtocol.mjs.map +1 -1
- package/dist/src/schemas/profileIdentity.cjs +3 -3
- package/dist/src/schemas/profileIdentity.cjs.map +1 -1
- package/dist/src/schemas/profileIdentity.d.mts +2 -2
- package/dist/src/schemas/profileIdentity.mjs +3 -3
- package/dist/src/schemas/profileIdentity.mjs.map +1 -1
- package/dist/src/schemas/protocolChannelsContract.cjs +4 -8
- package/dist/src/schemas/protocolChannelsContract.cjs.map +1 -1
- package/dist/src/schemas/protocolChannelsContract.d.mts +16 -22
- package/dist/src/schemas/protocolChannelsContract.d.mts.map +1 -1
- package/dist/src/schemas/protocolChannelsContract.mjs +5 -9
- package/dist/src/schemas/protocolChannelsContract.mjs.map +1 -1
- package/dist/src/schemas/protocolContracts.cjs +193 -133
- package/dist/src/schemas/protocolContracts.cjs.map +1 -1
- package/dist/src/schemas/protocolContracts.d.mts +136 -32
- package/dist/src/schemas/protocolContracts.d.mts.map +1 -1
- package/dist/src/schemas/protocolContracts.mjs +186 -132
- package/dist/src/schemas/protocolContracts.mjs.map +1 -1
- package/dist/src/schemas/protocolHubContract.cjs +109 -27
- package/dist/src/schemas/protocolHubContract.cjs.map +1 -1
- package/dist/src/schemas/protocolHubContract.d.mts +292 -134
- package/dist/src/schemas/protocolHubContract.d.mts.map +1 -1
- package/dist/src/schemas/protocolHubContract.mjs +103 -30
- package/dist/src/schemas/protocolHubContract.mjs.map +1 -1
- package/dist/src/schemas/protocolService.cjs +12 -0
- package/dist/src/schemas/protocolService.cjs.map +1 -0
- package/dist/src/schemas/protocolService.d.mts +22 -0
- package/dist/src/schemas/protocolService.d.mts.map +1 -0
- package/dist/src/schemas/protocolService.mjs +11 -0
- package/dist/src/schemas/protocolService.mjs.map +1 -0
- package/dist/src/schemas/protocolSessionContract.cjs +7 -11
- package/dist/src/schemas/protocolSessionContract.cjs.map +1 -1
- package/dist/src/schemas/protocolSessionContract.d.mts +303 -299
- package/dist/src/schemas/protocolSessionContract.d.mts.map +1 -1
- package/dist/src/schemas/protocolSessionContract.mjs +9 -13
- package/dist/src/schemas/protocolSessionContract.mjs.map +1 -1
- package/dist/src/schemas/protocolThreadContract.cjs +5 -6
- package/dist/src/schemas/protocolThreadContract.cjs.map +1 -1
- package/dist/src/schemas/protocolThreadContract.d.mts +12 -16
- package/dist/src/schemas/protocolThreadContract.d.mts.map +1 -1
- package/dist/src/schemas/protocolThreadContract.mjs +6 -7
- package/dist/src/schemas/protocolThreadContract.mjs.map +1 -1
- package/dist/src/schemas/remoteGateway.cjs +14 -0
- package/dist/src/schemas/remoteGateway.cjs.map +1 -0
- package/dist/src/schemas/remoteGateway.d.mts +19 -0
- package/dist/src/schemas/remoteGateway.d.mts.map +1 -0
- package/dist/src/schemas/remoteGateway.mjs +12 -0
- package/dist/src/schemas/remoteGateway.mjs.map +1 -0
- package/dist/src/schemas/remoteOrigin.cjs +9 -0
- package/dist/src/schemas/remoteOrigin.cjs.map +1 -0
- package/dist/src/schemas/remoteOrigin.d.mts +16 -0
- package/dist/src/schemas/remoteOrigin.d.mts.map +1 -0
- package/dist/src/schemas/remoteOrigin.mjs +8 -0
- package/dist/src/schemas/remoteOrigin.mjs.map +1 -0
- package/dist/src/schemas/sandboxIdentity.cjs +14 -0
- package/dist/src/schemas/sandboxIdentity.cjs.map +1 -0
- package/dist/src/schemas/sandboxIdentity.d.mts +23 -0
- package/dist/src/schemas/sandboxIdentity.d.mts.map +1 -0
- package/dist/src/schemas/sandboxIdentity.mjs +12 -0
- package/dist/src/schemas/sandboxIdentity.mjs.map +1 -0
- package/dist/src/schemas/serverBundle.cjs +13 -0
- package/dist/src/schemas/serverBundle.cjs.map +1 -0
- package/dist/src/schemas/serverBundle.d.mts +29 -1
- package/dist/src/schemas/serverBundle.d.mts.map +1 -1
- package/dist/src/schemas/serverBundle.mjs +13 -0
- package/dist/src/schemas/serverBundle.mjs.map +1 -0
- package/dist/src/schemas/serverPlugin.cjs +5 -3
- package/dist/src/schemas/serverPlugin.cjs.map +1 -1
- package/dist/src/schemas/serverPlugin.d.mts +2 -2
- package/dist/src/schemas/serverPlugin.d.mts.map +1 -1
- package/dist/src/schemas/serverPlugin.mjs +5 -3
- package/dist/src/schemas/serverPlugin.mjs.map +1 -1
- package/dist/src/schemas/serverScope.cjs +21 -3
- package/dist/src/schemas/serverScope.cjs.map +1 -1
- package/dist/src/schemas/serverScope.d.mts +17 -1
- package/dist/src/schemas/serverScope.d.mts.map +1 -1
- package/dist/src/schemas/serverScope.mjs +21 -4
- package/dist/src/schemas/serverScope.mjs.map +1 -1
- package/dist/src/schemas/sessionApiContracts.cjs +17 -11
- package/dist/src/schemas/sessionApiContracts.cjs.map +1 -1
- package/dist/src/schemas/sessionApiContracts.mjs +18 -11
- package/dist/src/schemas/sessionApiContracts.mjs.map +1 -1
- package/dist/src/schemas/sessionLifecycle.cjs +12 -0
- package/dist/src/schemas/sessionLifecycle.cjs.map +1 -0
- package/dist/src/schemas/sessionLifecycle.d.mts +33 -0
- package/dist/src/schemas/sessionLifecycle.d.mts.map +1 -0
- package/dist/src/schemas/sessionLifecycle.mjs +11 -0
- package/dist/src/schemas/sessionLifecycle.mjs.map +1 -0
- package/dist/src/schemas/sessionProtocol.cjs +13 -0
- package/dist/src/schemas/sessionProtocol.cjs.map +1 -1
- package/dist/src/schemas/sessionProtocol.d.mts +57 -15
- package/dist/src/schemas/sessionProtocol.d.mts.map +1 -1
- package/dist/src/schemas/sessionProtocol.mjs +12 -1
- package/dist/src/schemas/sessionProtocol.mjs.map +1 -1
- package/dist/src/schemas/sharedModels.cjs +9 -0
- package/dist/src/schemas/sharedModels.cjs.map +1 -0
- package/dist/src/schemas/sharedModels.d.mts +33 -0
- package/dist/src/schemas/sharedModels.d.mts.map +1 -0
- package/dist/src/schemas/sharedModels.mjs +8 -0
- package/dist/src/schemas/sharedModels.mjs.map +1 -0
- package/dist/src/schemas/skills.cjs +1 -1
- package/dist/src/schemas/skills.cjs.map +1 -1
- package/dist/src/schemas/skills.d.mts +1 -1
- package/dist/src/schemas/skills.mjs +1 -1
- package/dist/src/schemas/skills.mjs.map +1 -1
- package/dist/src/schemas/space.cjs +33 -0
- package/dist/src/schemas/space.cjs.map +1 -0
- package/dist/src/schemas/space.d.mts +90 -0
- package/dist/src/schemas/space.d.mts.map +1 -0
- package/dist/src/schemas/space.mjs +29 -0
- package/dist/src/schemas/space.mjs.map +1 -0
- package/dist/src/schemas/toolSurface.cjs.map +1 -1
- package/dist/src/schemas/toolSurface.d.mts +2 -2
- package/dist/src/schemas/toolSurface.d.mts.map +1 -1
- package/dist/src/schemas/toolSurface.mjs.map +1 -1
- package/dist/src/schemas/userFeedback.cjs +22 -0
- package/dist/src/schemas/userFeedback.cjs.map +1 -0
- package/dist/src/schemas/userFeedback.d.mts +30 -0
- package/dist/src/schemas/userFeedback.d.mts.map +1 -0
- package/dist/src/schemas/userFeedback.mjs +18 -0
- package/dist/src/schemas/userFeedback.mjs.map +1 -0
- package/dist/src/schemas/voiceReloadHandoff.cjs +3 -3
- package/dist/src/schemas/voiceReloadHandoff.cjs.map +1 -1
- package/dist/src/schemas/voiceReloadHandoff.d.mts +5 -5
- package/dist/src/schemas/voiceReloadHandoff.d.mts.map +1 -1
- package/dist/src/schemas/voiceReloadHandoff.mjs +3 -3
- package/dist/src/schemas/voiceReloadHandoff.mjs.map +1 -1
- package/dist/src/schemas/workflow.cjs +217 -0
- package/dist/src/schemas/workflow.cjs.map +1 -0
- package/dist/src/schemas/workflow.d.mts +593 -0
- package/dist/src/schemas/workflow.d.mts.map +1 -0
- package/dist/src/schemas/workflow.mjs +188 -0
- package/dist/src/schemas/workflow.mjs.map +1 -0
- package/dist/src/schemas/workspaceRegistry.cjs +13 -0
- package/dist/src/schemas/workspaceRegistry.cjs.map +1 -0
- package/dist/src/schemas/workspaceRegistry.d.mts +45 -0
- package/dist/src/schemas/workspaceRegistry.d.mts.map +1 -0
- package/dist/src/schemas/workspaceRegistry.mjs +11 -0
- package/dist/src/schemas/workspaceRegistry.mjs.map +1 -0
- package/dist/src/schemas/workspaceSandboxes.cjs +14 -0
- package/dist/src/schemas/workspaceSandboxes.cjs.map +1 -0
- package/dist/src/schemas/workspaceSandboxes.d.mts +85 -0
- package/dist/src/schemas/workspaceSandboxes.d.mts.map +1 -0
- package/dist/src/schemas/workspaceSandboxes.mjs +12 -0
- package/dist/src/schemas/workspaceSandboxes.mjs.map +1 -0
- package/dist/src/server/conversationEvents.cjs +345 -0
- package/dist/src/server/conversationEvents.cjs.map +1 -0
- package/dist/src/server/conversationEvents.mjs +345 -0
- package/dist/src/server/conversationEvents.mjs.map +1 -0
- package/dist/src/server/directHarnessRuntime.cjs +1326 -549
- package/dist/src/server/directHarnessRuntime.cjs.map +1 -1
- package/dist/src/server/directHarnessRuntime.d.mts +1 -1
- package/dist/src/server/directHarnessRuntime.d.mts.map +1 -1
- package/dist/src/server/directHarnessRuntime.mjs +1308 -532
- package/dist/src/server/directHarnessRuntime.mjs.map +1 -1
- package/dist/src/server/largeFrameLink.cjs +22 -37
- package/dist/src/server/largeFrameLink.cjs.map +1 -1
- package/dist/src/server/largeFrameLink.mjs +22 -37
- package/dist/src/server/largeFrameLink.mjs.map +1 -1
- package/dist/src/server/mcpBundleLoader.cjs +2 -1
- package/dist/src/server/mcpBundleLoader.cjs.map +1 -1
- package/dist/src/server/mcpBundleLoader.d.mts +1 -1
- package/dist/src/server/mcpBundleLoader.d.mts.map +1 -1
- package/dist/src/server/mcpBundleLoader.mjs +2 -1
- package/dist/src/server/mcpBundleLoader.mjs.map +1 -1
- package/dist/src/server/providerRoutes.cjs +74 -0
- package/dist/src/server/providerRoutes.cjs.map +1 -0
- package/dist/src/server/providerRoutes.d.mts +20 -0
- package/dist/src/server/providerRoutes.d.mts.map +1 -0
- package/dist/src/server/providerRoutes.mjs +74 -0
- package/dist/src/server/providerRoutes.mjs.map +1 -0
- package/dist/src/server/providerRuntime.cjs +41 -0
- package/dist/src/server/providerRuntime.cjs.map +1 -0
- package/dist/src/server/providerRuntime.d.mts +12 -0
- package/dist/src/server/providerRuntime.d.mts.map +1 -0
- package/dist/src/server/providerRuntime.mjs +39 -0
- package/dist/src/server/providerRuntime.mjs.map +1 -0
- package/dist/src/server/serverPackages.cjs +29 -7
- package/dist/src/server/serverPackages.cjs.map +1 -1
- package/dist/src/server/serverPackages.d.mts +9 -3
- package/dist/src/server/serverPackages.d.mts.map +1 -1
- package/dist/src/server/serverPackages.mjs +29 -7
- package/dist/src/server/serverPackages.mjs.map +1 -1
- package/dist/src/server/serverScope.cjs +434 -34
- package/dist/src/server/serverScope.cjs.map +1 -1
- package/dist/src/server/serverScope.d.mts +72 -8
- package/dist/src/server/serverScope.d.mts.map +1 -1
- package/dist/src/server/serverScope.mjs +435 -35
- package/dist/src/server/serverScope.mjs.map +1 -1
- package/dist/src/server/threadJournals.cjs.map +1 -1
- package/dist/src/server/threadJournals.mjs.map +1 -1
- package/dist/src/services/approvalGate/index.cjs +179 -0
- package/dist/src/services/approvalGate/index.cjs.map +1 -0
- package/dist/src/services/approvalGate/index.d.mts +30 -0
- package/dist/src/services/approvalGate/index.d.mts.map +1 -0
- package/dist/src/services/approvalGate/index.mjs +174 -0
- package/dist/src/services/approvalGate/index.mjs.map +1 -0
- package/dist/src/services/approvalGate/type.d.mts +36 -0
- package/dist/src/services/approvalGate/type.d.mts.map +1 -0
- package/dist/src/services/bundlePublication/index.cjs +103 -39
- package/dist/src/services/bundlePublication/index.cjs.map +1 -1
- package/dist/src/services/bundlePublication/index.d.mts +11 -0
- package/dist/src/services/bundlePublication/index.d.mts.map +1 -0
- package/dist/src/services/bundlePublication/index.mjs +101 -39
- package/dist/src/services/bundlePublication/index.mjs.map +1 -1
- package/dist/src/services/chatgptImages/index.cjs +56 -11
- package/dist/src/services/chatgptImages/index.cjs.map +1 -1
- package/dist/src/services/chatgptImages/index.mjs +56 -11
- package/dist/src/services/chatgptImages/index.mjs.map +1 -1
- package/dist/src/services/chatgptLogin/index.cjs +2 -2
- package/dist/src/services/chatgptLogin/index.cjs.map +1 -1
- package/dist/src/services/chordAdapter/index.cjs +456 -0
- package/dist/src/services/chordAdapter/index.cjs.map +1 -0
- package/dist/src/services/chordAdapter/index.d.mts +13 -0
- package/dist/src/services/chordAdapter/index.d.mts.map +1 -0
- package/dist/src/services/chordAdapter/index.mjs +453 -0
- package/dist/src/services/chordAdapter/index.mjs.map +1 -0
- package/dist/src/services/chordAdapter/type.d.mts +24 -0
- package/dist/src/services/chordAdapter/type.d.mts.map +1 -0
- package/dist/src/services/clientDevices/index.cjs +75 -0
- package/dist/src/services/clientDevices/index.cjs.map +1 -0
- package/dist/src/services/clientDevices/index.d.mts +7 -0
- package/dist/src/services/clientDevices/index.d.mts.map +1 -0
- package/dist/src/services/clientDevices/index.mjs +74 -0
- package/dist/src/services/clientDevices/index.mjs.map +1 -0
- package/dist/src/services/clientMetadata/_lib/codec.cjs +96 -0
- package/dist/src/services/clientMetadata/_lib/codec.cjs.map +1 -0
- package/dist/src/services/clientMetadata/_lib/codec.d.mts +16 -0
- package/dist/src/services/clientMetadata/_lib/codec.d.mts.map +1 -0
- package/dist/src/services/clientMetadata/_lib/codec.mjs +89 -0
- package/dist/src/services/clientMetadata/_lib/codec.mjs.map +1 -0
- package/dist/src/services/clientMetadata/_lib/deviceLabel.cjs +63 -0
- package/dist/src/services/clientMetadata/_lib/deviceLabel.cjs.map +1 -0
- package/dist/src/services/clientMetadata/_lib/deviceLabel.d.mts +10 -0
- package/dist/src/services/clientMetadata/_lib/deviceLabel.d.mts.map +1 -0
- package/dist/src/services/clientMetadata/_lib/deviceLabel.mjs +62 -0
- package/dist/src/services/clientMetadata/_lib/deviceLabel.mjs.map +1 -0
- package/dist/src/services/contextUsage/index.cjs +0 -9
- package/dist/src/services/contextUsage/index.cjs.map +1 -1
- package/dist/src/services/contextUsage/index.mjs +1 -9
- package/dist/src/services/contextUsage/index.mjs.map +1 -1
- package/dist/src/services/durableNavigation/docs.cjs +1 -0
- package/dist/src/services/durableNavigation/docs.cjs.map +1 -1
- package/dist/src/services/durableNavigation/docs.mjs +1 -0
- package/dist/src/services/durableNavigation/docs.mjs.map +1 -1
- package/dist/src/services/durableNavigation/index.cjs.map +1 -1
- package/dist/src/services/durableNavigation/index.mjs.map +1 -1
- package/dist/src/services/durableQueue/docs.cjs +1 -0
- package/dist/src/services/durableQueue/docs.cjs.map +1 -1
- package/dist/src/services/durableQueue/docs.mjs +1 -0
- package/dist/src/services/durableQueue/docs.mjs.map +1 -1
- package/dist/src/services/durableQueue/index.cjs +157 -69
- package/dist/src/services/durableQueue/index.cjs.map +1 -1
- package/dist/src/services/durableQueue/index.mjs +156 -70
- package/dist/src/services/durableQueue/index.mjs.map +1 -1
- package/dist/src/services/durableRequestReceipts/docs.cjs +1 -0
- package/dist/src/services/durableRequestReceipts/docs.cjs.map +1 -1
- package/dist/src/services/durableRequestReceipts/docs.mjs +1 -0
- package/dist/src/services/durableRequestReceipts/docs.mjs.map +1 -1
- package/dist/src/services/durableResumeSnapshots/docs.cjs +49 -0
- package/dist/src/services/durableResumeSnapshots/docs.cjs.map +1 -0
- package/dist/src/services/durableResumeSnapshots/docs.mjs +48 -0
- package/dist/src/services/durableResumeSnapshots/docs.mjs.map +1 -0
- package/dist/src/services/durableResumeSnapshots/index.cjs +392 -0
- package/dist/src/services/durableResumeSnapshots/index.cjs.map +1 -0
- package/dist/src/services/durableResumeSnapshots/index.mjs +392 -0
- package/dist/src/services/durableResumeSnapshots/index.mjs.map +1 -0
- package/dist/src/services/durableResumeSnapshots/type.d.mts +27 -0
- package/dist/src/services/durableResumeSnapshots/type.d.mts.map +1 -0
- package/dist/src/services/durableSession/docs.cjs +13 -1
- package/dist/src/services/durableSession/docs.cjs.map +1 -1
- package/dist/src/services/durableSession/docs.d.mts +9 -1
- package/dist/src/services/durableSession/docs.d.mts.map +1 -1
- package/dist/src/services/durableSession/docs.mjs +13 -1
- package/dist/src/services/durableSession/docs.mjs.map +1 -1
- package/dist/src/services/durableSession/index.cjs.map +1 -1
- package/dist/src/services/durableSession/index.d.mts +1 -1
- package/dist/src/services/durableSession/index.mjs.map +1 -1
- package/dist/src/services/durableSubagents/docs.cjs +1 -0
- package/dist/src/services/durableSubagents/docs.cjs.map +1 -1
- package/dist/src/services/durableSubagents/docs.mjs +1 -0
- package/dist/src/services/durableSubagents/docs.mjs.map +1 -1
- package/dist/src/services/durableSubagents/extension.cjs.map +1 -1
- package/dist/src/services/durableSubagents/index.cjs +29 -3
- package/dist/src/services/durableSubagents/index.cjs.map +1 -1
- package/dist/src/services/durableSubagents/index.mjs +29 -4
- package/dist/src/services/durableSubagents/index.mjs.map +1 -1
- package/dist/src/services/durableSubagents/tasks.cjs.map +1 -1
- package/dist/src/services/edgeModelRuntime/index.cjs +377 -0
- package/dist/src/services/edgeModelRuntime/index.cjs.map +1 -0
- package/dist/src/services/edgeModelRuntime/index.d.mts +24 -0
- package/dist/src/services/edgeModelRuntime/index.d.mts.map +1 -0
- package/dist/src/services/edgeModelRuntime/index.mjs +374 -0
- package/dist/src/services/edgeModelRuntime/index.mjs.map +1 -0
- package/dist/src/services/edgeModelRuntime/type.d.mts +39 -0
- package/dist/src/services/edgeModelRuntime/type.d.mts.map +1 -0
- package/dist/src/services/editPresence/index.cjs +53 -0
- package/dist/src/services/editPresence/index.cjs.map +1 -0
- package/dist/src/services/editPresence/index.d.mts +6 -0
- package/dist/src/services/editPresence/index.d.mts.map +1 -0
- package/dist/src/services/editPresence/index.mjs +53 -0
- package/dist/src/services/editPresence/index.mjs.map +1 -0
- package/dist/src/services/fileAccess/accessibleFile.cjs +63 -0
- package/dist/src/services/fileAccess/accessibleFile.cjs.map +1 -0
- package/dist/src/services/fileAccess/accessibleFile.d.mts +1 -0
- package/dist/src/services/fileAccess/accessibleFile.mjs +60 -0
- package/dist/src/services/fileAccess/accessibleFile.mjs.map +1 -0
- package/dist/src/services/fileAccess/core.cjs +87 -0
- package/dist/src/services/fileAccess/core.cjs.map +1 -0
- package/dist/src/services/fileAccess/core.mjs +78 -0
- package/dist/src/services/fileAccess/core.mjs.map +1 -0
- package/dist/src/services/fileAccess/index.cjs +34 -0
- package/dist/src/services/fileAccess/index.cjs.map +1 -0
- package/dist/src/services/fileAccess/index.d.mts +23 -0
- package/dist/src/services/fileAccess/index.d.mts.map +1 -0
- package/dist/src/services/fileAccess/index.mjs +29 -0
- package/dist/src/services/fileAccess/index.mjs.map +1 -0
- package/dist/src/services/fileAccess/type.d.mts +1 -0
- package/dist/src/services/grantLedger/index.cjs +56 -0
- package/dist/src/services/grantLedger/index.cjs.map +1 -0
- package/dist/src/services/grantLedger/index.mjs +55 -0
- package/dist/src/services/grantLedger/index.mjs.map +1 -0
- package/dist/src/services/guardedFile/index.cjs +36 -0
- package/dist/src/services/guardedFile/index.cjs.map +1 -0
- package/dist/src/services/guardedFile/index.d.mts +9 -0
- package/dist/src/services/guardedFile/index.d.mts.map +1 -0
- package/dist/src/services/guardedFile/index.mjs +33 -0
- package/dist/src/services/guardedFile/index.mjs.map +1 -0
- package/dist/src/services/headlessClient/index.cjs +85 -3
- package/dist/src/services/headlessClient/index.cjs.map +1 -1
- package/dist/src/services/headlessClient/index.mjs +86 -4
- package/dist/src/services/headlessClient/index.mjs.map +1 -1
- package/dist/src/services/hostServices/index.cjs +157 -0
- package/dist/src/services/hostServices/index.cjs.map +1 -0
- package/dist/src/services/hostServices/index.d.mts +33 -0
- package/dist/src/services/hostServices/index.d.mts.map +1 -0
- package/dist/src/services/hostServices/index.mjs +157 -0
- package/dist/src/services/hostServices/index.mjs.map +1 -0
- package/dist/src/services/inputTemplate/index.cjs +120 -0
- package/dist/src/services/inputTemplate/index.cjs.map +1 -0
- package/dist/src/services/inputTemplate/index.d.mts +10 -0
- package/dist/src/services/inputTemplate/index.d.mts.map +1 -0
- package/dist/src/services/inputTemplate/index.mjs +118 -0
- package/dist/src/services/inputTemplate/index.mjs.map +1 -0
- package/dist/src/services/inputTemplate/type.d.mts +17 -0
- package/dist/src/services/inputTemplate/type.d.mts.map +1 -0
- package/dist/src/services/json/core.cjs.map +1 -1
- package/dist/src/services/json/core.d.mts +1 -1
- package/dist/src/services/json/core.mjs.map +1 -1
- package/dist/src/services/json/sync.cjs +2 -2
- package/dist/src/services/json/sync.cjs.map +1 -1
- package/dist/src/services/json/sync.d.mts.map +1 -1
- package/dist/src/services/json/sync.mjs +1 -1
- package/dist/src/services/json/sync.mjs.map +1 -1
- package/dist/src/services/kernel/index.cjs.map +1 -1
- package/dist/src/services/kernel/index.d.mts +1 -1
- package/dist/src/services/kernel/index.mjs.map +1 -1
- package/dist/src/services/loginFlow/index.cjs +7 -1
- package/dist/src/services/loginFlow/index.cjs.map +1 -1
- package/dist/src/services/loginFlow/index.mjs +7 -1
- package/dist/src/services/loginFlow/index.mjs.map +1 -1
- package/dist/src/services/modelDispatch/index.cjs +200 -0
- package/dist/src/services/modelDispatch/index.cjs.map +1 -0
- package/dist/src/services/modelDispatch/index.mjs +197 -0
- package/dist/src/services/modelDispatch/index.mjs.map +1 -0
- package/dist/src/services/modelFallback/index.cjs +88 -0
- package/dist/src/services/modelFallback/index.cjs.map +1 -0
- package/dist/src/services/modelFallback/index.d.mts +16 -0
- package/dist/src/services/modelFallback/index.d.mts.map +1 -0
- package/dist/src/services/modelFallback/index.mjs +86 -0
- package/dist/src/services/modelFallback/index.mjs.map +1 -0
- package/dist/src/services/modelFallback/type.d.mts +16 -0
- package/dist/src/services/modelFallback/type.d.mts.map +1 -0
- package/dist/src/services/modelGatewayContainer/index.cjs +394 -0
- package/dist/src/services/modelGatewayContainer/index.cjs.map +1 -0
- package/dist/src/services/modelGatewayContainer/index.d.mts +16 -0
- package/dist/src/services/modelGatewayContainer/index.d.mts.map +1 -0
- package/dist/src/services/modelGatewayContainer/index.mjs +393 -0
- package/dist/src/services/modelGatewayContainer/index.mjs.map +1 -0
- package/dist/src/services/modelGatewayContainer/type.d.mts +28 -0
- package/dist/src/services/modelGatewayContainer/type.d.mts.map +1 -0
- package/dist/src/services/modelGatewayExecutor/index.cjs +160 -0
- package/dist/src/services/modelGatewayExecutor/index.cjs.map +1 -0
- package/dist/src/services/modelGatewayExecutor/index.d.mts +18 -0
- package/dist/src/services/modelGatewayExecutor/index.d.mts.map +1 -0
- package/dist/src/services/modelGatewayExecutor/index.mjs +160 -0
- package/dist/src/services/modelGatewayExecutor/index.mjs.map +1 -0
- package/dist/src/services/modelGatewayExecutor/type.d.mts +36 -0
- package/dist/src/services/modelGatewayExecutor/type.d.mts.map +1 -0
- package/dist/src/services/modelGatewayHost/index.cjs +292 -0
- package/dist/src/services/modelGatewayHost/index.cjs.map +1 -0
- package/dist/src/services/modelGatewayHost/index.d.mts +13 -0
- package/dist/src/services/modelGatewayHost/index.d.mts.map +1 -0
- package/dist/src/services/modelGatewayHost/index.mjs +292 -0
- package/dist/src/services/modelGatewayHost/index.mjs.map +1 -0
- package/dist/src/services/modelGatewayHost/type.d.mts +61 -0
- package/dist/src/services/modelGatewayHost/type.d.mts.map +1 -0
- package/dist/src/services/modelGatewayWire/index.cjs +170 -0
- package/dist/src/services/modelGatewayWire/index.cjs.map +1 -0
- package/dist/src/services/modelGatewayWire/index.d.mts +30 -0
- package/dist/src/services/modelGatewayWire/index.d.mts.map +1 -0
- package/dist/src/services/modelGatewayWire/index.mjs +163 -0
- package/dist/src/services/modelGatewayWire/index.mjs.map +1 -0
- package/dist/src/services/nativeChildTools/index.cjs +307 -9
- package/dist/src/services/nativeChildTools/index.cjs.map +1 -1
- package/dist/src/services/nativeChildTools/index.d.mts +11 -0
- package/dist/src/services/nativeChildTools/index.d.mts.map +1 -0
- package/dist/src/services/nativeChildTools/index.mjs +298 -3
- package/dist/src/services/nativeChildTools/index.mjs.map +1 -1
- package/dist/src/services/nodeHost/index.cjs +4 -2
- package/dist/src/services/nodeHost/index.cjs.map +1 -1
- package/dist/src/services/nodeHost/index.d.mts +2 -0
- package/dist/src/services/nodeHost/index.d.mts.map +1 -1
- package/dist/src/services/nodeHost/index.mjs +3 -1
- package/dist/src/services/nodeHost/index.mjs.map +1 -1
- package/dist/src/services/nodeModelDependencies/index.cjs +26 -29
- package/dist/src/services/nodeModelDependencies/index.cjs.map +1 -1
- package/dist/src/services/nodeModelDependencies/index.mjs +18 -20
- package/dist/src/services/nodeModelDependencies/index.mjs.map +1 -1
- package/dist/src/services/openSessionRegistry/index.cjs +1 -0
- package/dist/src/services/openSessionRegistry/index.cjs.map +1 -1
- package/dist/src/services/openSessionRegistry/index.d.mts +1 -1
- package/dist/src/services/openSessionRegistry/index.mjs +1 -0
- package/dist/src/services/openSessionRegistry/index.mjs.map +1 -1
- package/dist/src/services/openSessionRegistry/openSessionRecords.cjs +44 -4
- package/dist/src/services/openSessionRegistry/openSessionRecords.cjs.map +1 -1
- package/dist/src/services/openSessionRegistry/openSessionRecords.d.mts +26 -0
- package/dist/src/services/openSessionRegistry/openSessionRecords.d.mts.map +1 -1
- package/dist/src/services/openSessionRegistry/openSessionRecords.mjs +44 -4
- package/dist/src/services/openSessionRegistry/openSessionRecords.mjs.map +1 -1
- package/dist/src/services/openSessionRegistry/sync.cjs +9 -4
- package/dist/src/services/openSessionRegistry/sync.cjs.map +1 -1
- package/dist/src/services/openSessionRegistry/sync.d.mts.map +1 -1
- package/dist/src/services/openSessionRegistry/sync.mjs +8 -3
- package/dist/src/services/openSessionRegistry/sync.mjs.map +1 -1
- package/dist/src/services/operationDispatch/index.cjs +263 -0
- package/dist/src/services/operationDispatch/index.cjs.map +1 -0
- package/dist/src/services/operationDispatch/index.mjs +263 -0
- package/dist/src/services/operationDispatch/index.mjs.map +1 -0
- package/dist/src/services/packageApiHarness/index.cjs +2 -1
- package/dist/src/services/packageApiHarness/index.cjs.map +1 -1
- package/dist/src/services/packageApiHarness/index.d.mts +2 -1
- package/dist/src/services/packageApiHarness/index.d.mts.map +1 -1
- package/dist/src/services/packageApiHarness/index.mjs +2 -1
- package/dist/src/services/packageApiHarness/index.mjs.map +1 -1
- package/dist/src/services/packageContentRevision/index.cjs +173 -0
- package/dist/src/services/packageContentRevision/index.cjs.map +1 -0
- package/dist/src/services/packageContentRevision/index.d.mts +39 -0
- package/dist/src/services/packageContentRevision/index.d.mts.map +1 -0
- package/dist/src/services/packageContentRevision/index.mjs +168 -0
- package/dist/src/services/packageContentRevision/index.mjs.map +1 -0
- package/dist/src/services/packageResource/index.cjs +12 -8
- package/dist/src/services/packageResource/index.cjs.map +1 -1
- package/dist/src/services/packageResource/index.d.mts.map +1 -1
- package/dist/src/services/packageResource/index.mjs +12 -8
- package/dist/src/services/packageResource/index.mjs.map +1 -1
- package/dist/src/services/pairingPage/index.cjs +85 -24
- package/dist/src/services/pairingPage/index.cjs.map +1 -1
- package/dist/src/services/pairingPage/index.d.mts +23 -0
- package/dist/src/services/pairingPage/index.d.mts.map +1 -0
- package/dist/src/services/pairingPage/index.mjs +86 -25
- package/dist/src/services/pairingPage/index.mjs.map +1 -1
- package/dist/src/services/piArgs/index.cjs +2 -2
- package/dist/src/services/piArgs/index.cjs.map +1 -1
- package/dist/src/services/piExtensionHost/index.cjs +344 -56
- package/dist/src/services/piExtensionHost/index.cjs.map +1 -1
- package/dist/src/services/piExtensionHost/index.d.mts +3 -1
- package/dist/src/services/piExtensionHost/index.d.mts.map +1 -1
- package/dist/src/services/piExtensionHost/index.mjs +325 -37
- package/dist/src/services/piExtensionHost/index.mjs.map +1 -1
- package/dist/src/services/piMessages/index.cjs +16 -0
- package/dist/src/services/piMessages/index.cjs.map +1 -1
- package/dist/src/services/piMessages/index.d.mts +12 -0
- package/dist/src/services/piMessages/index.d.mts.map +1 -0
- package/dist/src/services/piMessages/index.mjs +16 -1
- package/dist/src/services/piMessages/index.mjs.map +1 -1
- package/dist/src/services/piSettings/core.cjs +18 -5
- package/dist/src/services/piSettings/core.cjs.map +1 -1
- package/dist/src/services/piSettings/core.d.mts +6 -1
- package/dist/src/services/piSettings/core.d.mts.map +1 -1
- package/dist/src/services/piSettings/core.mjs +18 -6
- package/dist/src/services/piSettings/core.mjs.map +1 -1
- package/dist/src/services/piSettings/sync.cjs +31 -2
- package/dist/src/services/piSettings/sync.cjs.map +1 -1
- package/dist/src/services/piSettings/sync.d.mts +3 -0
- package/dist/src/services/piSettings/sync.d.mts.map +1 -1
- package/dist/src/services/piSettings/sync.mjs +31 -3
- package/dist/src/services/piSettings/sync.mjs.map +1 -1
- package/dist/src/services/piSummary/index.cjs +2 -2
- package/dist/src/services/piSummary/index.cjs.map +1 -1
- package/dist/src/services/platformFiles/index.cjs +81 -0
- package/dist/src/services/platformFiles/index.cjs.map +1 -1
- package/dist/src/services/platformFiles/index.d.mts +12 -1
- package/dist/src/services/platformFiles/index.d.mts.map +1 -1
- package/dist/src/services/platformFiles/index.mjs +76 -1
- package/dist/src/services/platformFiles/index.mjs.map +1 -1
- package/dist/src/services/platformFiles/rootBoundReplace.cjs +110 -0
- package/dist/src/services/platformFiles/rootBoundReplace.cjs.map +1 -0
- package/dist/src/services/platformFiles/rootBoundReplace.d.mts +21 -0
- package/dist/src/services/platformFiles/rootBoundReplace.d.mts.map +1 -0
- package/dist/src/services/platformFiles/rootBoundReplace.mjs +106 -0
- package/dist/src/services/platformFiles/rootBoundReplace.mjs.map +1 -0
- package/dist/src/services/poPackage/core.cjs.map +1 -1
- package/dist/src/services/poPackage/core.d.mts +1 -1
- package/dist/src/services/poPackage/core.mjs.map +1 -1
- package/dist/src/services/poPackage/sync.cjs +2 -2
- package/dist/src/services/poPackage/sync.cjs.map +1 -1
- package/dist/src/services/poPackage/sync.d.mts.map +1 -1
- package/dist/src/services/poPackage/sync.mjs +1 -1
- package/dist/src/services/poPackage/sync.mjs.map +1 -1
- package/dist/src/services/poTelemetry/index.cjs +69 -0
- package/dist/src/services/poTelemetry/index.cjs.map +1 -0
- package/dist/src/services/poTelemetry/index.d.mts +7 -0
- package/dist/src/services/poTelemetry/index.d.mts.map +1 -0
- package/dist/src/services/poTelemetry/index.mjs +66 -0
- package/dist/src/services/poTelemetry/index.mjs.map +1 -0
- package/dist/src/services/portableConfig/index.cjs +136 -0
- package/dist/src/services/portableConfig/index.cjs.map +1 -0
- package/dist/src/services/portableConfig/index.d.mts +30 -0
- package/dist/src/services/portableConfig/index.d.mts.map +1 -0
- package/dist/src/services/portableConfig/index.mjs +130 -0
- package/dist/src/services/portableConfig/index.mjs.map +1 -0
- package/dist/src/services/providerAuth/index.cjs +6 -10
- package/dist/src/services/providerAuth/index.cjs.map +1 -1
- package/dist/src/services/providerAuth/index.mjs +5 -7
- package/dist/src/services/providerAuth/index.mjs.map +1 -1
- package/dist/src/services/providerImages/fitter.cjs +48 -0
- package/dist/src/services/providerImages/fitter.cjs.map +1 -0
- package/dist/src/services/providerImages/fitter.mjs +47 -0
- package/dist/src/services/providerImages/fitter.mjs.map +1 -0
- package/dist/src/services/providerImages/index.cjs +21 -0
- package/dist/src/services/providerImages/index.cjs.map +1 -0
- package/dist/src/services/providerImages/index.d.mts +3 -0
- package/dist/src/services/providerImages/index.mjs +21 -0
- package/dist/src/services/providerImages/index.mjs.map +1 -0
- package/dist/src/services/runtimeEnvironment/index.cjs +228 -0
- package/dist/src/services/runtimeEnvironment/index.cjs.map +1 -0
- package/dist/src/services/runtimeEnvironment/index.d.mts +37 -0
- package/dist/src/services/runtimeEnvironment/index.d.mts.map +1 -0
- package/dist/src/services/runtimeEnvironment/index.mjs +219 -0
- package/dist/src/services/runtimeEnvironment/index.mjs.map +1 -0
- package/dist/src/services/runtimeIdentity/sync.cjs +2 -2
- package/dist/src/services/runtimeIdentity/sync.cjs.map +1 -1
- package/dist/src/services/runtimeIdentity/sync.d.mts.map +1 -1
- package/dist/src/services/runtimeIdentity/sync.mjs +1 -1
- package/dist/src/services/runtimeIdentity/sync.mjs.map +1 -1
- package/dist/src/services/scopeInput/index.cjs +49 -0
- package/dist/src/services/scopeInput/index.cjs.map +1 -0
- package/dist/src/services/scopeInput/index.mjs +47 -0
- package/dist/src/services/scopeInput/index.mjs.map +1 -0
- package/dist/src/services/serialRunner/index.cjs +3 -0
- package/dist/src/services/serialRunner/index.cjs.map +1 -1
- package/dist/src/services/serialRunner/index.d.mts +2 -0
- package/dist/src/services/serialRunner/index.d.mts.map +1 -1
- package/dist/src/services/serialRunner/index.mjs +3 -1
- package/dist/src/services/serialRunner/index.mjs.map +1 -1
- package/dist/src/services/serverHost/index.cjs +12 -2
- package/dist/src/services/serverHost/index.cjs.map +1 -1
- package/dist/src/services/serverHost/index.d.mts +3 -1
- package/dist/src/services/serverHost/index.d.mts.map +1 -1
- package/dist/src/services/serverHost/index.mjs +12 -2
- package/dist/src/services/serverHost/index.mjs.map +1 -1
- package/dist/src/services/sessionAccess/index.cjs +168 -0
- package/dist/src/services/sessionAccess/index.cjs.map +1 -0
- package/dist/src/services/sessionAccess/index.d.mts +11 -0
- package/dist/src/services/sessionAccess/index.d.mts.map +1 -0
- package/dist/src/services/sessionAccess/index.mjs +163 -0
- package/dist/src/services/sessionAccess/index.mjs.map +1 -0
- package/dist/src/services/sessionAccess/type.d.mts +32 -0
- package/dist/src/services/sessionAccess/type.d.mts.map +1 -0
- package/dist/src/services/sessionAttachments/index.cjs +13 -13
- package/dist/src/services/sessionAttachments/index.cjs.map +1 -1
- package/dist/src/services/sessionAttachments/index.d.mts +3 -1
- package/dist/src/services/sessionAttachments/index.d.mts.map +1 -1
- package/dist/src/services/sessionAttachments/index.mjs +12 -12
- package/dist/src/services/sessionAttachments/index.mjs.map +1 -1
- package/dist/src/services/sessionFiles/index.cjs +35 -13
- package/dist/src/services/sessionFiles/index.cjs.map +1 -1
- package/dist/src/services/sessionFiles/index.d.mts +10 -1
- package/dist/src/services/sessionFiles/index.d.mts.map +1 -1
- package/dist/src/services/sessionFiles/index.mjs +34 -14
- package/dist/src/services/sessionFiles/index.mjs.map +1 -1
- package/dist/src/services/sessionFiles/sessionDirectory.cjs +3 -3
- package/dist/src/services/sessionFiles/sessionDirectory.cjs.map +1 -1
- package/dist/src/services/sessionFiles/sessionDirectory.mjs +3 -3
- package/dist/src/services/sessionFiles/sessionDirectory.mjs.map +1 -1
- package/dist/src/services/sessionLifecycle/index.cjs +293 -0
- package/dist/src/services/sessionLifecycle/index.cjs.map +1 -0
- package/dist/src/services/sessionLifecycle/index.mjs +293 -0
- package/dist/src/services/sessionLifecycle/index.mjs.map +1 -0
- package/dist/src/services/sessionLifecycle/type.d.mts +32 -0
- package/dist/src/services/sessionLifecycle/type.d.mts.map +1 -0
- package/dist/src/services/sessionMcpRoutePaths/index.cjs +60 -0
- package/dist/src/services/sessionMcpRoutePaths/index.cjs.map +1 -0
- package/dist/src/services/sessionMcpRoutePaths/index.d.mts +31 -0
- package/dist/src/services/sessionMcpRoutePaths/index.d.mts.map +1 -0
- package/dist/src/services/sessionMcpRoutePaths/index.mjs +45 -0
- package/dist/src/services/sessionMcpRoutePaths/index.mjs.map +1 -0
- package/dist/src/services/sessionWorkspaceMove/index.cjs +81 -0
- package/dist/src/services/sessionWorkspaceMove/index.cjs.map +1 -0
- package/dist/src/services/sessionWorkspaceMove/index.d.mts +6 -0
- package/dist/src/services/sessionWorkspaceMove/index.d.mts.map +1 -0
- package/dist/src/services/sessionWorkspaceMove/index.mjs +81 -0
- package/dist/src/services/sessionWorkspaceMove/index.mjs.map +1 -0
- package/dist/src/services/sessionWorkspaceMove/type.d.mts +16 -0
- package/dist/src/services/sessionWorkspaceMove/type.d.mts.map +1 -0
- package/dist/src/services/skillPrompt/index.cjs +14 -4
- package/dist/src/services/skillPrompt/index.cjs.map +1 -1
- package/dist/src/services/skillPrompt/index.mjs +14 -5
- package/dist/src/services/skillPrompt/index.mjs.map +1 -1
- package/dist/src/services/skillRelations/index.cjs +113 -0
- package/dist/src/services/skillRelations/index.cjs.map +1 -0
- package/dist/src/services/skillRelations/index.d.mts +32 -0
- package/dist/src/services/skillRelations/index.d.mts.map +1 -0
- package/dist/src/services/skillRelations/index.mjs +111 -0
- package/dist/src/services/skillRelations/index.mjs.map +1 -0
- package/dist/src/services/sqliteSessionHistory/index.cjs +38 -10
- package/dist/src/services/sqliteSessionHistory/index.cjs.map +1 -1
- package/dist/src/services/sqliteSessionHistory/index.d.mts +13 -0
- package/dist/src/services/sqliteSessionHistory/index.d.mts.map +1 -1
- package/dist/src/services/sqliteSessionHistory/index.mjs +37 -10
- package/dist/src/services/sqliteSessionHistory/index.mjs.map +1 -1
- package/dist/src/services/sqliteTranscriptReader/index.cjs +12 -12
- package/dist/src/services/sqliteTranscriptReader/index.cjs.map +1 -1
- package/dist/src/services/sqliteTranscriptReader/index.d.mts +2 -2
- package/dist/src/services/sqliteTranscriptReader/index.mjs +3 -3
- package/dist/src/services/sqliteTranscriptReader/index.mjs.map +1 -1
- package/dist/src/services/telemetry/index.cjs +591 -0
- package/dist/src/services/telemetry/index.cjs.map +1 -0
- package/dist/src/services/telemetry/index.d.mts +7 -0
- package/dist/src/services/telemetry/index.d.mts.map +1 -0
- package/dist/src/services/telemetry/index.mjs +587 -0
- package/dist/src/services/telemetry/index.mjs.map +1 -0
- package/dist/src/services/toolContinuation/index.cjs +84 -0
- package/dist/src/services/toolContinuation/index.cjs.map +1 -0
- package/dist/src/services/toolContinuation/index.mjs +83 -0
- package/dist/src/services/toolContinuation/index.mjs.map +1 -0
- package/dist/src/services/traceContext/index.cjs.map +1 -1
- package/dist/src/services/traceContext/index.mjs.map +1 -1
- package/dist/src/services/transcriptPages/index.cjs +169 -8
- package/dist/src/services/transcriptPages/index.cjs.map +1 -1
- package/dist/src/services/transcriptPages/index.mjs +165 -9
- package/dist/src/services/transcriptPages/index.mjs.map +1 -1
- package/dist/src/services/verifiedArchive/index.cjs +181 -0
- package/dist/src/services/verifiedArchive/index.cjs.map +1 -0
- package/dist/src/services/verifiedArchive/index.d.mts +38 -0
- package/dist/src/services/verifiedArchive/index.d.mts.map +1 -0
- package/dist/src/services/verifiedArchive/index.mjs +173 -0
- package/dist/src/services/verifiedArchive/index.mjs.map +1 -0
- package/dist/src/services/voiceReloadHandoff/index.cjs +5 -5
- package/dist/src/services/voiceReloadHandoff/index.cjs.map +1 -1
- package/dist/src/services/voiceReloadHandoff/index.d.mts +1 -1
- package/dist/src/services/voiceReloadHandoff/index.mjs +5 -5
- package/dist/src/services/voiceReloadHandoff/index.mjs.map +1 -1
- package/dist/src/services/workspaceLookup/index.cjs +34 -0
- package/dist/src/services/workspaceLookup/index.cjs.map +1 -0
- package/dist/src/services/workspaceLookup/index.d.mts +6 -0
- package/dist/src/services/workspaceLookup/index.d.mts.map +1 -0
- package/dist/src/services/workspaceLookup/index.mjs +34 -0
- package/dist/src/services/workspaceLookup/index.mjs.map +1 -0
- package/dist/src/services/workspaceRegistry/index.cjs +2 -0
- package/dist/src/services/workspaceRegistry/index.cjs.map +1 -1
- package/dist/src/services/workspaceRegistry/index.d.mts +3 -3
- package/dist/src/services/workspaceRegistry/index.mjs +4 -2
- package/dist/src/services/workspaceRegistry/index.mjs.map +1 -1
- package/dist/src/services/workspaceRegistry/sync.cjs +18 -6
- package/dist/src/services/workspaceRegistry/sync.cjs.map +1 -1
- package/dist/src/services/workspaceRegistry/sync.d.mts +4 -4
- package/dist/src/services/workspaceRegistry/sync.d.mts.map +1 -1
- package/dist/src/services/workspaceRegistry/sync.mjs +18 -6
- package/dist/src/services/workspaceRegistry/sync.mjs.map +1 -1
- package/dist/src/services/workspaceRegistry/workspaceRecords.cjs +60 -8
- package/dist/src/services/workspaceRegistry/workspaceRecords.cjs.map +1 -1
- package/dist/src/services/workspaceRegistry/workspaceRecords.d.mts +20 -0
- package/dist/src/services/workspaceRegistry/workspaceRecords.d.mts.map +1 -1
- package/dist/src/services/workspaceRegistry/workspaceRecords.mjs +58 -9
- package/dist/src/services/workspaceRegistry/workspaceRecords.mjs.map +1 -1
- package/dist/src/services/workspaceSandboxes/index.cjs +33 -0
- package/dist/src/services/workspaceSandboxes/index.cjs.map +1 -0
- package/dist/src/services/workspaceSandboxes/index.d.mts +9 -0
- package/dist/src/services/workspaceSandboxes/index.d.mts.map +1 -0
- package/dist/src/services/workspaceSandboxes/index.mjs +33 -0
- package/dist/src/services/workspaceSandboxes/index.mjs.map +1 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.cjs +65 -27
- package/dist/src/systems/child/adapters/headlessChildSessionService.cjs.map +1 -1
- package/dist/src/systems/child/adapters/headlessChildSessionService.d.mts +19 -0
- package/dist/src/systems/child/adapters/headlessChildSessionService.d.mts.map +1 -1
- package/dist/src/systems/child/adapters/headlessChildSessionService.mjs +65 -30
- package/dist/src/systems/child/adapters/headlessChildSessionService.mjs.map +1 -1
- package/dist/src/systems/child/adapters/remoteChildSessionService.cjs +328 -0
- package/dist/src/systems/child/adapters/remoteChildSessionService.cjs.map +1 -0
- package/dist/src/systems/child/adapters/remoteChildSessionService.d.mts +35 -0
- package/dist/src/systems/child/adapters/remoteChildSessionService.d.mts.map +1 -0
- package/dist/src/systems/child/adapters/remoteChildSessionService.mjs +325 -0
- package/dist/src/systems/child/adapters/remoteChildSessionService.mjs.map +1 -0
- package/dist/src/systems/child/services/childSession/index.cjs +60 -32
- package/dist/src/systems/child/services/childSession/index.cjs.map +1 -1
- package/dist/src/systems/child/services/childSession/index.d.mts +5 -0
- package/dist/src/systems/child/services/childSession/index.d.mts.map +1 -1
- package/dist/src/systems/child/services/childSession/index.mjs +60 -32
- package/dist/src/systems/child/services/childSession/index.mjs.map +1 -1
- package/dist/src/systems/child/types/childSession.cjs.map +1 -1
- package/dist/src/systems/child/types/childSession.d.mts +34 -18
- package/dist/src/systems/child/types/childSession.d.mts.map +1 -1
- package/dist/src/systems/child/types/childSession.mjs.map +1 -1
- package/dist/src/systems/child/types/childSessionInput.d.mts +17 -0
- package/dist/src/systems/child/types/childSessionInput.d.mts.map +1 -0
- package/dist/src/systems/child/types/remoteChildSession.d.mts +85 -0
- package/dist/src/systems/child/types/remoteChildSession.d.mts.map +1 -0
- package/dist/src/systems/main/adapters/headlessHost.cjs +614 -82
- package/dist/src/systems/main/adapters/headlessHost.cjs.map +1 -1
- package/dist/src/systems/main/adapters/headlessHost.d.mts +60 -12
- package/dist/src/systems/main/adapters/headlessHost.d.mts.map +1 -1
- package/dist/src/systems/main/adapters/headlessHost.mjs +612 -81
- package/dist/src/systems/main/adapters/headlessHost.mjs.map +1 -1
- package/dist/src/systems/main/adapters/headlessSessionHost.cjs +866 -184
- package/dist/src/systems/main/adapters/headlessSessionHost.cjs.map +1 -1
- package/dist/src/systems/main/adapters/headlessSessionHost.d.mts +23 -3
- package/dist/src/systems/main/adapters/headlessSessionHost.d.mts.map +1 -1
- package/dist/src/systems/main/adapters/headlessSessionHost.mjs +845 -167
- package/dist/src/systems/main/adapters/headlessSessionHost.mjs.map +1 -1
- package/dist/src/systems/main/types/headlessHost.d.mts +14 -5
- package/dist/src/systems/main/types/headlessHost.d.mts.map +1 -1
- package/dist/src/testing/pi/testHost.cjs +1 -0
- package/dist/src/testing/pi/testHost.cjs.map +1 -1
- package/dist/src/testing/pi/testHost.mjs +1 -0
- package/dist/src/testing/pi/testHost.mjs.map +1 -1
- package/dist/src/types/kernel.d.mts +3 -3
- package/dist/src/types/remote.d.mts +53 -29
- package/dist/src/types/remote.d.mts.map +1 -1
- package/dist/src/types/server/agentSessionForward.d.mts +14 -0
- package/dist/src/types/server/agentSessionForward.d.mts.map +1 -0
- package/dist/src/types/server/auth.d.mts +104 -0
- package/dist/src/types/server/auth.d.mts.map +1 -0
- package/dist/src/types/server/directHarnessRuntime.d.mts +144 -19
- package/dist/src/types/server/directHarnessRuntime.d.mts.map +1 -1
- package/dist/src/types/server/sessionMcp.d.mts +34 -0
- package/dist/src/types/server/sessionMcp.d.mts.map +1 -0
- package/dist/src/types/telemetry.d.mts +64 -0
- package/dist/src/types/telemetry.d.mts.map +1 -0
- package/dist/src/web/hostSlots.cjs +199 -0
- package/dist/src/web/hostSlots.cjs.map +1 -0
- package/dist/src/web/hostSlots.d.mts +196 -0
- package/dist/src/web/hostSlots.d.mts.map +1 -0
- package/dist/src/web/hostSlots.mjs +195 -0
- package/dist/src/web/hostSlots.mjs.map +1 -0
- package/dist/src/web/models/globalStore.cjs +2 -2
- package/dist/src/web/models/globalStore.cjs.map +1 -1
- package/dist/src/web/models/globalStore.d.mts +2 -2
- package/dist/src/web/models/globalStore.d.mts.map +1 -1
- package/dist/src/web/models/globalStore.mjs +2 -2
- package/dist/src/web/models/globalStore.mjs.map +1 -1
- package/dist/src/web/models/sessionStore.cjs +1 -1
- package/dist/src/web/models/sessionStore.cjs.map +1 -1
- package/dist/src/web/models/sessionStore.mjs +1 -1
- package/dist/src/web/models/sessionStore.mjs.map +1 -1
- package/dist/src/web/schemas/onboarding.cjs +17 -0
- package/dist/src/web/schemas/onboarding.cjs.map +1 -0
- package/dist/src/web/schemas/onboarding.d.mts +6 -0
- package/dist/src/web/schemas/onboarding.d.mts.map +1 -0
- package/dist/src/web/schemas/onboarding.mjs +17 -0
- package/dist/src/web/schemas/onboarding.mjs.map +1 -0
- package/dist/src/web/schemas/template.cjs +20 -8
- package/dist/src/web/schemas/template.cjs.map +1 -1
- package/dist/src/web/schemas/template.d.mts +6 -2
- package/dist/src/web/schemas/template.d.mts.map +1 -1
- package/dist/src/web/schemas/template.mjs +20 -8
- package/dist/src/web/schemas/template.mjs.map +1 -1
- package/dist/src/web/services/apiClient/index.cjs +13 -2
- package/dist/src/web/services/apiClient/index.cjs.map +1 -1
- package/dist/src/web/services/apiClient/index.d.mts +3 -2
- package/dist/src/web/services/apiClient/index.d.mts.map +1 -1
- package/dist/src/web/services/apiClient/index.mjs +13 -2
- package/dist/src/web/services/apiClient/index.mjs.map +1 -1
- package/dist/src/web/services/apiPaths/index.cjs +1 -1
- package/dist/src/web/services/apiPaths/index.cjs.map +1 -1
- package/dist/src/web/services/apiPaths/index.d.mts +1 -1
- package/dist/src/web/services/apiPaths/index.mjs +1 -1
- package/dist/src/web/services/apiPaths/index.mjs.map +1 -1
- package/dist/src/web/services/apiRoutes/index.cjs +4 -4
- package/dist/src/web/services/apiRoutes/index.cjs.map +1 -1
- package/dist/src/web/services/apiRoutes/index.d.mts +2 -2
- package/dist/src/web/services/apiRoutes/index.mjs +4 -4
- package/dist/src/web/services/apiRoutes/index.mjs.map +1 -1
- package/dist/src/web/services/htmlInspect.cjs +277 -0
- package/dist/src/web/services/htmlInspect.cjs.map +1 -0
- package/dist/src/web/services/htmlInspect.d.mts +75 -0
- package/dist/src/web/services/htmlInspect.d.mts.map +1 -0
- package/dist/src/web/services/htmlInspect.mjs +272 -0
- package/dist/src/web/services/htmlInspect.mjs.map +1 -0
- package/dist/src/web/services/hubRevisions/index.cjs +60 -0
- package/dist/src/web/services/hubRevisions/index.cjs.map +1 -0
- package/dist/src/web/services/hubRevisions/index.d.mts +13 -0
- package/dist/src/web/services/hubRevisions/index.d.mts.map +1 -0
- package/dist/src/web/services/hubRevisions/index.mjs +57 -0
- package/dist/src/web/services/hubRevisions/index.mjs.map +1 -0
- package/dist/src/web/services/i18n/index.cjs +94 -0
- package/dist/src/web/services/i18n/index.cjs.map +1 -0
- package/dist/src/web/services/i18n/index.d.mts +18 -0
- package/dist/src/web/services/i18n/index.d.mts.map +1 -0
- package/dist/src/web/services/i18n/index.mjs +87 -0
- package/dist/src/web/services/i18n/index.mjs.map +1 -0
- package/dist/src/web/services/nativeByteCodec/index.cjs +28 -0
- package/dist/src/web/services/nativeByteCodec/index.cjs.map +1 -0
- package/dist/src/web/services/nativeByteCodec/index.d.mts +10 -0
- package/dist/src/web/services/nativeByteCodec/index.d.mts.map +1 -0
- package/dist/src/web/services/nativeByteCodec/index.mjs +26 -0
- package/dist/src/web/services/nativeByteCodec/index.mjs.map +1 -0
- package/dist/src/web/services/nativeByteCodec/type.d.mts +8 -0
- package/dist/src/web/services/nativeByteCodec/type.d.mts.map +1 -0
- package/dist/src/web/services/railSteps/index.cjs +39 -0
- package/dist/src/web/services/railSteps/index.cjs.map +1 -0
- package/dist/src/web/services/railSteps/index.d.mts +17 -0
- package/dist/src/web/services/railSteps/index.d.mts.map +1 -0
- package/dist/src/web/services/railSteps/index.mjs +39 -0
- package/dist/src/web/services/railSteps/index.mjs.map +1 -0
- package/dist/src/web/services/testing/settingsDirectory.cjs +164 -0
- package/dist/src/web/services/testing/settingsDirectory.cjs.map +1 -0
- package/dist/src/web/services/testing/settingsDirectory.d.mts +18 -0
- package/dist/src/web/services/testing/settingsDirectory.d.mts.map +1 -0
- package/dist/src/web/services/testing/settingsDirectory.mjs +164 -0
- package/dist/src/web/services/testing/settingsDirectory.mjs.map +1 -0
- package/dist/src/web/services/testing/templateRail.cjs +84 -6
- package/dist/src/web/services/testing/templateRail.cjs.map +1 -1
- package/dist/src/web/services/testing/templateRail.d.mts +8 -1
- package/dist/src/web/services/testing/templateRail.d.mts.map +1 -1
- package/dist/src/web/services/testing/templateRail.mjs +83 -7
- package/dist/src/web/services/testing/templateRail.mjs.map +1 -1
- package/dist/src/web/types/extensionFile.d.mts +11 -4
- package/dist/src/web/types/extensionFile.d.mts.map +1 -1
- package/dist/src/web/types/nativeTemplate.d.mts +170 -7
- package/dist/src/web/types/nativeTemplate.d.mts.map +1 -1
- package/dist/src/web/types/template.d.mts +133 -17
- package/dist/src/web/types/template.d.mts.map +1 -1
- package/dist/src/web/types/webPlugin.d.mts +535 -38
- package/dist/src/web/types/webPlugin.d.mts.map +1 -1
- package/dist/telemetry.cjs +7 -0
- package/dist/telemetry.d.mts +4 -0
- package/dist/telemetry.mjs +3 -0
- package/dist/transition.d.mts +2 -2
- package/dist/transitionClassifier.cjs +9 -9
- package/dist/transitionClassifier.cjs.map +1 -1
- package/dist/transitionClassifier.d.mts +1 -1
- package/dist/transitionClassifier.mjs +9 -9
- package/dist/transitionClassifier.mjs.map +1 -1
- package/dist/userFeedback.cjs +7 -0
- package/dist/userFeedback.d.mts +2 -0
- package/dist/userFeedback.mjs +1 -0
- package/dist/vendor/upm/_chunks/main.mjs +1 -1
- package/dist/verifiedArchive.cjs +11 -0
- package/dist/verifiedArchive.d.mts +2 -0
- package/dist/verifiedArchive.mjs +1 -0
- package/dist/web.cjs +89 -32
- package/dist/web.d.mts +22 -9
- package/dist/web.mjs +16 -5
- package/dist/webCompositions.cjs +87 -17
- package/dist/webCompositions.cjs.map +1 -1
- package/dist/webCompositions.d.mts +22 -6
- package/dist/webCompositions.d.mts.map +1 -1
- package/dist/webCompositions.mjs +87 -18
- package/dist/webCompositions.mjs.map +1 -1
- package/dist/webTesting.cjs +4 -0
- package/dist/webTesting.d.mts +3 -2
- package/dist/webTesting.mjs +3 -2
- package/dist/workflow.cjs +32 -0
- package/dist/workflow.d.mts +2 -0
- package/dist/workflow.mjs +1 -0
- package/dist/workspaceRegistry.cjs +7 -0
- package/dist/workspaceRegistry.d.mts +3 -0
- package/dist/workspaceRegistry.mjs +3 -0
- package/dist/workspaceSandboxes.cjs +7 -0
- package/dist/workspaceSandboxes.d.mts +3 -0
- package/dist/workspaceSandboxes.mjs +3 -0
- package/locales/vi.json +4 -0
- package/locales/zh-CN.json +4 -0
- package/package.json +164 -51
- package/dist/authorTools.cjs +0 -5
- package/dist/authorTools.d.mts +0 -2
- package/dist/authorTools.mjs +0 -1
- package/dist/cockpitContainer.cjs +0 -4
- package/dist/cockpitContainer.d.mts +0 -2
- package/dist/cockpitContainer.mjs +0 -1
- package/dist/remoteApi.cjs +0 -45
- package/dist/remoteApi.cjs.map +0 -1
- package/dist/remoteApi.d.mts +0 -7
- package/dist/remoteApi.d.mts.map +0 -1
- package/dist/remoteApi.mjs +0 -44
- package/dist/remoteApi.mjs.map +0 -1
- package/dist/remoteRuntime.cjs +0 -475
- package/dist/remoteRuntime.cjs.map +0 -1
- package/dist/remoteRuntime.d.mts +0 -37
- package/dist/remoteRuntime.d.mts.map +0 -1
- package/dist/remoteRuntime.mjs +0 -473
- package/dist/remoteRuntime.mjs.map +0 -1
- package/dist/sandboxHarness.cjs +0 -6
- package/dist/sandboxHarness.d.mts +0 -2
- package/dist/sandboxHarness.mjs +0 -1
- package/dist/sessionMcp.cjs +0 -6
- package/dist/sessionMcp.d.mts +0 -5
- package/dist/sessionMcp.mjs +0 -3
- package/dist/src/constants/authorTools.cjs +0 -10
- package/dist/src/constants/authorTools.cjs.map +0 -1
- package/dist/src/constants/authorTools.d.mts +0 -6
- package/dist/src/constants/authorTools.d.mts.map +0 -1
- package/dist/src/constants/authorTools.mjs +0 -8
- package/dist/src/constants/authorTools.mjs.map +0 -1
- package/dist/src/schemas/cockpitContainer.cjs +0 -31
- package/dist/src/schemas/cockpitContainer.cjs.map +0 -1
- package/dist/src/schemas/cockpitContainer.d.mts +0 -80
- package/dist/src/schemas/cockpitContainer.d.mts.map +0 -1
- package/dist/src/schemas/cockpitContainer.mjs +0 -30
- package/dist/src/schemas/cockpitContainer.mjs.map +0 -1
- package/dist/src/schemas/httpApiContracts.d.mts +0 -78
- package/dist/src/schemas/httpApiContracts.d.mts.map +0 -1
- package/dist/src/schemas/sandboxHarness.cjs +0 -29
- package/dist/src/schemas/sandboxHarness.cjs.map +0 -1
- package/dist/src/schemas/sandboxHarness.d.mts +0 -39
- package/dist/src/schemas/sandboxHarness.d.mts.map +0 -1
- package/dist/src/schemas/sandboxHarness.mjs +0 -26
- package/dist/src/schemas/sandboxHarness.mjs.map +0 -1
- package/dist/src/server/devProxyForward.cjs +0 -141
- package/dist/src/server/devProxyForward.cjs.map +0 -1
- package/dist/src/server/devProxyForward.mjs +0 -139
- package/dist/src/server/devProxyForward.mjs.map +0 -1
- package/dist/src/server/devProxyRoutes.cjs +0 -97
- package/dist/src/server/devProxyRoutes.cjs.map +0 -1
- package/dist/src/server/devProxyRoutes.mjs +0 -97
- package/dist/src/server/devProxyRoutes.mjs.map +0 -1
- package/dist/src/server/devProxySocket.cjs +0 -93
- package/dist/src/server/devProxySocket.cjs.map +0 -1
- package/dist/src/server/devProxySocket.d.mts +0 -25
- package/dist/src/server/devProxySocket.d.mts.map +0 -1
- package/dist/src/server/devProxySocket.mjs +0 -93
- package/dist/src/server/devProxySocket.mjs.map +0 -1
- package/dist/src/server/remoteRoutes.cjs +0 -463
- package/dist/src/server/remoteRoutes.cjs.map +0 -1
- package/dist/src/server/remoteRoutes.mjs +0 -463
- package/dist/src/server/remoteRoutes.mjs.map +0 -1
- package/dist/src/server/sessionMcpHandler.cjs +0 -585
- package/dist/src/server/sessionMcpHandler.cjs.map +0 -1
- package/dist/src/server/sessionMcpHandler.d.mts +0 -50
- package/dist/src/server/sessionMcpHandler.d.mts.map +0 -1
- package/dist/src/server/sessionMcpHandler.mjs +0 -582
- package/dist/src/server/sessionMcpHandler.mjs.map +0 -1
- package/dist/src/server/sessionMcpRoutes.cjs +0 -822
- package/dist/src/server/sessionMcpRoutes.cjs.map +0 -1
- package/dist/src/server/sessionMcpRoutes.mjs +0 -816
- package/dist/src/server/sessionMcpRoutes.mjs.map +0 -1
- package/dist/src/services/devProxyPolicy/index.cjs +0 -168
- package/dist/src/services/devProxyPolicy/index.cjs.map +0 -1
- package/dist/src/services/devProxyPolicy/index.mjs +0 -165
- package/dist/src/services/devProxyPolicy/index.mjs.map +0 -1
- package/dist/src/services/devProxyStore/devProxyRecords.cjs +0 -59
- package/dist/src/services/devProxyStore/devProxyRecords.cjs.map +0 -1
- package/dist/src/services/devProxyStore/devProxyRecords.mjs +0 -56
- package/dist/src/services/devProxyStore/devProxyRecords.mjs.map +0 -1
- package/dist/src/services/devProxyStore/index.cjs +0 -13
- package/dist/src/services/devProxyStore/index.cjs.map +0 -1
- package/dist/src/services/devProxyStore/index.mjs +0 -10
- package/dist/src/services/devProxyStore/index.mjs.map +0 -1
- package/dist/src/services/devProxyStore/sync.cjs +0 -66
- package/dist/src/services/devProxyStore/sync.cjs.map +0 -1
- package/dist/src/services/devProxyStore/sync.mjs +0 -63
- package/dist/src/services/devProxyStore/sync.mjs.map +0 -1
- package/dist/src/services/deviceAuth/index.cjs +0 -146
- package/dist/src/services/deviceAuth/index.cjs.map +0 -1
- package/dist/src/services/deviceAuth/index.d.mts +0 -9
- package/dist/src/services/deviceAuth/index.d.mts.map +0 -1
- package/dist/src/services/deviceAuth/index.mjs +0 -146
- package/dist/src/services/deviceAuth/index.mjs.map +0 -1
- package/dist/src/services/deviceSessions/index.cjs +0 -147
- package/dist/src/services/deviceSessions/index.cjs.map +0 -1
- package/dist/src/services/deviceSessions/index.d.mts +0 -18
- package/dist/src/services/deviceSessions/index.d.mts.map +0 -1
- package/dist/src/services/deviceSessions/index.mjs +0 -141
- package/dist/src/services/deviceSessions/index.mjs.map +0 -1
- package/dist/src/services/deviceTrust/index.cjs +0 -294
- package/dist/src/services/deviceTrust/index.cjs.map +0 -1
- package/dist/src/services/deviceTrust/index.mjs +0 -282
- package/dist/src/services/deviceTrust/index.mjs.map +0 -1
- package/dist/src/services/loopbackAddress/index.cjs +0 -58
- package/dist/src/services/loopbackAddress/index.cjs.map +0 -1
- package/dist/src/services/loopbackAddress/index.mjs +0 -56
- package/dist/src/services/loopbackAddress/index.mjs.map +0 -1
- package/dist/src/services/pairingFlow/index.cjs +0 -145
- package/dist/src/services/pairingFlow/index.cjs.map +0 -1
- package/dist/src/services/pairingFlow/index.d.mts +0 -44
- package/dist/src/services/pairingFlow/index.d.mts.map +0 -1
- package/dist/src/services/pairingFlow/index.mjs +0 -145
- package/dist/src/services/pairingFlow/index.mjs.map +0 -1
- package/dist/src/services/publicFileShares/index.cjs +0 -192
- package/dist/src/services/publicFileShares/index.cjs.map +0 -1
- package/dist/src/services/publicFileShares/index.d.mts +0 -16
- package/dist/src/services/publicFileShares/index.d.mts.map +0 -1
- package/dist/src/services/publicFileShares/index.mjs +0 -188
- package/dist/src/services/publicFileShares/index.mjs.map +0 -1
- package/dist/src/services/remoteAccess/index.cjs +0 -567
- package/dist/src/services/remoteAccess/index.cjs.map +0 -1
- package/dist/src/services/remoteAccess/index.d.mts +0 -122
- package/dist/src/services/remoteAccess/index.d.mts.map +0 -1
- package/dist/src/services/remoteAccess/index.mjs +0 -567
- package/dist/src/services/remoteAccess/index.mjs.map +0 -1
- package/dist/src/services/remoteAccessSettings/index.cjs +0 -151
- package/dist/src/services/remoteAccessSettings/index.cjs.map +0 -1
- package/dist/src/services/remoteAccessSettings/index.mjs +0 -149
- package/dist/src/services/remoteAccessSettings/index.mjs.map +0 -1
- package/dist/src/services/remoteAccessStore/index.cjs +0 -15
- package/dist/src/services/remoteAccessStore/index.cjs.map +0 -1
- package/dist/src/services/remoteAccessStore/index.d.mts +0 -2
- package/dist/src/services/remoteAccessStore/index.mjs +0 -12
- package/dist/src/services/remoteAccessStore/index.mjs.map +0 -1
- package/dist/src/services/remoteAccessStore/remoteAccessRecords.cjs +0 -98
- package/dist/src/services/remoteAccessStore/remoteAccessRecords.cjs.map +0 -1
- package/dist/src/services/remoteAccessStore/remoteAccessRecords.mjs +0 -88
- package/dist/src/services/remoteAccessStore/remoteAccessRecords.mjs.map +0 -1
- package/dist/src/services/remoteAccessStore/sync.cjs +0 -111
- package/dist/src/services/remoteAccessStore/sync.cjs.map +0 -1
- package/dist/src/services/remoteAccessStore/sync.mjs +0 -108
- package/dist/src/services/remoteAccessStore/sync.mjs.map +0 -1
- package/dist/src/services/remoteGuardPolicy/index.cjs +0 -200
- package/dist/src/services/remoteGuardPolicy/index.cjs.map +0 -1
- package/dist/src/services/remoteGuardPolicy/index.d.mts +0 -7
- package/dist/src/services/remoteGuardPolicy/index.d.mts.map +0 -1
- package/dist/src/services/remoteGuardPolicy/index.mjs +0 -196
- package/dist/src/services/remoteGuardPolicy/index.mjs.map +0 -1
- package/dist/src/services/sessionMcpActivity/index.cjs +0 -115
- package/dist/src/services/sessionMcpActivity/index.cjs.map +0 -1
- package/dist/src/services/sessionMcpActivity/index.mjs +0 -111
- package/dist/src/services/sessionMcpActivity/index.mjs.map +0 -1
- package/dist/src/services/sessionMcpAuthorization/index.cjs +0 -473
- package/dist/src/services/sessionMcpAuthorization/index.cjs.map +0 -1
- package/dist/src/services/sessionMcpAuthorization/index.d.mts +0 -125
- package/dist/src/services/sessionMcpAuthorization/index.d.mts.map +0 -1
- package/dist/src/services/sessionMcpAuthorization/index.mjs +0 -469
- package/dist/src/services/sessionMcpAuthorization/index.mjs.map +0 -1
- package/dist/src/services/sessionMcpConversations/index.cjs +0 -217
- package/dist/src/services/sessionMcpConversations/index.cjs.map +0 -1
- package/dist/src/services/sessionMcpConversations/index.mjs +0 -212
- package/dist/src/services/sessionMcpConversations/index.mjs.map +0 -1
- package/dist/src/services/sessionMcpRegistrationStore/index.cjs +0 -86
- package/dist/src/services/sessionMcpRegistrationStore/index.cjs.map +0 -1
- package/dist/src/services/sessionMcpRegistrationStore/index.mjs +0 -83
- package/dist/src/services/sessionMcpRegistrationStore/index.mjs.map +0 -1
- package/dist/src/services/testMode/index.cjs +0 -162
- package/dist/src/services/testMode/index.cjs.map +0 -1
- package/dist/src/services/testMode/index.d.mts +0 -17
- package/dist/src/services/testMode/index.d.mts.map +0 -1
- package/dist/src/services/testMode/index.mjs +0 -155
- package/dist/src/services/testMode/index.mjs.map +0 -1
- package/dist/src/services/tunnelOutput/index.cjs +0 -58
- package/dist/src/services/tunnelOutput/index.cjs.map +0 -1
- package/dist/src/services/tunnelOutput/index.mjs +0 -54
- package/dist/src/services/tunnelOutput/index.mjs.map +0 -1
- package/dist/src/services/tunnelProcess/index.cjs +0 -487
- package/dist/src/services/tunnelProcess/index.cjs.map +0 -1
- package/dist/src/services/tunnelProcess/index.mjs +0 -481
- package/dist/src/services/tunnelProcess/index.mjs.map +0 -1
- package/dist/src/services/webauthn/index.cjs +0 -262
- package/dist/src/services/webauthn/index.cjs.map +0 -1
- package/dist/src/services/webauthn/index.d.mts +0 -39
- package/dist/src/services/webauthn/index.d.mts.map +0 -1
- package/dist/src/services/webauthn/index.mjs +0 -262
- package/dist/src/services/webauthn/index.mjs.map +0 -1
- package/dist/src/services/webauthnPolicy/index.cjs +0 -184
- package/dist/src/services/webauthnPolicy/index.cjs.map +0 -1
- package/dist/src/services/webauthnPolicy/index.d.mts +0 -41
- package/dist/src/services/webauthnPolicy/index.d.mts.map +0 -1
- package/dist/src/services/webauthnPolicy/index.mjs +0 -177
- package/dist/src/services/webauthnPolicy/index.mjs.map +0 -1
- package/dist/testMode.cjs +0 -4
- package/dist/testMode.d.mts +0 -2
- package/dist/testMode.mjs +0 -1
|
@@ -19,8 +19,11 @@ const SESSION_FILE_CONTENT_TYPES = {
|
|
|
19
19
|
};
|
|
20
20
|
/** The fallback media type for a session file whose extension is not listed above. */
|
|
21
21
|
const SESSION_FILE_DEFAULT_CONTENT_TYPE = "application/octet-stream";
|
|
22
|
+
/** The session host's own API that reads files under the session's open folders. */
|
|
23
|
+
const SESSION_FILES_API = "session-files";
|
|
22
24
|
//#endregion
|
|
23
25
|
exports.MAX_SESSION_FILE_BYTES = MAX_SESSION_FILE_BYTES;
|
|
26
|
+
exports.SESSION_FILES_API = SESSION_FILES_API;
|
|
24
27
|
exports.SESSION_FILE_CONTENT_TYPES = SESSION_FILE_CONTENT_TYPES;
|
|
25
28
|
exports.SESSION_FILE_DEFAULT_CONTENT_TYPE = SESSION_FILE_DEFAULT_CONTENT_TYPE;
|
|
26
29
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionFiles.cjs","names":[],"sources":["../../../src/constants/sessionFiles.ts"],"sourcesContent":["/** Largest session file the host reads into a response or publishes at a share link. */\nexport const MAX_SESSION_FILE_BYTES = 25 * 1024 * 1024;\n\n/** Media types for session files a browser may render; anything else is served as bytes. */\nexport const SESSION_FILE_CONTENT_TYPES: Readonly<Record<string, string>> = {\n '.avif': 'image/avif',\n '.bmp': 'image/bmp',\n '.gif': 'image/gif',\n '.jpeg': 'image/jpeg',\n '.jpg': 'image/jpeg',\n '.png': 'image/png',\n '.svg': 'image/svg+xml',\n '.webp': 'image/webp',\n '.m4v': 'video/mp4',\n '.mov': 'video/quicktime',\n '.mp4': 'video/mp4',\n '.webm': 'video/webm',\n '.pdf': 'application/pdf',\n};\n\n/** The fallback media type for a session file whose extension is not listed above. */\nexport const SESSION_FILE_DEFAULT_CONTENT_TYPE = 'application/octet-stream';\n"],"mappings":";;AACA,MAAa,yBAAyB;;AAGtC,MAAa,6BAA+D;CAC1E,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,QAAQ;AACV;;AAGA,MAAa,oCAAoC"}
|
|
1
|
+
{"version":3,"file":"sessionFiles.cjs","names":[],"sources":["../../../src/constants/sessionFiles.ts"],"sourcesContent":["/** Largest session file the host reads into a response or publishes at a share link. */\nexport const MAX_SESSION_FILE_BYTES = 25 * 1024 * 1024;\n\n/** Media types for session files a browser may render; anything else is served as bytes. */\nexport const SESSION_FILE_CONTENT_TYPES: Readonly<Record<string, string>> = {\n '.avif': 'image/avif',\n '.bmp': 'image/bmp',\n '.gif': 'image/gif',\n '.jpeg': 'image/jpeg',\n '.jpg': 'image/jpeg',\n '.png': 'image/png',\n '.svg': 'image/svg+xml',\n '.webp': 'image/webp',\n '.m4v': 'video/mp4',\n '.mov': 'video/quicktime',\n '.mp4': 'video/mp4',\n '.webm': 'video/webm',\n '.pdf': 'application/pdf',\n};\n\n/** The fallback media type for a session file whose extension is not listed above. */\nexport const SESSION_FILE_DEFAULT_CONTENT_TYPE = 'application/octet-stream';\n\n/** The session host's own API that reads files under the session's open folders. */\nexport const SESSION_FILES_API = 'session-files';\n"],"mappings":";;AACA,MAAa,yBAAyB;;AAGtC,MAAa,6BAA+D;CAC1E,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,QAAQ;AACV;;AAGA,MAAa,oCAAoC;;AAGjD,MAAa,oBAAoB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/constants/sessionFiles.d.ts
|
|
2
|
+
/** Largest session file the host reads into a response or publishes at a share link. */
|
|
3
|
+
export declare const MAX_SESSION_FILE_BYTES: number;
|
|
4
|
+
/** Media types for session files a browser may render; anything else is served as bytes. */
|
|
5
|
+
export declare const SESSION_FILE_CONTENT_TYPES: Readonly<Record<string, string>>;
|
|
6
|
+
/** The fallback media type for a session file whose extension is not listed above. */
|
|
7
|
+
export declare const SESSION_FILE_DEFAULT_CONTENT_TYPE = "application/octet-stream";
|
|
8
|
+
//#endregion
|
|
9
|
+
//# sourceMappingURL=sessionFiles.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionFiles.d.mts","names":[],"sources":["../../../src/constants/sessionFiles.ts"],"mappings":";;qBACa;;qBAGA,4BAA4B,SAAS;;qBAiBrC"}
|
|
@@ -19,7 +19,9 @@ const SESSION_FILE_CONTENT_TYPES = {
|
|
|
19
19
|
};
|
|
20
20
|
/** The fallback media type for a session file whose extension is not listed above. */
|
|
21
21
|
const SESSION_FILE_DEFAULT_CONTENT_TYPE = "application/octet-stream";
|
|
22
|
+
/** The session host's own API that reads files under the session's open folders. */
|
|
23
|
+
const SESSION_FILES_API = "session-files";
|
|
22
24
|
//#endregion
|
|
23
|
-
export { MAX_SESSION_FILE_BYTES, SESSION_FILE_CONTENT_TYPES, SESSION_FILE_DEFAULT_CONTENT_TYPE };
|
|
25
|
+
export { MAX_SESSION_FILE_BYTES, SESSION_FILES_API, SESSION_FILE_CONTENT_TYPES, SESSION_FILE_DEFAULT_CONTENT_TYPE };
|
|
24
26
|
|
|
25
27
|
//# sourceMappingURL=sessionFiles.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionFiles.mjs","names":[],"sources":["../../../src/constants/sessionFiles.ts"],"sourcesContent":["/** Largest session file the host reads into a response or publishes at a share link. */\nexport const MAX_SESSION_FILE_BYTES = 25 * 1024 * 1024;\n\n/** Media types for session files a browser may render; anything else is served as bytes. */\nexport const SESSION_FILE_CONTENT_TYPES: Readonly<Record<string, string>> = {\n '.avif': 'image/avif',\n '.bmp': 'image/bmp',\n '.gif': 'image/gif',\n '.jpeg': 'image/jpeg',\n '.jpg': 'image/jpeg',\n '.png': 'image/png',\n '.svg': 'image/svg+xml',\n '.webp': 'image/webp',\n '.m4v': 'video/mp4',\n '.mov': 'video/quicktime',\n '.mp4': 'video/mp4',\n '.webm': 'video/webm',\n '.pdf': 'application/pdf',\n};\n\n/** The fallback media type for a session file whose extension is not listed above. */\nexport const SESSION_FILE_DEFAULT_CONTENT_TYPE = 'application/octet-stream';\n"],"mappings":";;AACA,MAAa,yBAAyB;;AAGtC,MAAa,6BAA+D;CAC1E,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,QAAQ;AACV;;AAGA,MAAa,oCAAoC"}
|
|
1
|
+
{"version":3,"file":"sessionFiles.mjs","names":[],"sources":["../../../src/constants/sessionFiles.ts"],"sourcesContent":["/** Largest session file the host reads into a response or publishes at a share link. */\nexport const MAX_SESSION_FILE_BYTES = 25 * 1024 * 1024;\n\n/** Media types for session files a browser may render; anything else is served as bytes. */\nexport const SESSION_FILE_CONTENT_TYPES: Readonly<Record<string, string>> = {\n '.avif': 'image/avif',\n '.bmp': 'image/bmp',\n '.gif': 'image/gif',\n '.jpeg': 'image/jpeg',\n '.jpg': 'image/jpeg',\n '.png': 'image/png',\n '.svg': 'image/svg+xml',\n '.webp': 'image/webp',\n '.m4v': 'video/mp4',\n '.mov': 'video/quicktime',\n '.mp4': 'video/mp4',\n '.webm': 'video/webm',\n '.pdf': 'application/pdf',\n};\n\n/** The fallback media type for a session file whose extension is not listed above. */\nexport const SESSION_FILE_DEFAULT_CONTENT_TYPE = 'application/octet-stream';\n\n/** The session host's own API that reads files under the session's open folders. */\nexport const SESSION_FILES_API = 'session-files';\n"],"mappings":";;AACA,MAAa,yBAAyB;;AAGtC,MAAa,6BAA+D;CAC1E,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,QAAQ;AACV;;AAGA,MAAa,oCAAoC;;AAGjD,MAAa,oBAAoB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/constants/template.ts
|
|
2
|
+
/** The template the cockpit and the phone draw when none is configured; both ship it bundled. */
|
|
3
|
+
const DEFAULT_TEMPLATE_ID = "po-template-elegant";
|
|
4
|
+
/** The background the cockpit shows when `web.backdrop` is unset: `<pluginId>/<fillId>` of Po's bamboo. */
|
|
5
|
+
const DEFAULT_BACKDROP_ID = "backdrop-bamboo/bamboo";
|
|
6
|
+
/** The `web.backdrop` value that shows no background at all. */
|
|
7
|
+
const NO_BACKDROP = "none";
|
|
8
|
+
//#endregion
|
|
9
|
+
exports.DEFAULT_BACKDROP_ID = DEFAULT_BACKDROP_ID;
|
|
10
|
+
exports.DEFAULT_TEMPLATE_ID = DEFAULT_TEMPLATE_ID;
|
|
11
|
+
exports.NO_BACKDROP = NO_BACKDROP;
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=template.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.cjs","names":[],"sources":["../../../src/constants/template.ts"],"sourcesContent":["/** The template the cockpit and the phone draw when none is configured; both ship it bundled. */\nexport const DEFAULT_TEMPLATE_ID = 'po-template-elegant';\n\n/** The background the cockpit shows when `web.backdrop` is unset: `<pluginId>/<fillId>` of Po's bamboo. */\nexport const DEFAULT_BACKDROP_ID = 'backdrop-bamboo/bamboo';\n/** The `web.backdrop` value that shows no background at all. */\nexport const NO_BACKDROP = 'none';\n"],"mappings":";;AACA,MAAa,sBAAsB;;AAGnC,MAAa,sBAAsB;;AAEnC,MAAa,cAAc"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/constants/template.d.ts
|
|
2
|
+
/** The template the cockpit and the phone draw when none is configured; both ship it bundled. */
|
|
3
|
+
export declare const DEFAULT_TEMPLATE_ID = "po-template-elegant";
|
|
4
|
+
/** The background the cockpit shows when `web.backdrop` is unset: `<pluginId>/<fillId>` of Po's bamboo. */
|
|
5
|
+
export declare const DEFAULT_BACKDROP_ID = "backdrop-bamboo/bamboo";
|
|
6
|
+
/** The `web.backdrop` value that shows no background at all. */
|
|
7
|
+
export declare const NO_BACKDROP = "none";
|
|
8
|
+
//#endregion
|
|
9
|
+
//# sourceMappingURL=template.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.d.mts","names":[],"sources":["../../../src/constants/template.ts"],"mappings":";;qBACa;;qBAGA;;qBAEA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/constants/template.ts
|
|
2
|
+
/** The template the cockpit and the phone draw when none is configured; both ship it bundled. */
|
|
3
|
+
const DEFAULT_TEMPLATE_ID = "po-template-elegant";
|
|
4
|
+
/** The background the cockpit shows when `web.backdrop` is unset: `<pluginId>/<fillId>` of Po's bamboo. */
|
|
5
|
+
const DEFAULT_BACKDROP_ID = "backdrop-bamboo/bamboo";
|
|
6
|
+
/** The `web.backdrop` value that shows no background at all. */
|
|
7
|
+
const NO_BACKDROP = "none";
|
|
8
|
+
//#endregion
|
|
9
|
+
export { DEFAULT_BACKDROP_ID, DEFAULT_TEMPLATE_ID, NO_BACKDROP };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=template.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.mjs","names":[],"sources":["../../../src/constants/template.ts"],"sourcesContent":["/** The template the cockpit and the phone draw when none is configured; both ship it bundled. */\nexport const DEFAULT_TEMPLATE_ID = 'po-template-elegant';\n\n/** The background the cockpit shows when `web.backdrop` is unset: `<pluginId>/<fillId>` of Po's bamboo. */\nexport const DEFAULT_BACKDROP_ID = 'backdrop-bamboo/bamboo';\n/** The `web.backdrop` value that shows no background at all. */\nexport const NO_BACKDROP = 'none';\n"],"mappings":";;AACA,MAAa,sBAAsB;;AAGnC,MAAa,sBAAsB;;AAEnC,MAAa,cAAc"}
|
|
@@ -22,18 +22,20 @@ function defineRoutedContribution(file, _options) {
|
|
|
22
22
|
function defineProvider(file) {
|
|
23
23
|
return file;
|
|
24
24
|
}
|
|
25
|
-
/** `resource/<name>.ts`. Declares one package resource. */
|
|
26
25
|
function defineResource(file) {
|
|
26
|
+
if (file !== null && typeof file === "object" && "relations" in file && Array.isArray(file.relations)) return {
|
|
27
|
+
...file,
|
|
28
|
+
relations: file.relations.map((relation) => ({
|
|
29
|
+
...relation,
|
|
30
|
+
evidence: relation.evidence ?? "declared"
|
|
31
|
+
}))
|
|
32
|
+
};
|
|
27
33
|
return file;
|
|
28
34
|
}
|
|
29
35
|
/** `tool-restriction/<name>.ts`. Declares one tool restriction. */
|
|
30
36
|
function defineToolRestriction(file) {
|
|
31
37
|
return file;
|
|
32
38
|
}
|
|
33
|
-
/** Declares one mode when it is not represented by a mode gate file. */
|
|
34
|
-
function defineMode(file) {
|
|
35
|
-
return file;
|
|
36
|
-
}
|
|
37
39
|
/** `tool/<name>.ts`. Adds the discriminant the contribution array expects. */
|
|
38
40
|
function defineTool(file) {
|
|
39
41
|
return typeof file === "function" ? (context) => ({
|
|
@@ -110,7 +112,6 @@ function defineCommand(file) {
|
|
|
110
112
|
...file
|
|
111
113
|
};
|
|
112
114
|
}
|
|
113
|
-
/** `hook/<event>.ts`. Name the event here too when the handler needs a precise payload. */
|
|
114
115
|
function defineHook(file) {
|
|
115
116
|
return file;
|
|
116
117
|
}
|
|
@@ -118,9 +119,8 @@ function defineHook(file) {
|
|
|
118
119
|
function defineService(file) {
|
|
119
120
|
return file;
|
|
120
121
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
return file;
|
|
122
|
+
function defineChannel(file, options) {
|
|
123
|
+
return options?.context === true ? file : () => file();
|
|
124
124
|
}
|
|
125
125
|
/** `api/<segments>/route.ts`. The folder path is the route. */
|
|
126
126
|
function defineRoute(file) {
|
|
@@ -142,7 +142,6 @@ exports.defineChannel = defineChannel;
|
|
|
142
142
|
exports.defineCommand = defineCommand;
|
|
143
143
|
exports.defineHook = defineHook;
|
|
144
144
|
exports.defineMethod = defineMethod;
|
|
145
|
-
exports.defineMode = defineMode;
|
|
146
145
|
exports.defineProvider = defineProvider;
|
|
147
146
|
exports.defineResource = defineResource;
|
|
148
147
|
exports.defineRoot = defineRoot;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensionFile.cjs","names":["runCleanups"],"sources":["../../../src/extensions/extensionFile.ts"],"sourcesContent":["import type { TSchema } from 'typebox';\n\nimport type {\n ActivityFile,\n ChannelFile,\n CommandContribution,\n CommandFile,\n HookFile,\n MethodFile,\n RootFile,\n RoutedFileOptions,\n RouteFile,\n ServerCommandFile,\n ServerToolFile,\n ServiceFile,\n ToolContribution,\n ToolFile,\n} from '../schemas/extensionFile';\nimport type { PoHeadlessEventName } from '../schemas/headless';\nimport type { PoApiScope } from '../schemas/packageApi';\nimport type { PoServerContracts } from '../schemas/serverPlugin';\nimport type { PoServiceContract } from '../schemas/serverScope';\nimport { runCleanups, type PluginLifecycleHooks } from '../services/pluginLifecycle';\n\n/**\n * Identity helpers for folder-routed backend files, one per surface.\n *\n * A routed file's default export is its whole contract with the host, and\n * nothing else validates it: the generated entry merges the path's identity in\n * and hands the result to a contribution array, where an excess or misspelled\n * key is invisible. These make the shape checkable at the point it is written,\n * and give the factory form a typed context instead of an implicit any.\n *\n * Most return their argument unchanged, so the value is entirely in the\n * position they check and the inference they supply. The two that do not,\n * `defineTool` and `defineCommand`, add the discriminant the host reads to\n * tell a portable contribution from a raw host declaration.\n */\n\n/** Declares non-default route cardinality while preserving the routed surface's inferred host type. */\nexport function defineRoutedContribution<T>(file: T, _options: RoutedFileOptions): T {\n return file;\n}\n\n/** `provider/<name>.server.ts`. Declares one native provider contribution. */\nexport function defineProvider<T>(file: T): T {\n return file;\n}\n\n/** `resource/<name>.ts`. Declares one package resource. */\nexport function defineResource<T>(file: T): T {\n return file;\n}\n\n/** `tool-restriction/<name>.ts`. Declares one tool restriction. */\nexport function defineToolRestriction<T>(file: T): T {\n return file;\n}\n\n/** Declares one mode when it is not represented by a mode gate file. */\nexport function defineMode<T>(file: T): T {\n return file;\n}\n\n/** `tool/<name>.ts`. Adds the discriminant the contribution array expects. */\nexport function defineTool<TContext = unknown>(file: ToolFile<TContext>): ToolContribution<TContext> {\n return typeof file === 'function'\n ? (context) => ({ kind: 'tool' as const, ...file(context) })\n : { kind: 'tool' as const, ...file };\n}\n\n/** `tool/<name>.server.ts`. A native headless tool, handed to the host untouched. */\nexport function defineServerTool<TParameters extends TSchema = TSchema, TContext = unknown>(\n file: ServerToolFile<TParameters, TContext>,\n): ServerToolFile<TParameters, TContext> {\n return file;\n}\n\n/**\n * `root.ts`. Constructs one scope and names what its subtree shares.\n *\n * The answer to a package whose surfaces all read one per-mount object graph.\n * The root builds that graph once, and every routed file beneath it receives\n * it as `context.root`, so the package decomposes into a file per surface\n * without either rebuilding the graph per file or reaching for a module-level\n * singleton.\n *\n * `inject` names the contracts, from this package or another, that the level\n * waits for before it builds this root and restarts with when they change.\n */\nexport function defineRoot<TValue, TContext = unknown>(\n file: RootFile<TValue, TContext>,\n options?: { readonly inject?: readonly PoServiceContract<unknown>[] },\n): RootFile<TValue, TContext> {\n // Assigned rather than wrapped, so other metadata the factory carries (provider overrides) stays.\n return options?.inject === undefined ? file : Object.assign(file, { inject: options.inject });\n}\n\n/**\n * The contracts each level waits for: every contract injected by the roots that level builds or\n * reuses, once each. A level none of whose roots inject anything is left out.\n */\nexport function composeRootInjects(\n levels: Readonly<Partial<Record<PoApiScope, readonly Pick<RootFile<unknown>, 'inject'>[]>>>,\n): PoServerContracts {\n const injects: Partial<Record<PoApiScope, readonly PoServiceContract<unknown>[]>> = {};\n for (const [level, roots] of Object.entries(levels) as [PoApiScope, readonly Pick<RootFile<unknown>, 'inject'>[]][]) {\n const contracts = new Map(roots.flatMap((root) => root.inject ?? []).map((contract) => [contract.name, contract]));\n if (contracts.size > 0) injects[level] = [...contracts.values()];\n }\n return injects;\n}\n\n/**\n * Folds every root in a scope chain into one set of lifecycle hooks.\n *\n * Start outermost first and tear down innermost first, which is the order the\n * roots were constructed in and the only order in which an inner scope can\n * still rely on its outer one while stopping.\n */\nexport function composeRootHooks<TContext>(\n ...roots: readonly PluginLifecycleHooks<TContext>[]\n): Required<PluginLifecycleHooks<TContext>> {\n const reversed = [...roots].reverse();\n return {\n async onStart(context) {\n for (const root of roots) await root.onStart?.(context);\n },\n async onStop(context) {\n await runCleanups(\n reversed.map((root) => () => root.onStop?.(context)),\n 'Root stop failed.',\n );\n },\n async onDispose(context) {\n await runCleanups(\n reversed.map((root) => () => root.onDispose?.(context)),\n 'Root cleanup failed.',\n );\n },\n };\n}\n\n/** `command/<name>.server.ts`. A native headless or portable Po command. */\nexport function defineServerCommand<TContext = unknown>(\n file: ServerCommandFile<TContext>,\n): ServerCommandFile<TContext> {\n return file;\n}\n\n/** `command/<name>.ts`. Adds the discriminant the contribution array expects. */\nexport function defineCommand<TContext = unknown>(file: CommandFile<TContext>): CommandContribution<TContext> {\n return typeof file === 'function'\n ? (context) => ({ kind: 'command' as const, ...file(context) })\n : { kind: 'command' as const, ...file };\n}\n\n/** `hook/<event>.ts`. Name the event here too when the handler needs a precise payload. */\nexport function defineHook<TEvent extends PoHeadlessEventName = PoHeadlessEventName, TContext = unknown>(\n file: HookFile<TEvent, TContext>,\n): HookFile<TEvent, TContext> {\n return file;\n}\n\n/** A Cordis service factory for a scope root. */\nexport function defineService<TContext = unknown>(file: ServiceFile<TContext>): ServiceFile<TContext> {\n return file;\n}\n\n/** `channel/<frameType>.ts`. The contribution array holds factories, so this is one. */\nexport function defineChannel(file: ChannelFile): ChannelFile {\n return file;\n}\n\n/** `api/<segments>/route.ts`. The folder path is the route. */\nexport function defineRoute<TContext = unknown>(file: RouteFile<TContext>): RouteFile<TContext> {\n return file;\n}\n\n/** `method/<member>.ts`. Build the value with `defineServerMethod` to keep schema inference. */\nexport function defineMethod<TContext = unknown>(file: MethodFile<TContext>): MethodFile<TContext> {\n return file;\n}\n\n/** A server activity declaration for a session root. */\nexport function defineActivity<TContext = unknown>(file: ActivityFile<TContext>): ActivityFile<TContext> {\n return file;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAwCA,SAAgB,yBAA4B,MAAS,UAAgC;CACnF,OAAO;AACT;;AAGA,SAAgB,eAAkB,MAAY;CAC5C,OAAO;AACT;;AAGA,SAAgB,eAAkB,MAAY;CAC5C,OAAO;AACT;;AAGA,SAAgB,sBAAyB,MAAY;CACnD,OAAO;AACT;;AAGA,SAAgB,WAAc,MAAY;CACxC,OAAO;AACT;;AAGA,SAAgB,WAA+B,MAAsD;CACnG,OAAO,OAAO,SAAS,cAClB,aAAa;EAAE,MAAM;EAAiB,GAAG,KAAK,OAAO;CAAE,KACxD;EAAE,MAAM;EAAiB,GAAG;CAAK;AACvC;;AAGA,SAAgB,iBACd,MACuC;CACvC,OAAO;AACT;;;;;;;;;;;;;AAcA,SAAgB,WACd,MACA,SAC4B;CAE5B,OAAO,SAAS,WAAW,KAAA,IAAY,OAAO,OAAO,OAAO,MAAM,EAAE,QAAQ,QAAQ,OAAO,CAAC;AAC9F;;;;;AAMA,SAAgB,mBACd,QACmB;CACnB,MAAM,UAA8E,CAAC;CACrF,KAAK,MAAM,CAAC,OAAO,UAAU,OAAO,QAAQ,MAAM,GAAmE;EACnH,MAAM,YAAY,IAAI,IAAI,MAAM,SAAS,SAAS,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,aAAa,CAAC,SAAS,MAAM,QAAQ,CAAC,CAAC;EACjH,IAAI,UAAU,OAAO,GAAG,QAAQ,SAAS,CAAC,GAAG,UAAU,OAAO,CAAC;CACjE;CACA,OAAO;AACT;;;;;;;;AASA,SAAgB,iBACd,GAAG,OACuC;CAC1C,MAAM,WAAW,CAAC,GAAG,KAAK,CAAC,CAAC,QAAQ;CACpC,OAAO;EACL,MAAM,QAAQ,SAAS;GACrB,KAAK,MAAM,QAAQ,OAAO,MAAM,KAAK,UAAU,OAAO;EACxD;EACA,MAAM,OAAO,SAAS;GACpB,MAAMA,cAAAA,YACJ,SAAS,KAAK,eAAe,KAAK,SAAS,OAAO,CAAC,GACnD,mBACF;EACF;EACA,MAAM,UAAU,SAAS;GACvB,MAAMA,cAAAA,YACJ,SAAS,KAAK,eAAe,KAAK,YAAY,OAAO,CAAC,GACtD,sBACF;EACF;CACF;AACF;;AAGA,SAAgB,oBACd,MAC6B;CAC7B,OAAO;AACT;;AAGA,SAAgB,cAAkC,MAA4D;CAC5G,OAAO,OAAO,SAAS,cAClB,aAAa;EAAE,MAAM;EAAoB,GAAG,KAAK,OAAO;CAAE,KAC3D;EAAE,MAAM;EAAoB,GAAG;CAAK;AAC1C;;AAGA,SAAgB,WACd,MAC4B;CAC5B,OAAO;AACT;;AAGA,SAAgB,cAAkC,MAAoD;CACpG,OAAO;AACT;;AAGA,SAAgB,cAAc,MAAgC;CAC5D,OAAO;AACT;;AAGA,SAAgB,YAAgC,MAAgD;CAC9F,OAAO;AACT;;AAGA,SAAgB,aAAiC,MAAkD;CACjG,OAAO;AACT;;AAGA,SAAgB,eAAmC,MAAsD;CACvG,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"extensionFile.cjs","names":["runCleanups"],"sources":["../../../src/extensions/extensionFile.ts"],"sourcesContent":["import type { TSchema } from 'typebox';\n\nimport type {\n ActivityFile,\n ChannelFile,\n CommandContribution,\n CommandFile,\n HookFile,\n HookMetadata,\n OptionalHookFactory,\n MethodFile,\n RootFile,\n RoutedFileOptions,\n RouteFile,\n ServerCommandFile,\n ServerToolFile,\n ServiceFile,\n ToolContribution,\n ToolFile,\n} from '../schemas/extensionFile';\nimport type { PoHeadlessEventName, PoHeadlessHook, PoSkillRelation } from '../schemas/headless';\nimport type { PoApiScope } from '../schemas/packageApi';\nimport type { PoServerContracts } from '../schemas/serverPlugin';\nimport type { PoServiceContract } from '../schemas/serverScope';\nimport { runCleanups, type PluginLifecycleHooks } from '../services/pluginLifecycle';\n\n/**\n * Identity helpers for folder-routed backend files, one per surface.\n *\n * A routed file's default export is its whole contract with the host, and\n * nothing else validates it: the generated entry merges the path's identity in\n * and hands the result to a contribution array, where an excess or misspelled\n * key is invisible. These make the shape checkable at the point it is written,\n * and give the factory form a typed context instead of an implicit any.\n *\n * Most return their argument unchanged, so the value is entirely in the\n * position they check and the inference they supply. The two that do not,\n * `defineTool` and `defineCommand`, add the discriminant the host reads to\n * tell a portable contribution from a raw host declaration.\n */\n\n/** Declares non-default route cardinality while preserving the routed surface's inferred host type. */\nexport function defineRoutedContribution<T>(file: T, _options: RoutedFileOptions): T {\n return file;\n}\n\n/** `provider/<name>.server.ts`. Declares one native provider contribution. */\nexport function defineProvider<T>(file: T): T {\n return file;\n}\n\n/** `resource/<name>.ts`. Declares one package resource. Relation evidence defaults to declared. */\nexport function defineResource<T extends { relations: readonly Omit<PoSkillRelation, 'evidence'>[] }>(\n file: T,\n): Omit<T, 'relations'> & { relations: readonly PoSkillRelation[] };\nexport function defineResource<T>(file: T): T;\nexport function defineResource(file: unknown): unknown {\n if (file !== null && typeof file === 'object' && 'relations' in file && Array.isArray(file.relations)) {\n return {\n ...file,\n relations: file.relations.map(\n (relation: Omit<PoSkillRelation, 'evidence'> & { evidence?: PoSkillRelation['evidence'] }) => ({\n ...relation,\n evidence: relation.evidence ?? 'declared',\n }),\n ),\n };\n }\n return file;\n}\n\n/** `tool-restriction/<name>.ts`. Declares one tool restriction. */\nexport function defineToolRestriction<T>(file: T): T {\n return file;\n}\n\n/** `tool/<name>.ts`. Adds the discriminant the contribution array expects. */\nexport function defineTool<TContext = unknown>(file: ToolFile<TContext>): ToolContribution<TContext> {\n return typeof file === 'function'\n ? (context) => ({ kind: 'tool' as const, ...file(context) })\n : { kind: 'tool' as const, ...file };\n}\n\n/** `tool/<name>.server.ts`. A native headless tool, handed to the host untouched. */\nexport function defineServerTool<TParameters extends TSchema = TSchema, TContext = unknown>(\n file: ServerToolFile<TParameters, TContext>,\n): ServerToolFile<TParameters, TContext> {\n return file;\n}\n\n/**\n * `root.ts`. Constructs one scope and names what its subtree shares.\n *\n * The answer to a package whose surfaces all read one per-mount object graph.\n * The root builds that graph once, and every routed file beneath it receives\n * it as `context.root`, so the package decomposes into a file per surface\n * without either rebuilding the graph per file or reaching for a module-level\n * singleton.\n *\n * `inject` names the contracts, from this package or another, that the level\n * waits for before it builds this root and restarts with when they change.\n */\nexport function defineRoot<TValue, TContext = unknown>(\n file: RootFile<TValue, TContext>,\n options?: { readonly inject?: readonly PoServiceContract<unknown>[] },\n): RootFile<TValue, TContext> {\n // Assigned rather than wrapped, so other metadata the factory carries (provider overrides) stays.\n return options?.inject === undefined ? file : Object.assign(file, { inject: options.inject });\n}\n\n/**\n * The contracts each level waits for: every contract injected by the roots that level builds or\n * reuses, once each. A level none of whose roots inject anything is left out.\n */\nexport function composeRootInjects(\n levels: Readonly<Partial<Record<PoApiScope, readonly Pick<RootFile<unknown>, 'inject'>[]>>>,\n): PoServerContracts {\n const injects: Partial<Record<PoApiScope, readonly PoServiceContract<unknown>[]>> = {};\n for (const [level, roots] of Object.entries(levels) as [PoApiScope, readonly Pick<RootFile<unknown>, 'inject'>[]][]) {\n const contracts = new Map(roots.flatMap((root) => root.inject ?? []).map((contract) => [contract.name, contract]));\n if (contracts.size > 0) injects[level] = [...contracts.values()];\n }\n return injects;\n}\n\n/**\n * Folds every root in a scope chain into one set of lifecycle hooks.\n *\n * Start outermost first and tear down innermost first, which is the order the\n * roots were constructed in and the only order in which an inner scope can\n * still rely on its outer one while stopping.\n */\nexport function composeRootHooks<TContext>(\n ...roots: readonly PluginLifecycleHooks<TContext>[]\n): Required<PluginLifecycleHooks<TContext>> {\n const reversed = [...roots].reverse();\n return {\n async onStart(context) {\n for (const root of roots) await root.onStart?.(context);\n },\n async onStop(context) {\n await runCleanups(\n reversed.map((root) => () => root.onStop?.(context)),\n 'Root stop failed.',\n );\n },\n async onDispose(context) {\n await runCleanups(\n reversed.map((root) => () => root.onDispose?.(context)),\n 'Root cleanup failed.',\n );\n },\n };\n}\n\n/** `command/<name>.server.ts`. A native headless or portable Po command. */\nexport function defineServerCommand<TContext = unknown>(\n file: ServerCommandFile<TContext>,\n): ServerCommandFile<TContext> {\n return file;\n}\n\n/** `command/<name>.ts`. Adds the discriminant the contribution array expects. */\nexport function defineCommand<TContext = unknown>(file: CommandFile<TContext>): CommandContribution<TContext> {\n return typeof file === 'function'\n ? (context) => ({ kind: 'command' as const, ...file(context) })\n : { kind: 'command' as const, ...file };\n}\n\n/** `hook/<event>.ts`. Name the event here too when the handler needs a precise payload. */\nexport function defineHook<TEvent extends PoHeadlessEventName = PoHeadlessEventName>(\n file: PoHeadlessHook<TEvent> & HookMetadata,\n): PoHeadlessHook<TEvent> & HookMetadata;\nexport function defineHook<TEvent extends PoHeadlessEventName = PoHeadlessEventName, TContext = unknown>(\n file: HookFile<TEvent, TContext>,\n): HookFile<TEvent, TContext>;\nexport function defineHook<TEvent extends PoHeadlessEventName = PoHeadlessEventName, TContext = unknown>(\n file: OptionalHookFactory<TEvent, TContext>,\n): OptionalHookFactory<TEvent, TContext>;\nexport function defineHook<TEvent extends PoHeadlessEventName = PoHeadlessEventName, TContext = unknown>(\n file: HookFile<TEvent, TContext> | OptionalHookFactory<TEvent, TContext>,\n): HookFile<TEvent, TContext> | OptionalHookFactory<TEvent, TContext> {\n return file;\n}\n\n/** A Cordis service factory for a scope root. */\nexport function defineService<TContext = unknown>(file: ServiceFile<TContext>): ServiceFile<TContext> {\n return file;\n}\n\n/** `channel/<frameType>.ts`. Context is opt-in: existing factories may take unrelated optional options. */\nexport function defineChannel(file: () => ReturnType<ChannelFile>): () => ReturnType<ChannelFile>;\nexport function defineChannel<TContext>(file: ChannelFile<TContext>, options: { context: true }): ChannelFile<TContext>;\nexport function defineChannel<TContext>(\n file: ChannelFile<TContext> | (() => ReturnType<ChannelFile>),\n options?: { context: true },\n): ChannelFile<TContext> | ChannelFile {\n return options?.context === true ? file : () => (file as () => ReturnType<ChannelFile>)();\n}\n\n/** `api/<segments>/route.ts`. The folder path is the route. */\nexport function defineRoute<TContext = unknown>(file: RouteFile<TContext>): RouteFile<TContext> {\n return file;\n}\n\n/** `method/<member>.ts`. Build the value with `defineServerMethod` to keep schema inference. */\nexport function defineMethod<TContext = unknown>(file: MethodFile<TContext>): MethodFile<TContext> {\n return file;\n}\n\n/** A server activity declaration for a session root. */\nexport function defineActivity<TContext = unknown>(file: ActivityFile<TContext>): ActivityFile<TContext> {\n return file;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA0CA,SAAgB,yBAA4B,MAAS,UAAgC;CACnF,OAAO;AACT;;AAGA,SAAgB,eAAkB,MAAY;CAC5C,OAAO;AACT;AAOA,SAAgB,eAAe,MAAwB;CACrD,IAAI,SAAS,QAAQ,OAAO,SAAS,YAAY,eAAe,QAAQ,MAAM,QAAQ,KAAK,SAAS,GAClG,OAAO;EACL,GAAG;EACH,WAAW,KAAK,UAAU,KACvB,cAA8F;GAC7F,GAAG;GACH,UAAU,SAAS,YAAY;EACjC,EACF;CACF;CAEF,OAAO;AACT;;AAGA,SAAgB,sBAAyB,MAAY;CACnD,OAAO;AACT;;AAGA,SAAgB,WAA+B,MAAsD;CACnG,OAAO,OAAO,SAAS,cAClB,aAAa;EAAE,MAAM;EAAiB,GAAG,KAAK,OAAO;CAAE,KACxD;EAAE,MAAM;EAAiB,GAAG;CAAK;AACvC;;AAGA,SAAgB,iBACd,MACuC;CACvC,OAAO;AACT;;;;;;;;;;;;;AAcA,SAAgB,WACd,MACA,SAC4B;CAE5B,OAAO,SAAS,WAAW,KAAA,IAAY,OAAO,OAAO,OAAO,MAAM,EAAE,QAAQ,QAAQ,OAAO,CAAC;AAC9F;;;;;AAMA,SAAgB,mBACd,QACmB;CACnB,MAAM,UAA8E,CAAC;CACrF,KAAK,MAAM,CAAC,OAAO,UAAU,OAAO,QAAQ,MAAM,GAAmE;EACnH,MAAM,YAAY,IAAI,IAAI,MAAM,SAAS,SAAS,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,aAAa,CAAC,SAAS,MAAM,QAAQ,CAAC,CAAC;EACjH,IAAI,UAAU,OAAO,GAAG,QAAQ,SAAS,CAAC,GAAG,UAAU,OAAO,CAAC;CACjE;CACA,OAAO;AACT;;;;;;;;AASA,SAAgB,iBACd,GAAG,OACuC;CAC1C,MAAM,WAAW,CAAC,GAAG,KAAK,CAAC,CAAC,QAAQ;CACpC,OAAO;EACL,MAAM,QAAQ,SAAS;GACrB,KAAK,MAAM,QAAQ,OAAO,MAAM,KAAK,UAAU,OAAO;EACxD;EACA,MAAM,OAAO,SAAS;GACpB,MAAMA,cAAAA,YACJ,SAAS,KAAK,eAAe,KAAK,SAAS,OAAO,CAAC,GACnD,mBACF;EACF;EACA,MAAM,UAAU,SAAS;GACvB,MAAMA,cAAAA,YACJ,SAAS,KAAK,eAAe,KAAK,YAAY,OAAO,CAAC,GACtD,sBACF;EACF;CACF;AACF;;AAGA,SAAgB,oBACd,MAC6B;CAC7B,OAAO;AACT;;AAGA,SAAgB,cAAkC,MAA4D;CAC5G,OAAO,OAAO,SAAS,cAClB,aAAa;EAAE,MAAM;EAAoB,GAAG,KAAK,OAAO;CAAE,KAC3D;EAAE,MAAM;EAAoB,GAAG;CAAK;AAC1C;AAYA,SAAgB,WACd,MACoE;CACpE,OAAO;AACT;;AAGA,SAAgB,cAAkC,MAAoD;CACpG,OAAO;AACT;AAKA,SAAgB,cACd,MACA,SACqC;CACrC,OAAO,SAAS,YAAY,OAAO,aAAc,KAAuC;AAC1F;;AAGA,SAAgB,YAAgC,MAAgD;CAC9F,OAAO;AACT;;AAGA,SAAgB,aAAiC,MAAkD;CACjG,OAAO;AACT;;AAGA,SAAgB,eAAmC,MAAsD;CACvG,OAAO;AACT"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { PluginLifecycleHooks } from "../services/pluginLifecycle/index.mjs";
|
|
2
1
|
import { PoApiScope } from "../schemas/packageApi.mjs";
|
|
3
|
-
import { PoHeadlessEventName } from "../schemas/headless.mjs";
|
|
4
2
|
import { PoServiceContract } from "../schemas/serverScope.mjs";
|
|
3
|
+
import { PluginLifecycleHooks } from "../services/pluginLifecycle/index.mjs";
|
|
4
|
+
import { PoHeadlessEventName, PoHeadlessHook, PoSkillRelation } from "../schemas/headless.mjs";
|
|
5
5
|
import { PoServerContracts } from "../schemas/serverPlugin.mjs";
|
|
6
|
-
import { ActivityFile, ChannelFile, CommandContribution, CommandFile, HookFile, MethodFile, RootFile, RouteFile, RoutedFileOptions, ServerCommandFile, ServerToolFile, ServiceFile, ToolContribution, ToolFile } from "../schemas/extensionFile.mjs";
|
|
6
|
+
import { ActivityFile, ChannelFile, CommandContribution, CommandFile, HookFile, HookMetadata, MethodFile, OptionalHookFactory, RootFile, RouteFile, RoutedFileOptions, ServerCommandFile, ServerToolFile, ServiceFile, ToolContribution, ToolFile } from "../schemas/extensionFile.mjs";
|
|
7
7
|
import { TSchema } from "typebox";
|
|
8
8
|
//#region src/extensions/extensionFile.d.ts
|
|
9
9
|
/**
|
|
@@ -24,12 +24,15 @@ import { TSchema } from "typebox";
|
|
|
24
24
|
export declare function defineRoutedContribution<T>(file: T, _options: RoutedFileOptions): T;
|
|
25
25
|
/** `provider/<name>.server.ts`. Declares one native provider contribution. */
|
|
26
26
|
export declare function defineProvider<T>(file: T): T;
|
|
27
|
-
/** `resource/<name>.ts`. Declares one package resource. */
|
|
27
|
+
/** `resource/<name>.ts`. Declares one package resource. Relation evidence defaults to declared. */
|
|
28
|
+
export declare function defineResource<T extends {
|
|
29
|
+
relations: readonly Omit<PoSkillRelation, 'evidence'>[];
|
|
30
|
+
}>(file: T): Omit<T, 'relations'> & {
|
|
31
|
+
relations: readonly PoSkillRelation[];
|
|
32
|
+
};
|
|
28
33
|
export declare function defineResource<T>(file: T): T;
|
|
29
34
|
/** `tool-restriction/<name>.ts`. Declares one tool restriction. */
|
|
30
35
|
export declare function defineToolRestriction<T>(file: T): T;
|
|
31
|
-
/** Declares one mode when it is not represented by a mode gate file. */
|
|
32
|
-
export declare function defineMode<T>(file: T): T;
|
|
33
36
|
/** `tool/<name>.ts`. Adds the discriminant the contribution array expects. */
|
|
34
37
|
export declare function defineTool<TContext = unknown>(file: ToolFile<TContext>): ToolContribution<TContext>;
|
|
35
38
|
/** `tool/<name>.server.ts`. A native headless tool, handed to the host untouched. */
|
|
@@ -67,11 +70,16 @@ export declare function defineServerCommand<TContext = unknown>(file: ServerComm
|
|
|
67
70
|
/** `command/<name>.ts`. Adds the discriminant the contribution array expects. */
|
|
68
71
|
export declare function defineCommand<TContext = unknown>(file: CommandFile<TContext>): CommandContribution<TContext>;
|
|
69
72
|
/** `hook/<event>.ts`. Name the event here too when the handler needs a precise payload. */
|
|
73
|
+
export declare function defineHook<TEvent extends PoHeadlessEventName = PoHeadlessEventName>(file: PoHeadlessHook<TEvent> & HookMetadata): PoHeadlessHook<TEvent> & HookMetadata;
|
|
70
74
|
export declare function defineHook<TEvent extends PoHeadlessEventName = PoHeadlessEventName, TContext = unknown>(file: HookFile<TEvent, TContext>): HookFile<TEvent, TContext>;
|
|
75
|
+
export declare function defineHook<TEvent extends PoHeadlessEventName = PoHeadlessEventName, TContext = unknown>(file: OptionalHookFactory<TEvent, TContext>): OptionalHookFactory<TEvent, TContext>;
|
|
71
76
|
/** A Cordis service factory for a scope root. */
|
|
72
77
|
export declare function defineService<TContext = unknown>(file: ServiceFile<TContext>): ServiceFile<TContext>;
|
|
73
|
-
/** `channel/<frameType>.ts`.
|
|
74
|
-
export declare function defineChannel(file: ChannelFile): ChannelFile
|
|
78
|
+
/** `channel/<frameType>.ts`. Context is opt-in: existing factories may take unrelated optional options. */
|
|
79
|
+
export declare function defineChannel(file: () => ReturnType<ChannelFile>): () => ReturnType<ChannelFile>;
|
|
80
|
+
export declare function defineChannel<TContext>(file: ChannelFile<TContext>, options: {
|
|
81
|
+
context: true;
|
|
82
|
+
}): ChannelFile<TContext>;
|
|
75
83
|
/** `api/<segments>/route.ts`. The folder path is the route. */
|
|
76
84
|
export declare function defineRoute<TContext = unknown>(file: RouteFile<TContext>): RouteFile<TContext>;
|
|
77
85
|
/** `method/<member>.ts`. Build the value with `defineServerMethod` to keep schema inference. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensionFile.d.mts","names":[],"sources":["../../../src/extensions/extensionFile.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"extensionFile.d.mts","names":[],"sources":["../../../src/extensions/extensionFile.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;wBA0CgB,yBAAyB,GAAG,MAAM,GAAG,UAAU,oBAAoB;;wBAKnE,eAAe,GAAG,MAAM,IAAI;;wBAK5B,eAAe;EAAY,oBAAoB,KAAK;GAClE,MAAM,IACL,KAAK;EAAoB,oBAAoB;;wBAChC,eAAe,GAAG,MAAM,IAAI;;wBAiB5B,sBAAsB,GAAG,MAAM,IAAI;;wBAKnC,WAAW,oBAAoB,MAAM,SAAS,YAAY,iBAAiB;;wBAO3E,iBAAiB,oBAAoB,UAAU,SAAS,oBACtE,MAAM,eAAe,aAAa,YACjC,eAAe,aAAa;;;;;;;;;;;;;wBAgBf,WAAW,QAAQ,oBACjC,MAAM,SAAS,QAAQ,WACvB;WAAqB,kBAAkB;IACtC,SAAS,QAAQ;;;;;wBASJ,mBACd,QAAQ,SAAS,QAAQ,OAAO,qBAAqB,KAAK,oCACzD;;;;;;;;wBAgBa,iBAAiB,aAC5B,gBAAgB,qBAAqB,cACvC,SAAS,qBAAqB;;wBAsBjB,oBAAoB,oBAClC,MAAM,kBAAkB,YACvB,kBAAkB;;wBAKL,cAAc,oBAAoB,MAAM,YAAY,YAAY,oBAAoB;;wBAOpF,WAAW,eAAe,sBAAsB,qBAC9D,MAAM,eAAe,UAAU,eAC9B,eAAe,UAAU;wBACZ,WAAW,eAAe,sBAAsB,qBAAqB,oBACnF,MAAM,SAAS,QAAQ,YACtB,SAAS,QAAQ;wBACJ,WAAW,eAAe,sBAAsB,qBAAqB,oBACnF,MAAM,oBAAoB,QAAQ,YACjC,oBAAoB,QAAQ;;wBAQf,cAAc,oBAAoB,MAAM,YAAY,YAAY,YAAY;;wBAK5E,cAAc,YAAY,WAAW,qBAAqB,WAAW;wBACrE,cAAc,UAAU,MAAM,YAAY,WAAW;EAAW;IAAkB,YAAY;;wBAS9F,YAAY,oBAAoB,MAAM,UAAU,YAAY,UAAU;;wBAKtE,aAAa,oBAAoB,MAAM,WAAW,YAAY,WAAW;;wBAKzE,eAAe,oBAAoB,MAAM,aAAa,YAAY,aAAa"}
|
|
@@ -22,18 +22,20 @@ function defineRoutedContribution(file, _options) {
|
|
|
22
22
|
function defineProvider(file) {
|
|
23
23
|
return file;
|
|
24
24
|
}
|
|
25
|
-
/** `resource/<name>.ts`. Declares one package resource. */
|
|
26
25
|
function defineResource(file) {
|
|
26
|
+
if (file !== null && typeof file === "object" && "relations" in file && Array.isArray(file.relations)) return {
|
|
27
|
+
...file,
|
|
28
|
+
relations: file.relations.map((relation) => ({
|
|
29
|
+
...relation,
|
|
30
|
+
evidence: relation.evidence ?? "declared"
|
|
31
|
+
}))
|
|
32
|
+
};
|
|
27
33
|
return file;
|
|
28
34
|
}
|
|
29
35
|
/** `tool-restriction/<name>.ts`. Declares one tool restriction. */
|
|
30
36
|
function defineToolRestriction(file) {
|
|
31
37
|
return file;
|
|
32
38
|
}
|
|
33
|
-
/** Declares one mode when it is not represented by a mode gate file. */
|
|
34
|
-
function defineMode(file) {
|
|
35
|
-
return file;
|
|
36
|
-
}
|
|
37
39
|
/** `tool/<name>.ts`. Adds the discriminant the contribution array expects. */
|
|
38
40
|
function defineTool(file) {
|
|
39
41
|
return typeof file === "function" ? (context) => ({
|
|
@@ -110,7 +112,6 @@ function defineCommand(file) {
|
|
|
110
112
|
...file
|
|
111
113
|
};
|
|
112
114
|
}
|
|
113
|
-
/** `hook/<event>.ts`. Name the event here too when the handler needs a precise payload. */
|
|
114
115
|
function defineHook(file) {
|
|
115
116
|
return file;
|
|
116
117
|
}
|
|
@@ -118,9 +119,8 @@ function defineHook(file) {
|
|
|
118
119
|
function defineService(file) {
|
|
119
120
|
return file;
|
|
120
121
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
return file;
|
|
122
|
+
function defineChannel(file, options) {
|
|
123
|
+
return options?.context === true ? file : () => file();
|
|
124
124
|
}
|
|
125
125
|
/** `api/<segments>/route.ts`. The folder path is the route. */
|
|
126
126
|
function defineRoute(file) {
|
|
@@ -135,6 +135,6 @@ function defineActivity(file) {
|
|
|
135
135
|
return file;
|
|
136
136
|
}
|
|
137
137
|
//#endregion
|
|
138
|
-
export { composeRootHooks, composeRootInjects, defineActivity, defineChannel, defineCommand, defineHook, defineMethod,
|
|
138
|
+
export { composeRootHooks, composeRootInjects, defineActivity, defineChannel, defineCommand, defineHook, defineMethod, defineProvider, defineResource, defineRoot, defineRoute, defineRoutedContribution, defineServerCommand, defineServerTool, defineService, defineTool, defineToolRestriction };
|
|
139
139
|
|
|
140
140
|
//# sourceMappingURL=extensionFile.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensionFile.mjs","names":[],"sources":["../../../src/extensions/extensionFile.ts"],"sourcesContent":["import type { TSchema } from 'typebox';\n\nimport type {\n ActivityFile,\n ChannelFile,\n CommandContribution,\n CommandFile,\n HookFile,\n MethodFile,\n RootFile,\n RoutedFileOptions,\n RouteFile,\n ServerCommandFile,\n ServerToolFile,\n ServiceFile,\n ToolContribution,\n ToolFile,\n} from '../schemas/extensionFile';\nimport type { PoHeadlessEventName } from '../schemas/headless';\nimport type { PoApiScope } from '../schemas/packageApi';\nimport type { PoServerContracts } from '../schemas/serverPlugin';\nimport type { PoServiceContract } from '../schemas/serverScope';\nimport { runCleanups, type PluginLifecycleHooks } from '../services/pluginLifecycle';\n\n/**\n * Identity helpers for folder-routed backend files, one per surface.\n *\n * A routed file's default export is its whole contract with the host, and\n * nothing else validates it: the generated entry merges the path's identity in\n * and hands the result to a contribution array, where an excess or misspelled\n * key is invisible. These make the shape checkable at the point it is written,\n * and give the factory form a typed context instead of an implicit any.\n *\n * Most return their argument unchanged, so the value is entirely in the\n * position they check and the inference they supply. The two that do not,\n * `defineTool` and `defineCommand`, add the discriminant the host reads to\n * tell a portable contribution from a raw host declaration.\n */\n\n/** Declares non-default route cardinality while preserving the routed surface's inferred host type. */\nexport function defineRoutedContribution<T>(file: T, _options: RoutedFileOptions): T {\n return file;\n}\n\n/** `provider/<name>.server.ts`. Declares one native provider contribution. */\nexport function defineProvider<T>(file: T): T {\n return file;\n}\n\n/** `resource/<name>.ts`. Declares one package resource. */\nexport function defineResource<T>(file: T): T {\n return file;\n}\n\n/** `tool-restriction/<name>.ts`. Declares one tool restriction. */\nexport function defineToolRestriction<T>(file: T): T {\n return file;\n}\n\n/** Declares one mode when it is not represented by a mode gate file. */\nexport function defineMode<T>(file: T): T {\n return file;\n}\n\n/** `tool/<name>.ts`. Adds the discriminant the contribution array expects. */\nexport function defineTool<TContext = unknown>(file: ToolFile<TContext>): ToolContribution<TContext> {\n return typeof file === 'function'\n ? (context) => ({ kind: 'tool' as const, ...file(context) })\n : { kind: 'tool' as const, ...file };\n}\n\n/** `tool/<name>.server.ts`. A native headless tool, handed to the host untouched. */\nexport function defineServerTool<TParameters extends TSchema = TSchema, TContext = unknown>(\n file: ServerToolFile<TParameters, TContext>,\n): ServerToolFile<TParameters, TContext> {\n return file;\n}\n\n/**\n * `root.ts`. Constructs one scope and names what its subtree shares.\n *\n * The answer to a package whose surfaces all read one per-mount object graph.\n * The root builds that graph once, and every routed file beneath it receives\n * it as `context.root`, so the package decomposes into a file per surface\n * without either rebuilding the graph per file or reaching for a module-level\n * singleton.\n *\n * `inject` names the contracts, from this package or another, that the level\n * waits for before it builds this root and restarts with when they change.\n */\nexport function defineRoot<TValue, TContext = unknown>(\n file: RootFile<TValue, TContext>,\n options?: { readonly inject?: readonly PoServiceContract<unknown>[] },\n): RootFile<TValue, TContext> {\n // Assigned rather than wrapped, so other metadata the factory carries (provider overrides) stays.\n return options?.inject === undefined ? file : Object.assign(file, { inject: options.inject });\n}\n\n/**\n * The contracts each level waits for: every contract injected by the roots that level builds or\n * reuses, once each. A level none of whose roots inject anything is left out.\n */\nexport function composeRootInjects(\n levels: Readonly<Partial<Record<PoApiScope, readonly Pick<RootFile<unknown>, 'inject'>[]>>>,\n): PoServerContracts {\n const injects: Partial<Record<PoApiScope, readonly PoServiceContract<unknown>[]>> = {};\n for (const [level, roots] of Object.entries(levels) as [PoApiScope, readonly Pick<RootFile<unknown>, 'inject'>[]][]) {\n const contracts = new Map(roots.flatMap((root) => root.inject ?? []).map((contract) => [contract.name, contract]));\n if (contracts.size > 0) injects[level] = [...contracts.values()];\n }\n return injects;\n}\n\n/**\n * Folds every root in a scope chain into one set of lifecycle hooks.\n *\n * Start outermost first and tear down innermost first, which is the order the\n * roots were constructed in and the only order in which an inner scope can\n * still rely on its outer one while stopping.\n */\nexport function composeRootHooks<TContext>(\n ...roots: readonly PluginLifecycleHooks<TContext>[]\n): Required<PluginLifecycleHooks<TContext>> {\n const reversed = [...roots].reverse();\n return {\n async onStart(context) {\n for (const root of roots) await root.onStart?.(context);\n },\n async onStop(context) {\n await runCleanups(\n reversed.map((root) => () => root.onStop?.(context)),\n 'Root stop failed.',\n );\n },\n async onDispose(context) {\n await runCleanups(\n reversed.map((root) => () => root.onDispose?.(context)),\n 'Root cleanup failed.',\n );\n },\n };\n}\n\n/** `command/<name>.server.ts`. A native headless or portable Po command. */\nexport function defineServerCommand<TContext = unknown>(\n file: ServerCommandFile<TContext>,\n): ServerCommandFile<TContext> {\n return file;\n}\n\n/** `command/<name>.ts`. Adds the discriminant the contribution array expects. */\nexport function defineCommand<TContext = unknown>(file: CommandFile<TContext>): CommandContribution<TContext> {\n return typeof file === 'function'\n ? (context) => ({ kind: 'command' as const, ...file(context) })\n : { kind: 'command' as const, ...file };\n}\n\n/** `hook/<event>.ts`. Name the event here too when the handler needs a precise payload. */\nexport function defineHook<TEvent extends PoHeadlessEventName = PoHeadlessEventName, TContext = unknown>(\n file: HookFile<TEvent, TContext>,\n): HookFile<TEvent, TContext> {\n return file;\n}\n\n/** A Cordis service factory for a scope root. */\nexport function defineService<TContext = unknown>(file: ServiceFile<TContext>): ServiceFile<TContext> {\n return file;\n}\n\n/** `channel/<frameType>.ts`. The contribution array holds factories, so this is one. */\nexport function defineChannel(file: ChannelFile): ChannelFile {\n return file;\n}\n\n/** `api/<segments>/route.ts`. The folder path is the route. */\nexport function defineRoute<TContext = unknown>(file: RouteFile<TContext>): RouteFile<TContext> {\n return file;\n}\n\n/** `method/<member>.ts`. Build the value with `defineServerMethod` to keep schema inference. */\nexport function defineMethod<TContext = unknown>(file: MethodFile<TContext>): MethodFile<TContext> {\n return file;\n}\n\n/** A server activity declaration for a session root. */\nexport function defineActivity<TContext = unknown>(file: ActivityFile<TContext>): ActivityFile<TContext> {\n return file;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAwCA,SAAgB,yBAA4B,MAAS,UAAgC;CACnF,OAAO;AACT;;AAGA,SAAgB,eAAkB,MAAY;CAC5C,OAAO;AACT;;AAGA,SAAgB,eAAkB,MAAY;CAC5C,OAAO;AACT;;AAGA,SAAgB,sBAAyB,MAAY;CACnD,OAAO;AACT;;AAGA,SAAgB,WAAc,MAAY;CACxC,OAAO;AACT;;AAGA,SAAgB,WAA+B,MAAsD;CACnG,OAAO,OAAO,SAAS,cAClB,aAAa;EAAE,MAAM;EAAiB,GAAG,KAAK,OAAO;CAAE,KACxD;EAAE,MAAM;EAAiB,GAAG;CAAK;AACvC;;AAGA,SAAgB,iBACd,MACuC;CACvC,OAAO;AACT;;;;;;;;;;;;;AAcA,SAAgB,WACd,MACA,SAC4B;CAE5B,OAAO,SAAS,WAAW,KAAA,IAAY,OAAO,OAAO,OAAO,MAAM,EAAE,QAAQ,QAAQ,OAAO,CAAC;AAC9F;;;;;AAMA,SAAgB,m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ensionFile.mjs","names":[],"sources":["../../../src/extensions/extensionFile.ts"],"sourcesContent":["import type { TSchema } from 'typebox';\n\nimport type {\n ActivityFile,\n ChannelFile,\n CommandContribution,\n CommandFile,\n HookFile,\n HookMetadata,\n OptionalHookFactory,\n MethodFile,\n RootFile,\n RoutedFileOptions,\n RouteFile,\n ServerCommandFile,\n ServerToolFile,\n ServiceFile,\n ToolContribution,\n ToolFile,\n} from '../schemas/extensionFile';\nimport type { PoHeadlessEventName, PoHeadlessHook, PoSkillRelation } from '../schemas/headless';\nimport type { PoApiScope } from '../schemas/packageApi';\nimport type { PoServerContracts } from '../schemas/serverPlugin';\nimport type { PoServiceContract } from '../schemas/serverScope';\nimport { runCleanups, type PluginLifecycleHooks } from '../services/pluginLifecycle';\n\n/**\n * Identity helpers for folder-routed backend files, one per surface.\n *\n * A routed file's default export is its whole contract with the host, and\n * nothing else validates it: the generated entry merges the path's identity in\n * and hands the result to a contribution array, where an excess or misspelled\n * key is invisible. These make the shape checkable at the point it is written,\n * and give the factory form a typed context instead of an implicit any.\n *\n * Most return their argument unchanged, so the value is entirely in the\n * position they check and the inference they supply. The two that do not,\n * `defineTool` and `defineCommand`, add the discriminant the host reads to\n * tell a portable contribution from a raw host declaration.\n */\n\n/** Declares non-default route cardinality while preserving the routed surface's inferred host type. */\nexport function defineRoutedContribution<T>(file: T, _options: RoutedFileOptions): T {\n return file;\n}\n\n/** `provider/<name>.server.ts`. Declares one native provider contribution. */\nexport function defineProvider<T>(file: T): T {\n return file;\n}\n\n/** `resource/<name>.ts`. Declares one package resource. Relation evidence defaults to declared. */\nexport function defineResource<T extends { relations: readonly Omit<PoSkillRelation, 'evidence'>[] }>(\n file: T,\n): Omit<T, 'relations'> & { relations: readonly PoSkillRelation[] };\nexport function defineResource<T>(file: T): T;\nexport function defineResource(file: unknown): unknown {\n if (file !== null && typeof file === 'object' && 'relations' in file && Array.isArray(file.relations)) {\n return {\n ...file,\n relations: file.relations.map(\n (relation: Omit<PoSkillRelation, 'evidence'> & { evidence?: PoSkillRelation['evidence'] }) => ({\n ...relation,\n evidence: relation.evidence ?? 'declared',\n }),\n ),\n };\n }\n return file;\n}\n\n/** `tool-restriction/<name>.ts`. Declares one tool restriction. */\nexport function defineToolRestriction<T>(file: T): T {\n return file;\n}\n\n/** `tool/<name>.ts`. Adds the discriminant the contribution array expects. */\nexport function defineTool<TContext = unknown>(file: ToolFile<TContext>): ToolContribution<TContext> {\n return typeof file === 'function'\n ? (context) => ({ kind: 'tool' as const, ...file(context) })\n : { kind: 'tool' as const, ...file };\n}\n\n/** `tool/<name>.server.ts`. A native headless tool, handed to the host untouched. */\nexport function defineServerTool<TParameters extends TSchema = TSchema, TContext = unknown>(\n file: ServerToolFile<TParameters, TContext>,\n): ServerToolFile<TParameters, TContext> {\n return file;\n}\n\n/**\n * `root.ts`. Constructs one scope and names what its subtree shares.\n *\n * The answer to a package whose surfaces all read one per-mount object graph.\n * The root builds that graph once, and every routed file beneath it receives\n * it as `context.root`, so the package decomposes into a file per surface\n * without either rebuilding the graph per file or reaching for a module-level\n * singleton.\n *\n * `inject` names the contracts, from this package or another, that the level\n * waits for before it builds this root and restarts with when they change.\n */\nexport function defineRoot<TValue, TContext = unknown>(\n file: RootFile<TValue, TContext>,\n options?: { readonly inject?: readonly PoServiceContract<unknown>[] },\n): RootFile<TValue, TContext> {\n // Assigned rather than wrapped, so other metadata the factory carries (provider overrides) stays.\n return options?.inject === undefined ? file : Object.assign(file, { inject: options.inject });\n}\n\n/**\n * The contracts each level waits for: every contract injected by the roots that level builds or\n * reuses, once each. A level none of whose roots inject anything is left out.\n */\nexport function composeRootInjects(\n levels: Readonly<Partial<Record<PoApiScope, readonly Pick<RootFile<unknown>, 'inject'>[]>>>,\n): PoServerContracts {\n const injects: Partial<Record<PoApiScope, readonly PoServiceContract<unknown>[]>> = {};\n for (const [level, roots] of Object.entries(levels) as [PoApiScope, readonly Pick<RootFile<unknown>, 'inject'>[]][]) {\n const contracts = new Map(roots.flatMap((root) => root.inject ?? []).map((contract) => [contract.name, contract]));\n if (contracts.size > 0) injects[level] = [...contracts.values()];\n }\n return injects;\n}\n\n/**\n * Folds every root in a scope chain into one set of lifecycle hooks.\n *\n * Start outermost first and tear down innermost first, which is the order the\n * roots were constructed in and the only order in which an inner scope can\n * still rely on its outer one while stopping.\n */\nexport function composeRootHooks<TContext>(\n ...roots: readonly PluginLifecycleHooks<TContext>[]\n): Required<PluginLifecycleHooks<TContext>> {\n const reversed = [...roots].reverse();\n return {\n async onStart(context) {\n for (const root of roots) await root.onStart?.(context);\n },\n async onStop(context) {\n await runCleanups(\n reversed.map((root) => () => root.onStop?.(context)),\n 'Root stop failed.',\n );\n },\n async onDispose(context) {\n await runCleanups(\n reversed.map((root) => () => root.onDispose?.(context)),\n 'Root cleanup failed.',\n );\n },\n };\n}\n\n/** `command/<name>.server.ts`. A native headless or portable Po command. */\nexport function defineServerCommand<TContext = unknown>(\n file: ServerCommandFile<TContext>,\n): ServerCommandFile<TContext> {\n return file;\n}\n\n/** `command/<name>.ts`. Adds the discriminant the contribution array expects. */\nexport function defineCommand<TContext = unknown>(file: CommandFile<TContext>): CommandContribution<TContext> {\n return typeof file === 'function'\n ? (context) => ({ kind: 'command' as const, ...file(context) })\n : { kind: 'command' as const, ...file };\n}\n\n/** `hook/<event>.ts`. Name the event here too when the handler needs a precise payload. */\nexport function defineHook<TEvent extends PoHeadlessEventName = PoHeadlessEventName>(\n file: PoHeadlessHook<TEvent> & HookMetadata,\n): PoHeadlessHook<TEvent> & HookMetadata;\nexport function defineHook<TEvent extends PoHeadlessEventName = PoHeadlessEventName, TContext = unknown>(\n file: HookFile<TEvent, TContext>,\n): HookFile<TEvent, TContext>;\nexport function defineHook<TEvent extends PoHeadlessEventName = PoHeadlessEventName, TContext = unknown>(\n file: OptionalHookFactory<TEvent, TContext>,\n): OptionalHookFactory<TEvent, TContext>;\nexport function defineHook<TEvent extends PoHeadlessEventName = PoHeadlessEventName, TContext = unknown>(\n file: HookFile<TEvent, TContext> | OptionalHookFactory<TEvent, TContext>,\n): HookFile<TEvent, TContext> | OptionalHookFactory<TEvent, TContext> {\n return file;\n}\n\n/** A Cordis service factory for a scope root. */\nexport function defineService<TContext = unknown>(file: ServiceFile<TContext>): ServiceFile<TContext> {\n return file;\n}\n\n/** `channel/<frameType>.ts`. Context is opt-in: existing factories may take unrelated optional options. */\nexport function defineChannel(file: () => ReturnType<ChannelFile>): () => ReturnType<ChannelFile>;\nexport function defineChannel<TContext>(file: ChannelFile<TContext>, options: { context: true }): ChannelFile<TContext>;\nexport function defineChannel<TContext>(\n file: ChannelFile<TContext> | (() => ReturnType<ChannelFile>),\n options?: { context: true },\n): ChannelFile<TContext> | ChannelFile {\n return options?.context === true ? file : () => (file as () => ReturnType<ChannelFile>)();\n}\n\n/** `api/<segments>/route.ts`. The folder path is the route. */\nexport function defineRoute<TContext = unknown>(file: RouteFile<TContext>): RouteFile<TContext> {\n return file;\n}\n\n/** `method/<member>.ts`. Build the value with `defineServerMethod` to keep schema inference. */\nexport function defineMethod<TContext = unknown>(file: MethodFile<TContext>): MethodFile<TContext> {\n return file;\n}\n\n/** A server activity declaration for a session root. */\nexport function defineActivity<TContext = unknown>(file: ActivityFile<TContext>): ActivityFile<TContext> {\n return file;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA0CA,SAAgB,yBAA4B,MAAS,UAAgC;CACnF,OAAO;AACT;;AAGA,SAAgB,eAAkB,MAAY;CAC5C,OAAO;AACT;AAOA,SAAgB,eAAe,MAAwB;CACrD,IAAI,SAAS,QAAQ,OAAO,SAAS,YAAY,eAAe,QAAQ,MAAM,QAAQ,KAAK,SAAS,GAClG,OAAO;EACL,GAAG;EACH,WAAW,KAAK,UAAU,KACvB,cAA8F;GAC7F,GAAG;GACH,UAAU,SAAS,YAAY;EACjC,EACF;CACF;CAEF,OAAO;AACT;;AAGA,SAAgB,sBAAyB,MAAY;CACnD,OAAO;AACT;;AAGA,SAAgB,WAA+B,MAAsD;CACnG,OAAO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AAG;CAAK;AAC1C;AAYA,SAAgB,WACd,MACoE;CACpE,OAAO;AACT;;AAGA,SAAgB,cAAkC,MAAoD;CACpG,OAAO;AACT;AAKA,SAAgB,cACd,MACA,SACqC;CACrC,OAAO,SAAS,YAAY,OAAO,aAAc,KAAuC;AAC1F;;AAGA,SAAgB,YAAgC,MAAgD;CAC9F,OAAO;AACT;;AAGA,SAAgB,aAAiC,MAAkD;CACjG,OAAO;AACT;;AAGA,SAAgB,eAAmC,MAAsD;CACvG,OAAO;AACT"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
const require_index = require("../services/
|
|
1
|
+
const require_index = require("../services/scopeInput/index.cjs");
|
|
2
2
|
const require_serverScope = require("../schemas/serverScope.cjs");
|
|
3
|
+
const require_index$1 = require("../services/pluginLifecycle/index.cjs");
|
|
3
4
|
const require_headless = require("../schemas/headless.cjs");
|
|
4
5
|
const require_serverPlugin = require("../schemas/serverPlugin.cjs");
|
|
5
6
|
//#region src/extensions/serverPlugin.ts
|
|
@@ -43,7 +44,7 @@ function holdRoot(built) {
|
|
|
43
44
|
leases -= 1;
|
|
44
45
|
if (leases > 0 || owed.context === void 0) return;
|
|
45
46
|
const context = owed.context;
|
|
46
|
-
await require_index.runCleanups([owed.stop ? () => stop(context) : void 0, owed.dispose ? () => dispose(context) : void 0], "Shared root cleanup failed.");
|
|
47
|
+
await require_index$1.runCleanups([owed.stop ? () => stop(context) : void 0, owed.dispose ? () => dispose(context) : void 0], "Shared root cleanup failed.");
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
50
|
},
|
|
@@ -83,7 +84,39 @@ function checkContracts(plugin) {
|
|
|
83
84
|
for (const contract of plugin.injects?.[level] ?? []) if (depth(contract.scope) > depth(level)) throw new Error(`Server plugin '${plugin.name}' cannot inject the ${contract.scope} contract '${contract.name}' at the ${level} level.`);
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
|
-
|
|
87
|
+
/** Each level's contracts with the retired `global` level and contract scope refused. */
|
|
88
|
+
function hostContracts(declared) {
|
|
89
|
+
if (declared === void 0) return void 0;
|
|
90
|
+
const contracts = {};
|
|
91
|
+
for (const [key, list] of Object.entries(declared)) {
|
|
92
|
+
const level = require_index.requireCurrentScope(key, "definition");
|
|
93
|
+
const normalized = list.map((contract) => {
|
|
94
|
+
const scope = require_index.requireCurrentScope(contract.scope, "definition");
|
|
95
|
+
return scope === contract.scope ? contract : {
|
|
96
|
+
...contract,
|
|
97
|
+
scope
|
|
98
|
+
};
|
|
99
|
+
});
|
|
100
|
+
contracts[level] = [...contracts[level] ?? [], ...normalized];
|
|
101
|
+
}
|
|
102
|
+
return contracts;
|
|
103
|
+
}
|
|
104
|
+
/** A plugin built before the rename declares a `global:` level; it is refused, with a warning. */
|
|
105
|
+
function withHostLevel(plugin) {
|
|
106
|
+
if (Object.hasOwn(plugin, "global")) require_index.requireCurrentScope("global");
|
|
107
|
+
require_index.requireCurrentModeVocabulary(plugin, `Server plugin '${plugin.name}'`);
|
|
108
|
+
const host = plugin.host;
|
|
109
|
+
const provides = hostContracts(plugin.provides);
|
|
110
|
+
const injects = hostContracts(plugin.injects);
|
|
111
|
+
return {
|
|
112
|
+
...plugin,
|
|
113
|
+
...host === void 0 ? {} : { host },
|
|
114
|
+
...provides === void 0 ? {} : { provides },
|
|
115
|
+
...injects === void 0 ? {} : { injects }
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function defineServerPlugin(definition) {
|
|
119
|
+
const plugin = withHostLevel(definition);
|
|
87
120
|
checkContracts(plugin);
|
|
88
121
|
return {
|
|
89
122
|
name: plugin.name,
|
|
@@ -115,7 +148,7 @@ async function mount(owner, declaration, context) {
|
|
|
115
148
|
/** What this level holds of the build's shared values and outer roots, released once it has unwound. */
|
|
116
149
|
const leases = [];
|
|
117
150
|
let withdraw;
|
|
118
|
-
const lifecycle = require_index.createPluginLifecycle((signal) => ({
|
|
151
|
+
const lifecycle = require_index$1.createPluginLifecycle((signal) => ({
|
|
119
152
|
context,
|
|
120
153
|
host,
|
|
121
154
|
agent,
|
|
@@ -130,7 +163,8 @@ async function mount(owner, declaration, context) {
|
|
|
130
163
|
leases.push(() => lease.release());
|
|
131
164
|
return lease.value;
|
|
132
165
|
} },
|
|
133
|
-
async scopeRoot(
|
|
166
|
+
async scopeRoot(level, root, rootContext) {
|
|
167
|
+
const rootLevel = require_index.requireCurrentScope(level, "definition");
|
|
134
168
|
const reused = share.outer(rootLevel).map((held) => held[rootLevel]).find((candidate) => candidate !== void 0);
|
|
135
169
|
if (reused !== void 0) {
|
|
136
170
|
leases.push(reused.acquire());
|
|
@@ -144,7 +178,7 @@ async function mount(owner, declaration, context) {
|
|
|
144
178
|
roots[rootLevel] = held;
|
|
145
179
|
return owned;
|
|
146
180
|
},
|
|
147
|
-
hosted: (from) => share.outer(from).length > 0
|
|
181
|
+
hosted: (from) => share.outer(require_index.requireCurrentScope(from, "definition")).length > 0
|
|
148
182
|
}));
|
|
149
183
|
context.effect(() => async () => {
|
|
150
184
|
withdraw?.();
|
|
@@ -234,7 +268,21 @@ async function mount(owner, declaration, context) {
|
|
|
234
268
|
}
|
|
235
269
|
}));
|
|
236
270
|
else own(agent.registerCommand(command));
|
|
237
|
-
|
|
271
|
+
const granted = new Set((owner.injects?.[level] ?? []).map((contract) => contract.name));
|
|
272
|
+
const service = (contract) => {
|
|
273
|
+
if (!granted.has(contract.name)) throw new Error(`Server plugin '${owner.name}' did not declare '${contract.name}'. Add the contract to a ${level} root's inject list.`);
|
|
274
|
+
return context.get(contract.name);
|
|
275
|
+
};
|
|
276
|
+
for (const hook of session.hooks ?? []) {
|
|
277
|
+
const bound = {
|
|
278
|
+
...hook,
|
|
279
|
+
handle: (event, execution) => hook.handle(event, {
|
|
280
|
+
...execution,
|
|
281
|
+
service
|
|
282
|
+
})
|
|
283
|
+
};
|
|
284
|
+
own(agent.registerHook(bound));
|
|
285
|
+
}
|
|
238
286
|
for (const activity of session.activities ?? []) own(agent.registerActivity(activity));
|
|
239
287
|
});
|
|
240
288
|
if (level !== "session") withdraw = share.run(roots);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serverPlugin.cjs","names":["runCleanups","PO_SERVER_SCOPE_LEVELS","PO_SERVER_HOST_SERVICE","PO_SERVER_SCOPE_SERVICE","requirePoServerHost","readPoHeadlessHost","requirePoServerScope","createPluginLifecycle"],"sources":["../../../src/extensions/serverPlugin.ts"],"sourcesContent":["import type { Context } from '@deepseek-ai/cordis';\n\nimport type { RootDeclaration } from '../schemas/extensionFile';\nimport { readPoHeadlessHost } from '../schemas/headless';\nimport type { PoApiScope } from '../schemas/packageApi';\nimport {\n PO_SERVER_HOST_SERVICE,\n requirePoServerHost,\n type PoServerPlugin,\n type PoServerPluginDefinition,\n type PoServerPluginContext,\n type PoServerSessionPlugin,\n} from '../schemas/serverPlugin';\nimport { PO_SERVER_SCOPE_LEVELS, PO_SERVER_SCOPE_SERVICE, requirePoServerScope } from '../schemas/serverScope';\nimport { createPluginLifecycle, runCleanups } from '../services/pluginLifecycle';\n\n/** A root one level built, as the levels inside it reuse it. */\ninterface HeldRoot {\n readonly value: unknown;\n readonly activities?: RootDeclaration<unknown>['activities'];\n /** Takes a lease; the root's own stop and dispose hooks wait until every lease is released. */\n acquire(): () => Promise<void>;\n}\n\n/** What a level running a plugin build holds for the levels inside it: every root it built or reused. */\ntype LevelRoots = Partial<Record<PoApiScope, HeldRoot>>;\n\n/**\n * Holds a built root's teardown for the levels that reuse it.\n *\n * The building level keeps the root's hooks in its own lifecycle, but each one runs only when no\n * inner level still holds a lease. Otherwise the last lease to be released runs what the building\n * level held back. So a reload of the building level installs the new build for itself and for every\n * level that mounts from then on, while a session already running keeps the root it mounted with\n * until it closes.\n */\nfunction holdRoot<TValue, TContext>(\n built: RootDeclaration<TValue, TContext>,\n): { readonly held: HeldRoot; readonly declaration: RootDeclaration<TValue, TContext> } {\n let leases = 0;\n let owed: { stop: boolean; dispose: boolean; context?: TContext } = { stop: false, dispose: false };\n let stopped = false;\n let disposed = false;\n const stop = async (context: TContext): Promise<void> => {\n if (stopped) return;\n stopped = true;\n await built.onStop?.(context);\n };\n const dispose = async (context: TContext): Promise<void> => {\n if (disposed) return;\n disposed = true;\n await built.onDispose?.(context);\n };\n const held: HeldRoot = {\n value: built.value,\n ...(built.activities === undefined ? {} : { activities: built.activities }),\n acquire() {\n leases += 1;\n let released = false;\n return async () => {\n if (released) return;\n released = true;\n leases -= 1;\n if (leases > 0 || owed.context === undefined) return;\n const context = owed.context;\n await runCleanups(\n [owed.stop ? () => stop(context) : undefined, owed.dispose ? () => dispose(context) : undefined],\n 'Shared root cleanup failed.',\n );\n };\n },\n };\n return {\n held,\n declaration: {\n ...built,\n onStop: async (context) => {\n owed = { ...owed, stop: true, context };\n if (leases === 0) await stop(context);\n },\n onDispose: async (context) => {\n owed = { ...owed, dispose: true, context };\n if (leases === 0) await dispose(context);\n },\n },\n };\n}\n\nconst depth = (level: PoApiScope): number => PO_SERVER_SCOPE_LEVELS.indexOf(level);\n\n/** Throws for a contract listed where it cannot work, so a bad declaration fails at load, not at mount. */\nfunction checkContracts(plugin: PoServerPluginDefinition): void {\n for (const level of PO_SERVER_SCOPE_LEVELS) {\n const provided = plugin.provides?.[level] ?? [];\n if (provided.length > 0 && plugin[level] === undefined)\n throw new Error(\n `Server plugin '${plugin.name}' provides contracts at the ${level} level but declares nothing there.`,\n );\n const names = new Set<string>();\n for (const contract of provided) {\n if (contract.scope !== level)\n throw new Error(\n `Server plugin '${plugin.name}' lists the ${contract.scope} contract '${contract.name}' as provided at the ${level} level.`,\n );\n if (names.has(contract.name))\n throw new Error(`Server plugin '${plugin.name}' provides contract '${contract.name}' twice.`);\n names.add(contract.name);\n }\n for (const contract of plugin.injects?.[level] ?? []) {\n if (depth(contract.scope) > depth(level))\n throw new Error(\n `Server plugin '${plugin.name}' cannot inject the ${contract.scope} contract '${contract.name}' at the ${level} level.`,\n );\n }\n }\n}\n\nexport function defineServerPlugin(plugin: PoServerPluginDefinition): PoServerPlugin {\n checkContracts(plugin);\n return {\n name: plugin.name,\n ...(plugin.providerOverrides ? { providerOverrides: plugin.providerOverrides } : {}),\n ...(plugin.provides ? { provides: plugin.provides } : {}),\n ...(plugin.injects ? { injects: plugin.injects } : {}),\n inject: [...new Set([PO_SERVER_HOST_SERVICE, PO_SERVER_SCOPE_SERVICE, ...(plugin.inject ?? [])])],\n async apply(context) {\n const level = requirePoServerHost(context).scope;\n const declaration = plugin[level];\n if (!declaration) return undefined;\n // What an outer level running this build holds is read once, when this level mounts, and what\n // this level reuses from it is leased, so that level reloading never pulls a root from under a\n // running session. The contracts this level injects it waits for, and restarts with.\n const required = (plugin.injects?.[level] ?? []).map((contract) => contract.name);\n if (required.length === 0) return mount(plugin, declaration, context);\n // The inner fiber belongs to this one, so it unwinds with it.\n await context.inject(required, (inner) => mount(plugin, declaration, inner));\n return undefined;\n },\n };\n}\n\nasync function mount(\n owner: PoServerPluginDefinition,\n declaration: NonNullable<PoServerPluginDefinition[PoApiScope]>,\n context: Context,\n): Promise<() => Promise<void>> {\n const host = requirePoServerHost(context);\n const level = host.scope;\n const agent = level === 'session' ? readPoHeadlessHost(context) : undefined;\n // The definition object is the build: a reload imports a new module, and so a new store.\n const share = requirePoServerScope(context).plugin<LevelRoots>(owner);\n /** Every root this level holds, built here or reused, for the levels inside it. */\n const roots: LevelRoots = {};\n /** What this level holds of the build's shared values and outer roots, released once it has unwound. */\n const leases: (() => Promise<void>)[] = [];\n let withdraw: (() => void) | undefined;\n const lifecycle = createPluginLifecycle<PoServerPluginContext>((signal) => ({\n context,\n host,\n agent,\n signal,\n resources: {\n async acquire(key, create, dispose) {\n signal.throwIfAborted();\n const lease = await share.acquire(key, create, dispose);\n if (signal.aborted) {\n // This level unwound while the value was created, so it keeps no share of it.\n await lease.release();\n signal.throwIfAborted();\n }\n leases.push(() => lease.release());\n return lease.value;\n },\n },\n async scopeRoot(rootLevel, root, rootContext) {\n // The innermost outer level holding this root built it, or reused it from further out.\n const reused = share\n .outer(rootLevel)\n .map((held) => held[rootLevel])\n .find((candidate) => candidate !== undefined);\n if (reused !== undefined) {\n leases.push(reused.acquire());\n roots[rootLevel] = reused;\n return {\n value: reused.value as Awaited<ReturnType<typeof root>>['value'],\n ...(reused.activities === undefined ? {} : { activities: reused.activities }),\n };\n }\n const { held, declaration: owned } = holdRoot(await root(rootContext));\n roots[rootLevel] = held;\n return owned;\n },\n hosted: (from) => share.outer(from).length > 0,\n }));\n context.effect(() => async () => {\n // First, so no level mounting from here on reuses what this one is about to tear down.\n withdraw?.();\n try {\n await lifecycle.dispose();\n } finally {\n // Last, so a value or an outer root this level holds outlives everything here that could use it.\n for (const release of leases.splice(0).reverse()) {\n try {\n await release();\n } catch (error) {\n host.context.onNotice(\n `server plugin '${owner.name}' could not release a shared value (${error instanceof Error ? error.message : String(error)})`,\n );\n }\n }\n }\n });\n const own = <T extends { dispose(): void | Promise<void>; mounted?: boolean }>(registration: T): void => {\n lifecycle.own(() => registration.dispose());\n if ('mounted' in registration && registration.mounted === false)\n throw new Error('Server plugin registration was refused.');\n };\n await lifecycle.mount(\n () => (typeof declaration === 'function' ? declaration(lifecycle.context) : declaration),\n async (scope) => {\n for (const service of scope.services ?? []) {\n const fiber = context.plugin(service);\n lifecycle.own(() => fiber.dispose());\n await fiber;\n }\n for (const channel of scope.channels ?? []) own(host.registerChannel(channel()));\n for (const api of scope.api ?? []) own(host.registerApi(api));\n for (const method of scope.methods ?? []) own(method.register(host));\n if (!agent) return;\n const session: PoServerSessionPlugin = scope;\n for (const restriction of session.toolRestrictions ?? []) {\n if (!('restrict' in restriction)) {\n own(agent.registerToolRestriction(restriction));\n continue;\n }\n let registration: ReturnType<typeof agent.registerToolRestriction> | undefined;\n lifecycle.own(() => {\n const current = registration;\n registration = undefined;\n return current?.dispose();\n });\n const refresh = (): void => {\n if (lifecycle.context.signal.aborted) return;\n const previous = registration;\n registration = undefined;\n previous?.dispose();\n registration = agent.registerToolRestriction(restriction.restrict());\n if ('mounted' in registration && registration.mounted === false)\n throw new Error(`Server tool restriction ${restriction.source} was refused.`);\n };\n refresh();\n const unsubscribe = restriction.subscribe?.(refresh);\n if (unsubscribe) lifecycle.own(unsubscribe);\n }\n for (const resource of session.resources ?? []) {\n // Generated optional and many-valued contributions can leave an undefined\n // member when a package has no resource for the current runtime.\n if (resource !== undefined) own(agent.registerResource(resource));\n }\n for (const tool of session.tools ?? []) {\n if ('kind' in tool) {\n own(\n agent.registerTool({\n ...tool,\n async execute(toolCallId, input, signal, update, execution) {\n const invocationSignal = signal\n ? AbortSignal.any([signal, lifecycle.context.signal])\n : lifecycle.context.signal;\n invocationSignal.throwIfAborted();\n try {\n return await tool.execute(input, {\n toolCallId,\n signal: invocationSignal,\n cwd: execution.cwd,\n update: (result) => update?.(result),\n notify: (request) => execution.client.notify(request),\n });\n } catch (error) {\n return {\n content: [{ type: 'text', text: error instanceof Error ? error.message : String(error) }],\n isError: true,\n };\n }\n },\n }),\n );\n } else own(agent.registerTool(tool));\n }\n for (const command of session.commands ?? []) {\n if ('kind' in command) {\n own(\n agent.registerCommand({\n ...command,\n execute: (args, execution) => {\n lifecycle.context.signal.throwIfAborted();\n return command.execute(args, {\n cwd: execution.cwd,\n signal: lifecycle.context.signal,\n notify: (request) => execution.client.notify(request),\n });\n },\n }),\n );\n } else own(agent.registerCommand(command));\n }\n for (const hook of session.hooks ?? []) own(agent.registerHook(hook));\n for (const activity of session.activities ?? []) own(agent.registerActivity(activity));\n },\n );\n // Published once mounted, so a level inside this one reuses its roots instead of building them again.\n if (level !== 'session') withdraw = share.run(roots);\n return () => lifecycle.dispose();\n}\n"],"mappings":";;;;;;;;;;;;;;AAoCA,SAAS,SACP,OACsF;CACtF,IAAI,SAAS;CACb,IAAI,OAAgE;EAAE,MAAM;EAAO,SAAS;CAAM;CAClG,IAAI,UAAU;CACd,IAAI,WAAW;CACf,MAAM,OAAO,OAAO,YAAqC;EACvD,IAAI,SAAS;EACb,UAAU;EACV,MAAM,MAAM,SAAS,OAA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B,OAAO,CAAC;EAE3C,KAAK,MAAM,QAAQ,QAAQ,SAAS,CAAC,GAAG,IAAI,MAAM,aAAa,IAAI,CAAC;EACpE,KAAK,MAAM,YAAY,QAAQ,cAAc,CAAC,GAAG,IAAI,MAAM,iBAAiB,QAAQ,CAAC;CACvF,CACF;CAEA,IAAI,UAAU,WAAW,WAAW,MAAM,IAAI,KAAK;CACnD,aAAa,UAAU,QAAQ;AACjC"}
|
|
1
|
+
{"version":3,"file":"serverPlugin.cjs","names":["runCleanups","PO_SERVER_SCOPE_LEVELS","requireCurrentScope","PO_SERVER_HOST_SERVICE","PO_SERVER_SCOPE_SERVICE","requirePoServerHost","readPoHeadlessHost","requirePoServerScope","createPluginLifecycle"],"sources":["../../../src/extensions/serverPlugin.ts"],"sourcesContent":["import type { Context } from '@deepseek-ai/cordis';\n\nimport type { RootDeclaration } from '../schemas/extensionFile';\nimport { readPoHeadlessHost, type PoHeadlessExecutionContext, type PoHeadlessHook } from '../schemas/headless';\nimport type { PoApiScope } from '../schemas/packageApi';\nimport {\n PO_SERVER_HOST_SERVICE,\n requirePoServerHost,\n type PoServerContracts,\n type PoServerPlugin,\n type PoServerPluginDefinition,\n type PoServerPluginContext,\n type PoServerSessionPlugin,\n} from '../schemas/serverPlugin';\nimport {\n PO_SERVER_SCOPE_LEVELS,\n PO_SERVER_SCOPE_SERVICE,\n requirePoServerScope,\n type PoServiceContract,\n} from '../schemas/serverScope';\nimport { createPluginLifecycle, runCleanups } from '../services/pluginLifecycle';\nimport { requireCurrentModeVocabulary, requireCurrentScope } from '../services/scopeInput';\n\n/** A root one level built, as the levels inside it reuse it. */\ninterface HeldRoot {\n readonly value: unknown;\n readonly activities?: RootDeclaration<unknown>['activities'];\n /** Takes a lease; the root's own stop and dispose hooks wait until every lease is released. */\n acquire(): () => Promise<void>;\n}\n\n/** What a level running a plugin build holds for the levels inside it: every root it built or reused. */\ntype LevelRoots = Partial<Record<PoApiScope, HeldRoot>>;\n\n/**\n * Holds a built root's teardown for the levels that reuse it.\n *\n * The building level keeps the root's hooks in its own lifecycle, but each one runs only when no\n * inner level still holds a lease. Otherwise the last lease to be released runs what the building\n * level held back. So a reload of the building level installs the new build for itself and for every\n * level that mounts from then on, while a session already running keeps the root it mounted with\n * until it closes.\n */\nfunction holdRoot<TValue, TContext>(\n built: RootDeclaration<TValue, TContext>,\n): { readonly held: HeldRoot; readonly declaration: RootDeclaration<TValue, TContext> } {\n let leases = 0;\n let owed: { stop: boolean; dispose: boolean; context?: TContext } = { stop: false, dispose: false };\n let stopped = false;\n let disposed = false;\n const stop = async (context: TContext): Promise<void> => {\n if (stopped) return;\n stopped = true;\n await built.onStop?.(context);\n };\n const dispose = async (context: TContext): Promise<void> => {\n if (disposed) return;\n disposed = true;\n await built.onDispose?.(context);\n };\n const held: HeldRoot = {\n value: built.value,\n ...(built.activities === undefined ? {} : { activities: built.activities }),\n acquire() {\n leases += 1;\n let released = false;\n return async () => {\n if (released) return;\n released = true;\n leases -= 1;\n if (leases > 0 || owed.context === undefined) return;\n const context = owed.context;\n await runCleanups(\n [owed.stop ? () => stop(context) : undefined, owed.dispose ? () => dispose(context) : undefined],\n 'Shared root cleanup failed.',\n );\n };\n },\n };\n return {\n held,\n declaration: {\n ...built,\n onStop: async (context) => {\n owed = { ...owed, stop: true, context };\n if (leases === 0) await stop(context);\n },\n onDispose: async (context) => {\n owed = { ...owed, dispose: true, context };\n if (leases === 0) await dispose(context);\n },\n },\n };\n}\n\nconst depth = (level: PoApiScope): number => PO_SERVER_SCOPE_LEVELS.indexOf(level);\n\n/** Throws for a contract listed where it cannot work, so a bad declaration fails at load, not at mount. */\nfunction checkContracts(plugin: PoServerPluginDefinition): void {\n for (const level of PO_SERVER_SCOPE_LEVELS) {\n const provided = plugin.provides?.[level] ?? [];\n if (provided.length > 0 && plugin[level] === undefined)\n throw new Error(\n `Server plugin '${plugin.name}' provides contracts at the ${level} level but declares nothing there.`,\n );\n const names = new Set<string>();\n for (const contract of provided) {\n if (contract.scope !== level)\n throw new Error(\n `Server plugin '${plugin.name}' lists the ${contract.scope} contract '${contract.name}' as provided at the ${level} level.`,\n );\n if (names.has(contract.name))\n throw new Error(`Server plugin '${plugin.name}' provides contract '${contract.name}' twice.`);\n names.add(contract.name);\n }\n for (const contract of plugin.injects?.[level] ?? []) {\n if (depth(contract.scope) > depth(level))\n throw new Error(\n `Server plugin '${plugin.name}' cannot inject the ${contract.scope} contract '${contract.name}' at the ${level} level.`,\n );\n }\n }\n}\n\n/** Each level's contracts with the retired `global` level and contract scope refused. */\nfunction hostContracts(declared: PoServerContracts | undefined): PoServerContracts | undefined {\n if (declared === undefined) return undefined;\n const contracts: Partial<Record<PoApiScope, readonly PoServiceContract<unknown>[]>> = {};\n for (const [key, list] of Object.entries(declared) as [string, readonly PoServiceContract<unknown>[]][]) {\n const level = requireCurrentScope(key, 'definition') as PoApiScope;\n const normalized = list.map((contract) => {\n const scope = requireCurrentScope(contract.scope, 'definition');\n return scope === contract.scope ? contract : { ...contract, scope };\n });\n contracts[level] = [...(contracts[level] ?? []), ...normalized];\n }\n return contracts;\n}\n\n/** A plugin built before the rename declares a `global:` level; it is refused, with a warning. */\nfunction withHostLevel(plugin: PoServerPluginDefinition): PoServerPluginDefinition {\n if (Object.hasOwn(plugin, 'global')) requireCurrentScope('global');\n requireCurrentModeVocabulary(plugin, `Server plugin '${plugin.name}'`);\n const host = plugin.host;\n const provides = hostContracts(plugin.provides);\n const injects = hostContracts(plugin.injects);\n return {\n ...plugin,\n ...(host === undefined ? {} : { host }),\n ...(provides === undefined ? {} : { provides }),\n ...(injects === undefined ? {} : { injects }),\n };\n}\n\nexport function defineServerPlugin(definition: PoServerPluginDefinition): PoServerPlugin {\n const plugin = withHostLevel(definition);\n checkContracts(plugin);\n return {\n name: plugin.name,\n ...(plugin.providerOverrides ? { providerOverrides: plugin.providerOverrides } : {}),\n ...(plugin.provides ? { provides: plugin.provides } : {}),\n ...(plugin.injects ? { injects: plugin.injects } : {}),\n inject: [...new Set([PO_SERVER_HOST_SERVICE, PO_SERVER_SCOPE_SERVICE, ...(plugin.inject ?? [])])],\n async apply(context) {\n const level = requirePoServerHost(context).scope;\n const declaration = plugin[level];\n if (!declaration) return undefined;\n // What an outer level running this build holds is read once, when this level mounts, and what\n // this level reuses from it is leased, so that level reloading never pulls a root from under a\n // running session. The contracts this level injects it waits for, and restarts with.\n const required = (plugin.injects?.[level] ?? []).map((contract) => contract.name);\n if (required.length === 0) return mount(plugin, declaration, context);\n // The inner fiber belongs to this one, so it unwinds with it.\n await context.inject(required, (inner) => mount(plugin, declaration, inner));\n return undefined;\n },\n };\n}\n\nasync function mount(\n owner: PoServerPluginDefinition,\n declaration: NonNullable<PoServerPluginDefinition[PoApiScope]>,\n context: Context,\n): Promise<() => Promise<void>> {\n const host = requirePoServerHost(context);\n const level = host.scope;\n const agent = level === 'session' ? readPoHeadlessHost(context) : undefined;\n // The definition object is the build: a reload imports a new module, and so a new store.\n const share = requirePoServerScope(context).plugin<LevelRoots>(owner);\n /** Every root this level holds, built here or reused, for the levels inside it. */\n const roots: LevelRoots = {};\n /** What this level holds of the build's shared values and outer roots, released once it has unwound. */\n const leases: (() => Promise<void>)[] = [];\n let withdraw: (() => void) | undefined;\n const lifecycle = createPluginLifecycle<PoServerPluginContext>((signal) => ({\n context,\n host,\n agent,\n signal,\n resources: {\n async acquire(key, create, dispose) {\n signal.throwIfAborted();\n const lease = await share.acquire(key, create, dispose);\n if (signal.aborted) {\n // This level unwound while the value was created, so it keeps no share of it.\n await lease.release();\n signal.throwIfAborted();\n }\n leases.push(() => lease.release());\n return lease.value;\n },\n },\n async scopeRoot(level, root, rootContext) {\n // An entry generated before the rename still names its outermost root 'global'.\n const rootLevel = requireCurrentScope(level, 'definition');\n // The innermost outer level holding this root built it, or reused it from further out.\n const reused = share\n .outer(rootLevel)\n .map((held) => held[rootLevel])\n .find((candidate) => candidate !== undefined);\n if (reused !== undefined) {\n leases.push(reused.acquire());\n roots[rootLevel] = reused;\n return {\n value: reused.value as Awaited<ReturnType<typeof root>>['value'],\n ...(reused.activities === undefined ? {} : { activities: reused.activities }),\n };\n }\n const { held, declaration: owned } = holdRoot(await root(rootContext));\n roots[rootLevel] = held;\n return owned;\n },\n hosted: (from) => share.outer(requireCurrentScope(from, 'definition')).length > 0,\n }));\n context.effect(() => async () => {\n // First, so no level mounting from here on reuses what this one is about to tear down.\n withdraw?.();\n try {\n await lifecycle.dispose();\n } finally {\n // Last, so a value or an outer root this level holds outlives everything here that could use it.\n for (const release of leases.splice(0).reverse()) {\n try {\n await release();\n } catch (error) {\n host.context.onNotice(\n `server plugin '${owner.name}' could not release a shared value (${error instanceof Error ? error.message : String(error)})`,\n );\n }\n }\n }\n });\n const own = <T extends { dispose(): void | Promise<void>; mounted?: boolean }>(registration: T): void => {\n lifecycle.own(() => registration.dispose());\n if ('mounted' in registration && registration.mounted === false)\n throw new Error('Server plugin registration was refused.');\n };\n await lifecycle.mount(\n () => (typeof declaration === 'function' ? declaration(lifecycle.context) : declaration),\n async (scope) => {\n for (const service of scope.services ?? []) {\n const fiber = context.plugin(service);\n lifecycle.own(() => fiber.dispose());\n await fiber;\n }\n for (const channel of scope.channels ?? []) own(host.registerChannel(channel()));\n for (const api of scope.api ?? []) own(host.registerApi(api));\n for (const method of scope.methods ?? []) own(method.register(host));\n if (!agent) return;\n const session: PoServerSessionPlugin = scope;\n for (const restriction of session.toolRestrictions ?? []) {\n if (!('restrict' in restriction)) {\n own(agent.registerToolRestriction(restriction));\n continue;\n }\n let registration: ReturnType<typeof agent.registerToolRestriction> | undefined;\n lifecycle.own(() => {\n const current = registration;\n registration = undefined;\n return current?.dispose();\n });\n const refresh = (): void => {\n if (lifecycle.context.signal.aborted) return;\n const previous = registration;\n registration = undefined;\n previous?.dispose();\n registration = agent.registerToolRestriction(restriction.restrict());\n if ('mounted' in registration && registration.mounted === false)\n throw new Error(`Server tool restriction ${restriction.source} was refused.`);\n };\n refresh();\n const unsubscribe = restriction.subscribe?.(refresh);\n if (unsubscribe) lifecycle.own(unsubscribe);\n }\n for (const resource of session.resources ?? []) {\n // Generated optional and many-valued contributions can leave an undefined\n // member when a package has no resource for the current runtime.\n if (resource !== undefined) own(agent.registerResource(resource));\n }\n for (const tool of session.tools ?? []) {\n if ('kind' in tool) {\n own(\n agent.registerTool({\n ...tool,\n async execute(toolCallId, input, signal, update, execution) {\n const invocationSignal = signal\n ? AbortSignal.any([signal, lifecycle.context.signal])\n : lifecycle.context.signal;\n invocationSignal.throwIfAborted();\n try {\n return await tool.execute(input, {\n toolCallId,\n signal: invocationSignal,\n cwd: execution.cwd,\n update: (result) => update?.(result),\n notify: (request) => execution.client.notify(request),\n });\n } catch (error) {\n return {\n content: [{ type: 'text', text: error instanceof Error ? error.message : String(error) }],\n isError: true,\n };\n }\n },\n }),\n );\n } else own(agent.registerTool(tool));\n }\n for (const command of session.commands ?? []) {\n if ('kind' in command) {\n own(\n agent.registerCommand({\n ...command,\n execute: (args, execution) => {\n lifecycle.context.signal.throwIfAborted();\n return command.execute(args, {\n cwd: execution.cwd,\n signal: lifecycle.context.signal,\n notify: (request) => execution.client.notify(request),\n });\n },\n }),\n );\n } else own(agent.registerCommand(command));\n }\n // A routed hook reaches the contracts its package declared at this level and no others: the declaration is\n // its grant. This level mounts under those contracts and restarts with them, so the value read is current.\n const granted = new Set((owner.injects?.[level] ?? []).map((contract) => contract.name));\n const service = <T>(contract: PoServiceContract<T>): T => {\n if (!granted.has(contract.name))\n throw new Error(\n `Server plugin '${owner.name}' did not declare '${contract.name}'. Add the contract to a ${level} root's inject list.`,\n );\n return context.get(contract.name) as T;\n };\n for (const hook of session.hooks ?? []) {\n const bound = {\n ...hook,\n handle: (event: never, execution: PoHeadlessExecutionContext) =>\n hook.handle(event, { ...execution, service }),\n } as PoHeadlessHook;\n own(agent.registerHook(bound));\n }\n for (const activity of session.activities ?? []) own(agent.registerActivity(activity));\n },\n );\n // Published once mounted, so a level inside this one reuses its roots instead of building them again.\n if (level !== 'session') withdraw = share.run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ACH;EACF,CAAC,CACH;OACK,IAAI,MAAM,gBAAgB,OAAO,CAAC;EAI3C,MAAM,UAAU,IAAI,KAAK,MAAM,UAAU,UAAU,CAAC,EAAA,CAAG,KAAK,aAAa,SAAS,IAAI,CAAC;EACvF,MAAM,WAAc,aAAsC;GACxD,IAAI,CAAC,QAAQ,IAAI,SAAS,IAAI,GAC5B,MAAM,IAAI,MACR,kBAAkB,MAAM,KAAK,qBAAqB,SAAS,KAAK,2BAA2B,MAAM,qBACnG;GACF,OAAO,QAAQ,IAAI,SAAS,IAAI;EAClC;EACA,KAAK,MAAM,QAAQ,QAAQ,SAAS,CAAC,GAAG;GACtC,MAAM,QAAQ;IACZ,GAAG;IACH,SAAS,OAAc,cACrB,KAAK,OAAO,OAAO;KAAE,GAAG;KAAW;IAAQ,CAAC;GAChD;GACA,IAAI,MAAM,aAAa,KAAK,CAAC;EAC/B;EACA,KAAK,MAAM,YAAY,QAAQ,cAAc,CAAC,GAAG,IAAI,MAAM,iBAAiB,QAAQ,CAAC;CACvF,CACF;CAEA,IAAI,UAAU,WAAW,WAAW,MAAM,IAAI,KAAK;CACnD,aAAa,UAAU,QAAQ;AACjC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PoServerPlugin, PoServerPluginDefinition } from "../schemas/serverPlugin.mjs";
|
|
2
2
|
//#region src/extensions/serverPlugin.d.ts
|
|
3
|
-
export declare function defineServerPlugin(
|
|
3
|
+
export declare function defineServerPlugin(definition: PoServerPluginDefinition): PoServerPlugin;
|
|
4
4
|
//#endregion
|
|
5
5
|
//# sourceMappingURL=serverPlugin.d.mts.map
|