@agimon-ai/po-core 0.0.0-alpha.188 → 0.0.0-alpha.189
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"platformRequirements":{},"sourceFiles":["NOTICE","README.md","licenses/Codex-Apache-2.0.txt","package.json","runtimeEntries.json","src/constants/agentSettled.ts","src/constants/auth.ts","src/constants/cloud.ts","src/constants/contextApi.ts","src/constants/fixedCore.ts","src/constants/globalSettings.ts","src/constants/modelGateway.ts","src/constants/nativeHost.ts","src/constants/remote.ts","src/constants/sessionFiles.ts","src/constants/template.ts","src/constants/voiceReloadHandoff.ts","src/constants/voiceTools.ts","src/exports/agentModel.ts","src/exports/apiContracts.ts","src/exports/approval.ts","src/exports/askUser.ts","src/exports/backgroundWork.ts","src/exports/bundleAssetPolicy.ts","src/exports/chatgptAuth.ts","src/exports/childProcess.ts","src/exports/childSession.ts","src/exports/clientDevices.ts","src/exports/clientMetadata.ts","src/exports/codemode.ts","src/exports/config.ts","src/exports/contextApi.ts","src/exports/contextContributions.ts","src/exports/cordisHost.ts","src/exports/delegation.ts","src/exports/extensionFile.ts","src/exports/footer.ts","src/exports/formReview.ts","src/exports/headless.ts","src/exports/help.ts","src/exports/history.ts","src/exports/hubChannel.ts","src/exports/images.ts","src/exports/index.ts","src/exports/inputTemplate.ts","src/exports/json.ts","src/exports/kernel.ts","src/exports/leader.ts","src/exports/logSinkTelemetry.ts","src/exports/main.ts","src/exports/mcp.ts","src/exports/mcpFacet.ts","src/exports/mcpProjection.ts","src/exports/mcpSession.ts","src/exports/mcpStatus.ts","src/exports/mcpToolResolver.ts","src/exports/mcpWidget.ts","src/exports/modelGateway.ts","src/exports/narration.ts","src/exports/native.ts","src/exports/notification.ts","src/exports/packageApi.ts","src/exports/pairingPage.ts","src/exports/personTimeZone.ts","src/exports/piSettings.ts","src/exports/platform.ts","src/exports/pluginProtocol.ts","src/exports/profileIdentity.ts","src/exports/protocol.ts","src/exports/protocolTransport.ts","src/exports/providerAuth.ts","src/exports/readiness.ts","src/exports/remoteChildSession.ts","src/exports/remoteContract.ts","src/exports/remoteOrigin.ts","src/exports/sandboxIdentity.ts","src/exports/server.ts","src/exports/serverPlugin.ts","src/exports/sessionMcpContract.ts","src/exports/sessionProtocol.ts","src/exports/skills.ts","src/exports/telemetry.ts","src/exports/testMode.ts","src/exports/testing.ts","src/exports/toolNames.ts","src/exports/toolOverrides.ts","src/exports/toolSurface.ts","src/exports/transition.ts","src/exports/uiHub.ts","src/exports/voiceReloadHandoff.ts","src/exports/voiceTools.ts","src/exports/web.ts","src/exports/webTesting.ts","src/exports/workflow.ts","src/exports/workspaceRegistry.ts","src/exports/workspaceSandboxes.ts","src/extensions/extensionFile.ts","src/extensions/serverPlugin.ts","src/extensions/webPlugin.ts","src/pi/cordisHost.ts","src/pi/piSessionRuntime.ts","src/schemas/agentModel.ts","src/schemas/agentRun.ts","src/schemas/apiContracts.ts","src/schemas/approval.ts","src/schemas/approvalPrompt.ts","src/schemas/askUser.ts","src/schemas/backgroundWork.ts","src/schemas/brain.ts","src/schemas/builtinApiContracts.ts","src/schemas/childProcess.ts","src/schemas/clientDevices.ts","src/schemas/clientMetadata.ts","src/schemas/codemode.ts","src/schemas/config.ts","src/schemas/contextContributions.ts","src/schemas/delegation.ts","src/schemas/extensionFile.ts","src/schemas/federation.ts","src/schemas/footer.ts","src/schemas/formReview.ts","src/schemas/headless.ts","src/schemas/help.ts","src/schemas/home.ts","src/schemas/hostServiceContracts.ts","src/schemas/hostServices.ts","src/schemas/hostTeam.ts","src/schemas/httpApiContracts.ts","src/schemas/hubChannel.ts","src/schemas/humanIdentity.ts","src/schemas/identity.ts","src/schemas/leader.ts","src/schemas/mcp.ts","src/schemas/mcpBundle.ts","src/schemas/mcpFacet.ts","src/schemas/mcpProjection.ts","src/schemas/mcpSession.ts","src/schemas/mcpStatus.ts","src/schemas/mcpToolResolver.ts","src/schemas/modelGateway.ts","src/schemas/narration.ts","src/schemas/notification.ts","src/schemas/packageApi.ts","src/schemas/personTimeZone.ts","src/schemas/platform.ts","src/schemas/pluginCatalog.ts","src/schemas/pluginContributions.ts","src/schemas/pluginMarketplace.ts","src/schemas/pluginProtocol.ts","src/schemas/profileIdentity.ts","src/schemas/protocol.ts","src/schemas/protocolChannelsContract.ts","src/schemas/protocolContracts.ts","src/schemas/protocolHubContract.ts","src/schemas/protocolService.ts","src/schemas/protocolSessionContract.ts","src/schemas/protocolThreadContract.ts","src/schemas/readiness.ts","src/schemas/remoteApiContracts.ts","src/schemas/remoteGateway.ts","src/schemas/remoteOrigin.ts","src/schemas/sandboxIdentity.ts","src/schemas/serverBundle.ts","src/schemas/serverPlugin.ts","src/schemas/serverScope.ts","src/schemas/sessionApiContracts.ts","src/schemas/sessionLifecycle.ts","src/schemas/sessionMcpActivity.ts","src/schemas/sessionProtocol.ts","src/schemas/sharedModels.ts","src/schemas/skills.ts","src/schemas/space.ts","src/schemas/toolOverrides.ts","src/schemas/toolSurface.ts","src/schemas/transition.ts","src/schemas/transportApiContracts.ts","src/schemas/uiHub.ts","src/schemas/voiceReloadHandoff.ts","src/schemas/voiceTools.ts","src/schemas/workflow.ts","src/schemas/workspaceRegistry.ts","src/schemas/workspaceSandboxes.ts","src/server/contextApi.ts","src/server/conversationEvents.ts","src/server/directHarnessRuntime.ts","src/server/harnessErrorMessage.ts","src/server/headlessHub.ts","src/server/headlessProtocol.ts","src/server/headlessServer.ts","src/server/largeFrameLink.ts","src/server/liveImport.ts","src/server/machineApi.ts","src/server/mcpBundleLoader.ts","src/server/packageApiServer.ts","src/server/providerRoutes.ts","src/server/providerRuntime.ts","src/server/serverPackages.ts","src/server/serverScope.ts","src/server/sessionFilesApi.ts","src/server/threadJournals.ts","src/services/apiContracts/index.ts","src/services/apiSurfaceAssert/index.ts","src/services/approvalGate/index.ts","src/services/approvalGate/type.ts","src/services/bundlePublication/index.ts","src/services/chatgptAuth/index.ts","src/services/chatgptImages/index.ts","src/services/chatgptImages/type.ts","src/services/chatgptLogin/index.ts","src/services/chatgptWebSearch/index.ts","src/services/chordAdapter/index.ts","src/services/chordAdapter/type.ts","src/services/clientDevices/index.ts","src/services/clientMetadata/_lib/codec.ts","src/services/clientMetadata/_lib/deviceLabel.ts","src/services/contextApiUrls/index.ts","src/services/contextContributions/index.ts","src/services/contextDetail/index.ts","src/services/contextDetailStore/index.edge.ts","src/services/contextDetailStore/index.ts","src/services/contextProjection/index.ts","src/services/contextUsage/index.ts","src/services/durableNavigation/docs.ts","src/services/durableNavigation/index.ts","src/services/durableQueue/docs.ts","src/services/durableQueue/index.ts","src/services/durableRequestReceipts/docs.ts","src/services/durableRequestReceipts/index.ts","src/services/durableResumeSnapshots/docs.ts","src/services/durableResumeSnapshots/index.ts","src/services/durableResumeSnapshots/type.ts","src/services/durableSession/docs.ts","src/services/durableSession/index.ts","src/services/durableSubagents/docs.ts","src/services/durableSubagents/extension.ts","src/services/durableSubagents/index.ts","src/services/durableSubagents/tasks.ts","src/services/edgeModelRuntime/index.ts","src/services/edgeModelRuntime/type.ts","src/services/editPresence/index.ts","src/services/executionBudget/index.edge.ts","src/services/executionBudget/index.ts","src/services/fileAccess/accessibleFile.edge.ts","src/services/fileAccess/accessibleFile.ts","src/services/fileAccess/core.ts","src/services/fileAccess/index.ts","src/services/fileAccess/type.ts","src/services/guardedFile/index.edge.ts","src/services/guardedFile/index.ts","src/services/headlessClient/index.ts","src/services/historyCreationFileSystem/index.ts","src/services/historyOwnership/index.ts","src/services/historyOwnership/type.ts","src/services/hostServices/index.ts","src/services/hubChannelHarness/index.ts","src/services/inputTemplate/index.ts","src/services/inputTemplate/type.ts","src/services/json/core.ts","src/services/json/index.ts","src/services/json/sync.edge.ts","src/services/json/sync.ts","src/services/kernel/index.ts","src/services/logSinkTelemetry/index.ts","src/services/loginFlow/index.ts","src/services/mcpSchemaCost/index.ts","src/services/modelDispatch/index.ts","src/services/modelDispatch/type.ts","src/services/modelGatewayContainer/index.ts","src/services/modelGatewayContainer/type.ts","src/services/modelGatewayExecutor/index.ts","src/services/modelGatewayExecutor/type.ts","src/services/modelGatewayHost/index.ts","src/services/modelGatewayHost/type.ts","src/services/modelGatewayWire/index.ts","src/services/moduleResolution/index.ts","src/services/nativeChildTools/index.edge.ts","src/services/nativeChildTools/index.ts","src/services/nodeHost/index.edge.ts","src/services/nodeHost/index.ts","src/services/nodeModelDependencies/index.edge.ts","src/services/nodeModelDependencies/index.ts","src/services/nodePlatform/index.edge.ts","src/services/nodePlatform/index.ts","src/services/openSessionRegistry/index.ts","src/services/openSessionRegistry/openSessionRecords.ts","src/services/openSessionRegistry/sync.edge.ts","src/services/openSessionRegistry/sync.ts","src/services/packageApiHarness/index.ts","src/services/packageContentRevision/index.ts","src/services/packageResource/index.edge.ts","src/services/packageResource/index.ts","src/services/pairingPage/index.ts","src/services/piArgs/index.edge.ts","src/services/piArgs/index.ts","src/services/piExtensionHost/index.ts","src/services/piHelpTools/index.ts","src/services/piMessages/index.ts","src/services/piSessionEntries/index.ts","src/services/piSettings/core.ts","src/services/piSettings/index.ts","src/services/piSettings/sync.edge.ts","src/services/piSettings/sync.ts","src/services/piSummary/index.edge.ts","src/services/piSummary/index.ts","src/services/piSummary/type.ts","src/services/platformFiles/index.ts","src/services/platformFiles/rootBoundReplace.edge.ts","src/services/platformFiles/rootBoundReplace.ts","src/services/pluginLifecycle/index.ts","src/services/poPackage/core.ts","src/services/poPackage/index.ts","src/services/poPackage/sync.edge.ts","src/services/poPackage/sync.ts","src/services/poTelemetry/index.edge.ts","src/services/poTelemetry/index.ts","src/services/portableConfig/index.ts","src/services/providerAuth/index.ts","src/services/providerImages/fitter.ts","src/services/providerImages/index.edge.ts","src/services/providerImages/index.ts","src/services/runtimeIdentity/index.ts","src/services/runtimeIdentity/sync.edge.ts","src/services/runtimeIdentity/sync.ts","src/services/runtimePackages/index.ts","src/services/scopeInput/index.ts","src/services/serialRunner/index.ts","src/services/serverHost/index.ts","src/services/serverTelemetry/index.edge.ts","src/services/serverTelemetry/index.ts","src/services/sessionAccess/index.ts","src/services/sessionAccess/type.ts","src/services/sessionAttachments/index.edge.ts","src/services/sessionAttachments/index.ts","src/services/sessionAttachments/type.ts","src/services/sessionFiles/index.ts","src/services/sessionFiles/sessionDirectory.edge.ts","src/services/sessionFiles/sessionDirectory.ts","src/services/sessionGitStatus/index.ts","src/services/sessionGitStatus/type.ts","src/services/sessionLifecycle/index.ts","src/services/sessionLifecycle/type.ts","src/services/sessionMcpRoutePaths/index.ts","src/services/sessionPresentation/index.ts","src/services/sessionWorkspaceMove/index.ts","src/services/sessionWorkspaceMove/type.ts","src/services/skillPrompt/index.ts","src/services/sqliteSessionHistory/index.ts","src/services/sqliteSessionStorage/index.ts","src/services/sqliteTranscriptReader/index.ts","src/services/telemetry/index.ts","src/services/testMode/index.ts","src/services/toolContinuation/index.ts","src/services/toolCost/index.ts","src/services/toolInventory/index.ts","src/services/toolNames/index.ts","src/services/toolOverrides/index.ts","src/services/toolPrompt/index.ts","src/services/toolSurface/index.ts","src/services/traceContext/index.ts","src/services/transcriptPages/index.ts","src/services/transitionClassifier/index.ts","src/services/transitionCoordinator/index.ts","src/services/voiceReloadHandoff/index.ts","src/services/voiceToolsContract/index.ts","src/services/webCompositions/index.ts","src/services/workspaceLookup/index.ts","src/services/workspaceRegistry/index.ts","src/services/workspaceRegistry/sync.edge.ts","src/services/workspaceRegistry/sync.ts","src/services/workspaceRegistry/workspaceRecords.ts","src/services/workspaceSandboxes/index.ts","src/systems/child/adapters/headlessChildSessionService.ts","src/systems/child/adapters/remoteChildSessionService.ts","src/systems/child/services/childSession/index.ts","src/systems/child/types/childSession.ts","src/systems/child/types/childSessionInput.ts","src/systems/child/types/remoteChildSession.ts","src/systems/main/adapters/headlessHost.ts","src/systems/main/adapters/headlessSessionHost.ts","src/systems/main/adapters/headlessSessionManager.ts","src/systems/main/types/headlessHost.ts","src/systems/main/types/headlessSessionHost.ts","src/systems/main/types/headlessSessionManager.ts","src/testing/pi/extensionScenarios.ts","src/testing/pi/testHost.ts","src/types/config.ts","src/types/contextApi.ts","src/types/kernel.ts","src/types/remote.ts","src/types/server/agentSessionForward.ts","src/types/server/auth.ts","src/types/server/directHarnessRuntime.ts","src/types/server/headlessClient.ts","src/types/server/session.ts","src/types/server/sessionMcp.ts","src/types/server/sessionToolSurface.ts","src/types/telemetry.ts","src/web/hostSlots.ts","src/web/models/globalStore.ts","src/web/models/sessionStore.ts","src/web/models/workspaceStore.ts","src/web/schemas/bundleAssetPolicy.ts","src/web/schemas/onboarding.ts","src/web/schemas/template.ts","src/web/services/apiClient/index.ts","src/web/services/apiPaths/index.ts","src/web/services/apiRoutes/index.ts","src/web/services/hubRevisions/index.ts","src/web/services/mcpWidget.ts","src/web/services/nativeApiTransport/index.ts","src/web/services/nativeByteCodec/index.ts","src/web/services/nativeByteCodec/type.ts","src/web/services/railSteps/index.ts","src/web/services/sessionRegistry/index.ts","src/web/services/testing/channels.ts","src/web/services/testing/index.ts","src/web/services/testing/rpcStub.ts","src/web/services/testing/slotProps.ts","src/web/services/testing/templateRail.ts","src/web/services/toolResult/index.ts","src/web/types/extensionFile.ts","src/web/types/mcpWidget.ts","src/web/types/modelContext.ts","src/web/types/nativeTemplate.ts","src/web/types/sessionRegistry.ts","src/web/types/template.ts","src/web/types/webPlugin.ts","tsdown.config.ts"],"sourceRevision":"0a0a9aac8ae895645c2383ce0247c653","manifestRevision":"f457d05f8be569331b54561d03335dbc","outputFiles":["NOTICE","README.md","dist/_virtual/_rolldown/runtime.cjs","dist/agentModel.cjs","dist/agentModel.mjs","dist/apiContracts.cjs","dist/apiContracts.mjs","dist/approval.cjs","dist/approval.mjs","dist/askUser.cjs","dist/askUser.mjs","dist/backgroundWork.cjs","dist/backgroundWork.mjs","dist/bundleAssetPolicy.cjs","dist/bundleAssetPolicy.mjs","dist/chatgptAuth.cjs","dist/chatgptAuth.mjs","dist/childProcess.cjs","dist/childProcess.mjs","dist/childSession.cjs","dist/childSession.mjs","dist/clientDevices.cjs","dist/clientDevices.mjs","dist/clientMetadata.cjs","dist/clientMetadata.mjs","dist/codemode.cjs","dist/codemode.mjs","dist/config.cjs","dist/config.mjs","dist/contextApi.cjs","dist/contextApi.mjs","dist/contextContributions.cjs","dist/contextContributions.mjs","dist/contextDetail.cjs","dist/contextDetail.mjs","dist/contextDetailStore.cjs","dist/contextDetailStore.mjs","dist/contextProjection.cjs","dist/contextProjection.mjs","dist/cordisHost.cjs","dist/cordisHost.mjs","dist/delegation.cjs","dist/delegation.mjs","dist/executionBudget.cjs","dist/executionBudget.mjs","dist/extensionFile.cjs","dist/extensionFile.mjs","dist/footer.cjs","dist/footer.mjs","dist/formReview.cjs","dist/formReview.mjs","dist/headless.cjs","dist/headless.mjs","dist/headlessHub.cjs","dist/headlessHub.mjs","dist/headlessProtocol.cjs","dist/headlessProtocol.mjs","dist/headlessServer.cjs","dist/headlessServer.mjs","dist/headlessSessionHost.cjs","dist/headlessSessionHost.mjs","dist/headlessSessionManager.cjs","dist/headlessSessionManager.mjs","dist/help.cjs","dist/help.mjs","dist/history.cjs","dist/history.mjs","dist/historyOwnership.cjs","dist/historyOwnership.mjs","dist/hubChannel.cjs","dist/hubChannel.mjs","dist/images.cjs","dist/images.mjs","dist/index.cjs","dist/index.mjs","dist/inputTemplate.cjs","dist/inputTemplate.mjs","dist/interop/chord.mjs","dist/interop/chordContext.mjs","dist/interop/piCodingAgent.mjs","dist/json.cjs","dist/json.mjs","dist/kernel.cjs","dist/kernel.mjs","dist/leader.cjs","dist/leader.mjs","dist/logSinkTelemetry.cjs","dist/logSinkTelemetry.mjs","dist/machineApi.cjs","dist/machineApi.mjs","dist/main.cjs","dist/main.mjs","dist/mcp.cjs","dist/mcp.mjs","dist/mcpFacet.cjs","dist/mcpFacet.mjs","dist/mcpProjection.cjs","dist/mcpProjection.mjs","dist/mcpSchemaCost.cjs","dist/mcpSchemaCost.mjs","dist/mcpSession.cjs","dist/mcpSession.mjs","dist/mcpStatus.cjs","dist/mcpStatus.mjs","dist/mcpToolResolver.cjs","dist/mcpToolResolver.mjs","dist/mcpWidget.cjs","dist/mcpWidget.mjs","dist/modelGateway.cjs","dist/modelGateway.mjs","dist/moduleResolution.cjs","dist/moduleResolution.mjs","dist/narration.cjs","dist/narration.mjs","dist/native.cjs","dist/native.mjs","dist/nodePlatform.cjs","dist/nodePlatform.mjs","dist/notification.cjs","dist/notification.mjs","dist/packageApi.cjs","dist/packageApi.mjs","dist/packageApiServer.cjs","dist/packageApiServer.mjs","dist/pairingPage.cjs","dist/pairingPage.mjs","dist/personTimeZone.cjs","dist/personTimeZone.mjs","dist/piSettings.cjs","dist/piSettings.mjs","dist/platform.cjs","dist/platform.mjs","dist/pluginProtocol.cjs","dist/pluginProtocol.mjs","dist/poPackage.cjs","dist/poPackage.mjs","dist/profileIdentity.cjs","dist/profileIdentity.mjs","dist/protocol.cjs","dist/protocol.mjs","dist/protocolTransport.cjs","dist/protocolTransport.mjs","dist/providerAuth.cjs","dist/providerAuth.mjs","dist/readiness.cjs","dist/readiness.mjs","dist/remoteChildSession.cjs","dist/remoteChildSession.mjs","dist/remoteContract.cjs","dist/remoteContract.mjs","dist/remoteOrigin.cjs","dist/remoteOrigin.mjs","dist/runtimeConfig.cjs","dist/runtimeConfig.mjs","dist/runtimeContextApi.cjs","dist/runtimeContextApi.mjs","dist/runtimeCordisHost.cjs","dist/runtimeCordisHost.mjs","dist/runtimeHeadlessSessionManager.cjs","dist/runtimeHeadlessSessionManager.mjs","dist/runtimeIdentity.cjs","dist/runtimeIdentity.mjs","dist/runtimeJson.cjs","dist/runtimeJson.mjs","dist/runtimeLogSinkTelemetry.cjs","dist/runtimeLogSinkTelemetry.mjs","dist/runtimePackages.cjs","dist/runtimePackages.mjs","dist/runtimePiSettings.cjs","dist/runtimePiSettings.mjs","dist/runtimeProtocol.cjs","dist/runtimeProtocol.mjs","dist/runtimeToolNames.cjs","dist/runtimeToolNames.mjs","dist/runtimeTransition.cjs","dist/runtimeTransition.mjs","dist/sandboxIdentity.cjs","dist/sandboxIdentity.mjs","dist/server.cjs","dist/server.mjs","dist/serverPlugin.cjs","dist/serverPlugin.mjs","dist/serverTelemetry.cjs","dist/serverTelemetry.mjs","dist/sessionFilesApi.cjs","dist/sessionFilesApi.mjs","dist/sessionMcpContract.cjs","dist/sessionMcpContract.mjs","dist/sessionProtocol.cjs","dist/sessionProtocol.mjs","dist/skills.cjs","dist/skills.mjs","dist/sqliteSessionStorage.cjs","dist/sqliteSessionStorage.mjs","dist/src/constants/agentSettled.cjs","dist/src/constants/agentSettled.mjs","dist/src/constants/cloud.cjs","dist/src/constants/cloud.mjs","dist/src/constants/contextApi.cjs","dist/src/constants/contextApi.mjs","dist/src/constants/fixedCore.cjs","dist/src/constants/fixedCore.mjs","dist/src/constants/globalSettings.cjs","dist/src/constants/globalSettings.mjs","dist/src/constants/modelGateway.cjs","dist/src/constants/modelGateway.mjs","dist/src/constants/nativeHost.cjs","dist/src/constants/nativeHost.mjs","dist/src/constants/remote.cjs","dist/src/constants/remote.mjs","dist/src/constants/sessionFiles.cjs","dist/src/constants/sessionFiles.mjs","dist/src/constants/template.cjs","dist/src/constants/template.mjs","dist/src/constants/voiceReloadHandoff.cjs","dist/src/constants/voiceReloadHandoff.mjs","dist/src/constants/voiceTools.cjs","dist/src/constants/voiceTools.mjs","dist/src/extensions/extensionFile.cjs","dist/src/extensions/extensionFile.mjs","dist/src/extensions/serverPlugin.cjs","dist/src/extensions/serverPlugin.mjs","dist/src/extensions/webPlugin.cjs","dist/src/extensions/webPlugin.mjs","dist/src/pi/piSessionRuntime.cjs","dist/src/pi/piSessionRuntime.mjs","dist/src/schemas/agentModel.cjs","dist/src/schemas/agentModel.mjs","dist/src/schemas/agentRun.cjs","dist/src/schemas/agentRun.mjs","dist/src/schemas/approval.cjs","dist/src/schemas/approval.mjs","dist/src/schemas/approvalPrompt.cjs","dist/src/schemas/approvalPrompt.mjs","dist/src/schemas/askUser.cjs","dist/src/schemas/askUser.mjs","dist/src/schemas/backgroundWork.cjs","dist/src/schemas/backgroundWork.mjs","dist/src/schemas/brain.cjs","dist/src/schemas/brain.mjs","dist/src/schemas/childProcess.cjs","dist/src/schemas/childProcess.mjs","dist/src/schemas/codemode.cjs","dist/src/schemas/codemode.mjs","dist/src/schemas/contextContributions.cjs","dist/src/schemas/contextContributions.mjs","dist/src/schemas/delegation.cjs","dist/src/schemas/delegation.mjs","dist/src/schemas/federation.cjs","dist/src/schemas/federation.mjs","dist/src/schemas/footer.cjs","dist/src/schemas/footer.mjs","dist/src/schemas/formReview.cjs","dist/src/schemas/formReview.mjs","dist/src/schemas/headless.cjs","dist/src/schemas/headless.mjs","dist/src/schemas/help.cjs","dist/src/schemas/help.mjs","dist/src/schemas/home.cjs","dist/src/schemas/home.mjs","dist/src/schemas/hostServiceContracts.cjs","dist/src/schemas/hostServiceContracts.mjs","dist/src/schemas/hostServices.cjs","dist/src/schemas/hostServices.mjs","dist/src/schemas/hostTeam.cjs","dist/src/schemas/hostTeam.mjs","dist/src/schemas/httpApiContracts.cjs","dist/src/schemas/httpApiContracts.mjs","dist/src/schemas/hubChannel.cjs","dist/src/schemas/hubChannel.mjs","dist/src/schemas/humanIdentity.cjs","dist/src/schemas/humanIdentity.mjs","dist/src/schemas/identity.cjs","dist/src/schemas/identity.mjs","dist/src/schemas/leader.cjs","dist/src/schemas/leader.mjs","dist/src/schemas/mcp.cjs","dist/src/schemas/mcp.mjs","dist/src/schemas/mcpFacet.cjs","dist/src/schemas/mcpFacet.mjs","dist/src/schemas/mcpProjection.cjs","dist/src/schemas/mcpProjection.mjs","dist/src/schemas/mcpSession.cjs","dist/src/schemas/mcpSession.mjs","dist/src/schemas/mcpStatus.cjs","dist/src/schemas/mcpStatus.mjs","dist/src/schemas/mcpToolResolver.cjs","dist/src/schemas/mcpToolResolver.mjs","dist/src/schemas/modelGateway.cjs","dist/src/schemas/modelGateway.mjs","dist/src/schemas/narration.cjs","dist/src/schemas/narration.mjs","dist/src/schemas/notification.cjs","dist/src/schemas/notification.mjs","dist/src/schemas/packageApi.cjs","dist/src/schemas/packageApi.mjs","dist/src/schemas/personTimeZone.cjs","dist/src/schemas/personTimeZone.mjs","dist/src/schemas/platform.cjs","dist/src/schemas/platform.mjs","dist/src/schemas/pluginCatalog.cjs","dist/src/schemas/pluginCatalog.mjs","dist/src/schemas/pluginContributions.cjs","dist/src/schemas/pluginContributions.mjs","dist/src/schemas/pluginProtocol.cjs","dist/src/schemas/pluginProtocol.mjs","dist/src/schemas/profileIdentity.cjs","dist/src/schemas/profileIdentity.mjs","dist/src/schemas/protocolChannelsContract.cjs","dist/src/schemas/protocolChannelsContract.mjs","dist/src/schemas/protocolContracts.cjs","dist/src/schemas/protocolContracts.mjs","dist/src/schemas/protocolHubContract.cjs","dist/src/schemas/protocolHubContract.mjs","dist/src/schemas/protocolService.cjs","dist/src/schemas/protocolService.mjs","dist/src/schemas/protocolSessionContract.cjs","dist/src/schemas/protocolSessionContract.mjs","dist/src/schemas/protocolThreadContract.cjs","dist/src/schemas/protocolThreadContract.mjs","dist/src/schemas/readiness.cjs","dist/src/schemas/readiness.mjs","dist/src/schemas/remoteGateway.cjs","dist/src/schemas/remoteGateway.mjs","dist/src/schemas/remoteOrigin.cjs","dist/src/schemas/remoteOrigin.mjs","dist/src/schemas/sandboxIdentity.cjs","dist/src/schemas/sandboxIdentity.mjs","dist/src/schemas/serverPlugin.cjs","dist/src/schemas/serverPlugin.mjs","dist/src/schemas/serverScope.cjs","dist/src/schemas/serverScope.mjs","dist/src/schemas/sessionApiContracts.cjs","dist/src/schemas/sessionApiContracts.mjs","dist/src/schemas/sessionLifecycle.cjs","dist/src/schemas/sessionLifecycle.mjs","dist/src/schemas/sessionProtocol.cjs","dist/src/schemas/sessionProtocol.mjs","dist/src/schemas/sharedModels.cjs","dist/src/schemas/sharedModels.mjs","dist/src/schemas/skills.cjs","dist/src/schemas/skills.mjs","dist/src/schemas/space.cjs","dist/src/schemas/space.mjs","dist/src/schemas/toolOverrides.cjs","dist/src/schemas/toolOverrides.mjs","dist/src/schemas/toolSurface.cjs","dist/src/schemas/toolSurface.mjs","dist/src/schemas/uiHub.cjs","dist/src/schemas/uiHub.mjs","dist/src/schemas/voiceReloadHandoff.cjs","dist/src/schemas/voiceReloadHandoff.mjs","dist/src/schemas/voiceTools.cjs","dist/src/schemas/voiceTools.mjs","dist/src/schemas/workflow.cjs","dist/src/schemas/workflow.mjs","dist/src/schemas/workspaceRegistry.cjs","dist/src/schemas/workspaceRegistry.mjs","dist/src/schemas/workspaceSandboxes.cjs","dist/src/schemas/workspaceSandboxes.mjs","dist/src/server/conversationEvents.cjs","dist/src/server/conversationEvents.mjs","dist/src/server/directHarnessRuntime.cjs","dist/src/server/directHarnessRuntime.mjs","dist/src/server/harnessErrorMessage.cjs","dist/src/server/harnessErrorMessage.mjs","dist/src/server/largeFrameLink.cjs","dist/src/server/largeFrameLink.mjs","dist/src/server/liveImport.cjs","dist/src/server/liveImport.mjs","dist/src/server/mcpBundleLoader.cjs","dist/src/server/mcpBundleLoader.mjs","dist/src/server/providerRoutes.cjs","dist/src/server/providerRoutes.mjs","dist/src/server/providerRuntime.cjs","dist/src/server/providerRuntime.mjs","dist/src/server/serverPackages.cjs","dist/src/server/serverPackages.mjs","dist/src/server/serverScope.cjs","dist/src/server/serverScope.mjs","dist/src/server/threadJournals.cjs","dist/src/server/threadJournals.mjs","dist/src/services/apiSurfaceAssert/index.cjs","dist/src/services/apiSurfaceAssert/index.mjs","dist/src/services/approvalGate/index.cjs","dist/src/services/approvalGate/index.mjs","dist/src/services/bundlePublication/index.cjs","dist/src/services/bundlePublication/index.mjs","dist/src/services/chatgptAuth/index.cjs","dist/src/services/chatgptAuth/index.mjs","dist/src/services/chatgptImages/index.cjs","dist/src/services/chatgptImages/index.mjs","dist/src/services/chatgptLogin/index.cjs","dist/src/services/chatgptLogin/index.mjs","dist/src/services/chatgptWebSearch/index.cjs","dist/src/services/chatgptWebSearch/index.mjs","dist/src/services/chordAdapter/index.cjs","dist/src/services/chordAdapter/index.mjs","dist/src/services/clientDevices/index.cjs","dist/src/services/clientDevices/index.mjs","dist/src/services/clientMetadata/_lib/codec.cjs","dist/src/services/clientMetadata/_lib/codec.mjs","dist/src/services/clientMetadata/_lib/deviceLabel.cjs","dist/src/services/clientMetadata/_lib/deviceLabel.mjs","dist/src/services/contextApiUrls/index.cjs","dist/src/services/contextApiUrls/index.mjs","dist/src/services/contextContributions/index.cjs","dist/src/services/contextContributions/index.mjs","dist/src/services/contextUsage/index.cjs","dist/src/services/contextUsage/index.mjs","dist/src/services/durableNavigation/docs.cjs","dist/src/services/durableNavigation/docs.mjs","dist/src/services/durableNavigation/index.cjs","dist/src/services/durableNavigation/index.mjs","dist/src/services/durableQueue/docs.cjs","dist/src/services/durableQueue/docs.mjs","dist/src/services/durableQueue/index.cjs","dist/src/services/durableQueue/index.mjs","dist/src/services/durableRequestReceipts/docs.cjs","dist/src/services/durableRequestReceipts/docs.mjs","dist/src/services/durableRequestReceipts/index.cjs","dist/src/services/durableRequestReceipts/index.mjs","dist/src/services/durableResumeSnapshots/docs.cjs","dist/src/services/durableResumeSnapshots/docs.mjs","dist/src/services/durableResumeSnapshots/index.cjs","dist/src/services/durableResumeSnapshots/index.mjs","dist/src/services/durableSession/docs.cjs","dist/src/services/durableSession/docs.mjs","dist/src/services/durableSession/index.cjs","dist/src/services/durableSession/index.mjs","dist/src/services/durableSubagents/docs.cjs","dist/src/services/durableSubagents/docs.mjs","dist/src/services/durableSubagents/extension.cjs","dist/src/services/durableSubagents/extension.mjs","dist/src/services/durableSubagents/index.cjs","dist/src/services/durableSubagents/index.mjs","dist/src/services/durableSubagents/tasks.cjs","dist/src/services/durableSubagents/tasks.mjs","dist/src/services/edgeModelRuntime/index.cjs","dist/src/services/edgeModelRuntime/index.mjs","dist/src/services/editPresence/index.cjs","dist/src/services/editPresence/index.mjs","dist/src/services/fileAccess/accessibleFile.cjs","dist/src/services/fileAccess/accessibleFile.mjs","dist/src/services/fileAccess/core.cjs","dist/src/services/fileAccess/core.mjs","dist/src/services/fileAccess/index.cjs","dist/src/services/fileAccess/index.mjs","dist/src/services/guardedFile/index.cjs","dist/src/services/guardedFile/index.mjs","dist/src/services/headlessClient/index.cjs","dist/src/services/headlessClient/index.mjs","dist/src/services/hostServices/index.cjs","dist/src/services/hostServices/index.mjs","dist/src/services/hubChannelHarness/index.cjs","dist/src/services/hubChannelHarness/index.mjs","dist/src/services/inputTemplate/index.cjs","dist/src/services/inputTemplate/index.mjs","dist/src/services/json/core.cjs","dist/src/services/json/core.mjs","dist/src/services/json/sync.cjs","dist/src/services/json/sync.mjs","dist/src/services/kernel/index.cjs","dist/src/services/kernel/index.mjs","dist/src/services/loginFlow/index.cjs","dist/src/services/loginFlow/index.mjs","dist/src/services/modelDispatch/index.cjs","dist/src/services/modelDispatch/index.mjs","dist/src/services/modelGatewayContainer/index.cjs","dist/src/services/modelGatewayContainer/index.mjs","dist/src/services/modelGatewayExecutor/index.cjs","dist/src/services/modelGatewayExecutor/index.mjs","dist/src/services/modelGatewayHost/index.cjs","dist/src/services/modelGatewayHost/index.mjs","dist/src/services/modelGatewayWire/index.cjs","dist/src/services/modelGatewayWire/index.mjs","dist/src/services/nativeChildTools/index.cjs","dist/src/services/nativeChildTools/index.mjs","dist/src/services/nodeHost/index.cjs","dist/src/services/nodeHost/index.mjs","dist/src/services/nodeModelDependencies/index.cjs","dist/src/services/nodeModelDependencies/index.mjs","dist/src/services/openSessionRegistry/index.cjs","dist/src/services/openSessionRegistry/index.mjs","dist/src/services/openSessionRegistry/openSessionRecords.cjs","dist/src/services/openSessionRegistry/openSessionRecords.mjs","dist/src/services/openSessionRegistry/sync.cjs","dist/src/services/openSessionRegistry/sync.mjs","dist/src/services/packageApiHarness/index.cjs","dist/src/services/packageApiHarness/index.mjs","dist/src/services/packageContentRevision/index.cjs","dist/src/services/packageContentRevision/index.mjs","dist/src/services/packageResource/index.cjs","dist/src/services/packageResource/index.mjs","dist/src/services/pairingPage/index.cjs","dist/src/services/pairingPage/index.mjs","dist/src/services/piArgs/index.cjs","dist/src/services/piArgs/index.mjs","dist/src/services/piExtensionHost/index.cjs","dist/src/services/piExtensionHost/index.mjs","dist/src/services/piHelpTools/index.cjs","dist/src/services/piHelpTools/index.mjs","dist/src/services/piMessages/index.cjs","dist/src/services/piMessages/index.mjs","dist/src/services/piSessionEntries/index.cjs","dist/src/services/piSessionEntries/index.mjs","dist/src/services/piSettings/core.cjs","dist/src/services/piSettings/core.mjs","dist/src/services/piSettings/sync.cjs","dist/src/services/piSettings/sync.mjs","dist/src/services/piSummary/index.cjs","dist/src/services/piSummary/index.mjs","dist/src/services/platformFiles/index.cjs","dist/src/services/platformFiles/index.mjs","dist/src/services/platformFiles/rootBoundReplace.cjs","dist/src/services/platformFiles/rootBoundReplace.mjs","dist/src/services/pluginLifecycle/index.cjs","dist/src/services/pluginLifecycle/index.mjs","dist/src/services/poPackage/core.cjs","dist/src/services/poPackage/core.mjs","dist/src/services/poPackage/sync.cjs","dist/src/services/poPackage/sync.mjs","dist/src/services/poTelemetry/index.cjs","dist/src/services/poTelemetry/index.mjs","dist/src/services/portableConfig/index.cjs","dist/src/services/portableConfig/index.mjs","dist/src/services/providerAuth/index.cjs","dist/src/services/providerAuth/index.mjs","dist/src/services/providerImages/fitter.cjs","dist/src/services/providerImages/fitter.mjs","dist/src/services/providerImages/index.cjs","dist/src/services/providerImages/index.mjs","dist/src/services/runtimeIdentity/sync.cjs","dist/src/services/runtimeIdentity/sync.mjs","dist/src/services/scopeInput/index.cjs","dist/src/services/scopeInput/index.mjs","dist/src/services/serialRunner/index.cjs","dist/src/services/serialRunner/index.mjs","dist/src/services/serverHost/index.cjs","dist/src/services/serverHost/index.mjs","dist/src/services/sessionAccess/index.cjs","dist/src/services/sessionAccess/index.mjs","dist/src/services/sessionAttachments/index.cjs","dist/src/services/sessionAttachments/index.mjs","dist/src/services/sessionFiles/index.cjs","dist/src/services/sessionFiles/index.mjs","dist/src/services/sessionFiles/sessionDirectory.cjs","dist/src/services/sessionFiles/sessionDirectory.mjs","dist/src/services/sessionGitStatus/index.cjs","dist/src/services/sessionGitStatus/index.mjs","dist/src/services/sessionLifecycle/index.cjs","dist/src/services/sessionLifecycle/index.mjs","dist/src/services/sessionMcpRoutePaths/index.cjs","dist/src/services/sessionMcpRoutePaths/index.mjs","dist/src/services/sessionPresentation/index.cjs","dist/src/services/sessionPresentation/index.mjs","dist/src/services/sessionWorkspaceMove/index.cjs","dist/src/services/sessionWorkspaceMove/index.mjs","dist/src/services/skillPrompt/index.cjs","dist/src/services/skillPrompt/index.mjs","dist/src/services/sqliteSessionHistory/index.cjs","dist/src/services/sqliteSessionHistory/index.mjs","dist/src/services/sqliteTranscriptReader/index.cjs","dist/src/services/sqliteTranscriptReader/index.mjs","dist/src/services/telemetry/index.cjs","dist/src/services/telemetry/index.mjs","dist/src/services/testMode/index.cjs","dist/src/services/testMode/index.mjs","dist/src/services/toolContinuation/index.cjs","dist/src/services/toolContinuation/index.mjs","dist/src/services/toolCost/index.cjs","dist/src/services/toolCost/index.mjs","dist/src/services/toolOverrides/index.cjs","dist/src/services/toolOverrides/index.mjs","dist/src/services/toolPrompt/index.cjs","dist/src/services/toolPrompt/index.mjs","dist/src/services/toolSurface/index.cjs","dist/src/services/toolSurface/index.mjs","dist/src/services/traceContext/index.cjs","dist/src/services/traceContext/index.mjs","dist/src/services/transcriptPages/index.cjs","dist/src/services/transcriptPages/index.mjs","dist/src/services/voiceReloadHandoff/index.cjs","dist/src/services/voiceReloadHandoff/index.mjs","dist/src/services/voiceToolsContract/index.cjs","dist/src/services/voiceToolsContract/index.mjs","dist/src/services/workspaceLookup/index.cjs","dist/src/services/workspaceLookup/index.mjs","dist/src/services/workspaceRegistry/index.cjs","dist/src/services/workspaceRegistry/index.mjs","dist/src/services/workspaceRegistry/sync.cjs","dist/src/services/workspaceRegistry/sync.mjs","dist/src/services/workspaceRegistry/workspaceRecords.cjs","dist/src/services/workspaceRegistry/workspaceRecords.mjs","dist/src/services/workspaceSandboxes/index.cjs","dist/src/services/workspaceSandboxes/index.mjs","dist/src/systems/child/adapters/headlessChildSessionService.cjs","dist/src/systems/child/adapters/headlessChildSessionService.mjs","dist/src/systems/child/adapters/remoteChildSessionService.cjs","dist/src/systems/child/adapters/remoteChildSessionService.mjs","dist/src/systems/child/services/childSession/index.cjs","dist/src/systems/child/services/childSession/index.mjs","dist/src/systems/child/types/childSession.cjs","dist/src/systems/child/types/childSession.mjs","dist/src/systems/main/adapters/headlessHost.cjs","dist/src/systems/main/adapters/headlessHost.mjs","dist/src/systems/main/adapters/headlessSessionHost.cjs","dist/src/systems/main/adapters/headlessSessionHost.mjs","dist/src/testing/pi/extensionScenarios.cjs","dist/src/testing/pi/extensionScenarios.mjs","dist/src/testing/pi/testHost.cjs","dist/src/testing/pi/testHost.mjs","dist/src/web/hostSlots.cjs","dist/src/web/hostSlots.mjs","dist/src/web/models/globalStore.cjs","dist/src/web/models/globalStore.mjs","dist/src/web/models/sessionStore.cjs","dist/src/web/models/sessionStore.mjs","dist/src/web/models/workspaceStore.cjs","dist/src/web/models/workspaceStore.mjs","dist/src/web/schemas/bundleAssetPolicy.cjs","dist/src/web/schemas/bundleAssetPolicy.mjs","dist/src/web/schemas/onboarding.cjs","dist/src/web/schemas/onboarding.mjs","dist/src/web/schemas/template.cjs","dist/src/web/schemas/template.mjs","dist/src/web/services/apiClient/index.cjs","dist/src/web/services/apiClient/index.mjs","dist/src/web/services/apiPaths/index.cjs","dist/src/web/services/apiPaths/index.mjs","dist/src/web/services/apiRoutes/index.cjs","dist/src/web/services/apiRoutes/index.mjs","dist/src/web/services/hubRevisions/index.cjs","dist/src/web/services/hubRevisions/index.mjs","dist/src/web/services/mcpWidget.cjs","dist/src/web/services/mcpWidget.mjs","dist/src/web/services/nativeApiTransport/index.cjs","dist/src/web/services/nativeApiTransport/index.mjs","dist/src/web/services/nativeByteCodec/index.cjs","dist/src/web/services/nativeByteCodec/index.mjs","dist/src/web/services/railSteps/index.cjs","dist/src/web/services/railSteps/index.mjs","dist/src/web/services/sessionRegistry/index.cjs","dist/src/web/services/sessionRegistry/index.mjs","dist/src/web/services/testing/channels.cjs","dist/src/web/services/testing/channels.mjs","dist/src/web/services/testing/index.cjs","dist/src/web/services/testing/index.mjs","dist/src/web/services/testing/rpcStub.cjs","dist/src/web/services/testing/rpcStub.mjs","dist/src/web/services/testing/slotProps.cjs","dist/src/web/services/testing/slotProps.mjs","dist/src/web/services/testing/templateRail.cjs","dist/src/web/services/testing/templateRail.mjs","dist/src/web/services/toolResult/index.cjs","dist/src/web/services/toolResult/index.mjs","dist/telemetry.cjs","dist/telemetry.mjs","dist/testMode.cjs","dist/testMode.mjs","dist/testing.cjs","dist/testing.mjs","dist/toolInventory.cjs","dist/toolInventory.mjs","dist/toolNames.cjs","dist/toolNames.mjs","dist/toolOverrides.cjs","dist/toolOverrides.mjs","dist/toolSurface.cjs","dist/toolSurface.mjs","dist/transition.cjs","dist/transition.d.cjs","dist/transition.mjs","dist/transitionClassifier.cjs","dist/transitionClassifier.mjs","dist/transitionCoordinator.cjs","dist/transitionCoordinator.mjs","dist/typesContextApi.cjs","dist/typesContextApi.mjs","dist/uiHub.cjs","dist/uiHub.mjs","dist/vendor/upm/LICENSE","dist/vendor/upm/_chunks/cli.mjs","dist/vendor/upm/_chunks/exec.mjs","dist/vendor/upm/_chunks/foreign-lock.mjs","dist/vendor/upm/_chunks/index-upgrade.mjs","dist/vendor/upm/_chunks/limit.mjs","dist/vendor/upm/_chunks/link-pool.mjs","dist/vendor/upm/_chunks/main.mjs","dist/vendor/upm/_chunks/metadata.mjs","dist/vendor/upm/_chunks/metadata2.mjs","dist/vendor/upm/_chunks/mirror.mjs","dist/vendor/upm/_chunks/newer.mjs","dist/vendor/upm/_chunks/overrides.mjs","dist/vendor/upm/_chunks/overrides2.mjs","dist/vendor/upm/_chunks/progress.mjs","dist/vendor/upm/_chunks/registry-pool.mjs","dist/vendor/upm/_chunks/registry.mjs","dist/vendor/upm/_chunks/resolve.mjs","dist/vendor/upm/_chunks/shim.mjs","dist/vendor/upm/_chunks/store-backend.mjs","dist/vendor/upm/_chunks/tarball-deps.mjs","dist/vendor/upm/_chunks/trace.mjs","dist/vendor/upm/_chunks/tree-lock.mjs","dist/vendor/upm/_chunks/unpack-pool.mjs","dist/vendor/upm/_chunks/unpack.mjs","dist/vendor/upm/_chunks/verify.mjs","dist/vendor/upm/_chunks/vouch.mjs","dist/vendor/upm/_chunks/workspaces.mjs","dist/vendor/upm/index.mjs","dist/vendor/upm/resolver.mjs","dist/vendor/upm/upm.mjs","dist/vendor/upm/upx.mjs","dist/voiceReloadHandoff.cjs","dist/voiceReloadHandoff.mjs","dist/voiceTools.cjs","dist/voiceTools.mjs","dist/web.cjs","dist/web.mjs","dist/webCompositions.cjs","dist/webCompositions.mjs","dist/webTesting.cjs","dist/webTesting.mjs","dist/workflow.cjs","dist/workflow.mjs","dist/workspaceRegistry.cjs","dist/workspaceRegistry.mjs","dist/workspaceSandboxes.cjs","dist/workspaceSandboxes.mjs","licenses/Codex-Apache-2.0.txt"],"outputRevision":"7b3dba157c6b0c3ba6b72995c19e6515"}
|
|
1
|
+
{"version":1,"platformRequirements":{},"sourceFiles":["NOTICE","README.md","licenses/Codex-Apache-2.0.txt","package.json","runtimeEntries.json","src/constants/agentSettled.ts","src/constants/auth.ts","src/constants/cloud.ts","src/constants/contextApi.ts","src/constants/fixedCore.ts","src/constants/globalSettings.ts","src/constants/modelGateway.ts","src/constants/nativeHost.ts","src/constants/remote.ts","src/constants/sessionFiles.ts","src/constants/template.ts","src/constants/voiceReloadHandoff.ts","src/constants/voiceTools.ts","src/exports/agentModel.ts","src/exports/apiContracts.ts","src/exports/approval.ts","src/exports/askUser.ts","src/exports/backgroundWork.ts","src/exports/bundleAssetPolicy.ts","src/exports/chatgptAuth.ts","src/exports/childProcess.ts","src/exports/childSession.ts","src/exports/clientDevices.ts","src/exports/clientMetadata.ts","src/exports/codemode.ts","src/exports/config.ts","src/exports/contextApi.ts","src/exports/contextContributions.ts","src/exports/cordisHost.ts","src/exports/delegation.ts","src/exports/extensionFile.ts","src/exports/footer.ts","src/exports/formReview.ts","src/exports/headless.ts","src/exports/help.ts","src/exports/history.ts","src/exports/hubChannel.ts","src/exports/images.ts","src/exports/index.ts","src/exports/inputTemplate.ts","src/exports/json.ts","src/exports/kernel.ts","src/exports/leader.ts","src/exports/logSinkTelemetry.ts","src/exports/main.ts","src/exports/mcp.ts","src/exports/mcpFacet.ts","src/exports/mcpProjection.ts","src/exports/mcpSession.ts","src/exports/mcpStatus.ts","src/exports/mcpToolResolver.ts","src/exports/mcpWidget.ts","src/exports/modelGateway.ts","src/exports/narration.ts","src/exports/native.ts","src/exports/notification.ts","src/exports/packageApi.ts","src/exports/pairingPage.ts","src/exports/personTimeZone.ts","src/exports/piSettings.ts","src/exports/platform.ts","src/exports/pluginProtocol.ts","src/exports/profileIdentity.ts","src/exports/protocol.ts","src/exports/protocolTransport.ts","src/exports/providerAuth.ts","src/exports/readiness.ts","src/exports/remoteChildSession.ts","src/exports/remoteContract.ts","src/exports/remoteOrigin.ts","src/exports/sandboxIdentity.ts","src/exports/server.ts","src/exports/serverPlugin.ts","src/exports/sessionMcpContract.ts","src/exports/sessionProtocol.ts","src/exports/skills.ts","src/exports/telemetry.ts","src/exports/testMode.ts","src/exports/testing.ts","src/exports/toolNames.ts","src/exports/toolOverrides.ts","src/exports/toolSurface.ts","src/exports/transition.ts","src/exports/uiHub.ts","src/exports/voiceReloadHandoff.ts","src/exports/voiceTools.ts","src/exports/web.ts","src/exports/webTesting.ts","src/exports/workflow.ts","src/exports/workspaceRegistry.ts","src/exports/workspaceSandboxes.ts","src/extensions/extensionFile.ts","src/extensions/serverPlugin.ts","src/extensions/webPlugin.ts","src/pi/cordisHost.ts","src/pi/piSessionRuntime.ts","src/schemas/agentModel.ts","src/schemas/agentRun.ts","src/schemas/apiContracts.ts","src/schemas/approval.ts","src/schemas/approvalPrompt.ts","src/schemas/askUser.ts","src/schemas/backgroundWork.ts","src/schemas/brain.ts","src/schemas/builtinApiContracts.ts","src/schemas/childProcess.ts","src/schemas/clientDevices.ts","src/schemas/clientMetadata.ts","src/schemas/codemode.ts","src/schemas/config.ts","src/schemas/contextContributions.ts","src/schemas/delegation.ts","src/schemas/extensionFile.ts","src/schemas/federation.ts","src/schemas/footer.ts","src/schemas/formReview.ts","src/schemas/headless.ts","src/schemas/help.ts","src/schemas/home.ts","src/schemas/hostServiceContracts.ts","src/schemas/hostServices.ts","src/schemas/hostTeam.ts","src/schemas/httpApiContracts.ts","src/schemas/hubChannel.ts","src/schemas/humanIdentity.ts","src/schemas/identity.ts","src/schemas/leader.ts","src/schemas/mcp.ts","src/schemas/mcpBundle.ts","src/schemas/mcpFacet.ts","src/schemas/mcpProjection.ts","src/schemas/mcpSession.ts","src/schemas/mcpStatus.ts","src/schemas/mcpToolResolver.ts","src/schemas/modelGateway.ts","src/schemas/narration.ts","src/schemas/notification.ts","src/schemas/packageApi.ts","src/schemas/personTimeZone.ts","src/schemas/platform.ts","src/schemas/pluginCatalog.ts","src/schemas/pluginContributions.ts","src/schemas/pluginMarketplace.ts","src/schemas/pluginProtocol.ts","src/schemas/profileIdentity.ts","src/schemas/protocol.ts","src/schemas/protocolChannelsContract.ts","src/schemas/protocolContracts.ts","src/schemas/protocolHubContract.ts","src/schemas/protocolService.ts","src/schemas/protocolSessionContract.ts","src/schemas/protocolThreadContract.ts","src/schemas/readiness.ts","src/schemas/remoteApiContracts.ts","src/schemas/remoteGateway.ts","src/schemas/remoteOrigin.ts","src/schemas/sandboxIdentity.ts","src/schemas/serverBundle.ts","src/schemas/serverPlugin.ts","src/schemas/serverScope.ts","src/schemas/sessionApiContracts.ts","src/schemas/sessionLifecycle.ts","src/schemas/sessionMcpActivity.ts","src/schemas/sessionProtocol.ts","src/schemas/sharedModels.ts","src/schemas/skills.ts","src/schemas/space.ts","src/schemas/toolOverrides.ts","src/schemas/toolSurface.ts","src/schemas/transition.ts","src/schemas/transportApiContracts.ts","src/schemas/uiHub.ts","src/schemas/voiceReloadHandoff.ts","src/schemas/voiceTools.ts","src/schemas/workflow.ts","src/schemas/workspaceRegistry.ts","src/schemas/workspaceSandboxes.ts","src/server/contextApi.ts","src/server/conversationEvents.ts","src/server/directHarnessRuntime.ts","src/server/harnessErrorMessage.ts","src/server/headlessHub.ts","src/server/headlessProtocol.ts","src/server/headlessServer.ts","src/server/largeFrameLink.ts","src/server/liveImport.ts","src/server/machineApi.ts","src/server/mcpBundleLoader.ts","src/server/packageApiServer.ts","src/server/providerRoutes.ts","src/server/providerRuntime.ts","src/server/serverPackages.ts","src/server/serverScope.ts","src/server/sessionFilesApi.ts","src/server/threadJournals.ts","src/services/apiContracts/index.ts","src/services/apiSurfaceAssert/index.ts","src/services/approvalGate/index.ts","src/services/approvalGate/type.ts","src/services/bundlePublication/index.ts","src/services/chatgptAuth/index.ts","src/services/chatgptImages/index.ts","src/services/chatgptImages/type.ts","src/services/chatgptLogin/index.ts","src/services/chatgptWebSearch/index.ts","src/services/chordAdapter/index.ts","src/services/chordAdapter/type.ts","src/services/clientDevices/index.ts","src/services/clientMetadata/_lib/codec.ts","src/services/clientMetadata/_lib/deviceLabel.ts","src/services/contextApiUrls/index.ts","src/services/contextContributions/index.ts","src/services/contextDetail/index.ts","src/services/contextDetailStore/index.edge.ts","src/services/contextDetailStore/index.ts","src/services/contextProjection/index.ts","src/services/contextUsage/index.ts","src/services/durableNavigation/docs.ts","src/services/durableNavigation/index.ts","src/services/durableQueue/docs.ts","src/services/durableQueue/index.ts","src/services/durableRequestReceipts/docs.ts","src/services/durableRequestReceipts/index.ts","src/services/durableResumeSnapshots/docs.ts","src/services/durableResumeSnapshots/index.ts","src/services/durableResumeSnapshots/type.ts","src/services/durableSession/docs.ts","src/services/durableSession/index.ts","src/services/durableSubagents/docs.ts","src/services/durableSubagents/extension.ts","src/services/durableSubagents/index.ts","src/services/durableSubagents/tasks.ts","src/services/edgeModelRuntime/index.ts","src/services/edgeModelRuntime/type.ts","src/services/editPresence/index.ts","src/services/executionBudget/index.edge.ts","src/services/executionBudget/index.ts","src/services/fileAccess/accessibleFile.edge.ts","src/services/fileAccess/accessibleFile.ts","src/services/fileAccess/core.ts","src/services/fileAccess/index.ts","src/services/fileAccess/type.ts","src/services/guardedFile/index.edge.ts","src/services/guardedFile/index.ts","src/services/headlessClient/index.ts","src/services/historyCreationFileSystem/index.ts","src/services/historyOwnership/index.ts","src/services/historyOwnership/type.ts","src/services/hostServices/index.ts","src/services/hubChannelHarness/index.ts","src/services/inputTemplate/index.ts","src/services/inputTemplate/type.ts","src/services/json/core.ts","src/services/json/index.ts","src/services/json/sync.edge.ts","src/services/json/sync.ts","src/services/kernel/index.ts","src/services/logSinkTelemetry/index.ts","src/services/loginFlow/index.ts","src/services/mcpSchemaCost/index.ts","src/services/modelDispatch/index.ts","src/services/modelDispatch/type.ts","src/services/modelGatewayContainer/index.ts","src/services/modelGatewayContainer/type.ts","src/services/modelGatewayExecutor/index.ts","src/services/modelGatewayExecutor/type.ts","src/services/modelGatewayHost/index.ts","src/services/modelGatewayHost/type.ts","src/services/modelGatewayWire/index.ts","src/services/moduleResolution/index.ts","src/services/nativeChildTools/index.edge.ts","src/services/nativeChildTools/index.ts","src/services/nodeHost/index.edge.ts","src/services/nodeHost/index.ts","src/services/nodeModelDependencies/index.edge.ts","src/services/nodeModelDependencies/index.ts","src/services/nodePlatform/index.edge.ts","src/services/nodePlatform/index.ts","src/services/openSessionRegistry/index.ts","src/services/openSessionRegistry/openSessionRecords.ts","src/services/openSessionRegistry/sync.edge.ts","src/services/openSessionRegistry/sync.ts","src/services/packageApiHarness/index.ts","src/services/packageContentRevision/index.ts","src/services/packageResource/index.edge.ts","src/services/packageResource/index.ts","src/services/pairingPage/index.ts","src/services/piArgs/index.edge.ts","src/services/piArgs/index.ts","src/services/piExtensionHost/index.ts","src/services/piHelpTools/index.ts","src/services/piMessages/index.ts","src/services/piSessionEntries/index.ts","src/services/piSettings/core.ts","src/services/piSettings/index.ts","src/services/piSettings/sync.edge.ts","src/services/piSettings/sync.ts","src/services/piSummary/index.edge.ts","src/services/piSummary/index.ts","src/services/piSummary/type.ts","src/services/platformFiles/index.ts","src/services/platformFiles/rootBoundReplace.edge.ts","src/services/platformFiles/rootBoundReplace.ts","src/services/pluginLifecycle/index.ts","src/services/poPackage/core.ts","src/services/poPackage/index.ts","src/services/poPackage/sync.edge.ts","src/services/poPackage/sync.ts","src/services/poTelemetry/index.edge.ts","src/services/poTelemetry/index.ts","src/services/portableConfig/index.ts","src/services/providerAuth/index.ts","src/services/providerImages/fitter.ts","src/services/providerImages/index.edge.ts","src/services/providerImages/index.ts","src/services/runtimeIdentity/index.ts","src/services/runtimeIdentity/sync.edge.ts","src/services/runtimeIdentity/sync.ts","src/services/runtimePackages/index.ts","src/services/scopeInput/index.ts","src/services/serialRunner/index.ts","src/services/serverHost/index.ts","src/services/serverTelemetry/index.edge.ts","src/services/serverTelemetry/index.ts","src/services/sessionAccess/index.ts","src/services/sessionAccess/type.ts","src/services/sessionAttachments/index.edge.ts","src/services/sessionAttachments/index.ts","src/services/sessionAttachments/type.ts","src/services/sessionFiles/index.ts","src/services/sessionFiles/sessionDirectory.edge.ts","src/services/sessionFiles/sessionDirectory.ts","src/services/sessionGitStatus/index.ts","src/services/sessionGitStatus/type.ts","src/services/sessionLifecycle/index.ts","src/services/sessionLifecycle/type.ts","src/services/sessionMcpRoutePaths/index.ts","src/services/sessionPresentation/index.ts","src/services/sessionWorkspaceMove/index.ts","src/services/sessionWorkspaceMove/type.ts","src/services/skillPrompt/index.ts","src/services/sqliteSessionHistory/index.ts","src/services/sqliteSessionStorage/index.ts","src/services/sqliteTranscriptReader/index.ts","src/services/telemetry/index.ts","src/services/testMode/index.ts","src/services/toolContinuation/index.ts","src/services/toolCost/index.ts","src/services/toolInventory/index.ts","src/services/toolNames/index.ts","src/services/toolOverrides/index.ts","src/services/toolPrompt/index.ts","src/services/toolSurface/index.ts","src/services/traceContext/index.ts","src/services/transcriptPages/index.ts","src/services/transitionClassifier/index.ts","src/services/transitionCoordinator/index.ts","src/services/voiceReloadHandoff/index.ts","src/services/voiceToolsContract/index.ts","src/services/webCompositions/index.ts","src/services/workspaceLookup/index.ts","src/services/workspaceRegistry/index.ts","src/services/workspaceRegistry/sync.edge.ts","src/services/workspaceRegistry/sync.ts","src/services/workspaceRegistry/workspaceRecords.ts","src/services/workspaceSandboxes/index.ts","src/systems/child/adapters/headlessChildSessionService.ts","src/systems/child/adapters/remoteChildSessionService.ts","src/systems/child/services/childSession/index.ts","src/systems/child/types/childSession.ts","src/systems/child/types/childSessionInput.ts","src/systems/child/types/remoteChildSession.ts","src/systems/main/adapters/headlessHost.ts","src/systems/main/adapters/headlessSessionHost.ts","src/systems/main/adapters/headlessSessionManager.ts","src/systems/main/types/headlessHost.ts","src/systems/main/types/headlessSessionHost.ts","src/systems/main/types/headlessSessionManager.ts","src/testing/pi/extensionScenarios.ts","src/testing/pi/testHost.ts","src/types/config.ts","src/types/contextApi.ts","src/types/kernel.ts","src/types/remote.ts","src/types/server/agentSessionForward.ts","src/types/server/auth.ts","src/types/server/directHarnessRuntime.ts","src/types/server/headlessClient.ts","src/types/server/session.ts","src/types/server/sessionMcp.ts","src/types/server/sessionToolSurface.ts","src/types/telemetry.ts","src/web/hostSlots.ts","src/web/models/globalStore.ts","src/web/models/sessionStore.ts","src/web/models/workspaceStore.ts","src/web/schemas/bundleAssetPolicy.ts","src/web/schemas/onboarding.ts","src/web/schemas/template.ts","src/web/services/apiClient/index.ts","src/web/services/apiPaths/index.ts","src/web/services/apiRoutes/index.ts","src/web/services/hubRevisions/index.ts","src/web/services/mcpWidget.ts","src/web/services/nativeApiTransport/index.ts","src/web/services/nativeByteCodec/index.ts","src/web/services/nativeByteCodec/type.ts","src/web/services/railSteps/index.ts","src/web/services/sessionRegistry/index.ts","src/web/services/testing/channels.ts","src/web/services/testing/index.ts","src/web/services/testing/rpcStub.ts","src/web/services/testing/slotProps.ts","src/web/services/testing/templateRail.ts","src/web/services/toolResult/index.ts","src/web/types/extensionFile.ts","src/web/types/mcpWidget.ts","src/web/types/modelContext.ts","src/web/types/nativeTemplate.ts","src/web/types/sessionRegistry.ts","src/web/types/template.ts","src/web/types/webPlugin.ts","tsdown.config.ts"],"sourceRevision":"2d2eea3d3a30f48f059e2665bb617c29","manifestRevision":"16b2540dad14ab43a49276b485f2a379","outputFiles":["NOTICE","README.md","dist/_virtual/_rolldown/runtime.cjs","dist/agentModel.cjs","dist/agentModel.mjs","dist/apiContracts.cjs","dist/apiContracts.mjs","dist/approval.cjs","dist/approval.mjs","dist/askUser.cjs","dist/askUser.mjs","dist/backgroundWork.cjs","dist/backgroundWork.mjs","dist/bundleAssetPolicy.cjs","dist/bundleAssetPolicy.mjs","dist/chatgptAuth.cjs","dist/chatgptAuth.mjs","dist/childProcess.cjs","dist/childProcess.mjs","dist/childSession.cjs","dist/childSession.mjs","dist/clientDevices.cjs","dist/clientDevices.mjs","dist/clientMetadata.cjs","dist/clientMetadata.mjs","dist/codemode.cjs","dist/codemode.mjs","dist/config.cjs","dist/config.mjs","dist/contextApi.cjs","dist/contextApi.mjs","dist/contextContributions.cjs","dist/contextContributions.mjs","dist/contextDetail.cjs","dist/contextDetail.mjs","dist/contextDetailStore.cjs","dist/contextDetailStore.mjs","dist/contextProjection.cjs","dist/contextProjection.mjs","dist/cordisHost.cjs","dist/cordisHost.mjs","dist/delegation.cjs","dist/delegation.mjs","dist/executionBudget.cjs","dist/executionBudget.mjs","dist/extensionFile.cjs","dist/extensionFile.mjs","dist/footer.cjs","dist/footer.mjs","dist/formReview.cjs","dist/formReview.mjs","dist/headless.cjs","dist/headless.mjs","dist/headlessHub.cjs","dist/headlessHub.mjs","dist/headlessProtocol.cjs","dist/headlessProtocol.mjs","dist/headlessServer.cjs","dist/headlessServer.mjs","dist/headlessSessionHost.cjs","dist/headlessSessionHost.mjs","dist/headlessSessionManager.cjs","dist/headlessSessionManager.mjs","dist/help.cjs","dist/help.mjs","dist/history.cjs","dist/history.mjs","dist/historyOwnership.cjs","dist/historyOwnership.mjs","dist/hubChannel.cjs","dist/hubChannel.mjs","dist/images.cjs","dist/images.mjs","dist/index.cjs","dist/index.mjs","dist/inputTemplate.cjs","dist/inputTemplate.mjs","dist/interop/chord.mjs","dist/interop/chordContext.mjs","dist/interop/piCodingAgent.mjs","dist/json.cjs","dist/json.mjs","dist/kernel.cjs","dist/kernel.mjs","dist/leader.cjs","dist/leader.mjs","dist/logSinkTelemetry.cjs","dist/logSinkTelemetry.mjs","dist/machineApi.cjs","dist/machineApi.mjs","dist/main.cjs","dist/main.mjs","dist/mcp.cjs","dist/mcp.mjs","dist/mcpFacet.cjs","dist/mcpFacet.mjs","dist/mcpProjection.cjs","dist/mcpProjection.mjs","dist/mcpSchemaCost.cjs","dist/mcpSchemaCost.mjs","dist/mcpSession.cjs","dist/mcpSession.mjs","dist/mcpStatus.cjs","dist/mcpStatus.mjs","dist/mcpToolResolver.cjs","dist/mcpToolResolver.mjs","dist/mcpWidget.cjs","dist/mcpWidget.mjs","dist/modelGateway.cjs","dist/modelGateway.mjs","dist/moduleResolution.cjs","dist/moduleResolution.mjs","dist/narration.cjs","dist/narration.mjs","dist/native.cjs","dist/native.mjs","dist/nodePlatform.cjs","dist/nodePlatform.mjs","dist/notification.cjs","dist/notification.mjs","dist/packageApi.cjs","dist/packageApi.mjs","dist/packageApiServer.cjs","dist/packageApiServer.mjs","dist/pairingPage.cjs","dist/pairingPage.mjs","dist/personTimeZone.cjs","dist/personTimeZone.mjs","dist/piSettings.cjs","dist/piSettings.mjs","dist/platform.cjs","dist/platform.mjs","dist/pluginProtocol.cjs","dist/pluginProtocol.mjs","dist/poPackage.cjs","dist/poPackage.mjs","dist/profileIdentity.cjs","dist/profileIdentity.mjs","dist/protocol.cjs","dist/protocol.mjs","dist/protocolTransport.cjs","dist/protocolTransport.mjs","dist/providerAuth.cjs","dist/providerAuth.mjs","dist/readiness.cjs","dist/readiness.mjs","dist/remoteChildSession.cjs","dist/remoteChildSession.mjs","dist/remoteContract.cjs","dist/remoteContract.mjs","dist/remoteOrigin.cjs","dist/remoteOrigin.mjs","dist/runtimeConfig.cjs","dist/runtimeConfig.mjs","dist/runtimeContextApi.cjs","dist/runtimeContextApi.mjs","dist/runtimeCordisHost.cjs","dist/runtimeCordisHost.mjs","dist/runtimeHeadlessSessionManager.cjs","dist/runtimeHeadlessSessionManager.mjs","dist/runtimeIdentity.cjs","dist/runtimeIdentity.mjs","dist/runtimeJson.cjs","dist/runtimeJson.mjs","dist/runtimeLogSinkTelemetry.cjs","dist/runtimeLogSinkTelemetry.mjs","dist/runtimePackages.cjs","dist/runtimePackages.mjs","dist/runtimePiSettings.cjs","dist/runtimePiSettings.mjs","dist/runtimeProtocol.cjs","dist/runtimeProtocol.mjs","dist/runtimeToolNames.cjs","dist/runtimeToolNames.mjs","dist/runtimeTransition.cjs","dist/runtimeTransition.mjs","dist/sandboxIdentity.cjs","dist/sandboxIdentity.mjs","dist/server.cjs","dist/server.mjs","dist/serverPlugin.cjs","dist/serverPlugin.mjs","dist/serverTelemetry.cjs","dist/serverTelemetry.mjs","dist/sessionFilesApi.cjs","dist/sessionFilesApi.mjs","dist/sessionMcpContract.cjs","dist/sessionMcpContract.mjs","dist/sessionProtocol.cjs","dist/sessionProtocol.mjs","dist/skills.cjs","dist/skills.mjs","dist/sqliteSessionStorage.cjs","dist/sqliteSessionStorage.mjs","dist/src/constants/agentSettled.cjs","dist/src/constants/agentSettled.mjs","dist/src/constants/cloud.cjs","dist/src/constants/cloud.mjs","dist/src/constants/contextApi.cjs","dist/src/constants/contextApi.mjs","dist/src/constants/fixedCore.cjs","dist/src/constants/fixedCore.mjs","dist/src/constants/globalSettings.cjs","dist/src/constants/globalSettings.mjs","dist/src/constants/modelGateway.cjs","dist/src/constants/modelGateway.mjs","dist/src/constants/nativeHost.cjs","dist/src/constants/nativeHost.mjs","dist/src/constants/remote.cjs","dist/src/constants/remote.mjs","dist/src/constants/sessionFiles.cjs","dist/src/constants/sessionFiles.mjs","dist/src/constants/template.cjs","dist/src/constants/template.mjs","dist/src/constants/voiceReloadHandoff.cjs","dist/src/constants/voiceReloadHandoff.mjs","dist/src/constants/voiceTools.cjs","dist/src/constants/voiceTools.mjs","dist/src/extensions/extensionFile.cjs","dist/src/extensions/extensionFile.mjs","dist/src/extensions/serverPlugin.cjs","dist/src/extensions/serverPlugin.mjs","dist/src/extensions/webPlugin.cjs","dist/src/extensions/webPlugin.mjs","dist/src/pi/piSessionRuntime.cjs","dist/src/pi/piSessionRuntime.mjs","dist/src/schemas/agentModel.cjs","dist/src/schemas/agentModel.mjs","dist/src/schemas/agentRun.cjs","dist/src/schemas/agentRun.mjs","dist/src/schemas/approval.cjs","dist/src/schemas/approval.mjs","dist/src/schemas/approvalPrompt.cjs","dist/src/schemas/approvalPrompt.mjs","dist/src/schemas/askUser.cjs","dist/src/schemas/askUser.mjs","dist/src/schemas/backgroundWork.cjs","dist/src/schemas/backgroundWork.mjs","dist/src/schemas/brain.cjs","dist/src/schemas/brain.mjs","dist/src/schemas/childProcess.cjs","dist/src/schemas/childProcess.mjs","dist/src/schemas/codemode.cjs","dist/src/schemas/codemode.mjs","dist/src/schemas/contextContributions.cjs","dist/src/schemas/contextContributions.mjs","dist/src/schemas/delegation.cjs","dist/src/schemas/delegation.mjs","dist/src/schemas/federation.cjs","dist/src/schemas/federation.mjs","dist/src/schemas/footer.cjs","dist/src/schemas/footer.mjs","dist/src/schemas/formReview.cjs","dist/src/schemas/formReview.mjs","dist/src/schemas/headless.cjs","dist/src/schemas/headless.mjs","dist/src/schemas/help.cjs","dist/src/schemas/help.mjs","dist/src/schemas/home.cjs","dist/src/schemas/home.mjs","dist/src/schemas/hostServiceContracts.cjs","dist/src/schemas/hostServiceContracts.mjs","dist/src/schemas/hostServices.cjs","dist/src/schemas/hostServices.mjs","dist/src/schemas/hostTeam.cjs","dist/src/schemas/hostTeam.mjs","dist/src/schemas/httpApiContracts.cjs","dist/src/schemas/httpApiContracts.mjs","dist/src/schemas/hubChannel.cjs","dist/src/schemas/hubChannel.mjs","dist/src/schemas/humanIdentity.cjs","dist/src/schemas/humanIdentity.mjs","dist/src/schemas/identity.cjs","dist/src/schemas/identity.mjs","dist/src/schemas/leader.cjs","dist/src/schemas/leader.mjs","dist/src/schemas/mcp.cjs","dist/src/schemas/mcp.mjs","dist/src/schemas/mcpFacet.cjs","dist/src/schemas/mcpFacet.mjs","dist/src/schemas/mcpProjection.cjs","dist/src/schemas/mcpProjection.mjs","dist/src/schemas/mcpSession.cjs","dist/src/schemas/mcpSession.mjs","dist/src/schemas/mcpStatus.cjs","dist/src/schemas/mcpStatus.mjs","dist/src/schemas/mcpToolResolver.cjs","dist/src/schemas/mcpToolResolver.mjs","dist/src/schemas/modelGateway.cjs","dist/src/schemas/modelGateway.mjs","dist/src/schemas/narration.cjs","dist/src/schemas/narration.mjs","dist/src/schemas/notification.cjs","dist/src/schemas/notification.mjs","dist/src/schemas/packageApi.cjs","dist/src/schemas/packageApi.mjs","dist/src/schemas/personTimeZone.cjs","dist/src/schemas/personTimeZone.mjs","dist/src/schemas/platform.cjs","dist/src/schemas/platform.mjs","dist/src/schemas/pluginCatalog.cjs","dist/src/schemas/pluginCatalog.mjs","dist/src/schemas/pluginContributions.cjs","dist/src/schemas/pluginContributions.mjs","dist/src/schemas/pluginProtocol.cjs","dist/src/schemas/pluginProtocol.mjs","dist/src/schemas/profileIdentity.cjs","dist/src/schemas/profileIdentity.mjs","dist/src/schemas/protocolChannelsContract.cjs","dist/src/schemas/protocolChannelsContract.mjs","dist/src/schemas/protocolContracts.cjs","dist/src/schemas/protocolContracts.mjs","dist/src/schemas/protocolHubContract.cjs","dist/src/schemas/protocolHubContract.mjs","dist/src/schemas/protocolService.cjs","dist/src/schemas/protocolService.mjs","dist/src/schemas/protocolSessionContract.cjs","dist/src/schemas/protocolSessionContract.mjs","dist/src/schemas/protocolThreadContract.cjs","dist/src/schemas/protocolThreadContract.mjs","dist/src/schemas/readiness.cjs","dist/src/schemas/readiness.mjs","dist/src/schemas/remoteGateway.cjs","dist/src/schemas/remoteGateway.mjs","dist/src/schemas/remoteOrigin.cjs","dist/src/schemas/remoteOrigin.mjs","dist/src/schemas/sandboxIdentity.cjs","dist/src/schemas/sandboxIdentity.mjs","dist/src/schemas/serverPlugin.cjs","dist/src/schemas/serverPlugin.mjs","dist/src/schemas/serverScope.cjs","dist/src/schemas/serverScope.mjs","dist/src/schemas/sessionApiContracts.cjs","dist/src/schemas/sessionApiContracts.mjs","dist/src/schemas/sessionLifecycle.cjs","dist/src/schemas/sessionLifecycle.mjs","dist/src/schemas/sessionProtocol.cjs","dist/src/schemas/sessionProtocol.mjs","dist/src/schemas/sharedModels.cjs","dist/src/schemas/sharedModels.mjs","dist/src/schemas/skills.cjs","dist/src/schemas/skills.mjs","dist/src/schemas/space.cjs","dist/src/schemas/space.mjs","dist/src/schemas/toolOverrides.cjs","dist/src/schemas/toolOverrides.mjs","dist/src/schemas/toolSurface.cjs","dist/src/schemas/toolSurface.mjs","dist/src/schemas/uiHub.cjs","dist/src/schemas/uiHub.mjs","dist/src/schemas/voiceReloadHandoff.cjs","dist/src/schemas/voiceReloadHandoff.mjs","dist/src/schemas/voiceTools.cjs","dist/src/schemas/voiceTools.mjs","dist/src/schemas/workflow.cjs","dist/src/schemas/workflow.mjs","dist/src/schemas/workspaceRegistry.cjs","dist/src/schemas/workspaceRegistry.mjs","dist/src/schemas/workspaceSandboxes.cjs","dist/src/schemas/workspaceSandboxes.mjs","dist/src/server/conversationEvents.cjs","dist/src/server/conversationEvents.mjs","dist/src/server/directHarnessRuntime.cjs","dist/src/server/directHarnessRuntime.mjs","dist/src/server/harnessErrorMessage.cjs","dist/src/server/harnessErrorMessage.mjs","dist/src/server/largeFrameLink.cjs","dist/src/server/largeFrameLink.mjs","dist/src/server/liveImport.cjs","dist/src/server/liveImport.mjs","dist/src/server/mcpBundleLoader.cjs","dist/src/server/mcpBundleLoader.mjs","dist/src/server/providerRoutes.cjs","dist/src/server/providerRoutes.mjs","dist/src/server/providerRuntime.cjs","dist/src/server/providerRuntime.mjs","dist/src/server/serverPackages.cjs","dist/src/server/serverPackages.mjs","dist/src/server/serverScope.cjs","dist/src/server/serverScope.mjs","dist/src/server/threadJournals.cjs","dist/src/server/threadJournals.mjs","dist/src/services/apiSurfaceAssert/index.cjs","dist/src/services/apiSurfaceAssert/index.mjs","dist/src/services/approvalGate/index.cjs","dist/src/services/approvalGate/index.mjs","dist/src/services/bundlePublication/index.cjs","dist/src/services/bundlePublication/index.mjs","dist/src/services/chatgptAuth/index.cjs","dist/src/services/chatgptAuth/index.mjs","dist/src/services/chatgptImages/index.cjs","dist/src/services/chatgptImages/index.mjs","dist/src/services/chatgptLogin/index.cjs","dist/src/services/chatgptLogin/index.mjs","dist/src/services/chatgptWebSearch/index.cjs","dist/src/services/chatgptWebSearch/index.mjs","dist/src/services/chordAdapter/index.cjs","dist/src/services/chordAdapter/index.mjs","dist/src/services/clientDevices/index.cjs","dist/src/services/clientDevices/index.mjs","dist/src/services/clientMetadata/_lib/codec.cjs","dist/src/services/clientMetadata/_lib/codec.mjs","dist/src/services/clientMetadata/_lib/deviceLabel.cjs","dist/src/services/clientMetadata/_lib/deviceLabel.mjs","dist/src/services/contextApiUrls/index.cjs","dist/src/services/contextApiUrls/index.mjs","dist/src/services/contextContributions/index.cjs","dist/src/services/contextContributions/index.mjs","dist/src/services/contextUsage/index.cjs","dist/src/services/contextUsage/index.mjs","dist/src/services/durableNavigation/docs.cjs","dist/src/services/durableNavigation/docs.mjs","dist/src/services/durableNavigation/index.cjs","dist/src/services/durableNavigation/index.mjs","dist/src/services/durableQueue/docs.cjs","dist/src/services/durableQueue/docs.mjs","dist/src/services/durableQueue/index.cjs","dist/src/services/durableQueue/index.mjs","dist/src/services/durableRequestReceipts/docs.cjs","dist/src/services/durableRequestReceipts/docs.mjs","dist/src/services/durableRequestReceipts/index.cjs","dist/src/services/durableRequestReceipts/index.mjs","dist/src/services/durableResumeSnapshots/docs.cjs","dist/src/services/durableResumeSnapshots/docs.mjs","dist/src/services/durableResumeSnapshots/index.cjs","dist/src/services/durableResumeSnapshots/index.mjs","dist/src/services/durableSession/docs.cjs","dist/src/services/durableSession/docs.mjs","dist/src/services/durableSession/index.cjs","dist/src/services/durableSession/index.mjs","dist/src/services/durableSubagents/docs.cjs","dist/src/services/durableSubagents/docs.mjs","dist/src/services/durableSubagents/extension.cjs","dist/src/services/durableSubagents/extension.mjs","dist/src/services/durableSubagents/index.cjs","dist/src/services/durableSubagents/index.mjs","dist/src/services/durableSubagents/tasks.cjs","dist/src/services/durableSubagents/tasks.mjs","dist/src/services/edgeModelRuntime/index.cjs","dist/src/services/edgeModelRuntime/index.mjs","dist/src/services/editPresence/index.cjs","dist/src/services/editPresence/index.mjs","dist/src/services/fileAccess/accessibleFile.cjs","dist/src/services/fileAccess/accessibleFile.mjs","dist/src/services/fileAccess/core.cjs","dist/src/services/fileAccess/core.mjs","dist/src/services/fileAccess/index.cjs","dist/src/services/fileAccess/index.mjs","dist/src/services/guardedFile/index.cjs","dist/src/services/guardedFile/index.mjs","dist/src/services/headlessClient/index.cjs","dist/src/services/headlessClient/index.mjs","dist/src/services/hostServices/index.cjs","dist/src/services/hostServices/index.mjs","dist/src/services/hubChannelHarness/index.cjs","dist/src/services/hubChannelHarness/index.mjs","dist/src/services/inputTemplate/index.cjs","dist/src/services/inputTemplate/index.mjs","dist/src/services/json/core.cjs","dist/src/services/json/core.mjs","dist/src/services/json/sync.cjs","dist/src/services/json/sync.mjs","dist/src/services/kernel/index.cjs","dist/src/services/kernel/index.mjs","dist/src/services/loginFlow/index.cjs","dist/src/services/loginFlow/index.mjs","dist/src/services/modelDispatch/index.cjs","dist/src/services/modelDispatch/index.mjs","dist/src/services/modelGatewayContainer/index.cjs","dist/src/services/modelGatewayContainer/index.mjs","dist/src/services/modelGatewayExecutor/index.cjs","dist/src/services/modelGatewayExecutor/index.mjs","dist/src/services/modelGatewayHost/index.cjs","dist/src/services/modelGatewayHost/index.mjs","dist/src/services/modelGatewayWire/index.cjs","dist/src/services/modelGatewayWire/index.mjs","dist/src/services/nativeChildTools/index.cjs","dist/src/services/nativeChildTools/index.mjs","dist/src/services/nodeHost/index.cjs","dist/src/services/nodeHost/index.mjs","dist/src/services/nodeModelDependencies/index.cjs","dist/src/services/nodeModelDependencies/index.mjs","dist/src/services/openSessionRegistry/index.cjs","dist/src/services/openSessionRegistry/index.mjs","dist/src/services/openSessionRegistry/openSessionRecords.cjs","dist/src/services/openSessionRegistry/openSessionRecords.mjs","dist/src/services/openSessionRegistry/sync.cjs","dist/src/services/openSessionRegistry/sync.mjs","dist/src/services/packageApiHarness/index.cjs","dist/src/services/packageApiHarness/index.mjs","dist/src/services/packageContentRevision/index.cjs","dist/src/services/packageContentRevision/index.mjs","dist/src/services/packageResource/index.cjs","dist/src/services/packageResource/index.mjs","dist/src/services/pairingPage/index.cjs","dist/src/services/pairingPage/index.mjs","dist/src/services/piArgs/index.cjs","dist/src/services/piArgs/index.mjs","dist/src/services/piExtensionHost/index.cjs","dist/src/services/piExtensionHost/index.mjs","dist/src/services/piHelpTools/index.cjs","dist/src/services/piHelpTools/index.mjs","dist/src/services/piMessages/index.cjs","dist/src/services/piMessages/index.mjs","dist/src/services/piSessionEntries/index.cjs","dist/src/services/piSessionEntries/index.mjs","dist/src/services/piSettings/core.cjs","dist/src/services/piSettings/core.mjs","dist/src/services/piSettings/sync.cjs","dist/src/services/piSettings/sync.mjs","dist/src/services/piSummary/index.cjs","dist/src/services/piSummary/index.mjs","dist/src/services/platformFiles/index.cjs","dist/src/services/platformFiles/index.mjs","dist/src/services/platformFiles/rootBoundReplace.cjs","dist/src/services/platformFiles/rootBoundReplace.mjs","dist/src/services/pluginLifecycle/index.cjs","dist/src/services/pluginLifecycle/index.mjs","dist/src/services/poPackage/core.cjs","dist/src/services/poPackage/core.mjs","dist/src/services/poPackage/sync.cjs","dist/src/services/poPackage/sync.mjs","dist/src/services/poTelemetry/index.cjs","dist/src/services/poTelemetry/index.mjs","dist/src/services/portableConfig/index.cjs","dist/src/services/portableConfig/index.mjs","dist/src/services/providerAuth/index.cjs","dist/src/services/providerAuth/index.mjs","dist/src/services/providerImages/fitter.cjs","dist/src/services/providerImages/fitter.mjs","dist/src/services/providerImages/index.cjs","dist/src/services/providerImages/index.mjs","dist/src/services/runtimeIdentity/sync.cjs","dist/src/services/runtimeIdentity/sync.mjs","dist/src/services/scopeInput/index.cjs","dist/src/services/scopeInput/index.mjs","dist/src/services/serialRunner/index.cjs","dist/src/services/serialRunner/index.mjs","dist/src/services/serverHost/index.cjs","dist/src/services/serverHost/index.mjs","dist/src/services/sessionAccess/index.cjs","dist/src/services/sessionAccess/index.mjs","dist/src/services/sessionAttachments/index.cjs","dist/src/services/sessionAttachments/index.mjs","dist/src/services/sessionFiles/index.cjs","dist/src/services/sessionFiles/index.mjs","dist/src/services/sessionFiles/sessionDirectory.cjs","dist/src/services/sessionFiles/sessionDirectory.mjs","dist/src/services/sessionGitStatus/index.cjs","dist/src/services/sessionGitStatus/index.mjs","dist/src/services/sessionLifecycle/index.cjs","dist/src/services/sessionLifecycle/index.mjs","dist/src/services/sessionMcpRoutePaths/index.cjs","dist/src/services/sessionMcpRoutePaths/index.mjs","dist/src/services/sessionPresentation/index.cjs","dist/src/services/sessionPresentation/index.mjs","dist/src/services/sessionWorkspaceMove/index.cjs","dist/src/services/sessionWorkspaceMove/index.mjs","dist/src/services/skillPrompt/index.cjs","dist/src/services/skillPrompt/index.mjs","dist/src/services/sqliteSessionHistory/index.cjs","dist/src/services/sqliteSessionHistory/index.mjs","dist/src/services/sqliteTranscriptReader/index.cjs","dist/src/services/sqliteTranscriptReader/index.mjs","dist/src/services/telemetry/index.cjs","dist/src/services/telemetry/index.mjs","dist/src/services/testMode/index.cjs","dist/src/services/testMode/index.mjs","dist/src/services/toolContinuation/index.cjs","dist/src/services/toolContinuation/index.mjs","dist/src/services/toolCost/index.cjs","dist/src/services/toolCost/index.mjs","dist/src/services/toolOverrides/index.cjs","dist/src/services/toolOverrides/index.mjs","dist/src/services/toolPrompt/index.cjs","dist/src/services/toolPrompt/index.mjs","dist/src/services/toolSurface/index.cjs","dist/src/services/toolSurface/index.mjs","dist/src/services/traceContext/index.cjs","dist/src/services/traceContext/index.mjs","dist/src/services/transcriptPages/index.cjs","dist/src/services/transcriptPages/index.mjs","dist/src/services/voiceReloadHandoff/index.cjs","dist/src/services/voiceReloadHandoff/index.mjs","dist/src/services/voiceToolsContract/index.cjs","dist/src/services/voiceToolsContract/index.mjs","dist/src/services/workspaceLookup/index.cjs","dist/src/services/workspaceLookup/index.mjs","dist/src/services/workspaceRegistry/index.cjs","dist/src/services/workspaceRegistry/index.mjs","dist/src/services/workspaceRegistry/sync.cjs","dist/src/services/workspaceRegistry/sync.mjs","dist/src/services/workspaceRegistry/workspaceRecords.cjs","dist/src/services/workspaceRegistry/workspaceRecords.mjs","dist/src/services/workspaceSandboxes/index.cjs","dist/src/services/workspaceSandboxes/index.mjs","dist/src/systems/child/adapters/headlessChildSessionService.cjs","dist/src/systems/child/adapters/headlessChildSessionService.mjs","dist/src/systems/child/adapters/remoteChildSessionService.cjs","dist/src/systems/child/adapters/remoteChildSessionService.mjs","dist/src/systems/child/services/childSession/index.cjs","dist/src/systems/child/services/childSession/index.mjs","dist/src/systems/child/types/childSession.cjs","dist/src/systems/child/types/childSession.mjs","dist/src/systems/main/adapters/headlessHost.cjs","dist/src/systems/main/adapters/headlessHost.mjs","dist/src/systems/main/adapters/headlessSessionHost.cjs","dist/src/systems/main/adapters/headlessSessionHost.mjs","dist/src/testing/pi/extensionScenarios.cjs","dist/src/testing/pi/extensionScenarios.mjs","dist/src/testing/pi/testHost.cjs","dist/src/testing/pi/testHost.mjs","dist/src/web/hostSlots.cjs","dist/src/web/hostSlots.mjs","dist/src/web/models/globalStore.cjs","dist/src/web/models/globalStore.mjs","dist/src/web/models/sessionStore.cjs","dist/src/web/models/sessionStore.mjs","dist/src/web/models/workspaceStore.cjs","dist/src/web/models/workspaceStore.mjs","dist/src/web/schemas/bundleAssetPolicy.cjs","dist/src/web/schemas/bundleAssetPolicy.mjs","dist/src/web/schemas/onboarding.cjs","dist/src/web/schemas/onboarding.mjs","dist/src/web/schemas/template.cjs","dist/src/web/schemas/template.mjs","dist/src/web/services/apiClient/index.cjs","dist/src/web/services/apiClient/index.mjs","dist/src/web/services/apiPaths/index.cjs","dist/src/web/services/apiPaths/index.mjs","dist/src/web/services/apiRoutes/index.cjs","dist/src/web/services/apiRoutes/index.mjs","dist/src/web/services/hubRevisions/index.cjs","dist/src/web/services/hubRevisions/index.mjs","dist/src/web/services/mcpWidget.cjs","dist/src/web/services/mcpWidget.mjs","dist/src/web/services/nativeApiTransport/index.cjs","dist/src/web/services/nativeApiTransport/index.mjs","dist/src/web/services/nativeByteCodec/index.cjs","dist/src/web/services/nativeByteCodec/index.mjs","dist/src/web/services/railSteps/index.cjs","dist/src/web/services/railSteps/index.mjs","dist/src/web/services/sessionRegistry/index.cjs","dist/src/web/services/sessionRegistry/index.mjs","dist/src/web/services/testing/channels.cjs","dist/src/web/services/testing/channels.mjs","dist/src/web/services/testing/index.cjs","dist/src/web/services/testing/index.mjs","dist/src/web/services/testing/rpcStub.cjs","dist/src/web/services/testing/rpcStub.mjs","dist/src/web/services/testing/slotProps.cjs","dist/src/web/services/testing/slotProps.mjs","dist/src/web/services/testing/templateRail.cjs","dist/src/web/services/testing/templateRail.mjs","dist/src/web/services/toolResult/index.cjs","dist/src/web/services/toolResult/index.mjs","dist/telemetry.cjs","dist/telemetry.mjs","dist/testMode.cjs","dist/testMode.mjs","dist/testing.cjs","dist/testing.mjs","dist/toolInventory.cjs","dist/toolInventory.mjs","dist/toolNames.cjs","dist/toolNames.mjs","dist/toolOverrides.cjs","dist/toolOverrides.mjs","dist/toolSurface.cjs","dist/toolSurface.mjs","dist/transition.cjs","dist/transition.d.cjs","dist/transition.mjs","dist/transitionClassifier.cjs","dist/transitionClassifier.mjs","dist/transitionCoordinator.cjs","dist/transitionCoordinator.mjs","dist/typesContextApi.cjs","dist/typesContextApi.mjs","dist/uiHub.cjs","dist/uiHub.mjs","dist/vendor/upm/LICENSE","dist/vendor/upm/_chunks/cli.mjs","dist/vendor/upm/_chunks/exec.mjs","dist/vendor/upm/_chunks/foreign-lock.mjs","dist/vendor/upm/_chunks/index-upgrade.mjs","dist/vendor/upm/_chunks/limit.mjs","dist/vendor/upm/_chunks/link-pool.mjs","dist/vendor/upm/_chunks/main.mjs","dist/vendor/upm/_chunks/metadata.mjs","dist/vendor/upm/_chunks/metadata2.mjs","dist/vendor/upm/_chunks/mirror.mjs","dist/vendor/upm/_chunks/newer.mjs","dist/vendor/upm/_chunks/overrides.mjs","dist/vendor/upm/_chunks/overrides2.mjs","dist/vendor/upm/_chunks/progress.mjs","dist/vendor/upm/_chunks/registry-pool.mjs","dist/vendor/upm/_chunks/registry.mjs","dist/vendor/upm/_chunks/resolve.mjs","dist/vendor/upm/_chunks/shim.mjs","dist/vendor/upm/_chunks/store-backend.mjs","dist/vendor/upm/_chunks/tarball-deps.mjs","dist/vendor/upm/_chunks/trace.mjs","dist/vendor/upm/_chunks/tree-lock.mjs","dist/vendor/upm/_chunks/unpack-pool.mjs","dist/vendor/upm/_chunks/unpack.mjs","dist/vendor/upm/_chunks/verify.mjs","dist/vendor/upm/_chunks/vouch.mjs","dist/vendor/upm/_chunks/workspaces.mjs","dist/vendor/upm/index.mjs","dist/vendor/upm/resolver.mjs","dist/vendor/upm/upm.mjs","dist/vendor/upm/upx.mjs","dist/voiceReloadHandoff.cjs","dist/voiceReloadHandoff.mjs","dist/voiceTools.cjs","dist/voiceTools.mjs","dist/web.cjs","dist/web.mjs","dist/webCompositions.cjs","dist/webCompositions.mjs","dist/webTesting.cjs","dist/webTesting.mjs","dist/workflow.cjs","dist/workflow.mjs","dist/workspaceRegistry.cjs","dist/workspaceRegistry.mjs","dist/workspaceSandboxes.cjs","dist/workspaceSandboxes.mjs","licenses/Codex-Apache-2.0.txt"],"outputRevision":"7b3dba157c6b0c3ba6b72995c19e6515"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageApi.cjs","names":["defineServiceContract"],"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 { 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 /** `[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 /** `[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 /** 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 fetch(request: Request): 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":"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"}
|
|
1
|
+
{"version":3,"file":"packageApi.cjs","names":["defineServiceContract"],"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 { 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 /** `[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 /** `[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 fetch(request: Request): 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":"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"}
|
|
@@ -291,6 +291,11 @@ export interface PoRegisteredFile {
|
|
|
291
291
|
/** What the host tells an API about itself when it starts. */
|
|
292
292
|
export interface PoApiContext {
|
|
293
293
|
scope: PoApiScope;
|
|
294
|
+
/** Installed CLI release and its catalog. Absent on hosts that do not ship the CLI. */
|
|
295
|
+
distribution?: {
|
|
296
|
+
readonly version: string;
|
|
297
|
+
readonly catalogPackages: readonly string[];
|
|
298
|
+
};
|
|
294
299
|
/** Descriptive inventory of this exact published web mount. No plugin runtime values. */
|
|
295
300
|
clientPlugins?: PoClientPluginInventory;
|
|
296
301
|
/** Stable, opaque workspace id, shared by every session and member checkout of the workspace. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageApi.d.mts","names":["_$__serverScope0.PoServiceContract"],"sources":["../../../src/schemas/packageApi.ts"],"mappings":";;;;;;;;;iBAwBiB;EACf;EACA;;EAEA;EACA,gBAAgB;;;;;;YAON;qBAEC,wBAAwB;;YAGzB;EACN;;EACA;EAAoB;;EACpB;EAAkB;;;iBAGP;EACf;EACA,OAAO;EACP;EACA;EACA;EACA;;EAEA;;EAEA;;EAEA;EACA;;EAEA;;;;;;iBAOe;EACf;EACA,OAAO;EACP;EACA;EACA;;EAEA;;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,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;EACf,MAAM,SAAS,UAAU,WAAW,QAAQ;;EAE5C,SAAS,SAAS,SAAS,QAAQ;EACnC;;iBAGe;;EAEf;;EAEA,eAAe;EACf,MAAM,SAAS,eAAe"}
|
|
1
|
+
{"version":3,"file":"packageApi.d.mts","names":["_$__serverScope0.PoServiceContract"],"sources":["../../../src/schemas/packageApi.ts"],"mappings":";;;;;;;;;iBAwBiB;EACf;EACA;;EAEA;EACA,gBAAgB;;;;;;YAON;qBAEC,wBAAwB;;YAGzB;EACN;;EACA;EAAoB;;EACpB;EAAkB;;;iBAGP;EACf;EACA,OAAO;EACP;EACA;EACA;EACA;;EAEA;;EAEA;;EAEA;EACA;;EAEA;;;;;;iBAOe;EACf;EACA,OAAO;EACP;EACA;EACA;;EAEA;;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;EACf,MAAM,SAAS,UAAU,WAAW,QAAQ;;EAE5C,SAAS,SAAS,SAAS,QAAQ;EACnC;;iBAGe;;EAEf;;EAEA,eAAe;EACf,MAAM,SAAS,eAAe"}
|
|
@@ -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 { 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 { 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 /** `[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 /** `[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 /** 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 fetch(request: Request): 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":"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"}
|
|
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 { 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 /** `[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 /** `[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 fetch(request: Request): 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":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/po-core",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.189",
|
|
4
4
|
"description": "Po runtime systems and reusable core services.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -609,8 +609,8 @@
|
|
|
609
609
|
"registry": "https://registry.npmjs.org/"
|
|
610
610
|
},
|
|
611
611
|
"dependencies": {
|
|
612
|
-
"@agimon-ai/po-logsink": "0.0.1-alpha.
|
|
613
|
-
"@agimon-ai/po-web-security": "0.0.0-alpha.
|
|
612
|
+
"@agimon-ai/po-logsink": "0.0.1-alpha.171",
|
|
613
|
+
"@agimon-ai/po-web-security": "0.0.0-alpha.189",
|
|
614
614
|
"@deepseek-ai/cordis": "4.0.5",
|
|
615
615
|
"@earendil-works/chord": "1.5.2",
|
|
616
616
|
"@earendil-works/pi-agent-core": "1.5.2",
|
|
@@ -635,8 +635,8 @@
|
|
|
635
635
|
"yaml": "2.9.1"
|
|
636
636
|
},
|
|
637
637
|
"devDependencies": {
|
|
638
|
-
"@agimon-ai/po-build": "0.0.0-alpha.
|
|
639
|
-
"@agimon-ai/vibe-lint-plugin-po-core": "0.0.0-alpha.
|
|
638
|
+
"@agimon-ai/po-build": "0.0.0-alpha.189",
|
|
639
|
+
"@agimon-ai/vibe-lint-plugin-po-core": "0.0.0-alpha.189",
|
|
640
640
|
"@apidevtools/swagger-parser": "^13.1.0",
|
|
641
641
|
"@asyncapi/parser": "^3.6.4",
|
|
642
642
|
"@earendil-works/pi-ai": "1.5.2",
|