@agimon-ai/po-core 0.0.0-alpha.21 → 0.0.0-alpha.211
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
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import { PoClientDeviceRegistry } from "./clientDevices.mjs";
|
|
1
2
|
import { PoSessionStorageService } from "./platform.mjs";
|
|
2
3
|
import { PoComputerUseSessionAccess, PoDirectEventBus, PoHubSessionService, PoSessionActivity, PoSessionCommunicationEndpoint, PoSessionContext } from "./hubChannel.mjs";
|
|
4
|
+
import { LocaleCatalog } from "./locale.mjs";
|
|
3
5
|
import { PoMcpProjection } from "./mcpProjection.mjs";
|
|
6
|
+
import { PoClientPluginInventory } from "./brain.mjs";
|
|
7
|
+
import { PoServiceContract } from "./serverScope.mjs";
|
|
8
|
+
import { FederationCaller as PoFederationCaller } from "@agimon-ai/po-web-security/deviceProof";
|
|
4
9
|
//#region src/schemas/packageApi.d.ts
|
|
5
10
|
/** The host-owned sync view a repository-scoped package API may inspect. */
|
|
6
11
|
export interface PoRepositorySyncView {
|
|
@@ -10,12 +15,15 @@ export interface PoRepositorySyncView {
|
|
|
10
15
|
syncing?: boolean;
|
|
11
16
|
mcpProjection?: PoMcpProjection;
|
|
12
17
|
}
|
|
13
|
-
/**
|
|
14
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Where an API runs: inside one session's server, one workspace, or the machine-wide host.
|
|
20
|
+
* The multi-host global tier has no server scope; it is account data joined in the apps.
|
|
21
|
+
*/
|
|
22
|
+
export type PoApiScope = 'host' | 'workspace' | 'session';
|
|
15
23
|
export declare const PO_API_SCOPES: readonly PoApiScope[];
|
|
16
24
|
/** Identity of an independently mounted plugin host. */
|
|
17
25
|
export type PoApiMount = {
|
|
18
|
-
scope: '
|
|
26
|
+
scope: 'host';
|
|
19
27
|
} | {
|
|
20
28
|
scope: 'workspace';
|
|
21
29
|
workspaceId: string;
|
|
@@ -31,6 +39,8 @@ export interface PoWebComposition {
|
|
|
31
39
|
manifestUrl: string;
|
|
32
40
|
rawAssetBaseUrl: string;
|
|
33
41
|
verifiedAssetBaseUrl: string;
|
|
42
|
+
/** Host-composition messages, absent on legacy hosts. Language labels still come from plugins. */
|
|
43
|
+
localeCatalogs?: Readonly<Record<string, LocaleCatalog>>;
|
|
34
44
|
/** `[slot, entry]` for each of this mount's plugin copies, the entry an absolute path below the asset prefixes. */
|
|
35
45
|
pluginEntries: [string, string][];
|
|
36
46
|
/** Every signed file this mount's slots can load, absolute below the asset prefixes. */
|
|
@@ -42,8 +52,8 @@ export interface PoWebComposition {
|
|
|
42
52
|
plugins: string[];
|
|
43
53
|
}
|
|
44
54
|
/**
|
|
45
|
-
* Immutable native contribution generation paired with a server mount. One signed CommonJS module
|
|
46
|
-
*
|
|
55
|
+
* Immutable native contribution generation paired with a server mount. One signed CommonJS module per
|
|
56
|
+
* plugin, served through the same immutable plugin routes as web compositions.
|
|
47
57
|
*/
|
|
48
58
|
export interface PoNativeComposition {
|
|
49
59
|
id: string;
|
|
@@ -51,8 +61,11 @@ export interface PoNativeComposition {
|
|
|
51
61
|
revision: number;
|
|
52
62
|
manifestUrl: string;
|
|
53
63
|
rawAssetBaseUrl: string;
|
|
54
|
-
|
|
55
|
-
|
|
64
|
+
localeCatalogs?: PoWebComposition['localeCatalogs'];
|
|
65
|
+
/** `[pluginId, modulePath]` for each plugin of this mount that built; the shell loads each on its own. */
|
|
66
|
+
pluginEntries: [string, string][];
|
|
67
|
+
/** Shared host UI entry in the same signed generation; absent on legacy hosts. */
|
|
68
|
+
uiEntry?: string;
|
|
56
69
|
channels: string[];
|
|
57
70
|
/** The `poNative.pluginId` values resolved for this mount; the shell installs only these. */
|
|
58
71
|
plugins: string[];
|
|
@@ -63,7 +76,7 @@ export declare function poApiMountPath(mount: PoApiMount & {
|
|
|
63
76
|
}): string;
|
|
64
77
|
/** Scope addressed by a public WebSocket upgrade. */
|
|
65
78
|
export type PoSocketMount = {
|
|
66
|
-
scope: '
|
|
79
|
+
scope: 'host';
|
|
67
80
|
} | {
|
|
68
81
|
scope: 'workspace';
|
|
69
82
|
workspaceId: string;
|
|
@@ -82,18 +95,45 @@ export declare const PO_HUB_API_SESSION_QUERY_PARAM = "hubSession";
|
|
|
82
95
|
export declare const PO_API_CALLER_LOCALITY_HEADER = "x-po-api-caller-locality";
|
|
83
96
|
export declare const PO_API_CALLER_DEVICE_ID_HEADER = "x-po-api-caller-device-id";
|
|
84
97
|
export declare const PO_API_CALLER_STEP_UP_HEADER = "x-po-api-caller-step-up";
|
|
85
|
-
|
|
98
|
+
/** Set only after destination verification, never accepted from an untrusted proxy. */
|
|
99
|
+
export declare const PO_API_CALLER_FEDERATION_HEADER = "x-po-api-caller-federation";
|
|
100
|
+
/**
|
|
101
|
+
* What a remote caller is on this host: `owner` administers it, `member` belongs to its team and reaches only the
|
|
102
|
+
* sessions they own or were given. Written by the remote runtime for every request it forwards.
|
|
103
|
+
*/
|
|
104
|
+
export declare const PO_API_CALLER_ACCESS_HEADER = "x-po-api-caller-access";
|
|
105
|
+
/**
|
|
106
|
+
* The socket peer of a request to a package's public route. The Node server always overwrites it, so a package may key
|
|
107
|
+
* a rate limit on it; no client value survives.
|
|
108
|
+
*/
|
|
109
|
+
export declare const PO_API_PEER_ADDRESS_HEADER = "x-po-api-peer-address";
|
|
110
|
+
export declare const PO_API_CALLER_HEADERS: readonly ["x-po-api-caller-locality", "x-po-api-caller-device-id", "x-po-api-caller-step-up", "x-po-api-caller-federation", "x-po-api-caller-access"];
|
|
86
111
|
export type PoApiCallerStepUp = 'not-required' | 'verified' | 'unavailable';
|
|
87
|
-
export type
|
|
112
|
+
export type PoApiCallerAccess = 'owner' | 'member';
|
|
113
|
+
export type PoApiCaller = ({
|
|
88
114
|
locality: 'local';
|
|
89
115
|
stepUp: 'not-required';
|
|
90
116
|
} | {
|
|
91
117
|
locality: 'remote';
|
|
92
118
|
deviceId: string;
|
|
93
119
|
stepUp: PoApiCallerStepUp;
|
|
94
|
-
|
|
120
|
+
access?: PoApiCallerAccess;
|
|
121
|
+
}) & Partial<import('@agimon-ai/po-web-security/deviceProof').FederationCaller>;
|
|
95
122
|
/** Reads the proxy-authenticated caller identity, rejecting partial or contradictory stamps. */
|
|
96
123
|
export declare function poApiCallerFrom(headers: Headers): PoApiCaller | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* The person who started a session: the verified caller of a top-level create, or the parent's for a child.
|
|
126
|
+
* Never read from request input. Absent for a local or unattributed start.
|
|
127
|
+
*/
|
|
128
|
+
export interface PoSessionStarter {
|
|
129
|
+
readonly issuer: string;
|
|
130
|
+
readonly subject: string;
|
|
131
|
+
readonly org?: string;
|
|
132
|
+
}
|
|
133
|
+
/** The starter a verified caller names; undefined when the caller carries no principal. */
|
|
134
|
+
export declare function poSessionStarterFrom(caller: PoApiCaller | undefined): PoSessionStarter | undefined;
|
|
135
|
+
/** A starter read back from storage, or undefined when the value is not one. */
|
|
136
|
+
export declare function parsePoSessionStarter(value: unknown): PoSessionStarter | undefined;
|
|
97
137
|
/**
|
|
98
138
|
* A browser-reachable OAuth redirect the host serves on its own listener.
|
|
99
139
|
*
|
|
@@ -147,7 +187,7 @@ export type PoRequestReceiptReserveResult = {
|
|
|
147
187
|
kind: 'conflict';
|
|
148
188
|
receipt: PoRequestReceipt;
|
|
149
189
|
};
|
|
150
|
-
/** A
|
|
190
|
+
/** A host-only receipt capability. A reservation is not an execution receipt. */
|
|
151
191
|
export interface PoRequestReceipts {
|
|
152
192
|
reserve(request: PoRequestReceiptReservation): Promise<PoRequestReceiptReserveResult>;
|
|
153
193
|
lookup(key: PoRequestReceiptKey): Promise<PoRequestReceipt | undefined>;
|
|
@@ -170,12 +210,12 @@ export interface PoHostExecutionBudget {
|
|
|
170
210
|
limit: number;
|
|
171
211
|
}>;
|
|
172
212
|
}
|
|
173
|
-
/** Synchronous
|
|
213
|
+
/** Synchronous per-device exclusion across media APIs mounted at different scopes. */
|
|
174
214
|
export interface PoHostMediaArbitration {
|
|
175
|
-
register(busy: () => boolean): () => void;
|
|
176
|
-
available(busy: () => boolean): boolean;
|
|
215
|
+
register(busy: () => boolean, deviceId: () => string | undefined): () => void;
|
|
216
|
+
available(busy: () => boolean, deviceId: string): boolean;
|
|
177
217
|
}
|
|
178
|
-
/** One host's paired agent registrations, shared across its
|
|
218
|
+
/** One host's paired agent registrations, shared across its host and session mounts. */
|
|
179
219
|
export interface PoPeerAgentRegistry {
|
|
180
220
|
register(sessionId: string, agent: {
|
|
181
221
|
fetch(request: Request): Promise<Response>;
|
|
@@ -201,11 +241,24 @@ export interface PoEditPresenceEntry {
|
|
|
201
241
|
readonly tag: string;
|
|
202
242
|
readonly at: number;
|
|
203
243
|
}
|
|
204
|
-
/**
|
|
205
|
-
* Host-wide record of the last edit each live agent made to a file, keyed by realpath then agent key.
|
|
206
|
-
* Owners delete their entries when they dispose, so no callback outlives its session or run.
|
|
207
|
-
*/
|
|
244
|
+
/** Last successful edits, keyed by canonical file path then agent key. */
|
|
208
245
|
export type PoEditPresenceLedger = Map<string, Map<string, PoEditPresenceEntry>>;
|
|
246
|
+
/** Workspace-owned file presence. Only file overlap grants an unrelated session contact. */
|
|
247
|
+
export interface PoEditPresence {
|
|
248
|
+
/** Records a touch and returns other live editors of this canonical file. */
|
|
249
|
+
touch(file: string, agent: PoEditPresenceAgent): readonly PoEditPresenceEntry[];
|
|
250
|
+
record(file: string, entry: PoEditPresenceEntry): void;
|
|
251
|
+
forget(agentKey: string): void;
|
|
252
|
+
canCommunicate(sourceSessionId: string, targetSessionId: string): boolean;
|
|
253
|
+
clear(): void;
|
|
254
|
+
}
|
|
255
|
+
export declare const PO_EDIT_PRESENCE_SERVICE = "po/edit-presence";
|
|
256
|
+
export declare const PO_EDIT_PRESENCE_CONTRACT: PoServiceContract<PoEditPresence>;
|
|
257
|
+
declare module '@deepseek-ai/cordis' {
|
|
258
|
+
interface Context {
|
|
259
|
+
'po/edit-presence': PoEditPresence;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
209
262
|
/** Why shareFile rejects while the host has no public tunnel origin. */
|
|
210
263
|
export declare const PO_SHARE_FILE_REMOTE_OFF_MESSAGE = "Remote access is off, so Po cannot share files with remote MCP servers. Turn it on and retry.";
|
|
211
264
|
/**
|
|
@@ -224,14 +277,36 @@ export interface PoSharedFile {
|
|
|
224
277
|
/** Idempotent. */
|
|
225
278
|
revoke(): void;
|
|
226
279
|
}
|
|
280
|
+
/** Server-only admission for a registered file. Never construct this from browser input.
|
|
281
|
+
* The opener must revalidate ownership, containment, symlinks and registered identity
|
|
282
|
+
* on every call. Core pins identity again and bounds streaming to the admitted size.
|
|
283
|
+
*/
|
|
284
|
+
export interface PoOpenedRegisteredFile {
|
|
285
|
+
identity: string;
|
|
286
|
+
size: number;
|
|
287
|
+
/** Single-use bounded stream. Ending or cancelling closes the opened resource. */
|
|
288
|
+
stream(): ReadableStream<Uint8Array>;
|
|
289
|
+
close(): Promise<void>;
|
|
290
|
+
}
|
|
291
|
+
export interface PoRegisteredFile {
|
|
292
|
+
fileName: string;
|
|
293
|
+
open(): Promise<PoOpenedRegisteredFile>;
|
|
294
|
+
}
|
|
227
295
|
/** What the host tells an API about itself when it starts. */
|
|
228
296
|
export interface PoApiContext {
|
|
229
297
|
scope: PoApiScope;
|
|
298
|
+
/** Installed CLI release and its catalog. Absent on hosts that do not ship the CLI. */
|
|
299
|
+
distribution?: {
|
|
300
|
+
readonly version: string;
|
|
301
|
+
readonly catalogPackages: readonly string[];
|
|
302
|
+
};
|
|
303
|
+
/** Descriptive inventory of this exact published web mount. No plugin runtime values. */
|
|
304
|
+
clientPlugins?: PoClientPluginInventory;
|
|
230
305
|
/** Stable, opaque workspace id, shared by every session and member checkout of the workspace. */
|
|
231
306
|
workspaceId?: string;
|
|
232
307
|
/**
|
|
233
308
|
* The admitted workspace root for a workspace mount. For a session mount it is the checkout
|
|
234
|
-
* the session runs in; read sessionContext for both roots. Absent from
|
|
309
|
+
* the session runs in; read sessionContext for both roots. Absent from host mounts.
|
|
235
310
|
*/
|
|
236
311
|
workspaceRoot?: string;
|
|
237
312
|
/** The session's baseline context; present on session mounts whose host knows its workspace. */
|
|
@@ -240,6 +315,8 @@ export interface PoApiContext {
|
|
|
240
315
|
homeDirectory?: string;
|
|
241
316
|
/** The session this host serves; absent for a hub-scoped API. */
|
|
242
317
|
sessionId?: string;
|
|
318
|
+
/** Who started the session this host serves, recorded by the host. Absent for a local or unattributed start. */
|
|
319
|
+
startedBy?: PoSessionStarter;
|
|
243
320
|
/** The session's working directory; absent for a hub-scoped API. */
|
|
244
321
|
cwd?: string;
|
|
245
322
|
/** Session environment admitted by the server, never supplied by remote clients. */
|
|
@@ -282,47 +359,114 @@ export interface PoApiContext {
|
|
|
282
359
|
* Session mounts only. The last publisher wins.
|
|
283
360
|
*/
|
|
284
361
|
publishActivity?(activity: PoSessionActivity | undefined): void;
|
|
362
|
+
/**
|
|
363
|
+
* Publishes this session's own summary to the peers that may message it and keeps it on the session's record,
|
|
364
|
+
* so it survives a restart. Trimmed and cut to one short line; undefined or empty clears it. Session mounts only.
|
|
365
|
+
*/
|
|
366
|
+
publishSummary?(summary: string | undefined): void;
|
|
367
|
+
/** Host coordination for this session. Every method refuses a non-coordinator. */
|
|
368
|
+
coordination?: PoSessionCoordination;
|
|
285
369
|
/** Trusted in-process dispatch to an explicitly selected mounted API. No browser authentication is performed here. */
|
|
286
370
|
requestApi?(mount: PoApiMount, basePath: string, request: Request): Promise<Response>;
|
|
287
371
|
/** Present only on a session mounted by an authenticated Desktop host. */
|
|
288
372
|
computerUse?: PoComputerUseSessionAccess;
|
|
373
|
+
/** Desktop's macOS privacy permissions; present on hub mounts only when Desktop hosts this server. */
|
|
374
|
+
desktopPermissions?: {
|
|
375
|
+
/** A `change` asks macOS for a permission and needs the step-up computer-use activation needs. */
|
|
376
|
+
authorize(headers: Headers, change: boolean): boolean;
|
|
377
|
+
/** The permission states, after asking macOS for `permission` when it is set. */
|
|
378
|
+
request(permission?: string): Promise<unknown>;
|
|
379
|
+
};
|
|
289
380
|
/** Deliver a typed method to the channel serving a session this mount reaches, retaining the caller's connection identity. */
|
|
290
381
|
receiveChannel?(sessionId: string, frameType: string, payload: unknown, connectionId: string): boolean;
|
|
291
|
-
/**
|
|
382
|
+
/**
|
|
383
|
+
* Tells connected clients this mount's `name` data changed, so they fetch it again instead of polling.
|
|
384
|
+
* Scoped by the mount: `host:<name>` on the host mount, `workspace:<id>:<name>` on a workspace mount.
|
|
385
|
+
*/
|
|
386
|
+
bumpRevision?(name: string): void;
|
|
387
|
+
/** Sets a live session's undecided approval count on its rail card; 0 clears it. Host mount only. */
|
|
388
|
+
setSessionPendingApprovals?(sessionId: string, count: number): void;
|
|
389
|
+
/** Host-owned replay evidence, supplied only on the host mount. Never exposed to browsers or agents. */
|
|
292
390
|
requestReceipts?: PoRequestReceipts;
|
|
293
|
-
/**
|
|
391
|
+
/** Canonical display names for declared clients, never an authorization directory. */
|
|
392
|
+
clientDevices?: PoClientDeviceRegistry;
|
|
393
|
+
/** One host's per-device media activity, shared across host and session scopes. */
|
|
294
394
|
mediaArbitration?: PoHostMediaArbitration;
|
|
295
395
|
/** One host-wide heavy-job budget, not a separate budget for every session. */
|
|
296
396
|
executionBudget?: PoHostExecutionBudget;
|
|
297
|
-
/** One host-wide edit presence ledger, shared by every session mount. */
|
|
298
|
-
editPresence?: PoEditPresenceLedger;
|
|
299
397
|
/** Paired agents belonging to this host only. */
|
|
300
398
|
peerAgents?: PoPeerAgentRegistry;
|
|
301
|
-
/** Machine-owned Remote Control service, mounted only by Po's own global server plugin. */
|
|
302
|
-
remoteControl?: {
|
|
303
|
-
fetch(request: Request): Promise<Response>;
|
|
304
|
-
};
|
|
305
399
|
/**
|
|
306
400
|
* Publishes a file from this session's cwd or attachments at a short-lived tunnel URL.
|
|
307
401
|
* Session mounts only; rejects with PO_SHARE_FILE_REMOTE_OFF_MESSAGE while remote access is off.
|
|
308
402
|
* The host asks no consent: the caller must obtain it before passing the URL on.
|
|
309
403
|
*/
|
|
310
404
|
shareFile?(path: string, label: string): Promise<PoSharedFile>;
|
|
405
|
+
/** Trusted in-process registered-file admission, separate from ordinary capped shareFile. */
|
|
406
|
+
shareRegisteredFile?(file: PoRegisteredFile): Promise<PoSharedFile>;
|
|
407
|
+
/**
|
|
408
|
+
* This server's loopback origin, such as `http://127.0.0.1:4242`. Throws until the listener is up,
|
|
409
|
+
* so read it when serving a request, not at start.
|
|
410
|
+
*/
|
|
411
|
+
serverOrigin?(): string;
|
|
311
412
|
onNotice(message: string): void;
|
|
312
413
|
}
|
|
414
|
+
/** What a coordinator session may ask its host to do. The host binds it to the calling session. */
|
|
415
|
+
export interface PoSessionCoordination {
|
|
416
|
+
/**
|
|
417
|
+
* Starts a session with no parent link and sends `brief` as its first prompt. Defaults to the caller's workspace.
|
|
418
|
+
* Only a home coordinator may target another admitted, uncoordinated workspace. The hourly limit still applies.
|
|
419
|
+
* A committed creation whose initial prompt failed returns its id and promptError. Never retry creation blindly.
|
|
420
|
+
* `goal` is true when the session took the brief as its goal, false when it read it as an ordinary prompt.
|
|
421
|
+
*/
|
|
422
|
+
startSession(request: {
|
|
423
|
+
name: string;
|
|
424
|
+
brief: string;
|
|
425
|
+
workspaceId?: string;
|
|
426
|
+
}): Promise<{
|
|
427
|
+
sessionId: string;
|
|
428
|
+
promptError?: string;
|
|
429
|
+
goal?: boolean;
|
|
430
|
+
}>;
|
|
431
|
+
}
|
|
432
|
+
/** One accepted WebSocket on a public route. Text frames arrive as strings, binary frames as bytes. */
|
|
433
|
+
export interface PoApiSocket {
|
|
434
|
+
readonly isOpen: boolean;
|
|
435
|
+
send(data: string | Uint8Array): void;
|
|
436
|
+
close(code?: number, reason?: string): void;
|
|
437
|
+
onMessage(listener: (data: string | Uint8Array) => void): void;
|
|
438
|
+
onClose(listener: (code: number, reason: string) => void): void;
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* Routes the host serves without its own token, for a client that holds a package-issued token instead.
|
|
442
|
+
* Global scope only. The host calls `authenticate` before `fetch` or `upgrade` and answers 401 when it
|
|
443
|
+
* returns false, so a handler is never reached unauthenticated. Requests must also come from a loopback
|
|
444
|
+
* peer and Host, carry no Origin or a `chrome-extension://` one, and never arrive through the tunnel.
|
|
445
|
+
*/
|
|
446
|
+
export interface PoApiPublicRoutes {
|
|
447
|
+
/** Path prefixes below the base path, such as `/extension`; each starts with `/`. */
|
|
448
|
+
readonly paths: readonly string[];
|
|
449
|
+
authenticate(request: Request): boolean | Promise<boolean>;
|
|
450
|
+
}
|
|
313
451
|
/**
|
|
314
452
|
* One running surface. The host strips the mount prefix before calling, so
|
|
315
453
|
* routes are declared relative ('/runners/:id/log') and a package never
|
|
316
454
|
* repeats where it was mounted.
|
|
317
455
|
*/
|
|
318
456
|
export interface PoApiHandler {
|
|
319
|
-
|
|
457
|
+
/** The optional member is bound by the host at ingress, never reconstructed from this Request. */
|
|
458
|
+
fetch(request: Request, admittedMember?: PoSessionStarter): Response | Promise<Response>;
|
|
459
|
+
/** Accepts a WebSocket upgrade on a public route; the host has already authenticated it. */
|
|
460
|
+
upgrade?(request: Request, socket: PoApiSocket): void;
|
|
320
461
|
close(): void;
|
|
321
462
|
}
|
|
322
463
|
export interface PoApi {
|
|
323
464
|
/** Segment under /api/plugins/; globally unique across loaded packages. */
|
|
324
465
|
basePath: string;
|
|
466
|
+
/** Routes served without the host token; accepted for host-scope packages only. */
|
|
467
|
+
publicRoutes?: PoApiPublicRoutes;
|
|
325
468
|
start(context: PoApiContext): PoApiHandler;
|
|
326
469
|
}
|
|
327
470
|
//#endregion
|
|
471
|
+
export type { PoFederationCaller };
|
|
328
472
|
//# sourceMappingURL=packageApi.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageApi.d.mts","names":[],"sources":["../../../src/schemas/packageApi.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"packageApi.d.mts","names":["_$__serverScope0.PoServiceContract"],"sources":["../../../src/schemas/packageApi.ts"],"mappings":";;;;;;;;;;iBAyBiB;EACf;EACA;;EAEA;EACA,gBAAgB;;;;;;YAON;qBAEC,wBAAwB;;YAGzB;EACN;;EACA;EAAoB;;EACpB;EAAkB;;;iBAGP;EACf;EACA,OAAO;EACP;EACA;EACA;EACA;;EAEA,iBAAiB,SAAS,eAAe;;EAEzC;;EAEA;;EAEA;EACA;;EAEA;;;;;;iBAOe;EACf;EACA,OAAO;EACP;EACA;EACA;EACA,iBAAiB;;EAEjB;;EAEA;EACA;;EAEA;;;wBAIc,eAAe,OAAO;EAAe;;;YAQzC;EACN;;EACA;EAAoB;;EACpB;EAAkB;EAAqB;;;wBAG7B,kBAAkB,mBAAmB;;qBAexC;;qBAEA;;qBAGA;qBACA;qBACA;;qBAEA;;;;;qBAKA;;;;;qBAKA;qBAEA;YAQD;YACA;YACA;EACN;EAAmB;;EACnB;EAAoB;EAAkB,QAAQ;EAAmB,SAAS;KAE9E,yDAAyD;;wBAqC3C,gBAAgB,SAAS,UAAU;;;;;iBA4BlC;WACN;WACA;WACA;;;wBAIK,qBAAqB,QAAQ,0BAA0B;;wBAUvD,sBAAsB,iBAAiB;;;;;;;;;;iBAgBtC;;WAEN;;;;;EAKT,QAAQ,eAAe,qBAAqB;;EAE5C,KAAK,eAAe,qBAAqB;IAAU;IAAc;;;EAEjE,OAAO;;;iBAIQ;EACf;EACA;EACA;;iBAGe,yBAAyB;EACxC;EACA;EACA;EACA;;iBAGe,oCAAoC;;EAEnD;EACA;EACA;;YAGU;EACN;EAAkB;;EAClB;EAAkB,SAAS;;EAC3B;EAAkB,SAAS;;;iBAGhB;EACf,QAAQ,SAAS,8BAA8B,QAAQ;EACvD,OAAO,KAAK,sBAAsB,QAAQ;EAC1C,OACE,SAAS;IAAwB;IAAe;MAC/C,QAAQ;;;iBAII;;EAEf,eAAe,cAAc;;;iBAId;EACf,QAAQ,SAAS,cAAc,QAAQ;EACvC,eAAe;IAAW;IAAiB;IAAgB;;;;iBAI5C;EACf,SAAS,qBAAqB;EAC9B,UAAU,qBAAqB;;;iBAIhB;EACf,SAAS,mBAAmB;IAAS,MAAM,SAAS,UAAU,QAAQ;KAAa;EACnF,IAAI;IAAsB,MAAM,SAAS,UAAU,QAAQ;IAAW;;;;iBAIvD;;WAEN;;WAEA;;WAEA;WACA;;iBAGM;WACN,OAAO;;WAEP;WACA;;;YAIC,uBAAuB,YAAY,YAAY;;iBAG1C;;EAEf,MAAM,cAAc,OAAO,+BAA+B;EAC1D,OAAO,cAAc,OAAO;EAC5B,OAAO;EACP,eAAe,yBAAyB;EACxC;;qBAGW;qBACA,2BAAyBA,kBAAA;;YAK1B;IACR,oBAAoB;;;;qBAKX;;;;;iBAOI;;EAEf;EACA;EACA;EACA;;EAEA;EACA;;EAEA;;;;;;iBAOe;EACf;EACA;;EAEA,UAAU,eAAe;EACzB,SAAS;;iBAGM;EACf;EACA,QAAQ,QAAQ;;;iBAID;EACf,OAAO;;EAEP;aAA0B;aAA0B;;;EAEpD,gBAAgB;;EAEhB;;;;;EAKA;;EAEA,iBAAiB;;EAEjB;;EAEA;;EAEA,YAAY;;EAEZ;;EAEA,cAAc,SAAS;;EAEvB;;EAEA;;;;;EAKA,mBAAmB;;EAEnB,oBACE,uBACC,QAAQ,oCAAoC;;EAE/C;IAA4B;IAAY;IAAc;IAAc;;;EAEpE;;;;;EAKA,kBAAkB;;EAElB,iBAAiB;;EAEjB,iBAAiB;;EAEjB,uBAAuB;;EAEvB,eAAe;;;;;EAKf,iBAAiB,UAAU;;;;;EAK3B,gBAAgB;;EAEhB,eAAe;;EAEf,YAAY,OAAO,YAAY,kBAAkB,SAAS,UAAU,QAAQ;;EAE5E,cAAc;;EAEd;;IAEE,UAAU,SAAS,SAAS;;IAE5B,QAAQ,sBAAsB;;;EAGhC,gBAAgB,mBAAmB,mBAAmB,kBAAkB;;;;;EAKxE,cAAc;;EAEd,4BAA4B,mBAAmB;;EAE/C,kBAAkB;;EAElB,gBAAgB;;EAEhB,mBAAmB;;EAEnB,kBAAkB;;EAElB,aAAa;;;;;;EAMb,WAAW,cAAc,gBAAgB,QAAQ;;EAEjD,qBAAqB,MAAM,mBAAmB,QAAQ;;;;;EAKtD;EACA,SAAS;;;iBAIM;;;;;;;EAOf,aAAa;IACX;IACA;IACA;MACE;IAAU;IAAmB;IAAsB;;;;iBAIxC;WACN;EACT,KAAK,eAAe;EACpB,MAAM,eAAe;EACrB,UAAU,WAAW,eAAe;EACpC,QAAQ,WAAW,cAAc;;;;;;;;iBASlB;;WAEN;EACT,aAAa,SAAS,oBAAoB;;;;;;;iBAQ3B;;EAEf,MAAM,SAAS,SAAS,iBAAiB,mBAAmB,WAAW,QAAQ;;EAE/E,SAAS,SAAS,SAAS,QAAQ;EACnC;;iBAGe;;EAEf;;EAEA,eAAe;EACf,MAAM,SAAS,eAAe"}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
+
import { defineServiceContract } from "./serverScope.mjs";
|
|
1
2
|
//#region src/schemas/packageApi.ts
|
|
2
3
|
const PO_API_SCOPES = [
|
|
3
|
-
"
|
|
4
|
+
"host",
|
|
4
5
|
"workspace",
|
|
5
6
|
"session"
|
|
6
7
|
];
|
|
7
8
|
/** Canonical public prefix. Scope selection never falls through to a parent. */
|
|
8
9
|
function poApiMountPath(mount) {
|
|
9
|
-
if (mount.scope === "
|
|
10
|
+
if (mount.scope === "host") return "/api/plugins";
|
|
10
11
|
if (mount.scope === "workspace") return `/api/workspaces/${encodeURIComponent(mount.workspaceId)}/plugins`;
|
|
11
12
|
if (!mount.workspaceId) throw new Error("A session API path requires its workspace identity.");
|
|
12
13
|
return `/api/workspaces/${encodeURIComponent(mount.workspaceId)}/sessions/${encodeURIComponent(mount.sessionId)}/plugins`;
|
|
13
14
|
}
|
|
14
15
|
/** Only canonical resource paths may select a protocol listener. */
|
|
15
16
|
function parsePoSocketPath(pathname) {
|
|
16
|
-
if (pathname === "/api/ws") return { scope: "
|
|
17
|
+
if (pathname === "/api/ws") return { scope: "host" };
|
|
17
18
|
const match = /^\/api\/workspaces\/([^/]+)(?:\/sessions\/([^/]+))?\/ws$/u.exec(pathname);
|
|
18
19
|
if (!match) return void 0;
|
|
19
20
|
try {
|
|
@@ -38,29 +39,90 @@ const PO_HUB_API_SESSION_QUERY_PARAM = "hubSession";
|
|
|
38
39
|
const PO_API_CALLER_LOCALITY_HEADER = "x-po-api-caller-locality";
|
|
39
40
|
const PO_API_CALLER_DEVICE_ID_HEADER = "x-po-api-caller-device-id";
|
|
40
41
|
const PO_API_CALLER_STEP_UP_HEADER = "x-po-api-caller-step-up";
|
|
42
|
+
/** Set only after destination verification, never accepted from an untrusted proxy. */
|
|
43
|
+
const PO_API_CALLER_FEDERATION_HEADER = "x-po-api-caller-federation";
|
|
44
|
+
/**
|
|
45
|
+
* What a remote caller is on this host: `owner` administers it, `member` belongs to its team and reaches only the
|
|
46
|
+
* sessions they own or were given. Written by the remote runtime for every request it forwards.
|
|
47
|
+
*/
|
|
48
|
+
const PO_API_CALLER_ACCESS_HEADER = "x-po-api-caller-access";
|
|
49
|
+
/**
|
|
50
|
+
* The socket peer of a request to a package's public route. The Node server always overwrites it, so a package may key
|
|
51
|
+
* a rate limit on it; no client value survives.
|
|
52
|
+
*/
|
|
53
|
+
const PO_API_PEER_ADDRESS_HEADER = "x-po-api-peer-address";
|
|
41
54
|
const PO_API_CALLER_HEADERS = [
|
|
42
55
|
PO_API_CALLER_LOCALITY_HEADER,
|
|
43
56
|
PO_API_CALLER_DEVICE_ID_HEADER,
|
|
44
|
-
PO_API_CALLER_STEP_UP_HEADER
|
|
57
|
+
PO_API_CALLER_STEP_UP_HEADER,
|
|
58
|
+
PO_API_CALLER_FEDERATION_HEADER,
|
|
59
|
+
PO_API_CALLER_ACCESS_HEADER
|
|
45
60
|
];
|
|
61
|
+
function federationCallerFrom(headers) {
|
|
62
|
+
const raw = headers.get(PO_API_CALLER_FEDERATION_HEADER);
|
|
63
|
+
if (raw === null) return void 0;
|
|
64
|
+
try {
|
|
65
|
+
const value = JSON.parse(raw);
|
|
66
|
+
if (typeof value.principal?.issuer !== "string" || !value.principal.issuer || typeof value.principal.subject !== "string" || !value.principal.subject || typeof value.org !== "string" || !value.org || typeof value.device?.keyId !== "string" || !value.device.keyId || value.via !== void 0 && (typeof value.via.callingHostId !== "string" || !value.via.callingHostId || typeof value.via.grantId !== "string" || !value.via.grantId)) return void 0;
|
|
67
|
+
return {
|
|
68
|
+
principal: {
|
|
69
|
+
issuer: value.principal.issuer,
|
|
70
|
+
subject: value.principal.subject
|
|
71
|
+
},
|
|
72
|
+
org: value.org,
|
|
73
|
+
device: { keyId: value.device.keyId },
|
|
74
|
+
...value.via ? { via: { ...value.via } } : {}
|
|
75
|
+
};
|
|
76
|
+
} catch {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
46
80
|
/** Reads the proxy-authenticated caller identity, rejecting partial or contradictory stamps. */
|
|
47
81
|
function poApiCallerFrom(headers) {
|
|
82
|
+
const federation = federationCallerFrom(headers);
|
|
83
|
+
if (headers.has("x-po-api-caller-federation") && !federation) return void 0;
|
|
48
84
|
const locality = headers.get(PO_API_CALLER_LOCALITY_HEADER);
|
|
49
85
|
const deviceId = headers.get(PO_API_CALLER_DEVICE_ID_HEADER);
|
|
50
86
|
const stepUp = headers.get(PO_API_CALLER_STEP_UP_HEADER);
|
|
51
|
-
|
|
87
|
+
const access = headers.get(PO_API_CALLER_ACCESS_HEADER);
|
|
88
|
+
if (locality === "local") return deviceId === null && stepUp === "not-required" && !federation && access === null ? {
|
|
52
89
|
locality,
|
|
53
90
|
stepUp
|
|
54
91
|
} : void 0;
|
|
55
|
-
if (locality === "remote" && deviceId !== null && deviceId !== "" && (stepUp === "not-required" || stepUp === "verified" || stepUp === "unavailable")) return {
|
|
92
|
+
if (locality === "remote" && deviceId !== null && deviceId !== "" && (stepUp === "not-required" || stepUp === "verified" || stepUp === "unavailable") && (access === null || access === "owner" || access === "member")) return {
|
|
56
93
|
locality,
|
|
57
94
|
deviceId,
|
|
58
|
-
stepUp
|
|
95
|
+
stepUp,
|
|
96
|
+
...access === null ? {} : { access },
|
|
97
|
+
...federation
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/** The starter a verified caller names; undefined when the caller carries no principal. */
|
|
101
|
+
function poSessionStarterFrom(caller) {
|
|
102
|
+
if (!caller?.principal) return void 0;
|
|
103
|
+
return {
|
|
104
|
+
issuer: caller.principal.issuer,
|
|
105
|
+
subject: caller.principal.subject,
|
|
106
|
+
...caller.org ? { org: caller.org } : {}
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
/** A starter read back from storage, or undefined when the value is not one. */
|
|
110
|
+
function parsePoSessionStarter(value) {
|
|
111
|
+
if (typeof value !== "object" || value === null) return void 0;
|
|
112
|
+
const { issuer, subject, org } = value;
|
|
113
|
+
if (typeof issuer !== "string" || !issuer || typeof subject !== "string" || !subject) return void 0;
|
|
114
|
+
if (org !== void 0 && (typeof org !== "string" || !org)) return void 0;
|
|
115
|
+
return {
|
|
116
|
+
issuer,
|
|
117
|
+
subject,
|
|
118
|
+
...org === void 0 ? {} : { org }
|
|
59
119
|
};
|
|
60
120
|
}
|
|
121
|
+
const PO_EDIT_PRESENCE_SERVICE = "po/edit-presence";
|
|
122
|
+
const PO_EDIT_PRESENCE_CONTRACT = defineServiceContract(PO_EDIT_PRESENCE_SERVICE, { scope: "workspace" });
|
|
61
123
|
/** Why shareFile rejects while the host has no public tunnel origin. */
|
|
62
124
|
const PO_SHARE_FILE_REMOTE_OFF_MESSAGE = "Remote access is off, so Po cannot share files with remote MCP servers. Turn it on and retry.";
|
|
63
125
|
//#endregion
|
|
64
|
-
export { PO_API_CALLER_DEVICE_ID_HEADER, PO_API_CALLER_HEADERS, PO_API_CALLER_LOCALITY_HEADER, PO_API_CALLER_STEP_UP_HEADER, PO_API_ROUTE_PREFIX, PO_API_SCOPES, PO_HUB_API_SESSION_QUERY_PARAM, PO_SHARE_FILE_REMOTE_OFF_MESSAGE, parsePoSocketPath, poApiCallerFrom, poApiMountPath };
|
|
126
|
+
export { PO_API_CALLER_ACCESS_HEADER, PO_API_CALLER_DEVICE_ID_HEADER, PO_API_CALLER_FEDERATION_HEADER, PO_API_CALLER_HEADERS, PO_API_CALLER_LOCALITY_HEADER, PO_API_CALLER_STEP_UP_HEADER, PO_API_PEER_ADDRESS_HEADER, PO_API_ROUTE_PREFIX, PO_API_SCOPES, PO_EDIT_PRESENCE_CONTRACT, PO_EDIT_PRESENCE_SERVICE, PO_HUB_API_SESSION_QUERY_PARAM, PO_SHARE_FILE_REMOTE_OFF_MESSAGE, parsePoSessionStarter, parsePoSocketPath, poApiCallerFrom, poApiMountPath, poSessionStarterFrom };
|
|
65
127
|
|
|
66
128
|
//# sourceMappingURL=packageApi.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageApi.mjs","names":[],"sources":["../../../src/schemas/packageApi.ts"],"sourcesContent":["/**\n * The HTTP surface a package offers its host.\n *\n * A server plugin registers one with its host. The host mounts it under the API\n * route prefix, and the package writes routes relative to that mount.\n *\n * The handler is a plain fetch callback so no host and no package is committed\n * to one HTTP framework; a Hono app satisfies it through `app.fetch`.\n */\n\nimport type {\n PoComputerUseSessionAccess,\n PoDirectEventBus,\n PoHubSessionService,\n PoSessionCommunicationEndpoint,\n PoSessionActivity,\n PoSessionContext,\n} from './hubChannel';\nimport type { PoMcpProjection } from './mcpProjection';\nimport type { PoSessionStorageService } from './platform';\n/** The host-owned sync view a repository-scoped package API may inspect. */\nexport interface PoRepositorySyncView {\n fresh: boolean;\n reasons: string[];\n /** True while a background sync that may prepare what `reasons` names is running. */\n syncing?: boolean;\n mcpProjection?: PoMcpProjection;\n}\n\n/** Where an API runs: inside one session's server, or in the machine-wide hub. */\nexport type PoApiScope = 'global' | 'workspace' | 'session';\n\nexport const PO_API_SCOPES: readonly PoApiScope[] = ['global', 'workspace', 'session'];\n\n/** Identity of an independently mounted plugin host. */\nexport type PoApiMount =\n | { scope: 'global' }\n | { scope: 'workspace'; workspaceId: string }\n | { scope: 'session'; sessionId: string };\n\n/** Immutable browser contribution generation paired with a server mount. */\nexport interface PoWebComposition {\n id: string;\n scope: PoApiScope;\n revision: number;\n manifestUrl: string;\n rawAssetBaseUrl: string;\n verifiedAssetBaseUrl: string;\n /** `[slot, entry]` for each of this mount's plugin copies, the entry an absolute path below the asset prefixes. */\n pluginEntries: [string, string][];\n /** Every signed file this mount's slots can load, absolute below the asset prefixes. */\n assetPaths: string[];\n /** Per-plugin stylesheets of this mount's plugins only, so other mounts' classes never apply here. */\n stylePaths: string[];\n channels: string[];\n /** The slots resolved for this mount; the shared build may hold more. */\n plugins: string[];\n}\n\n/**\n * Immutable native contribution generation paired with a server mount. One signed CommonJS module at\n * `entryPath`, served through the same immutable plugin routes as web compositions.\n */\nexport interface PoNativeComposition {\n id: string;\n scope: PoApiScope;\n revision: number;\n manifestUrl: string;\n rawAssetBaseUrl: string;\n /** Always `/composition.js`. */\n entryPath: string;\n channels: string[];\n /** The `poNative.pluginId` values resolved for this mount; the shell installs only these. */\n plugins: string[];\n}\n\n/** Canonical public prefix. Scope selection never falls through to a parent. */\nexport function poApiMountPath(mount: PoApiMount & { workspaceId?: string }): string {\n if (mount.scope === 'global') return '/api/plugins';\n if (mount.scope === 'workspace') return `/api/workspaces/${encodeURIComponent(mount.workspaceId)}/plugins`;\n if (!mount.workspaceId) throw new Error('A session API path requires its workspace identity.');\n return `/api/workspaces/${encodeURIComponent(mount.workspaceId)}/sessions/${encodeURIComponent(mount.sessionId)}/plugins`;\n}\n\n/** Scope addressed by a public WebSocket upgrade. */\nexport type PoSocketMount =\n | { scope: 'global' }\n | { scope: 'workspace'; workspaceId: string }\n | { scope: 'session'; workspaceId: string; sessionId: string };\n\n/** Only canonical resource paths may select a protocol listener. */\nexport function parsePoSocketPath(pathname: string): PoSocketMount | undefined {\n if (pathname === '/api/ws') return { scope: 'global' };\n const match = /^\\/api\\/workspaces\\/([^/]+)(?:\\/sessions\\/([^/]+))?\\/ws$/u.exec(pathname);\n if (!match) return undefined;\n try {\n const workspaceId = decodeURIComponent(match[1]);\n return match[2] === undefined\n ? { scope: 'workspace', workspaceId }\n : { scope: 'session', workspaceId, sessionId: decodeURIComponent(match[2]) };\n } catch {\n return undefined;\n }\n}\n\n/** The segment an API is mounted under, below this prefix. */\nexport const PO_API_ROUTE_PREFIX = '/api/plugins';\n/** Selects the hub API bundle that owns the named cockpit session. */\nexport const PO_HUB_API_SESSION_QUERY_PARAM = 'hubSession';\n\n/** Trusted caller headers written only by the cockpit-to-session proxy. */\nexport const PO_API_CALLER_LOCALITY_HEADER = 'x-po-api-caller-locality';\nexport const PO_API_CALLER_DEVICE_ID_HEADER = 'x-po-api-caller-device-id';\nexport const PO_API_CALLER_STEP_UP_HEADER = 'x-po-api-caller-step-up';\nexport const PO_API_CALLER_HEADERS = [\n PO_API_CALLER_LOCALITY_HEADER,\n PO_API_CALLER_DEVICE_ID_HEADER,\n PO_API_CALLER_STEP_UP_HEADER,\n] as const;\n\nexport type PoApiCallerStepUp = 'not-required' | 'verified' | 'unavailable';\nexport type PoApiCaller =\n | { locality: 'local'; stepUp: 'not-required' }\n | { locality: 'remote'; deviceId: string; stepUp: PoApiCallerStepUp };\n\n/** Reads the proxy-authenticated caller identity, rejecting partial or contradictory stamps. */\nexport function poApiCallerFrom(headers: Headers): PoApiCaller | undefined {\n const locality = headers.get(PO_API_CALLER_LOCALITY_HEADER);\n const deviceId = headers.get(PO_API_CALLER_DEVICE_ID_HEADER);\n const stepUp = headers.get(PO_API_CALLER_STEP_UP_HEADER);\n if (locality === 'local') {\n return deviceId === null && stepUp === 'not-required' ? { locality, stepUp } : undefined;\n }\n if (\n locality === 'remote' &&\n deviceId !== null &&\n deviceId !== '' &&\n (stepUp === 'not-required' || stepUp === 'verified' || stepUp === 'unavailable')\n ) {\n return { locality, deviceId, stepUp };\n }\n return undefined;\n}\n/**\n * A browser-reachable OAuth redirect the host serves on its own listener.\n *\n * A package brokering third-party OAuth cannot use a loopback redirect when the\n * operator's browser is on another machine: `127.0.0.1` resolves to whichever\n * machine the browser runs on. The host owns a listener that is reachable from\n * wherever the cockpit is being used, so it lends that instead of the package\n * opening a port of its own.\n */\nexport interface PoOAuthRedirect {\n /** Absolute URL to register as the redirect target, already origin-correct. */\n readonly redirectUri: string;\n /**\n * Accept redirects carrying this state. Must complete before the\n * authorization URL is surfaced, or the redirect races its own reservation.\n */\n reserve(state: string, timeoutMs?: number): Promise<void>;\n /** Resolves once the redirect carrying this state arrives. */\n wait(state: string, timeoutMs?: number): Promise<{ code: string; state: string }>;\n /** Drops a reservation whose flow ended without a redirect. */\n cancel(state: string): void;\n}\n\n/** An exact, host-owned receipt address. Provider IDs are not event cursor positions. */\nexport interface PoRequestReceiptKey {\n namespace: string;\n activationId: string;\n requestId: string;\n}\n\nexport interface PoRequestReceipt extends PoRequestReceiptKey {\n fingerprint: string;\n destination: string;\n transactionId: string;\n outcome: 'reserved' | 'admitted' | 'rejected' | 'uncertain';\n}\n\nexport interface PoRequestReceiptReservation extends PoRequestReceiptKey {\n /** Lowercase SHA-256 of the authoritative request text, never the full transcript. */\n fingerprint: string;\n destination: string;\n transactionId: string;\n}\n\nexport type PoRequestReceiptReserveResult =\n | { kind: 'reserved'; token: string }\n | { kind: 'existing'; receipt: PoRequestReceipt }\n | { kind: 'conflict'; receipt: PoRequestReceipt };\n\n/** A global-only receipt capability. A reservation is not an execution receipt. */\nexport interface PoRequestReceipts {\n reserve(request: PoRequestReceiptReservation): Promise<PoRequestReceiptReserveResult>;\n lookup(key: PoRequestReceiptKey): Promise<PoRequestReceipt | undefined>;\n finish(\n request: PoRequestReceiptKey & { token: string; outcome: 'admitted' | 'rejected' | 'uncertain' },\n ): Promise<PoRequestReceipt>;\n}\n\n/** Permit returned for expensive local work. Calling it releases the slot. */\nexport interface PoHostExecutionPermit {\n (): void;\n attachProcess?(pid: number): Promise<void>;\n}\n\n/** Host-wide admission for expensive local work. Release only after the owned process exits. */\nexport interface PoHostExecutionBudget {\n acquire(signal?: AbortSignal): Promise<PoHostExecutionPermit>;\n getSnapshot(): Readonly<{ running: number; queued: number; limit: number }>;\n}\n\n/** Synchronous host-owned exclusion across media APIs mounted at different scopes. */\nexport interface PoHostMediaArbitration {\n register(busy: () => boolean): () => void;\n available(busy: () => boolean): boolean;\n}\n\n/** One host's paired agent registrations, shared across its global and session mounts. */\nexport interface PoPeerAgentRegistry {\n register(sessionId: string, agent: { fetch(request: Request): Promise<Response> }, hubToken: string): () => void;\n get(sessionId: string): { fetch(request: Request): Promise<Response>; hubToken: string } | undefined;\n}\n\n/** One agent that edits files: a hub session or an in-process child run. */\nexport interface PoEditPresenceAgent {\n /** `session:<id>` or `run:<runId>`. Unique across the host. */\n readonly key: string;\n /** Read when a note is rendered, so a name registered after the edit still shows. */\n readonly label: () => string;\n /** Hub session id other agents can reach with intercom. */\n readonly contact: string;\n readonly isLive: () => boolean;\n}\n\nexport interface PoEditPresenceEntry {\n readonly agent: PoEditPresenceAgent;\n /** `@file` tag of the bytes this agent's last successful edit or write left behind. */\n readonly tag: string;\n readonly at: number;\n}\n\n/**\n * Host-wide record of the last edit each live agent made to a file, keyed by realpath then agent key.\n * Owners delete their entries when they dispose, so no callback outlives its session or run.\n */\nexport type PoEditPresenceLedger = Map<string, Map<string, PoEditPresenceEntry>>;\n\n/** Why shareFile rejects while the host has no public tunnel origin. */\nexport const PO_SHARE_FILE_REMOTE_OFF_MESSAGE =\n 'Remote access is off, so Po cannot share files with remote MCP servers. Turn it on and retry.';\n\n/**\n * A file published at a short-lived public tunnel URL: 10 minutes, 3 downloads, and gone\n * when the tunnel revision changes. Call revoke as soon as the consumer is done with it.\n */\nexport interface PoSharedFile {\n /** Bearer link; never log or persist it. */\n url: string;\n fileName: string;\n mimeType: string;\n size: number;\n /** Expiry as epoch milliseconds. */\n expiresAt: number;\n maxDownloads: number;\n /** Idempotent. */\n revoke(): void;\n}\n\n/** What the host tells an API about itself when it starts. */\nexport interface PoApiContext {\n scope: PoApiScope;\n /** Stable, opaque workspace id, shared by every session and member checkout of the workspace. */\n workspaceId?: string;\n /**\n * The admitted workspace root for a workspace mount. For a session mount it is the checkout\n * the session runs in; read sessionContext for both roots. Absent from global mounts.\n */\n workspaceRoot?: string;\n /** The session's baseline context; present on session mounts whose host knows its workspace. */\n sessionContext?: PoSessionContext;\n /** Explicit host home, never selected by a remote request. */\n homeDirectory?: string;\n /** The session this host serves; absent for a hub-scoped API. */\n sessionId?: string;\n /** The session's working directory; absent for a hub-scoped API. */\n cwd?: string;\n /** Session environment admitted by the server, never supplied by remote clients. */\n environment?: Readonly<Record<string, string | undefined>>;\n /** Shared only with child processes in this session, never with remote API clients. */\n internalToken?: string;\n /** Shared only with the cockpit hub for privileged cross-session coordination. */\n hubToken?: string;\n /**\n * Resolves a hub-issued opaque repository id to an admitted canonical root.\n * Hub APIs must never accept a browser-supplied filesystem path instead.\n */\n resolveRepository?(repositoryId: string): string | undefined;\n /** Reads the admitted repository's sync projection without exposing its state path. */\n readRepositorySync?(\n repositoryId: string,\n ): Promise<PoRepositorySyncView | undefined> | PoRepositorySyncView | undefined;\n /** Admitted workspaces available to this mount. */\n repositories?(): readonly { id: string; name: string; path: string; active: boolean }[];\n /** Publish a successful config write to the owning mount's refresh lifecycle. */\n configurationChanged?(): void;\n /**\n * Borrows the hub's OAuth redirect surface. Undefined when the hub cannot\n * currently serve one, in which case the package keeps its own behaviour.\n */\n oauthRedirect?(): PoOAuthRedirect | undefined;\n /** Canonical in-process lifecycle for sessions created by this host. */\n sessionService?: PoHubSessionService;\n /** Trusted in-process storage capability. APIs must retain their mount's session authorization. */\n sessionStorage?: PoSessionStorageService;\n /** Host-bound, authenticated inter-session event endpoint for this session. */\n sessionCommunication?: PoSessionCommunicationEndpoint;\n /** Same-process events shared by session APIs and hub channels. */\n directEvents?: PoDirectEventBus;\n /**\n * Publishes this session's activity line to every page's rail; undefined clears it.\n * Session mounts only. The last publisher wins.\n */\n publishActivity?(activity: PoSessionActivity | undefined): void;\n /** Trusted in-process dispatch to an explicitly selected mounted API. No browser authentication is performed here. */\n requestApi?(mount: PoApiMount, basePath: string, request: Request): Promise<Response>;\n /** Present only on a session mounted by an authenticated Desktop host. */\n computerUse?: PoComputerUseSessionAccess;\n /** Deliver a typed method to the channel serving a session this mount reaches, retaining the caller's connection identity. */\n receiveChannel?(sessionId: string, frameType: string, payload: unknown, connectionId: string): boolean;\n /** Host-owned replay evidence, supplied only on the global mount. Never exposed to browsers or agents. */\n requestReceipts?: PoRequestReceipts;\n /** One host's exclusive media activity, shared across global and session scopes. */\n mediaArbitration?: PoHostMediaArbitration;\n /** One host-wide heavy-job budget, not a separate budget for every session. */\n executionBudget?: PoHostExecutionBudget;\n /** One host-wide edit presence ledger, shared by every session mount. */\n editPresence?: PoEditPresenceLedger;\n /** Paired agents belonging to this host only. */\n peerAgents?: PoPeerAgentRegistry;\n /** Machine-owned Remote Control service, mounted only by Po's own global server plugin. */\n remoteControl?: { fetch(request: Request): Promise<Response> };\n /**\n * Publishes a file from this session's cwd or attachments at a short-lived tunnel URL.\n * Session mounts only; rejects with PO_SHARE_FILE_REMOTE_OFF_MESSAGE while remote access is off.\n * The host asks no consent: the caller must obtain it before passing the URL on.\n */\n shareFile?(path: string, label: string): Promise<PoSharedFile>;\n onNotice(message: string): void;\n}\n\n/**\n * One running surface. The host strips the mount prefix before calling, so\n * routes are declared relative ('/runners/:id/log') and a package never\n * repeats where it was mounted.\n */\nexport interface PoApiHandler {\n fetch(request: Request): Response | Promise<Response>;\n close(): void;\n}\n\nexport interface PoApi {\n /** Segment under /api/plugins/; globally unique across loaded packages. */\n basePath: string;\n start(context: PoApiContext): PoApiHandler;\n}\n"],"mappings":";AAgCA,MAAa,gBAAuC;CAAC;CAAU;CAAa;AAAS;;AA6CrF,SAAgB,eAAe,OAAsD;CACnF,IAAI,MAAM,UAAU,UAAU,OAAO;CACrC,IAAI,MAAM,UAAU,aAAa,OAAO,mBAAmB,mBAAmB,MAAM,WAAW,EAAE;CACjG,IAAI,CAAC,MAAM,aAAa,MAAM,IAAI,MAAM,qDAAqD;CAC7F,OAAO,mBAAmB,mBAAmB,MAAM,WAAW,EAAE,YAAY,mBAAmB,MAAM,SAAS,EAAE;AAClH;;AASA,SAAgB,kBAAkB,UAA6C;CAC7E,IAAI,aAAa,WAAW,OAAO,EAAE,OAAO,SAAS;CACrD,MAAM,QAAQ,4DAA4D,KAAK,QAAQ;CACvF,IAAI,CAAC,OAAO,OAAO,KAAA;CACnB,IAAI;EACF,MAAM,cAAc,mBAAmB,MAAM,EAAE;EAC/C,OAAO,MAAM,OAAO,KAAA,IAChB;GAAE,OAAO;GAAa;EAAY,IAClC;GAAE,OAAO;GAAW;GAAa,WAAW,mBAAmB,MAAM,EAAE;EAAE;CAC/E,QAAQ;EACN;CACF;AACF;;AAGA,MAAa,sBAAsB;;AAEnC,MAAa,iCAAiC;;AAG9C,MAAa,gCAAgC;AAC7C,MAAa,iCAAiC;AAC9C,MAAa,+BAA+B;AAC5C,MAAa,wBAAwB;CACnC;CACA;CACA;AACF;;AAQA,SAAgB,gBAAgB,SAA2C;CACzE,MAAM,WAAW,QAAQ,IAAI,6BAA6B;CAC1D,MAAM,WAAW,QAAQ,IAAI,8BAA8B;CAC3D,MAAM,SAAS,QAAQ,IAAI,4BAA4B;CACvD,IAAI,aAAa,SACf,OAAO,aAAa,QAAQ,WAAW,iBAAiB;EAAE;EAAU;CAAO,IAAI,KAAA;CAEjF,IACE,aAAa,YACb,aAAa,QACb,aAAa,OACZ,WAAW,kBAAkB,WAAW,cAAc,WAAW,gBAElE,OAAO;EAAE;EAAU;EAAU;CAAO;AAGxC;;AA4GA,MAAa,mCACX"}
|
|
1
|
+
{"version":3,"file":"packageApi.mjs","names":[],"sources":["../../../src/schemas/packageApi.ts"],"sourcesContent":["/**\n * The HTTP surface a package offers its host.\n *\n * A server plugin registers one with its host. The host mounts it under the API\n * route prefix, and the package writes routes relative to that mount.\n *\n * The handler is a plain fetch callback so no host and no package is committed\n * to one HTTP framework; a Hono app satisfies it through `app.fetch`.\n */\n\nimport type { PoClientPluginInventory } from './brain';\nimport type { PoClientDeviceRegistry } from './clientDevices';\nimport type {\n PoComputerUseSessionAccess,\n PoDirectEventBus,\n PoHubSessionService,\n PoSessionCommunicationEndpoint,\n PoSessionActivity,\n PoSessionContext,\n} from './hubChannel';\nimport type { LocaleCatalog } from './locale';\nimport type { PoMcpProjection } from './mcpProjection';\nimport type { PoSessionStorageService } from './platform';\nimport { defineServiceContract } from './serverScope';\n/** The host-owned sync view a repository-scoped package API may inspect. */\nexport interface PoRepositorySyncView {\n fresh: boolean;\n reasons: string[];\n /** True while a background sync that may prepare what `reasons` names is running. */\n syncing?: boolean;\n mcpProjection?: PoMcpProjection;\n}\n\n/**\n * Where an API runs: inside one session's server, one workspace, or the machine-wide host.\n * The multi-host global tier has no server scope; it is account data joined in the apps.\n */\nexport type PoApiScope = 'host' | 'workspace' | 'session';\n\nexport const PO_API_SCOPES: readonly PoApiScope[] = ['host', 'workspace', 'session'];\n\n/** Identity of an independently mounted plugin host. */\nexport type PoApiMount =\n | { scope: 'host' }\n | { scope: 'workspace'; workspaceId: string }\n | { scope: 'session'; sessionId: string };\n\n/** Immutable browser contribution generation paired with a server mount. */\nexport interface PoWebComposition {\n id: string;\n scope: PoApiScope;\n revision: number;\n manifestUrl: string;\n rawAssetBaseUrl: string;\n verifiedAssetBaseUrl: string;\n /** Host-composition messages, absent on legacy hosts. Language labels still come from plugins. */\n localeCatalogs?: Readonly<Record<string, LocaleCatalog>>;\n /** `[slot, entry]` for each of this mount's plugin copies, the entry an absolute path below the asset prefixes. */\n pluginEntries: [string, string][];\n /** Every signed file this mount's slots can load, absolute below the asset prefixes. */\n assetPaths: string[];\n /** Per-plugin stylesheets of this mount's plugins only, so other mounts' classes never apply here. */\n stylePaths: string[];\n channels: string[];\n /** The slots resolved for this mount; the shared build may hold more. */\n plugins: string[];\n}\n\n/**\n * Immutable native contribution generation paired with a server mount. One signed CommonJS module per\n * plugin, served through the same immutable plugin routes as web compositions.\n */\nexport interface PoNativeComposition {\n id: string;\n scope: PoApiScope;\n revision: number;\n manifestUrl: string;\n rawAssetBaseUrl: string;\n localeCatalogs?: PoWebComposition['localeCatalogs'];\n /** `[pluginId, modulePath]` for each plugin of this mount that built; the shell loads each on its own. */\n pluginEntries: [string, string][];\n /** Shared host UI entry in the same signed generation; absent on legacy hosts. */\n uiEntry?: string;\n channels: string[];\n /** The `poNative.pluginId` values resolved for this mount; the shell installs only these. */\n plugins: string[];\n}\n\n/** Canonical public prefix. Scope selection never falls through to a parent. */\nexport function poApiMountPath(mount: PoApiMount & { workspaceId?: string }): string {\n if (mount.scope === 'host') return '/api/plugins';\n if (mount.scope === 'workspace') return `/api/workspaces/${encodeURIComponent(mount.workspaceId)}/plugins`;\n if (!mount.workspaceId) throw new Error('A session API path requires its workspace identity.');\n return `/api/workspaces/${encodeURIComponent(mount.workspaceId)}/sessions/${encodeURIComponent(mount.sessionId)}/plugins`;\n}\n\n/** Scope addressed by a public WebSocket upgrade. */\nexport type PoSocketMount =\n | { scope: 'host' }\n | { scope: 'workspace'; workspaceId: string }\n | { scope: 'session'; workspaceId: string; sessionId: string };\n\n/** Only canonical resource paths may select a protocol listener. */\nexport function parsePoSocketPath(pathname: string): PoSocketMount | undefined {\n if (pathname === '/api/ws') return { scope: 'host' };\n const match = /^\\/api\\/workspaces\\/([^/]+)(?:\\/sessions\\/([^/]+))?\\/ws$/u.exec(pathname);\n if (!match) return undefined;\n try {\n const workspaceId = decodeURIComponent(match[1]);\n return match[2] === undefined\n ? { scope: 'workspace', workspaceId }\n : { scope: 'session', workspaceId, sessionId: decodeURIComponent(match[2]) };\n } catch {\n return undefined;\n }\n}\n\n/** The segment an API is mounted under, below this prefix. */\nexport const PO_API_ROUTE_PREFIX = '/api/plugins';\n/** Selects the hub API bundle that owns the named cockpit session. */\nexport const PO_HUB_API_SESSION_QUERY_PARAM = 'hubSession';\n\n/** Trusted caller headers written only by the cockpit-to-session proxy. */\nexport const PO_API_CALLER_LOCALITY_HEADER = 'x-po-api-caller-locality';\nexport const PO_API_CALLER_DEVICE_ID_HEADER = 'x-po-api-caller-device-id';\nexport const PO_API_CALLER_STEP_UP_HEADER = 'x-po-api-caller-step-up';\n/** Set only after destination verification, never accepted from an untrusted proxy. */\nexport const PO_API_CALLER_FEDERATION_HEADER = 'x-po-api-caller-federation';\n/**\n * What a remote caller is on this host: `owner` administers it, `member` belongs to its team and reaches only the\n * sessions they own or were given. Written by the remote runtime for every request it forwards.\n */\nexport const PO_API_CALLER_ACCESS_HEADER = 'x-po-api-caller-access';\n/**\n * The socket peer of a request to a package's public route. The Node server always overwrites it, so a package may key\n * a rate limit on it; no client value survives.\n */\nexport const PO_API_PEER_ADDRESS_HEADER = 'x-po-api-peer-address';\nexport type { FederationCaller as PoFederationCaller } from '@agimon-ai/po-web-security/deviceProof';\nexport const PO_API_CALLER_HEADERS = [\n PO_API_CALLER_LOCALITY_HEADER,\n PO_API_CALLER_DEVICE_ID_HEADER,\n PO_API_CALLER_STEP_UP_HEADER,\n PO_API_CALLER_FEDERATION_HEADER,\n PO_API_CALLER_ACCESS_HEADER,\n] as const;\n\nexport type PoApiCallerStepUp = 'not-required' | 'verified' | 'unavailable';\nexport type PoApiCallerAccess = 'owner' | 'member';\nexport type PoApiCaller = (\n | { locality: 'local'; stepUp: 'not-required' }\n | { locality: 'remote'; deviceId: string; stepUp: PoApiCallerStepUp; access?: PoApiCallerAccess }\n) &\n Partial<import('@agimon-ai/po-web-security/deviceProof').FederationCaller>;\n\nfunction federationCallerFrom(\n headers: Headers,\n): import('@agimon-ai/po-web-security/deviceProof').FederationCaller | undefined {\n const raw = headers.get(PO_API_CALLER_FEDERATION_HEADER);\n if (raw === null) return undefined;\n try {\n const value = JSON.parse(raw) as import('@agimon-ai/po-web-security/deviceProof').FederationCaller;\n if (\n typeof value.principal?.issuer !== 'string' ||\n !value.principal.issuer ||\n typeof value.principal.subject !== 'string' ||\n !value.principal.subject ||\n typeof value.org !== 'string' ||\n !value.org ||\n typeof value.device?.keyId !== 'string' ||\n !value.device.keyId ||\n (value.via !== undefined &&\n (typeof value.via.callingHostId !== 'string' ||\n !value.via.callingHostId ||\n typeof value.via.grantId !== 'string' ||\n !value.via.grantId))\n )\n return undefined;\n return {\n principal: { issuer: value.principal.issuer, subject: value.principal.subject },\n org: value.org,\n device: { keyId: value.device.keyId },\n ...(value.via ? { via: { ...value.via } } : {}),\n };\n } catch {\n return undefined;\n }\n}\n\n/** Reads the proxy-authenticated caller identity, rejecting partial or contradictory stamps. */\nexport function poApiCallerFrom(headers: Headers): PoApiCaller | undefined {\n const federation = federationCallerFrom(headers);\n if (headers.has(PO_API_CALLER_FEDERATION_HEADER) && !federation) return undefined;\n const locality = headers.get(PO_API_CALLER_LOCALITY_HEADER);\n const deviceId = headers.get(PO_API_CALLER_DEVICE_ID_HEADER);\n const stepUp = headers.get(PO_API_CALLER_STEP_UP_HEADER);\n const access = headers.get(PO_API_CALLER_ACCESS_HEADER);\n if (locality === 'local') {\n return deviceId === null && stepUp === 'not-required' && !federation && access === null\n ? { locality, stepUp }\n : undefined;\n }\n if (\n locality === 'remote' &&\n deviceId !== null &&\n deviceId !== '' &&\n (stepUp === 'not-required' || stepUp === 'verified' || stepUp === 'unavailable') &&\n (access === null || access === 'owner' || access === 'member')\n ) {\n return { locality, deviceId, stepUp, ...(access === null ? {} : { access }), ...federation };\n }\n return undefined;\n}\n\n/**\n * The person who started a session: the verified caller of a top-level create, or the parent's for a child.\n * Never read from request input. Absent for a local or unattributed start.\n */\nexport interface PoSessionStarter {\n readonly issuer: string;\n readonly subject: string;\n readonly org?: string;\n}\n\n/** The starter a verified caller names; undefined when the caller carries no principal. */\nexport function poSessionStarterFrom(caller: PoApiCaller | undefined): PoSessionStarter | undefined {\n if (!caller?.principal) return undefined;\n return {\n issuer: caller.principal.issuer,\n subject: caller.principal.subject,\n ...(caller.org ? { org: caller.org } : {}),\n };\n}\n\n/** A starter read back from storage, or undefined when the value is not one. */\nexport function parsePoSessionStarter(value: unknown): PoSessionStarter | undefined {\n if (typeof value !== 'object' || value === null) return undefined;\n const { issuer, subject, org } = value as Record<string, unknown>;\n if (typeof issuer !== 'string' || !issuer || typeof subject !== 'string' || !subject) return undefined;\n if (org !== undefined && (typeof org !== 'string' || !org)) return undefined;\n return { issuer, subject, ...(org === undefined ? {} : { org }) };\n}\n/**\n * A browser-reachable OAuth redirect the host serves on its own listener.\n *\n * A package brokering third-party OAuth cannot use a loopback redirect when the\n * operator's browser is on another machine: `127.0.0.1` resolves to whichever\n * machine the browser runs on. The host owns a listener that is reachable from\n * wherever the cockpit is being used, so it lends that instead of the package\n * opening a port of its own.\n */\nexport interface PoOAuthRedirect {\n /** Absolute URL to register as the redirect target, already origin-correct. */\n readonly redirectUri: string;\n /**\n * Accept redirects carrying this state. Must complete before the\n * authorization URL is surfaced, or the redirect races its own reservation.\n */\n reserve(state: string, timeoutMs?: number): Promise<void>;\n /** Resolves once the redirect carrying this state arrives. */\n wait(state: string, timeoutMs?: number): Promise<{ code: string; state: string }>;\n /** Drops a reservation whose flow ended without a redirect. */\n cancel(state: string): void;\n}\n\n/** An exact, host-owned receipt address. Provider IDs are not event cursor positions. */\nexport interface PoRequestReceiptKey {\n namespace: string;\n activationId: string;\n requestId: string;\n}\n\nexport interface PoRequestReceipt extends PoRequestReceiptKey {\n fingerprint: string;\n destination: string;\n transactionId: string;\n outcome: 'reserved' | 'admitted' | 'rejected' | 'uncertain';\n}\n\nexport interface PoRequestReceiptReservation extends PoRequestReceiptKey {\n /** Lowercase SHA-256 of the authoritative request text, never the full transcript. */\n fingerprint: string;\n destination: string;\n transactionId: string;\n}\n\nexport type PoRequestReceiptReserveResult =\n | { kind: 'reserved'; token: string }\n | { kind: 'existing'; receipt: PoRequestReceipt }\n | { kind: 'conflict'; receipt: PoRequestReceipt };\n\n/** A host-only receipt capability. A reservation is not an execution receipt. */\nexport interface PoRequestReceipts {\n reserve(request: PoRequestReceiptReservation): Promise<PoRequestReceiptReserveResult>;\n lookup(key: PoRequestReceiptKey): Promise<PoRequestReceipt | undefined>;\n finish(\n request: PoRequestReceiptKey & { token: string; outcome: 'admitted' | 'rejected' | 'uncertain' },\n ): Promise<PoRequestReceipt>;\n}\n\n/** Permit returned for expensive local work. Calling it releases the slot. */\nexport interface PoHostExecutionPermit {\n (): void;\n attachProcess?(pid: number): Promise<void>;\n}\n\n/** Host-wide admission for expensive local work. Release only after the owned process exits. */\nexport interface PoHostExecutionBudget {\n acquire(signal?: AbortSignal): Promise<PoHostExecutionPermit>;\n getSnapshot(): Readonly<{ running: number; queued: number; limit: number }>;\n}\n\n/** Synchronous per-device exclusion across media APIs mounted at different scopes. */\nexport interface PoHostMediaArbitration {\n register(busy: () => boolean, deviceId: () => string | undefined): () => void;\n available(busy: () => boolean, deviceId: string): boolean;\n}\n\n/** One host's paired agent registrations, shared across its host and session mounts. */\nexport interface PoPeerAgentRegistry {\n register(sessionId: string, agent: { fetch(request: Request): Promise<Response> }, hubToken: string): () => void;\n get(sessionId: string): { fetch(request: Request): Promise<Response>; hubToken: string } | undefined;\n}\n\n/** One agent that edits files: a hub session or an in-process child run. */\nexport interface PoEditPresenceAgent {\n /** `session:<id>` or `run:<runId>`. Unique across the host. */\n readonly key: string;\n /** Read when a note is rendered, so a name registered after the edit still shows. */\n readonly label: () => string;\n /** Hub session id other agents can reach with intercom. */\n readonly contact: string;\n readonly isLive: () => boolean;\n}\n\nexport interface PoEditPresenceEntry {\n readonly agent: PoEditPresenceAgent;\n /** `@file` tag of the bytes this agent's last successful edit or write left behind. */\n readonly tag: string;\n readonly at: number;\n}\n\n/** Last successful edits, keyed by canonical file path then agent key. */\nexport type PoEditPresenceLedger = Map<string, Map<string, PoEditPresenceEntry>>;\n\n/** Workspace-owned file presence. Only file overlap grants an unrelated session contact. */\nexport interface PoEditPresence {\n /** Records a touch and returns other live editors of this canonical file. */\n touch(file: string, agent: PoEditPresenceAgent): readonly PoEditPresenceEntry[];\n record(file: string, entry: PoEditPresenceEntry): void;\n forget(agentKey: string): void;\n canCommunicate(sourceSessionId: string, targetSessionId: string): boolean;\n clear(): void;\n}\n\nexport const PO_EDIT_PRESENCE_SERVICE = 'po/edit-presence';\nexport const PO_EDIT_PRESENCE_CONTRACT = defineServiceContract<PoEditPresence>(PO_EDIT_PRESENCE_SERVICE, {\n scope: 'workspace',\n});\n\ndeclare module '@deepseek-ai/cordis' {\n interface Context {\n 'po/edit-presence': PoEditPresence;\n }\n}\n\n/** Why shareFile rejects while the host has no public tunnel origin. */\nexport const PO_SHARE_FILE_REMOTE_OFF_MESSAGE =\n 'Remote access is off, so Po cannot share files with remote MCP servers. Turn it on and retry.';\n\n/**\n * A file published at a short-lived public tunnel URL: 10 minutes, 3 downloads, and gone\n * when the tunnel revision changes. Call revoke as soon as the consumer is done with it.\n */\nexport interface PoSharedFile {\n /** Bearer link; never log or persist it. */\n url: string;\n fileName: string;\n mimeType: string;\n size: number;\n /** Expiry as epoch milliseconds. */\n expiresAt: number;\n maxDownloads: number;\n /** Idempotent. */\n revoke(): void;\n}\n\n/** Server-only admission for a registered file. Never construct this from browser input.\n * The opener must revalidate ownership, containment, symlinks and registered identity\n * on every call. Core pins identity again and bounds streaming to the admitted size.\n */\nexport interface PoOpenedRegisteredFile {\n identity: string;\n size: number;\n /** Single-use bounded stream. Ending or cancelling closes the opened resource. */\n stream(): ReadableStream<Uint8Array>;\n close(): Promise<void>;\n}\n\nexport interface PoRegisteredFile {\n fileName: string;\n open(): Promise<PoOpenedRegisteredFile>;\n}\n\n/** What the host tells an API about itself when it starts. */\nexport interface PoApiContext {\n scope: PoApiScope;\n /** Installed CLI release and its catalog. Absent on hosts that do not ship the CLI. */\n distribution?: { readonly version: string; readonly catalogPackages: readonly string[] };\n /** Descriptive inventory of this exact published web mount. No plugin runtime values. */\n clientPlugins?: PoClientPluginInventory;\n /** Stable, opaque workspace id, shared by every session and member checkout of the workspace. */\n workspaceId?: string;\n /**\n * The admitted workspace root for a workspace mount. For a session mount it is the checkout\n * the session runs in; read sessionContext for both roots. Absent from host mounts.\n */\n workspaceRoot?: string;\n /** The session's baseline context; present on session mounts whose host knows its workspace. */\n sessionContext?: PoSessionContext;\n /** Explicit host home, never selected by a remote request. */\n homeDirectory?: string;\n /** The session this host serves; absent for a hub-scoped API. */\n sessionId?: string;\n /** Who started the session this host serves, recorded by the host. Absent for a local or unattributed start. */\n startedBy?: PoSessionStarter;\n /** The session's working directory; absent for a hub-scoped API. */\n cwd?: string;\n /** Session environment admitted by the server, never supplied by remote clients. */\n environment?: Readonly<Record<string, string | undefined>>;\n /** Shared only with child processes in this session, never with remote API clients. */\n internalToken?: string;\n /** Shared only with the cockpit hub for privileged cross-session coordination. */\n hubToken?: string;\n /**\n * Resolves a hub-issued opaque repository id to an admitted canonical root.\n * Hub APIs must never accept a browser-supplied filesystem path instead.\n */\n resolveRepository?(repositoryId: string): string | undefined;\n /** Reads the admitted repository's sync projection without exposing its state path. */\n readRepositorySync?(\n repositoryId: string,\n ): Promise<PoRepositorySyncView | undefined> | PoRepositorySyncView | undefined;\n /** Admitted workspaces available to this mount. */\n repositories?(): readonly { id: string; name: string; path: string; active: boolean }[];\n /** Publish a successful config write to the owning mount's refresh lifecycle. */\n configurationChanged?(): void;\n /**\n * Borrows the hub's OAuth redirect surface. Undefined when the hub cannot\n * currently serve one, in which case the package keeps its own behaviour.\n */\n oauthRedirect?(): PoOAuthRedirect | undefined;\n /** Canonical in-process lifecycle for sessions created by this host. */\n sessionService?: PoHubSessionService;\n /** Trusted in-process storage capability. APIs must retain their mount's session authorization. */\n sessionStorage?: PoSessionStorageService;\n /** Host-bound, authenticated inter-session event endpoint for this session. */\n sessionCommunication?: PoSessionCommunicationEndpoint;\n /** Same-process events shared by session APIs and hub channels. */\n directEvents?: PoDirectEventBus;\n /**\n * Publishes this session's activity line to every page's rail; undefined clears it.\n * Session mounts only. The last publisher wins.\n */\n publishActivity?(activity: PoSessionActivity | undefined): void;\n /**\n * Publishes this session's own summary to the peers that may message it and keeps it on the session's record,\n * so it survives a restart. Trimmed and cut to one short line; undefined or empty clears it. Session mounts only.\n */\n publishSummary?(summary: string | undefined): void;\n /** Host coordination for this session. Every method refuses a non-coordinator. */\n coordination?: PoSessionCoordination;\n /** Trusted in-process dispatch to an explicitly selected mounted API. No browser authentication is performed here. */\n requestApi?(mount: PoApiMount, basePath: string, request: Request): Promise<Response>;\n /** Present only on a session mounted by an authenticated Desktop host. */\n computerUse?: PoComputerUseSessionAccess;\n /** Desktop's macOS privacy permissions; present on hub mounts only when Desktop hosts this server. */\n desktopPermissions?: {\n /** A `change` asks macOS for a permission and needs the step-up computer-use activation needs. */\n authorize(headers: Headers, change: boolean): boolean;\n /** The permission states, after asking macOS for `permission` when it is set. */\n request(permission?: string): Promise<unknown>;\n };\n /** Deliver a typed method to the channel serving a session this mount reaches, retaining the caller's connection identity. */\n receiveChannel?(sessionId: string, frameType: string, payload: unknown, connectionId: string): boolean;\n /**\n * Tells connected clients this mount's `name` data changed, so they fetch it again instead of polling.\n * Scoped by the mount: `host:<name>` on the host mount, `workspace:<id>:<name>` on a workspace mount.\n */\n bumpRevision?(name: string): void;\n /** Sets a live session's undecided approval count on its rail card; 0 clears it. Host mount only. */\n setSessionPendingApprovals?(sessionId: string, count: number): void;\n /** Host-owned replay evidence, supplied only on the host mount. Never exposed to browsers or agents. */\n requestReceipts?: PoRequestReceipts;\n /** Canonical display names for declared clients, never an authorization directory. */\n clientDevices?: PoClientDeviceRegistry;\n /** One host's per-device media activity, shared across host and session scopes. */\n mediaArbitration?: PoHostMediaArbitration;\n /** One host-wide heavy-job budget, not a separate budget for every session. */\n executionBudget?: PoHostExecutionBudget;\n /** Paired agents belonging to this host only. */\n peerAgents?: PoPeerAgentRegistry;\n /**\n * Publishes a file from this session's cwd or attachments at a short-lived tunnel URL.\n * Session mounts only; rejects with PO_SHARE_FILE_REMOTE_OFF_MESSAGE while remote access is off.\n * The host asks no consent: the caller must obtain it before passing the URL on.\n */\n shareFile?(path: string, label: string): Promise<PoSharedFile>;\n /** Trusted in-process registered-file admission, separate from ordinary capped shareFile. */\n shareRegisteredFile?(file: PoRegisteredFile): Promise<PoSharedFile>;\n /**\n * This server's loopback origin, such as `http://127.0.0.1:4242`. Throws until the listener is up,\n * so read it when serving a request, not at start.\n */\n serverOrigin?(): string;\n onNotice(message: string): void;\n}\n\n/** What a coordinator session may ask its host to do. The host binds it to the calling session. */\nexport interface PoSessionCoordination {\n /**\n * Starts a session with no parent link and sends `brief` as its first prompt. Defaults to the caller's workspace.\n * Only a home coordinator may target another admitted, uncoordinated workspace. The hourly limit still applies.\n * A committed creation whose initial prompt failed returns its id and promptError. Never retry creation blindly.\n * `goal` is true when the session took the brief as its goal, false when it read it as an ordinary prompt.\n */\n startSession(request: {\n name: string;\n brief: string;\n workspaceId?: string;\n }): Promise<{ sessionId: string; promptError?: string; goal?: boolean }>;\n}\n\n/** One accepted WebSocket on a public route. Text frames arrive as strings, binary frames as bytes. */\nexport interface PoApiSocket {\n readonly isOpen: boolean;\n send(data: string | Uint8Array): void;\n close(code?: number, reason?: string): void;\n onMessage(listener: (data: string | Uint8Array) => void): void;\n onClose(listener: (code: number, reason: string) => void): void;\n}\n\n/**\n * Routes the host serves without its own token, for a client that holds a package-issued token instead.\n * Global scope only. The host calls `authenticate` before `fetch` or `upgrade` and answers 401 when it\n * returns false, so a handler is never reached unauthenticated. Requests must also come from a loopback\n * peer and Host, carry no Origin or a `chrome-extension://` one, and never arrive through the tunnel.\n */\nexport interface PoApiPublicRoutes {\n /** Path prefixes below the base path, such as `/extension`; each starts with `/`. */\n readonly paths: readonly string[];\n authenticate(request: Request): boolean | Promise<boolean>;\n}\n\n/**\n * One running surface. The host strips the mount prefix before calling, so\n * routes are declared relative ('/runners/:id/log') and a package never\n * repeats where it was mounted.\n */\nexport interface PoApiHandler {\n /** The optional member is bound by the host at ingress, never reconstructed from this Request. */\n fetch(request: Request, admittedMember?: PoSessionStarter): Response | Promise<Response>;\n /** Accepts a WebSocket upgrade on a public route; the host has already authenticated it. */\n upgrade?(request: Request, socket: PoApiSocket): void;\n close(): void;\n}\n\nexport interface PoApi {\n /** Segment under /api/plugins/; globally unique across loaded packages. */\n basePath: string;\n /** Routes served without the host token; accepted for host-scope packages only. */\n publicRoutes?: PoApiPublicRoutes;\n start(context: PoApiContext): PoApiHandler;\n}\n"],"mappings":";;AAuCA,MAAa,gBAAuC;CAAC;CAAQ;CAAa;AAAS;;AAkDnF,SAAgB,eAAe,OAAsD;CACnF,IAAI,MAAM,UAAU,QAAQ,OAAO;CACnC,IAAI,MAAM,UAAU,aAAa,OAAO,mBAAmB,mBAAmB,MAAM,WAAW,EAAE;CACjG,IAAI,CAAC,MAAM,aAAa,MAAM,IAAI,MAAM,qDAAqD;CAC7F,OAAO,mBAAmB,mBAAmB,MAAM,WAAW,EAAE,YAAY,mBAAmB,MAAM,SAAS,EAAE;AAClH;;AASA,SAAgB,kBAAkB,UAA6C;CAC7E,IAAI,aAAa,WAAW,OAAO,EAAE,OAAO,OAAO;CACnD,MAAM,QAAQ,4DAA4D,KAAK,QAAQ;CACvF,IAAI,CAAC,OAAO,OAAO,KAAA;CACnB,IAAI;EACF,MAAM,cAAc,mBAAmB,MAAM,EAAE;EAC/C,OAAO,MAAM,OAAO,KAAA,IAChB;GAAE,OAAO;GAAa;EAAY,IAClC;GAAE,OAAO;GAAW;GAAa,WAAW,mBAAmB,MAAM,EAAE;EAAE;CAC/E,QAAQ;EACN;CACF;AACF;;AAGA,MAAa,sBAAsB;;AAEnC,MAAa,iCAAiC;;AAG9C,MAAa,gCAAgC;AAC7C,MAAa,iCAAiC;AAC9C,MAAa,+BAA+B;;AAE5C,MAAa,kCAAkC;;;;;AAK/C,MAAa,8BAA8B;;;;;AAK3C,MAAa,6BAA6B;AAE1C,MAAa,wBAAwB;CACnC;CACA;CACA;CACA;CACA;AACF;AAUA,SAAS,qBACP,SAC+E;CAC/E,MAAM,MAAM,QAAQ,IAAI,+BAA+B;CACvD,IAAI,QAAQ,MAAM,OAAO,KAAA;CACzB,IAAI;EACF,MAAM,QAAQ,KAAK,MAAM,GAAG;EAC5B,IACE,OAAO,MAAM,WAAW,WAAW,YACnC,CAAC,MAAM,UAAU,UACjB,OAAO,MAAM,UAAU,YAAY,YACnC,CAAC,MAAM,UAAU,WACjB,OAAO,MAAM,QAAQ,YACrB,CAAC,MAAM,OACP,OAAO,MAAM,QAAQ,UAAU,YAC/B,CAAC,MAAM,OAAO,SACb,MAAM,QAAQ,KAAA,MACZ,OAAO,MAAM,IAAI,kBAAkB,YAClC,CAAC,MAAM,IAAI,iBACX,OAAO,MAAM,IAAI,YAAY,YAC7B,CAAC,MAAM,IAAI,UAEf,OAAO,KAAA;EACT,OAAO;GACL,WAAW;IAAE,QAAQ,MAAM,UAAU;IAAQ,SAAS,MAAM,UAAU;GAAQ;GAC9E,KAAK,MAAM;GACX,QAAQ,EAAE,OAAO,MAAM,OAAO,MAAM;GACpC,GAAI,MAAM,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,IAAI,CAAC;EAC/C;CACF,QAAQ;EACN;CACF;AACF;;AAGA,SAAgB,gBAAgB,SAA2C;CACzE,MAAM,aAAa,qBAAqB,OAAO;CAC/C,IAAI,QAAQ,IAAA,4BAAmC,KAAK,CAAC,YAAY,OAAO,KAAA;CACxE,MAAM,WAAW,QAAQ,IAAI,6BAA6B;CAC1D,MAAM,WAAW,QAAQ,IAAI,8BAA8B;CAC3D,MAAM,SAAS,QAAQ,IAAI,4BAA4B;CACvD,MAAM,SAAS,QAAQ,IAAI,2BAA2B;CACtD,IAAI,aAAa,SACf,OAAO,aAAa,QAAQ,WAAW,kBAAkB,CAAC,cAAc,WAAW,OAC/E;EAAE;EAAU;CAAO,IACnB,KAAA;CAEN,IACE,aAAa,YACb,aAAa,QACb,aAAa,OACZ,WAAW,kBAAkB,WAAW,cAAc,WAAW,mBACjE,WAAW,QAAQ,WAAW,WAAW,WAAW,WAErD,OAAO;EAAE;EAAU;EAAU;EAAQ,GAAI,WAAW,OAAO,CAAC,IAAI,EAAE,OAAO;EAAI,GAAG;CAAW;AAG/F;;AAaA,SAAgB,qBAAqB,QAA+D;CAClG,IAAI,CAAC,QAAQ,WAAW,OAAO,KAAA;CAC/B,OAAO;EACL,QAAQ,OAAO,UAAU;EACzB,SAAS,OAAO,UAAU;EAC1B,GAAI,OAAO,MAAM,EAAE,KAAK,OAAO,IAAI,IAAI,CAAC;CAC1C;AACF;;AAGA,SAAgB,sBAAsB,OAA8C;CAClF,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO,KAAA;CACxD,MAAM,EAAE,QAAQ,SAAS,QAAQ;CACjC,IAAI,OAAO,WAAW,YAAY,CAAC,UAAU,OAAO,YAAY,YAAY,CAAC,SAAS,OAAO,KAAA;CAC7F,IAAI,QAAQ,KAAA,MAAc,OAAO,QAAQ,YAAY,CAAC,MAAM,OAAO,KAAA;CACnE,OAAO;EAAE;EAAQ;EAAS,GAAI,QAAQ,KAAA,IAAY,CAAC,IAAI,EAAE,IAAI;CAAG;AAClE;AAkHA,MAAa,2BAA2B;AACxC,MAAa,4BAA4B,sBAAsC,0BAA0B,EACvG,OAAO,YACT,CAAC;;AASD,MAAa,mCACX"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const require_serverScope = require("./serverScope.cjs");
|
|
2
|
+
//#region src/schemas/personTimeZone.ts
|
|
3
|
+
const PO_PERSON_TIME_ZONE_SERVICE = "po/person-time-zone";
|
|
4
|
+
const PO_PERSON_TIME_ZONE_CONTRACT = require_serverScope.defineServiceContract(PO_PERSON_TIME_ZONE_SERVICE, { scope: "session" });
|
|
5
|
+
function readPoPersonTimeZone(context) {
|
|
6
|
+
return context.get(PO_PERSON_TIME_ZONE_SERVICE);
|
|
7
|
+
}
|
|
8
|
+
/** True for a zone name this runtime's Intl accepts, such as `Australia/Sydney`. */
|
|
9
|
+
function isTimeZone(value) {
|
|
10
|
+
if (typeof value !== "string" || value.length === 0 || value.length > 64) return false;
|
|
11
|
+
try {
|
|
12
|
+
new Intl.DateTimeFormat("en", { timeZone: value });
|
|
13
|
+
return true;
|
|
14
|
+
} catch {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/** The system prompt line. It names no clock time, so it stays stable and the prompt cache holds. */
|
|
19
|
+
function personTimeZoneLine(zone) {
|
|
20
|
+
return zone === void 0 ? "Person's timezone: unknown. Ask the person before acting on a clock time or date; never assume the server's zone." : `Person's timezone: ${zone.timeZone} (from their ${zone.source}). Read and write dates and clock times in this zone unless the person names another.`;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
exports.PO_PERSON_TIME_ZONE_CONTRACT = PO_PERSON_TIME_ZONE_CONTRACT;
|
|
24
|
+
exports.PO_PERSON_TIME_ZONE_SERVICE = PO_PERSON_TIME_ZONE_SERVICE;
|
|
25
|
+
exports.isTimeZone = isTimeZone;
|
|
26
|
+
exports.personTimeZoneLine = personTimeZoneLine;
|
|
27
|
+
exports.readPoPersonTimeZone = readPoPersonTimeZone;
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=personTimeZone.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"personTimeZone.cjs","names":["defineServiceContract"],"sources":["../../../src/schemas/personTimeZone.ts"],"sourcesContent":["import type { Context } from '@deepseek-ai/cordis';\n\nimport { defineServiceContract } from './serverScope';\n\nexport const PO_PERSON_TIME_ZONE_SERVICE = 'po/person-time-zone';\n\n/** Where a session learned the person's zone. A profile's own zone wins over the device's. */\nexport type PersonTimeZoneSource = 'profile' | 'device';\n\nexport interface PersonTimeZone {\n readonly timeZone: string;\n readonly source: PersonTimeZoneSource;\n}\n\n/**\n * The person's IANA timezone for one session. The host records the device zone a client sends with each\n * message; the profile package records the selected profile's zone. Never the server's own zone, because\n * Po may run on a machine far from the person.\n */\nexport interface PoPersonTimeZone {\n read(): PersonTimeZone | undefined;\n /** The selected profile's zone, or undefined when it declares none. */\n setProfile(timeZone: string | undefined): void;\n}\n\nexport const PO_PERSON_TIME_ZONE_CONTRACT = defineServiceContract<PoPersonTimeZone>(PO_PERSON_TIME_ZONE_SERVICE, {\n scope: 'session',\n});\n\ndeclare module '@deepseek-ai/cordis' {\n interface Context {\n 'po/person-time-zone': PoPersonTimeZone;\n }\n}\n\nexport function readPoPersonTimeZone(context: Context): PoPersonTimeZone | undefined {\n return context.get(PO_PERSON_TIME_ZONE_SERVICE) as PoPersonTimeZone | undefined;\n}\n\n/** True for a zone name this runtime's Intl accepts, such as `Australia/Sydney`. */\nexport function isTimeZone(value: unknown): value is string {\n if (typeof value !== 'string' || value.length === 0 || value.length > 64) return false;\n try {\n new Intl.DateTimeFormat('en', { timeZone: value });\n return true;\n } catch {\n return false;\n }\n}\n\n/** The system prompt line. It names no clock time, so it stays stable and the prompt cache holds. */\nexport function personTimeZoneLine(zone: PersonTimeZone | undefined): string {\n return zone === undefined\n ? \"Person's timezone: unknown. Ask the person before acting on a clock time or date; never assume the server's zone.\"\n : `Person's timezone: ${zone.timeZone} (from their ${zone.source}). Read and write dates and clock times in this zone unless the person names another.`;\n}\n"],"mappings":";;AAIA,MAAa,8BAA8B;AAqB3C,MAAa,+BAA+BA,oBAAAA,sBAAwC,6BAA6B,EAC/G,OAAO,UACT,CAAC;AAQD,SAAgB,qBAAqB,SAAgD;CACnF,OAAO,QAAQ,IAAI,2BAA2B;AAChD;;AAGA,SAAgB,WAAW,OAAiC;CAC1D,IAAI,OAAO,UAAU,YAAY,MAAM,WAAW,KAAK,MAAM,SAAS,IAAI,OAAO;CACjF,IAAI;EACF,IAAI,KAAK,eAAe,MAAM,EAAE,UAAU,MAAM,CAAC;EACjD,OAAO;CACT,QAAQ;EACN,OAAO;CACT;AACF;;AAGA,SAAgB,mBAAmB,MAA0C;CAC3E,OAAO,SAAS,KAAA,IACZ,sHACA,sBAAsB,KAAK,SAAS,eAAe,KAAK,OAAO;AACrE"}
|