@agimon-ai/po 0.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +755 -0
- package/assets/banner.png +0 -0
- package/assets/banner.svg +25 -0
- package/assets/favicon.svg +15 -0
- package/assets/logo-light.png +0 -0
- package/assets/logo-light.svg +25 -0
- package/assets/logo.png +0 -0
- package/assets/logo.svg +25 -0
- package/assets/mascot.png +0 -0
- package/assets/mascot.svg +25 -0
- package/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/antigravity.cjs +5 -0
- package/dist/antigravity.d.mts +2 -0
- package/dist/antigravity.mjs +2 -0
- package/dist/apiContracts.cjs +11 -0
- package/dist/apiContracts.cjs.map +1 -0
- package/dist/apiContracts.d.mts +52 -0
- package/dist/apiContracts.d.mts.map +1 -0
- package/dist/apiContracts.mjs +7 -0
- package/dist/apiContracts.mjs.map +1 -0
- package/dist/baseCommand.cjs +3 -0
- package/dist/baseCommand.d.mts +2 -0
- package/dist/baseCommand.mjs +2 -0
- package/dist/bin/cli.cjs +24 -0
- package/dist/bin/cli.cjs.map +1 -0
- package/dist/bin/cli.d.mts +1 -0
- package/dist/bin/cli.mjs +25 -0
- package/dist/bin/cli.mjs.map +1 -0
- package/dist/bin/doomRunner.cjs +33 -0
- package/dist/bin/doomRunner.cjs.map +1 -0
- package/dist/bin/doomRunner.d.mts +4 -0
- package/dist/bin/doomRunner.d.mts.map +1 -0
- package/dist/bin/doomRunner.mjs +32 -0
- package/dist/bin/doomRunner.mjs.map +1 -0
- package/dist/bin/serve.cjs +30 -0
- package/dist/bin/serve.cjs.map +1 -0
- package/dist/bin/serve.d.mts +1 -0
- package/dist/bin/serve.mjs +31 -0
- package/dist/bin/serve.mjs.map +1 -0
- package/dist/builders/cli/extensionAssembler/index.cjs +342 -0
- package/dist/builders/cli/extensionAssembler/index.cjs.map +1 -0
- package/dist/builders/cli/extensionAssembler/index.d.mts +85 -0
- package/dist/builders/cli/extensionAssembler/index.d.mts.map +1 -0
- package/dist/builders/cli/extensionAssembler/index.mjs +335 -0
- package/dist/builders/cli/extensionAssembler/index.mjs.map +1 -0
- package/dist/catalog/index.json +430 -0
- package/dist/cli.cjs +28 -0
- package/dist/cli.d.mts +11 -0
- package/dist/cli.mjs +11 -0
- package/dist/cliApp.cjs +6 -0
- package/dist/cliApp.d.mts +2 -0
- package/dist/cliApp.mjs +2 -0
- package/dist/codex.cjs +8 -0
- package/dist/codex.d.mts +2 -0
- package/dist/codex.mjs +2 -0
- package/dist/commands.cjs +18 -0
- package/dist/commands.d.mts +9 -0
- package/dist/commands.mjs +9 -0
- package/dist/compatibility.cjs +27 -0
- package/dist/compatibility.d.mts +6 -0
- package/dist/compatibility.mjs +6 -0
- package/dist/compatibilityCommand.cjs +4 -0
- package/dist/compatibilityCommand.d.mts +2 -0
- package/dist/compatibilityCommand.mjs +2 -0
- package/dist/compatibilityContext.cjs +3 -0
- package/dist/compatibilityContext.d.mts +2 -0
- package/dist/compatibilityContext.mjs +2 -0
- package/dist/compatibilityOptions.cjs +5 -0
- package/dist/compatibilityOptions.d.mts +2 -0
- package/dist/compatibilityOptions.mjs +2 -0
- package/dist/config.cjs +163 -0
- package/dist/config.d.mts +7 -0
- package/dist/config.mjs +7 -0
- package/dist/doctorCommand.cjs +5 -0
- package/dist/doctorCommand.d.mts +2 -0
- package/dist/doctorCommand.mjs +2 -0
- package/dist/emitMcpCommand.cjs +4 -0
- package/dist/emitMcpCommand.d.mts +2 -0
- package/dist/emitMcpCommand.mjs +2 -0
- package/dist/explainCommand.cjs +5 -0
- package/dist/explainCommand.d.mts +2 -0
- package/dist/explainCommand.mjs +2 -0
- package/dist/extensions/server.cjs +39 -0
- package/dist/extensions/server.cjs.map +1 -0
- package/dist/extensions/server.d.mts +5 -0
- package/dist/extensions/server.d.mts.map +1 -0
- package/dist/extensions/server.mjs +34 -0
- package/dist/extensions/server.mjs.map +1 -0
- package/dist/harnessContext.cjs +5 -0
- package/dist/harnessContext.d.mts +2 -0
- package/dist/harnessContext.mjs +2 -0
- package/dist/harnessState.cjs +19 -0
- package/dist/harnessState.d.mts +2 -0
- package/dist/harnessState.mjs +2 -0
- package/dist/help.cjs +12 -0
- package/dist/help.d.mts +6 -0
- package/dist/help.mjs +6 -0
- package/dist/index.cjs +306 -0
- package/dist/index.d.mts +40 -0
- package/dist/index.mjs +37 -0
- package/dist/initCommand.cjs +4 -0
- package/dist/initCommand.d.mts +2 -0
- package/dist/initCommand.mjs +2 -0
- package/dist/matrixOptions.cjs +28 -0
- package/dist/matrixOptions.d.mts +2 -0
- package/dist/matrixOptions.mjs +2 -0
- package/dist/matrixSwitcher.cjs +11 -0
- package/dist/matrixSwitcher.d.mts +3 -0
- package/dist/matrixSwitcher.mjs +3 -0
- package/dist/mcpFilter.cjs +9 -0
- package/dist/mcpFilter.d.mts +1 -0
- package/dist/mcpFilter.mjs +2 -0
- package/dist/options.cjs +3 -0
- package/dist/options.d.mts +2 -0
- package/dist/options.mjs +2 -0
- package/dist/process.cjs +12 -0
- package/dist/process.d.mts +2 -0
- package/dist/process.mjs +2 -0
- package/dist/projectTrust.cjs +6 -0
- package/dist/projectTrust.d.mts +2 -0
- package/dist/projectTrust.mjs +2 -0
- package/dist/repository.cjs +5 -0
- package/dist/repository.d.mts +2 -0
- package/dist/repository.mjs +2 -0
- package/dist/resourceCollector.cjs +9 -0
- package/dist/resourceCollector.d.mts +1 -0
- package/dist/resourceCollector.mjs +2 -0
- package/dist/router.cjs +6 -0
- package/dist/router.d.mts +2 -0
- package/dist/router.mjs +2 -0
- package/dist/services.cjs +97 -0
- package/dist/services.d.mts +12 -0
- package/dist/services.mjs +12 -0
- package/dist/shared.cjs +18 -0
- package/dist/shared.d.mts +2 -0
- package/dist/shared.mjs +2 -0
- package/dist/src/bin/agentDirectory.cjs +27 -0
- package/dist/src/bin/agentDirectory.cjs.map +1 -0
- package/dist/src/bin/agentDirectory.mjs +26 -0
- package/dist/src/bin/agentDirectory.mjs.map +1 -0
- package/dist/src/builders/apiContractExport/index.cjs +126 -0
- package/dist/src/builders/apiContractExport/index.cjs.map +1 -0
- package/dist/src/builders/apiContractExport/index.mjs +123 -0
- package/dist/src/builders/apiContractExport/index.mjs.map +1 -0
- package/dist/src/builders/cli/entryResolution.cjs +39 -0
- package/dist/src/builders/cli/entryResolution.cjs.map +1 -0
- package/dist/src/builders/cli/entryResolution.mjs +35 -0
- package/dist/src/builders/cli/entryResolution.mjs.map +1 -0
- package/dist/src/builders/cli/harnessContext.cjs +175 -0
- package/dist/src/builders/cli/harnessContext.cjs.map +1 -0
- package/dist/src/builders/cli/harnessContext.d.mts +48 -0
- package/dist/src/builders/cli/harnessContext.d.mts.map +1 -0
- package/dist/src/builders/cli/harnessContext.mjs +167 -0
- package/dist/src/builders/cli/harnessContext.mjs.map +1 -0
- package/dist/src/builders/cli/sessionComposition.cjs +27 -0
- package/dist/src/builders/cli/sessionComposition.cjs.map +1 -0
- package/dist/src/builders/cli/sessionComposition.mjs +26 -0
- package/dist/src/builders/cli/sessionComposition.mjs.map +1 -0
- package/dist/src/builders/hooks/index.cjs +238 -0
- package/dist/src/builders/hooks/index.cjs.map +1 -0
- package/dist/src/builders/hooks/index.mjs +231 -0
- package/dist/src/builders/hooks/index.mjs.map +1 -0
- package/dist/src/builders/native/index.cjs +176 -0
- package/dist/src/builders/native/index.cjs.map +1 -0
- package/dist/src/builders/native/index.d.mts +36 -0
- package/dist/src/builders/native/index.d.mts.map +1 -0
- package/dist/src/builders/native/index.mjs +170 -0
- package/dist/src/builders/native/index.mjs.map +1 -0
- package/dist/src/builders/server/backgroundSync.cjs +333 -0
- package/dist/src/builders/server/backgroundSync.cjs.map +1 -0
- package/dist/src/builders/server/backgroundSync.mjs +320 -0
- package/dist/src/builders/server/backgroundSync.mjs.map +1 -0
- package/dist/src/builders/server/computerUseBinding.cjs +273 -0
- package/dist/src/builders/server/computerUseBinding.cjs.map +1 -0
- package/dist/src/builders/server/computerUseBinding.mjs +269 -0
- package/dist/src/builders/server/computerUseBinding.mjs.map +1 -0
- package/dist/src/builders/server/computerUseRecordings.cjs +188 -0
- package/dist/src/builders/server/computerUseRecordings.cjs.map +1 -0
- package/dist/src/builders/server/computerUseRecordings.mjs +184 -0
- package/dist/src/builders/server/computerUseRecordings.mjs.map +1 -0
- package/dist/src/builders/server/defaultWorkspace.cjs +38 -0
- package/dist/src/builders/server/defaultWorkspace.cjs.map +1 -0
- package/dist/src/builders/server/defaultWorkspace.mjs +35 -0
- package/dist/src/builders/server/defaultWorkspace.mjs.map +1 -0
- package/dist/src/builders/server/idleRestart.cjs +149 -0
- package/dist/src/builders/server/idleRestart.cjs.map +1 -0
- package/dist/src/builders/server/idleRestart.mjs +136 -0
- package/dist/src/builders/server/idleRestart.mjs.map +1 -0
- package/dist/src/builders/server/index.cjs +63 -0
- package/dist/src/builders/server/index.cjs.map +1 -0
- package/dist/src/builders/server/index.mjs +60 -0
- package/dist/src/builders/server/index.mjs.map +1 -0
- package/dist/src/builders/server/logSink.cjs +57 -0
- package/dist/src/builders/server/logSink.cjs.map +1 -0
- package/dist/src/builders/server/logSink.mjs +57 -0
- package/dist/src/builders/server/logSink.mjs.map +1 -0
- package/dist/src/builders/server/mcpApp.cjs +152 -0
- package/dist/src/builders/server/mcpApp.cjs.map +1 -0
- package/dist/src/builders/server/mcpApp.d.mts +18 -0
- package/dist/src/builders/server/mcpApp.d.mts.map +1 -0
- package/dist/src/builders/server/mcpApp.mjs +147 -0
- package/dist/src/builders/server/mcpApp.mjs.map +1 -0
- package/dist/src/builders/server/mcpAppBuild.cjs +111 -0
- package/dist/src/builders/server/mcpAppBuild.cjs.map +1 -0
- package/dist/src/builders/server/mcpAppBuild.d.mts +24 -0
- package/dist/src/builders/server/mcpAppBuild.d.mts.map +1 -0
- package/dist/src/builders/server/mcpAppBuild.mjs +105 -0
- package/dist/src/builders/server/mcpAppBuild.mjs.map +1 -0
- package/dist/src/builders/server/mcpBundle.cjs +87 -0
- package/dist/src/builders/server/mcpBundle.cjs.map +1 -0
- package/dist/src/builders/server/mcpBundle.d.mts +23 -0
- package/dist/src/builders/server/mcpBundle.d.mts.map +1 -0
- package/dist/src/builders/server/mcpBundle.mjs +84 -0
- package/dist/src/builders/server/mcpBundle.mjs.map +1 -0
- package/dist/src/builders/server/packageReloadCheck.cjs +62 -0
- package/dist/src/builders/server/packageReloadCheck.cjs.map +1 -0
- package/dist/src/builders/server/packageReloadCheck.mjs +61 -0
- package/dist/src/builders/server/packageReloadCheck.mjs.map +1 -0
- package/dist/src/builders/server/packageUrl.cjs +210 -0
- package/dist/src/builders/server/packageUrl.cjs.map +1 -0
- package/dist/src/builders/server/packageUrl.mjs +203 -0
- package/dist/src/builders/server/packageUrl.mjs.map +1 -0
- package/dist/src/builders/server/runtime.cjs +1428 -0
- package/dist/src/builders/server/runtime.cjs.map +1 -0
- package/dist/src/builders/server/runtime.mjs +1420 -0
- package/dist/src/builders/server/runtime.mjs.map +1 -0
- package/dist/src/builders/server/runtimeResources.cjs +72 -0
- package/dist/src/builders/server/runtimeResources.cjs.map +1 -0
- package/dist/src/builders/server/runtimeResources.mjs +71 -0
- package/dist/src/builders/server/runtimeResources.mjs.map +1 -0
- package/dist/src/builders/server/selectionStatus.cjs +12 -0
- package/dist/src/builders/server/selectionStatus.cjs.map +1 -0
- package/dist/src/builders/server/selectionStatus.mjs +12 -0
- package/dist/src/builders/server/selectionStatus.mjs.map +1 -0
- package/dist/src/builders/server/sessionArguments.cjs +63 -0
- package/dist/src/builders/server/sessionArguments.cjs.map +1 -0
- package/dist/src/builders/server/sessionArguments.mjs +62 -0
- package/dist/src/builders/server/sessionArguments.mjs.map +1 -0
- package/dist/src/builders/server/shutdown.cjs +16 -0
- package/dist/src/builders/server/shutdown.cjs.map +1 -0
- package/dist/src/builders/server/shutdown.mjs +16 -0
- package/dist/src/builders/server/shutdown.mjs.map +1 -0
- package/dist/src/builders/server/webTemplateDecision.cjs +34 -0
- package/dist/src/builders/server/webTemplateDecision.cjs.map +1 -0
- package/dist/src/builders/server/webTemplateDecision.mjs +32 -0
- package/dist/src/builders/server/webTemplateDecision.mjs.map +1 -0
- package/dist/src/builders/server/workspaceCheckout.cjs +31 -0
- package/dist/src/builders/server/workspaceCheckout.cjs.map +1 -0
- package/dist/src/builders/server/workspaceCheckout.mjs +29 -0
- package/dist/src/builders/server/workspaceCheckout.mjs.map +1 -0
- package/dist/src/builders/web/bundle.cjs +225 -0
- package/dist/src/builders/web/bundle.cjs.map +1 -0
- package/dist/src/builders/web/bundle.d.mts +65 -0
- package/dist/src/builders/web/bundle.d.mts.map +1 -0
- package/dist/src/builders/web/bundle.mjs +221 -0
- package/dist/src/builders/web/bundle.mjs.map +1 -0
- package/dist/src/builders/web/bundleAssetPolicy.cjs +96 -0
- package/dist/src/builders/web/bundleAssetPolicy.cjs.map +1 -0
- package/dist/src/builders/web/bundleAssetPolicy.d.mts +22 -0
- package/dist/src/builders/web/bundleAssetPolicy.d.mts.map +1 -0
- package/dist/src/builders/web/bundleAssetPolicy.mjs +95 -0
- package/dist/src/builders/web/bundleAssetPolicy.mjs.map +1 -0
- package/dist/src/builders/web/index.cjs +361 -0
- package/dist/src/builders/web/index.cjs.map +1 -0
- package/dist/src/builders/web/index.d.mts +109 -0
- package/dist/src/builders/web/index.d.mts.map +1 -0
- package/dist/src/builders/web/index.mjs +342 -0
- package/dist/src/builders/web/index.mjs.map +1 -0
- package/dist/src/builders/web/webDevRoots.cjs +27 -0
- package/dist/src/builders/web/webDevRoots.cjs.map +1 -0
- package/dist/src/builders/web/webDevRoots.d.mts +22 -0
- package/dist/src/builders/web/webDevRoots.d.mts.map +1 -0
- package/dist/src/builders/web/webDevRoots.mjs +25 -0
- package/dist/src/builders/web/webDevRoots.mjs.map +1 -0
- package/dist/src/builders/web/webPluginGenerate.cjs +188 -0
- package/dist/src/builders/web/webPluginGenerate.cjs.map +1 -0
- package/dist/src/builders/web/webPluginGenerate.d.mts +56 -0
- package/dist/src/builders/web/webPluginGenerate.d.mts.map +1 -0
- package/dist/src/builders/web/webPluginGenerate.mjs +178 -0
- package/dist/src/builders/web/webPluginGenerate.mjs.map +1 -0
- package/dist/src/builders/web/webPluginManifest.cjs +128 -0
- package/dist/src/builders/web/webPluginManifest.cjs.map +1 -0
- package/dist/src/builders/web/webPluginManifest.d.mts +64 -0
- package/dist/src/builders/web/webPluginManifest.d.mts.map +1 -0
- package/dist/src/builders/web/webPluginManifest.mjs +118 -0
- package/dist/src/builders/web/webPluginManifest.mjs.map +1 -0
- package/dist/src/builders/web/webPluginScan.cjs +57 -0
- package/dist/src/builders/web/webPluginScan.cjs.map +1 -0
- package/dist/src/builders/web/webPluginScan.d.mts +19 -0
- package/dist/src/builders/web/webPluginScan.d.mts.map +1 -0
- package/dist/src/builders/web/webPluginScan.mjs +54 -0
- package/dist/src/builders/web/webPluginScan.mjs.map +1 -0
- package/dist/src/builders/web/webPluginVite.cjs +255 -0
- package/dist/src/builders/web/webPluginVite.cjs.map +1 -0
- package/dist/src/builders/web/webPluginVite.d.mts +64 -0
- package/dist/src/builders/web/webPluginVite.d.mts.map +1 -0
- package/dist/src/builders/web/webPluginVite.mjs +242 -0
- package/dist/src/builders/web/webPluginVite.mjs.map +1 -0
- package/dist/src/cli/cliApp.cjs +187 -0
- package/dist/src/cli/cliApp.cjs.map +1 -0
- package/dist/src/cli/cliApp.d.mts +32 -0
- package/dist/src/cli/cliApp.d.mts.map +1 -0
- package/dist/src/cli/cliApp.mjs +184 -0
- package/dist/src/cli/cliApp.mjs.map +1 -0
- package/dist/src/cli/commands/api-export/index.cjs +66 -0
- package/dist/src/cli/commands/api-export/index.cjs.map +1 -0
- package/dist/src/cli/commands/api-export/index.mjs +62 -0
- package/dist/src/cli/commands/api-export/index.mjs.map +1 -0
- package/dist/src/cli/commands/baseCommand.cjs +16 -0
- package/dist/src/cli/commands/baseCommand.cjs.map +1 -0
- package/dist/src/cli/commands/baseCommand.d.mts +24 -0
- package/dist/src/cli/commands/baseCommand.d.mts.map +1 -0
- package/dist/src/cli/commands/baseCommand.mjs +16 -0
- package/dist/src/cli/commands/baseCommand.mjs.map +1 -0
- package/dist/src/cli/commands/compat/context.cjs +115 -0
- package/dist/src/cli/commands/compat/context.cjs.map +1 -0
- package/dist/src/cli/commands/compat/context.d.mts +22 -0
- package/dist/src/cli/commands/compat/context.d.mts.map +1 -0
- package/dist/src/cli/commands/compat/context.mjs +110 -0
- package/dist/src/cli/commands/compat/context.mjs.map +1 -0
- package/dist/src/cli/commands/compat/help.cjs +26 -0
- package/dist/src/cli/commands/compat/help.cjs.map +1 -0
- package/dist/src/cli/commands/compat/help.d.mts +4 -0
- package/dist/src/cli/commands/compat/help.d.mts.map +1 -0
- package/dist/src/cli/commands/compat/help.mjs +25 -0
- package/dist/src/cli/commands/compat/help.mjs.map +1 -0
- package/dist/src/cli/commands/compat/index.cjs +73 -0
- package/dist/src/cli/commands/compat/index.cjs.map +1 -0
- package/dist/src/cli/commands/compat/index.d.mts +14 -0
- package/dist/src/cli/commands/compat/index.d.mts.map +1 -0
- package/dist/src/cli/commands/compat/index.mjs +70 -0
- package/dist/src/cli/commands/compat/index.mjs.map +1 -0
- package/dist/src/cli/commands/compat/options.cjs +88 -0
- package/dist/src/cli/commands/compat/options.cjs.map +1 -0
- package/dist/src/cli/commands/compat/options.d.mts +15 -0
- package/dist/src/cli/commands/compat/options.d.mts.map +1 -0
- package/dist/src/cli/commands/compat/options.mjs +86 -0
- package/dist/src/cli/commands/compat/options.mjs.map +1 -0
- package/dist/src/cli/commands/compat/providers/antigravity.cjs +294 -0
- package/dist/src/cli/commands/compat/providers/antigravity.cjs.map +1 -0
- package/dist/src/cli/commands/compat/providers/antigravity.d.mts +9 -0
- package/dist/src/cli/commands/compat/providers/antigravity.d.mts.map +1 -0
- package/dist/src/cli/commands/compat/providers/antigravity.mjs +289 -0
- package/dist/src/cli/commands/compat/providers/antigravity.mjs.map +1 -0
- package/dist/src/cli/commands/compat/providers/codex.cjs +178 -0
- package/dist/src/cli/commands/compat/providers/codex.cjs.map +1 -0
- package/dist/src/cli/commands/compat/providers/codex.d.mts +17 -0
- package/dist/src/cli/commands/compat/providers/codex.d.mts.map +1 -0
- package/dist/src/cli/commands/compat/providers/codex.mjs +170 -0
- package/dist/src/cli/commands/compat/providers/codex.mjs.map +1 -0
- package/dist/src/cli/commands/compat/providers/index.cjs +65 -0
- package/dist/src/cli/commands/compat/providers/index.cjs.map +1 -0
- package/dist/src/cli/commands/compat/providers/index.d.mts +15 -0
- package/dist/src/cli/commands/compat/providers/index.d.mts.map +1 -0
- package/dist/src/cli/commands/compat/providers/index.mjs +45 -0
- package/dist/src/cli/commands/compat/providers/index.mjs.map +1 -0
- package/dist/src/cli/commands/compat/providers/process.cjs +172 -0
- package/dist/src/cli/commands/compat/providers/process.cjs.map +1 -0
- package/dist/src/cli/commands/compat/providers/process.d.mts +33 -0
- package/dist/src/cli/commands/compat/providers/process.d.mts.map +1 -0
- package/dist/src/cli/commands/compat/providers/process.mjs +159 -0
- package/dist/src/cli/commands/compat/providers/process.mjs.map +1 -0
- package/dist/src/cli/commands/compat/providers/shared.cjs +76 -0
- package/dist/src/cli/commands/compat/providers/shared.cjs.map +1 -0
- package/dist/src/cli/commands/compat/providers/shared.d.mts +40 -0
- package/dist/src/cli/commands/compat/providers/shared.d.mts.map +1 -0
- package/dist/src/cli/commands/compat/providers/shared.mjs +61 -0
- package/dist/src/cli/commands/compat/providers/shared.mjs.map +1 -0
- package/dist/src/cli/commands/compat/types.d.mts +31 -0
- package/dist/src/cli/commands/compat/types.d.mts.map +1 -0
- package/dist/src/cli/commands/doctor/help.cjs +19 -0
- package/dist/src/cli/commands/doctor/help.cjs.map +1 -0
- package/dist/src/cli/commands/doctor/help.d.mts +4 -0
- package/dist/src/cli/commands/doctor/help.d.mts.map +1 -0
- package/dist/src/cli/commands/doctor/help.mjs +19 -0
- package/dist/src/cli/commands/doctor/help.mjs.map +1 -0
- package/dist/src/cli/commands/doctor/index.cjs +118 -0
- package/dist/src/cli/commands/doctor/index.cjs.map +1 -0
- package/dist/src/cli/commands/doctor/index.d.mts +33 -0
- package/dist/src/cli/commands/doctor/index.d.mts.map +1 -0
- package/dist/src/cli/commands/doctor/index.mjs +113 -0
- package/dist/src/cli/commands/doctor/index.mjs.map +1 -0
- package/dist/src/cli/commands/emit-mcp/index.cjs +32 -0
- package/dist/src/cli/commands/emit-mcp/index.cjs.map +1 -0
- package/dist/src/cli/commands/emit-mcp/index.d.mts +19 -0
- package/dist/src/cli/commands/emit-mcp/index.d.mts.map +1 -0
- package/dist/src/cli/commands/emit-mcp/index.mjs +31 -0
- package/dist/src/cli/commands/emit-mcp/index.mjs.map +1 -0
- package/dist/src/cli/commands/explain/index.cjs +155 -0
- package/dist/src/cli/commands/explain/index.cjs.map +1 -0
- package/dist/src/cli/commands/explain/index.d.mts +57 -0
- package/dist/src/cli/commands/explain/index.d.mts.map +1 -0
- package/dist/src/cli/commands/explain/index.mjs +150 -0
- package/dist/src/cli/commands/explain/index.mjs.map +1 -0
- package/dist/src/cli/commands/init/constants.cjs +11 -0
- package/dist/src/cli/commands/init/constants.cjs.map +1 -0
- package/dist/src/cli/commands/init/constants.mjs +11 -0
- package/dist/src/cli/commands/init/constants.mjs.map +1 -0
- package/dist/src/cli/commands/init/help.cjs +17 -0
- package/dist/src/cli/commands/init/help.cjs.map +1 -0
- package/dist/src/cli/commands/init/help.d.mts +4 -0
- package/dist/src/cli/commands/init/help.d.mts.map +1 -0
- package/dist/src/cli/commands/init/help.mjs +17 -0
- package/dist/src/cli/commands/init/help.mjs.map +1 -0
- package/dist/src/cli/commands/init/index.cjs +67 -0
- package/dist/src/cli/commands/init/index.cjs.map +1 -0
- package/dist/src/cli/commands/init/index.d.mts +12 -0
- package/dist/src/cli/commands/init/index.d.mts.map +1 -0
- package/dist/src/cli/commands/init/index.mjs +63 -0
- package/dist/src/cli/commands/init/index.mjs.map +1 -0
- package/dist/src/cli/commands/init/presenter.cjs +140 -0
- package/dist/src/cli/commands/init/presenter.cjs.map +1 -0
- package/dist/src/cli/commands/init/presenter.d.mts +8 -0
- package/dist/src/cli/commands/init/presenter.d.mts.map +1 -0
- package/dist/src/cli/commands/init/presenter.mjs +140 -0
- package/dist/src/cli/commands/init/presenter.mjs.map +1 -0
- package/dist/src/cli/commands/sync/help.cjs +34 -0
- package/dist/src/cli/commands/sync/help.cjs.map +1 -0
- package/dist/src/cli/commands/sync/help.d.mts +4 -0
- package/dist/src/cli/commands/sync/help.d.mts.map +1 -0
- package/dist/src/cli/commands/sync/help.mjs +34 -0
- package/dist/src/cli/commands/sync/help.mjs.map +1 -0
- package/dist/src/cli/commands/sync/index.cjs +215 -0
- package/dist/src/cli/commands/sync/index.cjs.map +1 -0
- package/dist/src/cli/commands/sync/index.d.mts +20 -0
- package/dist/src/cli/commands/sync/index.d.mts.map +1 -0
- package/dist/src/cli/commands/sync/index.mjs +206 -0
- package/dist/src/cli/commands/sync/index.mjs.map +1 -0
- package/dist/src/cli/commands/sync/presenter.cjs +58 -0
- package/dist/src/cli/commands/sync/presenter.cjs.map +1 -0
- package/dist/src/cli/commands/sync/presenter.d.mts +16 -0
- package/dist/src/cli/commands/sync/presenter.d.mts.map +1 -0
- package/dist/src/cli/commands/sync/presenter.mjs +57 -0
- package/dist/src/cli/commands/sync/presenter.mjs.map +1 -0
- package/dist/src/cli/commands/sync/workflow.cjs +16 -0
- package/dist/src/cli/commands/sync/workflow.cjs.map +1 -0
- package/dist/src/cli/commands/sync/workflow.mjs +16 -0
- package/dist/src/cli/commands/sync/workflow.mjs.map +1 -0
- package/dist/src/cli/commands/web/index.cjs +88 -0
- package/dist/src/cli/commands/web/index.cjs.map +1 -0
- package/dist/src/cli/commands/web/index.mjs +85 -0
- package/dist/src/cli/commands/web/index.mjs.map +1 -0
- package/dist/src/cli/harnessOptions.cjs +70 -0
- package/dist/src/cli/harnessOptions.cjs.map +1 -0
- package/dist/src/cli/harnessOptions.d.mts +26 -0
- package/dist/src/cli/harnessOptions.d.mts.map +1 -0
- package/dist/src/cli/harnessOptions.mjs +66 -0
- package/dist/src/cli/harnessOptions.mjs.map +1 -0
- package/dist/src/cli/help.cjs +82 -0
- package/dist/src/cli/help.cjs.map +1 -0
- package/dist/src/cli/help.d.mts +10 -0
- package/dist/src/cli/help.d.mts.map +1 -0
- package/dist/src/cli/help.mjs +78 -0
- package/dist/src/cli/help.mjs.map +1 -0
- package/dist/src/cli/matrixOptions.cjs +178 -0
- package/dist/src/cli/matrixOptions.cjs.map +1 -0
- package/dist/src/cli/matrixOptions.d.mts +90 -0
- package/dist/src/cli/matrixOptions.d.mts.map +1 -0
- package/dist/src/cli/matrixOptions.mjs +151 -0
- package/dist/src/cli/matrixOptions.mjs.map +1 -0
- package/dist/src/cli/options.cjs +281 -0
- package/dist/src/cli/options.cjs.map +1 -0
- package/dist/src/cli/options.d.mts +5 -0
- package/dist/src/cli/options.d.mts.map +1 -0
- package/dist/src/cli/options.mjs +279 -0
- package/dist/src/cli/options.mjs.map +1 -0
- package/dist/src/cli/router.cjs +57 -0
- package/dist/src/cli/router.cjs.map +1 -0
- package/dist/src/cli/router.d.mts +32 -0
- package/dist/src/cli/router.d.mts.map +1 -0
- package/dist/src/cli/router.mjs +54 -0
- package/dist/src/cli/router.mjs.map +1 -0
- package/dist/src/cli/server/options.cjs +71 -0
- package/dist/src/cli/server/options.cjs.map +1 -0
- package/dist/src/cli/server/options.mjs +70 -0
- package/dist/src/cli/server/options.mjs.map +1 -0
- package/dist/src/cli/server/processGuards.cjs +83 -0
- package/dist/src/cli/server/processGuards.cjs.map +1 -0
- package/dist/src/cli/server/processGuards.mjs +79 -0
- package/dist/src/cli/server/processGuards.mjs.map +1 -0
- package/dist/src/cli/server/run.cjs +69 -0
- package/dist/src/cli/server/run.cjs.map +1 -0
- package/dist/src/cli/server/run.mjs +66 -0
- package/dist/src/cli/server/run.mjs.map +1 -0
- package/dist/src/composition/harnessState/index.cjs +48 -0
- package/dist/src/composition/harnessState/index.cjs.map +1 -0
- package/dist/src/composition/harnessState/index.d.mts +19 -0
- package/dist/src/composition/harnessState/index.d.mts.map +1 -0
- package/dist/src/composition/harnessState/index.mjs +34 -0
- package/dist/src/composition/harnessState/index.mjs.map +1 -0
- package/dist/src/composition/layerPackageInstaller/index.cjs +651 -0
- package/dist/src/composition/layerPackageInstaller/index.cjs.map +1 -0
- package/dist/src/composition/layerPackageInstaller/index.d.mts +74 -0
- package/dist/src/composition/layerPackageInstaller/index.d.mts.map +1 -0
- package/dist/src/composition/layerPackageInstaller/index.mjs +637 -0
- package/dist/src/composition/layerPackageInstaller/index.mjs.map +1 -0
- package/dist/src/composition/poHomeMigration/index.cjs +234 -0
- package/dist/src/composition/poHomeMigration/index.cjs.map +1 -0
- package/dist/src/composition/poHomeMigration/index.d.mts +12 -0
- package/dist/src/composition/poHomeMigration/index.d.mts.map +1 -0
- package/dist/src/composition/poHomeMigration/index.mjs +226 -0
- package/dist/src/composition/poHomeMigration/index.mjs.map +1 -0
- package/dist/src/composition/projectTrust/index.cjs +51 -0
- package/dist/src/composition/projectTrust/index.cjs.map +1 -0
- package/dist/src/composition/projectTrust/index.d.mts +22 -0
- package/dist/src/composition/projectTrust/index.d.mts.map +1 -0
- package/dist/src/composition/projectTrust/index.mjs +48 -0
- package/dist/src/composition/projectTrust/index.mjs.map +1 -0
- package/dist/src/composition/repository/index.cjs +68 -0
- package/dist/src/composition/repository/index.cjs.map +1 -0
- package/dist/src/composition/repository/index.d.mts +22 -0
- package/dist/src/composition/repository/index.d.mts.map +1 -0
- package/dist/src/composition/repository/index.mjs +63 -0
- package/dist/src/composition/repository/index.mjs.map +1 -0
- package/dist/src/composition/syncPrune/index.cjs +85 -0
- package/dist/src/composition/syncPrune/index.cjs.map +1 -0
- package/dist/src/composition/syncPrune/index.d.mts +33 -0
- package/dist/src/composition/syncPrune/index.d.mts.map +1 -0
- package/dist/src/composition/syncPrune/index.mjs +82 -0
- package/dist/src/composition/syncPrune/index.mjs.map +1 -0
- package/dist/src/composition/syncService/index.cjs +808 -0
- package/dist/src/composition/syncService/index.cjs.map +1 -0
- package/dist/src/composition/syncService/index.d.mts +65 -0
- package/dist/src/composition/syncService/index.d.mts.map +1 -0
- package/dist/src/composition/syncService/index.mjs +792 -0
- package/dist/src/composition/syncService/index.mjs.map +1 -0
- package/dist/src/composition/syncService/localBuilds.cjs +367 -0
- package/dist/src/composition/syncService/localBuilds.cjs.map +1 -0
- package/dist/src/composition/syncService/localBuilds.mjs +358 -0
- package/dist/src/composition/syncService/localBuilds.mjs.map +1 -0
- package/dist/src/composition/transitionLayers.cjs +17 -0
- package/dist/src/composition/transitionLayers.cjs.map +1 -0
- package/dist/src/composition/transitionLayers.d.mts +6 -0
- package/dist/src/composition/transitionLayers.d.mts.map +1 -0
- package/dist/src/composition/transitionLayers.mjs +16 -0
- package/dist/src/composition/transitionLayers.mjs.map +1 -0
- package/dist/src/composition/types/harness.d.mts +52 -0
- package/dist/src/composition/types/harness.d.mts.map +1 -0
- package/dist/src/extensions/setupDiagnostics.cjs +65 -0
- package/dist/src/extensions/setupDiagnostics.cjs.map +1 -0
- package/dist/src/extensions/setupDiagnostics.mjs +64 -0
- package/dist/src/extensions/setupDiagnostics.mjs.map +1 -0
- package/dist/utils.cjs +4 -0
- package/dist/utils.d.mts +2 -0
- package/dist/utils.mjs +2 -0
- package/dist/webBuilder.cjs +59 -0
- package/dist/webBuilder.d.mts +9 -0
- package/dist/webBuilder.mjs +9 -0
- package/docs/server/api-export.md +86 -0
- package/docs/server/api.md +144 -0
- package/docs/server/getting-started.md +114 -0
- package/docs/server/index.md +67 -0
- package/docs/server/ipc.md +97 -0
- package/docs/server/lifecycle.md +108 -0
- package/docs/server/security.md +101 -0
- package/llms.txt +12 -0
- package/package.json +295 -0
- package/src/prompts/po-author-extension/SKILL.md +35 -0
- package/src/prompts/po-author-extension/references/extension-contract.md +134 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Client protocol and in-process APIs
|
|
2
|
+
|
|
3
|
+
The canonical server has one client-neutral listener. It exposes HTTP routes and an authenticated WebSocket at `/api/ws`; the server keeps the Pi harness, typed session services, and package APIs in process.
|
|
4
|
+
|
|
5
|
+
## The transport design
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
po-server
|
|
9
|
+
|
|
|
10
|
+
+------------------+------------------+
|
|
11
|
+
| |
|
|
12
|
+
v v
|
|
13
|
+
HTTP control surface /api/ws WebSocket
|
|
14
|
+
health, sessions, APIs Pi 0.85 Chord services
|
|
15
|
+
| |
|
|
16
|
+
+------------------+------------------+
|
|
17
|
+
v
|
|
18
|
+
DirectHarnessRuntime
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The listener binds to loopback by default. It is a network listener with an explicit bearer capability, not a filesystem endpoint. There is no internal raw command bridge and no separate API listener.
|
|
22
|
+
|
|
23
|
+
## HTTP routes
|
|
24
|
+
|
|
25
|
+
The server exposes these client-neutral routes:
|
|
26
|
+
|
|
27
|
+
| Route | Contract |
|
|
28
|
+
| ---------------------------------------------------------------------- | ------------------------------------------- |
|
|
29
|
+
| `GET /api/health` | Unauthenticated readiness and session count |
|
|
30
|
+
| `GET /api/workspaces/<workspace-id>/sessions` | Session metadata for the headless hub |
|
|
31
|
+
| `GET /api/workspaces/<workspace-id>/sessions/<id>` | One session's metadata |
|
|
32
|
+
| `GET /api/events` | Server-sent session and channel events |
|
|
33
|
+
| `GET /api/workspaces/<workspace-id>/sessions/<id>/channels` | Current channel projections |
|
|
34
|
+
| `POST /api/workspaces/<workspace-id>/sessions/<id>/channel/<type>` | Deliver a channel operation |
|
|
35
|
+
| `/api/workspaces/<workspace-id>/sessions/<id>/plugins/<base-path>/...` | Dispatch a session package API in process |
|
|
36
|
+
|
|
37
|
+
All routes other than health require the configured token. HTTP clients should send `Authorization: Bearer <token>` or `x-po-token`. The WebSocket may use the same capability in its authorization header or query string; avoid query strings when a header is available because URLs can be logged.
|
|
38
|
+
|
|
39
|
+
The old raw command route is not part of this surface. Session control uses the typed protocol described below.
|
|
40
|
+
|
|
41
|
+
## `/api/ws` protocol
|
|
42
|
+
|
|
43
|
+
`/api/ws` carries the Pi 0.85 byte protocol over an already-authenticated WebSocket. The server hosts the stable cockpit server identity and publishes these typed services:
|
|
44
|
+
|
|
45
|
+
- `po.hub.v1` lists sessions, subscribes to channel events, and sends typed channel operations;
|
|
46
|
+
- `po.session-management.v1` attaches and detaches a session; and
|
|
47
|
+
- `po.session.v1` exposes one session's state and operations.
|
|
48
|
+
|
|
49
|
+
A client first attaches through the management service, then binds the session service for that session. The service boundary is typed even though the transport carries protocol bytes.
|
|
50
|
+
|
|
51
|
+
## Typed session operations
|
|
52
|
+
|
|
53
|
+
`po.session.v1` exposes:
|
|
54
|
+
|
|
55
|
+
- `prompt`, with `waitFor: "accepted"` or `"settled"`;
|
|
56
|
+
- `steer`, `followUp`, `abort`, and `clearQueue`;
|
|
57
|
+
- `setModel`, `setThinking`, `compact`, and `setName`;
|
|
58
|
+
- `rewind`, including optional summarization and instructions;
|
|
59
|
+
- `extensionUiResponse`;
|
|
60
|
+
- `getState`, `getSessionStats`, and `getCommands`; and
|
|
61
|
+
- `getAvailableModels` and `getAvailableThinkingLevels`.
|
|
62
|
+
|
|
63
|
+
A prompt waits for the agent to settle by default. `accepted` returns after authoritative submission without owning the turn lifetime. A second prompt during a turn is rejected. Steering and abort require an active turn. Context cancellation aborts the active runtime operation.
|
|
64
|
+
|
|
65
|
+
The session state contains an authoritative transcript snapshot, phase, model, thinking level, queue, revision, transient progress, concurrent in-flight items, and presentation state. Typed query methods are the source of truth for current state, not an event stream assembled by a client.
|
|
66
|
+
|
|
67
|
+
## Replay and consistency
|
|
68
|
+
|
|
69
|
+
Chord state replication sends a fresh attachment the current service state. The session journal is the durable history source. Presentation events are retained in memory only, up to 1,024 events or 8 MiB, and the state reports how many were dropped. Current status, widget, dialog, and custom-entry projections are retained independently so a reconnect can recover current UI state. Branch navigation resets custom projections and increments `resetRevision`.
|
|
70
|
+
|
|
71
|
+
The hub's session and channel event history is also bounded to 1,024 events. These windows are reconnect aids, not durable history. Clients should resnapshot and use typed queries whenever a revision gap or dropped count is observed. Query replies for full history and model discovery are not treated as replayable presentation events.
|
|
72
|
+
|
|
73
|
+
## Session package APIs
|
|
74
|
+
|
|
75
|
+
A package API is registered by a server facet and called through the in-process `Request` adapter. The listener strips `/api/workspaces/<workspace-id>/sessions/<id>/plugins/<base-path>` before invoking the handler, so a request to `/api/workspaces/<workspace-id>/sessions/one/plugins/runner/runs/r1/log` reaches the `runner` handler as `/runs/r1/log`.
|
|
76
|
+
|
|
77
|
+
Package handlers run with the session's trusted host context. They still validate request bodies, bound reads and streams, constrain paths, and avoid returning secrets merely because the caller passed the listener token.
|
|
78
|
+
|
|
79
|
+
## Related guides
|
|
80
|
+
|
|
81
|
+
- [Lifecycle](lifecycle.md) explains startup, readiness, and shutdown.
|
|
82
|
+
- [Session APIs](api.md) defines descriptor loading and the TypeScript surface.
|
|
83
|
+
- [Security](security.md) explains token validation, listener exposure, and trusted code.
|
|
84
|
+
|
|
85
|
+
## Scoped route hierarchy
|
|
86
|
+
|
|
87
|
+
| Scope | REST resource | Package APIs | WebSocket |
|
|
88
|
+
| --------- | ------------------------------------------------------ | ------------------------------------------------------------------------ | --------------------------------------------------------- |
|
|
89
|
+
| Global | `/api/settings` | `/api/plugins/<package>` | `/api/ws` |
|
|
90
|
+
| Workspace | `/api/workspaces/<workspace-id>` | `/api/workspaces/<workspace-id>/plugins/<package>` | `/api/workspaces/<workspace-id>/ws` |
|
|
91
|
+
| Session | `/api/workspaces/<workspace-id>/sessions/<session-id>` | `/api/workspaces/<workspace-id>/sessions/<session-id>/plugins/<package>` | `/api/workspaces/<workspace-id>/sessions/<session-id>/ws` |
|
|
92
|
+
|
|
93
|
+
Workspace settings are at `/api/workspaces/<workspace-id>/settings`. Create or admit a workspace with `POST /api/workspaces` and a `root`, then create a session with `POST /api/workspaces/<workspace-id>/sessions` and an optional `name`. The admitted workspace selects the session working directory. Session listing returns only that workspace's sessions. A session ID addressed through another workspace returns `404`.
|
|
94
|
+
|
|
95
|
+
The global socket retains the aggregate hub protocol used by Po Web. Workspace sockets expose only sessions in that workspace; session sockets expose only the named session. Both restrict session attachments, subscriptions, thread reads, and package calls to their addressed scope. All transports use the same Pi/Chord framing. Old flat session routes, singular plugin mounts, and `/api/pi` are removed without aliases.
|
|
96
|
+
|
|
97
|
+
Startup loads global facets from the global root's live composition, workspace facets when that workspace is admitted, and session facets from the owning workspace's composition with the session's selection. REST requests dispatch only to that mount; there is no fallback to another scope.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Session lifecycle
|
|
2
|
+
|
|
3
|
+
Package hooks follow the [plugin lifecycle contract](../../../po-core/docs/plugins.md): register, `onStart`, `onStop`, unregister, and `onDispose`. Server readiness waits for required plugin startup; browser reconnects do not restart those plugins.
|
|
4
|
+
|
|
5
|
+
`po-server` owns one session boundary from startup through shutdown. The Pi harness, session services, package facets, and listener live in the same process. A client can disconnect without stopping the runtime, and a later client can recover the current replicated state.
|
|
6
|
+
|
|
7
|
+
## The ownership model
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
po-server process
|
|
11
|
+
|
|
|
12
|
+
+-- session manager and headless hub
|
|
13
|
+
+-- DirectHarnessRuntime
|
|
14
|
+
+-- typed management and session services
|
|
15
|
+
+-- package facet host and in-process API handlers
|
|
16
|
+
+-- HTTP and WebSocket listener, including /api/ws
|
|
17
|
+
+-- v4 JSONL session journal
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The server, not a client, owns runtime disposal and history ownership. This gives clients a stable protocol endpoint while the runtime continues processing a turn or while a client reconnects.
|
|
21
|
+
|
|
22
|
+
## Startup is readiness-ordered
|
|
23
|
+
|
|
24
|
+
The server publishes the listener only after the runtime and required facets are ready:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
parse options and identity
|
|
28
|
+
|
|
|
29
|
+
v
|
|
30
|
+
read token and compose the global scope from configuration
|
|
31
|
+
|
|
|
32
|
+
v
|
|
33
|
+
import eligible facets from built package entries
|
|
34
|
+
|
|
|
35
|
+
v
|
|
36
|
+
create DirectHarnessRuntime and prepare the headless host
|
|
37
|
+
|
|
|
38
|
+
v
|
|
39
|
+
activate facets and initialize typed session services
|
|
40
|
+
|
|
|
41
|
+
v
|
|
42
|
+
bind HTTP and /api/ws
|
|
43
|
+
|
|
|
44
|
+
v
|
|
45
|
+
wait for the runtime
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The executable performs these steps:
|
|
49
|
+
|
|
50
|
+
1. Parse server options before `--` and keep the remaining values as embedded harness arguments.
|
|
51
|
+
2. Read and trim the token file. An empty token stops startup, and the token is never placed in the process argument vector.
|
|
52
|
+
3. Resolve session identity and harness options from the caller's repository.
|
|
53
|
+
4. Compose the scope from configuration, collect the selected packages' `poServer` entries, check that each built entry stays inside its package, and filter by ownership and scope before importing modules through their content-addressed URLs.
|
|
54
|
+
5. Create the direct runtime with explicit history ownership, model configuration, session identity, and working directory.
|
|
55
|
+
6. Prepare and activate the selected server facets. Required failures stop readiness; optional failures are reported and isolated.
|
|
56
|
+
7. Mount in-process package API handlers and initialize the typed session projection.
|
|
57
|
+
8. Bind the loopback HTTP listener and authenticated `/api/ws` WebSocket endpoint.
|
|
58
|
+
|
|
59
|
+
A startup error is written to stderr with a `[po-server]` prefix and exits non-zero. Successful startup waits for the direct runtime, not for a client to connect.
|
|
60
|
+
|
|
61
|
+
## Steady state
|
|
62
|
+
|
|
63
|
+
Once ready, the server holds a stable session boundary:
|
|
64
|
+
|
|
65
|
+
| Owned resource | Lifetime |
|
|
66
|
+
| ---------------------------------- | -------------------------------- |
|
|
67
|
+
| Session ID and name | Whole server process |
|
|
68
|
+
| Direct harness runtime | Whole server process |
|
|
69
|
+
| Typed session state and operations | Whole server process |
|
|
70
|
+
| Package facet registrations | Until shutdown or facet disposal |
|
|
71
|
+
| HTTP and `/api/ws` listener | Whole server process |
|
|
72
|
+
| Session journal ownership | Whole server process |
|
|
73
|
+
|
|
74
|
+
The session service projects runtime activity into an authoritative snapshot, transient progress, concurrent in-flight items, and bounded presentation events. A client does not need to remain connected for the runtime to update the journal.
|
|
75
|
+
|
|
76
|
+
Selection and minor-mode changes are applied through the in-process headless host. They update the runtime's tools, resources, and projected composition without changing the server identity or requiring another Pi process.
|
|
77
|
+
|
|
78
|
+
## Reconnect and replay
|
|
79
|
+
|
|
80
|
+
A new protocol attachment receives replicated state rather than an old transport backlog. The session state includes the current transcript, phase, model, thinking level, queue, in-flight items, and presentation projection. The session journal remains the durable source for history and is rehydrated when the runtime opens it.
|
|
81
|
+
|
|
82
|
+
Live presentation events are bounded to 1,024 events or 8 MiB. The state reports a `dropped` count when that window overflows. Latest status, widget, dialog, and custom-entry projections are retained separately, so a reconnect can render current UI state even after older live events were discarded. A branch replacement resets custom presentation state and reports `resetRevision`.
|
|
83
|
+
|
|
84
|
+
This is recovery state, not an audit log. Clients that need authoritative transcript or configuration data should use the typed snapshot and query operations. A client must not infer missing history from the bounded presentation window.
|
|
85
|
+
|
|
86
|
+
## Package facet changes
|
|
87
|
+
|
|
88
|
+
Each facet is imported through a URL that changes with its package content. Rebuilding or upgrading a package does not mutate a running session: the next new session imports the new build. Global and workspace scopes are checked again when a session opens or a workspace is admitted, and remount when an entry changed; a failed remount restores the previous facets. After a set number of superseded package versions, the server restarts at the next idle moment so old modules do not accumulate. During shutdown, facet disposers run before the host and runtime release their resources.
|
|
89
|
+
|
|
90
|
+
## Shutdown and failures
|
|
91
|
+
|
|
92
|
+
`SIGINT`, `SIGTERM`, runtime exit, and explicit disposal all disable new operations and release resources in ownership order:
|
|
93
|
+
|
|
94
|
+
1. stop accepting new package and session operations;
|
|
95
|
+
2. close active facet registrations and package handlers;
|
|
96
|
+
3. stop the headless host and pending extension interactions;
|
|
97
|
+
4. close the typed service projection and direct runtime;
|
|
98
|
+
5. release history ownership and close the JSONL repository;
|
|
99
|
+
6. close the listener and flush bounded telemetry.
|
|
100
|
+
|
|
101
|
+
A runtime failure is a session failure. The server does not replace it with an alternate process or silently switch to another module set. A history ownership conflict likewise fails closed to avoid concurrent writers.
|
|
102
|
+
|
|
103
|
+
## Related guides
|
|
104
|
+
|
|
105
|
+
- [Getting started](getting-started.md) covers launch options and live composition.
|
|
106
|
+
- [IPC](ipc.md) explains `/api/ws`, typed services, HTTP routes, and replay.
|
|
107
|
+
- [Session APIs](api.md) explains descriptor loading and handler lifetime.
|
|
108
|
+
- [Security](security.md) describes listener, token, history, and trusted-code boundaries.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Security and trust boundaries
|
|
2
|
+
|
|
3
|
+
`po-server` protects access to one local agent runtime. It is not a sandbox and it is not a public gateway. The harness may run shell commands with the account's authority, so reaching its control surface is equivalent to controlling that session.
|
|
4
|
+
|
|
5
|
+
## The trust model
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
trusted owner account
|
|
9
|
+
|
|
|
10
|
+
+-- po-server
|
|
11
|
+
+-- DirectHarnessRuntime
|
|
12
|
+
+-- configured extensions and server facets
|
|
13
|
+
+-- session journal and in-process APIs
|
|
14
|
+
+-- authenticated HTTP/WebSocket listener
|
|
15
|
+
|
|
|
16
|
+
+-- trusted local client or Po Web
|
|
17
|
+
+-- browser boundary owned by Po Web
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The server answers which callers can reach the session. Loopback binding and a random token narrow that set. They do not defend against root, a compromised owner account, hostile code already running as that owner, or a malicious extension loaded into the runtime.
|
|
21
|
+
|
|
22
|
+
Remote browser authentication, tunnel policy, passkeys, and containment belong to Po Web. The server's listener is not a replacement for those controls.
|
|
23
|
+
|
|
24
|
+
## Security goals
|
|
25
|
+
|
|
26
|
+
The design aims to:
|
|
27
|
+
|
|
28
|
+
- keep the default listener on loopback;
|
|
29
|
+
- keep the session token out of process arguments and application state sent to clients;
|
|
30
|
+
- authenticate direct HTTP and `/api/ws` protocol access with a random capability;
|
|
31
|
+
- load only the built `poServer` entries the scope's configuration selects, each confined to its package;
|
|
32
|
+
- keep package handlers in process while isolating optional facet failures; and
|
|
33
|
+
- preserve session history ownership so two runtimes cannot write the same journal concurrently.
|
|
34
|
+
|
|
35
|
+
It does not attempt to:
|
|
36
|
+
|
|
37
|
+
- contain the harness or trusted package code;
|
|
38
|
+
- protect data from the account running the server;
|
|
39
|
+
- encrypt traffic when the listener is exposed without TLS; or
|
|
40
|
+
- authorize arbitrary reverse proxies or tunnels.
|
|
41
|
+
|
|
42
|
+
## Capability map
|
|
43
|
+
|
|
44
|
+
| Asset | Protection | Remaining trust |
|
|
45
|
+
| --------------------------- | ---------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
46
|
+
| HTTP and `/api/ws` listener | Loopback by default; token required except health | Owner, root, token holder, and any exposed reverse proxy |
|
|
47
|
+
| Listener token | Read from a file and compared as a bearer capability | Caller creates and protects the file |
|
|
48
|
+
| Server facets | Live composition, entries confined to their package, content URLs | Repository configuration and installed package contents are trusted |
|
|
49
|
+
| Session journal | Explicit history ownership and v4 JSONL storage | Owner and any process able to access the session directory |
|
|
50
|
+
| Package APIs | In-process registration and fixed route mounts | Handlers are trusted executable code |
|
|
51
|
+
| Direct harness | Same-process runtime with configured working directory and environment | Command, configuration, repository, model providers, and dependencies |
|
|
52
|
+
|
|
53
|
+
Create the token before launch with an owner-only umask:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
(umask 077; openssl rand -base64 32 > "$token_file")
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Do not store it in the repository, a shared runtime directory, a public environment variable, or an argument list. Rotating it requires stopping the server, replacing the protected file, and starting the session again.
|
|
60
|
+
|
|
61
|
+
## Listener authentication
|
|
62
|
+
|
|
63
|
+
`/api/health` is intentionally unauthenticated so a local supervisor can check readiness. Every other HTTP route and the `/api/ws` upgrade require the configured token. HTTP clients should use `Authorization: Bearer <token>` or `x-po-token`. A WebSocket client may use the same capability in its upgrade headers or query string. Prefer a header because URLs can appear in logs.
|
|
64
|
+
|
|
65
|
+
A token authenticates the caller to the session. It is not a per-operation permission system. A holder can prompt, steer, abort, change configuration, rewind, answer extension UI, and invoke mounted package APIs. Treat it as full session control.
|
|
66
|
+
|
|
67
|
+
## Package trust
|
|
68
|
+
|
|
69
|
+
The server does not compile or discover package code while serving a request. When it admits a scope or starts a session, it composes that scope's configuration, reads the selected packages' `poServer` declarations, confines each built entry to its package, filters ownership and scope, and then imports and starts each eligible facet.
|
|
70
|
+
|
|
71
|
+
Required facet failures prevent readiness. Optional failures are reported and isolated. An import that times out or throws is not retried, and a failed entry never selects an alternate directory or legacy module set.
|
|
72
|
+
|
|
73
|
+
Package handlers receive trusted process context, not automatic browser authorization. Validate bodies, bound reads and streams, constrain file paths to the intended scope, and do not return secrets merely because a request arrived with a valid server token.
|
|
74
|
+
|
|
75
|
+
## Browser and remote access
|
|
76
|
+
|
|
77
|
+
Po Web owns browser authentication and proxies `/api/ws` to the session server. It can add the server token on the upstream request without exposing that token to browser JavaScript. A remote browser receives Po Web's separate device and session credentials, which can still grant powerful session control.
|
|
78
|
+
|
|
79
|
+
Before putting the cockpit behind a tunnel, review the web package's pairing, origin, cookie, passkey, sealed transport, signed bundle, and optional container controls. Do not publish the server listener through an unauthenticated TCP forwarder. A tunnel changes reachability, not authority.
|
|
80
|
+
|
|
81
|
+
## Data, replay, and diagnostics
|
|
82
|
+
|
|
83
|
+
The session journal contains conversation and tool history according to the upstream v4 JSONL format. The runtime also keeps current transcript state, in-flight work, and bounded presentation events in process memory. Presentation history is limited to 1,024 events or 8 MiB and reports dropped events; current projections are retained separately. This supports reconnect recovery but is not a durable audit log.
|
|
84
|
+
|
|
85
|
+
Server telemetry records lifecycle and coarse usage events. Its transcript aggregate omits message and tool content. This is a telemetry property, not a guarantee that clients, extensions, package APIs, or the harness do not log their own data.
|
|
86
|
+
|
|
87
|
+
## Operating posture
|
|
88
|
+
|
|
89
|
+
1. Create the token under an owner-only directory.
|
|
90
|
+
2. Keep the session journal, installed packages, and the Po home build directory private.
|
|
91
|
+
3. Treat repository configuration, model providers, extensions, and server facets as executable inputs.
|
|
92
|
+
4. Bind direct servers to loopback unless an authenticated TLS boundary is already in place.
|
|
93
|
+
5. Use Po Web's documented controls for browser and remote access.
|
|
94
|
+
6. Rotate the token by replacing the file while the server is stopped.
|
|
95
|
+
7. Do not rely on an obscure path, port, or URL as authentication.
|
|
96
|
+
|
|
97
|
+
## Known limits
|
|
98
|
+
|
|
99
|
+
Loopback and file permissions do not defend against root or the owner account. A token holder can control the session. Package APIs and extensions run as trusted code. The replay window and transcript projection keep data in process memory, while the journal persists session history. None of these controls contain what the harness can do inside its working environment.
|
|
100
|
+
|
|
101
|
+
See [IPC](ipc.md) for exact protocol behavior and [Lifecycle](lifecycle.md) for startup, cleanup, and history recovery.
|
package/llms.txt
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Po
|
|
2
|
+
|
|
3
|
+
Package-owned guidance for using and extending the Po agent harness.
|
|
4
|
+
|
|
5
|
+
## How to author
|
|
6
|
+
|
|
7
|
+
- [Author a Po extension](./src/prompts/po-author-extension/SKILL.md): Create or update a Po extension inside or outside this monorepo.
|
|
8
|
+
- [Extension authoring contract](./src/prompts/po-author-extension/references/extension-contract.md): Package shape, Cordis lifecycle, Help contribution, and verification requirements.
|
|
9
|
+
|
|
10
|
+
## Package reference
|
|
11
|
+
|
|
12
|
+
- [Package README](./README.md): Installation, configuration, modes, domains, profiles, and runtime behavior.
|
package/package.json
ADDED
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agimon-ai/po",
|
|
3
|
+
"version": "0.0.0-alpha.0",
|
|
4
|
+
"description": "Opinionated, composable agent harness for scoped tools, skills, MCP servers, and developer workflows.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"agent-harness",
|
|
7
|
+
"ai",
|
|
8
|
+
"coding-agent",
|
|
9
|
+
"developer-tools",
|
|
10
|
+
"pi",
|
|
11
|
+
"pi-coding-agent",
|
|
12
|
+
"pi-package",
|
|
13
|
+
"po"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://agimon.ai",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/AgiFlow/po/issues"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"author": "Vuong Ngo",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/AgiFlow/po.git",
|
|
24
|
+
"directory": "packages/cli/po"
|
|
25
|
+
},
|
|
26
|
+
"bin": {
|
|
27
|
+
"doom-runner": "./dist/bin/doomRunner.mjs",
|
|
28
|
+
"po": "./dist/bin/cli.mjs",
|
|
29
|
+
"po-server": "./dist/bin/serve.mjs"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"assets",
|
|
33
|
+
"dist",
|
|
34
|
+
"docs/server",
|
|
35
|
+
"llms.txt",
|
|
36
|
+
"README.md",
|
|
37
|
+
"src/prompts"
|
|
38
|
+
],
|
|
39
|
+
"type": "module",
|
|
40
|
+
"main": "./dist/index.cjs",
|
|
41
|
+
"types": "./dist/index.d.mts",
|
|
42
|
+
"exports": {
|
|
43
|
+
".": {
|
|
44
|
+
"types": "./dist/index.d.mts",
|
|
45
|
+
"import": "./dist/index.mjs",
|
|
46
|
+
"require": "./dist/index.cjs"
|
|
47
|
+
},
|
|
48
|
+
"./bin/cli": {
|
|
49
|
+
"types": "./dist/bin/cli.d.mts",
|
|
50
|
+
"import": "./dist/bin/cli.mjs",
|
|
51
|
+
"require": "./dist/bin/cli.cjs"
|
|
52
|
+
},
|
|
53
|
+
"./bin/doomRunner": {
|
|
54
|
+
"types": "./dist/bin/doomRunner.d.mts",
|
|
55
|
+
"import": "./dist/bin/doomRunner.mjs",
|
|
56
|
+
"require": "./dist/bin/doomRunner.cjs"
|
|
57
|
+
},
|
|
58
|
+
"./cli": {
|
|
59
|
+
"types": "./dist/cli.d.mts",
|
|
60
|
+
"import": "./dist/cli.mjs",
|
|
61
|
+
"require": "./dist/cli.cjs"
|
|
62
|
+
},
|
|
63
|
+
"./cliApp": {
|
|
64
|
+
"types": "./dist/cliApp.d.mts",
|
|
65
|
+
"import": "./dist/cliApp.mjs",
|
|
66
|
+
"require": "./dist/cliApp.cjs"
|
|
67
|
+
},
|
|
68
|
+
"./compatibilityOptions": {
|
|
69
|
+
"types": "./dist/compatibilityOptions.d.mts",
|
|
70
|
+
"import": "./dist/compatibilityOptions.mjs",
|
|
71
|
+
"require": "./dist/compatibilityOptions.cjs"
|
|
72
|
+
},
|
|
73
|
+
"./help": {
|
|
74
|
+
"types": "./dist/help.d.mts",
|
|
75
|
+
"import": "./dist/help.mjs",
|
|
76
|
+
"require": "./dist/help.cjs"
|
|
77
|
+
},
|
|
78
|
+
"./matrixOptions": {
|
|
79
|
+
"types": "./dist/matrixOptions.d.mts",
|
|
80
|
+
"import": "./dist/matrixOptions.mjs",
|
|
81
|
+
"require": "./dist/matrixOptions.cjs"
|
|
82
|
+
},
|
|
83
|
+
"./options": {
|
|
84
|
+
"types": "./dist/options.d.mts",
|
|
85
|
+
"import": "./dist/options.mjs",
|
|
86
|
+
"require": "./dist/options.cjs"
|
|
87
|
+
},
|
|
88
|
+
"./commands": {
|
|
89
|
+
"types": "./dist/commands.d.mts",
|
|
90
|
+
"import": "./dist/commands.mjs",
|
|
91
|
+
"require": "./dist/commands.cjs"
|
|
92
|
+
},
|
|
93
|
+
"./baseCommand": {
|
|
94
|
+
"types": "./dist/baseCommand.d.mts",
|
|
95
|
+
"import": "./dist/baseCommand.mjs",
|
|
96
|
+
"require": "./dist/baseCommand.cjs"
|
|
97
|
+
},
|
|
98
|
+
"./compatibilityCommand": {
|
|
99
|
+
"types": "./dist/compatibilityCommand.d.mts",
|
|
100
|
+
"import": "./dist/compatibilityCommand.mjs",
|
|
101
|
+
"require": "./dist/compatibilityCommand.cjs"
|
|
102
|
+
},
|
|
103
|
+
"./emitMcpCommand": {
|
|
104
|
+
"types": "./dist/emitMcpCommand.d.mts",
|
|
105
|
+
"import": "./dist/emitMcpCommand.mjs",
|
|
106
|
+
"require": "./dist/emitMcpCommand.cjs"
|
|
107
|
+
},
|
|
108
|
+
"./explainCommand": {
|
|
109
|
+
"types": "./dist/explainCommand.d.mts",
|
|
110
|
+
"import": "./dist/explainCommand.mjs",
|
|
111
|
+
"require": "./dist/explainCommand.cjs"
|
|
112
|
+
},
|
|
113
|
+
"./initCommand": {
|
|
114
|
+
"types": "./dist/initCommand.d.mts",
|
|
115
|
+
"import": "./dist/initCommand.mjs",
|
|
116
|
+
"require": "./dist/initCommand.cjs"
|
|
117
|
+
},
|
|
118
|
+
"./config": {
|
|
119
|
+
"types": "./dist/config.d.mts",
|
|
120
|
+
"import": "./dist/config.mjs",
|
|
121
|
+
"require": "./dist/config.cjs"
|
|
122
|
+
},
|
|
123
|
+
"./harnessState": {
|
|
124
|
+
"types": "./dist/harnessState.d.mts",
|
|
125
|
+
"import": "./dist/harnessState.mjs",
|
|
126
|
+
"require": "./dist/harnessState.cjs"
|
|
127
|
+
},
|
|
128
|
+
"./projectTrust": {
|
|
129
|
+
"types": "./dist/projectTrust.d.mts",
|
|
130
|
+
"import": "./dist/projectTrust.mjs",
|
|
131
|
+
"require": "./dist/projectTrust.cjs"
|
|
132
|
+
},
|
|
133
|
+
"./extensions/server": {
|
|
134
|
+
"types": "./dist/extensions/server.d.mts",
|
|
135
|
+
"import": "./dist/extensions/server.mjs",
|
|
136
|
+
"require": "./dist/extensions/server.cjs"
|
|
137
|
+
},
|
|
138
|
+
"./services": {
|
|
139
|
+
"types": "./dist/services.d.mts",
|
|
140
|
+
"import": "./dist/services.mjs",
|
|
141
|
+
"require": "./dist/services.cjs"
|
|
142
|
+
},
|
|
143
|
+
"./compatibility": {
|
|
144
|
+
"types": "./dist/compatibility.d.mts",
|
|
145
|
+
"import": "./dist/compatibility.mjs",
|
|
146
|
+
"require": "./dist/compatibility.cjs"
|
|
147
|
+
},
|
|
148
|
+
"./antigravity": {
|
|
149
|
+
"types": "./dist/antigravity.d.mts",
|
|
150
|
+
"import": "./dist/antigravity.mjs",
|
|
151
|
+
"require": "./dist/antigravity.cjs"
|
|
152
|
+
},
|
|
153
|
+
"./codex": {
|
|
154
|
+
"types": "./dist/codex.d.mts",
|
|
155
|
+
"import": "./dist/codex.mjs",
|
|
156
|
+
"require": "./dist/codex.cjs"
|
|
157
|
+
},
|
|
158
|
+
"./process": {
|
|
159
|
+
"types": "./dist/process.d.mts",
|
|
160
|
+
"import": "./dist/process.mjs",
|
|
161
|
+
"require": "./dist/process.cjs"
|
|
162
|
+
},
|
|
163
|
+
"./shared": {
|
|
164
|
+
"types": "./dist/shared.d.mts",
|
|
165
|
+
"import": "./dist/shared.mjs",
|
|
166
|
+
"require": "./dist/shared.cjs"
|
|
167
|
+
},
|
|
168
|
+
"./compatibilityContext": {
|
|
169
|
+
"types": "./dist/compatibilityContext.d.mts",
|
|
170
|
+
"import": "./dist/compatibilityContext.mjs",
|
|
171
|
+
"require": "./dist/compatibilityContext.cjs"
|
|
172
|
+
},
|
|
173
|
+
"./harnessContext": {
|
|
174
|
+
"types": "./dist/harnessContext.d.mts",
|
|
175
|
+
"import": "./dist/harnessContext.mjs",
|
|
176
|
+
"require": "./dist/harnessContext.cjs"
|
|
177
|
+
},
|
|
178
|
+
"./matrixSwitcher": {
|
|
179
|
+
"types": "./dist/matrixSwitcher.d.mts",
|
|
180
|
+
"import": "./dist/matrixSwitcher.mjs",
|
|
181
|
+
"require": "./dist/matrixSwitcher.cjs"
|
|
182
|
+
},
|
|
183
|
+
"./mcpFilter": {
|
|
184
|
+
"types": "./dist/mcpFilter.d.mts",
|
|
185
|
+
"import": "./dist/mcpFilter.mjs",
|
|
186
|
+
"require": "./dist/mcpFilter.cjs"
|
|
187
|
+
},
|
|
188
|
+
"./resourceCollector": {
|
|
189
|
+
"types": "./dist/resourceCollector.d.mts",
|
|
190
|
+
"import": "./dist/resourceCollector.mjs",
|
|
191
|
+
"require": "./dist/resourceCollector.cjs"
|
|
192
|
+
},
|
|
193
|
+
"./utils": {
|
|
194
|
+
"types": "./dist/utils.d.mts",
|
|
195
|
+
"import": "./dist/utils.mjs",
|
|
196
|
+
"require": "./dist/utils.cjs"
|
|
197
|
+
},
|
|
198
|
+
"./repository": {
|
|
199
|
+
"types": "./dist/repository.d.mts",
|
|
200
|
+
"import": "./dist/repository.mjs",
|
|
201
|
+
"require": "./dist/repository.cjs"
|
|
202
|
+
},
|
|
203
|
+
"./package.json": "./package.json",
|
|
204
|
+
"./webBuilder": {
|
|
205
|
+
"types": "./dist/webBuilder.d.mts",
|
|
206
|
+
"import": "./dist/webBuilder.mjs",
|
|
207
|
+
"require": "./dist/webBuilder.cjs"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"publishConfig": {
|
|
211
|
+
"access": "public",
|
|
212
|
+
"registry": "https://registry.npmjs.org/"
|
|
213
|
+
},
|
|
214
|
+
"dependencies": {
|
|
215
|
+
"@agimon-ai/log-sink-mcp": "0.30.12",
|
|
216
|
+
"@agimon-ai/po-autostop": "0.0.0-alpha.0",
|
|
217
|
+
"@agimon-ai/po-cache": "0.0.0-alpha.0",
|
|
218
|
+
"@agimon-ai/po-config": "0.0.0-alpha.0",
|
|
219
|
+
"@agimon-ai/po-core": "0.0.0-alpha.0",
|
|
220
|
+
"@agimon-ai/po-domain": "0.0.0-alpha.0",
|
|
221
|
+
"@agimon-ai/po-major-mode": "0.0.0-alpha.0",
|
|
222
|
+
"@agimon-ai/po-minor-mode": "0.0.0-alpha.0",
|
|
223
|
+
"@agimon-ai/po-notification": "0.0.0-alpha.0",
|
|
224
|
+
"@agimon-ai/po-profile": "0.0.0-alpha.0",
|
|
225
|
+
"@agimon-ai/po-session": "0.0.0-alpha.0",
|
|
226
|
+
"@agimon-ai/po-skill": "0.0.0-alpha.0",
|
|
227
|
+
"@agimon-ai/po-telemetry": "0.0.0-alpha.0",
|
|
228
|
+
"@agimon-ai/po-ui": "0.0.0-alpha.0",
|
|
229
|
+
"@agimon-ai/po-web-components": "0.0.0-alpha.0",
|
|
230
|
+
"@agimon-ai/po-web-security": "0.0.0-alpha.0",
|
|
231
|
+
"@deepseek-ai/cordis": "4.0.4",
|
|
232
|
+
"@earendil-works/chord": "1.0.2",
|
|
233
|
+
"@earendil-works/pi-agent-core": "1.0.2",
|
|
234
|
+
"@earendil-works/pi-coding-agent": "1.0.2",
|
|
235
|
+
"@earendil-works/pi-protocol": "1.0.2",
|
|
236
|
+
"@earendil-works/pi-server": "1.0.2",
|
|
237
|
+
"@hono/node-server": "2.1.3",
|
|
238
|
+
"@simplewebauthn/server": "^14.0.3",
|
|
239
|
+
"@tailwindcss/vite": "4.3.3",
|
|
240
|
+
"@vitejs/plugin-react": "6.1.1",
|
|
241
|
+
"cross-spawn": "7.0.6",
|
|
242
|
+
"gpt-tokenizer": "4.0.0",
|
|
243
|
+
"hono": "4.13.12",
|
|
244
|
+
"minimatch": "10.2.6",
|
|
245
|
+
"protobufjs": "8.8.0",
|
|
246
|
+
"rolldown": "1.2.12",
|
|
247
|
+
"tailwindcss": "4.3.3",
|
|
248
|
+
"typebox": "1.3.34",
|
|
249
|
+
"vite": "8.3.2",
|
|
250
|
+
"ws": "8.22.0",
|
|
251
|
+
"yaml": "2.9.1"
|
|
252
|
+
},
|
|
253
|
+
"devDependencies": {
|
|
254
|
+
"@agimon-ai/po-runner": "0.0.0-alpha.0",
|
|
255
|
+
"@agimon-ai/vibe-lint-plugin-doom-cli": "0.0.0-alpha.0",
|
|
256
|
+
"@earendil-works/pi-ai": "1.0.2",
|
|
257
|
+
"@earendil-works/pi-client": "1.0.2",
|
|
258
|
+
"@modelcontextprotocol/ext-apps": "2.0.3",
|
|
259
|
+
"@modelcontextprotocol/server": "2.2.0",
|
|
260
|
+
"@playwright/test": "1.63.0",
|
|
261
|
+
"@types/cross-spawn": "6.0.6",
|
|
262
|
+
"@types/node": "26.6.4",
|
|
263
|
+
"@types/ws": "8.18.2",
|
|
264
|
+
"@vitest/coverage-v8": "5.0.3",
|
|
265
|
+
"tsdown": "0.23.0",
|
|
266
|
+
"typescript": "7.0.2",
|
|
267
|
+
"vitest": "5.0.3"
|
|
268
|
+
},
|
|
269
|
+
"engines": {
|
|
270
|
+
"node": ">=24"
|
|
271
|
+
},
|
|
272
|
+
"poApiVersion": 1,
|
|
273
|
+
"poServer": {
|
|
274
|
+
"entry": "./src/extensions/server.ts",
|
|
275
|
+
"dist": "./dist/extensions/server.mjs",
|
|
276
|
+
"scopes": [
|
|
277
|
+
"global",
|
|
278
|
+
"workspace",
|
|
279
|
+
"session"
|
|
280
|
+
],
|
|
281
|
+
"contracts": {
|
|
282
|
+
"entry": "./src/exports/apiContracts.ts",
|
|
283
|
+
"dist": "./dist/apiContracts.mjs"
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"scripts": {
|
|
287
|
+
"build": "tsdown",
|
|
288
|
+
"test": "vitest --run",
|
|
289
|
+
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.app.json",
|
|
290
|
+
"test-system": "vitest run --config vitest.system.config.ts",
|
|
291
|
+
"lint": "oxlint . && oxfmt . --check",
|
|
292
|
+
"fixcode": "oxlint . --fix && oxfmt .",
|
|
293
|
+
"test:app": "playwright test --config playwright.app.config.ts"
|
|
294
|
+
}
|
|
295
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: po-author-extension
|
|
3
|
+
description: Create or update a Po extension package inside the Po monorepo or as an external npm package. Use for package layout, Pi discovery entries, shared Cordis lifecycle, package-owned Help, and extension verification.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Author a Po extension
|
|
7
|
+
|
|
8
|
+
Build the smallest extension that owns one clear capability and follows the host lifecycle already used by nearby Po packages.
|
|
9
|
+
|
|
10
|
+
## Choose the environment
|
|
11
|
+
|
|
12
|
+
- Inside the Po monorepo, read `AGENTS.md` and `templates/doom-extension/scaffold.yaml` before writing. Use the canonical `scaffold-doom-extension` definition when it fits, then keep only the folders the capability needs.
|
|
13
|
+
- Outside the monorepo, create the equivalent public ESM package manually and depend on published Po foundation packages. Never publish `workspace:*` ranges.
|
|
14
|
+
|
|
15
|
+
Choose the package tier from the capability, not convenience:
|
|
16
|
+
|
|
17
|
+
- `packages/core/*` for runtime foundations that must always be present.
|
|
18
|
+
- `packages/default/*` for normal distribution features selected by default configuration.
|
|
19
|
+
- `packages/minor/*` for optional modes.
|
|
20
|
+
- `packages/clients/*` for standalone client-facing processes.
|
|
21
|
+
- `packages/expo/*` for Expo config plugins used by native clients. Extensions never go here; ship native UI as `.native` files in the extension's own package.
|
|
22
|
+
- `layers/<layer>/*` for selectable layer extensions.
|
|
23
|
+
|
|
24
|
+
## Workflow
|
|
25
|
+
|
|
26
|
+
1. Inspect a nearby package with the same host surfaces and reuse its structure.
|
|
27
|
+
2. Put logic in `services/<serviceName>/index.ts`, service ports in `type.ts`, mutable state in `models`, request handlers in `controllers`, and tools in `tools`. Keep reusable types, schemas, and constant data in their named folders. Do not create `adapters`, `container`, `commands`, or `providers` roots.
|
|
28
|
+
3. Author each contribution at `src/extensions/<scope>/(backend|frontend)/<surface>/<name>[.<target>].<ext>`. Export one declaration or factory through the typed `define*` helper for that surface. Do not hand-write `pi.ts`, `server.ts`, or `web.ts`; `poExtension()` generates them beneath ignored `generated/` and builds the published host artifacts.
|
|
29
|
+
4. Return typed contributions from a named declaration or per-mount factory. Factories may be async. Use optional `onStart`, `onStop`, and `onDispose` hooks for lifecycle work; helpers own Cordis initialization, registration, readiness, and cleanup.
|
|
30
|
+
5. Put provider plugins in services and include them in the `services` contribution array. Consume required providers inside an owning injection with the corresponding `require...` accessor. The helper handles optional providers for native contributions such as resources and minor modes.
|
|
31
|
+
6. Keep package exports explicit and flat under `src/exports`, with only reusable APIs. If the extension contributes Help, publish `src/prompts/<skill-name>/SKILL.md`, link it from `llms.txt`, and declare its descriptor in `resources` with the exact package name and `import.meta.url`.
|
|
32
|
+
7. For frontend contributions, add a root `tsconfig.web.json`, keep routed `(frontend)` files out of the Node project, and typecheck both projects.
|
|
33
|
+
8. Run the repository checks or equivalent standalone package checks before publishing.
|
|
34
|
+
|
|
35
|
+
Read [references/extension-contract.md](references/extension-contract.md) for the concrete package, lifecycle, and verification contract.
|