@agimon-ai/po 0.0.0-alpha.9 → 0.0.0-alpha.90

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 (469) hide show
  1. package/LICENSE +149 -21
  2. package/README.md +47 -42
  3. package/dist/bin/cli.cjs +8 -5
  4. package/dist/bin/cli.cjs.map +1 -1
  5. package/dist/bin/cli.mjs +8 -5
  6. package/dist/bin/cli.mjs.map +1 -1
  7. package/dist/bin/poRunner.cjs +22 -5
  8. package/dist/bin/poRunner.cjs.map +1 -1
  9. package/dist/bin/poRunner.d.mts +8 -0
  10. package/dist/bin/poRunner.d.mts.map +1 -1
  11. package/dist/bin/poRunner.mjs +22 -5
  12. package/dist/bin/poRunner.mjs.map +1 -1
  13. package/dist/bin/serve.cjs +26 -17
  14. package/dist/bin/serve.cjs.map +1 -1
  15. package/dist/bin/serve.mjs +26 -17
  16. package/dist/bin/serve.mjs.map +1 -1
  17. package/dist/builders/cli/extensionAssembler/index.cjs +27 -17
  18. package/dist/builders/cli/extensionAssembler/index.cjs.map +1 -1
  19. package/dist/builders/cli/extensionAssembler/index.d.mts +3 -1
  20. package/dist/builders/cli/extensionAssembler/index.d.mts.map +1 -1
  21. package/dist/builders/cli/extensionAssembler/index.mjs +27 -18
  22. package/dist/builders/cli/extensionAssembler/index.mjs.map +1 -1
  23. package/dist/catalog/index.json +149 -93
  24. package/dist/cli.cjs +9 -14
  25. package/dist/cli.d.mts +1 -3
  26. package/dist/cli.mjs +1 -3
  27. package/dist/commands.cjs +13 -15
  28. package/dist/commands.d.mts +1 -2
  29. package/dist/commands.mjs +1 -2
  30. package/dist/config.cjs +0 -6
  31. package/dist/config.d.mts +2 -2
  32. package/dist/config.mjs +2 -2
  33. package/dist/extensions/server.cjs +11 -7
  34. package/dist/extensions/server.cjs.map +1 -1
  35. package/dist/extensions/server.d.mts +2 -2
  36. package/dist/extensions/server.d.mts.map +1 -1
  37. package/dist/extensions/server.mjs +12 -8
  38. package/dist/extensions/server.mjs.map +1 -1
  39. package/dist/help.cjs +9 -11
  40. package/dist/help.d.mts +1 -2
  41. package/dist/help.mjs +1 -2
  42. package/dist/index.cjs +29 -56
  43. package/dist/index.d.mts +3 -13
  44. package/dist/index.mjs +3 -11
  45. package/dist/package.cjs +11 -0
  46. package/dist/package.cjs.map +1 -0
  47. package/dist/package.mjs +6 -0
  48. package/dist/package.mjs.map +1 -0
  49. package/dist/repository.cjs +1 -0
  50. package/dist/repository.d.mts +2 -2
  51. package/dist/repository.mjs +1 -1
  52. package/dist/services.cjs +2 -16
  53. package/dist/services.d.mts +1 -6
  54. package/dist/services.mjs +1 -6
  55. package/dist/shared.cjs +4 -17
  56. package/dist/shared.d.mts +2 -2
  57. package/dist/shared.mjs +1 -1
  58. package/dist/src/bin/agentDirectory.cjs +11 -7
  59. package/dist/src/bin/agentDirectory.cjs.map +1 -1
  60. package/dist/src/bin/agentDirectory.mjs +10 -7
  61. package/dist/src/bin/agentDirectory.mjs.map +1 -1
  62. package/dist/src/builders/apiContractExport/index.cjs +16 -16
  63. package/dist/src/builders/apiContractExport/index.cjs.map +1 -1
  64. package/dist/src/builders/apiContractExport/index.mjs +16 -16
  65. package/dist/src/builders/apiContractExport/index.mjs.map +1 -1
  66. package/dist/src/builders/cli/entryResolution.cjs +2 -2
  67. package/dist/src/builders/cli/entryResolution.cjs.map +1 -1
  68. package/dist/src/builders/cli/entryResolution.mjs +1 -1
  69. package/dist/src/builders/cli/entryResolution.mjs.map +1 -1
  70. package/dist/src/builders/cli/harnessContext.cjs +21 -18
  71. package/dist/src/builders/cli/harnessContext.cjs.map +1 -1
  72. package/dist/src/builders/cli/harnessContext.d.mts +0 -1
  73. package/dist/src/builders/cli/harnessContext.d.mts.map +1 -1
  74. package/dist/src/builders/cli/harnessContext.mjs +21 -18
  75. package/dist/src/builders/cli/harnessContext.mjs.map +1 -1
  76. package/dist/src/builders/cli/sessionComposition.cjs +2 -6
  77. package/dist/src/builders/cli/sessionComposition.cjs.map +1 -1
  78. package/dist/src/builders/cli/sessionComposition.mjs +3 -6
  79. package/dist/src/builders/cli/sessionComposition.mjs.map +1 -1
  80. package/dist/src/builders/isolate/compile.cjs +134 -0
  81. package/dist/src/builders/isolate/compile.cjs.map +1 -0
  82. package/dist/src/builders/isolate/compile.mjs +129 -0
  83. package/dist/src/builders/isolate/compile.mjs.map +1 -0
  84. package/dist/src/builders/isolate/index.cjs +191 -0
  85. package/dist/src/builders/isolate/index.cjs.map +1 -0
  86. package/dist/src/builders/isolate/index.mjs +188 -0
  87. package/dist/src/builders/isolate/index.mjs.map +1 -0
  88. package/dist/src/builders/isolate/membrane.cjs +198 -0
  89. package/dist/src/builders/isolate/membrane.cjs.map +1 -0
  90. package/dist/src/builders/isolate/membrane.mjs +198 -0
  91. package/dist/src/builders/isolate/membrane.mjs.map +1 -0
  92. package/dist/src/builders/native/index.cjs +185 -61
  93. package/dist/src/builders/native/index.cjs.map +1 -1
  94. package/dist/src/builders/native/index.d.mts +4 -2
  95. package/dist/src/builders/native/index.d.mts.map +1 -1
  96. package/dist/src/builders/native/index.mjs +184 -61
  97. package/dist/src/builders/native/index.mjs.map +1 -1
  98. package/dist/src/builders/npm/index.cjs +70 -0
  99. package/dist/src/builders/npm/index.cjs.map +1 -0
  100. package/dist/src/builders/npm/index.mjs +67 -0
  101. package/dist/src/builders/npm/index.mjs.map +1 -0
  102. package/dist/src/builders/server/backgroundSync.cjs +74 -39
  103. package/dist/src/builders/server/backgroundSync.cjs.map +1 -1
  104. package/dist/src/builders/server/backgroundSync.mjs +74 -38
  105. package/dist/src/builders/server/backgroundSync.mjs.map +1 -1
  106. package/dist/src/builders/server/bundlerService.cjs +248 -0
  107. package/dist/src/builders/server/bundlerService.cjs.map +1 -0
  108. package/dist/src/builders/server/bundlerService.mjs +246 -0
  109. package/dist/src/builders/server/bundlerService.mjs.map +1 -0
  110. package/dist/src/builders/server/capabilities.cjs +81 -0
  111. package/dist/src/builders/server/capabilities.cjs.map +1 -0
  112. package/dist/src/builders/server/capabilities.mjs +79 -0
  113. package/dist/src/builders/server/capabilities.mjs.map +1 -0
  114. package/dist/src/builders/server/computerUseBinding.cjs +20 -3
  115. package/dist/src/builders/server/computerUseBinding.cjs.map +1 -1
  116. package/dist/src/builders/server/computerUseBinding.mjs +19 -2
  117. package/dist/src/builders/server/computerUseBinding.mjs.map +1 -1
  118. package/dist/src/builders/server/computerUseRecordings.cjs +3 -3
  119. package/dist/src/builders/server/computerUseRecordings.cjs.map +1 -1
  120. package/dist/src/builders/server/computerUseRecordings.mjs +18 -18
  121. package/dist/src/builders/server/computerUseRecordings.mjs.map +1 -1
  122. package/dist/src/builders/server/containedSessions.cjs +141 -0
  123. package/dist/src/builders/server/containedSessions.cjs.map +1 -0
  124. package/dist/src/builders/server/containedSessions.mjs +135 -0
  125. package/dist/src/builders/server/containedSessions.mjs.map +1 -0
  126. package/dist/src/builders/server/defaultWorkspace.cjs +41 -9
  127. package/dist/src/builders/server/defaultWorkspace.cjs.map +1 -1
  128. package/dist/src/builders/server/defaultWorkspace.mjs +39 -9
  129. package/dist/src/builders/server/defaultWorkspace.mjs.map +1 -1
  130. package/dist/src/builders/server/electronBinding.cjs +82 -0
  131. package/dist/src/builders/server/electronBinding.cjs.map +1 -0
  132. package/dist/src/builders/server/electronBinding.mjs +82 -0
  133. package/dist/src/builders/server/electronBinding.mjs.map +1 -0
  134. package/dist/src/builders/server/federation.cjs +316 -0
  135. package/dist/src/builders/server/federation.cjs.map +1 -0
  136. package/dist/src/builders/server/federation.mjs +315 -0
  137. package/dist/src/builders/server/federation.mjs.map +1 -0
  138. package/dist/src/builders/server/hostDisplayName.cjs +14 -0
  139. package/dist/src/builders/server/hostDisplayName.cjs.map +1 -0
  140. package/dist/src/builders/server/hostDisplayName.mjs +14 -0
  141. package/dist/src/builders/server/hostDisplayName.mjs.map +1 -0
  142. package/dist/src/builders/server/hostModelGateway.cjs +41 -0
  143. package/dist/src/builders/server/hostModelGateway.cjs.map +1 -0
  144. package/dist/src/builders/server/hostModelGateway.mjs +39 -0
  145. package/dist/src/builders/server/hostModelGateway.mjs.map +1 -0
  146. package/dist/src/builders/server/idleRestart.cjs +86 -18
  147. package/dist/src/builders/server/idleRestart.cjs.map +1 -1
  148. package/dist/src/builders/server/idleRestart.mjs +81 -18
  149. package/dist/src/builders/server/idleRestart.mjs.map +1 -1
  150. package/dist/src/builders/server/index.cjs +32 -18
  151. package/dist/src/builders/server/index.cjs.map +1 -1
  152. package/dist/src/builders/server/index.mjs +32 -17
  153. package/dist/src/builders/server/index.mjs.map +1 -1
  154. package/dist/src/builders/server/logSink.cjs +15 -13
  155. package/dist/src/builders/server/logSink.cjs.map +1 -1
  156. package/dist/src/builders/server/logSink.mjs +14 -12
  157. package/dist/src/builders/server/logSink.mjs.map +1 -1
  158. package/dist/src/builders/server/mcpApp.cjs +27 -20
  159. package/dist/src/builders/server/mcpApp.cjs.map +1 -1
  160. package/dist/src/builders/server/mcpApp.mjs +25 -18
  161. package/dist/src/builders/server/mcpApp.mjs.map +1 -1
  162. package/dist/src/builders/server/mcpAppBuild.cjs +47 -43
  163. package/dist/src/builders/server/mcpAppBuild.cjs.map +1 -1
  164. package/dist/src/builders/server/mcpAppBuild.d.mts +3 -6
  165. package/dist/src/builders/server/mcpAppBuild.d.mts.map +1 -1
  166. package/dist/src/builders/server/mcpAppBuild.mjs +47 -42
  167. package/dist/src/builders/server/mcpAppBuild.mjs.map +1 -1
  168. package/dist/src/builders/server/mcpBundle.cjs +16 -12
  169. package/dist/src/builders/server/mcpBundle.cjs.map +1 -1
  170. package/dist/src/builders/server/mcpBundle.d.mts +2 -1
  171. package/dist/src/builders/server/mcpBundle.d.mts.map +1 -1
  172. package/dist/src/builders/server/mcpBundle.mjs +16 -11
  173. package/dist/src/builders/server/mcpBundle.mjs.map +1 -1
  174. package/dist/src/builders/server/nativePush.cjs +206 -0
  175. package/dist/src/builders/server/nativePush.cjs.map +1 -0
  176. package/dist/src/builders/server/nativePush.mjs +205 -0
  177. package/dist/src/builders/server/nativePush.mjs.map +1 -0
  178. package/dist/src/builders/server/network.cjs +778 -0
  179. package/dist/src/builders/server/network.cjs.map +1 -0
  180. package/dist/src/builders/server/network.mjs +777 -0
  181. package/dist/src/builders/server/network.mjs.map +1 -0
  182. package/dist/src/builders/server/networkGateway.cjs +123 -0
  183. package/dist/src/builders/server/networkGateway.cjs.map +1 -0
  184. package/dist/src/builders/server/networkGateway.mjs +123 -0
  185. package/dist/src/builders/server/networkGateway.mjs.map +1 -0
  186. package/dist/src/builders/server/networkRelay.cjs +83 -0
  187. package/dist/src/builders/server/networkRelay.cjs.map +1 -0
  188. package/dist/src/builders/server/networkRelay.mjs +81 -0
  189. package/dist/src/builders/server/networkRelay.mjs.map +1 -0
  190. package/dist/src/builders/server/packageReloadCheck.cjs +7 -2
  191. package/dist/src/builders/server/packageReloadCheck.cjs.map +1 -1
  192. package/dist/src/builders/server/packageReloadCheck.mjs +7 -2
  193. package/dist/src/builders/server/packageReloadCheck.mjs.map +1 -1
  194. package/dist/src/builders/server/packageUrl.cjs +56 -53
  195. package/dist/src/builders/server/packageUrl.cjs.map +1 -1
  196. package/dist/src/builders/server/packageUrl.mjs +56 -52
  197. package/dist/src/builders/server/packageUrl.mjs.map +1 -1
  198. package/dist/src/builders/server/runtime.cjs +1579 -460
  199. package/dist/src/builders/server/runtime.cjs.map +1 -1
  200. package/dist/src/builders/server/runtime.mjs +1591 -471
  201. package/dist/src/builders/server/runtime.mjs.map +1 -1
  202. package/dist/src/builders/server/runtimeResources.cjs +37 -0
  203. package/dist/src/builders/server/runtimeResources.cjs.map +1 -1
  204. package/dist/src/builders/server/runtimeResources.mjs +38 -2
  205. package/dist/src/builders/server/runtimeResources.mjs.map +1 -1
  206. package/dist/src/builders/server/sandboxRouter.cjs +734 -0
  207. package/dist/src/builders/server/sandboxRouter.cjs.map +1 -0
  208. package/dist/src/builders/server/sandboxRouter.mjs +730 -0
  209. package/dist/src/builders/server/sandboxRouter.mjs.map +1 -0
  210. package/dist/src/builders/server/sandboxSessionHandoff.cjs +298 -0
  211. package/dist/src/builders/server/sandboxSessionHandoff.cjs.map +1 -0
  212. package/dist/src/builders/server/sandboxSessionHandoff.mjs +287 -0
  213. package/dist/src/builders/server/sandboxSessionHandoff.mjs.map +1 -0
  214. package/dist/src/builders/server/sessionArguments.cjs +26 -0
  215. package/dist/src/builders/server/sessionArguments.cjs.map +1 -1
  216. package/dist/src/builders/server/sessionArguments.mjs +26 -1
  217. package/dist/src/builders/server/sessionArguments.mjs.map +1 -1
  218. package/dist/src/builders/server/sessionRemoval.cjs +233 -0
  219. package/dist/src/builders/server/sessionRemoval.cjs.map +1 -0
  220. package/dist/src/builders/server/sessionRemoval.mjs +224 -0
  221. package/dist/src/builders/server/sessionRemoval.mjs.map +1 -0
  222. package/dist/src/builders/server/shutdown.cjs +23 -0
  223. package/dist/src/builders/server/shutdown.cjs.map +1 -1
  224. package/dist/src/builders/server/shutdown.mjs +21 -1
  225. package/dist/src/builders/server/shutdown.mjs.map +1 -1
  226. package/dist/src/builders/server/watcherService.cjs +88 -0
  227. package/dist/src/builders/server/watcherService.cjs.map +1 -0
  228. package/dist/src/builders/server/watcherService.mjs +85 -0
  229. package/dist/src/builders/server/watcherService.mjs.map +1 -0
  230. package/dist/src/builders/server/workspaceAdmission.cjs +96 -0
  231. package/dist/src/builders/server/workspaceAdmission.cjs.map +1 -0
  232. package/dist/src/builders/server/workspaceAdmission.mjs +90 -0
  233. package/dist/src/builders/server/workspaceAdmission.mjs.map +1 -0
  234. package/dist/src/builders/server/workspaceCheckout.cjs +16 -7
  235. package/dist/src/builders/server/workspaceCheckout.cjs.map +1 -1
  236. package/dist/src/builders/server/workspaceCheckout.mjs +16 -7
  237. package/dist/src/builders/server/workspaceCheckout.mjs.map +1 -1
  238. package/dist/src/builders/web/bundle.cjs +14 -14
  239. package/dist/src/builders/web/bundle.cjs.map +1 -1
  240. package/dist/src/builders/web/bundle.d.mts +3 -3
  241. package/dist/src/builders/web/bundle.mjs +13 -13
  242. package/dist/src/builders/web/bundle.mjs.map +1 -1
  243. package/dist/src/builders/web/index.cjs +64 -60
  244. package/dist/src/builders/web/index.cjs.map +1 -1
  245. package/dist/src/builders/web/index.d.mts +19 -14
  246. package/dist/src/builders/web/index.d.mts.map +1 -1
  247. package/dist/src/builders/web/index.mjs +63 -59
  248. package/dist/src/builders/web/index.mjs.map +1 -1
  249. package/dist/src/builders/web/webPluginGenerate.cjs +48 -53
  250. package/dist/src/builders/web/webPluginGenerate.cjs.map +1 -1
  251. package/dist/src/builders/web/webPluginGenerate.d.mts +9 -13
  252. package/dist/src/builders/web/webPluginGenerate.d.mts.map +1 -1
  253. package/dist/src/builders/web/webPluginGenerate.mjs +46 -51
  254. package/dist/src/builders/web/webPluginGenerate.mjs.map +1 -1
  255. package/dist/src/builders/web/webPluginManifest.cjs +12 -13
  256. package/dist/src/builders/web/webPluginManifest.cjs.map +1 -1
  257. package/dist/src/builders/web/webPluginManifest.d.mts +6 -7
  258. package/dist/src/builders/web/webPluginManifest.d.mts.map +1 -1
  259. package/dist/src/builders/web/webPluginManifest.mjs +11 -12
  260. package/dist/src/builders/web/webPluginManifest.mjs.map +1 -1
  261. package/dist/src/builders/web/webPluginScan.cjs +11 -8
  262. package/dist/src/builders/web/webPluginScan.cjs.map +1 -1
  263. package/dist/src/builders/web/webPluginScan.d.mts +1 -1
  264. package/dist/src/builders/web/webPluginScan.d.mts.map +1 -1
  265. package/dist/src/builders/web/webPluginScan.mjs +10 -7
  266. package/dist/src/builders/web/webPluginScan.mjs.map +1 -1
  267. package/dist/src/builders/web/webPluginVite.cjs +5 -5
  268. package/dist/src/builders/web/webPluginVite.cjs.map +1 -1
  269. package/dist/src/builders/web/webPluginVite.d.mts +1 -1
  270. package/dist/src/builders/web/webPluginVite.d.mts.map +1 -1
  271. package/dist/src/builders/web/webPluginVite.mjs +3 -3
  272. package/dist/src/builders/web/webPluginVite.mjs.map +1 -1
  273. package/dist/src/cli/cliApp.cjs +11 -11
  274. package/dist/src/cli/cliApp.cjs.map +1 -1
  275. package/dist/src/cli/cliApp.d.mts.map +1 -1
  276. package/dist/src/cli/cliApp.mjs +11 -11
  277. package/dist/src/cli/cliApp.mjs.map +1 -1
  278. package/dist/src/cli/commands/doctor/index.cjs +6 -6
  279. package/dist/src/cli/commands/doctor/index.cjs.map +1 -1
  280. package/dist/src/cli/commands/doctor/index.d.mts +4 -4
  281. package/dist/src/cli/commands/doctor/index.d.mts.map +1 -1
  282. package/dist/src/cli/commands/doctor/index.mjs +6 -6
  283. package/dist/src/cli/commands/doctor/index.mjs.map +1 -1
  284. package/dist/src/cli/commands/explain/index.cjs +7 -9
  285. package/dist/src/cli/commands/explain/index.cjs.map +1 -1
  286. package/dist/src/cli/commands/explain/index.d.mts +0 -2
  287. package/dist/src/cli/commands/explain/index.d.mts.map +1 -1
  288. package/dist/src/cli/commands/explain/index.mjs +6 -8
  289. package/dist/src/cli/commands/explain/index.mjs.map +1 -1
  290. package/dist/src/cli/commands/sync/help.cjs +4 -1
  291. package/dist/src/cli/commands/sync/help.cjs.map +1 -1
  292. package/dist/src/cli/commands/sync/help.mjs +4 -1
  293. package/dist/src/cli/commands/sync/help.mjs.map +1 -1
  294. package/dist/src/cli/commands/sync/index.cjs +28 -14
  295. package/dist/src/cli/commands/sync/index.cjs.map +1 -1
  296. package/dist/src/cli/commands/sync/index.d.mts.map +1 -1
  297. package/dist/src/cli/commands/sync/index.mjs +27 -13
  298. package/dist/src/cli/commands/sync/index.mjs.map +1 -1
  299. package/dist/src/cli/commands/web/index.cjs +1 -1
  300. package/dist/src/cli/harnessOptions.cjs +3 -17
  301. package/dist/src/cli/harnessOptions.cjs.map +1 -1
  302. package/dist/src/cli/harnessOptions.d.mts +1 -1
  303. package/dist/src/cli/harnessOptions.d.mts.map +1 -1
  304. package/dist/src/cli/harnessOptions.mjs +4 -17
  305. package/dist/src/cli/harnessOptions.mjs.map +1 -1
  306. package/dist/src/cli/help.cjs +6 -13
  307. package/dist/src/cli/help.cjs.map +1 -1
  308. package/dist/src/cli/help.d.mts +1 -2
  309. package/dist/src/cli/help.d.mts.map +1 -1
  310. package/dist/src/cli/help.mjs +1 -7
  311. package/dist/src/cli/help.mjs.map +1 -1
  312. package/dist/src/cli/options.cjs +0 -24
  313. package/dist/src/cli/options.cjs.map +1 -1
  314. package/dist/src/cli/options.d.mts.map +1 -1
  315. package/dist/src/cli/options.mjs +0 -24
  316. package/dist/src/cli/options.mjs.map +1 -1
  317. package/dist/src/cli/router.cjs +0 -1
  318. package/dist/src/cli/router.cjs.map +1 -1
  319. package/dist/src/cli/router.d.mts +1 -1
  320. package/dist/src/cli/router.mjs +0 -1
  321. package/dist/src/cli/router.mjs.map +1 -1
  322. package/dist/src/cli/server/options.cjs +18 -2
  323. package/dist/src/cli/server/options.cjs.map +1 -1
  324. package/dist/src/cli/server/options.mjs +18 -2
  325. package/dist/src/cli/server/options.mjs.map +1 -1
  326. package/dist/src/cli/server/processGuards.cjs +22 -15
  327. package/dist/src/cli/server/processGuards.cjs.map +1 -1
  328. package/dist/src/cli/server/processGuards.mjs +21 -14
  329. package/dist/src/cli/server/processGuards.mjs.map +1 -1
  330. package/dist/src/cli/server/restartPolicy.cjs +38 -0
  331. package/dist/src/cli/server/restartPolicy.cjs.map +1 -0
  332. package/dist/src/cli/server/restartPolicy.d.mts +21 -0
  333. package/dist/src/cli/server/restartPolicy.d.mts.map +1 -0
  334. package/dist/src/cli/server/restartPolicy.mjs +36 -0
  335. package/dist/src/cli/server/restartPolicy.mjs.map +1 -0
  336. package/dist/src/cli/server/run.cjs +10 -9
  337. package/dist/src/cli/server/run.cjs.map +1 -1
  338. package/dist/src/cli/server/run.mjs +10 -9
  339. package/dist/src/cli/server/run.mjs.map +1 -1
  340. package/dist/src/cli/server/supervise.cjs +89 -0
  341. package/dist/src/cli/server/supervise.cjs.map +1 -0
  342. package/dist/src/cli/server/supervise.mjs +89 -0
  343. package/dist/src/cli/server/supervise.mjs.map +1 -0
  344. package/dist/src/composition/layerPackageInstaller/index.cjs +138 -67
  345. package/dist/src/composition/layerPackageInstaller/index.cjs.map +1 -1
  346. package/dist/src/composition/layerPackageInstaller/index.d.mts.map +1 -1
  347. package/dist/src/composition/layerPackageInstaller/index.mjs +146 -76
  348. package/dist/src/composition/layerPackageInstaller/index.mjs.map +1 -1
  349. package/dist/src/composition/poHomeMigration/index.cjs +46 -26
  350. package/dist/src/composition/poHomeMigration/index.cjs.map +1 -1
  351. package/dist/src/composition/poHomeMigration/index.d.mts.map +1 -1
  352. package/dist/src/composition/poHomeMigration/index.mjs +45 -25
  353. package/dist/src/composition/poHomeMigration/index.mjs.map +1 -1
  354. package/dist/src/composition/repository/index.cjs +29 -12
  355. package/dist/src/composition/repository/index.cjs.map +1 -1
  356. package/dist/src/composition/repository/index.d.mts +10 -3
  357. package/dist/src/composition/repository/index.d.mts.map +1 -1
  358. package/dist/src/composition/repository/index.mjs +29 -13
  359. package/dist/src/composition/repository/index.mjs.map +1 -1
  360. package/dist/src/composition/syncPrune/index.cjs +22 -15
  361. package/dist/src/composition/syncPrune/index.cjs.map +1 -1
  362. package/dist/src/composition/syncPrune/index.d.mts.map +1 -1
  363. package/dist/src/composition/syncPrune/index.mjs +21 -14
  364. package/dist/src/composition/syncPrune/index.mjs.map +1 -1
  365. package/dist/src/composition/syncService/index.cjs +193 -127
  366. package/dist/src/composition/syncService/index.cjs.map +1 -1
  367. package/dist/src/composition/syncService/index.d.mts.map +1 -1
  368. package/dist/src/composition/syncService/index.mjs +193 -128
  369. package/dist/src/composition/syncService/index.mjs.map +1 -1
  370. package/dist/src/composition/syncService/localBuilds.cjs +34 -32
  371. package/dist/src/composition/syncService/localBuilds.cjs.map +1 -1
  372. package/dist/src/composition/syncService/localBuilds.mjs +33 -31
  373. package/dist/src/composition/syncService/localBuilds.mjs.map +1 -1
  374. package/dist/src/composition/types/harness.d.mts +0 -2
  375. package/dist/src/composition/types/harness.d.mts.map +1 -1
  376. package/dist/src/extensions/setupDiagnostics.cjs +8 -8
  377. package/dist/src/extensions/setupDiagnostics.cjs.map +1 -1
  378. package/dist/src/extensions/setupDiagnostics.mjs +7 -7
  379. package/dist/src/extensions/setupDiagnostics.mjs.map +1 -1
  380. package/docs/server/api-export.md +2 -2
  381. package/docs/server/api.md +13 -12
  382. package/docs/server/getting-started.md +6 -6
  383. package/docs/server/index.md +6 -4
  384. package/docs/server/ipc.md +4 -7
  385. package/docs/server/lifecycle.md +17 -17
  386. package/docs/server/security.md +8 -8
  387. package/package.json +39 -66
  388. package/src/prompts/po-author-extension/references/extension-contract.md +3 -5
  389. package/dist/antigravity.cjs +0 -5
  390. package/dist/antigravity.d.mts +0 -2
  391. package/dist/antigravity.mjs +0 -1
  392. package/dist/codex.cjs +0 -8
  393. package/dist/codex.d.mts +0 -2
  394. package/dist/codex.mjs +0 -1
  395. package/dist/compatibility.cjs +0 -27
  396. package/dist/compatibility.d.mts +0 -6
  397. package/dist/compatibility.mjs +0 -6
  398. package/dist/compatibilityCommand.cjs +0 -4
  399. package/dist/compatibilityCommand.d.mts +0 -2
  400. package/dist/compatibilityCommand.mjs +0 -1
  401. package/dist/compatibilityContext.cjs +0 -3
  402. package/dist/compatibilityContext.d.mts +0 -2
  403. package/dist/compatibilityContext.mjs +0 -1
  404. package/dist/compatibilityOptions.cjs +0 -5
  405. package/dist/compatibilityOptions.d.mts +0 -2
  406. package/dist/compatibilityOptions.mjs +0 -1
  407. package/dist/process.cjs +0 -12
  408. package/dist/process.d.mts +0 -2
  409. package/dist/process.mjs +0 -1
  410. package/dist/src/builders/hooks/index.cjs +0 -238
  411. package/dist/src/builders/hooks/index.cjs.map +0 -1
  412. package/dist/src/builders/hooks/index.mjs +0 -231
  413. package/dist/src/builders/hooks/index.mjs.map +0 -1
  414. package/dist/src/cli/commands/compat/context.cjs +0 -115
  415. package/dist/src/cli/commands/compat/context.cjs.map +0 -1
  416. package/dist/src/cli/commands/compat/context.d.mts +0 -22
  417. package/dist/src/cli/commands/compat/context.d.mts.map +0 -1
  418. package/dist/src/cli/commands/compat/context.mjs +0 -110
  419. package/dist/src/cli/commands/compat/context.mjs.map +0 -1
  420. package/dist/src/cli/commands/compat/help.cjs +0 -26
  421. package/dist/src/cli/commands/compat/help.cjs.map +0 -1
  422. package/dist/src/cli/commands/compat/help.d.mts +0 -4
  423. package/dist/src/cli/commands/compat/help.d.mts.map +0 -1
  424. package/dist/src/cli/commands/compat/help.mjs +0 -25
  425. package/dist/src/cli/commands/compat/help.mjs.map +0 -1
  426. package/dist/src/cli/commands/compat/index.cjs +0 -73
  427. package/dist/src/cli/commands/compat/index.cjs.map +0 -1
  428. package/dist/src/cli/commands/compat/index.d.mts +0 -14
  429. package/dist/src/cli/commands/compat/index.d.mts.map +0 -1
  430. package/dist/src/cli/commands/compat/index.mjs +0 -70
  431. package/dist/src/cli/commands/compat/index.mjs.map +0 -1
  432. package/dist/src/cli/commands/compat/options.cjs +0 -88
  433. package/dist/src/cli/commands/compat/options.cjs.map +0 -1
  434. package/dist/src/cli/commands/compat/options.d.mts +0 -15
  435. package/dist/src/cli/commands/compat/options.d.mts.map +0 -1
  436. package/dist/src/cli/commands/compat/options.mjs +0 -86
  437. package/dist/src/cli/commands/compat/options.mjs.map +0 -1
  438. package/dist/src/cli/commands/compat/providers/antigravity.cjs +0 -294
  439. package/dist/src/cli/commands/compat/providers/antigravity.cjs.map +0 -1
  440. package/dist/src/cli/commands/compat/providers/antigravity.d.mts +0 -9
  441. package/dist/src/cli/commands/compat/providers/antigravity.d.mts.map +0 -1
  442. package/dist/src/cli/commands/compat/providers/antigravity.mjs +0 -289
  443. package/dist/src/cli/commands/compat/providers/antigravity.mjs.map +0 -1
  444. package/dist/src/cli/commands/compat/providers/codex.cjs +0 -178
  445. package/dist/src/cli/commands/compat/providers/codex.cjs.map +0 -1
  446. package/dist/src/cli/commands/compat/providers/codex.d.mts +0 -17
  447. package/dist/src/cli/commands/compat/providers/codex.d.mts.map +0 -1
  448. package/dist/src/cli/commands/compat/providers/codex.mjs +0 -170
  449. package/dist/src/cli/commands/compat/providers/codex.mjs.map +0 -1
  450. package/dist/src/cli/commands/compat/providers/index.cjs +0 -65
  451. package/dist/src/cli/commands/compat/providers/index.cjs.map +0 -1
  452. package/dist/src/cli/commands/compat/providers/index.d.mts +0 -15
  453. package/dist/src/cli/commands/compat/providers/index.d.mts.map +0 -1
  454. package/dist/src/cli/commands/compat/providers/index.mjs +0 -45
  455. package/dist/src/cli/commands/compat/providers/index.mjs.map +0 -1
  456. package/dist/src/cli/commands/compat/providers/process.cjs +0 -172
  457. package/dist/src/cli/commands/compat/providers/process.cjs.map +0 -1
  458. package/dist/src/cli/commands/compat/providers/process.d.mts +0 -33
  459. package/dist/src/cli/commands/compat/providers/process.d.mts.map +0 -1
  460. package/dist/src/cli/commands/compat/providers/process.mjs +0 -159
  461. package/dist/src/cli/commands/compat/providers/process.mjs.map +0 -1
  462. package/dist/src/cli/commands/compat/providers/shared.cjs +0 -76
  463. package/dist/src/cli/commands/compat/providers/shared.cjs.map +0 -1
  464. package/dist/src/cli/commands/compat/providers/shared.d.mts +0 -40
  465. package/dist/src/cli/commands/compat/providers/shared.d.mts.map +0 -1
  466. package/dist/src/cli/commands/compat/providers/shared.mjs +0 -61
  467. package/dist/src/cli/commands/compat/providers/shared.mjs.map +0 -1
  468. package/dist/src/cli/commands/compat/types.d.mts +0 -31
  469. package/dist/src/cli/commands/compat/types.d.mts.map +0 -1
package/LICENSE CHANGED
@@ -1,21 +1,149 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Vuong Ngo
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ License text copyright © 2017 MariaDB Corporation Ab, All Rights Reserved.
2
+ "Business Source License" is a trademark of MariaDB Corporation Ab.
3
+
4
+ Parameters
5
+
6
+ Licensor: Agimon Pty Ltd
7
+ Licensed Work: Po, the software in the Po source repository and the
8
+ packages released from it, in each version released by
9
+ the Licensor.
10
+ The Licensed Work is (c) 2026 Agimon Pty Ltd.
11
+ Material identified as third-party in the "Third-party
12
+ components" section at the end of this file or in a
13
+ NOTICE file, and any package or directory whose own
14
+ license file grants a different license, is not part of
15
+ the Licensed Work and remains under its own license.
16
+ Additional Use Grant: You may make production use of the Licensed Work if
17
+ your use is Eligible Use. "Eligible Use" is production use that falls
18
+ within at least one of the following:
19
+
20
+ (a) Personal Use. Use by an individual for their own personal purposes,
21
+ and not on behalf of, or for the benefit of, an employer, client, or
22
+ other Organization. Use by an individual in the course of employment
23
+ or engagement by an Organization is use by that Organization.
24
+
25
+ (b) Small Organization Use. Use by or on behalf of an Organization whose
26
+ Annual Revenue is less than USD 1,000,000.
27
+
28
+ (c) Non-profit, Education and Research Use. Use, regardless of Annual
29
+ Revenue, by (i) an Organization registered or recognized as a
30
+ non-profit or charitable organization under the laws of its
31
+ jurisdiction, for its non-profit purposes; (ii) an accredited school,
32
+ college, or university, for teaching, learning, or academic research;
33
+ or (iii) a publicly funded research institution, for its research.
34
+
35
+ (d) Service Provider Use. Use by a consultant, contractor, agency, or other
36
+ service provider, regardless of its own Annual Revenue, solely to
37
+ build, deploy, host, operate, or support the Licensed Work for a client
38
+ whose own use would be Eligible Use under (a), (b), or (c). A service
39
+ provider's use for its own purposes is Eligible Use only if the service
40
+ provider itself qualifies under (b) or (c).
41
+
42
+
43
+ Hosted services. Offering the Licensed Work to third parties as a hosted
44
+ or managed service whose primary value is the Licensed Work is Eligible
45
+ Use only if each such third party's own use would be Eligible Use.
46
+
47
+ Definitions. "Organization" means any company, partnership, sole
48
+ proprietorship, trust, association, government body, or other entity, and
49
+ includes an individual acting in a business or professional capacity.
50
+ "Affiliate" means any entity that directly or indirectly controls, is
51
+ controlled by, or is under common control with an Organization, where
52
+ "control" means ownership of more than 50% of the voting interests of an
53
+ entity or the power to direct its management and policies by contract or
54
+ otherwise. "Annual Revenue" means the total gross revenue of an
55
+ Organization and all of its Affiliates combined, from all sources and
56
+ whether or not related to the Licensed Work, for its most recently
57
+ completed fiscal year, or, if it has not completed a fiscal year, for the
58
+ twelve months before the use (or since its formation, if shorter),
59
+ converted into US dollars at the average exchange rate for that period.
60
+ Proceeds of equity or debt financing are not revenue.
61
+
62
+ Threshold. If an Organization stops qualifying under (b), its existing
63
+ production use remains Eligible Use for 90 days after it stops
64
+ qualifying, after which it must obtain a commercial license or stop
65
+ production use. Use that was Eligible Use when it occurred never requires
66
+ a commercial license after the fact.
67
+ Change Date: Four years from the date a version of the Licensed Work
68
+ is first publicly released by the Licensor.
69
+ Change License: Apache License, Version 2.0
70
+
71
+ For information about alternative licensing arrangements for the Licensed
72
+ Work, please visit: https://agimon.ai/licensing
73
+
74
+ Notice
75
+
76
+ The Business Source License (this document, or the "License") is not an Open
77
+ Source license. However, the Licensed Work will eventually be made available
78
+ under an Open Source License, as stated in this License.
79
+
80
+ -----------------------------------------------------------------------------
81
+
82
+ Business Source License 1.1
83
+
84
+ Terms
85
+
86
+ The Licensor hereby grants you the right to copy, modify, create derivative
87
+ works, redistribute, and make non-production use of the Licensed Work. The
88
+ Licensor may make an Additional Use Grant, above, permitting limited
89
+ production use.
90
+
91
+ Effective on the Change Date, or the fourth anniversary of the first publicly
92
+ available distribution of a specific version of the Licensed Work under this
93
+ License, whichever comes first, the Licensor hereby grants you rights under
94
+ the terms of the Change License, and the rights granted in the paragraph
95
+ above terminate.
96
+
97
+ If your use of the Licensed Work does not comply with the requirements
98
+ currently in effect as described in this License, you must purchase a
99
+ commercial license from the Licensor, its affiliated entities, or authorized
100
+ resellers, or you must refrain from using the Licensed Work.
101
+
102
+ All copies of the original and modified Licensed Work, and derivative works
103
+ of the Licensed Work, are subject to this License. This License applies
104
+ separately for each version of the Licensed Work and the Change Date may vary
105
+ for each version of the Licensed Work released by Licensor.
106
+
107
+ You must conspicuously display this License on each original or modified copy
108
+ of the Licensed Work. If you receive the Licensed Work in original or
109
+ modified form from a third party, the terms and conditions set forth in this
110
+ License apply to your use of that work.
111
+
112
+ Any use of the Licensed Work in violation of this License will automatically
113
+ terminate your rights under this License for the current and all other
114
+ versions of the Licensed Work.
115
+
116
+ This License does not grant you any right in any trademark or logo of
117
+ Licensor or its affiliates (provided that you may use a trademark or logo of
118
+ Licensor as expressly required by this License).
119
+
120
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
121
+ AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
122
+ EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
123
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
124
+ TITLE.
125
+
126
+ MariaDB hereby grants you permission to use this License’s text to license
127
+ your works, and to refer to it using the trademark “Business Source License”,
128
+ as long as you comply with the Covenants of Licensor below.
129
+
130
+ Covenants of Licensor
131
+
132
+ In consideration of the right to use this License’s text and the “Business
133
+ Source License” name and trademark, Licensor covenants to MariaDB, and to all
134
+ other recipients of the licensed work to be provided by Licensor:
135
+
136
+ 1. To specify as the Change License the GPL Version 2.0 or any later version,
137
+ or a license that is compatible with GPL Version 2.0 or a later version,
138
+ where “compatible” means that software provided under the Change License can
139
+ be included in a program with software provided under GPL Version 2.0 or a
140
+ later version. Licensor may specify additional Change Licenses without
141
+ limitation.
142
+
143
+ 2. To either: (a) specify an additional grant of rights to use that does not
144
+ impose any additional restriction on the right granted in this License, as
145
+ the Additional Use Grant; or (b) insert the text “None”.
146
+
147
+ 3. To specify a Change Date.
148
+
149
+ 4. Not to modify this License in any other way.
package/README.md CHANGED
@@ -121,9 +121,8 @@ and keep their model tools and skills out of context until turned on. Po ships s
121
121
 
122
122
  - **Help mode:** expose package-owned guidance only while you need it.
123
123
  - **Plan mode:** remove Pi's file-editing tools while you agree on an approach.
124
- - **Loop mode:** run a prompt now, then run it again on a schedule.
124
+ - **Calendar layer:** schedule durable prompts, workflows and plugin actions while the server is up.
125
125
  - **Goal mode:** keep one objective in view until it is done or dismissed.
126
- - **Workflow mode:** run jobs with dependencies, timeouts, and artifacts.
127
126
  - **Voice mode:** replace typing with local speech.
128
127
 
129
128
  ### Domains
@@ -205,7 +204,7 @@ house, and the primary agent can speak its own opening, milestone, and final upd
205
204
 
206
205
  ### Autopilot
207
206
 
208
- Copilot helps while you are present. Loop and Workflow keep work moving when you are not.
207
+ Copilot helps while you are present. Calendar and Workflow keep work moving when you are not.
209
208
  Together they can dispatch structured jobs from one live session.
210
209
 
211
210
  #### Workflows
@@ -232,8 +231,8 @@ automations/workflows/
232
231
  Each plugin has both `.codex-plugin/plugin.json` and `.claude-plugin/plugin.json`, while its
233
232
  `skills/` and `agents/` content is shared. `.po/domains.yaml` exposes the `development`,
234
233
  `testing`, and `blog` domains plus the `engineering` alias. `.po/modes.yaml` mirrors the
235
- standalone package set with workspace-local paths, keeps its canonical modes, and adds a layer-free
236
- `examples` base mode for the tracked workflows. Inspect the exact session before launch:
234
+ standalone package set with workspace-local paths, keeps its canonical modes, and adds an
235
+ `examples` base mode with the `workflow` layer for the tracked workflows. Inspect the exact session before launch:
237
236
 
238
237
  ```bash
239
238
  po --major-mode examples --domains engineering --explain
@@ -270,10 +269,10 @@ not create branches, commits, or pushes. Blog runs leave review-ready Markdown,
270
269
  publication checklist in the workflow run directory without writing into a site or calling a CMS.
271
270
  These examples live in the source repository and are not part of the published npm tarball.
272
271
 
273
- #### Loop
272
+ #### Calendar
274
273
 
275
274
  Workflow definitions are exposed like skills, so the agent can choose one for the job. A
276
- loop can send a subagent to fetch the next task, then dispatch the workflow that matches
275
+ Calendar event can send a subagent to fetch the next task, then dispatch the workflow that matches
277
276
  it. One session becomes the dispatcher instead of the place every job has to fit.
278
277
 
279
278
  ## Features
@@ -308,7 +307,7 @@ The fixed `@agimon-ai/po-artifact` package gives each session a durable artifact
308
307
  names it in the system prompt, and shows recent artifacts in web and native Activity.
309
308
  The Artifacts heading opens all files in that session's folder as a grid.
310
309
  [`@agimon-ai/po-log`][pkg-po-log] collects session events, while
311
- [`@agimon-ai/po-telemetry`][pkg-po-telemetry] is the library-level telemetry adapter.
310
+ `@agimon-ai/po-core/telemetry` is the library-level telemetry adapter. Po Log's `logsink` code-mode namespace reads session evidence and explicitly selected cross-session history.
312
311
 
313
312
  Runner selects matching RMUX and RTK native artifacts automatically. Do not install them directly.
314
313
  The packages cover macOS and Linux on arm64 and x64 for both [RMUX][pkg-rmux-darwin-arm64] and
@@ -395,11 +394,9 @@ choices, and accepts the next spoken response as an ordinary user message.
395
394
 
396
395
  Po logging records operational metadata such as counters, spans, session IDs, tool names, and
397
396
  errors. Callers remain responsible for values they attach to telemetry. Native diagnostics expose
398
- current-session metrics, and [`@agimon-ai/log-sink-mcp`][pkg-log-sink-mcp] provides historical lookup
397
+ current-session metrics, and [`@agimon-ai/po-logsink`][pkg-po-logsink] provides historical lookup
399
398
  when a sink is configured.
400
399
 
401
- ### Modes and automation
402
-
403
400
  #### Plan mode
404
401
 
405
402
  A promise to "only plan" is not a permission boundary. [`@agimon-ai/po-plan`][pkg-po-plan]
@@ -408,11 +405,13 @@ for approval. It does not sandbox Bash, external tools, or the operating system.
408
405
  planning tools and web review surface; terminal planning menus are no longer available.
409
406
  Turn it on when the approach should be settled before the files move.
410
407
 
411
- #### Loop mode
408
+ #### Calendar layer
412
409
 
413
- [`@agimon-ai/po-loop`][pkg-po-loop] is an in-session scheduler. It runs a prompt immediately
414
- and then repeats it on an interval; several loops can coexist. Native `loop_start`, `loop_list`,
415
- and `loop_stop` tools control recurring checks and prompts in the current session.
410
+ [`@agimon-ai/po-calendar`][pkg-po-calendar] schedules durable prompts, workflows and plugin actions.
411
+ Keep the calendar layer in the home default major mode for the scheduler. Workflow success means launched,
412
+ not finished. Plugin-managed events cannot be edited, but pause, resume, run now and cancel remain available.
413
+ Busy runs and downtime are skipped, never replayed. Back up before upgrading: older Calendar versions
414
+ cannot read events saved with workflow, action or assignment fields.
416
415
 
417
416
  #### Goal mode
418
417
 
@@ -420,7 +419,7 @@ and `loop_stop` tools control recurring checks and prompts in the current sessio
420
419
  you end it. Native goal tools manage the active objective and repository history. Finished goals
421
420
  stop contributing active instructions and tools but remain in history when you want to restart one.
422
421
 
423
- #### Workflow mode
422
+ #### Workflow layer
424
423
 
425
424
  [`@agimon-ai/po-workflow`][pkg-po-workflow] runs GitHub Actions-style job graphs with
426
425
  dependencies, timeouts, artifacts, and a separate Po session for each step. Native workflow tools
@@ -492,7 +491,6 @@ configuration:
492
491
  default:
493
492
  packages:
494
493
  - '@agimon-ai/po-help'
495
- - '@agimon-ai/po-hook'
496
494
  - '@agimon-ai/po-goal'
497
495
  - '@agimon-ai/po-voice'
498
496
  - '@agimon-ai/po-runner'
@@ -501,13 +499,17 @@ default:
501
499
  - '@agimon-ai/po-edit'
502
500
  - '@agimon-ai/po-file-edit'
503
501
  - '@agimon-ai/po-autocompact'
504
- - '@agimon-ai/po-loop'
505
502
  - '@agimon-ai/po-plan'
506
- - '@agimon-ai/po-workflow'
507
503
  - '@agimon-ai/po-log'
508
504
  - '@agimon-ai/po-mcp'
509
505
 
510
506
  layers:
507
+ calendar:
508
+ packages:
509
+ - '@agimon-ai/po-calendar'
510
+ workflow:
511
+ packages:
512
+ - '@agimon-ai/po-workflow'
511
513
  team:
512
514
  packages:
513
515
  - name: '@agimon-ai/po-team'
@@ -523,10 +525,10 @@ defaultMajorMode: copilot
523
525
  majorMode:
524
526
  minimal:
525
527
  description: Lean sessions with delegation and little else.
526
- layers: [team]
528
+ layers: [team, workflow, calendar]
527
529
  copilot:
528
530
  description: General coding with delegation and review tools.
529
- layers: [team, review]
531
+ layers: [team, review, workflow, calendar]
530
532
  ```
531
533
 
532
534
  Order matters: Po assembles `default.packages` first, then the selected layers and their
@@ -536,6 +538,11 @@ composition, not a mystery bag of shared configuration. Home and repository `lay
536
538
  sources declare `default`, the repository block replaces the personal block as one whole package
537
539
  list.
538
540
 
541
+ Workflow is selected through the `workflow` layer, not a minor-mode switch. New seeds
542
+ include it in `minimal`, `copilot` and `examples`; remove the layer from a mode to omit it.
543
+ Existing `default.packages` entries still work and deduplicate with the layer. No config
544
+ migration runs, and persisted `minorModes: [workflow]` has no effect.
545
+
539
546
  Configurations created before the hashline tools were split may contain only `po-edit`.
540
547
  Replace that entry with the ordered `po-read`, `po-grep`, and `po-edit` trio. Init
541
548
  preserves existing configuration unless it is run with `--force`.
@@ -650,23 +657,22 @@ process environment and operating-system privileges; their logs may contain comm
650
657
  secrets. MCP credentials may live in the system keyring or private configuration files.
651
658
 
652
659
  Voice can keep PCM capture and transcription local when local engines are selected, but transcript
653
- text and model requests follow the configured providers. Loop, Workflow, Plan, Autocompact, Team,
660
+ text and model requests follow the configured providers. Calendar, Workflow, Plan, Autocompact, Team,
654
661
  and autonomous Voice can make additional model calls. Telemetry is disabled or redirected through
655
662
  its owning package's controls; values supplied by callers are not automatically scrubbed.
656
663
 
657
664
  ## CLI reference
658
665
 
659
- | Command or option | What it does |
660
- | ---------------------------------------- | ---------------------------------------------------------------------------------- |
661
- | `po` | Starts the `po-web` console and its headless `po-server`; arguments go to po-web |
662
- | `po init` | Seeds personal config and removes Po entries earlier versions wrote to Pi settings |
663
- | `po sync` | Publishes the current repository, or the global composition outside repositories |
664
- | `po sync --check` | Exits non-zero when the applicable registered generation is missing or stale |
665
- | `po compat <codex\|claude\|antigravity>` | Resolves the selected matrix and launches the compatibility adapter |
666
- | `po-runner` | Inspects and controls supervised Runner processes and logs |
667
- | `--explain` | Prints the resolved matrix and estimated prompt cost without launching Pi |
668
- | `--emit-mcp <dir>`, `--no-mcp` | Writes the resolved MCP config or disables MCP for one run |
669
- | `--` and remaining arguments | Forwards provider or Pi arguments unchanged where the selected command allows it |
666
+ | Command or option | What it does |
667
+ | ------------------------------ | ---------------------------------------------------------------------------------- |
668
+ | `po` | Starts the `po-web` console and its headless `po-server`; arguments go to po-web |
669
+ | `po init` | Seeds personal config and removes Po entries earlier versions wrote to Pi settings |
670
+ | `po sync` | Publishes the current repository, or the global composition outside repositories |
671
+ | `po sync --check` | Exits non-zero when the applicable registered generation is missing or stale |
672
+ | `po-runner` | Inspects and controls supervised Runner processes and logs |
673
+ | `--explain` | Prints the resolved matrix and estimated prompt cost without launching Pi |
674
+ | `--emit-mcp <dir>`, `--no-mcp` | Writes the resolved MCP config or disables MCP for one run |
675
+ | `--` and remaining arguments | Forwards provider or Pi arguments unchanged where the selected command allows it |
670
676
 
671
677
  ## Troubleshooting and direct use
672
678
 
@@ -674,9 +680,9 @@ its owning package's controls; values supplied by callers are not automatically
674
680
  to install them and rebuild synchronized state.
675
681
  - If neither RMUX nor tmux is available, non-interactive Runner calls report the supervised subprocess
676
682
  fallback. Interactive calls require RMUX or tmux. Linux native artifacts require a compatible loader and libc.
677
- - Po-owned packages expose native server, web, and MCP facets, not Pi entry points. Install them with
678
- `npm install` or select them in `modes.yaml`. Third-party Pi settings packages still load through
679
- the upstream SDK extension host, including provider registration before model selection.
683
+ - Po-owned packages expose native server, web, and MCP contributions, not Pi entry points. Install
684
+ them with `npm install` or select them in `modes.yaml`. Third-party Pi settings packages still load
685
+ through the upstream SDK extension host, including provider registration before model selection.
680
686
  - Terminal leader menus, shortcuts, overlays, and widgets are no longer shipped. Native commands,
681
687
  tools, and web panels remain where the owning package provides them. RMUX and RTK artifacts are
682
688
  selected by Runner and should not be installed directly.
@@ -689,8 +695,8 @@ its owning package's controls; values supplied by callers are not automatically
689
695
  ## Architecture
690
696
 
691
697
  See [Architecture](https://github.com/AgiFlow/po/blob/main/docs/architecture.md) for native
692
- server/web/MCP facets, canonical fingerprints, transition classification, shared-host Cordis
693
- lifecycle ownership, and parent/child isolation. Po no longer composes its own Pi factories;
698
+ server/web/MCP contributions, canonical fingerprints, transition classification, shared-host
699
+ Cordis lifecycle ownership, and parent/child isolation. Po no longer composes its own Pi factories;
694
700
  third-party Pi packages remain supported through the SDK host.
695
701
 
696
702
  ## Development
@@ -709,7 +715,7 @@ Po is maintained by [Agimon](https://agimon.ai/about).
709
715
 
710
716
  ## License
711
717
 
712
- MIT
718
+ Business Source License 1.1: free for personal use, organisations under USD 1M revenue, non-profits and education. See [LICENSE](LICENSE) and https://agimon.ai/licensing.
713
719
 
714
720
  ## Maintainer release order
715
721
 
@@ -733,7 +739,6 @@ loaded extension graph inside the same release boundary as the packages that con
733
739
  [pkg-po-edit]: https://www.npmjs.com/package/@agimon-ai/po-edit
734
740
  [pkg-po-file-edit]: https://www.npmjs.com/package/@agimon-ai/po-file-edit
735
741
  [pkg-po-log]: https://www.npmjs.com/package/@agimon-ai/po-log
736
- [pkg-po-telemetry]: https://www.npmjs.com/package/@agimon-ai/po-telemetry
737
742
  [pkg-rmux-darwin-arm64]: https://www.npmjs.com/package/@agimon-ai/po-runner-rmux-darwin-arm64
738
743
  [pkg-rmux-darwin-x64]: https://www.npmjs.com/package/@agimon-ai/po-runner-rmux-darwin-x64
739
744
  [pkg-rmux-linux-arm64]: https://www.npmjs.com/package/@agimon-ai/po-runner-rmux-linux-arm64
@@ -749,9 +754,9 @@ loaded extension graph inside the same release boundary as the packages that con
749
754
  [pkg-po-help]: https://www.npmjs.com/package/@agimon-ai/po-help
750
755
  [pkg-po-mcp]: https://www.npmjs.com/package/@agimon-ai/po-mcp
751
756
  [pkg-po-user-feedback]: https://www.npmjs.com/package/@agimon-ai/po-user-feedback
752
- [pkg-log-sink-mcp]: https://www.npmjs.com/package/@agimon-ai/log-sink-mcp
757
+ [pkg-po-logsink]: ../../tooling/po-logsink/README.md
753
758
  [pkg-po-plan]: https://www.npmjs.com/package/@agimon-ai/po-plan
754
- [pkg-po-loop]: https://www.npmjs.com/package/@agimon-ai/po-loop
759
+ [pkg-po-calendar]: https://www.npmjs.com/package/@agimon-ai/po-calendar
755
760
  [pkg-po-goal]: https://www.npmjs.com/package/@agimon-ai/po-goal
756
761
  [pkg-po-workflow]: https://www.npmjs.com/package/@agimon-ai/po-workflow
757
762
  [pkg-po-voice]: https://www.npmjs.com/package/@agimon-ai/po-voice
package/dist/bin/cli.cjs CHANGED
@@ -1,23 +1,26 @@
1
1
  #!/usr/bin/env node
2
2
  const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
3
3
  const require_agentDirectory = require("../src/bin/agentDirectory.cjs");
4
- let node_fs = require("node:fs");
5
- node_fs = require_runtime.__toESM(node_fs, 1);
6
4
  let node_path = require("node:path");
7
5
  node_path = require_runtime.__toESM(node_path, 1);
6
+ let node_fs_promises = require("node:fs/promises");
7
+ node_fs_promises = require_runtime.__toESM(node_fs_promises, 1);
8
8
  let node_url = require("node:url");
9
9
  //#region src/bin/cli.ts
10
10
  /**
11
11
  * CLI Entry Point for po
12
12
  *
13
13
  * The executable installed as the `po` binary, and the file the repository
14
- * launchers (pi.sh, claude.sh, codex.sh) invoke directly from source.
14
+ * launcher (pi.sh) invoke directly from source.
15
15
  */
16
16
  async function main() {
17
+ await require_agentDirectory.initializeAgentDirectory();
17
18
  if (require_agentDirectory.testRoot) {
18
19
  const target = node_path.default.join(require_agentDirectory.testRoot, "packages/cli/po/dist/bin/cli.mjs");
19
- if (!node_fs.default.existsSync(target)) throw new Error(`Local test CLI build is missing: ${target}. Build @agimon-ai/po first.`);
20
- if (node_fs.default.realpathSync(target) !== node_fs.default.realpathSync((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href))) {
20
+ if (await node_fs_promises.default.realpath(target).catch((error) => {
21
+ if (error.code === "ENOENT") throw new Error(`Local test CLI build is missing: ${target}. Build @agimon-ai/po first.`);
22
+ throw error;
23
+ }) !== await node_fs_promises.default.realpath((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href))) {
21
24
  await import((0, node_url.pathToFileURL)(target).href);
22
25
  return;
23
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cli.cjs","names":["testRoot","path","fs","fileURLToPath","pathToFileURL"],"sources":["../../src/bin/cli.ts"],"sourcesContent":["#!/usr/bin/env node\n\n/**\n * CLI Entry Point for po\n *\n * The executable installed as the `po` binary, and the file the repository\n * launchers (pi.sh, claude.sh, codex.sh) invoke directly from source.\n */\n\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\n\nimport { testRoot } from './agentDirectory';\n\nasync function main(): Promise<number | undefined> {\n if (testRoot) {\n const target = path.join(testRoot, 'packages/cli/po/dist/bin/cli.mjs');\n if (!fs.existsSync(target))\n throw new Error(`Local test CLI build is missing: ${target}. Build @agimon-ai/po first.`);\n if (fs.realpathSync(target) !== fs.realpathSync(fileURLToPath(import.meta.url))) {\n await import(pathToFileURL(target).href);\n return;\n }\n }\n const { HARNESS_VERSION, printHelp } = await import('../cli/help');\n const { informationalRequest, routeCommand } = await import('../cli/router');\n\n const args = process.argv.slice(2);\n // A named subcommand parses its own arguments, including its own --help, so the\n // fast path below must not answer for it.\n const ownsArguments = routeCommand(args) !== undefined;\n\n // Keep informational startup independent from telemetry, configuration, Pi,\n // and the extension compiler. Those graphs are useful for a real command but\n // used to account for almost all of `po --help` and `po --version`.\n const informational = ownsArguments ? undefined : informationalRequest(args);\n const informationalExit =\n informational === 'help'\n ? (() => {\n printHelp();\n return 0;\n })()\n : informational === 'version'\n ? (() => {\n process.stdout.write(`${HARNESS_VERSION}\\n`);\n return 0;\n })()\n : undefined;\n\n const run =\n informationalExit === undefined\n ? import('../cli/cliApp').then(({ runCli }) => runCli(args))\n : Promise.resolve(informationalExit);\n\n return run;\n}\n\nmain().then(\n (exitCode) => {\n if (exitCode !== undefined) process.exitCode = exitCode;\n },\n (error: unknown) => {\n const message = error instanceof Error ? error.message : String(error);\n process.stderr.write(`[po] ${message}\\n`);\n process.exitCode = 1;\n },\n);\n"],"mappings":";;;;;;;;;;;;;;;AAeA,eAAe,OAAoC;CACjD,IAAIA,uBAAAA,UAAU;EACZ,MAAM,SAASC,UAAAA,QAAK,KAAKD,uBAAAA,UAAU,kCAAkC;EACrE,IAAI,CAACE,QAAAA,QAAG,WAAW,MAAM,GACvB,MAAM,IAAI,MAAM,oCAAoC,OAAO,6BAA6B;EAC1F,IAAIA,QAAAA,QAAG,aAAa,MAAM,MAAMA,QAAAA,QAAG,cAAA,GAAaC,SAAAA,cAAAA,CAAAA,QAAAA,KAAAA,CAAAA,CAAAA,cAAAA,UAAAA,CAAAA,CAAAA,IAA6B,CAAC,GAAG;GAC/E,MAAM,QAAA,GAAOC,SAAAA,cAAAA,CAAc,MAAM,CAAC,CAAC;GACnC;EACF;CACF;CACA,MAAM,EAAE,iBAAiB,cAAc,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,qBAAA,CAAA;CAC7C,MAAM,EAAE,sBAAsB,iBAAiB,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,uBAAA,CAAA;CAErD,MAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;CAQjC,MAAM,gBALgB,aAAa,IAAI,MAAM,KAAA,IAKP,KAAA,IAAY,qBAAqB,IAAI;CAC3E,MAAM,oBACJ,kBAAkB,gBACP;EACL,UAAU;EACV,OAAO;CACT,EAAA,CAAG,IACH,kBAAkB,mBACT;EACL,QAAQ,OAAO,MAAM,GAAG,gBAAgB,GAAG;EAC3C,OAAO;CACT,EAAA,CAAG,IACH,KAAA;CAOR,OAJE,sBAAsB,KAAA,IAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAClB,uBAAA,CAAA,CAAA,CAAwB,MAAM,EAAE,aAAa,OAAO,IAAI,CAAC,IACzD,QAAQ,QAAQ,iBAAiB;AAGzC;AAEA,KAAK,CAAC,CAAC,MACJ,aAAa;CACZ,IAAI,aAAa,KAAA,GAAW,QAAQ,WAAW;AACjD,IACC,UAAmB;CAClB,MAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;CACrE,QAAQ,OAAO,MAAM,QAAQ,QAAQ,GAAG;CACxC,QAAQ,WAAW;AACrB,CACF"}
1
+ {"version":3,"file":"cli.cjs","names":["initializeAgentDirectory","testRoot","path","fs","fileURLToPath","pathToFileURL"],"sources":["../../src/bin/cli.ts"],"sourcesContent":["#!/usr/bin/env node\n\n/**\n * CLI Entry Point for po\n *\n * The executable installed as the `po` binary, and the file the repository\n * launcher (pi.sh) invoke directly from source.\n */\n\nimport fs from 'node:fs/promises';\nimport path from 'node:path';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\n\nimport { initializeAgentDirectory, testRoot } from './agentDirectory';\n\nasync function main(): Promise<number | undefined> {\n await initializeAgentDirectory();\n if (testRoot) {\n const target = path.join(testRoot, 'packages/cli/po/dist/bin/cli.mjs');\n const realTarget = await fs.realpath(target).catch((error: NodeJS.ErrnoException) => {\n if (error.code === 'ENOENT')\n throw new Error(`Local test CLI build is missing: ${target}. Build @agimon-ai/po first.`);\n throw error;\n });\n if (realTarget !== (await fs.realpath(fileURLToPath(import.meta.url)))) {\n await import(pathToFileURL(target).href);\n return;\n }\n }\n const { HARNESS_VERSION, printHelp } = await import('../cli/help');\n const { informationalRequest, routeCommand } = await import('../cli/router');\n\n const args = process.argv.slice(2);\n // A named subcommand parses its own arguments, including its own --help, so the\n // fast path below must not answer for it.\n const ownsArguments = routeCommand(args) !== undefined;\n\n // Keep informational startup independent from telemetry, configuration, Pi,\n // and the extension compiler. Those graphs are useful for a real command but\n // used to account for almost all of `po --help` and `po --version`.\n const informational = ownsArguments ? undefined : informationalRequest(args);\n const informationalExit =\n informational === 'help'\n ? (() => {\n printHelp();\n return 0;\n })()\n : informational === 'version'\n ? (() => {\n process.stdout.write(`${HARNESS_VERSION}\\n`);\n return 0;\n })()\n : undefined;\n\n const run =\n informationalExit === undefined\n ? import('../cli/cliApp').then(({ runCli }) => runCli(args))\n : Promise.resolve(informationalExit);\n\n return run;\n}\n\nmain().then(\n (exitCode) => {\n if (exitCode !== undefined) process.exitCode = exitCode;\n },\n (error: unknown) => {\n const message = error instanceof Error ? error.message : String(error);\n process.stderr.write(`[po] ${message}\\n`);\n process.exitCode = 1;\n },\n);\n"],"mappings":";;;;;;;;;;;;;;;AAeA,eAAe,OAAoC;CACjD,MAAMA,uBAAAA,yBAAyB;CAC/B,IAAIC,uBAAAA,UAAU;EACZ,MAAM,SAASC,UAAAA,QAAK,KAAKD,uBAAAA,UAAU,kCAAkC;EAMrE,IAAI,MALqBE,iBAAAA,QAAG,SAAS,MAAM,CAAC,CAAC,OAAO,UAAiC;GACnF,IAAI,MAAM,SAAS,UACjB,MAAM,IAAI,MAAM,oCAAoC,OAAO,6BAA6B;GAC1F,MAAM;EACR,CAAC,MACmB,MAAMA,iBAAAA,QAAG,UAAA,GAASC,SAAAA,cAAAA,CAAAA,QAAAA,KAAAA,CAAAA,CAAAA,cAAAA,UAAAA,CAAAA,CAAAA,IAA6B,CAAC,GAAI;GACtE,MAAM,QAAA,GAAOC,SAAAA,cAAAA,CAAc,MAAM,CAAC,CAAC;GACnC;EACF;CACF;CACA,MAAM,EAAE,iBAAiB,cAAc,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,qBAAA,CAAA;CAC7C,MAAM,EAAE,sBAAsB,iBAAiB,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,uBAAA,CAAA;CAErD,MAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;CAQjC,MAAM,gBALgB,aAAa,IAAI,MAAM,KAAA,IAKP,KAAA,IAAY,qBAAqB,IAAI;CAC3E,MAAM,oBACJ,kBAAkB,gBACP;EACL,UAAU;EACV,OAAO;CACT,EAAA,CAAG,IACH,kBAAkB,mBACT;EACL,QAAQ,OAAO,MAAM,GAAG,gBAAgB,GAAG;EAC3C,OAAO;CACT,EAAA,CAAG,IACH,KAAA;CAOR,OAJE,sBAAsB,KAAA,IAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAClB,uBAAA,CAAA,CAAA,CAAwB,MAAM,EAAE,aAAa,OAAO,IAAI,CAAC,IACzD,QAAQ,QAAQ,iBAAiB;AAGzC;AAEA,KAAK,CAAC,CAAC,MACJ,aAAa;CACZ,IAAI,aAAa,KAAA,GAAW,QAAQ,WAAW;AACjD,IACC,UAAmB;CAClB,MAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;CACrE,QAAQ,OAAO,MAAM,QAAQ,QAAQ,GAAG;CACxC,QAAQ,WAAW;AACrB,CACF"}
package/dist/bin/cli.mjs CHANGED
@@ -1,20 +1,23 @@
1
1
  #!/usr/bin/env node
2
- import { testRoot } from "../src/bin/agentDirectory.mjs";
3
- import fs from "node:fs";
2
+ import { initializeAgentDirectory, testRoot } from "../src/bin/agentDirectory.mjs";
4
3
  import path from "node:path";
4
+ import fs from "node:fs/promises";
5
5
  import { fileURLToPath, pathToFileURL } from "node:url";
6
6
  //#region src/bin/cli.ts
7
7
  /**
8
8
  * CLI Entry Point for po
9
9
  *
10
10
  * The executable installed as the `po` binary, and the file the repository
11
- * launchers (pi.sh, claude.sh, codex.sh) invoke directly from source.
11
+ * launcher (pi.sh) invoke directly from source.
12
12
  */
13
13
  async function main() {
14
+ await initializeAgentDirectory();
14
15
  if (testRoot) {
15
16
  const target = path.join(testRoot, "packages/cli/po/dist/bin/cli.mjs");
16
- if (!fs.existsSync(target)) throw new Error(`Local test CLI build is missing: ${target}. Build @agimon-ai/po first.`);
17
- if (fs.realpathSync(target) !== fs.realpathSync(fileURLToPath(import.meta.url))) {
17
+ if (await fs.realpath(target).catch((error) => {
18
+ if (error.code === "ENOENT") throw new Error(`Local test CLI build is missing: ${target}. Build @agimon-ai/po first.`);
19
+ throw error;
20
+ }) !== await fs.realpath(fileURLToPath(import.meta.url))) {
18
21
  await import(pathToFileURL(target).href);
19
22
  return;
20
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cli.mjs","names":[],"sources":["../../src/bin/cli.ts"],"sourcesContent":["#!/usr/bin/env node\n\n/**\n * CLI Entry Point for po\n *\n * The executable installed as the `po` binary, and the file the repository\n * launchers (pi.sh, claude.sh, codex.sh) invoke directly from source.\n */\n\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\n\nimport { testRoot } from './agentDirectory';\n\nasync function main(): Promise<number | undefined> {\n if (testRoot) {\n const target = path.join(testRoot, 'packages/cli/po/dist/bin/cli.mjs');\n if (!fs.existsSync(target))\n throw new Error(`Local test CLI build is missing: ${target}. Build @agimon-ai/po first.`);\n if (fs.realpathSync(target) !== fs.realpathSync(fileURLToPath(import.meta.url))) {\n await import(pathToFileURL(target).href);\n return;\n }\n }\n const { HARNESS_VERSION, printHelp } = await import('../cli/help');\n const { informationalRequest, routeCommand } = await import('../cli/router');\n\n const args = process.argv.slice(2);\n // A named subcommand parses its own arguments, including its own --help, so the\n // fast path below must not answer for it.\n const ownsArguments = routeCommand(args) !== undefined;\n\n // Keep informational startup independent from telemetry, configuration, Pi,\n // and the extension compiler. Those graphs are useful for a real command but\n // used to account for almost all of `po --help` and `po --version`.\n const informational = ownsArguments ? undefined : informationalRequest(args);\n const informationalExit =\n informational === 'help'\n ? (() => {\n printHelp();\n return 0;\n })()\n : informational === 'version'\n ? (() => {\n process.stdout.write(`${HARNESS_VERSION}\\n`);\n return 0;\n })()\n : undefined;\n\n const run =\n informationalExit === undefined\n ? import('../cli/cliApp').then(({ runCli }) => runCli(args))\n : Promise.resolve(informationalExit);\n\n return run;\n}\n\nmain().then(\n (exitCode) => {\n if (exitCode !== undefined) process.exitCode = exitCode;\n },\n (error: unknown) => {\n const message = error instanceof Error ? error.message : String(error);\n process.stderr.write(`[po] ${message}\\n`);\n process.exitCode = 1;\n },\n);\n"],"mappings":";;;;;;;;;;;;AAeA,eAAe,OAAoC;CACjD,IAAI,UAAU;EACZ,MAAM,SAAS,KAAK,KAAK,UAAU,kCAAkC;EACrE,IAAI,CAAC,GAAG,WAAW,MAAM,GACvB,MAAM,IAAI,MAAM,oCAAoC,OAAO,6BAA6B;EAC1F,IAAI,GAAG,aAAa,MAAM,MAAM,GAAG,aAAa,cAAc,YAAY,GAAG,CAAC,GAAG;GAC/E,MAAM,OAAO,cAAc,MAAM,CAAC,CAAC;GACnC;EACF;CACF;CACA,MAAM,EAAE,iBAAiB,cAAc,MAAM,OAAO;CACpD,MAAM,EAAE,sBAAsB,iBAAiB,MAAM,OAAO;CAE5D,MAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;CAQjC,MAAM,gBALgB,aAAa,IAAI,MAAM,KAAA,IAKP,KAAA,IAAY,qBAAqB,IAAI;CAC3E,MAAM,oBACJ,kBAAkB,gBACP;EACL,UAAU;EACV,OAAO;CACT,EAAA,CAAG,IACH,kBAAkB,mBACT;EACL,QAAQ,OAAO,MAAM,GAAG,gBAAgB,GAAG;EAC3C,OAAO;CACT,EAAA,CAAG,IACH,KAAA;CAOR,OAJE,sBAAsB,KAAA,IAClB,OAAO,wBAAgB,CAAC,MAAM,EAAE,aAAa,OAAO,IAAI,CAAC,IACzD,QAAQ,QAAQ,iBAAiB;AAGzC;AAEA,KAAK,CAAC,CAAC,MACJ,aAAa;CACZ,IAAI,aAAa,KAAA,GAAW,QAAQ,WAAW;AACjD,IACC,UAAmB;CAClB,MAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;CACrE,QAAQ,OAAO,MAAM,QAAQ,QAAQ,GAAG;CACxC,QAAQ,WAAW;AACrB,CACF"}
1
+ {"version":3,"file":"cli.mjs","names":[],"sources":["../../src/bin/cli.ts"],"sourcesContent":["#!/usr/bin/env node\n\n/**\n * CLI Entry Point for po\n *\n * The executable installed as the `po` binary, and the file the repository\n * launcher (pi.sh) invoke directly from source.\n */\n\nimport fs from 'node:fs/promises';\nimport path from 'node:path';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\n\nimport { initializeAgentDirectory, testRoot } from './agentDirectory';\n\nasync function main(): Promise<number | undefined> {\n await initializeAgentDirectory();\n if (testRoot) {\n const target = path.join(testRoot, 'packages/cli/po/dist/bin/cli.mjs');\n const realTarget = await fs.realpath(target).catch((error: NodeJS.ErrnoException) => {\n if (error.code === 'ENOENT')\n throw new Error(`Local test CLI build is missing: ${target}. Build @agimon-ai/po first.`);\n throw error;\n });\n if (realTarget !== (await fs.realpath(fileURLToPath(import.meta.url)))) {\n await import(pathToFileURL(target).href);\n return;\n }\n }\n const { HARNESS_VERSION, printHelp } = await import('../cli/help');\n const { informationalRequest, routeCommand } = await import('../cli/router');\n\n const args = process.argv.slice(2);\n // A named subcommand parses its own arguments, including its own --help, so the\n // fast path below must not answer for it.\n const ownsArguments = routeCommand(args) !== undefined;\n\n // Keep informational startup independent from telemetry, configuration, Pi,\n // and the extension compiler. Those graphs are useful for a real command but\n // used to account for almost all of `po --help` and `po --version`.\n const informational = ownsArguments ? undefined : informationalRequest(args);\n const informationalExit =\n informational === 'help'\n ? (() => {\n printHelp();\n return 0;\n })()\n : informational === 'version'\n ? (() => {\n process.stdout.write(`${HARNESS_VERSION}\\n`);\n return 0;\n })()\n : undefined;\n\n const run =\n informationalExit === undefined\n ? import('../cli/cliApp').then(({ runCli }) => runCli(args))\n : Promise.resolve(informationalExit);\n\n return run;\n}\n\nmain().then(\n (exitCode) => {\n if (exitCode !== undefined) process.exitCode = exitCode;\n },\n (error: unknown) => {\n const message = error instanceof Error ? error.message : String(error);\n process.stderr.write(`[po] ${message}\\n`);\n process.exitCode = 1;\n },\n);\n"],"mappings":";;;;;;;;;;;;AAeA,eAAe,OAAoC;CACjD,MAAM,yBAAyB;CAC/B,IAAI,UAAU;EACZ,MAAM,SAAS,KAAK,KAAK,UAAU,kCAAkC;EAMrE,IAAI,MALqB,GAAG,SAAS,MAAM,CAAC,CAAC,OAAO,UAAiC;GACnF,IAAI,MAAM,SAAS,UACjB,MAAM,IAAI,MAAM,oCAAoC,OAAO,6BAA6B;GAC1F,MAAM;EACR,CAAC,MACmB,MAAM,GAAG,SAAS,cAAc,YAAY,GAAG,CAAC,GAAI;GACtE,MAAM,OAAO,cAAc,MAAM,CAAC,CAAC;GACnC;EACF;CACF;CACA,MAAM,EAAE,iBAAiB,cAAc,MAAM,OAAO;CACpD,MAAM,EAAE,sBAAsB,iBAAiB,MAAM,OAAO;CAE5D,MAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;CAQjC,MAAM,gBALgB,aAAa,IAAI,MAAM,KAAA,IAKP,KAAA,IAAY,qBAAqB,IAAI;CAC3E,MAAM,oBACJ,kBAAkB,gBACP;EACL,UAAU;EACV,OAAO;CACT,EAAA,CAAG,IACH,kBAAkB,mBACT;EACL,QAAQ,OAAO,MAAM,GAAG,gBAAgB,GAAG;EAC3C,OAAO;CACT,EAAA,CAAG,IACH,KAAA;CAOR,OAJE,sBAAsB,KAAA,IAClB,OAAO,wBAAgB,CAAC,MAAM,EAAE,aAAa,OAAO,IAAI,CAAC,IACzD,QAAQ,QAAQ,iBAAiB;AAGzC;AAEA,KAAK,CAAC,CAAC,MACJ,aAAa;CACZ,IAAI,aAAa,KAAA,GAAW,QAAQ,WAAW;AACjD,IACC,UAAmB;CAClB,MAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;CACrE,QAAQ,OAAO,MAAM,QAAQ,QAAQ,GAAG;CACxC,QAAQ,WAAW;AACrB,CACF"}
@@ -1,16 +1,25 @@
1
1
  #!/usr/bin/env node
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const require_index = require("../src/composition/repository/index.cjs");
4
- require("../src/bin/agentDirectory.cjs");
5
- let node_fs = require("node:fs");
4
+ const require_agentDirectory = require("../src/bin/agentDirectory.cjs");
5
+ let node_fs_promises = require("node:fs/promises");
6
6
  let node_url = require("node:url");
7
7
  let _agimon_ai_po_core_moduleResolution = require("@agimon-ai/po-core/moduleResolution");
8
8
  //#region src/bin/poRunner.ts
9
+ /**
10
+ * CLI Entry Point for po-runner
11
+ *
12
+ * The Runner package is selectable, so this compatibility executable resolves
13
+ * it from the active repository instead of retaining it in Po's dependency
14
+ * closure. The Runner package's own entry only self-invokes when it is argv[1],
15
+ * which it is not once this shim imports it by absolute path.
16
+ */
9
17
  const RUNNER_CLI_EXPORT = "@agimon-ai/po-runner/bin/cli";
10
18
  async function main(argv = process.argv.slice(2)) {
19
+ await require_agentDirectory.initializeAgentDirectory();
11
20
  let repoRoot;
12
21
  try {
13
- repoRoot = require_index.findRepositoryRoot(process.cwd());
22
+ repoRoot = await require_index.findRepositoryRoot(process.cwd());
14
23
  } catch (error) {
15
24
  throw new Error("po-runner must be invoked inside a configured repository.", { cause: error });
16
25
  }
@@ -20,8 +29,16 @@ async function main(argv = process.argv.slice(2)) {
20
29
  if (typeof loaded.main !== "function") throw new Error(`${RUNNER_CLI_EXPORT} does not export a callable main function.`);
21
30
  return loaded.main(argv);
22
31
  }
23
- if (process.argv[1] && (0, node_fs.existsSync)(process.argv[1]) && (0, node_fs.realpathSync)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href)) === (0, node_fs.realpathSync)(process.argv[1])) main().then((exitCode) => {
24
- process.exitCode = exitCode;
32
+ async function runIfMain() {
33
+ if (!process.argv[1]) return void 0;
34
+ if (await (0, node_fs_promises.realpath)(process.argv[1]).catch((error) => {
35
+ if (error.code === "ENOENT") return void 0;
36
+ throw error;
37
+ }) !== await (0, node_fs_promises.realpath)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href))) return void 0;
38
+ return main();
39
+ }
40
+ runIfMain().then((exitCode) => {
41
+ if (exitCode !== void 0) process.exitCode = exitCode;
25
42
  }, (error) => {
26
43
  const message = error instanceof Error ? error.message : String(error);
27
44
  process.stderr.write(`[po-runner] ${message}\n`);
@@ -1 +1 @@
1
- {"version":3,"file":"poRunner.cjs","names":["findRepositoryRoot","consumerPackageEntry","pathToFileURL","existsSync","realpathSync","fileURLToPath"],"sources":["../../src/bin/poRunner.ts"],"sourcesContent":["#!/usr/bin/env node\n\n/**\n * CLI Entry Point for po-runner\n *\n * The Runner package is selectable, so this compatibility executable resolves\n * it from the active repository instead of retaining it in Po's dependency\n * closure. The Runner package's own entry only self-invokes when it is argv[1],\n * which it is not once this shim imports it by absolute path.\n */\n\nimport './agentDirectory';\nimport { existsSync, realpathSync } from 'node:fs';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\n\nimport { consumerPackageEntry } from '@agimon-ai/po-core/moduleResolution';\n\nimport { findRepositoryRoot } from '../composition/repository';\n\nconst RUNNER_CLI_EXPORT = '@agimon-ai/po-runner/bin/cli';\n\ninterface RunnerCliModule {\n readonly main?: unknown;\n}\n\nexport async function main(argv: readonly string[] = process.argv.slice(2)): Promise<number> {\n let repoRoot: string;\n try {\n repoRoot = findRepositoryRoot(process.cwd());\n } catch (error) {\n throw new Error('po-runner must be invoked inside a configured repository.', { cause: error });\n }\n const entry = consumerPackageEntry(RUNNER_CLI_EXPORT, repoRoot);\n if (!entry) {\n throw new Error(\n 'Po Runner is not installed for this repository. Add @agimon-ai/po-runner to .po/modes.yaml and run po sync.',\n );\n }\n const loaded = (await import(pathToFileURL(entry).href)) as RunnerCliModule;\n if (typeof loaded.main !== 'function') {\n throw new Error(`${RUNNER_CLI_EXPORT} does not export a callable main function.`);\n }\n return (loaded.main as (args: readonly string[]) => Promise<number>)(argv);\n}\n\nif (\n process.argv[1] &&\n existsSync(process.argv[1]) &&\n realpathSync(fileURLToPath(import.meta.url)) === realpathSync(process.argv[1])\n) {\n main().then(\n (exitCode) => {\n process.exitCode = exitCode;\n },\n (error: unknown) => {\n const message = error instanceof Error ? error.message : String(error);\n process.stderr.write(`[po-runner] ${message}\\n`);\n process.exitCode = 1;\n },\n );\n}\n"],"mappings":";;;;;;;;AAmBA,MAAM,oBAAoB;AAM1B,eAAsB,KAAK,OAA0B,QAAQ,KAAK,MAAM,CAAC,GAAoB;CAC3F,IAAI;CACJ,IAAI;EACF,WAAWA,cAAAA,mBAAmB,QAAQ,IAAI,CAAC;CAC7C,SAAS,OAAO;EACd,MAAM,IAAI,MAAM,6DAA6D,EAAE,OAAO,MAAM,CAAC;CAC/F;CACA,MAAM,SAAA,GAAQC,oCAAAA,qBAAAA,CAAqB,mBAAmB,QAAQ;CAC9D,IAAI,CAAC,OACH,MAAM,IAAI,MACR,6GACF;CAEF,MAAM,SAAU,MAAM,QAAA,GAAOC,SAAAA,cAAAA,CAAc,KAAK,CAAC,CAAC;CAClD,IAAI,OAAO,OAAO,SAAS,YACzB,MAAM,IAAI,MAAM,GAAG,kBAAkB,2CAA2C;CAElF,OAAQ,OAAO,KAAsD,IAAI;AAC3E;AAEA,IACE,QAAQ,KAAK,OAAA,GACbC,QAAAA,WAAAA,CAAW,QAAQ,KAAK,EAAE,MAAA,GAC1BC,QAAAA,aAAAA,EAAAA,GAAaC,SAAAA,cAAAA,CAAAA,QAAAA,KAAAA,CAAAA,CAAAA,cAAAA,UAAAA,CAAAA,CAAAA,IAA6B,CAAC,OAAA,GAAMD,QAAAA,aAAAA,CAAa,QAAQ,KAAK,EAAE,GAE7E,KAAK,CAAC,CAAC,MACJ,aAAa;CACZ,QAAQ,WAAW;AACrB,IACC,UAAmB;CAClB,MAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;CACrE,QAAQ,OAAO,MAAM,eAAe,QAAQ,GAAG;CAC/C,QAAQ,WAAW;AACrB,CACF"}
1
+ {"version":3,"file":"poRunner.cjs","names":["initializeAgentDirectory","findRepositoryRoot","consumerPackageEntry","pathToFileURL","realpath","fileURLToPath"],"sources":["../../src/bin/poRunner.ts"],"sourcesContent":["#!/usr/bin/env node\n\n/**\n * CLI Entry Point for po-runner\n *\n * The Runner package is selectable, so this compatibility executable resolves\n * it from the active repository instead of retaining it in Po's dependency\n * closure. The Runner package's own entry only self-invokes when it is argv[1],\n * which it is not once this shim imports it by absolute path.\n */\n\nimport { realpath } from 'node:fs/promises';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\n\nimport { consumerPackageEntry } from '@agimon-ai/po-core/moduleResolution';\n\nimport { findRepositoryRoot } from '../composition/repository';\nimport { initializeAgentDirectory } from './agentDirectory';\n\nconst RUNNER_CLI_EXPORT = '@agimon-ai/po-runner/bin/cli';\n\ninterface RunnerCliModule {\n readonly main?: unknown;\n}\n\nexport async function main(argv: readonly string[] = process.argv.slice(2)): Promise<number> {\n await initializeAgentDirectory();\n let repoRoot: string;\n try {\n repoRoot = await findRepositoryRoot(process.cwd());\n } catch (error) {\n throw new Error('po-runner must be invoked inside a configured repository.', { cause: error });\n }\n const entry = consumerPackageEntry(RUNNER_CLI_EXPORT, repoRoot);\n if (!entry) {\n throw new Error(\n 'Po Runner is not installed for this repository. Add @agimon-ai/po-runner to .po/modes.yaml and run po sync.',\n );\n }\n const loaded = (await import(pathToFileURL(entry).href)) as RunnerCliModule;\n if (typeof loaded.main !== 'function') {\n throw new Error(`${RUNNER_CLI_EXPORT} does not export a callable main function.`);\n }\n return (loaded.main as (args: readonly string[]) => Promise<number>)(argv);\n}\n\nasync function runIfMain(): Promise<number | undefined> {\n if (!process.argv[1]) return undefined;\n const entry = await realpath(process.argv[1]).catch((error: NodeJS.ErrnoException) => {\n if (error.code === 'ENOENT') return undefined;\n throw error;\n });\n if (entry !== (await realpath(fileURLToPath(import.meta.url)))) return undefined;\n return main();\n}\n\nrunIfMain().then(\n (exitCode) => {\n if (exitCode !== undefined) process.exitCode = exitCode;\n },\n (error: unknown) => {\n const message = error instanceof Error ? error.message : String(error);\n process.stderr.write(`[po-runner] ${message}\\n`);\n process.exitCode = 1;\n },\n);\n"],"mappings":";;;;;;;;;;;;;;;;AAmBA,MAAM,oBAAoB;AAM1B,eAAsB,KAAK,OAA0B,QAAQ,KAAK,MAAM,CAAC,GAAoB;CAC3F,MAAMA,uBAAAA,yBAAyB;CAC/B,IAAI;CACJ,IAAI;EACF,WAAW,MAAMC,cAAAA,mBAAmB,QAAQ,IAAI,CAAC;CACnD,SAAS,OAAO;EACd,MAAM,IAAI,MAAM,6DAA6D,EAAE,OAAO,MAAM,CAAC;CAC/F;CACA,MAAM,SAAA,GAAQC,oCAAAA,qBAAAA,CAAqB,mBAAmB,QAAQ;CAC9D,IAAI,CAAC,OACH,MAAM,IAAI,MACR,6GACF;CAEF,MAAM,SAAU,MAAM,QAAA,GAAOC,SAAAA,cAAAA,CAAc,KAAK,CAAC,CAAC;CAClD,IAAI,OAAO,OAAO,SAAS,YACzB,MAAM,IAAI,MAAM,GAAG,kBAAkB,2CAA2C;CAElF,OAAQ,OAAO,KAAsD,IAAI;AAC3E;AAEA,eAAe,YAAyC;CACtD,IAAI,CAAC,QAAQ,KAAK,IAAI,OAAO,KAAA;CAK7B,IAAI,OAAA,GAJgBC,iBAAAA,SAAAA,CAAS,QAAQ,KAAK,EAAE,CAAC,CAAC,OAAO,UAAiC;EACpF,IAAI,MAAM,SAAS,UAAU,OAAO,KAAA;EACpC,MAAM;CACR,CAAC,MACc,OAAA,GAAMA,iBAAAA,SAAAA,EAAAA,GAASC,SAAAA,cAAAA,CAAAA,QAAAA,KAAAA,CAAAA,CAAAA,cAAAA,UAAAA,CAAAA,CAAAA,IAA6B,CAAC,GAAI,OAAO,KAAA;CACvE,OAAO,KAAK;AACd;AAEA,UAAU,CAAC,CAAC,MACT,aAAa;CACZ,IAAI,aAAa,KAAA,GAAW,QAAQ,WAAW;AACjD,IACC,UAAmB;CAClB,MAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;CACrE,QAAQ,OAAO,MAAM,eAAe,QAAQ,GAAG;CAC/C,QAAQ,WAAW;AACrB,CACF"}
@@ -1,4 +1,12 @@
1
1
  //#region src/bin/poRunner.d.ts
2
+ /**
3
+ * CLI Entry Point for po-runner
4
+ *
5
+ * The Runner package is selectable, so this compatibility executable resolves
6
+ * it from the active repository instead of retaining it in Po's dependency
7
+ * closure. The Runner package's own entry only self-invokes when it is argv[1],
8
+ * which it is not once this shim imports it by absolute path.
9
+ */
2
10
  export declare function main(argv?: readonly string[]): Promise<number>;
3
11
  //#endregion
4
12
  //# sourceMappingURL=poRunner.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"poRunner.d.mts","names":[],"sources":["../../src/bin/poRunner.ts"],"mappings":";wBAyBsB,KAAK,2BAAkD"}
1
+ {"version":3,"file":"poRunner.d.mts","names":[],"sources":["../../src/bin/poRunner.ts"],"mappings":";;;;;;;;;wBAyBsB,KAAK,2BAAkD"}