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