@agimon-ai/po 0.0.0-alpha.21 → 0.0.0-alpha.210
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +97 -8
- package/README.md +37 -722
- package/dist/apiContracts.cjs.map +1 -1
- package/dist/apiContracts.d.mts +2 -2
- package/dist/bin/cli.cjs +12 -7
- package/dist/bin/cli.cjs.map +1 -1
- package/dist/bin/cli.mjs +12 -7
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/bin/poRunner.cjs +24 -7
- package/dist/bin/poRunner.cjs.map +1 -1
- package/dist/bin/poRunner.d.mts +8 -0
- package/dist/bin/poRunner.d.mts.map +1 -1
- package/dist/bin/poRunner.mjs +24 -7
- package/dist/bin/poRunner.mjs.map +1 -1
- package/dist/bin/serve.cjs +28 -17
- package/dist/bin/serve.cjs.map +1 -1
- package/dist/bin/serve.mjs +28 -17
- package/dist/bin/serve.mjs.map +1 -1
- package/dist/builders/cli/extensionAssembler/index.cjs +53 -40
- package/dist/builders/cli/extensionAssembler/index.cjs.map +1 -1
- package/dist/builders/cli/extensionAssembler/index.d.mts +11 -6
- package/dist/builders/cli/extensionAssembler/index.d.mts.map +1 -1
- package/dist/builders/cli/extensionAssembler/index.mjs +53 -41
- package/dist/builders/cli/extensionAssembler/index.mjs.map +1 -1
- package/dist/catalog/index.json +662 -105
- package/dist/cli.cjs +9 -14
- package/dist/cli.d.mts +1 -3
- package/dist/cli.mjs +1 -3
- package/dist/commands.cjs +13 -15
- package/dist/commands.d.mts +1 -2
- package/dist/commands.mjs +1 -2
- package/dist/config.cjs +9 -14
- package/dist/config.d.mts +3 -2
- package/dist/config.mjs +3 -2
- package/dist/extensions/server.cjs +30 -23
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.d.mts.map +1 -1
- package/dist/extensions/server.mjs +31 -24
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/harnessContext.cjs +0 -1
- package/dist/harnessContext.d.mts +2 -2
- package/dist/harnessContext.mjs +1 -1
- package/dist/harnessState.cjs +2 -1
- package/dist/help.cjs +9 -11
- package/dist/help.d.mts +1 -2
- package/dist/help.mjs +1 -2
- package/dist/index.cjs +40 -67
- package/dist/index.d.mts +7 -16
- package/dist/index.mjs +7 -14
- package/dist/matrixOptions.cjs +10 -5
- package/dist/matrixOptions.d.mts +2 -2
- package/dist/matrixOptions.mjs +1 -1
- package/dist/package.cjs +11 -0
- package/dist/package.cjs.map +1 -0
- package/dist/package.mjs +6 -0
- package/dist/package.mjs.map +1 -0
- package/dist/projectTrust.cjs +3 -0
- package/dist/projectTrust.d.mts +2 -2
- package/dist/projectTrust.mjs +1 -1
- package/dist/repository.cjs +1 -0
- package/dist/repository.d.mts +2 -2
- package/dist/repository.mjs +1 -1
- package/dist/services.cjs +5 -20
- package/dist/services.d.mts +3 -8
- package/dist/services.mjs +3 -8
- package/dist/shared.cjs +4 -17
- package/dist/shared.d.mts +2 -2
- package/dist/shared.mjs +1 -1
- package/dist/src/bin/agentDirectory.cjs +19 -15
- package/dist/src/bin/agentDirectory.cjs.map +1 -1
- package/dist/src/bin/agentDirectory.mjs +16 -13
- package/dist/src/bin/agentDirectory.mjs.map +1 -1
- package/dist/src/builders/apiContractExport/index.cjs +23 -22
- package/dist/src/builders/apiContractExport/index.cjs.map +1 -1
- package/dist/src/builders/apiContractExport/index.mjs +22 -21
- package/dist/src/builders/apiContractExport/index.mjs.map +1 -1
- package/dist/src/builders/cli/entryResolution.cjs +2 -2
- package/dist/src/builders/cli/entryResolution.cjs.map +1 -1
- package/dist/src/builders/cli/entryResolution.mjs +1 -1
- package/dist/src/builders/cli/entryResolution.mjs.map +1 -1
- package/dist/src/builders/cli/harnessContext.cjs +38 -43
- package/dist/src/builders/cli/harnessContext.cjs.map +1 -1
- package/dist/src/builders/cli/harnessContext.d.mts +11 -10
- package/dist/src/builders/cli/harnessContext.d.mts.map +1 -1
- package/dist/src/builders/cli/harnessContext.mjs +37 -41
- package/dist/src/builders/cli/harnessContext.mjs.map +1 -1
- package/dist/src/builders/cli/sessionComposition.cjs +23 -12
- package/dist/src/builders/cli/sessionComposition.cjs.map +1 -1
- package/dist/src/builders/cli/sessionComposition.mjs +23 -12
- package/dist/src/builders/cli/sessionComposition.mjs.map +1 -1
- package/dist/src/builders/isolate/compile.cjs +226 -0
- package/dist/src/builders/isolate/compile.cjs.map +1 -0
- package/dist/src/builders/isolate/compile.mjs +222 -0
- package/dist/src/builders/isolate/compile.mjs.map +1 -0
- package/dist/src/builders/isolate/index.cjs +195 -0
- package/dist/src/builders/isolate/index.cjs.map +1 -0
- package/dist/src/builders/isolate/index.mjs +192 -0
- package/dist/src/builders/isolate/index.mjs.map +1 -0
- package/dist/src/builders/isolate/membrane.cjs +198 -0
- package/dist/src/builders/isolate/membrane.cjs.map +1 -0
- package/dist/src/builders/isolate/membrane.mjs +198 -0
- package/dist/src/builders/isolate/membrane.mjs.map +1 -0
- package/dist/src/builders/isolate/names.cjs +10 -0
- package/dist/src/builders/isolate/names.cjs.map +1 -0
- package/dist/src/builders/isolate/names.mjs +9 -0
- package/dist/src/builders/isolate/names.mjs.map +1 -0
- package/dist/src/builders/native/index.cjs +229 -67
- package/dist/src/builders/native/index.cjs.map +1 -1
- package/dist/src/builders/native/index.d.mts +4 -2
- package/dist/src/builders/native/index.d.mts.map +1 -1
- package/dist/src/builders/native/index.mjs +229 -68
- package/dist/src/builders/native/index.mjs.map +1 -1
- package/dist/src/builders/npm/index.cjs +76 -0
- package/dist/src/builders/npm/index.cjs.map +1 -0
- package/dist/src/builders/npm/index.mjs +73 -0
- package/dist/src/builders/npm/index.mjs.map +1 -0
- package/dist/src/builders/server/backgroundSync.cjs +62 -39
- package/dist/src/builders/server/backgroundSync.cjs.map +1 -1
- package/dist/src/builders/server/backgroundSync.mjs +62 -38
- package/dist/src/builders/server/backgroundSync.mjs.map +1 -1
- package/dist/src/builders/server/bundlerService.cjs +165 -35
- package/dist/src/builders/server/bundlerService.cjs.map +1 -1
- package/dist/src/builders/server/bundlerService.mjs +164 -36
- package/dist/src/builders/server/bundlerService.mjs.map +1 -1
- package/dist/src/builders/server/capabilities.cjs +103 -0
- package/dist/src/builders/server/capabilities.cjs.map +1 -0
- package/dist/src/builders/server/capabilities.mjs +101 -0
- package/dist/src/builders/server/capabilities.mjs.map +1 -0
- package/dist/src/builders/server/computerUseBinding.cjs +62 -10
- package/dist/src/builders/server/computerUseBinding.cjs.map +1 -1
- package/dist/src/builders/server/computerUseBinding.mjs +60 -8
- package/dist/src/builders/server/computerUseBinding.mjs.map +1 -1
- package/dist/src/builders/server/computerUseRecordings.cjs +152 -51
- package/dist/src/builders/server/computerUseRecordings.cjs.map +1 -1
- package/dist/src/builders/server/computerUseRecordings.mjs +158 -59
- package/dist/src/builders/server/computerUseRecordings.mjs.map +1 -1
- package/dist/src/builders/server/containedSessions.cjs +152 -0
- package/dist/src/builders/server/containedSessions.cjs.map +1 -0
- package/dist/src/builders/server/containedSessions.mjs +146 -0
- package/dist/src/builders/server/containedSessions.mjs.map +1 -0
- package/dist/src/builders/server/defaultWorkspace.cjs +46 -11
- package/dist/src/builders/server/defaultWorkspace.cjs.map +1 -1
- package/dist/src/builders/server/defaultWorkspace.mjs +42 -10
- package/dist/src/builders/server/defaultWorkspace.mjs.map +1 -1
- package/dist/src/builders/server/electronBinding.cjs +82 -0
- package/dist/src/builders/server/electronBinding.cjs.map +1 -0
- package/dist/src/builders/server/electronBinding.mjs +82 -0
- package/dist/src/builders/server/electronBinding.mjs.map +1 -0
- package/dist/src/builders/server/federation.cjs +364 -0
- package/dist/src/builders/server/federation.cjs.map +1 -0
- package/dist/src/builders/server/federation.mjs +363 -0
- package/dist/src/builders/server/federation.mjs.map +1 -0
- package/dist/src/builders/server/hostDisplayName.cjs +14 -0
- package/dist/src/builders/server/hostDisplayName.cjs.map +1 -0
- package/dist/src/builders/server/hostDisplayName.mjs +14 -0
- package/dist/src/builders/server/hostDisplayName.mjs.map +1 -0
- package/dist/src/builders/server/hostModelGateway.cjs +41 -0
- package/dist/src/builders/server/hostModelGateway.cjs.map +1 -0
- package/dist/src/builders/server/hostModelGateway.mjs +39 -0
- package/dist/src/builders/server/hostModelGateway.mjs.map +1 -0
- package/dist/src/builders/server/hostTeam.cjs +188 -0
- package/dist/src/builders/server/hostTeam.cjs.map +1 -0
- package/dist/src/builders/server/hostTeam.mjs +180 -0
- package/dist/src/builders/server/hostTeam.mjs.map +1 -0
- package/dist/src/builders/server/idleRestart.cjs +185 -40
- package/dist/src/builders/server/idleRestart.cjs.map +1 -1
- package/dist/src/builders/server/idleRestart.mjs +176 -39
- package/dist/src/builders/server/idleRestart.mjs.map +1 -1
- package/dist/src/builders/server/index.cjs +33 -19
- package/dist/src/builders/server/index.cjs.map +1 -1
- package/dist/src/builders/server/index.mjs +33 -18
- package/dist/src/builders/server/index.mjs.map +1 -1
- package/dist/src/builders/server/liveActivityPush.cjs +202 -0
- package/dist/src/builders/server/liveActivityPush.cjs.map +1 -0
- package/dist/src/builders/server/liveActivityPush.mjs +202 -0
- package/dist/src/builders/server/liveActivityPush.mjs.map +1 -0
- package/dist/src/builders/server/logSink.cjs +12 -10
- package/dist/src/builders/server/logSink.cjs.map +1 -1
- package/dist/src/builders/server/logSink.mjs +12 -10
- package/dist/src/builders/server/logSink.mjs.map +1 -1
- package/dist/src/builders/server/mcpApp.cjs +27 -20
- package/dist/src/builders/server/mcpApp.cjs.map +1 -1
- package/dist/src/builders/server/mcpApp.mjs +25 -18
- package/dist/src/builders/server/mcpApp.mjs.map +1 -1
- package/dist/src/builders/server/mcpAppBuild.cjs +61 -41
- package/dist/src/builders/server/mcpAppBuild.cjs.map +1 -1
- package/dist/src/builders/server/mcpAppBuild.d.mts +3 -6
- package/dist/src/builders/server/mcpAppBuild.d.mts.map +1 -1
- package/dist/src/builders/server/mcpAppBuild.mjs +61 -40
- package/dist/src/builders/server/mcpAppBuild.mjs.map +1 -1
- package/dist/src/builders/server/mcpBundle.cjs +20 -16
- package/dist/src/builders/server/mcpBundle.cjs.map +1 -1
- package/dist/src/builders/server/mcpBundle.d.mts +2 -1
- package/dist/src/builders/server/mcpBundle.d.mts.map +1 -1
- package/dist/src/builders/server/mcpBundle.mjs +20 -15
- package/dist/src/builders/server/mcpBundle.mjs.map +1 -1
- package/dist/src/builders/server/nativePush.cjs +229 -0
- package/dist/src/builders/server/nativePush.cjs.map +1 -0
- package/dist/src/builders/server/nativePush.mjs +228 -0
- package/dist/src/builders/server/nativePush.mjs.map +1 -0
- package/dist/src/builders/server/network.cjs +887 -0
- package/dist/src/builders/server/network.cjs.map +1 -0
- package/dist/src/builders/server/network.mjs +886 -0
- package/dist/src/builders/server/network.mjs.map +1 -0
- package/dist/src/builders/server/networkGateway.cjs +123 -0
- package/dist/src/builders/server/networkGateway.cjs.map +1 -0
- package/dist/src/builders/server/networkGateway.mjs +123 -0
- package/dist/src/builders/server/networkGateway.mjs.map +1 -0
- package/dist/src/builders/server/networkRelay.cjs +83 -0
- package/dist/src/builders/server/networkRelay.cjs.map +1 -0
- package/dist/src/builders/server/networkRelay.mjs +81 -0
- package/dist/src/builders/server/networkRelay.mjs.map +1 -0
- package/dist/src/builders/server/orgPluginLibraryBinding.cjs +72 -0
- package/dist/src/builders/server/orgPluginLibraryBinding.cjs.map +1 -0
- package/dist/src/builders/server/orgPluginLibraryBinding.mjs +72 -0
- package/dist/src/builders/server/orgPluginLibraryBinding.mjs.map +1 -0
- package/dist/src/builders/server/packageReloadCheck.cjs +46 -2
- package/dist/src/builders/server/packageReloadCheck.cjs.map +1 -1
- package/dist/src/builders/server/packageReloadCheck.mjs +46 -3
- package/dist/src/builders/server/packageReloadCheck.mjs.map +1 -1
- package/dist/src/builders/server/packageUrl.cjs +161 -58
- package/dist/src/builders/server/packageUrl.cjs.map +1 -1
- package/dist/src/builders/server/packageUrl.mjs +162 -58
- package/dist/src/builders/server/packageUrl.mjs.map +1 -1
- package/dist/src/builders/server/privateRelay.cjs +309 -0
- package/dist/src/builders/server/privateRelay.cjs.map +1 -0
- package/dist/src/builders/server/privateRelay.mjs +305 -0
- package/dist/src/builders/server/privateRelay.mjs.map +1 -0
- package/dist/src/builders/server/privateRelayCarrier.cjs +316 -0
- package/dist/src/builders/server/privateRelayCarrier.cjs.map +1 -0
- package/dist/src/builders/server/privateRelayCarrier.mjs +309 -0
- package/dist/src/builders/server/privateRelayCarrier.mjs.map +1 -0
- package/dist/src/builders/server/runtime.cjs +2731 -485
- package/dist/src/builders/server/runtime.cjs.map +1 -1
- package/dist/src/builders/server/runtime.mjs +2741 -499
- package/dist/src/builders/server/runtime.mjs.map +1 -1
- package/dist/src/builders/server/runtimeResources.cjs +37 -0
- package/dist/src/builders/server/runtimeResources.cjs.map +1 -1
- package/dist/src/builders/server/runtimeResources.mjs +38 -2
- package/dist/src/builders/server/runtimeResources.mjs.map +1 -1
- package/dist/src/builders/server/sandboxRouter.cjs +815 -0
- package/dist/src/builders/server/sandboxRouter.cjs.map +1 -0
- package/dist/src/builders/server/sandboxRouter.mjs +811 -0
- package/dist/src/builders/server/sandboxRouter.mjs.map +1 -0
- package/dist/src/builders/server/sandboxSessionHandoff.cjs +298 -0
- package/dist/src/builders/server/sandboxSessionHandoff.cjs.map +1 -0
- package/dist/src/builders/server/sandboxSessionHandoff.mjs +287 -0
- package/dist/src/builders/server/sandboxSessionHandoff.mjs.map +1 -0
- package/dist/src/builders/server/scopeReloadController.cjs +80 -0
- package/dist/src/builders/server/scopeReloadController.cjs.map +1 -0
- package/dist/src/builders/server/scopeReloadController.mjs +80 -0
- package/dist/src/builders/server/scopeReloadController.mjs.map +1 -0
- package/dist/src/builders/server/selectionStatus.cjs +2 -2
- package/dist/src/builders/server/selectionStatus.cjs.map +1 -1
- package/dist/src/builders/server/selectionStatus.mjs +2 -2
- package/dist/src/builders/server/selectionStatus.mjs.map +1 -1
- package/dist/src/builders/server/sessionArguments.cjs +65 -7
- package/dist/src/builders/server/sessionArguments.cjs.map +1 -1
- package/dist/src/builders/server/sessionArguments.mjs +64 -8
- package/dist/src/builders/server/sessionArguments.mjs.map +1 -1
- package/dist/src/builders/server/sessionRemoval.cjs +233 -0
- package/dist/src/builders/server/sessionRemoval.cjs.map +1 -0
- package/dist/src/builders/server/sessionRemoval.mjs +224 -0
- package/dist/src/builders/server/sessionRemoval.mjs.map +1 -0
- package/dist/src/builders/server/sessionSummaries.cjs +32 -0
- package/dist/src/builders/server/sessionSummaries.cjs.map +1 -0
- package/dist/src/builders/server/sessionSummaries.mjs +31 -0
- package/dist/src/builders/server/sessionSummaries.mjs.map +1 -0
- package/dist/src/builders/server/shutdown.cjs +23 -0
- package/dist/src/builders/server/shutdown.cjs.map +1 -1
- package/dist/src/builders/server/shutdown.mjs +21 -1
- package/dist/src/builders/server/shutdown.mjs.map +1 -1
- package/dist/src/builders/server/shutdownStack.cjs +44 -0
- package/dist/src/builders/server/shutdownStack.cjs.map +1 -0
- package/dist/src/builders/server/shutdownStack.mjs +43 -0
- package/dist/src/builders/server/shutdownStack.mjs.map +1 -0
- package/dist/src/builders/server/toolBoundaryHold.cjs +55 -0
- package/dist/src/builders/server/toolBoundaryHold.cjs.map +1 -0
- package/dist/src/builders/server/toolBoundaryHold.mjs +55 -0
- package/dist/src/builders/server/toolBoundaryHold.mjs.map +1 -0
- package/dist/src/builders/server/watcherService.cjs +55 -28
- package/dist/src/builders/server/watcherService.cjs.map +1 -1
- package/dist/src/builders/server/watcherService.mjs +55 -27
- package/dist/src/builders/server/watcherService.mjs.map +1 -1
- package/dist/src/builders/server/webTemplateDecision.cjs +7 -3
- package/dist/src/builders/server/webTemplateDecision.cjs.map +1 -1
- package/dist/src/builders/server/webTemplateDecision.mjs +7 -3
- package/dist/src/builders/server/webTemplateDecision.mjs.map +1 -1
- package/dist/src/builders/server/workspaceAdmission.cjs +96 -0
- package/dist/src/builders/server/workspaceAdmission.cjs.map +1 -0
- package/dist/src/builders/server/workspaceAdmission.mjs +90 -0
- package/dist/src/builders/server/workspaceAdmission.mjs.map +1 -0
- package/dist/src/builders/server/workspaceCheckout.cjs +16 -7
- package/dist/src/builders/server/workspaceCheckout.cjs.map +1 -1
- package/dist/src/builders/server/workspaceCheckout.mjs +16 -7
- package/dist/src/builders/server/workspaceCheckout.mjs.map +1 -1
- package/dist/src/builders/web/bundle.cjs +16 -14
- package/dist/src/builders/web/bundle.cjs.map +1 -1
- package/dist/src/builders/web/bundle.d.mts +3 -0
- package/dist/src/builders/web/bundle.d.mts.map +1 -1
- package/dist/src/builders/web/bundle.mjs +15 -13
- package/dist/src/builders/web/bundle.mjs.map +1 -1
- package/dist/src/builders/web/index.cjs +77 -59
- package/dist/src/builders/web/index.cjs.map +1 -1
- package/dist/src/builders/web/index.d.mts +19 -14
- package/dist/src/builders/web/index.d.mts.map +1 -1
- package/dist/src/builders/web/index.mjs +76 -58
- package/dist/src/builders/web/index.mjs.map +1 -1
- package/dist/src/builders/web/webPluginGenerate.cjs +84 -45
- package/dist/src/builders/web/webPluginGenerate.cjs.map +1 -1
- package/dist/src/builders/web/webPluginGenerate.d.mts +13 -4
- package/dist/src/builders/web/webPluginGenerate.d.mts.map +1 -1
- package/dist/src/builders/web/webPluginGenerate.mjs +82 -44
- package/dist/src/builders/web/webPluginGenerate.mjs.map +1 -1
- package/dist/src/builders/web/webPluginManifest.cjs +24 -17
- package/dist/src/builders/web/webPluginManifest.cjs.map +1 -1
- package/dist/src/builders/web/webPluginManifest.d.mts +11 -23
- package/dist/src/builders/web/webPluginManifest.d.mts.map +1 -1
- package/dist/src/builders/web/webPluginManifest.mjs +23 -16
- package/dist/src/builders/web/webPluginManifest.mjs.map +1 -1
- package/dist/src/builders/web/webPluginScan.cjs +11 -8
- package/dist/src/builders/web/webPluginScan.cjs.map +1 -1
- package/dist/src/builders/web/webPluginScan.d.mts +1 -1
- package/dist/src/builders/web/webPluginScan.d.mts.map +1 -1
- package/dist/src/builders/web/webPluginScan.mjs +10 -7
- package/dist/src/builders/web/webPluginScan.mjs.map +1 -1
- package/dist/src/builders/web/webPluginVite.cjs +5 -5
- package/dist/src/builders/web/webPluginVite.cjs.map +1 -1
- package/dist/src/builders/web/webPluginVite.d.mts +1 -1
- package/dist/src/builders/web/webPluginVite.d.mts.map +1 -1
- package/dist/src/builders/web/webPluginVite.mjs +3 -3
- package/dist/src/builders/web/webPluginVite.mjs.map +1 -1
- package/dist/src/cli/cliApp.cjs +18 -19
- package/dist/src/cli/cliApp.cjs.map +1 -1
- package/dist/src/cli/cliApp.d.mts +1 -1
- package/dist/src/cli/cliApp.d.mts.map +1 -1
- package/dist/src/cli/cliApp.mjs +18 -19
- package/dist/src/cli/cliApp.mjs.map +1 -1
- package/dist/src/cli/commands/api-export/index.cjs +14 -13
- package/dist/src/cli/commands/api-export/index.cjs.map +1 -1
- package/dist/src/cli/commands/api-export/index.mjs +13 -12
- package/dist/src/cli/commands/api-export/index.mjs.map +1 -1
- package/dist/src/cli/commands/doctor/help.cjs +4 -3
- package/dist/src/cli/commands/doctor/help.cjs.map +1 -1
- package/dist/src/cli/commands/doctor/help.d.mts.map +1 -1
- package/dist/src/cli/commands/doctor/help.mjs +4 -3
- package/dist/src/cli/commands/doctor/help.mjs.map +1 -1
- package/dist/src/cli/commands/doctor/index.cjs +30 -17
- package/dist/src/cli/commands/doctor/index.cjs.map +1 -1
- package/dist/src/cli/commands/doctor/index.d.mts +4 -4
- package/dist/src/cli/commands/doctor/index.d.mts.map +1 -1
- package/dist/src/cli/commands/doctor/index.mjs +28 -15
- package/dist/src/cli/commands/doctor/index.mjs.map +1 -1
- package/dist/src/cli/commands/emit-mcp/index.cjs +3 -2
- package/dist/src/cli/commands/emit-mcp/index.cjs.map +1 -1
- package/dist/src/cli/commands/emit-mcp/index.d.mts.map +1 -1
- package/dist/src/cli/commands/emit-mcp/index.mjs +3 -2
- package/dist/src/cli/commands/emit-mcp/index.mjs.map +1 -1
- package/dist/src/cli/commands/explain/index.cjs +53 -38
- package/dist/src/cli/commands/explain/index.cjs.map +1 -1
- package/dist/src/cli/commands/explain/index.d.mts +3 -4
- package/dist/src/cli/commands/explain/index.d.mts.map +1 -1
- package/dist/src/cli/commands/explain/index.mjs +52 -37
- package/dist/src/cli/commands/explain/index.mjs.map +1 -1
- package/dist/src/cli/commands/init/help.cjs +3 -2
- package/dist/src/cli/commands/init/help.cjs.map +1 -1
- package/dist/src/cli/commands/init/help.d.mts.map +1 -1
- package/dist/src/cli/commands/init/help.mjs +3 -2
- package/dist/src/cli/commands/init/help.mjs.map +1 -1
- package/dist/src/cli/commands/init/index.cjs +17 -12
- package/dist/src/cli/commands/init/index.cjs.map +1 -1
- package/dist/src/cli/commands/init/index.d.mts.map +1 -1
- package/dist/src/cli/commands/init/index.mjs +16 -11
- package/dist/src/cli/commands/init/index.mjs.map +1 -1
- package/dist/src/cli/commands/init/presenter.cjs +29 -21
- package/dist/src/cli/commands/init/presenter.cjs.map +1 -1
- package/dist/src/cli/commands/init/presenter.mjs +29 -21
- package/dist/src/cli/commands/init/presenter.mjs.map +1 -1
- package/dist/src/cli/commands/sync/help.cjs +7 -3
- package/dist/src/cli/commands/sync/help.cjs.map +1 -1
- package/dist/src/cli/commands/sync/help.d.mts.map +1 -1
- package/dist/src/cli/commands/sync/help.mjs +7 -3
- package/dist/src/cli/commands/sync/help.mjs.map +1 -1
- package/dist/src/cli/commands/sync/index.cjs +72 -40
- package/dist/src/cli/commands/sync/index.cjs.map +1 -1
- package/dist/src/cli/commands/sync/index.d.mts.map +1 -1
- package/dist/src/cli/commands/sync/index.mjs +69 -37
- package/dist/src/cli/commands/sync/index.mjs.map +1 -1
- package/dist/src/cli/commands/sync/presenter.cjs +10 -1
- package/dist/src/cli/commands/sync/presenter.cjs.map +1 -1
- package/dist/src/cli/commands/sync/presenter.d.mts +0 -9
- package/dist/src/cli/commands/sync/presenter.d.mts.map +1 -1
- package/dist/src/cli/commands/sync/presenter.mjs +10 -1
- package/dist/src/cli/commands/sync/presenter.mjs.map +1 -1
- package/dist/src/cli/commands/web/index.cjs +7 -6
- package/dist/src/cli/commands/web/index.cjs.map +1 -1
- package/dist/src/cli/commands/web/index.mjs +6 -5
- package/dist/src/cli/commands/web/index.mjs.map +1 -1
- package/dist/src/cli/harnessOptions.cjs +15 -24
- package/dist/src/cli/harnessOptions.cjs.map +1 -1
- package/dist/src/cli/harnessOptions.d.mts +2 -2
- package/dist/src/cli/harnessOptions.d.mts.map +1 -1
- package/dist/src/cli/harnessOptions.mjs +14 -22
- package/dist/src/cli/harnessOptions.mjs.map +1 -1
- package/dist/src/cli/help.cjs +20 -26
- package/dist/src/cli/help.cjs.map +1 -1
- package/dist/src/cli/help.d.mts +1 -2
- package/dist/src/cli/help.d.mts.map +1 -1
- package/dist/src/cli/help.mjs +15 -20
- package/dist/src/cli/help.mjs.map +1 -1
- package/dist/src/cli/locale.cjs +25 -0
- package/dist/src/cli/locale.cjs.map +1 -0
- package/dist/src/cli/locale.mjs +22 -0
- package/dist/src/cli/locale.mjs.map +1 -0
- package/dist/src/cli/matrixOptions.cjs +85 -37
- package/dist/src/cli/matrixOptions.cjs.map +1 -1
- package/dist/src/cli/matrixOptions.d.mts +22 -16
- package/dist/src/cli/matrixOptions.d.mts.map +1 -1
- package/dist/src/cli/matrixOptions.mjs +76 -33
- package/dist/src/cli/matrixOptions.mjs.map +1 -1
- package/dist/src/cli/options.cjs +51 -128
- package/dist/src/cli/options.cjs.map +1 -1
- package/dist/src/cli/options.d.mts +1 -1
- package/dist/src/cli/options.d.mts.map +1 -1
- package/dist/src/cli/options.mjs +53 -130
- package/dist/src/cli/options.mjs.map +1 -1
- package/dist/src/cli/router.cjs +0 -1
- package/dist/src/cli/router.cjs.map +1 -1
- package/dist/src/cli/router.d.mts +1 -1
- package/dist/src/cli/router.mjs +0 -1
- package/dist/src/cli/router.mjs.map +1 -1
- package/dist/src/cli/server/options.cjs +37 -7
- package/dist/src/cli/server/options.cjs.map +1 -1
- package/dist/src/cli/server/options.mjs +37 -7
- package/dist/src/cli/server/options.mjs.map +1 -1
- package/dist/src/cli/server/processGuards.cjs +22 -15
- package/dist/src/cli/server/processGuards.cjs.map +1 -1
- package/dist/src/cli/server/processGuards.mjs +21 -14
- package/dist/src/cli/server/processGuards.mjs.map +1 -1
- package/dist/src/cli/server/restartPolicy.cjs +38 -0
- package/dist/src/cli/server/restartPolicy.cjs.map +1 -0
- package/dist/src/cli/server/restartPolicy.d.mts +21 -0
- package/dist/src/cli/server/restartPolicy.d.mts.map +1 -0
- package/dist/src/cli/server/restartPolicy.mjs +36 -0
- package/dist/src/cli/server/restartPolicy.mjs.map +1 -0
- package/dist/src/cli/server/run.cjs +12 -11
- package/dist/src/cli/server/run.cjs.map +1 -1
- package/dist/src/cli/server/run.mjs +11 -10
- package/dist/src/cli/server/run.mjs.map +1 -1
- package/dist/src/cli/server/supervise.cjs +89 -0
- package/dist/src/cli/server/supervise.cjs.map +1 -0
- package/dist/src/cli/server/supervise.mjs +89 -0
- package/dist/src/cli/server/supervise.mjs.map +1 -0
- package/dist/src/composition/harnessState/index.cjs +2 -1
- package/dist/src/composition/harnessState/index.cjs.map +1 -1
- package/dist/src/composition/harnessState/index.d.mts +2 -1
- package/dist/src/composition/harnessState/index.d.mts.map +1 -1
- package/dist/src/composition/harnessState/index.mjs +2 -1
- package/dist/src/composition/harnessState/index.mjs.map +1 -1
- package/dist/src/composition/layerPackageInstaller/index.cjs +293 -86
- package/dist/src/composition/layerPackageInstaller/index.cjs.map +1 -1
- package/dist/src/composition/layerPackageInstaller/index.d.mts +25 -2
- package/dist/src/composition/layerPackageInstaller/index.d.mts.map +1 -1
- package/dist/src/composition/layerPackageInstaller/index.mjs +295 -94
- package/dist/src/composition/layerPackageInstaller/index.mjs.map +1 -1
- package/dist/src/composition/marketplaceCatalog/index.cjs +136 -0
- package/dist/src/composition/marketplaceCatalog/index.cjs.map +1 -0
- package/dist/src/composition/marketplaceCatalog/index.mjs +132 -0
- package/dist/src/composition/marketplaceCatalog/index.mjs.map +1 -0
- package/dist/src/composition/orgPluginActivation/index.cjs +179 -0
- package/dist/src/composition/orgPluginActivation/index.cjs.map +1 -0
- package/dist/src/composition/orgPluginActivation/index.mjs +177 -0
- package/dist/src/composition/orgPluginActivation/index.mjs.map +1 -0
- package/dist/src/composition/orgPluginLibrary/index.cjs +205 -0
- package/dist/src/composition/orgPluginLibrary/index.cjs.map +1 -0
- package/dist/src/composition/orgPluginLibrary/index.mjs +200 -0
- package/dist/src/composition/orgPluginLibrary/index.mjs.map +1 -0
- package/dist/src/composition/pluginMarketplace/index.cjs +304 -0
- package/dist/src/composition/pluginMarketplace/index.cjs.map +1 -0
- package/dist/src/composition/pluginMarketplace/index.mjs +302 -0
- package/dist/src/composition/pluginMarketplace/index.mjs.map +1 -0
- package/dist/src/composition/poHomeMigration/index.cjs +46 -26
- package/dist/src/composition/poHomeMigration/index.cjs.map +1 -1
- package/dist/src/composition/poHomeMigration/index.d.mts.map +1 -1
- package/dist/src/composition/poHomeMigration/index.mjs +45 -25
- package/dist/src/composition/poHomeMigration/index.mjs.map +1 -1
- package/dist/src/composition/projectTrust/index.cjs +40 -3
- package/dist/src/composition/projectTrust/index.cjs.map +1 -1
- package/dist/src/composition/projectTrust/index.d.mts +8 -0
- package/dist/src/composition/projectTrust/index.d.mts.map +1 -1
- package/dist/src/composition/projectTrust/index.mjs +33 -2
- package/dist/src/composition/projectTrust/index.mjs.map +1 -1
- package/dist/src/composition/repository/index.cjs +29 -12
- package/dist/src/composition/repository/index.cjs.map +1 -1
- package/dist/src/composition/repository/index.d.mts +10 -3
- package/dist/src/composition/repository/index.d.mts.map +1 -1
- package/dist/src/composition/repository/index.mjs +29 -13
- package/dist/src/composition/repository/index.mjs.map +1 -1
- package/dist/src/composition/syncPrune/index.cjs +23 -16
- package/dist/src/composition/syncPrune/index.cjs.map +1 -1
- package/dist/src/composition/syncPrune/index.d.mts.map +1 -1
- package/dist/src/composition/syncPrune/index.mjs +22 -15
- package/dist/src/composition/syncPrune/index.mjs.map +1 -1
- package/dist/src/composition/syncService/index.cjs +441 -194
- package/dist/src/composition/syncService/index.cjs.map +1 -1
- package/dist/src/composition/syncService/index.d.mts +4 -1
- package/dist/src/composition/syncService/index.d.mts.map +1 -1
- package/dist/src/composition/syncService/index.mjs +440 -196
- package/dist/src/composition/syncService/index.mjs.map +1 -1
- package/dist/src/composition/syncService/localBuilds.cjs +41 -37
- package/dist/src/composition/syncService/localBuilds.cjs.map +1 -1
- package/dist/src/composition/syncService/localBuilds.mjs +40 -37
- package/dist/src/composition/syncService/localBuilds.mjs.map +1 -1
- package/dist/src/composition/transitionLayers.cjs.map +1 -1
- package/dist/src/composition/transitionLayers.d.mts +3 -3
- package/dist/src/composition/transitionLayers.d.mts.map +1 -1
- package/dist/src/composition/transitionLayers.mjs.map +1 -1
- package/dist/src/composition/types/harness.d.mts +4 -9
- package/dist/src/composition/types/harness.d.mts.map +1 -1
- package/dist/src/extensions/setupDiagnostics.cjs +8 -8
- package/dist/src/extensions/setupDiagnostics.cjs.map +1 -1
- package/dist/src/extensions/setupDiagnostics.mjs +8 -8
- package/dist/src/extensions/setupDiagnostics.mjs.map +1 -1
- package/dist/webBuilder.cjs +1 -0
- package/dist/webBuilder.d.mts +2 -2
- package/dist/webBuilder.mjs +2 -2
- package/docs/server/api-export.md +9 -9
- package/docs/server/api.md +22 -125
- package/docs/server/getting-started.md +21 -85
- package/docs/server/index.md +13 -58
- package/docs/server/ipc.md +26 -72
- package/docs/server/lifecycle.md +18 -91
- package/docs/server/security.md +20 -80
- package/package.json +47 -67
- package/src/prompts/po-author-extension/SKILL.md +2 -2
- package/src/prompts/po-author-extension/references/extension-contract.md +4 -6
- package/dist/antigravity.cjs +0 -5
- package/dist/antigravity.d.mts +0 -2
- package/dist/antigravity.mjs +0 -1
- package/dist/codex.cjs +0 -8
- package/dist/codex.d.mts +0 -2
- package/dist/codex.mjs +0 -1
- package/dist/compatibility.cjs +0 -27
- package/dist/compatibility.d.mts +0 -6
- package/dist/compatibility.mjs +0 -6
- package/dist/compatibilityCommand.cjs +0 -4
- package/dist/compatibilityCommand.d.mts +0 -2
- package/dist/compatibilityCommand.mjs +0 -1
- package/dist/compatibilityContext.cjs +0 -3
- package/dist/compatibilityContext.d.mts +0 -2
- package/dist/compatibilityContext.mjs +0 -1
- package/dist/compatibilityOptions.cjs +0 -5
- package/dist/compatibilityOptions.d.mts +0 -2
- package/dist/compatibilityOptions.mjs +0 -1
- package/dist/process.cjs +0 -12
- package/dist/process.d.mts +0 -2
- package/dist/process.mjs +0 -1
- package/dist/src/builders/hooks/index.cjs +0 -238
- package/dist/src/builders/hooks/index.cjs.map +0 -1
- package/dist/src/builders/hooks/index.mjs +0 -231
- package/dist/src/builders/hooks/index.mjs.map +0 -1
- package/dist/src/cli/commands/compat/context.cjs +0 -115
- package/dist/src/cli/commands/compat/context.cjs.map +0 -1
- package/dist/src/cli/commands/compat/context.d.mts +0 -22
- package/dist/src/cli/commands/compat/context.d.mts.map +0 -1
- package/dist/src/cli/commands/compat/context.mjs +0 -110
- package/dist/src/cli/commands/compat/context.mjs.map +0 -1
- package/dist/src/cli/commands/compat/help.cjs +0 -26
- package/dist/src/cli/commands/compat/help.cjs.map +0 -1
- package/dist/src/cli/commands/compat/help.d.mts +0 -4
- package/dist/src/cli/commands/compat/help.d.mts.map +0 -1
- package/dist/src/cli/commands/compat/help.mjs +0 -25
- package/dist/src/cli/commands/compat/help.mjs.map +0 -1
- package/dist/src/cli/commands/compat/index.cjs +0 -73
- package/dist/src/cli/commands/compat/index.cjs.map +0 -1
- package/dist/src/cli/commands/compat/index.d.mts +0 -14
- package/dist/src/cli/commands/compat/index.d.mts.map +0 -1
- package/dist/src/cli/commands/compat/index.mjs +0 -70
- package/dist/src/cli/commands/compat/index.mjs.map +0 -1
- package/dist/src/cli/commands/compat/options.cjs +0 -88
- package/dist/src/cli/commands/compat/options.cjs.map +0 -1
- package/dist/src/cli/commands/compat/options.d.mts +0 -15
- package/dist/src/cli/commands/compat/options.d.mts.map +0 -1
- package/dist/src/cli/commands/compat/options.mjs +0 -86
- package/dist/src/cli/commands/compat/options.mjs.map +0 -1
- package/dist/src/cli/commands/compat/providers/antigravity.cjs +0 -294
- package/dist/src/cli/commands/compat/providers/antigravity.cjs.map +0 -1
- package/dist/src/cli/commands/compat/providers/antigravity.d.mts +0 -9
- package/dist/src/cli/commands/compat/providers/antigravity.d.mts.map +0 -1
- package/dist/src/cli/commands/compat/providers/antigravity.mjs +0 -289
- package/dist/src/cli/commands/compat/providers/antigravity.mjs.map +0 -1
- package/dist/src/cli/commands/compat/providers/codex.cjs +0 -178
- package/dist/src/cli/commands/compat/providers/codex.cjs.map +0 -1
- package/dist/src/cli/commands/compat/providers/codex.d.mts +0 -17
- package/dist/src/cli/commands/compat/providers/codex.d.mts.map +0 -1
- package/dist/src/cli/commands/compat/providers/codex.mjs +0 -170
- package/dist/src/cli/commands/compat/providers/codex.mjs.map +0 -1
- package/dist/src/cli/commands/compat/providers/index.cjs +0 -65
- package/dist/src/cli/commands/compat/providers/index.cjs.map +0 -1
- package/dist/src/cli/commands/compat/providers/index.d.mts +0 -15
- package/dist/src/cli/commands/compat/providers/index.d.mts.map +0 -1
- package/dist/src/cli/commands/compat/providers/index.mjs +0 -45
- package/dist/src/cli/commands/compat/providers/index.mjs.map +0 -1
- package/dist/src/cli/commands/compat/providers/process.cjs +0 -172
- package/dist/src/cli/commands/compat/providers/process.cjs.map +0 -1
- package/dist/src/cli/commands/compat/providers/process.d.mts +0 -33
- package/dist/src/cli/commands/compat/providers/process.d.mts.map +0 -1
- package/dist/src/cli/commands/compat/providers/process.mjs +0 -159
- package/dist/src/cli/commands/compat/providers/process.mjs.map +0 -1
- package/dist/src/cli/commands/compat/providers/shared.cjs +0 -76
- package/dist/src/cli/commands/compat/providers/shared.cjs.map +0 -1
- package/dist/src/cli/commands/compat/providers/shared.d.mts +0 -40
- package/dist/src/cli/commands/compat/providers/shared.d.mts.map +0 -1
- package/dist/src/cli/commands/compat/providers/shared.mjs +0 -61
- package/dist/src/cli/commands/compat/providers/shared.mjs.map +0 -1
- package/dist/src/cli/commands/compat/types.d.mts +0 -31
- package/dist/src/cli/commands/compat/types.d.mts.map +0 -1
- package/dist/src/cli/commands/init/constants.cjs +0 -11
- package/dist/src/cli/commands/init/constants.cjs.map +0 -1
- package/dist/src/cli/commands/init/constants.mjs +0 -11
- package/dist/src/cli/commands/init/constants.mjs.map +0 -1
|
@@ -6,10 +6,10 @@ import { Type } from "typebox";
|
|
|
6
6
|
//#region src/extensions/setupDiagnostics.ts
|
|
7
7
|
const DIAGNOSE_SETUP_NAME = "diagnose_setup";
|
|
8
8
|
const guidance = {
|
|
9
|
-
"config.yaml": "
|
|
10
|
-
"
|
|
11
|
-
"domains.yaml": "
|
|
12
|
-
"profiles.yaml": "
|
|
9
|
+
"config.yaml": "help-how-to-config",
|
|
10
|
+
"presets.yaml": "help-how-to-preset",
|
|
11
|
+
"domains.yaml": "help-how-to-domain",
|
|
12
|
+
"profiles.yaml": "help-how-to-profile"
|
|
13
13
|
};
|
|
14
14
|
function createSetupDiagnosticsTool(readScope, authorize) {
|
|
15
15
|
return defineTool({
|
|
@@ -23,18 +23,18 @@ function createSetupDiagnosticsTool(readScope, authorize) {
|
|
|
23
23
|
const scope = readScope();
|
|
24
24
|
const environment = projectHarnessEnvironment({
|
|
25
25
|
root: scope.repoRoot,
|
|
26
|
-
|
|
26
|
+
preset: scope.selection.preset,
|
|
27
27
|
domains: [...scope.selection.domains],
|
|
28
28
|
profile: scope.selection.profile
|
|
29
29
|
}, { ...scope.environment });
|
|
30
|
-
const report = collectDoctorReport(environment, scope.cwd);
|
|
30
|
+
const report = await collectDoctorReport(environment, scope.cwd);
|
|
31
31
|
signal.throwIfAborted();
|
|
32
32
|
authorize(execution.signal);
|
|
33
33
|
const result = {
|
|
34
34
|
scope: "current-session",
|
|
35
35
|
configurationRoot: report.repoRoot,
|
|
36
36
|
appliedSelection: {
|
|
37
|
-
|
|
37
|
+
preset: scope.selection.preset,
|
|
38
38
|
domains: [...scope.selection.domains],
|
|
39
39
|
profile: scope.selection.profile
|
|
40
40
|
},
|
|
@@ -43,7 +43,7 @@ function createSetupDiagnosticsTool(readScope, authorize) {
|
|
|
43
43
|
area: section.label,
|
|
44
44
|
status: section.problems.length ? "failed" : "passed",
|
|
45
45
|
problemCount: section.problems.length,
|
|
46
|
-
guidance: guidance[section.label] ?? "
|
|
46
|
+
guidance: guidance[section.label] ?? "help-how-to-help"
|
|
47
47
|
})),
|
|
48
48
|
skipped: report.skipped,
|
|
49
49
|
limitations: "These are saved configuration and installation checks, not a network authentication or agent health test. Error text and configuration values are omitted to protect credentials. Inspect a failed area with its package guidance before proposing a repair."
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupDiagnostics.mjs","names":["HELP_WHEN"],"sources":["../../../src/extensions/setupDiagnostics.ts"],"sourcesContent":["import { projectHarnessEnvironment } from '@agimon-ai/po-config/harnessState';\nimport type { PoHeadlessSelection } from '@agimon-ai/po-core/headless';\nimport { PO_HELP_WHEN as HELP_WHEN } from '@agimon-ai/po-core/help';\nimport { defineTool } from '@agimon-ai/po-core/serverPlugin';\nimport { Type } from 'typebox';\n\nimport { collectDoctorReport } from '../cli/commands/doctor';\n\nexport const DIAGNOSE_SETUP_NAME = 'diagnose_setup';\nexport interface SetupDiagnosticScope {\n repoRoot: string;\n cwd: string;\n environment: Readonly<Record<string, string | undefined>>;\n selection: Pick<PoHeadlessSelection, '
|
|
1
|
+
{"version":3,"file":"setupDiagnostics.mjs","names":["HELP_WHEN"],"sources":["../../../src/extensions/setupDiagnostics.ts"],"sourcesContent":["import { projectHarnessEnvironment } from '@agimon-ai/po-config/harnessState';\nimport type { PoHeadlessSelection } from '@agimon-ai/po-core/headless';\nimport { PO_HELP_WHEN as HELP_WHEN } from '@agimon-ai/po-core/help';\nimport { defineTool } from '@agimon-ai/po-core/serverPlugin';\nimport { Type } from 'typebox';\n\nimport { collectDoctorReport } from '../cli/commands/doctor';\n\n// web-plugin-tool-renderers: ignore diagnose_setup (a Help-mode tool: po-help's HelpStatusCard claims and draws it on web and phone)\nexport const DIAGNOSE_SETUP_NAME = 'diagnose_setup';\nexport interface SetupDiagnosticScope {\n repoRoot: string;\n cwd: string;\n environment: Readonly<Record<string, string | undefined>>;\n selection: Pick<PoHeadlessSelection, 'preset' | 'domains' | 'profile'>;\n}\n\nconst guidance: Readonly<Record<string, string>> = {\n 'config.yaml': 'help-how-to-config',\n 'presets.yaml': 'help-how-to-preset',\n 'domains.yaml': 'help-how-to-domain',\n 'profiles.yaml': 'help-how-to-profile',\n};\n\nexport function createSetupDiagnosticsTool(\n readScope: () => SetupDiagnosticScope,\n authorize: (signal?: AbortSignal) => AbortSignal,\n) {\n return defineTool({\n name: DIAGNOSE_SETUP_NAME,\n description:\n \"Check this session's saved configuration, installed packages, and the global web build without changing anything. Returns scoped check results and the relevant setup guidance, never configuration values or credentials.\",\n parameters: Type.Object({}, { additionalProperties: false }),\n when: HELP_WHEN,\n executionMode: 'serial',\n async execute(_input, execution) {\n const signal = authorize(execution.signal);\n const scope = readScope();\n const environment = projectHarnessEnvironment(\n {\n root: scope.repoRoot,\n preset: scope.selection.preset,\n domains: [...scope.selection.domains],\n profile: scope.selection.profile,\n },\n { ...scope.environment },\n );\n const report = await collectDoctorReport(environment, scope.cwd);\n signal.throwIfAborted();\n authorize(execution.signal);\n const result = {\n scope: 'current-session',\n configurationRoot: report.repoRoot,\n appliedSelection: {\n preset: scope.selection.preset,\n domains: [...scope.selection.domains],\n profile: scope.selection.profile,\n },\n status: report.problems === 0 && report.skipped.length === 0 ? 'checks-passed' : 'issues-found',\n checks: report.sections.map((section) => ({\n area: section.label,\n status: section.problems.length ? 'failed' : 'passed',\n problemCount: section.problems.length,\n guidance: guidance[section.label] ?? 'help-how-to-help',\n })),\n skipped: report.skipped,\n limitations:\n 'These are saved configuration and installation checks, not a network authentication or agent health test. Error text and configuration values are omitted to protect credentials. Inspect a failed area with its package guidance before proposing a repair.',\n };\n return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], details: result };\n },\n });\n}\n"],"mappings":";;;;;;AASA,MAAa,sBAAsB;AAQnC,MAAM,WAA6C;CACjD,eAAe;CACf,gBAAgB;CAChB,gBAAgB;CAChB,iBAAiB;AACnB;AAEA,SAAgB,2BACd,WACA,WACA;CACA,OAAO,WAAW;EAChB,MAAM;EACN,aACE;EACF,YAAY,KAAK,OAAO,CAAC,GAAG,EAAE,sBAAsB,MAAM,CAAC;EAC3D,MAAMA;EACN,eAAe;EACf,MAAM,QAAQ,QAAQ,WAAW;GAC/B,MAAM,SAAS,UAAU,UAAU,MAAM;GACzC,MAAM,QAAQ,UAAU;GACxB,MAAM,cAAc,0BAClB;IACE,MAAM,MAAM;IACZ,QAAQ,MAAM,UAAU;IACxB,SAAS,CAAC,GAAG,MAAM,UAAU,OAAO;IACpC,SAAS,MAAM,UAAU;GAC3B,GACA,EAAE,GAAG,MAAM,YAAY,CACzB;GACA,MAAM,SAAS,MAAM,oBAAoB,aAAa,MAAM,GAAG;GAC/D,OAAO,eAAe;GACtB,UAAU,UAAU,MAAM;GAC1B,MAAM,SAAS;IACb,OAAO;IACP,mBAAmB,OAAO;IAC1B,kBAAkB;KAChB,QAAQ,MAAM,UAAU;KACxB,SAAS,CAAC,GAAG,MAAM,UAAU,OAAO;KACpC,SAAS,MAAM,UAAU;IAC3B;IACA,QAAQ,OAAO,aAAa,KAAK,OAAO,QAAQ,WAAW,IAAI,kBAAkB;IACjF,QAAQ,OAAO,SAAS,KAAK,aAAa;KACxC,MAAM,QAAQ;KACd,QAAQ,QAAQ,SAAS,SAAS,WAAW;KAC7C,cAAc,QAAQ,SAAS;KAC/B,UAAU,SAAS,QAAQ,UAAU;IACvC,EAAE;IACF,SAAS,OAAO;IAChB,aACE;GACJ;GACA,OAAO;IAAE,SAAS,CAAC;KAAE,MAAM;KAAQ,MAAM,KAAK,UAAU,QAAQ,MAAM,CAAC;IAAE,CAAC;IAAG,SAAS;GAAO;EAC/F;CACF,CAAC;AACH"}
|
package/dist/webBuilder.cjs
CHANGED
|
@@ -52,6 +52,7 @@ exports.unslottedWebPackages = require_index.unslottedWebPackages;
|
|
|
52
52
|
exports.webHostVersion = require_index.webHostVersion;
|
|
53
53
|
exports.webPluginCssAlias = require_webPluginVite.webPluginCssAlias;
|
|
54
54
|
exports.webPluginOverridePlugin = require_webPluginVite.webPluginOverridePlugin;
|
|
55
|
+
exports.webPluginPackageFingerprint = require_webPluginGenerate.webPluginPackageFingerprint;
|
|
55
56
|
exports.webPluginRuntimeAliases = require_webPluginVite.webPluginRuntimeAliases;
|
|
56
57
|
exports.webPluginRuntimeFacadePlugin = require_webPluginVite.webPluginRuntimeFacadePlugin;
|
|
57
58
|
exports.webPluginRuntimeGlobal = require_webPluginVite.webPluginRuntimeGlobal;
|
package/dist/webBuilder.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DEFAULT_REGISTRATION_ORDER, DeclaredWebPlugin, PluginManifestField, WebPluginEntryDeclaration, WebPluginManifestError, compareCodeUnits, declaredPluginsOf, orderDeclaredPlugins, pluginBlocksOf, pluginSlot } from "./src/builders/web/webPluginManifest.mjs";
|
|
2
2
|
import { BUILD_RECORD, GlobalWebBuildInput, GlobalWebBuildRecord, GlobalWebBuildResult, buildKeyDirectory, compositionPackageRoots, duplicatePluginCopies, ensureGlobalWebBuild, globalBuildKey, mountWebPluginIds, mountWebPluginSlots, newestGlobalWebBuildKey, packageRootOf, readBuildJson, readGlobalWebBuildRecord, readGlobalWebBuildStatus, singleFlightBuild, unslottedWebPackages, webHostVersion } from "./src/builders/web/index.mjs";
|
|
3
3
|
import { BundleCockpitWebOptions, BundleCockpitWebResult, WebPluginBuildRecord, bundleCockpitWeb, manifestClosure } from "./src/builders/web/bundle.mjs";
|
|
4
|
-
import { BASE_STYLE_ENTRY, BUILTIN_CLIENT_MODULE, BUILTIN_CSS_MODULE, SyncGeneratedModules, WebPluginRegistryModules, WebPluginStyleEntries, ensureBuiltinWebPluginModules, pluginStyleEntryName, renderBuiltinWebPluginModules, writeSyncWebPluginModules, writeWebPluginStyleEntries } from "./src/builders/web/webPluginGenerate.mjs";
|
|
4
|
+
import { BASE_STYLE_ENTRY, BUILTIN_CLIENT_MODULE, BUILTIN_CSS_MODULE, SyncGeneratedModules, WebPluginRegistryModules, WebPluginStyleEntries, ensureBuiltinWebPluginModules, pluginStyleEntryName, renderBuiltinWebPluginModules, webPluginPackageFingerprint, writeSyncWebPluginModules, writeWebPluginStyleEntries } from "./src/builders/web/webPluginGenerate.mjs";
|
|
5
5
|
import { scanWebPlugins } from "./src/builders/web/webPluginScan.mjs";
|
|
6
6
|
import { ExportNameReader, WEB_PLUGIN_FACADE_CHUNK, WEB_PLUGIN_RUNTIME_SPECIFIERS, esModuleExportNames, isWebPluginFacade, readDevPluginRoots, renderWebPluginFacade, webPluginCssAlias, webPluginOverridePlugin, webPluginRuntimeAliases, webPluginRuntimeFacadePlugin, webPluginRuntimeGlobal } from "./src/builders/web/webPluginVite.mjs";
|
|
7
7
|
import { bundleAssetPolicyPlugin, classifyOptionalBundleAssets } from "./src/builders/web/bundleAssetPolicy.mjs";
|
|
8
8
|
import { DevPluginRootsInput, PLUGIN_ROOTS_ENV, PLUGIN_ROOTS_FILE, devPluginRoots } from "./src/builders/web/webDevRoots.mjs";
|
|
9
|
-
export { BASE_STYLE_ENTRY, BUILD_RECORD, BUILTIN_CLIENT_MODULE, BUILTIN_CSS_MODULE, BundleCockpitWebOptions, BundleCockpitWebResult, DEFAULT_REGISTRATION_ORDER, DeclaredWebPlugin, DevPluginRootsInput, ExportNameReader, GlobalWebBuildInput, GlobalWebBuildRecord, GlobalWebBuildResult, PLUGIN_ROOTS_ENV, PLUGIN_ROOTS_FILE, PluginManifestField, SyncGeneratedModules, WEB_PLUGIN_FACADE_CHUNK, WEB_PLUGIN_RUNTIME_SPECIFIERS, WebPluginBuildRecord, WebPluginEntryDeclaration, WebPluginManifestError, WebPluginRegistryModules, WebPluginStyleEntries, buildKeyDirectory, bundleAssetPolicyPlugin, bundleCockpitWeb, classifyOptionalBundleAssets, compareCodeUnits, compositionPackageRoots, declaredPluginsOf, devPluginRoots, duplicatePluginCopies, ensureBuiltinWebPluginModules, ensureGlobalWebBuild, esModuleExportNames, globalBuildKey, isWebPluginFacade, manifestClosure, mountWebPluginIds, mountWebPluginSlots, newestGlobalWebBuildKey, orderDeclaredPlugins, packageRootOf, pluginBlocksOf, pluginSlot, pluginStyleEntryName, readBuildJson, readDevPluginRoots, readGlobalWebBuildRecord, readGlobalWebBuildStatus, renderBuiltinWebPluginModules, renderWebPluginFacade, scanWebPlugins, singleFlightBuild, unslottedWebPackages, webHostVersion, webPluginCssAlias, webPluginOverridePlugin, webPluginRuntimeAliases, webPluginRuntimeFacadePlugin, webPluginRuntimeGlobal, writeSyncWebPluginModules, writeWebPluginStyleEntries };
|
|
9
|
+
export { BASE_STYLE_ENTRY, BUILD_RECORD, BUILTIN_CLIENT_MODULE, BUILTIN_CSS_MODULE, BundleCockpitWebOptions, BundleCockpitWebResult, DEFAULT_REGISTRATION_ORDER, DeclaredWebPlugin, DevPluginRootsInput, ExportNameReader, GlobalWebBuildInput, GlobalWebBuildRecord, GlobalWebBuildResult, PLUGIN_ROOTS_ENV, PLUGIN_ROOTS_FILE, PluginManifestField, SyncGeneratedModules, WEB_PLUGIN_FACADE_CHUNK, WEB_PLUGIN_RUNTIME_SPECIFIERS, WebPluginBuildRecord, WebPluginEntryDeclaration, WebPluginManifestError, WebPluginRegistryModules, WebPluginStyleEntries, buildKeyDirectory, bundleAssetPolicyPlugin, bundleCockpitWeb, classifyOptionalBundleAssets, compareCodeUnits, compositionPackageRoots, declaredPluginsOf, devPluginRoots, duplicatePluginCopies, ensureBuiltinWebPluginModules, ensureGlobalWebBuild, esModuleExportNames, globalBuildKey, isWebPluginFacade, manifestClosure, mountWebPluginIds, mountWebPluginSlots, newestGlobalWebBuildKey, orderDeclaredPlugins, packageRootOf, pluginBlocksOf, pluginSlot, pluginStyleEntryName, readBuildJson, readDevPluginRoots, readGlobalWebBuildRecord, readGlobalWebBuildStatus, renderBuiltinWebPluginModules, renderWebPluginFacade, scanWebPlugins, singleFlightBuild, unslottedWebPackages, webHostVersion, webPluginCssAlias, webPluginOverridePlugin, webPluginPackageFingerprint, webPluginRuntimeAliases, webPluginRuntimeFacadePlugin, webPluginRuntimeGlobal, writeSyncWebPluginModules, writeWebPluginStyleEntries };
|
package/dist/webBuilder.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { scanWebPlugins } from "./src/builders/web/webPluginScan.mjs";
|
|
|
3
3
|
import { BUILD_RECORD, buildKeyDirectory, compositionPackageRoots, duplicatePluginCopies, ensureGlobalWebBuild, globalBuildKey, mountWebPluginIds, mountWebPluginSlots, newestGlobalWebBuildKey, packageRootOf, readBuildJson, readGlobalWebBuildRecord, readGlobalWebBuildStatus, singleFlightBuild, unslottedWebPackages, webHostVersion } from "./src/builders/web/index.mjs";
|
|
4
4
|
import { bundleAssetPolicyPlugin, classifyOptionalBundleAssets } from "./src/builders/web/bundleAssetPolicy.mjs";
|
|
5
5
|
import { PLUGIN_ROOTS_ENV, PLUGIN_ROOTS_FILE, devPluginRoots } from "./src/builders/web/webDevRoots.mjs";
|
|
6
|
-
import { BASE_STYLE_ENTRY, BUILTIN_CLIENT_MODULE, BUILTIN_CSS_MODULE, ensureBuiltinWebPluginModules, pluginStyleEntryName, renderBuiltinWebPluginModules, writeSyncWebPluginModules, writeWebPluginStyleEntries } from "./src/builders/web/webPluginGenerate.mjs";
|
|
6
|
+
import { BASE_STYLE_ENTRY, BUILTIN_CLIENT_MODULE, BUILTIN_CSS_MODULE, ensureBuiltinWebPluginModules, pluginStyleEntryName, renderBuiltinWebPluginModules, webPluginPackageFingerprint, writeSyncWebPluginModules, writeWebPluginStyleEntries } from "./src/builders/web/webPluginGenerate.mjs";
|
|
7
7
|
import { WEB_PLUGIN_FACADE_CHUNK, WEB_PLUGIN_RUNTIME_SPECIFIERS, esModuleExportNames, isWebPluginFacade, readDevPluginRoots, renderWebPluginFacade, webPluginCssAlias, webPluginOverridePlugin, webPluginRuntimeAliases, webPluginRuntimeFacadePlugin, webPluginRuntimeGlobal } from "./src/builders/web/webPluginVite.mjs";
|
|
8
8
|
import { bundleCockpitWeb, manifestClosure } from "./src/builders/web/bundle.mjs";
|
|
9
|
-
export { BASE_STYLE_ENTRY, BUILD_RECORD, BUILTIN_CLIENT_MODULE, BUILTIN_CSS_MODULE, DEFAULT_REGISTRATION_ORDER, PLUGIN_ROOTS_ENV, PLUGIN_ROOTS_FILE, WEB_PLUGIN_FACADE_CHUNK, WEB_PLUGIN_RUNTIME_SPECIFIERS, WebPluginManifestError, buildKeyDirectory, bundleAssetPolicyPlugin, bundleCockpitWeb, classifyOptionalBundleAssets, compareCodeUnits, compositionPackageRoots, declaredPluginsOf, devPluginRoots, duplicatePluginCopies, ensureBuiltinWebPluginModules, ensureGlobalWebBuild, esModuleExportNames, globalBuildKey, isWebPluginFacade, manifestClosure, mountWebPluginIds, mountWebPluginSlots, newestGlobalWebBuildKey, orderDeclaredPlugins, packageRootOf, pluginBlocksOf, pluginSlot, pluginStyleEntryName, readBuildJson, readDevPluginRoots, readGlobalWebBuildRecord, readGlobalWebBuildStatus, renderBuiltinWebPluginModules, renderWebPluginFacade, scanWebPlugins, singleFlightBuild, unslottedWebPackages, webHostVersion, webPluginCssAlias, webPluginOverridePlugin, webPluginRuntimeAliases, webPluginRuntimeFacadePlugin, webPluginRuntimeGlobal, writeSyncWebPluginModules, writeWebPluginStyleEntries };
|
|
9
|
+
export { BASE_STYLE_ENTRY, BUILD_RECORD, BUILTIN_CLIENT_MODULE, BUILTIN_CSS_MODULE, DEFAULT_REGISTRATION_ORDER, PLUGIN_ROOTS_ENV, PLUGIN_ROOTS_FILE, WEB_PLUGIN_FACADE_CHUNK, WEB_PLUGIN_RUNTIME_SPECIFIERS, WebPluginManifestError, buildKeyDirectory, bundleAssetPolicyPlugin, bundleCockpitWeb, classifyOptionalBundleAssets, compareCodeUnits, compositionPackageRoots, declaredPluginsOf, devPluginRoots, duplicatePluginCopies, ensureBuiltinWebPluginModules, ensureGlobalWebBuild, esModuleExportNames, globalBuildKey, isWebPluginFacade, manifestClosure, mountWebPluginIds, mountWebPluginSlots, newestGlobalWebBuildKey, orderDeclaredPlugins, packageRootOf, pluginBlocksOf, pluginSlot, pluginStyleEntryName, readBuildJson, readDevPluginRoots, readGlobalWebBuildRecord, readGlobalWebBuildStatus, renderBuiltinWebPluginModules, renderWebPluginFacade, scanWebPlugins, singleFlightBuild, unslottedWebPackages, webHostVersion, webPluginCssAlias, webPluginOverridePlugin, webPluginPackageFingerprint, webPluginRuntimeAliases, webPluginRuntimeFacadePlugin, webPluginRuntimeGlobal, writeSyncWebPluginModules, writeWebPluginStyleEntries };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
# Export compiled client contracts
|
|
2
2
|
|
|
3
|
-
After installing the
|
|
3
|
+
After installing the host root's and the workspace's packages, run this in the workspace:
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
6
|
po sync
|
|
7
7
|
po api-export --out ./api-schema --strict
|
|
8
8
|
# Select a different session composition:
|
|
9
|
-
po api-export --out ./api-schema --
|
|
9
|
+
po api-export --out ./api-schema --preset copilot --strict
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
The command composes the
|
|
12
|
+
The command composes the host root and the workspace live and reads each selected server package's built `poServer.contracts.dist` straight from its installed package. Each contract module is imported in a bounded child process; the command never imports a server plugin, installs packages, or starts servers. A package without a readable contract is recorded as a coverage gap. Run `po sync` first if the configuration names packages that are not installed yet.
|
|
13
13
|
|
|
14
14
|
The export contains:
|
|
15
15
|
|
|
16
16
|
- `openapi.json`: OpenAPI 3.1 HTTP operations, scoped plugin paths, request and response schemas, authentication, and named SSE payload schemas in `x-sse-events`.
|
|
17
17
|
- `asyncapi.json`: AsyncAPI 3.0 Pi envelopes, Chord calls, subscriptions and state deltas, session methods and reconstructed state, and selected extension methods and channel payloads. `x-po` identifies scope, service, member, direction through the operation action, and operation kind.
|
|
18
|
-
- `manifest.json`: selected
|
|
18
|
+
- `manifest.json`: selected host, workspace and session modes, contract fingerprints (the generation is always `live`), composition fingerprints, package and protocol versions, explicit dynamic values, coverage gaps, and SHA-256 hashes of both documents.
|
|
19
19
|
|
|
20
|
-
The
|
|
20
|
+
The host and workspace scopes use their own default presets. `--preset` changes only the session composition. Local WebSockets carry Chord JSON text frames; remote WebSockets carry sealed envelopes around those frames. Channel operations describe decoded payloads. The selected package's `service` and `member` identify plugin calls carried through `po.hub.invoke`.
|
|
21
21
|
|
|
22
22
|
Export with `--strict` in CI. An incomplete export is still written for review, but the command exits with status 1. Missing third-party declarations do not prevent normal sync. Dynamic tool, provider and author-capability values are listed explicitly; exporting a schema does not freeze runtime capabilities or prove a client compatible.
|
|
23
23
|
|
|
@@ -25,7 +25,7 @@ Compare committed artifacts for API drift, then validate actual client requests,
|
|
|
25
25
|
|
|
26
26
|
## Declare a package contract
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
With `po-build`, add `src/exports/apiContracts.ts`; the build writes its contract metadata automatically. A host with a custom build declares matching source and output paths itself, for example:
|
|
29
29
|
|
|
30
30
|
```json
|
|
31
31
|
{
|
|
@@ -35,13 +35,13 @@ Add a separate data entry to the existing server metadata:
|
|
|
35
35
|
"scopes": ["session"],
|
|
36
36
|
"contracts": {
|
|
37
37
|
"entry": "./src/exports/apiContracts.ts",
|
|
38
|
-
"dist": "./dist/
|
|
38
|
+
"dist": "./dist/apiContracts.mjs"
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
Keep the contract entry separate from the runtime. Its graph must be free of handlers, lifecycle hooks, environment reads and service initialization. Declare every imported runtime dependency in `dependencies`, including `typebox` when using it. Undeclared imports can be accidentally bundled and behave differently after compilation.
|
|
45
45
|
|
|
46
46
|
```ts
|
|
47
47
|
import { defineApiContract } from '@agimon-ai/po-core/apiContracts';
|
|
@@ -83,4 +83,4 @@ node packages/cli/po/dist/bin/cli.mjs sync
|
|
|
83
83
|
node packages/cli/po/dist/bin/cli.mjs api-export --out /tmp/po-api-schema --strict
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
OpenAPI uses direct settings routes, plural `plugins` mounts, and workspace-nested session resources. AsyncAPI declares `/api/ws`, `/api/workspaces/{workspaceId}/ws`, and `/api/workspaces/{workspaceId}/sessions/{sessionId}/ws`. The
|
|
86
|
+
OpenAPI uses direct settings routes, plural `plugins` mounts, and workspace-nested session resources. AsyncAPI declares `/api/ws`, `/api/workspaces/{workspaceId}/ws`, and `/api/workspaces/{workspaceId}/sessions/{sessionId}/ws`. The host channel also declares the routed workspace and session operations available through the aggregate hub connection. `x-po.transportScope` identifies the addressed channel separately from the operation's composition scope.
|
package/docs/server/api.md
CHANGED
|
@@ -1,145 +1,42 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
Session APIs let a Po package add HTTP behavior beside the direct headless runtime it extends. A package's server plugin is imported from the package's built `poServer.dist` entry, installed in `po-server`, and called in process. The public client route is `/api/workspaces/<workspace-id>/sessions/<session-id>/plugins/<base-path>/...`.
|
|
4
|
-
|
|
5
|
-
This guide also covers the package's TypeScript exports for Node.js callers that want to compose the same in-process services.
|
|
6
|
-
|
|
7
|
-
## The design
|
|
8
|
-
|
|
9
|
-
```text
|
|
10
|
-
package.json poServer declaration
|
|
11
|
-
|
|
|
12
|
-
v
|
|
13
|
-
live composition of the session's root
|
|
14
|
-
|
|
|
15
|
-
v
|
|
16
|
-
built dist entry, content-addressed URL
|
|
17
|
-
|
|
|
18
|
-
v
|
|
19
|
-
direct headless host
|
|
20
|
-
start(context) per API
|
|
21
|
-
|
|
|
22
|
-
v
|
|
23
|
-
in-process Request dispatch
|
|
24
|
-
|
|
|
25
|
-
v
|
|
26
|
-
/api/workspaces/<workspace-id>/sessions/<id>/plugins/<base-path>/...
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
The server resolves server package candidates from the same live composition that selects the session runtime. This ensures:
|
|
30
|
-
|
|
31
|
-
- the API implementation follows the same repository, mode, and package selection as the session runtime;
|
|
32
|
-
- each built entry resolves inside its own package and is imported through a URL that changes with the package content; and
|
|
33
|
-
- discovery and validation happen when a scope is admitted or a session starts, not by scanning arbitrary modules at request time.
|
|
34
|
-
|
|
35
|
-
The server starts each handler once, routes requests by a fixed base path, and calls `close()` during shutdown. A broken optional API is isolated so it does not take down the runtime or unrelated packages.
|
|
36
|
-
|
|
37
|
-
## Declare a session API
|
|
38
|
-
|
|
39
|
-
A package declares its server plugin in one `poServer` block in `package.json`:
|
|
1
|
+
# Package APIs and host composition
|
|
40
2
|
|
|
41
|
-
|
|
42
|
-
{
|
|
43
|
-
"poServer": {
|
|
44
|
-
"entry": "./src/extensions/server.ts",
|
|
45
|
-
"dist": "./dist/extensions/server.mjs",
|
|
46
|
-
"scopes": ["session"]
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Publish a default-exported `PoServerPlugin`, an object with a `name` and an `apply`, through that entry. In its `apply`, use `requirePoServerHost(context).registerApi(api)` and return a disposer that calls the registration's `dispose()`. Declare the host service in `inject` and check scope before registering. The API implementation owns its base path.
|
|
52
|
-
|
|
53
|
-
Paths are package-relative and cannot escape the package. The server records the built module path and the modes and layers that selected the package, and uses that ownership for admission. See the [complete plugin example](../../../../clients/po-web/docs/package-apis.md#declare-an-api).
|
|
3
|
+
A server plugin can mount an HTTP handler beside its owning host, workspace, or session scope. Po Web forwards requests; the headless host executes the handler in process.
|
|
54
4
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
Each API registered by a server plugin implements this lifecycle:
|
|
58
|
-
|
|
59
|
-
```ts
|
|
60
|
-
interface PoApi {
|
|
61
|
-
basePath: string;
|
|
62
|
-
start(context: PoApiContext): {
|
|
63
|
-
fetch(request: Request): Response | Promise<Response>;
|
|
64
|
-
close(): void;
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
`start()` creates session-owned resources once. `fetch()` handles requests relative to the package mount. `close()` must release timers, watchers, streams, and other resources created during startup.
|
|
70
|
-
|
|
71
|
-
Keep the API adapter reusable and have the server plugin import it. The plugin's disposer closes the registration.
|
|
72
|
-
|
|
73
|
-
## Selecting the API composition
|
|
74
|
-
|
|
75
|
-
The session root's configuration is the only composition source. The server reads the `poServer` declaration of each package that composition selects, checks that its built entry stays inside the package, and filters candidates by scope and ownership before importing them. It never scans arbitrary package manifests at request time and never falls back to an alternate module directory.
|
|
76
|
-
|
|
77
|
-
Rebuild the package after changing a server-side API. The next new session imports the new build; running sessions keep the module they loaded.
|
|
78
|
-
|
|
79
|
-
A composition that selects no API is a valid no-API state. In that case package API requests return `404`; the server still provides the typed session protocol. A required eligible package failure prevents readiness. An optional package failure is reported and does not remove unrelated APIs.
|
|
80
|
-
|
|
81
|
-
## Routing and isolation
|
|
82
|
-
|
|
83
|
-
The public path is:
|
|
84
|
-
|
|
85
|
-
```text
|
|
86
|
-
/api/workspaces/<workspace-id>/sessions/<session-id>/plugins/<base-path>/<package route>
|
|
87
|
-
```
|
|
5
|
+
For the routing table, a working routed example, and browser URL construction, use [Package APIs](https://github.com/AgiFlow/po/blob/main/packages/clients/po-web/docs/package-apis.md). Standard extensions author `api/<base-path>/route.server.ts` under the appropriate `src/extensions` scope; `po-build` generates registration and manifest metadata.
|
|
88
6
|
|
|
89
|
-
|
|
7
|
+
## Handler lifetime
|
|
90
8
|
|
|
91
|
-
|
|
9
|
+
The low-level `PoApi` contract from `@agimon-ai/po-core/packageApi` contains:
|
|
92
10
|
|
|
93
|
-
|
|
11
|
+
- `basePath`: the segment below the scope's plural `plugins` mount.
|
|
12
|
+
- `start(context)`: creates one handler per mount.
|
|
13
|
+
- Handler `fetch(request)`: receives paths relative to that mount.
|
|
14
|
+
- Handler `close()`: releases owned resources, including after partial startup.
|
|
94
15
|
|
|
95
|
-
A
|
|
16
|
+
A request to `/api/workspaces/w/sessions/s/plugins/runner/runners/r1/log` reaches the `runner` handler as `/runners/r1/log`. Unknown mounts return `404`; conflicting base paths are diagnosed rather than silently replacing the first handler. An optional handler failure must not remove unrelated APIs.
|
|
96
17
|
|
|
97
|
-
|
|
98
|
-
| --------------- | ------------------------------------------------------- |
|
|
99
|
-
| `scope` | Always `session` |
|
|
100
|
-
| `sessionId` | Identity of the owning session |
|
|
101
|
-
| `cwd` | Session working directory |
|
|
102
|
-
| `internalToken` | Optional process context for trusted child coordination |
|
|
103
|
-
| `hubToken` | Optional context for trusted cockpit coordination |
|
|
104
|
-
| `onNotice` | Host-visible diagnostic callback |
|
|
18
|
+
Rebuild a changed server package. New sessions can import its new content-addressed build; a browser reconnect does not replace the code held by an existing session.
|
|
105
19
|
|
|
106
|
-
|
|
20
|
+
## Authority
|
|
107
21
|
|
|
108
|
-
|
|
22
|
+
`PoApiContext` supplies admitted scope, workspace/session identity, environment, and optional host capabilities. Its process credentials are not browser credentials and must not be returned to clients.
|
|
109
23
|
|
|
110
|
-
|
|
24
|
+
Use trusted caller stamps when locality, device identity, or step-up matters. Never accept browser-provided identity headers, repository paths, or IDs as authority. Each handler still validates methods, body shape, resource ownership, path containment, and response/stream limits.
|
|
111
25
|
|
|
112
|
-
|
|
26
|
+
Packages are trusted executable code. Scope is a lifecycle and routing boundary, not operating-system isolation.
|
|
113
27
|
|
|
114
|
-
|
|
115
|
-
| ----------------------------------- | ----------------------------------------------------------------- |
|
|
116
|
-
| `createHeadlessSessionManager` | Own direct session hosts and dispose them |
|
|
117
|
-
| `createHeadlessHub` | Aggregate sessions, channels, and package API dispatch |
|
|
118
|
-
| `serveHeadlessServer` | Expose HTTP and authenticated `/api/ws` WebSocket routes |
|
|
119
|
-
| `createAgentSessionRuntime` | Project a direct runtime into typed session state and operations |
|
|
120
|
-
| `serveAgentSessions` | Serve `po.session` on a Chord host from resolved session runtimes |
|
|
121
|
-
| `createHeadlessChildSessionService` | Provide explicitly requested child-session capabilities |
|
|
28
|
+
## Compose a Node host
|
|
122
29
|
|
|
123
|
-
|
|
30
|
+
The public host primitives belong to **`@agimon-ai/po-core`**, not an `@agimon-ai/po/server` subpath:
|
|
124
31
|
|
|
125
32
|
```ts
|
|
33
|
+
import { createHeadlessSessionManager } from '@agimon-ai/po-core/headlessSessionManager';
|
|
126
34
|
import { createNodePlatform } from '@agimon-ai/po-core/nodePlatform';
|
|
127
|
-
import { createHeadlessHub,
|
|
128
|
-
|
|
129
|
-
const platform = createNodePlatform({ sessionsRoot: '/var/lib/po/sessions' });
|
|
130
|
-
const manager = createHeadlessSessionManager();
|
|
131
|
-
const hub = createHeadlessHub({ manager, platform });
|
|
132
|
-
const server = await serveHeadlessServer({
|
|
133
|
-
headlessHub: hub,
|
|
134
|
-
port: 7533,
|
|
135
|
-
token: tokenFromOwnerOnlyFile,
|
|
136
|
-
});
|
|
35
|
+
import { createHeadlessHub, serveHeadlessServer } from '@agimon-ai/po-core/server';
|
|
137
36
|
```
|
|
138
37
|
|
|
139
|
-
|
|
38
|
+
A custom entry point supplies an explicit platform, admitted environment/home, session storage, package candidates, and model/runtime dependencies. It owns scope readiness and closes the listener, hub, manager, and their resources. Reuse those contracts rather than duplicating the distribution's composition or importing private CLI files.
|
|
140
39
|
|
|
141
|
-
|
|
40
|
+
The `po-server` executable provides that distribution composition. Its session storage is durable SQLite; no separate Pi child, JSONL journal adapter, or private filesystem command transport is required.
|
|
142
41
|
|
|
143
|
-
|
|
144
|
-
- [Lifecycle](lifecycle.md) explains when server packages load and close.
|
|
145
|
-
- [Security](security.md) describes trusted package code and context capabilities.
|
|
42
|
+
See [Lifecycle](lifecycle.md), [Client protocol](ipc.md), [Contract export](api-export.md), and [Security](security.md).
|
|
@@ -1,114 +1,50 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Start a headless host
|
|
2
2
|
|
|
3
|
-
`po-server`
|
|
3
|
+
`po-server` owns agent execution and scoped server plugins. Use it directly for an authenticated client, or let Po Web start and supervise it.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Install and launch
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
```text
|
|
10
|
-
client -> authenticated HTTP/WebSocket listener -> po-server
|
|
11
|
-
\-> DirectHarnessRuntime
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Add Po Web when a browser or remote cockpit should control the session:
|
|
15
|
-
|
|
16
|
-
```text
|
|
17
|
-
browser -> Po Web -> authenticated /api/ws WebSocket -> po-server
|
|
18
|
-
\-> DirectHarnessRuntime
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Po Web owns browser authentication and remote-access policy. A direct client is responsible for presenting the server token.
|
|
22
|
-
|
|
23
|
-
## Requirements
|
|
24
|
-
|
|
25
|
-
- Node.js 24 or newer
|
|
26
|
-
- The packages your configuration names installed (`po sync` installs them)
|
|
27
|
-
- A private token file
|
|
28
|
-
|
|
29
|
-
The server composes each scope live from configuration and imports only the built entries that composition selects. It does not discover arbitrary package modules at startup.
|
|
30
|
-
|
|
31
|
-
Install core, which owns the `po-server` executable:
|
|
7
|
+
Requires Node.js 24 or newer and private storage for the listener token and session state.
|
|
32
8
|
|
|
33
9
|
```bash
|
|
34
10
|
npm install -g @agimon-ai/po
|
|
35
|
-
|
|
11
|
+
po init
|
|
12
|
+
po sync
|
|
36
13
|
|
|
37
|
-
## Start a session
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
14
|
token_file="$(mktemp)"
|
|
41
15
|
(umask 077; openssl rand -base64 32 > "$token_file")
|
|
42
|
-
|
|
43
|
-
po-server \
|
|
44
|
-
--auth-token-file "$token_file" \
|
|
45
|
-
--name work \
|
|
46
|
-
-- --major-mode copilot
|
|
16
|
+
po-server --auth-token-file "$token_file" --name work -- --preset copilot
|
|
47
17
|
```
|
|
48
18
|
|
|
49
|
-
|
|
19
|
+
Keep the token outside the repository. The server reads and trims it but does not create or protect the file. The default listener is loopback port `7533`; `--web 9000` selects another port. Server options precede `--`; later arguments configure the embedded harness.
|
|
50
20
|
|
|
51
|
-
|
|
21
|
+
Use `--no-session` to start without an initial session. Clients can then create sessions in admitted workspaces. Server parsing accepts `--auth-token-file`, `--no-session`, `--name`, `--session-id`, and `--web`; the port option is not `--web-port`.
|
|
52
22
|
|
|
53
|
-
|
|
23
|
+
New supervised server workers default V8 old-space to 10 GB unless `NODE_OPTIONS` supplies an explicit heap setting. This is neither an RSS cap nor reserved memory.
|
|
54
24
|
|
|
55
|
-
|
|
25
|
+
## Configuration and readiness
|
|
56
26
|
|
|
57
|
-
|
|
58
|
-
| ---------------------- | ----------------------------------------------------------------------- |
|
|
59
|
-
| Loopback HTTP listener | Health, discovery, channel, and package API routes |
|
|
60
|
-
| `/api/ws` WebSocket | Authenticated Chord 1.2 link frames |
|
|
61
|
-
| Direct harness runtime | In-process Pi execution and typed session operations |
|
|
62
|
-
| Session journal | Upstream v4 JSONL history, normally below `~/.po/agent/server/sessions` |
|
|
63
|
-
| Loaded server plugins | Built `poServer` entries the composition selects |
|
|
27
|
+
A host resolves configuration for host, workspace, and session scopes. Worktree sessions use their workspace's composition. Synchronization prepares packages and shared artifacts; the server reads that prepared state and can request automatic background sync. Missing optional capabilities are reported rather than guessed from another module directory. Required selected-package failures prevent the affected scope from becoming ready.
|
|
64
28
|
|
|
65
|
-
|
|
29
|
+
Rebuild a changed package and synchronize when its installation or shared builds need refreshing. New sessions use selected content-addressed entries. Running sessions keep their loaded code unless an explicit supported reload replaces it; browser reconnects do not do that.
|
|
66
30
|
|
|
67
|
-
##
|
|
31
|
+
## Add the browser interface
|
|
68
32
|
|
|
69
|
-
|
|
70
|
-
| -------------------------- | -------------- | ------------------------------------------------------- |
|
|
71
|
-
| `--auth-token-file <path>` | required | File containing the listener token |
|
|
72
|
-
| `--name <name>` | `untitled` | Session name shown by clients |
|
|
73
|
-
| `--session-id <id>` | generated UUID | Stable session identity; it must not contain `/` |
|
|
74
|
-
| `--web [port]` | 7533 | Listener port; the listener is started for every server |
|
|
75
|
-
| `-- <harness arguments>` | none | Arguments passed to the embedded headless harness |
|
|
76
|
-
|
|
77
|
-
There is no server-side command, runtime-directory, or API-directory fallback. Composition comes from the live configuration of each scope. A required server package that cannot be imported fails startup instead of selecting a different module set.
|
|
78
|
-
|
|
79
|
-
## Select the runtime composition
|
|
80
|
-
|
|
81
|
-
The server follows the repository that owns the session working directory; a member checkout such as a worktree resolves its composition from the workspace root. It composes that configuration, collects the selected packages' `poServer` entries, filters them for the active major mode and layers, and installs the resulting server plugins into the direct headless host.
|
|
82
|
-
|
|
83
|
-
Each entry is imported through a URL that changes with the package content. After you rebuild or upgrade a package, the next new session imports the new build without a server restart; running sessions keep the module they loaded. Run `po sync` after changing configuration that names new packages, so they are installed.
|
|
84
|
-
|
|
85
|
-
## Add the browser cockpit
|
|
86
|
-
|
|
87
|
-
Po Web can proxy the server's `/api/ws` endpoint:
|
|
33
|
+
For the usual single-command setup:
|
|
88
34
|
|
|
89
35
|
```bash
|
|
90
36
|
npm install -g @agimon-ai/po-web
|
|
91
|
-
|
|
92
37
|
po-web
|
|
93
38
|
```
|
|
94
39
|
|
|
95
|
-
|
|
40
|
+
This owns a separate authenticated headless child. To attach Po Web to a server you already manage, launch that server on `7534`, then pass its URL and token with `--headless-url` and `--headless-token`. The presentation process does not start a child in that case. A manually supplied token flag is visible in the presentation process's arguments, although it is never embedded in browser assets.
|
|
96
41
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
`SIGINT` and `SIGTERM` dispose the headless host, close server plugins, stop the direct runtime, close the listener, and release history ownership. A normal stop leaves the v4 session journal available for a later server.
|
|
100
|
-
|
|
101
|
-
If startup fails while composing a scope or loading a required server package, no ready listener is published. Treat a failed composition, failed required server package, or history ownership conflict as a readiness failure, not as permission to use another module set.
|
|
42
|
+
Pairing and remote-device policy belong to the headless remote runtime; a raw listener token is not a browser pairing flow.
|
|
102
43
|
|
|
103
|
-
##
|
|
44
|
+
## Stop and recover
|
|
104
45
|
|
|
105
|
-
|
|
46
|
+
`SIGINT` and `SIGTERM` stop owned work and release server resources and storage ownership. A normal stop leaves the pi-durable SQLite session store available for resume. Earlier pre-durable headless sessions are not converted; their files remain untouched.
|
|
106
47
|
|
|
107
|
-
|
|
108
|
-
pnpm build
|
|
109
|
-
pnpm typecheck
|
|
110
|
-
pnpm test
|
|
111
|
-
pnpm lint
|
|
112
|
-
```
|
|
48
|
+
A history ownership conflict or required-package startup failure is a readiness error. Do not work around it by opening a second writer or selecting an unrelated module set. Inspect notices and the affected session's state before retrying work.
|
|
113
49
|
|
|
114
|
-
|
|
50
|
+
See [Lifecycle](lifecycle.md), [Client protocol](ipc.md), and [Security](security.md).
|
package/docs/server/index.md
CHANGED
|
@@ -1,67 +1,22 @@
|
|
|
1
|
-
# Headless
|
|
1
|
+
# Headless server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`po-server` is Po's client-neutral execution process. It owns session runtimes, scoped server plugins, durable storage, and authenticated HTTP/WebSocket services. Browser and native clients present that work; they do not own agent execution.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The executable ships with `@agimon-ai/po` and requires Node.js 24 or newer. Do not add the distribution host to `presets.yaml` as an extension.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
Requires Node.js 24 or newer and the packages your Po configuration names.
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npm install -g @agimon-ai/po
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Run `po sync` in the session repository to install the configured packages and the global web build. The server composes each scope live from configuration, so later configuration changes need no restart.
|
|
18
|
-
|
|
19
|
-
## Quick start
|
|
20
|
-
|
|
21
|
-
Create an owner-only token file, then pass harness arguments after `--`:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
token_file="$(mktemp)"
|
|
25
|
-
(umask 077; openssl rand -base64 32 > "$token_file")
|
|
26
|
-
|
|
27
|
-
po-server \
|
|
28
|
-
--auth-token-file "$token_file" \
|
|
29
|
-
-- --major-mode copilot
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
The server listens on loopback port 7533 by default. Use `--web 9000` to select another port. The option name is retained for CLI compatibility, but the listener is the server's normal client-neutral HTTP and WebSocket surface, not an optional browser-only service.
|
|
33
|
-
|
|
34
|
-
The token is read from the file, not the command line. Keep the file private. A direct client presents the token to the HTTP routes and `/api/ws`; Po Web can proxy the endpoint after applying its own browser and remote-access controls.
|
|
35
|
-
|
|
36
|
-
## How it works
|
|
37
|
-
|
|
38
|
-
Startup composes the global scope from configuration and imports the eligible server plugins from their packages' built entries. It then creates the direct harness, session service, and package API handlers in process. The listener provides:
|
|
39
|
-
|
|
40
|
-
- `/api/ws`, an authenticated WebSocket carrying Chord 1.2 link frames;
|
|
41
|
-
- `/api/health`, an unauthenticated readiness check;
|
|
42
|
-
- `/api/workspaces/<workspace-id>/sessions` and related routes for discovery and channel access; and
|
|
43
|
-
- session package APIs below `/api/workspaces/<workspace-id>/sessions/<session-id>/plugins/<base-path>/...`.
|
|
44
|
-
|
|
45
|
-
The Pi protocol exposes typed management, hub, and session services. Session calls operate directly on the same runtime that owns the session journal. No raw command bridge, child-process fallback, or separate package API transport sits between a client and the runtime.
|
|
46
|
-
|
|
47
|
-
## Security
|
|
48
|
-
|
|
49
|
-
The server binds to loopback by default and requires the token for every route except `/api/health`. A token file keeps the capability out of process listings. The server is not a sandbox: the harness, extensions, and server plugins run with the account's authority.
|
|
50
|
-
|
|
51
|
-
Po Web owns browser authentication, remote tunnels, device cookies, and passkeys. When it proxies a session, browser code does not need the server token. Do not publish the server listener without an authenticated boundary.
|
|
52
|
-
|
|
53
|
-
Read [Security and trust boundaries](security.md) before sharing a listener or token.
|
|
7
|
+
Start with [Getting started](getting-started.md). Use `--no-session` for a host that waits for clients to create sessions; otherwise startup creates an initial session. A host can own multiple workspaces and sessions in one process.
|
|
54
8
|
|
|
55
9
|
## Guides
|
|
56
10
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
11
|
+
- [Getting started](getting-started.md): private token file, launch options, and browser attachment.
|
|
12
|
+
- [Lifecycle](lifecycle.md): scope readiness, storage ownership, reloads, and shutdown.
|
|
13
|
+
- [Client protocol](ipc.md): scoped HTTP/WebSocket routes and state recovery.
|
|
14
|
+
- [Package APIs](api.md): handler registration, authority, and public Node entry points.
|
|
15
|
+
- [Contract export](api-export.md): compiled OpenAPI/AsyncAPI and coverage gaps.
|
|
16
|
+
- [Security](security.md): direct-client credentials, remote access, and execution boundaries.
|
|
17
|
+
|
|
18
|
+
The direct listener is not a public gateway or an execution sandbox. Read the security guide before exposing it.
|
|
64
19
|
|
|
65
20
|
## License
|
|
66
21
|
|
|
67
|
-
[
|
|
22
|
+
Functional Source License 1.1, MIT Future License (FSL-1.1-MIT): free for any purpose except a Competing Use; each version converts to MIT two years after release. See [LICENSE](../../LICENSE).
|