@agimon-ai/po 0.0.0-alpha.21 → 0.0.0-alpha.211

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (631) hide show
  1. package/LICENSE +97 -8
  2. package/README.md +37 -722
  3. package/dist/apiContracts.cjs.map +1 -1
  4. package/dist/apiContracts.d.mts +2 -2
  5. package/dist/bin/cli.cjs +12 -7
  6. package/dist/bin/cli.cjs.map +1 -1
  7. package/dist/bin/cli.mjs +12 -7
  8. package/dist/bin/cli.mjs.map +1 -1
  9. package/dist/bin/poRunner.cjs +24 -7
  10. package/dist/bin/poRunner.cjs.map +1 -1
  11. package/dist/bin/poRunner.d.mts +8 -0
  12. package/dist/bin/poRunner.d.mts.map +1 -1
  13. package/dist/bin/poRunner.mjs +24 -7
  14. package/dist/bin/poRunner.mjs.map +1 -1
  15. package/dist/bin/serve.cjs +28 -17
  16. package/dist/bin/serve.cjs.map +1 -1
  17. package/dist/bin/serve.mjs +28 -17
  18. package/dist/bin/serve.mjs.map +1 -1
  19. package/dist/builders/cli/extensionAssembler/index.cjs +53 -40
  20. package/dist/builders/cli/extensionAssembler/index.cjs.map +1 -1
  21. package/dist/builders/cli/extensionAssembler/index.d.mts +11 -6
  22. package/dist/builders/cli/extensionAssembler/index.d.mts.map +1 -1
  23. package/dist/builders/cli/extensionAssembler/index.mjs +53 -41
  24. package/dist/builders/cli/extensionAssembler/index.mjs.map +1 -1
  25. package/dist/catalog/index.json +662 -105
  26. package/dist/cli.cjs +9 -14
  27. package/dist/cli.d.mts +1 -3
  28. package/dist/cli.mjs +1 -3
  29. package/dist/commands.cjs +13 -15
  30. package/dist/commands.d.mts +1 -2
  31. package/dist/commands.mjs +1 -2
  32. package/dist/config.cjs +9 -14
  33. package/dist/config.d.mts +3 -2
  34. package/dist/config.mjs +3 -2
  35. package/dist/extensions/server.cjs +30 -23
  36. package/dist/extensions/server.cjs.map +1 -1
  37. package/dist/extensions/server.d.mts.map +1 -1
  38. package/dist/extensions/server.mjs +31 -24
  39. package/dist/extensions/server.mjs.map +1 -1
  40. package/dist/harnessContext.cjs +0 -1
  41. package/dist/harnessContext.d.mts +2 -2
  42. package/dist/harnessContext.mjs +1 -1
  43. package/dist/harnessState.cjs +2 -1
  44. package/dist/help.cjs +9 -11
  45. package/dist/help.d.mts +1 -2
  46. package/dist/help.mjs +1 -2
  47. package/dist/index.cjs +40 -67
  48. package/dist/index.d.mts +7 -16
  49. package/dist/index.mjs +7 -14
  50. package/dist/locales/vi.cjs +218 -0
  51. package/dist/locales/vi.cjs.map +1 -0
  52. package/dist/locales/vi.mjs +213 -0
  53. package/dist/locales/vi.mjs.map +1 -0
  54. package/dist/locales/zh-CN.cjs +218 -0
  55. package/dist/locales/zh-CN.cjs.map +1 -0
  56. package/dist/locales/zh-CN.mjs +213 -0
  57. package/dist/locales/zh-CN.mjs.map +1 -0
  58. package/dist/matrixOptions.cjs +10 -5
  59. package/dist/matrixOptions.d.mts +2 -2
  60. package/dist/matrixOptions.mjs +1 -1
  61. package/dist/package.cjs +11 -0
  62. package/dist/package.cjs.map +1 -0
  63. package/dist/package.mjs +6 -0
  64. package/dist/package.mjs.map +1 -0
  65. package/dist/projectTrust.cjs +3 -0
  66. package/dist/projectTrust.d.mts +2 -2
  67. package/dist/projectTrust.mjs +1 -1
  68. package/dist/repository.cjs +1 -0
  69. package/dist/repository.d.mts +2 -2
  70. package/dist/repository.mjs +1 -1
  71. package/dist/services.cjs +5 -20
  72. package/dist/services.d.mts +3 -8
  73. package/dist/services.mjs +3 -8
  74. package/dist/shared.cjs +4 -17
  75. package/dist/shared.d.mts +2 -2
  76. package/dist/shared.mjs +1 -1
  77. package/dist/src/bin/agentDirectory.cjs +19 -15
  78. package/dist/src/bin/agentDirectory.cjs.map +1 -1
  79. package/dist/src/bin/agentDirectory.mjs +16 -13
  80. package/dist/src/bin/agentDirectory.mjs.map +1 -1
  81. package/dist/src/builders/apiContractExport/index.cjs +23 -22
  82. package/dist/src/builders/apiContractExport/index.cjs.map +1 -1
  83. package/dist/src/builders/apiContractExport/index.mjs +22 -21
  84. package/dist/src/builders/apiContractExport/index.mjs.map +1 -1
  85. package/dist/src/builders/cli/entryResolution.cjs +2 -2
  86. package/dist/src/builders/cli/entryResolution.cjs.map +1 -1
  87. package/dist/src/builders/cli/entryResolution.mjs +1 -1
  88. package/dist/src/builders/cli/entryResolution.mjs.map +1 -1
  89. package/dist/src/builders/cli/harnessContext.cjs +38 -43
  90. package/dist/src/builders/cli/harnessContext.cjs.map +1 -1
  91. package/dist/src/builders/cli/harnessContext.d.mts +11 -10
  92. package/dist/src/builders/cli/harnessContext.d.mts.map +1 -1
  93. package/dist/src/builders/cli/harnessContext.mjs +37 -41
  94. package/dist/src/builders/cli/harnessContext.mjs.map +1 -1
  95. package/dist/src/builders/cli/sessionComposition.cjs +23 -12
  96. package/dist/src/builders/cli/sessionComposition.cjs.map +1 -1
  97. package/dist/src/builders/cli/sessionComposition.mjs +23 -12
  98. package/dist/src/builders/cli/sessionComposition.mjs.map +1 -1
  99. package/dist/src/builders/isolate/compile.cjs +226 -0
  100. package/dist/src/builders/isolate/compile.cjs.map +1 -0
  101. package/dist/src/builders/isolate/compile.mjs +222 -0
  102. package/dist/src/builders/isolate/compile.mjs.map +1 -0
  103. package/dist/src/builders/isolate/index.cjs +195 -0
  104. package/dist/src/builders/isolate/index.cjs.map +1 -0
  105. package/dist/src/builders/isolate/index.mjs +192 -0
  106. package/dist/src/builders/isolate/index.mjs.map +1 -0
  107. package/dist/src/builders/isolate/membrane.cjs +198 -0
  108. package/dist/src/builders/isolate/membrane.cjs.map +1 -0
  109. package/dist/src/builders/isolate/membrane.mjs +198 -0
  110. package/dist/src/builders/isolate/membrane.mjs.map +1 -0
  111. package/dist/src/builders/isolate/names.cjs +10 -0
  112. package/dist/src/builders/isolate/names.cjs.map +1 -0
  113. package/dist/src/builders/isolate/names.mjs +9 -0
  114. package/dist/src/builders/isolate/names.mjs.map +1 -0
  115. package/dist/src/builders/native/index.cjs +229 -67
  116. package/dist/src/builders/native/index.cjs.map +1 -1
  117. package/dist/src/builders/native/index.d.mts +4 -2
  118. package/dist/src/builders/native/index.d.mts.map +1 -1
  119. package/dist/src/builders/native/index.mjs +229 -68
  120. package/dist/src/builders/native/index.mjs.map +1 -1
  121. package/dist/src/builders/npm/index.cjs +76 -0
  122. package/dist/src/builders/npm/index.cjs.map +1 -0
  123. package/dist/src/builders/npm/index.mjs +73 -0
  124. package/dist/src/builders/npm/index.mjs.map +1 -0
  125. package/dist/src/builders/server/backgroundSync.cjs +62 -39
  126. package/dist/src/builders/server/backgroundSync.cjs.map +1 -1
  127. package/dist/src/builders/server/backgroundSync.mjs +62 -38
  128. package/dist/src/builders/server/backgroundSync.mjs.map +1 -1
  129. package/dist/src/builders/server/bundlerService.cjs +165 -35
  130. package/dist/src/builders/server/bundlerService.cjs.map +1 -1
  131. package/dist/src/builders/server/bundlerService.mjs +164 -36
  132. package/dist/src/builders/server/bundlerService.mjs.map +1 -1
  133. package/dist/src/builders/server/capabilities.cjs +103 -0
  134. package/dist/src/builders/server/capabilities.cjs.map +1 -0
  135. package/dist/src/builders/server/capabilities.mjs +101 -0
  136. package/dist/src/builders/server/capabilities.mjs.map +1 -0
  137. package/dist/src/builders/server/computerUseBinding.cjs +62 -10
  138. package/dist/src/builders/server/computerUseBinding.cjs.map +1 -1
  139. package/dist/src/builders/server/computerUseBinding.mjs +60 -8
  140. package/dist/src/builders/server/computerUseBinding.mjs.map +1 -1
  141. package/dist/src/builders/server/computerUseRecordings.cjs +152 -51
  142. package/dist/src/builders/server/computerUseRecordings.cjs.map +1 -1
  143. package/dist/src/builders/server/computerUseRecordings.mjs +158 -59
  144. package/dist/src/builders/server/computerUseRecordings.mjs.map +1 -1
  145. package/dist/src/builders/server/containedSessions.cjs +152 -0
  146. package/dist/src/builders/server/containedSessions.cjs.map +1 -0
  147. package/dist/src/builders/server/containedSessions.mjs +146 -0
  148. package/dist/src/builders/server/containedSessions.mjs.map +1 -0
  149. package/dist/src/builders/server/defaultWorkspace.cjs +46 -11
  150. package/dist/src/builders/server/defaultWorkspace.cjs.map +1 -1
  151. package/dist/src/builders/server/defaultWorkspace.mjs +42 -10
  152. package/dist/src/builders/server/defaultWorkspace.mjs.map +1 -1
  153. package/dist/src/builders/server/electronBinding.cjs +82 -0
  154. package/dist/src/builders/server/electronBinding.cjs.map +1 -0
  155. package/dist/src/builders/server/electronBinding.mjs +82 -0
  156. package/dist/src/builders/server/electronBinding.mjs.map +1 -0
  157. package/dist/src/builders/server/federation.cjs +364 -0
  158. package/dist/src/builders/server/federation.cjs.map +1 -0
  159. package/dist/src/builders/server/federation.mjs +363 -0
  160. package/dist/src/builders/server/federation.mjs.map +1 -0
  161. package/dist/src/builders/server/hostDisplayName.cjs +14 -0
  162. package/dist/src/builders/server/hostDisplayName.cjs.map +1 -0
  163. package/dist/src/builders/server/hostDisplayName.mjs +14 -0
  164. package/dist/src/builders/server/hostDisplayName.mjs.map +1 -0
  165. package/dist/src/builders/server/hostModelGateway.cjs +41 -0
  166. package/dist/src/builders/server/hostModelGateway.cjs.map +1 -0
  167. package/dist/src/builders/server/hostModelGateway.mjs +39 -0
  168. package/dist/src/builders/server/hostModelGateway.mjs.map +1 -0
  169. package/dist/src/builders/server/hostTeam.cjs +188 -0
  170. package/dist/src/builders/server/hostTeam.cjs.map +1 -0
  171. package/dist/src/builders/server/hostTeam.mjs +180 -0
  172. package/dist/src/builders/server/hostTeam.mjs.map +1 -0
  173. package/dist/src/builders/server/idleRestart.cjs +185 -40
  174. package/dist/src/builders/server/idleRestart.cjs.map +1 -1
  175. package/dist/src/builders/server/idleRestart.mjs +176 -39
  176. package/dist/src/builders/server/idleRestart.mjs.map +1 -1
  177. package/dist/src/builders/server/index.cjs +58 -19
  178. package/dist/src/builders/server/index.cjs.map +1 -1
  179. package/dist/src/builders/server/index.mjs +57 -19
  180. package/dist/src/builders/server/index.mjs.map +1 -1
  181. package/dist/src/builders/server/liveActivityPush.cjs +202 -0
  182. package/dist/src/builders/server/liveActivityPush.cjs.map +1 -0
  183. package/dist/src/builders/server/liveActivityPush.mjs +202 -0
  184. package/dist/src/builders/server/liveActivityPush.mjs.map +1 -0
  185. package/dist/src/builders/server/logSink.cjs +12 -10
  186. package/dist/src/builders/server/logSink.cjs.map +1 -1
  187. package/dist/src/builders/server/logSink.mjs +12 -10
  188. package/dist/src/builders/server/logSink.mjs.map +1 -1
  189. package/dist/src/builders/server/mcpApp.cjs +27 -20
  190. package/dist/src/builders/server/mcpApp.cjs.map +1 -1
  191. package/dist/src/builders/server/mcpApp.mjs +25 -18
  192. package/dist/src/builders/server/mcpApp.mjs.map +1 -1
  193. package/dist/src/builders/server/mcpAppBuild.cjs +61 -41
  194. package/dist/src/builders/server/mcpAppBuild.cjs.map +1 -1
  195. package/dist/src/builders/server/mcpAppBuild.d.mts +3 -6
  196. package/dist/src/builders/server/mcpAppBuild.d.mts.map +1 -1
  197. package/dist/src/builders/server/mcpAppBuild.mjs +61 -40
  198. package/dist/src/builders/server/mcpAppBuild.mjs.map +1 -1
  199. package/dist/src/builders/server/mcpBundle.cjs +20 -16
  200. package/dist/src/builders/server/mcpBundle.cjs.map +1 -1
  201. package/dist/src/builders/server/mcpBundle.d.mts +2 -1
  202. package/dist/src/builders/server/mcpBundle.d.mts.map +1 -1
  203. package/dist/src/builders/server/mcpBundle.mjs +20 -15
  204. package/dist/src/builders/server/mcpBundle.mjs.map +1 -1
  205. package/dist/src/builders/server/nativePush.cjs +229 -0
  206. package/dist/src/builders/server/nativePush.cjs.map +1 -0
  207. package/dist/src/builders/server/nativePush.mjs +228 -0
  208. package/dist/src/builders/server/nativePush.mjs.map +1 -0
  209. package/dist/src/builders/server/network.cjs +887 -0
  210. package/dist/src/builders/server/network.cjs.map +1 -0
  211. package/dist/src/builders/server/network.mjs +886 -0
  212. package/dist/src/builders/server/network.mjs.map +1 -0
  213. package/dist/src/builders/server/networkGateway.cjs +123 -0
  214. package/dist/src/builders/server/networkGateway.cjs.map +1 -0
  215. package/dist/src/builders/server/networkGateway.mjs +123 -0
  216. package/dist/src/builders/server/networkGateway.mjs.map +1 -0
  217. package/dist/src/builders/server/networkRelay.cjs +83 -0
  218. package/dist/src/builders/server/networkRelay.cjs.map +1 -0
  219. package/dist/src/builders/server/networkRelay.mjs +81 -0
  220. package/dist/src/builders/server/networkRelay.mjs.map +1 -0
  221. package/dist/src/builders/server/orgPluginLibraryBinding.cjs +72 -0
  222. package/dist/src/builders/server/orgPluginLibraryBinding.cjs.map +1 -0
  223. package/dist/src/builders/server/orgPluginLibraryBinding.mjs +72 -0
  224. package/dist/src/builders/server/orgPluginLibraryBinding.mjs.map +1 -0
  225. package/dist/src/builders/server/packageReloadCheck.cjs +46 -2
  226. package/dist/src/builders/server/packageReloadCheck.cjs.map +1 -1
  227. package/dist/src/builders/server/packageReloadCheck.mjs +46 -3
  228. package/dist/src/builders/server/packageReloadCheck.mjs.map +1 -1
  229. package/dist/src/builders/server/packageUrl.cjs +161 -58
  230. package/dist/src/builders/server/packageUrl.cjs.map +1 -1
  231. package/dist/src/builders/server/packageUrl.mjs +162 -58
  232. package/dist/src/builders/server/packageUrl.mjs.map +1 -1
  233. package/dist/src/builders/server/privateRelay.cjs +309 -0
  234. package/dist/src/builders/server/privateRelay.cjs.map +1 -0
  235. package/dist/src/builders/server/privateRelay.mjs +305 -0
  236. package/dist/src/builders/server/privateRelay.mjs.map +1 -0
  237. package/dist/src/builders/server/privateRelayCarrier.cjs +316 -0
  238. package/dist/src/builders/server/privateRelayCarrier.cjs.map +1 -0
  239. package/dist/src/builders/server/privateRelayCarrier.mjs +309 -0
  240. package/dist/src/builders/server/privateRelayCarrier.mjs.map +1 -0
  241. package/dist/src/builders/server/runtime.cjs +2750 -486
  242. package/dist/src/builders/server/runtime.cjs.map +1 -1
  243. package/dist/src/builders/server/runtime.mjs +2760 -500
  244. package/dist/src/builders/server/runtime.mjs.map +1 -1
  245. package/dist/src/builders/server/runtimeResources.cjs +37 -0
  246. package/dist/src/builders/server/runtimeResources.cjs.map +1 -1
  247. package/dist/src/builders/server/runtimeResources.mjs +38 -2
  248. package/dist/src/builders/server/runtimeResources.mjs.map +1 -1
  249. package/dist/src/builders/server/sandboxRouter.cjs +815 -0
  250. package/dist/src/builders/server/sandboxRouter.cjs.map +1 -0
  251. package/dist/src/builders/server/sandboxRouter.mjs +811 -0
  252. package/dist/src/builders/server/sandboxRouter.mjs.map +1 -0
  253. package/dist/src/builders/server/sandboxSessionHandoff.cjs +298 -0
  254. package/dist/src/builders/server/sandboxSessionHandoff.cjs.map +1 -0
  255. package/dist/src/builders/server/sandboxSessionHandoff.mjs +287 -0
  256. package/dist/src/builders/server/sandboxSessionHandoff.mjs.map +1 -0
  257. package/dist/src/builders/server/scopeReloadController.cjs +80 -0
  258. package/dist/src/builders/server/scopeReloadController.cjs.map +1 -0
  259. package/dist/src/builders/server/scopeReloadController.mjs +80 -0
  260. package/dist/src/builders/server/scopeReloadController.mjs.map +1 -0
  261. package/dist/src/builders/server/selectionStatus.cjs +2 -2
  262. package/dist/src/builders/server/selectionStatus.cjs.map +1 -1
  263. package/dist/src/builders/server/selectionStatus.mjs +2 -2
  264. package/dist/src/builders/server/selectionStatus.mjs.map +1 -1
  265. package/dist/src/builders/server/sessionArguments.cjs +65 -7
  266. package/dist/src/builders/server/sessionArguments.cjs.map +1 -1
  267. package/dist/src/builders/server/sessionArguments.mjs +64 -8
  268. package/dist/src/builders/server/sessionArguments.mjs.map +1 -1
  269. package/dist/src/builders/server/sessionRemoval.cjs +233 -0
  270. package/dist/src/builders/server/sessionRemoval.cjs.map +1 -0
  271. package/dist/src/builders/server/sessionRemoval.mjs +224 -0
  272. package/dist/src/builders/server/sessionRemoval.mjs.map +1 -0
  273. package/dist/src/builders/server/sessionSummaries.cjs +32 -0
  274. package/dist/src/builders/server/sessionSummaries.cjs.map +1 -0
  275. package/dist/src/builders/server/sessionSummaries.mjs +31 -0
  276. package/dist/src/builders/server/sessionSummaries.mjs.map +1 -0
  277. package/dist/src/builders/server/shutdown.cjs +23 -0
  278. package/dist/src/builders/server/shutdown.cjs.map +1 -1
  279. package/dist/src/builders/server/shutdown.mjs +21 -1
  280. package/dist/src/builders/server/shutdown.mjs.map +1 -1
  281. package/dist/src/builders/server/shutdownStack.cjs +44 -0
  282. package/dist/src/builders/server/shutdownStack.cjs.map +1 -0
  283. package/dist/src/builders/server/shutdownStack.mjs +43 -0
  284. package/dist/src/builders/server/shutdownStack.mjs.map +1 -0
  285. package/dist/src/builders/server/toolBoundaryHold.cjs +55 -0
  286. package/dist/src/builders/server/toolBoundaryHold.cjs.map +1 -0
  287. package/dist/src/builders/server/toolBoundaryHold.mjs +55 -0
  288. package/dist/src/builders/server/toolBoundaryHold.mjs.map +1 -0
  289. package/dist/src/builders/server/watcherService.cjs +55 -28
  290. package/dist/src/builders/server/watcherService.cjs.map +1 -1
  291. package/dist/src/builders/server/watcherService.mjs +55 -27
  292. package/dist/src/builders/server/watcherService.mjs.map +1 -1
  293. package/dist/src/builders/server/webTemplateDecision.cjs +7 -3
  294. package/dist/src/builders/server/webTemplateDecision.cjs.map +1 -1
  295. package/dist/src/builders/server/webTemplateDecision.mjs +7 -3
  296. package/dist/src/builders/server/webTemplateDecision.mjs.map +1 -1
  297. package/dist/src/builders/server/workspaceAdmission.cjs +96 -0
  298. package/dist/src/builders/server/workspaceAdmission.cjs.map +1 -0
  299. package/dist/src/builders/server/workspaceAdmission.mjs +90 -0
  300. package/dist/src/builders/server/workspaceAdmission.mjs.map +1 -0
  301. package/dist/src/builders/server/workspaceCheckout.cjs +16 -7
  302. package/dist/src/builders/server/workspaceCheckout.cjs.map +1 -1
  303. package/dist/src/builders/server/workspaceCheckout.mjs +16 -7
  304. package/dist/src/builders/server/workspaceCheckout.mjs.map +1 -1
  305. package/dist/src/builders/web/bundle.cjs +16 -14
  306. package/dist/src/builders/web/bundle.cjs.map +1 -1
  307. package/dist/src/builders/web/bundle.d.mts +3 -0
  308. package/dist/src/builders/web/bundle.d.mts.map +1 -1
  309. package/dist/src/builders/web/bundle.mjs +15 -13
  310. package/dist/src/builders/web/bundle.mjs.map +1 -1
  311. package/dist/src/builders/web/index.cjs +92 -59
  312. package/dist/src/builders/web/index.cjs.map +1 -1
  313. package/dist/src/builders/web/index.d.mts +21 -14
  314. package/dist/src/builders/web/index.d.mts.map +1 -1
  315. package/dist/src/builders/web/index.mjs +91 -59
  316. package/dist/src/builders/web/index.mjs.map +1 -1
  317. package/dist/src/builders/web/webPluginGenerate.cjs +84 -45
  318. package/dist/src/builders/web/webPluginGenerate.cjs.map +1 -1
  319. package/dist/src/builders/web/webPluginGenerate.d.mts +13 -4
  320. package/dist/src/builders/web/webPluginGenerate.d.mts.map +1 -1
  321. package/dist/src/builders/web/webPluginGenerate.mjs +82 -44
  322. package/dist/src/builders/web/webPluginGenerate.mjs.map +1 -1
  323. package/dist/src/builders/web/webPluginManifest.cjs +24 -17
  324. package/dist/src/builders/web/webPluginManifest.cjs.map +1 -1
  325. package/dist/src/builders/web/webPluginManifest.d.mts +11 -23
  326. package/dist/src/builders/web/webPluginManifest.d.mts.map +1 -1
  327. package/dist/src/builders/web/webPluginManifest.mjs +23 -16
  328. package/dist/src/builders/web/webPluginManifest.mjs.map +1 -1
  329. package/dist/src/builders/web/webPluginScan.cjs +11 -8
  330. package/dist/src/builders/web/webPluginScan.cjs.map +1 -1
  331. package/dist/src/builders/web/webPluginScan.d.mts +1 -1
  332. package/dist/src/builders/web/webPluginScan.d.mts.map +1 -1
  333. package/dist/src/builders/web/webPluginScan.mjs +10 -7
  334. package/dist/src/builders/web/webPluginScan.mjs.map +1 -1
  335. package/dist/src/builders/web/webPluginVite.cjs +5 -5
  336. package/dist/src/builders/web/webPluginVite.cjs.map +1 -1
  337. package/dist/src/builders/web/webPluginVite.d.mts +1 -1
  338. package/dist/src/builders/web/webPluginVite.d.mts.map +1 -1
  339. package/dist/src/builders/web/webPluginVite.mjs +3 -3
  340. package/dist/src/builders/web/webPluginVite.mjs.map +1 -1
  341. package/dist/src/cli/cliApp.cjs +18 -19
  342. package/dist/src/cli/cliApp.cjs.map +1 -1
  343. package/dist/src/cli/cliApp.d.mts +1 -1
  344. package/dist/src/cli/cliApp.d.mts.map +1 -1
  345. package/dist/src/cli/cliApp.mjs +18 -19
  346. package/dist/src/cli/cliApp.mjs.map +1 -1
  347. package/dist/src/cli/commands/api-export/index.cjs +14 -13
  348. package/dist/src/cli/commands/api-export/index.cjs.map +1 -1
  349. package/dist/src/cli/commands/api-export/index.mjs +13 -12
  350. package/dist/src/cli/commands/api-export/index.mjs.map +1 -1
  351. package/dist/src/cli/commands/doctor/help.cjs +4 -3
  352. package/dist/src/cli/commands/doctor/help.cjs.map +1 -1
  353. package/dist/src/cli/commands/doctor/help.d.mts.map +1 -1
  354. package/dist/src/cli/commands/doctor/help.mjs +4 -3
  355. package/dist/src/cli/commands/doctor/help.mjs.map +1 -1
  356. package/dist/src/cli/commands/doctor/index.cjs +30 -17
  357. package/dist/src/cli/commands/doctor/index.cjs.map +1 -1
  358. package/dist/src/cli/commands/doctor/index.d.mts +4 -4
  359. package/dist/src/cli/commands/doctor/index.d.mts.map +1 -1
  360. package/dist/src/cli/commands/doctor/index.mjs +28 -15
  361. package/dist/src/cli/commands/doctor/index.mjs.map +1 -1
  362. package/dist/src/cli/commands/emit-mcp/index.cjs +3 -2
  363. package/dist/src/cli/commands/emit-mcp/index.cjs.map +1 -1
  364. package/dist/src/cli/commands/emit-mcp/index.d.mts.map +1 -1
  365. package/dist/src/cli/commands/emit-mcp/index.mjs +3 -2
  366. package/dist/src/cli/commands/emit-mcp/index.mjs.map +1 -1
  367. package/dist/src/cli/commands/explain/index.cjs +53 -38
  368. package/dist/src/cli/commands/explain/index.cjs.map +1 -1
  369. package/dist/src/cli/commands/explain/index.d.mts +3 -4
  370. package/dist/src/cli/commands/explain/index.d.mts.map +1 -1
  371. package/dist/src/cli/commands/explain/index.mjs +52 -37
  372. package/dist/src/cli/commands/explain/index.mjs.map +1 -1
  373. package/dist/src/cli/commands/init/help.cjs +3 -2
  374. package/dist/src/cli/commands/init/help.cjs.map +1 -1
  375. package/dist/src/cli/commands/init/help.d.mts.map +1 -1
  376. package/dist/src/cli/commands/init/help.mjs +3 -2
  377. package/dist/src/cli/commands/init/help.mjs.map +1 -1
  378. package/dist/src/cli/commands/init/index.cjs +17 -12
  379. package/dist/src/cli/commands/init/index.cjs.map +1 -1
  380. package/dist/src/cli/commands/init/index.d.mts.map +1 -1
  381. package/dist/src/cli/commands/init/index.mjs +16 -11
  382. package/dist/src/cli/commands/init/index.mjs.map +1 -1
  383. package/dist/src/cli/commands/init/presenter.cjs +29 -21
  384. package/dist/src/cli/commands/init/presenter.cjs.map +1 -1
  385. package/dist/src/cli/commands/init/presenter.mjs +29 -21
  386. package/dist/src/cli/commands/init/presenter.mjs.map +1 -1
  387. package/dist/src/cli/commands/sync/help.cjs +7 -3
  388. package/dist/src/cli/commands/sync/help.cjs.map +1 -1
  389. package/dist/src/cli/commands/sync/help.d.mts.map +1 -1
  390. package/dist/src/cli/commands/sync/help.mjs +7 -3
  391. package/dist/src/cli/commands/sync/help.mjs.map +1 -1
  392. package/dist/src/cli/commands/sync/index.cjs +72 -40
  393. package/dist/src/cli/commands/sync/index.cjs.map +1 -1
  394. package/dist/src/cli/commands/sync/index.d.mts.map +1 -1
  395. package/dist/src/cli/commands/sync/index.mjs +69 -37
  396. package/dist/src/cli/commands/sync/index.mjs.map +1 -1
  397. package/dist/src/cli/commands/sync/presenter.cjs +10 -1
  398. package/dist/src/cli/commands/sync/presenter.cjs.map +1 -1
  399. package/dist/src/cli/commands/sync/presenter.d.mts +0 -9
  400. package/dist/src/cli/commands/sync/presenter.d.mts.map +1 -1
  401. package/dist/src/cli/commands/sync/presenter.mjs +10 -1
  402. package/dist/src/cli/commands/sync/presenter.mjs.map +1 -1
  403. package/dist/src/cli/commands/web/index.cjs +7 -6
  404. package/dist/src/cli/commands/web/index.cjs.map +1 -1
  405. package/dist/src/cli/commands/web/index.mjs +6 -5
  406. package/dist/src/cli/commands/web/index.mjs.map +1 -1
  407. package/dist/src/cli/harnessOptions.cjs +15 -24
  408. package/dist/src/cli/harnessOptions.cjs.map +1 -1
  409. package/dist/src/cli/harnessOptions.d.mts +2 -2
  410. package/dist/src/cli/harnessOptions.d.mts.map +1 -1
  411. package/dist/src/cli/harnessOptions.mjs +14 -22
  412. package/dist/src/cli/harnessOptions.mjs.map +1 -1
  413. package/dist/src/cli/help.cjs +20 -26
  414. package/dist/src/cli/help.cjs.map +1 -1
  415. package/dist/src/cli/help.d.mts +1 -2
  416. package/dist/src/cli/help.d.mts.map +1 -1
  417. package/dist/src/cli/help.mjs +15 -20
  418. package/dist/src/cli/help.mjs.map +1 -1
  419. package/dist/src/cli/locale.cjs +30 -0
  420. package/dist/src/cli/locale.cjs.map +1 -0
  421. package/dist/src/cli/locale.mjs +27 -0
  422. package/dist/src/cli/locale.mjs.map +1 -0
  423. package/dist/src/cli/matrixOptions.cjs +85 -37
  424. package/dist/src/cli/matrixOptions.cjs.map +1 -1
  425. package/dist/src/cli/matrixOptions.d.mts +22 -16
  426. package/dist/src/cli/matrixOptions.d.mts.map +1 -1
  427. package/dist/src/cli/matrixOptions.mjs +76 -33
  428. package/dist/src/cli/matrixOptions.mjs.map +1 -1
  429. package/dist/src/cli/options.cjs +51 -128
  430. package/dist/src/cli/options.cjs.map +1 -1
  431. package/dist/src/cli/options.d.mts +1 -1
  432. package/dist/src/cli/options.d.mts.map +1 -1
  433. package/dist/src/cli/options.mjs +53 -130
  434. package/dist/src/cli/options.mjs.map +1 -1
  435. package/dist/src/cli/router.cjs +0 -1
  436. package/dist/src/cli/router.cjs.map +1 -1
  437. package/dist/src/cli/router.d.mts +1 -1
  438. package/dist/src/cli/router.mjs +0 -1
  439. package/dist/src/cli/router.mjs.map +1 -1
  440. package/dist/src/cli/server/options.cjs +37 -7
  441. package/dist/src/cli/server/options.cjs.map +1 -1
  442. package/dist/src/cli/server/options.mjs +37 -7
  443. package/dist/src/cli/server/options.mjs.map +1 -1
  444. package/dist/src/cli/server/processGuards.cjs +22 -15
  445. package/dist/src/cli/server/processGuards.cjs.map +1 -1
  446. package/dist/src/cli/server/processGuards.mjs +21 -14
  447. package/dist/src/cli/server/processGuards.mjs.map +1 -1
  448. package/dist/src/cli/server/restartPolicy.cjs +38 -0
  449. package/dist/src/cli/server/restartPolicy.cjs.map +1 -0
  450. package/dist/src/cli/server/restartPolicy.d.mts +21 -0
  451. package/dist/src/cli/server/restartPolicy.d.mts.map +1 -0
  452. package/dist/src/cli/server/restartPolicy.mjs +36 -0
  453. package/dist/src/cli/server/restartPolicy.mjs.map +1 -0
  454. package/dist/src/cli/server/run.cjs +12 -11
  455. package/dist/src/cli/server/run.cjs.map +1 -1
  456. package/dist/src/cli/server/run.mjs +11 -10
  457. package/dist/src/cli/server/run.mjs.map +1 -1
  458. package/dist/src/cli/server/supervise.cjs +89 -0
  459. package/dist/src/cli/server/supervise.cjs.map +1 -0
  460. package/dist/src/cli/server/supervise.mjs +89 -0
  461. package/dist/src/cli/server/supervise.mjs.map +1 -0
  462. package/dist/src/composition/harnessState/index.cjs +2 -1
  463. package/dist/src/composition/harnessState/index.cjs.map +1 -1
  464. package/dist/src/composition/harnessState/index.d.mts +2 -1
  465. package/dist/src/composition/harnessState/index.d.mts.map +1 -1
  466. package/dist/src/composition/harnessState/index.mjs +2 -1
  467. package/dist/src/composition/harnessState/index.mjs.map +1 -1
  468. package/dist/src/composition/layerPackageInstaller/index.cjs +293 -86
  469. package/dist/src/composition/layerPackageInstaller/index.cjs.map +1 -1
  470. package/dist/src/composition/layerPackageInstaller/index.d.mts +25 -2
  471. package/dist/src/composition/layerPackageInstaller/index.d.mts.map +1 -1
  472. package/dist/src/composition/layerPackageInstaller/index.mjs +295 -94
  473. package/dist/src/composition/layerPackageInstaller/index.mjs.map +1 -1
  474. package/dist/src/composition/marketplaceCatalog/index.cjs +136 -0
  475. package/dist/src/composition/marketplaceCatalog/index.cjs.map +1 -0
  476. package/dist/src/composition/marketplaceCatalog/index.mjs +132 -0
  477. package/dist/src/composition/marketplaceCatalog/index.mjs.map +1 -0
  478. package/dist/src/composition/orgPluginActivation/index.cjs +179 -0
  479. package/dist/src/composition/orgPluginActivation/index.cjs.map +1 -0
  480. package/dist/src/composition/orgPluginActivation/index.mjs +177 -0
  481. package/dist/src/composition/orgPluginActivation/index.mjs.map +1 -0
  482. package/dist/src/composition/orgPluginLibrary/index.cjs +205 -0
  483. package/dist/src/composition/orgPluginLibrary/index.cjs.map +1 -0
  484. package/dist/src/composition/orgPluginLibrary/index.mjs +200 -0
  485. package/dist/src/composition/orgPluginLibrary/index.mjs.map +1 -0
  486. package/dist/src/composition/pluginMarketplace/index.cjs +304 -0
  487. package/dist/src/composition/pluginMarketplace/index.cjs.map +1 -0
  488. package/dist/src/composition/pluginMarketplace/index.mjs +302 -0
  489. package/dist/src/composition/pluginMarketplace/index.mjs.map +1 -0
  490. package/dist/src/composition/poHomeMigration/index.cjs +46 -26
  491. package/dist/src/composition/poHomeMigration/index.cjs.map +1 -1
  492. package/dist/src/composition/poHomeMigration/index.d.mts.map +1 -1
  493. package/dist/src/composition/poHomeMigration/index.mjs +45 -25
  494. package/dist/src/composition/poHomeMigration/index.mjs.map +1 -1
  495. package/dist/src/composition/projectTrust/index.cjs +40 -3
  496. package/dist/src/composition/projectTrust/index.cjs.map +1 -1
  497. package/dist/src/composition/projectTrust/index.d.mts +8 -0
  498. package/dist/src/composition/projectTrust/index.d.mts.map +1 -1
  499. package/dist/src/composition/projectTrust/index.mjs +33 -2
  500. package/dist/src/composition/projectTrust/index.mjs.map +1 -1
  501. package/dist/src/composition/repository/index.cjs +29 -12
  502. package/dist/src/composition/repository/index.cjs.map +1 -1
  503. package/dist/src/composition/repository/index.d.mts +10 -3
  504. package/dist/src/composition/repository/index.d.mts.map +1 -1
  505. package/dist/src/composition/repository/index.mjs +29 -13
  506. package/dist/src/composition/repository/index.mjs.map +1 -1
  507. package/dist/src/composition/syncPrune/index.cjs +23 -16
  508. package/dist/src/composition/syncPrune/index.cjs.map +1 -1
  509. package/dist/src/composition/syncPrune/index.d.mts.map +1 -1
  510. package/dist/src/composition/syncPrune/index.mjs +22 -15
  511. package/dist/src/composition/syncPrune/index.mjs.map +1 -1
  512. package/dist/src/composition/syncService/index.cjs +441 -194
  513. package/dist/src/composition/syncService/index.cjs.map +1 -1
  514. package/dist/src/composition/syncService/index.d.mts +4 -1
  515. package/dist/src/composition/syncService/index.d.mts.map +1 -1
  516. package/dist/src/composition/syncService/index.mjs +440 -196
  517. package/dist/src/composition/syncService/index.mjs.map +1 -1
  518. package/dist/src/composition/syncService/localBuilds.cjs +41 -37
  519. package/dist/src/composition/syncService/localBuilds.cjs.map +1 -1
  520. package/dist/src/composition/syncService/localBuilds.mjs +40 -37
  521. package/dist/src/composition/syncService/localBuilds.mjs.map +1 -1
  522. package/dist/src/composition/transitionLayers.cjs.map +1 -1
  523. package/dist/src/composition/transitionLayers.d.mts +3 -3
  524. package/dist/src/composition/transitionLayers.d.mts.map +1 -1
  525. package/dist/src/composition/transitionLayers.mjs.map +1 -1
  526. package/dist/src/composition/types/harness.d.mts +4 -9
  527. package/dist/src/composition/types/harness.d.mts.map +1 -1
  528. package/dist/src/extensions/setupDiagnostics.cjs +8 -8
  529. package/dist/src/extensions/setupDiagnostics.cjs.map +1 -1
  530. package/dist/src/extensions/setupDiagnostics.mjs +8 -8
  531. package/dist/src/extensions/setupDiagnostics.mjs.map +1 -1
  532. package/dist/webBuilder.cjs +2 -0
  533. package/dist/webBuilder.d.mts +3 -3
  534. package/dist/webBuilder.mjs +3 -3
  535. package/docs/server/api-export.md +9 -9
  536. package/docs/server/api.md +22 -125
  537. package/docs/server/getting-started.md +21 -85
  538. package/docs/server/index.md +13 -58
  539. package/docs/server/ipc.md +26 -72
  540. package/docs/server/lifecycle.md +18 -91
  541. package/docs/server/security.md +20 -80
  542. package/locales/vi.json +208 -0
  543. package/locales/zh-CN.json +208 -0
  544. package/package.json +52 -69
  545. package/src/prompts/po-author-extension/SKILL.md +2 -2
  546. package/src/prompts/po-author-extension/references/extension-contract.md +4 -6
  547. package/dist/antigravity.cjs +0 -5
  548. package/dist/antigravity.d.mts +0 -2
  549. package/dist/antigravity.mjs +0 -1
  550. package/dist/codex.cjs +0 -8
  551. package/dist/codex.d.mts +0 -2
  552. package/dist/codex.mjs +0 -1
  553. package/dist/compatibility.cjs +0 -27
  554. package/dist/compatibility.d.mts +0 -6
  555. package/dist/compatibility.mjs +0 -6
  556. package/dist/compatibilityCommand.cjs +0 -4
  557. package/dist/compatibilityCommand.d.mts +0 -2
  558. package/dist/compatibilityCommand.mjs +0 -1
  559. package/dist/compatibilityContext.cjs +0 -3
  560. package/dist/compatibilityContext.d.mts +0 -2
  561. package/dist/compatibilityContext.mjs +0 -1
  562. package/dist/compatibilityOptions.cjs +0 -5
  563. package/dist/compatibilityOptions.d.mts +0 -2
  564. package/dist/compatibilityOptions.mjs +0 -1
  565. package/dist/process.cjs +0 -12
  566. package/dist/process.d.mts +0 -2
  567. package/dist/process.mjs +0 -1
  568. package/dist/src/builders/hooks/index.cjs +0 -238
  569. package/dist/src/builders/hooks/index.cjs.map +0 -1
  570. package/dist/src/builders/hooks/index.mjs +0 -231
  571. package/dist/src/builders/hooks/index.mjs.map +0 -1
  572. package/dist/src/cli/commands/compat/context.cjs +0 -115
  573. package/dist/src/cli/commands/compat/context.cjs.map +0 -1
  574. package/dist/src/cli/commands/compat/context.d.mts +0 -22
  575. package/dist/src/cli/commands/compat/context.d.mts.map +0 -1
  576. package/dist/src/cli/commands/compat/context.mjs +0 -110
  577. package/dist/src/cli/commands/compat/context.mjs.map +0 -1
  578. package/dist/src/cli/commands/compat/help.cjs +0 -26
  579. package/dist/src/cli/commands/compat/help.cjs.map +0 -1
  580. package/dist/src/cli/commands/compat/help.d.mts +0 -4
  581. package/dist/src/cli/commands/compat/help.d.mts.map +0 -1
  582. package/dist/src/cli/commands/compat/help.mjs +0 -25
  583. package/dist/src/cli/commands/compat/help.mjs.map +0 -1
  584. package/dist/src/cli/commands/compat/index.cjs +0 -73
  585. package/dist/src/cli/commands/compat/index.cjs.map +0 -1
  586. package/dist/src/cli/commands/compat/index.d.mts +0 -14
  587. package/dist/src/cli/commands/compat/index.d.mts.map +0 -1
  588. package/dist/src/cli/commands/compat/index.mjs +0 -70
  589. package/dist/src/cli/commands/compat/index.mjs.map +0 -1
  590. package/dist/src/cli/commands/compat/options.cjs +0 -88
  591. package/dist/src/cli/commands/compat/options.cjs.map +0 -1
  592. package/dist/src/cli/commands/compat/options.d.mts +0 -15
  593. package/dist/src/cli/commands/compat/options.d.mts.map +0 -1
  594. package/dist/src/cli/commands/compat/options.mjs +0 -86
  595. package/dist/src/cli/commands/compat/options.mjs.map +0 -1
  596. package/dist/src/cli/commands/compat/providers/antigravity.cjs +0 -294
  597. package/dist/src/cli/commands/compat/providers/antigravity.cjs.map +0 -1
  598. package/dist/src/cli/commands/compat/providers/antigravity.d.mts +0 -9
  599. package/dist/src/cli/commands/compat/providers/antigravity.d.mts.map +0 -1
  600. package/dist/src/cli/commands/compat/providers/antigravity.mjs +0 -289
  601. package/dist/src/cli/commands/compat/providers/antigravity.mjs.map +0 -1
  602. package/dist/src/cli/commands/compat/providers/codex.cjs +0 -178
  603. package/dist/src/cli/commands/compat/providers/codex.cjs.map +0 -1
  604. package/dist/src/cli/commands/compat/providers/codex.d.mts +0 -17
  605. package/dist/src/cli/commands/compat/providers/codex.d.mts.map +0 -1
  606. package/dist/src/cli/commands/compat/providers/codex.mjs +0 -170
  607. package/dist/src/cli/commands/compat/providers/codex.mjs.map +0 -1
  608. package/dist/src/cli/commands/compat/providers/index.cjs +0 -65
  609. package/dist/src/cli/commands/compat/providers/index.cjs.map +0 -1
  610. package/dist/src/cli/commands/compat/providers/index.d.mts +0 -15
  611. package/dist/src/cli/commands/compat/providers/index.d.mts.map +0 -1
  612. package/dist/src/cli/commands/compat/providers/index.mjs +0 -45
  613. package/dist/src/cli/commands/compat/providers/index.mjs.map +0 -1
  614. package/dist/src/cli/commands/compat/providers/process.cjs +0 -172
  615. package/dist/src/cli/commands/compat/providers/process.cjs.map +0 -1
  616. package/dist/src/cli/commands/compat/providers/process.d.mts +0 -33
  617. package/dist/src/cli/commands/compat/providers/process.d.mts.map +0 -1
  618. package/dist/src/cli/commands/compat/providers/process.mjs +0 -159
  619. package/dist/src/cli/commands/compat/providers/process.mjs.map +0 -1
  620. package/dist/src/cli/commands/compat/providers/shared.cjs +0 -76
  621. package/dist/src/cli/commands/compat/providers/shared.cjs.map +0 -1
  622. package/dist/src/cli/commands/compat/providers/shared.d.mts +0 -40
  623. package/dist/src/cli/commands/compat/providers/shared.d.mts.map +0 -1
  624. package/dist/src/cli/commands/compat/providers/shared.mjs +0 -61
  625. package/dist/src/cli/commands/compat/providers/shared.mjs.map +0 -1
  626. package/dist/src/cli/commands/compat/types.d.mts +0 -31
  627. package/dist/src/cli/commands/compat/types.d.mts.map +0 -1
  628. package/dist/src/cli/commands/init/constants.cjs +0 -11
  629. package/dist/src/cli/commands/init/constants.cjs.map +0 -1
  630. package/dist/src/cli/commands/init/constants.mjs +0 -11
  631. package/dist/src/cli/commands/init/constants.mjs.map +0 -1
@@ -1,93 +1,47 @@
1
- # Client protocol and in-process APIs
1
+ # Client protocol
2
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.
3
+ The headless host exposes authenticated HTTP routes and scoped WebSockets. Agent execution, package dispatch, and durable storage stay in that process; clients do not send raw shell commands over a private filesystem transport.
4
4
 
5
- ## The transport design
5
+ ## Route hierarchy
6
6
 
7
- ```text
8
- po-server
9
- |
10
- +------------------+------------------+
11
- | |
12
- v v
13
- HTTP control surface /api/ws WebSocket
14
- health, sessions, APIs Chord 1.3 objects
15
- | |
16
- +------------------+------------------+
17
- v
18
- DirectHarnessRuntime
19
- ```
7
+ | Scope | Resource | Package APIs | WebSocket |
8
+ | --------- | ------------------------------------------------------ | -------------------------------------------------------------------------- | --------------------------------------------------------- |
9
+ | Host | `/api/settings` | `/api/plugins/<base-path>` | `/api/ws` |
10
+ | Workspace | `/api/workspaces/<workspace-id>` | `/api/workspaces/<workspace-id>/plugins/<base-path>` | `/api/workspaces/<workspace-id>/ws` |
11
+ | Session | `/api/workspaces/<workspace-id>/sessions/<session-id>` | `/api/workspaces/<workspace-id>/sessions/<session-id>/plugins/<base-path>` | `/api/workspaces/<workspace-id>/sessions/<session-id>/ws` |
20
12
 
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.
13
+ Workspace settings use `/api/workspaces/<workspace-id>/settings`. Scope is fixed by the path. A session addressed through another workspace returns `404`; an unknown package does not fall back to a parent scope. Retired flat session routes, singular `/api/plugin`, and `/api/pi` have no aliases.
22
14
 
23
- ## HTTP routes
15
+ Admit a local workspace with `POST /api/workspaces` and a root, then create/list sessions under its `/sessions` collection. `POST /api/sessions` without a working directory creates a session in the host-managed Default workspace, admitting it on first use. These are local-host contracts; a cloud workspace does not accept a local repository root.
24
16
 
25
- The server exposes these client-neutral routes:
17
+ `GET /api/health` is a public readiness check. Normal control clients authenticate with `Authorization: Bearer <token>` or `x-po-token`. WebSocket clients can supply the capability in upgrade headers; avoid token query strings because URLs may be logged. Explicit package/public authentication routes have their own narrow policies.
26
18
 
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
- | `/api/workspaces/<workspace-id>/sessions/<id>/plugins/<base-path>/...` | Dispatch a session package API in process |
19
+ ## Typed WebSocket services
33
20
 
34
- 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.
21
+ The socket carries Chord link frames through Po's protocol adapter. Import client contracts from `@agimon-ai/po-core/sessionProtocol` rather than depending directly on a particular Chord version.
35
22
 
36
- The old raw command route is not part of this surface. Session control uses the typed protocol described below.
23
+ The host socket offers the aggregate hub view. Workspace/session sockets restrict attachments and operations to their addressed scope. Session objects expose typed prompting, steering, queue, model, compaction, rewind, extension-response, and query operations. The shared contracts and [compiled export](api-export.md) define the exact current methods and payloads.
37
24
 
38
- ## `/api/ws` protocol
25
+ A prompt can wait for acceptance or settlement. Acceptance is authoritative submission, not completion. Do not retry a mutation merely because its response was lost. Context cancellation and turn abort also have distinct ownership.
39
26
 
40
- `/api/ws` carries Chord 1.3 (link protocol v4) frames, one JSON text message each, over an already-authenticated WebSocket. Each socket is a client link stamped with its own connection principal. The server host is named `server` and serves these remote contracts:
27
+ ## State and history
41
28
 
42
- - `po.hub` (input `{}`) lists sessions, subscribes to channel events, sends typed channel operations, reads Home, and invokes plugin methods; and
43
- - `po.session` (input `{ sessionId }`) exposes one session's `state` and operations, plus `alive`, which turns false when the runtime behind it exits.
29
+ Replicated session state includes settings, lifecycle/live execution, queue, revision, and presentation projections. Durable transcript pages come from the SQLite session store; they are not reconstructed from WebSocket progress events.
44
30
 
45
- A client holds `po.session` for the session it shows. Every connection shares one projected runtime per session; the server checks the connection's scope and Desktop ownership before resolving the object and on every call. Clients use `attachHub` and `attachSession` from `@agimon-ai/po-core/sessionProtocol`.
31
+ A reconnect receives current service state. Presentation/event windows are bounded, and branch changes can invalidate old projections. Resnapshot or use typed queries on revision gaps and dropped-event indicators. Request transcript pages when history is needed; do not infer missing history from an empty live window.
46
32
 
47
- ## Typed session operations
33
+ ### Session recovery
48
34
 
49
- `po.session.v1` exposes:
35
+ `/api/health` signals that the host is listening, not that its bots have reopened. The host restores saved bot sessions after listen; concurrent Wake requests join the same open. A saved named profile must resolve and its provider must be ready before resumed work is admitted. Temporary dependency failures retry with capped backoff without holding up the rest of the boot queue. An unavailable profile that did not resolve after its catalog became ready stays dormant until corrected. The crash-loop pause still applies to automatic recovery; explicit Wake can retry.
50
36
 
51
- - `prompt`, with `waitFor: "accepted"` or `"settled"`;
52
- - `steer`, `followUp`, `abort`, and `clearQueue`;
53
- - `setModel`, `setThinking`, `compact`, and `setName`;
54
- - `rewind`, including optional summarization and instructions;
55
- - `extensionUiResponse`;
56
- - `getState`, `getSessionStats`, and `getCommands`; and
57
- - `getAvailableModels` and `getAvailableThinkingLevels`.
37
+ The hub authority owns startup attempts and phases. The Node host retains result joins, request reservations, workflow validation, durable records, retry timers (15 retries with a 30 second maximum delay), and the crash budget. Idle recycle checks the authority for open attempts.
58
38
 
59
- 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.
39
+ The `po/session/recovery` direct event, headless logs and `po_server.session_recovery` telemetry project the authority's recovery transitions: `opening`, `waiting_profile`, `waiting_provider`, `waiting_plugin`, `ready`, `failed`, `paused`, `stopping`, `dormant`, and `removed`. The direct event payload is `{ attemptId, trigger, phase, reason }`. A crash pause before any attempt uses attempt ID `0` and trigger `boot`. These describe recovery, not the bot's current turn. Events use fixed reason codes, not credentials or profile contents.
60
40
 
61
- 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.
41
+ `ready` means startup hooks and gates admitted resumed work. It may precede public hub registration, which can still fail. Use the hub's live session registration, not `ready` alone, to determine whether a session is live. Concurrent Wake requests continue joining the host's result until publication and dormant metadata replay finish.
62
42
 
63
- ## Replay and consistency
43
+ ## Package dispatch
64
44
 
65
- 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`.
45
+ The listener removes the full scope and package prefix before calling a package handler. For example, `/api/workspaces/w/sessions/s/plugins/runner/runners/r1/log` reaches `runner` as `/runners/r1/log`.
66
46
 
67
- 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.
68
-
69
- ## Session package APIs
70
-
71
- A package API is registered by a server plugin 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`.
72
-
73
- 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.
74
-
75
- ## Related guides
76
-
77
- - [Lifecycle](lifecycle.md) explains startup, readiness, and shutdown.
78
- - [Session APIs](api.md) defines descriptor loading and the TypeScript surface.
79
- - [Security](security.md) explains token validation, listener exposure, and trusted code.
80
-
81
- ## Scoped route hierarchy
82
-
83
- | Scope | REST resource | Package APIs | WebSocket |
84
- | --------- | ------------------------------------------------------ | ------------------------------------------------------------------------ | --------------------------------------------------------- |
85
- | Global | `/api/settings` | `/api/plugins/<package>` | `/api/ws` |
86
- | Workspace | `/api/workspaces/<workspace-id>` | `/api/workspaces/<workspace-id>/plugins/<package>` | `/api/workspaces/<workspace-id>/ws` |
87
- | 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` |
88
-
89
- 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`.
90
-
91
- 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.
92
-
93
- Startup loads global packages from the global root's live composition, workspace packages when that workspace is admitted, and session packages 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.
47
+ Handlers run with host-supplied scope and caller capabilities. A valid listener token does not validate an operation's body, constrain its file paths, or make it safe to return secrets. See [Package APIs](api.md) and [Security](security.md).
@@ -1,108 +1,35 @@
1
- # Session lifecycle
1
+ # Server lifecycle
2
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.
3
+ One `po-server` process can own host, workspace, and session scopes. Each has a Cordis root and disposal lifetime. Browser attachments are clients of those scopes, not owners of server plugin instances.
4
4
 
5
- `po-server` owns one session boundary from startup through shutdown. The Pi harness, session services, server plugins, 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.
5
+ ## Readiness
6
6
 
7
- ## The ownership model
7
+ Startup reads the private attach-token file, resolves the host configuration, loads prepared built entries, installs host packages, and creates the authenticated listener. Unless `--no-session` is set, it also creates an initial session runtime. Workspace admission and later session creation repeat the relevant scope's configuration, package, and readiness checks.
8
8
 
9
- ```text
10
- po-server process
11
- |
12
- +-- session manager and headless hub
13
- +-- DirectHarnessRuntime
14
- +-- typed management and session services
15
- +-- server plugin host and in-process API handlers
16
- +-- HTTP and WebSocket listener, including /api/ws
17
- +-- v4 JSONL session journal
18
- ```
9
+ Required selected-package failures block their scope; optional failures are reported. Admission never substitutes a different package directory or another workspace. Synchronization owns installation and shared builds, with automatic background requests where enabled. Inspect notices when prepared packages or artifacts are missing.
19
10
 
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.
11
+ Package startup and rollback follow the [core plugin lifecycle](https://github.com/AgiFlow/po/blob/main/packages/core/po-core/docs/plugins.md). Registrations and external work must have an owner, cleanup must tolerate partial startup, and cancellation must reach work that could otherwise hold readiness open.
21
12
 
22
- ## Startup is readiness-ordered
13
+ ## Durable state and reconnect
23
14
 
24
- The server publishes the listener only after the runtime and required server packages are ready:
15
+ The runtime writes authoritative history to the pi-durable SQLite session store. Live protocol state, in-flight output, and bounded presentation events support a connected client; they are not a second durable journal.
25
16
 
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 server plugins from built package entries
34
- |
35
- v
36
- create DirectHarnessRuntime and prepare the headless host
37
- |
38
- v
39
- activate server packages and initialize typed session services
40
- |
41
- v
42
- bind HTTP and /api/ws
43
- |
44
- v
45
- wait for the runtime
46
- ```
17
+ Reconnect reads current replicated state and transcript pages. Clients must account for gaps, dropped presentation events, and branch revisions rather than treating an event window as complete history. Use typed queries and pagination for authoritative transcript data.
47
18
 
48
- The executable performs these steps:
19
+ A browser can disconnect while work continues. Closing the server runtime, deleting a session, and closing a presentation process are different operations. Deleting session state does not remove arbitrary files written into a workspace.
49
20
 
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 packages. 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.
21
+ ## Code changes and selection
58
22
 
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.
23
+ Server packages import through content-addressed URLs. Rebuilding changes the identity available to new sessions, not modules already held by running sessions. Selection changes alter the active contributions among admitted candidates; they are not arbitrary imports of new code.
60
24
 
61
- ## Steady state
25
+ Host/workspace refresh checks replace changed builds and can retain a previous working build when a replacement fails. Explicit Help reload has separate retry/removal behavior. Do not assume that removing a package from configuration immediately disposes every existing mount, or that a browser refresh reloads the server.
62
26
 
63
- Once ready, the server holds a stable session boundary:
27
+ Shared package roots/resources can remain leased by inner scopes after an outer scope changes. Their final cleanup waits until the last owner releases them.
64
28
 
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
- | Server plugin registrations | Until shutdown or plugin disposal |
71
- | HTTP and `/api/ws` listener | Whole server process |
72
- | Session journal ownership | Whole server process |
29
+ ## Stop and failure
73
30
 
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.
31
+ Termination and explicit disposal stop new admissions, cancel owned work, unwind registrations and handlers, release runtime/storage ownership, and close listeners. Cleanup attempts do not make an uncertain external side effect safe to retry.
75
32
 
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.
33
+ A storage ownership conflict fails rather than admitting concurrent writers. A failed session is not silently replaced by a different module set. Normal shutdown retains its store for resume; earlier pre-durable sessions are not migrated by this runtime.
77
34
 
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
- ## Server package changes
87
-
88
- Each server plugin 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 after a watched package change, a finished sync, or a package install or removal, and reinstall only what changed: an unchanged package is skipped, a changed one is disposed and its new build applied, and a new build that fails restores the previous one. A package that is no longer selected stays installed. After a set number of superseded package versions, the server restarts at the next idle moment so old modules do not accumulate. During shutdown, plugin 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 plugin 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.
35
+ See [Getting started](getting-started.md), [Client protocol](ipc.md), and [Security](security.md).
@@ -1,101 +1,41 @@
1
- # Security and trust boundaries
1
+ # Server security
2
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.
3
+ The direct listener is a powerful control surface. Its token can authorize prompts, model/configuration changes, extension responses, and mounted package calls. Treat it as session-control authority, not a read-only API key.
4
4
 
5
- ## The trust model
5
+ ## Direct-client credentials
6
6
 
7
- ```text
8
- trusted owner account
9
- |
10
- +-- po-server
11
- +-- DirectHarnessRuntime
12
- +-- configured extensions and server plugins
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
- ```
7
+ Keep the default loopback bind unless an authenticated boundary is already in place. Create the attach token outside the repository in an owner-only location and pass its path through `--auth-token-file`. The server reads the file; it does not create or protect it. Do not place a raw token in the server's argument list, a public environment file, or a shared log.
19
8
 
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.
9
+ Normal control HTTP and WebSocket calls require the token. Prefer `Authorization: Bearer <token>` or `x-po-token` over URL query credentials. `/api/health` is deliberately public. Explicit bootstrap, OAuth/MCP, and package-issued authentication routes have their own restricted admission; they are not unauthenticated control aliases.
21
10
 
22
- Remote browser authentication, tunnel policy, passkeys, and containment belong to Po Web. The server's listener is not a replacement for those controls.
11
+ A bearer capability is not per-operation authorization. Protect its holders and any proxy that supplies it. Rotate it by stopping the server, replacing the private file, and restarting. Inspect current state before retrying a mutation after disconnection.
23
12
 
24
- ## Security goals
13
+ ## Trusted package code
25
14
 
26
- The design aims to:
15
+ The host selects built `poServer` entries from configured packages and checks that entries remain inside their package. Mutable packages use content-addressed snapshots. These checks establish selected code identity and lifecycle, not whether the package is benign.
27
16
 
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 package failures; and
33
- - preserve session history ownership so two runtimes cannot write the same journal concurrently.
17
+ For a manual read-only deployment, set `PO_IMMUTABLE_INSTALL=1` in the service environment only if the installed Po payload cannot change while the server is running. This is not a CLI flag. The server imports the payload in place and still snapshots mutable packages outside it. Install each upgrade in a new directory and restart the server to switch releases.
34
18
 
35
- It does not attempt to:
19
+ Required selected-package failures block their affected scope. Optional failures are reported; no failure authorizes a different module directory or another workspace. Synchronization prepares installations/artifacts separately from request dispatch.
36
20
 
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 plugins | 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 installs each eligible server plugin.
70
-
71
- Required package 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.
21
+ Handlers receive host-provided scope and capabilities. They must independently validate inputs, resource ownership, file paths, and limits on bodies, reads, streams, and outputs. Listener authentication never justifies returning environment values or process credentials. Caller identity must come from verified stamps, not browser-supplied headers.
74
22
 
75
23
  ## Browser and remote access
76
24
 
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.
25
+ Po Web serves assets and forwards its upstream credential without embedding it in browser code. The headless remote runtime owns the separate tunnel listener, pairing, device sessions, passkeys, sealed transport, and signed publication. Do not expose a raw listener through an unauthenticated TCP forwarder.
80
26
 
81
- ## Data, replay, and diagnostics
27
+ A paired browser, session MCP connector, and direct-token client use different credentials and admission rules. A connector token does not grant administrative access. Revocation blocks future admissions but cannot undo work already completed.
82
28
 
83
- The session journal contains conversation and tool history in the pi-durable SQLite store. The runtime also keeps the in-progress assistant message and tool output (`live`) 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.
29
+ Read the [web remote-security guide](https://github.com/AgiFlow/po/blob/main/packages/clients/po-web/docs/security.md) before sharing access. A tunnel changes reachability, not execution privileges.
84
30
 
85
- Server telemetry records lifecycle and coarse usage events. Its presentation and latency events carry frame types and durations, not message or tool content. This is a telemetry property, not a guarantee that clients, extensions, package APIs, or the harness do not log their own data.
31
+ ## Execution and stored data
86
32
 
87
- ## Operating posture
33
+ Unsandboxed sessions run with their admitted environment and the server account's operating-system privileges. Optional workspace sandbox providers add an explicit execution boundary when installed, available, and selected; pairing alone does not enable one. Trust the actual sandbox state and mounts, not a picker or path prefix. Plan mode is not OS isolation.
88
34
 
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 plugins 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.
35
+ Neither loopback checks nor file permissions defend against root, a compromised owner account, or hostile same-user code. Writable mounts, credentials inside the boundary, network access, and the container engine retain their stated authority.
96
36
 
97
- ## Known limits
37
+ Session history persists in the pi-durable SQLite store with explicit ownership. Keep the Po home and stores private; do not open a second writer to bypass an ownership error. Live output and bounded presentation windows are in-memory reconnect aids, not a durable audit log. Deleting a session does not delete arbitrary files written into its workspace.
98
38
 
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.
39
+ Telemetry and command logs may contain caller- or package-supplied values. Coarse built-in metrics do not prove every extension, model provider, handler, or downstream service avoids logging content. Review those destinations separately.
100
40
 
101
- See [IPC](ipc.md) for exact protocol behavior and [Lifecycle](lifecycle.md) for startup, cleanup, and history recovery.
41
+ See [Client protocol](ipc.md), [Lifecycle](lifecycle.md), and [Po security](https://github.com/AgiFlow/po/blob/main/docs/security.md).