@agimon-ai/po-runner 0.0.0-alpha.21 → 0.0.0-alpha.210

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/LICENSE +21 -149
  2. package/README.md +34 -206
  3. package/dist/apiContracts.cjs +45 -2
  4. package/dist/apiContracts.cjs.map +1 -1
  5. package/dist/apiContracts.d.mts +2 -2
  6. package/dist/apiContracts.d.mts.map +1 -1
  7. package/dist/apiContracts.mjs +45 -2
  8. package/dist/apiContracts.mjs.map +1 -1
  9. package/dist/{bashResult-BqDa7sbC.mjs → bashResult-BLCLerXE.mjs} +57 -7
  10. package/dist/bashResult-BLCLerXE.mjs.map +1 -0
  11. package/dist/{bashResult-C2iKhHpD.cjs → bashResult-CZYiyl4p.cjs} +74 -6
  12. package/dist/bashResult-CZYiyl4p.cjs.map +1 -0
  13. package/dist/{bashResult-DcrRaBLv.d.mts → bashResult-CgVS_JpL.d.mts} +8 -3
  14. package/dist/{bashResult-DcrRaBLv.d.mts.map → bashResult-CgVS_JpL.d.mts.map} +1 -1
  15. package/dist/{bashRunService-DjOH5kye.cjs → bashRunService-DmuA1mKL.cjs} +52 -31
  16. package/dist/bashRunService-DmuA1mKL.cjs.map +1 -0
  17. package/dist/{bashRunService-Ci0cGdYO.d.mts → bashRunService-Iotfc_nV.d.mts} +21 -2
  18. package/dist/bashRunService-Iotfc_nV.d.mts.map +1 -0
  19. package/dist/{bashRunService-Cl3pYccr.mjs → bashRunService-Luy2hPMS.mjs} +52 -31
  20. package/dist/bashRunService-Luy2hPMS.mjs.map +1 -0
  21. package/dist/bashRunService.cjs +1 -1
  22. package/dist/bashRunService.d.mts +4 -4
  23. package/dist/bashRunService.d.mts.map +1 -1
  24. package/dist/bashRunService.mjs +1 -1
  25. package/dist/bashSchema.cjs +1 -1
  26. package/dist/bashSchema.d.mts +1 -1
  27. package/dist/bashSchema.mjs +1 -1
  28. package/dist/bashTool-D2ECDAhc.cjs +43 -0
  29. package/dist/bashTool-D2ECDAhc.cjs.map +1 -0
  30. package/dist/{bashTool-B1EwZLo_.d.mts → bashTool-Dc1ld2E3.d.mts} +3 -9
  31. package/dist/bashTool-Dc1ld2E3.d.mts.map +1 -0
  32. package/dist/bashTool-vg8uhbkj.mjs +26 -0
  33. package/dist/bashTool-vg8uhbkj.mjs.map +1 -0
  34. package/dist/bashTool.cjs +3 -3
  35. package/dist/bashTool.cjs.map +1 -1
  36. package/dist/bashTool.d.mts +4 -4
  37. package/dist/bashTool.d.mts.map +1 -1
  38. package/dist/bashTool.mjs +3 -3
  39. package/dist/bashTool.mjs.map +1 -1
  40. package/dist/bin/cli.cjs +372 -9
  41. package/dist/bin/cli.cjs.map +1 -1
  42. package/dist/bin/cli.d.mts.map +1 -1
  43. package/dist/bin/cli.mjs +369 -8
  44. package/dist/bin/cli.mjs.map +1 -1
  45. package/dist/bin/logSink.cjs +27 -24
  46. package/dist/bin/logSink.cjs.map +1 -1
  47. package/dist/bin/logSink.mjs +24 -21
  48. package/dist/bin/logSink.mjs.map +1 -1
  49. package/dist/bin/runnerHost.cjs +141 -53
  50. package/dist/bin/runnerHost.cjs.map +1 -1
  51. package/dist/bin/runnerHost.d.mts.map +1 -1
  52. package/dist/bin/runnerHost.mjs +141 -53
  53. package/dist/bin/runnerHost.mjs.map +1 -1
  54. package/dist/cliApp-7iTUx5KZ.cjs +351 -0
  55. package/dist/cliApp-7iTUx5KZ.cjs.map +1 -0
  56. package/dist/cliApp-S4iEO-fi.mjs +338 -0
  57. package/dist/cliApp-S4iEO-fi.mjs.map +1 -0
  58. package/dist/cliApp.cjs +2 -1
  59. package/dist/cliApp.d.mts +9 -4
  60. package/dist/cliApp.d.mts.map +1 -1
  61. package/dist/cliApp.mjs +1 -1
  62. package/dist/compaction.d.mts +1 -1
  63. package/dist/extensions/mcp-ui.mjs +7 -6
  64. package/dist/extensions/mcp-ui.mjs.map +1 -1
  65. package/dist/extensions/mcp.cjs +37 -17
  66. package/dist/extensions/mcp.cjs.map +1 -1
  67. package/dist/extensions/mcp.d.mts.map +1 -1
  68. package/dist/extensions/mcp.mjs +37 -17
  69. package/dist/extensions/mcp.mjs.map +1 -1
  70. package/dist/extensions/native.mjs +1225 -374
  71. package/dist/extensions/native.mjs.map +1 -1
  72. package/dist/extensions/server.cjs +900 -221
  73. package/dist/extensions/server.cjs.map +1 -1
  74. package/dist/extensions/server.d.mts.map +1 -1
  75. package/dist/extensions/server.mjs +908 -227
  76. package/dist/extensions/server.mjs.map +1 -1
  77. package/dist/extensions/web.mjs +924 -766
  78. package/dist/extensions/web.mjs.map +1 -1
  79. package/dist/headless-CMj9hunm.cjs +237 -0
  80. package/dist/headless-CMj9hunm.cjs.map +1 -0
  81. package/dist/headless-CUJt5Ihx.mjs +226 -0
  82. package/dist/headless-CUJt5Ihx.mjs.map +1 -0
  83. package/dist/{index-DM7yJpMs.d.mts → index-7_nuKoVm.d.mts} +6 -6
  84. package/dist/index-7_nuKoVm.d.mts.map +1 -0
  85. package/dist/index-BCCF1sGD.d.mts.map +1 -1
  86. package/dist/{index-CzCF_OP9.d.mts → index-CH-z0BX3.d.mts} +11 -4
  87. package/dist/index-CH-z0BX3.d.mts.map +1 -0
  88. package/dist/{index-C-IC35d9.d.mts → index-CJNsR-Ir.d.mts} +10 -7
  89. package/dist/index-CJNsR-Ir.d.mts.map +1 -0
  90. package/dist/{index--xF7DvsE.d.mts → index-CNCb1usM.d.mts} +8 -2
  91. package/dist/index-CNCb1usM.d.mts.map +1 -0
  92. package/dist/index-EMbmq9gu.d.mts +45 -0
  93. package/dist/index-EMbmq9gu.d.mts.map +1 -0
  94. package/dist/index-QlfncPRs.d.mts +58 -0
  95. package/dist/index-QlfncPRs.d.mts.map +1 -0
  96. package/dist/index-qSi4-EJW.d.mts +49 -0
  97. package/dist/index-qSi4-EJW.d.mts.map +1 -0
  98. package/dist/index.cjs +4 -4
  99. package/dist/index.d.mts +4 -4
  100. package/dist/index.mjs +4 -4
  101. package/dist/launch.cjs +4 -0
  102. package/dist/launch.d.mts +55 -0
  103. package/dist/launch.d.mts.map +1 -0
  104. package/dist/launch.mjs +1 -0
  105. package/dist/{launcher-CCYsFBM9.mjs → launcher-3xMxw72I.mjs} +45 -31
  106. package/dist/launcher-3xMxw72I.mjs.map +1 -0
  107. package/dist/{launcher-BG5t9nvG.d.mts → launcher-CDDBTvZq.d.mts} +4 -3
  108. package/dist/launcher-CDDBTvZq.d.mts.map +1 -0
  109. package/dist/{launcher-ZgDdyXpq.cjs → launcher-D7qAhSRL.cjs} +47 -33
  110. package/dist/launcher-D7qAhSRL.cjs.map +1 -0
  111. package/dist/launcher.cjs +1 -1
  112. package/dist/launcher.d.mts +5 -5
  113. package/dist/launcher.d.mts.map +1 -1
  114. package/dist/launcher.mjs +1 -1
  115. package/dist/lifeline-26IaW5w7.d.mts +34 -0
  116. package/dist/lifeline-26IaW5w7.d.mts.map +1 -0
  117. package/dist/lifeline-B4cjtrBe.cjs +27 -0
  118. package/dist/lifeline-B4cjtrBe.cjs.map +1 -0
  119. package/dist/lifeline-C1v2ItCY.mjs +214 -0
  120. package/dist/lifeline-C1v2ItCY.mjs.map +1 -0
  121. package/dist/lifeline-D4_ZRAhO.cjs +229 -0
  122. package/dist/lifeline-D4_ZRAhO.cjs.map +1 -0
  123. package/dist/lifeline-nPh3cx5A.mjs +10 -0
  124. package/dist/lifeline-nPh3cx5A.mjs.map +1 -0
  125. package/dist/lifeline.cjs +4 -1
  126. package/dist/lifeline.d.mts +4 -21
  127. package/dist/lifeline.mjs +3 -3
  128. package/dist/logFile-B9FSwmE0.cjs +44 -0
  129. package/dist/logFile-B9FSwmE0.cjs.map +1 -0
  130. package/dist/{logFile-C7oQ_v-g.d.mts → logFile-BirfZtS1.d.mts} +4 -4
  131. package/dist/logFile-BirfZtS1.d.mts.map +1 -0
  132. package/dist/logFile-D1EOKqmL.mjs +39 -0
  133. package/dist/logFile-D1EOKqmL.mjs.map +1 -0
  134. package/dist/logFile.cjs +1 -1
  135. package/dist/logFile.d.mts +3 -3
  136. package/dist/logFile.d.mts.map +1 -1
  137. package/dist/logFile.mjs +1 -1
  138. package/dist/{logReader-mq9uVurh.mjs → logReader-BYKii_s_.mjs} +99 -52
  139. package/dist/logReader-BYKii_s_.mjs.map +1 -0
  140. package/dist/{logReader-MdW9ffvV.d.mts → logReader-Bn3WEdjg.d.mts} +4 -2
  141. package/dist/{logReader-MdW9ffvV.d.mts.map → logReader-Bn3WEdjg.d.mts.map} +1 -1
  142. package/dist/{logReader-DHCK2BEr.cjs → logReader-DpMjBqfn.cjs} +101 -54
  143. package/dist/logReader-DpMjBqfn.cjs.map +1 -0
  144. package/dist/logReader.cjs +1 -1
  145. package/dist/logReader.d.mts +2 -2
  146. package/dist/logReader.mjs +1 -1
  147. package/dist/po-runtime-identity.json +1 -0
  148. package/dist/{ptyHost-D35hNmtd.cjs → ptyHost-C-oWV455.cjs} +20 -14
  149. package/dist/ptyHost-C-oWV455.cjs.map +1 -0
  150. package/dist/{ptyHost-CwbLLr90.mjs → ptyHost-C2zu-ZfO.mjs} +19 -13
  151. package/dist/ptyHost-C2zu-ZfO.mjs.map +1 -0
  152. package/dist/{ptyHost-DWWtRrGn.d.mts → ptyHost-C_6x2xuJ.d.mts} +2 -2
  153. package/dist/{ptyHost-DWWtRrGn.d.mts.map → ptyHost-C_6x2xuJ.d.mts.map} +1 -1
  154. package/dist/ptyHost.cjs +1 -1
  155. package/dist/ptyHost.d.mts +2 -2
  156. package/dist/ptyHost.d.mts.map +1 -1
  157. package/dist/ptyHost.mjs +1 -1
  158. package/dist/{reconcile-wNYQJZF-.mjs → reconcile-DUaX_vKZ.mjs} +2 -2
  159. package/dist/reconcile-DUaX_vKZ.mjs.map +1 -0
  160. package/dist/{reconcile-5cZ11jSD.cjs → reconcile-DjF9T1hN.cjs} +2 -2
  161. package/dist/reconcile-DjF9T1hN.cjs.map +1 -0
  162. package/dist/reconcile.cjs +1 -1
  163. package/dist/reconcile.d.mts +3 -3
  164. package/dist/reconcile.mjs +1 -1
  165. package/dist/responseEnvelope.cjs +5 -2
  166. package/dist/responseEnvelope.d.mts +15 -6
  167. package/dist/responseEnvelope.d.mts.map +1 -1
  168. package/dist/responseEnvelope.mjs +3 -3
  169. package/dist/{rmuxBackend-Dh0CYVAL.cjs → rmuxBackend-9tHTx1vf.cjs} +82 -48
  170. package/dist/rmuxBackend-9tHTx1vf.cjs.map +1 -0
  171. package/dist/{rmuxBackend-rjrVTG6K.mjs → rmuxBackend-BaK-R35I.mjs} +79 -45
  172. package/dist/rmuxBackend-BaK-R35I.mjs.map +1 -0
  173. package/dist/{rmuxBackend-CaEWooWn.d.mts → rmuxBackend-xFzlANM9.d.mts} +4 -4
  174. package/dist/rmuxBackend-xFzlANM9.d.mts.map +1 -0
  175. package/dist/rmuxBackend.cjs +1 -1
  176. package/dist/rmuxBackend.d.mts +2 -2
  177. package/dist/rmuxBackend.mjs +1 -1
  178. package/dist/rolldown-runtime-8H4AJuhK.mjs +14 -0
  179. package/dist/{rolldown-runtime-VH7oDXx4.cjs → rolldown-runtime-C0BPl7ul.cjs} +15 -0
  180. package/dist/{rtkProcessor-Iw9gP5Xp.mjs → rtkProcessor-DOXcp51z.mjs} +6 -5
  181. package/dist/rtkProcessor-DOXcp51z.mjs.map +1 -0
  182. package/dist/{rtkProcessor-DSGbM-Cm.cjs → rtkProcessor-J2gLQvM4.cjs} +8 -6
  183. package/dist/rtkProcessor-J2gLQvM4.cjs.map +1 -0
  184. package/dist/rtkProcessor.cjs +1 -1
  185. package/dist/rtkProcessor.mjs +1 -1
  186. package/dist/{runnerDependencies-DSun3xO-.cjs → runnerDependencies-CABYjW7H.cjs} +97 -64
  187. package/dist/runnerDependencies-CABYjW7H.cjs.map +1 -0
  188. package/dist/{runnerDependencies-7h_cxOva.mjs → runnerDependencies-DmvIcpZi.mjs} +95 -62
  189. package/dist/runnerDependencies-DmvIcpZi.mjs.map +1 -0
  190. package/dist/runnerDependencies.cjs +1 -1
  191. package/dist/runnerDependencies.d.mts +1 -1
  192. package/dist/runnerDependencies.mjs +1 -1
  193. package/dist/runnerHost-BvNYPMeh.mjs +165 -0
  194. package/dist/runnerHost-BvNYPMeh.mjs.map +1 -0
  195. package/dist/runnerHost-C2F5oxzn.cjs +184 -0
  196. package/dist/runnerHost-C2F5oxzn.cjs.map +1 -0
  197. package/dist/runnerLaunch-BAf7hXMr.cjs +192 -0
  198. package/dist/runnerLaunch-BAf7hXMr.cjs.map +1 -0
  199. package/dist/runnerLaunch-Bimgdh4h.mjs +175 -0
  200. package/dist/runnerLaunch-Bimgdh4h.mjs.map +1 -0
  201. package/dist/runnerNamer.d.mts +1 -1
  202. package/dist/{runnerPaths-B41rMOY6.cjs → runnerPaths-CSkswyjR.cjs} +97 -179
  203. package/dist/runnerPaths-CSkswyjR.cjs.map +1 -0
  204. package/dist/{runnerPaths-Dibbvyx_.mjs → runnerPaths-D3P7_EhW.mjs} +91 -179
  205. package/dist/runnerPaths-D3P7_EhW.mjs.map +1 -0
  206. package/dist/runnerPaths.cjs +1 -1
  207. package/dist/runnerPaths.d.mts +7 -9
  208. package/dist/runnerPaths.d.mts.map +1 -1
  209. package/dist/runnerPaths.mjs +1 -1
  210. package/dist/{runnerRegistry-dQYlMSpQ.cjs → runnerRegistry-B8K1L3lq.cjs} +68 -45
  211. package/dist/runnerRegistry-B8K1L3lq.cjs.map +1 -0
  212. package/dist/{runnerRegistry-V-Ocaf4N.d.mts → runnerRegistry-BlZhS9yL.d.mts} +2 -2
  213. package/dist/{runnerRegistry-V-Ocaf4N.d.mts.map → runnerRegistry-BlZhS9yL.d.mts.map} +1 -1
  214. package/dist/{runnerRegistry-BgaR5O86.mjs → runnerRegistry-Dqca6SD3.mjs} +53 -29
  215. package/dist/runnerRegistry-Dqca6SD3.mjs.map +1 -0
  216. package/dist/runnerRegistry-NW6oAJ71.cjs +60 -0
  217. package/dist/runnerRegistry-NW6oAJ71.cjs.map +1 -0
  218. package/dist/runnerRegistry-l0C_55oO.mjs +13 -0
  219. package/dist/runnerRegistry-l0C_55oO.mjs.map +1 -0
  220. package/dist/runnerRegistry.cjs +1 -1
  221. package/dist/runnerRegistry.d.mts +2 -2
  222. package/dist/runnerRegistry.mjs +1 -1
  223. package/dist/runnerSequence-ZTYgZ_2W.cjs +32 -0
  224. package/dist/runnerSequence-ZTYgZ_2W.cjs.map +1 -0
  225. package/dist/runnerSequence-k-_Fd77y.mjs +9 -0
  226. package/dist/runnerSequence-k-_Fd77y.mjs.map +1 -0
  227. package/dist/runnerSequenceStore-CaY7S_Sd.mjs +76 -0
  228. package/dist/runnerSequenceStore-CaY7S_Sd.mjs.map +1 -0
  229. package/dist/runnerSequenceStore-Ck6M-8r_.cjs +89 -0
  230. package/dist/runnerSequenceStore-Ck6M-8r_.cjs.map +1 -0
  231. package/dist/services/lifeline/client.cjs +88 -4
  232. package/dist/services/lifeline/client.cjs.map +1 -1
  233. package/dist/services/lifeline/client.d.mts +16 -0
  234. package/dist/services/lifeline/client.d.mts.map +1 -1
  235. package/dist/services/lifeline/client.mjs +83 -2
  236. package/dist/services/lifeline/client.mjs.map +1 -1
  237. package/dist/services/runnerSupervisor/index.cjs +36 -22
  238. package/dist/services/runnerSupervisor/index.cjs.map +1 -1
  239. package/dist/services/runnerSupervisor/index.d.mts +7 -5
  240. package/dist/services/runnerSupervisor/index.d.mts.map +1 -1
  241. package/dist/services/runnerSupervisor/index.mjs +35 -21
  242. package/dist/services/runnerSupervisor/index.mjs.map +1 -1
  243. package/dist/session-CdVeSD7F.mjs +8 -0
  244. package/dist/session-CdVeSD7F.mjs.map +1 -0
  245. package/dist/session-DnUj8Q71.cjs +25 -0
  246. package/dist/session-DnUj8Q71.cjs.map +1 -0
  247. package/dist/session-ISEGK4z9.mjs +26 -0
  248. package/dist/session-ISEGK4z9.mjs.map +1 -0
  249. package/dist/session-PQd3azWf.cjs +43 -0
  250. package/dist/session-PQd3azWf.cjs.map +1 -0
  251. package/dist/session.cjs +4 -3
  252. package/dist/session.d.mts +3 -1
  253. package/dist/session.d.mts.map +1 -1
  254. package/dist/session.mjs +3 -3
  255. package/dist/{type-DwMZoINK.d.mts → type-BWY9vvSq.d.mts} +6 -4
  256. package/dist/type-BWY9vvSq.d.mts.map +1 -0
  257. package/dist/{type-Do0YxwVQ.d.mts → type-bZgYQ7hv.d.mts} +11 -11
  258. package/dist/{type-Do0YxwVQ.d.mts.map → type-bZgYQ7hv.d.mts.map} +1 -1
  259. package/dist/types.d.mts +1 -1
  260. package/llms.txt +2 -1
  261. package/locales/vi.json +169 -0
  262. package/locales/zh-CN.json +169 -0
  263. package/package.json +95 -30
  264. package/skills/po-runner/SKILL.md +32 -14
  265. package/src/prompts/codemode-how-to-runner/SKILL.md +85 -0
  266. package/src/prompts/help-how-to-runner/SKILL.md +51 -0
  267. package/dist/bashResult-BqDa7sbC.mjs.map +0 -1
  268. package/dist/bashResult-C2iKhHpD.cjs.map +0 -1
  269. package/dist/bashRunService-Ci0cGdYO.d.mts.map +0 -1
  270. package/dist/bashRunService-Cl3pYccr.mjs.map +0 -1
  271. package/dist/bashRunService-DjOH5kye.cjs.map +0 -1
  272. package/dist/bashTool-B1EwZLo_.d.mts.map +0 -1
  273. package/dist/bashTool-BvC3YOgG.mjs +0 -24
  274. package/dist/bashTool-BvC3YOgG.mjs.map +0 -1
  275. package/dist/bashTool-euL6zMDl.cjs +0 -41
  276. package/dist/bashTool-euL6zMDl.cjs.map +0 -1
  277. package/dist/cliApp-T8Fx_-1j.cjs +0 -244
  278. package/dist/cliApp-T8Fx_-1j.cjs.map +0 -1
  279. package/dist/cliApp-q97eVh4E.mjs +0 -237
  280. package/dist/cliApp-q97eVh4E.mjs.map +0 -1
  281. package/dist/headless-DOlCixyf.mjs +0 -169
  282. package/dist/headless-DOlCixyf.mjs.map +0 -1
  283. package/dist/headless-Dko_yBiy.cjs +0 -180
  284. package/dist/headless-Dko_yBiy.cjs.map +0 -1
  285. package/dist/index--xF7DvsE.d.mts.map +0 -1
  286. package/dist/index-BzeXJk6V.d.mts +0 -12
  287. package/dist/index-BzeXJk6V.d.mts.map +0 -1
  288. package/dist/index-C-IC35d9.d.mts.map +0 -1
  289. package/dist/index-CzCF_OP9.d.mts.map +0 -1
  290. package/dist/index-DM7yJpMs.d.mts.map +0 -1
  291. package/dist/launcher-BG5t9nvG.d.mts.map +0 -1
  292. package/dist/launcher-CCYsFBM9.mjs.map +0 -1
  293. package/dist/launcher-ZgDdyXpq.cjs.map +0 -1
  294. package/dist/lifeline-Bm-bHIjS.mjs +0 -88
  295. package/dist/lifeline-Bm-bHIjS.mjs.map +0 -1
  296. package/dist/lifeline-eJdZV0nN.d.mts +0 -19
  297. package/dist/lifeline-eJdZV0nN.d.mts.map +0 -1
  298. package/dist/lifeline-m7laIzIP.cjs +0 -98
  299. package/dist/lifeline-m7laIzIP.cjs.map +0 -1
  300. package/dist/lifeline.d.mts.map +0 -1
  301. package/dist/logFile-C7oQ_v-g.d.mts.map +0 -1
  302. package/dist/logFile-CnPKtxPy.cjs +0 -67
  303. package/dist/logFile-CnPKtxPy.cjs.map +0 -1
  304. package/dist/logFile-XcDHBwu1.mjs +0 -60
  305. package/dist/logFile-XcDHBwu1.mjs.map +0 -1
  306. package/dist/logReader-DHCK2BEr.cjs.map +0 -1
  307. package/dist/logReader-mq9uVurh.mjs.map +0 -1
  308. package/dist/ptyHost-CwbLLr90.mjs.map +0 -1
  309. package/dist/ptyHost-D35hNmtd.cjs.map +0 -1
  310. package/dist/reconcile-5cZ11jSD.cjs.map +0 -1
  311. package/dist/reconcile-wNYQJZF-.mjs.map +0 -1
  312. package/dist/rmuxBackend-CaEWooWn.d.mts.map +0 -1
  313. package/dist/rmuxBackend-Dh0CYVAL.cjs.map +0 -1
  314. package/dist/rmuxBackend-rjrVTG6K.mjs.map +0 -1
  315. package/dist/rtkProcessor-DSGbM-Cm.cjs.map +0 -1
  316. package/dist/rtkProcessor-Iw9gP5Xp.mjs.map +0 -1
  317. package/dist/runnerDependencies-7h_cxOva.mjs.map +0 -1
  318. package/dist/runnerDependencies-DSun3xO-.cjs.map +0 -1
  319. package/dist/runnerPaths-B41rMOY6.cjs.map +0 -1
  320. package/dist/runnerPaths-Dibbvyx_.mjs.map +0 -1
  321. package/dist/runnerRegistry-BgaR5O86.mjs.map +0 -1
  322. package/dist/runnerRegistry-dQYlMSpQ.cjs.map +0 -1
  323. package/dist/session-BKYnH4R6.mjs +0 -18
  324. package/dist/session-BKYnH4R6.mjs.map +0 -1
  325. package/dist/session-BvqzhXZY.cjs +0 -29
  326. package/dist/session-BvqzhXZY.cjs.map +0 -1
  327. package/dist/session-DE2Acesp.mjs +0 -6
  328. package/dist/session-DE2Acesp.mjs.map +0 -1
  329. package/dist/session-SfIPtdZO.cjs +0 -11
  330. package/dist/session-SfIPtdZO.cjs.map +0 -1
  331. package/dist/type-DwMZoINK.d.mts.map +0 -1
  332. package/src/prompts/po-use-runner/SKILL.md +0 -47
@@ -0,0 +1,184 @@
1
+ const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
+ const require_runnerRegistry = require("./runnerRegistry-NW6oAJ71.cjs");
3
+ let node_fs_promises = require("node:fs/promises");
4
+ node_fs_promises = require_rolldown_runtime.__toESM(node_fs_promises, 1);
5
+ let node_path = require("node:path");
6
+ node_path = require_rolldown_runtime.__toESM(node_path, 1);
7
+ //#region src/services/runnerHost/index.ts
8
+ var runnerHost_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
9
+ cleanupRunnerSession: () => cleanupRunnerSession,
10
+ createRunnerHost: () => createRunnerHost
11
+ });
12
+ const describe = (error) => error instanceof Error ? error.message : String(error);
13
+ /** Runs `pass` again `ms` after the previous pass finished, so two passes never overlap. */
14
+ function repeat(clock, ms, pass) {
15
+ let stopped = false;
16
+ let cancel;
17
+ let running;
18
+ const arm = () => {
19
+ cancel = clock.after(ms, () => {
20
+ cancel = void 0;
21
+ running = pass().finally(() => {
22
+ running = void 0;
23
+ if (!stopped) arm();
24
+ });
25
+ });
26
+ };
27
+ arm();
28
+ return { async stop() {
29
+ stopped = true;
30
+ cancel?.();
31
+ await running;
32
+ } };
33
+ }
34
+ /**
35
+ * The housekeeping every session running one po-runner build in one hub shares.
36
+ *
37
+ * A session used to open its own registry connection and arm its own status poll and history
38
+ * sweep, and each sweep walked the whole runner store. Here one loop refreshes the attached sessions
39
+ * one at a time, one sweep per store spares every attached session at once, and runners a crashed
40
+ * server left behind are reclaimed once rather than at every session start.
41
+ */
42
+ function createRunnerHost(options) {
43
+ const sessions = /* @__PURE__ */ new Set();
44
+ const owners = /* @__PURE__ */ new Map();
45
+ let closed = false;
46
+ let reclaiming;
47
+ let sweeping;
48
+ const refreshAll = async () => {
49
+ for (const session of sessions) {
50
+ if (closed) return;
51
+ try {
52
+ await session.refresh();
53
+ } catch (error) {
54
+ options.onWarning(`Could not refresh po-runner session ${session.sessionId}: ${describe(error)}`);
55
+ }
56
+ }
57
+ };
58
+ const sweepAll = () => {
59
+ sweeping ??= (async () => {
60
+ try {
61
+ const byStore = /* @__PURE__ */ new Map();
62
+ for (const session of sessions) {
63
+ const store = session.paths.storeDirectory();
64
+ byStore.set(store, [...byStore.get(store) ?? [], session]);
65
+ }
66
+ for (const group of byStore.values()) {
67
+ const [first] = group;
68
+ if (closed || first === void 0) return;
69
+ const live = new Set(group.map((session) => session.sessionId));
70
+ const now = options.clock.now();
71
+ const result = first.paths.sweepHistoryAsync ? await first.paths.sweepHistoryAsync(first.historyTtlMs, now, live) : await first.paths.sweepHistory(first.historyTtlMs, now, live);
72
+ for (const error of result.errors) options.onWarning(error);
73
+ }
74
+ } catch (error) {
75
+ options.onWarning(`Could not sweep po-runner history: ${describe(error)}`);
76
+ }
77
+ })().finally(() => {
78
+ sweeping = void 0;
79
+ });
80
+ return sweeping;
81
+ };
82
+ const polling = repeat(options.clock, options.statusPollMs, refreshAll);
83
+ const sweeper = repeat(options.clock, options.historySweepMs, sweepAll);
84
+ return {
85
+ processRegistry: {
86
+ registerProcess: (...args) => options.processRegistry.registerProcess(...args),
87
+ releaseProcess: (...args) => options.processRegistry.releaseProcess(...args),
88
+ listProcesses: (...args) => options.processRegistry.listProcesses(...args),
89
+ close: () => void 0
90
+ },
91
+ attach(session) {
92
+ if (closed) throw new Error("The po-runner host is disposed.");
93
+ sessions.add(session);
94
+ if (reclaiming === void 0) {
95
+ reclaiming = session.reclaimOrphans().catch((error) => options.onWarning(`Could not reclaim orphaned runners: ${describe(error)}`));
96
+ sweepAll();
97
+ }
98
+ return () => {
99
+ sessions.delete(session);
100
+ };
101
+ },
102
+ registerOwner(sessionId, launch) {
103
+ if (closed) throw new Error("The po-runner host is disposed.");
104
+ const registration = { launch };
105
+ owners.set(sessionId, registration);
106
+ return () => {
107
+ if (owners.get(sessionId) === registration) owners.delete(sessionId);
108
+ };
109
+ },
110
+ getOwner: (sessionId) => owners.get(sessionId)?.launch,
111
+ async dispose() {
112
+ if (closed) return;
113
+ closed = true;
114
+ sessions.clear();
115
+ owners.clear();
116
+ await Promise.all([
117
+ polling.stop(),
118
+ sweeper.stop(),
119
+ reclaiming,
120
+ sweeping
121
+ ]);
122
+ options.processRegistry.close();
123
+ }
124
+ };
125
+ }
126
+ /** Release exact session records before deleting files. An observer also fences the owner generation. */
127
+ async function cleanupRunnerSession(input) {
128
+ const marker = node_path.default.join(input.paths.stateDirectory(input.sessionId), ".owner");
129
+ const ownsDirectory = async () => {
130
+ if (input.generation === void 0) return true;
131
+ try {
132
+ return await node_fs_promises.default.readFile(marker, "utf8") === input.generation;
133
+ } catch (error) {
134
+ if (error.code === "ENOENT") return false;
135
+ throw error;
136
+ }
137
+ };
138
+ if (!await ownsDirectory()) return;
139
+ const records = await input.processRegistry.listProcesses({
140
+ repositoryPath: await input.paths.repositoryPath(),
141
+ serviceType: require_runnerRegistry.SERVICE_TYPE,
142
+ tags: [require_runnerRegistry.RUNNER_TAG]
143
+ });
144
+ for (const record of records) {
145
+ if (!await ownsDirectory()) return;
146
+ if (record.metadata?.sessionId !== input.sessionId) continue;
147
+ if (input.ownerPid !== void 0 && record.metadata?.hostPid !== input.ownerPid) continue;
148
+ const result = await input.processRegistry.releaseProcess({
149
+ repositoryPath: record.repositoryPath,
150
+ serviceName: record.serviceName,
151
+ serviceType: record.serviceType,
152
+ environment: record.environment,
153
+ pid: record.pid,
154
+ launchId: record.launchId,
155
+ leaseId: record.leaseId,
156
+ kill: true,
157
+ releasePort: false,
158
+ force: true
159
+ });
160
+ if (!result.success) throw new Error(result.error ?? "Runner cleanup failed");
161
+ }
162
+ if (await ownsDirectory()) await input.paths.removeSessionFiles?.(input.sessionId, input.generation);
163
+ }
164
+ //#endregion
165
+ Object.defineProperty(exports, "cleanupRunnerSession", {
166
+ enumerable: true,
167
+ get: function() {
168
+ return cleanupRunnerSession;
169
+ }
170
+ });
171
+ Object.defineProperty(exports, "createRunnerHost", {
172
+ enumerable: true,
173
+ get: function() {
174
+ return createRunnerHost;
175
+ }
176
+ });
177
+ Object.defineProperty(exports, "runnerHost_exports", {
178
+ enumerable: true,
179
+ get: function() {
180
+ return runnerHost_exports;
181
+ }
182
+ });
183
+
184
+ //# sourceMappingURL=runnerHost-C2F5oxzn.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runnerHost-C2F5oxzn.cjs","names":["path","fs","SERVICE_TYPE","RUNNER_TAG"],"sources":["../src/services/runnerHost/index.ts"],"sourcesContent":["import fs from 'node:fs/promises';\nimport path from 'node:path';\n\nimport { RUNNER_TAG, SERVICE_TYPE } from '../../constants/runnerRegistry';\nimport type { IClock } from '../../types/clock';\nimport type { RunnerLaunchOperations } from '../../types/runnerLaunch';\nimport type { IRunnerPaths } from '../runnerPaths/type';\nimport type { ProcessRegistryPort } from '../runnerRegistry';\nimport type { RunnerHost, RunnerHostOptions, RunnerHostSession } from './type';\n\nexport type { RunnerHost, RunnerHostOptions, RunnerHostSession } from './type';\n\nconst describe = (error: unknown): string => (error instanceof Error ? error.message : String(error));\n\n/** Runs `pass` again `ms` after the previous pass finished, so two passes never overlap. */\nfunction repeat(clock: IClock, ms: number, pass: () => Promise<void>): { stop(): Promise<void> } {\n let stopped = false;\n let cancel: (() => void) | undefined;\n let running: Promise<void> | undefined;\n const arm = (): void => {\n cancel = clock.after(ms, () => {\n cancel = undefined;\n running = pass().finally(() => {\n running = undefined;\n if (!stopped) arm();\n });\n });\n };\n arm();\n return {\n async stop() {\n stopped = true;\n cancel?.();\n await running;\n },\n };\n}\n\n/**\n * The housekeeping every session running one po-runner build in one hub shares.\n *\n * A session used to open its own registry connection and arm its own status poll and history\n * sweep, and each sweep walked the whole runner store. Here one loop refreshes the attached sessions\n * one at a time, one sweep per store spares every attached session at once, and runners a crashed\n * server left behind are reclaimed once rather than at every session start.\n */\nexport function createRunnerHost(options: RunnerHostOptions): RunnerHost {\n const sessions = new Set<RunnerHostSession>();\n // One entry object per registration, so an unregister can tell its own registration from a replacement.\n const owners = new Map<string, { readonly launch: RunnerLaunchOperations }>();\n let closed = false;\n let reclaiming: Promise<void> | undefined;\n let sweeping: Promise<void> | undefined;\n\n const refreshAll = async (): Promise<void> => {\n // A Set skips what is deleted mid-pass, so a session detached during a pass is not refreshed after.\n for (const session of sessions) {\n if (closed) return;\n try {\n await session.refresh();\n } catch (error) {\n options.onWarning(`Could not refresh po-runner session ${session.sessionId}: ${describe(error)}`);\n }\n }\n };\n\n const sweepAll = (): Promise<void> => {\n sweeping ??= (async () => {\n try {\n const byStore = new Map<string, RunnerHostSession[]>();\n for (const session of sessions) {\n const store = session.paths.storeDirectory();\n byStore.set(store, [...(byStore.get(store) ?? []), session]);\n }\n for (const group of byStore.values()) {\n const [first] = group;\n if (closed || first === undefined) return;\n const live = new Set(group.map((session) => session.sessionId));\n const now = options.clock.now();\n const result = first.paths.sweepHistoryAsync\n ? await first.paths.sweepHistoryAsync(first.historyTtlMs, now, live)\n : await first.paths.sweepHistory(first.historyTtlMs, now, live);\n for (const error of result.errors) options.onWarning(error);\n }\n } catch (error) {\n options.onWarning(`Could not sweep po-runner history: ${describe(error)}`);\n }\n })().finally(() => {\n sweeping = undefined;\n });\n return sweeping;\n };\n\n const polling = repeat(options.clock, options.statusPollMs, refreshAll);\n const sweeper = repeat(options.clock, options.historySweepMs, sweepAll);\n const processRegistry: ProcessRegistryPort = {\n registerProcess: (...args) => options.processRegistry.registerProcess(...args),\n releaseProcess: (...args) => options.processRegistry.releaseProcess(...args),\n listProcesses: (...args) => options.processRegistry.listProcesses(...args),\n // Sessions come and go; the connection lives as long as the host.\n close: () => undefined,\n };\n\n return {\n processRegistry,\n attach(session) {\n if (closed) throw new Error('The po-runner host is disposed.');\n sessions.add(session);\n if (reclaiming === undefined) {\n // Once per host: runners and history a crashed server left behind belong to no session.\n reclaiming = session\n .reclaimOrphans()\n .catch((error: unknown) => options.onWarning(`Could not reclaim orphaned runners: ${describe(error)}`));\n void sweepAll();\n }\n return () => {\n sessions.delete(session);\n };\n },\n registerOwner(sessionId, launch) {\n if (closed) throw new Error('The po-runner host is disposed.');\n const registration = { launch };\n owners.set(sessionId, registration);\n return () => {\n if (owners.get(sessionId) === registration) owners.delete(sessionId);\n };\n },\n getOwner: (sessionId) => owners.get(sessionId)?.launch,\n async dispose() {\n if (closed) return;\n closed = true;\n sessions.clear();\n owners.clear();\n await Promise.all([polling.stop(), sweeper.stop(), reclaiming, sweeping]);\n options.processRegistry.close();\n },\n };\n}\n\n/** Release exact session records before deleting files. An observer also fences the owner generation. */\nexport async function cleanupRunnerSession(input: {\n readonly sessionId: string;\n readonly paths: IRunnerPaths;\n readonly processRegistry: ProcessRegistryPort;\n readonly ownerPid?: number;\n readonly generation?: string;\n}): Promise<void> {\n const marker = path.join(input.paths.stateDirectory(input.sessionId), '.owner');\n const ownsDirectory = async (): Promise<boolean> => {\n if (input.generation === undefined) return true;\n try {\n return (await fs.readFile(marker, 'utf8')) === input.generation;\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') return false;\n throw error;\n }\n };\n if (!(await ownsDirectory())) return;\n const records = await input.processRegistry.listProcesses({\n repositoryPath: await input.paths.repositoryPath(),\n serviceType: SERVICE_TYPE,\n tags: [RUNNER_TAG],\n });\n for (const record of records) {\n if (!(await ownsDirectory())) return;\n if (record.metadata?.sessionId !== input.sessionId) continue;\n if (input.ownerPid !== undefined && record.metadata?.hostPid !== input.ownerPid) continue;\n const result = await input.processRegistry.releaseProcess({\n repositoryPath: record.repositoryPath,\n serviceName: record.serviceName,\n serviceType: record.serviceType,\n environment: record.environment,\n pid: record.pid,\n launchId: record.launchId,\n leaseId: record.leaseId,\n kill: true,\n releasePort: false,\n force: true,\n });\n if (!result.success) throw new Error(result.error ?? 'Runner cleanup failed');\n }\n if (await ownsDirectory()) await input.paths.removeSessionFiles?.(input.sessionId, input.generation);\n}\n"],"mappings":";;;;;;;;;;;AAYA,MAAM,YAAY,UAA4B,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;;AAGnG,SAAS,OAAO,OAAe,IAAY,MAAsD;CAC/F,IAAI,UAAU;CACd,IAAI;CACJ,IAAI;CACJ,MAAM,YAAkB;EACtB,SAAS,MAAM,MAAM,UAAU;GAC7B,SAAS,KAAA;GACT,UAAU,KAAK,CAAC,CAAC,cAAc;IAC7B,UAAU,KAAA;IACV,IAAI,CAAC,SAAS,IAAI;GACpB,CAAC;EACH,CAAC;CACH;CACA,IAAI;CACJ,OAAO,EACL,MAAM,OAAO;EACX,UAAU;EACV,SAAS;EACT,MAAM;CACR,EACF;AACF;;;;;;;;;AAUA,SAAgB,iBAAiB,SAAwC;CACvE,MAAM,2BAAW,IAAI,IAAuB;CAE5C,MAAM,yBAAS,IAAI,IAAyD;CAC5E,IAAI,SAAS;CACb,IAAI;CACJ,IAAI;CAEJ,MAAM,aAAa,YAA2B;EAE5C,KAAK,MAAM,WAAW,UAAU;GAC9B,IAAI,QAAQ;GACZ,IAAI;IACF,MAAM,QAAQ,QAAQ;GACxB,SAAS,OAAO;IACd,QAAQ,UAAU,uCAAuC,QAAQ,UAAU,IAAI,SAAS,KAAK,GAAG;GA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U,SAAS;EAC5B,IAAI,CAAE,MAAM,cAAc,GAAI;EAC9B,IAAI,OAAO,UAAU,cAAc,MAAM,WAAW;EACpD,IAAI,MAAM,aAAa,KAAA,KAAa,OAAO,UAAU,YAAY,MAAM,UAAU;EACjF,MAAM,SAAS,MAAM,MAAM,gBAAgB,eAAe;GACxD,gBAAgB,OAAO;GACvB,aAAa,OAAO;GACpB,aAAa,OAAO;GACpB,aAAa,OAAO;GACpB,KAAK,OAAO;GACZ,UAAU,OAAO;GACjB,SAAS,OAAO;GAChB,MAAM;GACN,aAAa;GACb,OAAO;EACT,CAAC;EACD,IAAI,CAAC,OAAO,SAAS,MAAM,IAAI,MAAM,OAAO,SAAS,uBAAuB;CAC9E;CACA,IAAI,MAAM,cAAc,GAAG,MAAM,MAAM,MAAM,qBAAqB,MAAM,WAAW,MAAM,UAAU;AACrG"}
@@ -0,0 +1,192 @@
1
+ //#region src/services/runnerLaunch/index.ts
2
+ const PO_RUNNER_LAUNCH_SERVICE = "po/runner-launch";
3
+ function readPoRunnerLaunch(context) {
4
+ return context.get(PO_RUNNER_LAUNCH_SERVICE);
5
+ }
6
+ function validate(input) {
7
+ if (!input || !Array.isArray(input.command) || input.command.length !== 1 || typeof input.command[0] !== "string" || !input.command[0].trim()) throw new Error("command must contain exactly one nonempty shell command.");
8
+ if (typeof input.name !== "string" || !input.name.trim() || typeof input.cwd !== "string" || !input.cwd.trim()) throw new Error("name and cwd must be nonempty strings.");
9
+ if (input.wakeOnExit !== void 0 && typeof input.wakeOnExit !== "boolean") throw new Error("wakeOnExit must be boolean.");
10
+ if (input.env !== void 0 && (typeof input.env !== "object" || input.env === null || Array.isArray(input.env) || Object.entries(input.env).some(([key, value]) => !/^[A-Za-z_][A-Za-z0-9_]*$/u.test(key) || typeof value !== "string" || value.includes("\0")))) throw new Error("env must be a record of valid environment names and string values without NUL.");
11
+ }
12
+ /** Routes packages into the same registry, lifeline and notices as ordinary bash runners. */
13
+ function createRunnerLaunch(options) {
14
+ let closing = false;
15
+ const lifetime = new AbortController();
16
+ const pending = /* @__PURE__ */ new Set();
17
+ const subscriptions = /* @__PURE__ */ new Set();
18
+ const assertAvailable = () => {
19
+ if (closing) throw new Error("Runner launch service is disposed.");
20
+ options.assertAvailable();
21
+ };
22
+ const track = (launch) => {
23
+ pending.add(launch);
24
+ launch.finally(() => pending.delete(launch)).catch(() => void 0);
25
+ return launch;
26
+ };
27
+ const subscribed = (unsubscribe) => {
28
+ const dispose = () => {
29
+ if (!subscriptions.delete(dispose)) return;
30
+ unsubscribe();
31
+ };
32
+ subscriptions.add(dispose);
33
+ return dispose;
34
+ };
35
+ const view = (record) => {
36
+ if (record.sessionId !== options.sessionId || record.backend !== "native") throw new Error("Runner is not a native runner owned by this session.");
37
+ return structuredClone({
38
+ id: record.id,
39
+ name: record.name,
40
+ pid: record.pid,
41
+ cwd: record.cwd,
42
+ logPath: record.logPath,
43
+ state: record.state,
44
+ backend: "native",
45
+ ...record.exit ? { exit: record.exit } : {}
46
+ });
47
+ };
48
+ const get = async (id) => {
49
+ assertAvailable();
50
+ const record = await options.registry.get(id, options.sessionId);
51
+ assertAvailable();
52
+ return record ? view(record) : void 0;
53
+ };
54
+ const required = async (id) => {
55
+ const record = await get(id);
56
+ if (!record) throw new Error(`No native runner with id ${id} in this session.`);
57
+ return record;
58
+ };
59
+ const start = async (input, signal) => {
60
+ assertAvailable();
61
+ signal = signal ? AbortSignal.any([signal, lifetime.signal]) : lifetime.signal;
62
+ signal.throwIfAborted();
63
+ validate(input);
64
+ const admitted = structuredClone(input);
65
+ await options.ensureSession(options.sessionId);
66
+ assertAvailable();
67
+ signal?.throwIfAborted();
68
+ const result = await options.runService.run({
69
+ command: admitted.command[0],
70
+ name: admitted.name,
71
+ cwd: admitted.cwd,
72
+ ...admitted.env ? { env: admitted.env } : {},
73
+ sessionId: options.sessionId,
74
+ backend: "native",
75
+ background: true,
76
+ ...signal ? { signal } : {}
77
+ });
78
+ if (result.kind === "failed") throw new Error(result.error);
79
+ if (result.kind !== "promoted" || result.backend !== "native") throw new Error("Native runner failed to enter supervision.");
80
+ if (closing || signal?.aborted) {
81
+ await options.operations.stop(result.id, "launch cancelled");
82
+ throw new Error("Native runner launch was cancelled.");
83
+ }
84
+ assertAvailable();
85
+ const launched = await required(result.id);
86
+ if (closing || signal?.aborted) {
87
+ await options.operations.stop(result.id, "launch cancelled");
88
+ throw new Error("Native runner launch was cancelled.");
89
+ }
90
+ if (admitted.wakeOnExit) options.watchRunner(result.id);
91
+ return launched;
92
+ };
93
+ const owner = () => {
94
+ assertAvailable();
95
+ const target = options.getOwner(options.ownerSessionId);
96
+ if (!target) throw new Error("owner unavailable");
97
+ return target;
98
+ };
99
+ const routed = {
100
+ start(input, signal) {
101
+ return track((async () => {
102
+ assertAvailable();
103
+ signal = signal ? AbortSignal.any([signal, lifetime.signal]) : lifetime.signal;
104
+ signal.throwIfAborted();
105
+ validate(input);
106
+ return owner().start({
107
+ ...input,
108
+ wakeOnExit: false
109
+ }, signal);
110
+ })());
111
+ },
112
+ async get(id) {
113
+ return owner().get(id);
114
+ },
115
+ async list() {
116
+ return owner().list();
117
+ },
118
+ async stop(id, reason) {
119
+ return owner().stop(id, reason);
120
+ },
121
+ async logs(id, input) {
122
+ return owner().logs(id, input);
123
+ },
124
+ onChange(listener) {
125
+ return subscribed(owner().onChange(() => {
126
+ if (!closing) listener();
127
+ }));
128
+ }
129
+ };
130
+ return {
131
+ start(input, signal) {
132
+ return track(start(input, signal));
133
+ },
134
+ forOwner: () => routed,
135
+ get,
136
+ async list() {
137
+ assertAvailable();
138
+ const records = await options.registry.listAll(options.sessionId);
139
+ assertAvailable();
140
+ return records.filter((record) => record.backend === "native").map(view);
141
+ },
142
+ async stop(id, reason) {
143
+ await required(id);
144
+ await options.operations.stop(id, reason, assertAvailable);
145
+ return required(id);
146
+ },
147
+ async logs(id, input) {
148
+ await required(id);
149
+ return (await options.operations.logs(id, { lines: input?.tail ?? 200 }, assertAvailable)).text;
150
+ },
151
+ onChange(listener) {
152
+ assertAvailable();
153
+ return subscribed(options.registry.subscribe(() => {
154
+ if (!closing) listener();
155
+ }, options.sessionId));
156
+ },
157
+ async dispose() {
158
+ closing = true;
159
+ lifetime.abort();
160
+ const failures = [];
161
+ for (const dispose of subscriptions) try {
162
+ dispose();
163
+ } catch (error) {
164
+ failures.push(error);
165
+ }
166
+ await Promise.allSettled(pending);
167
+ if (failures.length === 1) throw failures[0];
168
+ if (failures.length > 1) throw new AggregateError(failures, "Runner subscription cleanup failed.");
169
+ }
170
+ };
171
+ }
172
+ //#endregion
173
+ Object.defineProperty(exports, "PO_RUNNER_LAUNCH_SERVICE", {
174
+ enumerable: true,
175
+ get: function() {
176
+ return PO_RUNNER_LAUNCH_SERVICE;
177
+ }
178
+ });
179
+ Object.defineProperty(exports, "createRunnerLaunch", {
180
+ enumerable: true,
181
+ get: function() {
182
+ return createRunnerLaunch;
183
+ }
184
+ });
185
+ Object.defineProperty(exports, "readPoRunnerLaunch", {
186
+ enumerable: true,
187
+ get: function() {
188
+ return readPoRunnerLaunch;
189
+ }
190
+ });
191
+
192
+ //# sourceMappingURL=runnerLaunch-BAf7hXMr.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runnerLaunch-BAf7hXMr.cjs","names":[],"sources":["../src/services/runnerLaunch/index.ts"],"sourcesContent":["import type { Context } from '@deepseek-ai/cordis';\n\nimport type { IBashRunService } from '../../types/bashRunService';\nimport type {\n PoRunnerLaunchService,\n RunnerLaunchInput,\n RunnerLaunchOperations,\n RunnerView,\n} from '../../types/runnerLaunch';\nimport type { IRunnerRegistry, RunnerRecord } from '../../types/runnerRegistry';\nimport type { RunnerOperations } from '../runnerOperations';\n\nexport const PO_RUNNER_LAUNCH_SERVICE = 'po/runner-launch';\n\nexport function readPoRunnerLaunch(context: Context): PoRunnerLaunchService | undefined {\n return context.get(PO_RUNNER_LAUNCH_SERVICE);\n}\n\ndeclare module '@deepseek-ai/cordis' {\n interface Context {\n 'po/runner-launch': PoRunnerLaunchService;\n }\n}\n\ninterface RunnerLaunchOptions {\n sessionId: string;\n /** The session whose runners `forOwner()` reaches: the workflow owner the host trusts, else `sessionId`. */\n ownerSessionId: string;\n /** Looks up a session's registered local launch. Called on every routed call, never cached. */\n getOwner(sessionId: string): RunnerLaunchOperations | undefined;\n runService: IBashRunService;\n registry: Pick<IRunnerRegistry, 'get' | 'listAll' | 'subscribe'>;\n operations: Pick<RunnerOperations, 'stop' | 'logs'>;\n ensureSession(sessionId: string): Promise<void>;\n watchRunner(id: string): void;\n assertAvailable(): void;\n}\n\nfunction validate(input: RunnerLaunchInput): void {\n if (\n !input ||\n !Array.isArray(input.command) ||\n input.command.length !== 1 ||\n typeof input.command[0] !== 'string' ||\n !input.command[0].trim()\n )\n throw new Error('command must contain exactly one nonempty shell command.');\n if (typeof input.name !== 'string' || !input.name.trim() || typeof input.cwd !== 'string' || !input.cwd.trim())\n throw new Error('name and cwd must be nonempty strings.');\n if (input.wakeOnExit !== undefined && typeof input.wakeOnExit !== 'boolean')\n throw new Error('wakeOnExit must be boolean.');\n if (\n input.env !== undefined &&\n (typeof input.env !== 'object' ||\n input.env === null ||\n Array.isArray(input.env) ||\n Object.entries(input.env).some(\n ([key, value]) => !/^[A-Za-z_][A-Za-z0-9_]*$/u.test(key) || typeof value !== 'string' || value.includes('\\0'),\n ))\n )\n throw new Error('env must be a record of valid environment names and string values without NUL.');\n}\n\n/** Routes packages into the same registry, lifeline and notices as ordinary bash runners. */\nexport function createRunnerLaunch(\n options: RunnerLaunchOptions,\n): PoRunnerLaunchService & { forOwner(): RunnerLaunchOperations; dispose(): Promise<void> } {\n let closing = false;\n const lifetime = new AbortController();\n const pending = new Set<Promise<RunnerView>>();\n const subscriptions = new Set<() => void>();\n const assertAvailable = () => {\n if (closing) throw new Error('Runner launch service is disposed.');\n options.assertAvailable();\n };\n const track = (launch: Promise<RunnerView>): Promise<RunnerView> => {\n pending.add(launch);\n void launch.finally(() => pending.delete(launch)).catch(() => undefined);\n return launch;\n };\n const subscribed = (unsubscribe: () => void): (() => void) => {\n const dispose = () => {\n if (!subscriptions.delete(dispose)) return;\n unsubscribe();\n };\n subscriptions.add(dispose);\n return dispose;\n };\n const view = (record: RunnerRecord): RunnerView => {\n if (record.sessionId !== options.sessionId || record.backend !== 'native')\n throw new Error('Runner is not a native runner owned by this session.');\n return structuredClone({\n id: record.id,\n name: record.name,\n pid: record.pid,\n cwd: record.cwd,\n logPath: record.logPath,\n state: record.state,\n backend: 'native',\n ...(record.exit ? { exit: record.exit } : {}),\n });\n };\n const get = async (id: string) => {\n assertAvailable();\n const record = await options.registry.get(id, options.sessionId);\n assertAvailable();\n return record ? view(record) : undefined;\n };\n const required = async (id: string) => {\n const record = await get(id);\n if (!record) throw new Error(`No native runner with id ${id} in this session.`);\n return record;\n };\n const start = async (input: RunnerLaunchInput, signal?: AbortSignal): Promise<RunnerView> => {\n assertAvailable();\n signal = signal ? AbortSignal.any([signal, lifetime.signal]) : lifetime.signal;\n signal.throwIfAborted();\n validate(input);\n // Do not retain mutable arguments supplied by a package caller across awaits.\n const admitted = structuredClone(input);\n await options.ensureSession(options.sessionId);\n assertAvailable();\n signal?.throwIfAborted();\n const result = await options.runService.run({\n command: admitted.command[0],\n name: admitted.name,\n cwd: admitted.cwd,\n ...(admitted.env ? { env: admitted.env } : {}),\n sessionId: options.sessionId,\n backend: 'native',\n background: true,\n ...(signal ? { signal } : {}),\n });\n if (result.kind === 'failed') throw new Error(result.error);\n if (result.kind !== 'promoted' || result.backend !== 'native')\n throw new Error('Native runner failed to enter supervision.');\n // Shutdown drains starts before disposing the registry, including launches already in flight.\n if (closing || signal?.aborted) {\n await options.operations.stop(result.id, 'launch cancelled');\n throw new Error('Native runner launch was cancelled.');\n }\n assertAvailable();\n const launched = await required(result.id);\n // A release that lands while the view is read is still before handoff, so the runner must not leak.\n if (closing || signal?.aborted) {\n await options.operations.stop(result.id, 'launch cancelled');\n throw new Error('Native runner launch was cancelled.');\n }\n if (admitted.wakeOnExit) options.watchRunner(result.id);\n return launched;\n };\n // The owner is resolved on every call and only from the trusted `ownerSessionId`, so a caller can neither\n // name another session nor keep a handle to an owner that has since closed or been replaced.\n const owner = (): RunnerLaunchOperations => {\n assertAvailable();\n const target = options.getOwner(options.ownerSessionId);\n if (!target) throw new Error('owner unavailable');\n return target;\n };\n const routed: RunnerLaunchOperations = {\n start(input, signal) {\n return track(\n (async () => {\n assertAvailable();\n // Releasing this session cancels its own calls still before handoff; it never touches the owner launch.\n signal = signal ? AbortSignal.any([signal, lifetime.signal]) : lifetime.signal;\n signal.throwIfAborted();\n validate(input);\n // Routed runners never wake this session's agent; the owner's launch tracks the call for its own drain.\n return owner().start({ ...input, wakeOnExit: false }, signal);\n })(),\n );\n },\n async get(id) {\n return owner().get(id);\n },\n async list() {\n return owner().list();\n },\n async stop(id, reason) {\n return owner().stop(id, reason);\n },\n async logs(id, input) {\n return owner().logs(id, input);\n },\n onChange(listener) {\n return subscribed(\n owner().onChange(() => {\n if (!closing) listener();\n }),\n );\n },\n };\n return {\n start(input, signal) {\n return track(start(input, signal));\n },\n forOwner: () => routed,\n get,\n async list() {\n assertAvailable();\n const records = await options.registry.listAll(options.sessionId);\n assertAvailable();\n return records.filter((record) => record.backend === 'native').map(view);\n },\n async stop(id, reason) {\n await required(id);\n await options.operations.stop(id, reason, assertAvailable);\n return required(id);\n },\n async logs(id, input) {\n await required(id);\n return (await options.operations.logs(id, { lines: input?.tail ?? 200 }, assertAvailable)).text;\n },\n onChange(listener) {\n assertAvailable();\n return subscribed(\n options.registry.subscribe(() => {\n if (!closing) listener();\n }, options.sessionId),\n );\n },\n async dispose() {\n closing = true;\n lifetime.abort();\n const failures: unknown[] = [];\n for (const dispose of subscriptions) {\n try {\n dispose();\n } catch (error) {\n failures.push(error);\n }\n }\n // Subscription failures must not let runtime cleanup race a still-promoting launch.\n await Promise.allSettled(pending);\n if (failures.length === 1) throw failures[0];\n if (failures.length > 1) throw new AggregateError(failures, 'Runner subscription cleanup fail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AAU,qCAAqC;EACnG;CACF;AACF"}
@@ -0,0 +1,175 @@
1
+ //#region src/services/runnerLaunch/index.ts
2
+ const PO_RUNNER_LAUNCH_SERVICE = "po/runner-launch";
3
+ function readPoRunnerLaunch(context) {
4
+ return context.get(PO_RUNNER_LAUNCH_SERVICE);
5
+ }
6
+ function validate(input) {
7
+ if (!input || !Array.isArray(input.command) || input.command.length !== 1 || typeof input.command[0] !== "string" || !input.command[0].trim()) throw new Error("command must contain exactly one nonempty shell command.");
8
+ if (typeof input.name !== "string" || !input.name.trim() || typeof input.cwd !== "string" || !input.cwd.trim()) throw new Error("name and cwd must be nonempty strings.");
9
+ if (input.wakeOnExit !== void 0 && typeof input.wakeOnExit !== "boolean") throw new Error("wakeOnExit must be boolean.");
10
+ if (input.env !== void 0 && (typeof input.env !== "object" || input.env === null || Array.isArray(input.env) || Object.entries(input.env).some(([key, value]) => !/^[A-Za-z_][A-Za-z0-9_]*$/u.test(key) || typeof value !== "string" || value.includes("\0")))) throw new Error("env must be a record of valid environment names and string values without NUL.");
11
+ }
12
+ /** Routes packages into the same registry, lifeline and notices as ordinary bash runners. */
13
+ function createRunnerLaunch(options) {
14
+ let closing = false;
15
+ const lifetime = new AbortController();
16
+ const pending = /* @__PURE__ */ new Set();
17
+ const subscriptions = /* @__PURE__ */ new Set();
18
+ const assertAvailable = () => {
19
+ if (closing) throw new Error("Runner launch service is disposed.");
20
+ options.assertAvailable();
21
+ };
22
+ const track = (launch) => {
23
+ pending.add(launch);
24
+ launch.finally(() => pending.delete(launch)).catch(() => void 0);
25
+ return launch;
26
+ };
27
+ const subscribed = (unsubscribe) => {
28
+ const dispose = () => {
29
+ if (!subscriptions.delete(dispose)) return;
30
+ unsubscribe();
31
+ };
32
+ subscriptions.add(dispose);
33
+ return dispose;
34
+ };
35
+ const view = (record) => {
36
+ if (record.sessionId !== options.sessionId || record.backend !== "native") throw new Error("Runner is not a native runner owned by this session.");
37
+ return structuredClone({
38
+ id: record.id,
39
+ name: record.name,
40
+ pid: record.pid,
41
+ cwd: record.cwd,
42
+ logPath: record.logPath,
43
+ state: record.state,
44
+ backend: "native",
45
+ ...record.exit ? { exit: record.exit } : {}
46
+ });
47
+ };
48
+ const get = async (id) => {
49
+ assertAvailable();
50
+ const record = await options.registry.get(id, options.sessionId);
51
+ assertAvailable();
52
+ return record ? view(record) : void 0;
53
+ };
54
+ const required = async (id) => {
55
+ const record = await get(id);
56
+ if (!record) throw new Error(`No native runner with id ${id} in this session.`);
57
+ return record;
58
+ };
59
+ const start = async (input, signal) => {
60
+ assertAvailable();
61
+ signal = signal ? AbortSignal.any([signal, lifetime.signal]) : lifetime.signal;
62
+ signal.throwIfAborted();
63
+ validate(input);
64
+ const admitted = structuredClone(input);
65
+ await options.ensureSession(options.sessionId);
66
+ assertAvailable();
67
+ signal?.throwIfAborted();
68
+ const result = await options.runService.run({
69
+ command: admitted.command[0],
70
+ name: admitted.name,
71
+ cwd: admitted.cwd,
72
+ ...admitted.env ? { env: admitted.env } : {},
73
+ sessionId: options.sessionId,
74
+ backend: "native",
75
+ background: true,
76
+ ...signal ? { signal } : {}
77
+ });
78
+ if (result.kind === "failed") throw new Error(result.error);
79
+ if (result.kind !== "promoted" || result.backend !== "native") throw new Error("Native runner failed to enter supervision.");
80
+ if (closing || signal?.aborted) {
81
+ await options.operations.stop(result.id, "launch cancelled");
82
+ throw new Error("Native runner launch was cancelled.");
83
+ }
84
+ assertAvailable();
85
+ const launched = await required(result.id);
86
+ if (closing || signal?.aborted) {
87
+ await options.operations.stop(result.id, "launch cancelled");
88
+ throw new Error("Native runner launch was cancelled.");
89
+ }
90
+ if (admitted.wakeOnExit) options.watchRunner(result.id);
91
+ return launched;
92
+ };
93
+ const owner = () => {
94
+ assertAvailable();
95
+ const target = options.getOwner(options.ownerSessionId);
96
+ if (!target) throw new Error("owner unavailable");
97
+ return target;
98
+ };
99
+ const routed = {
100
+ start(input, signal) {
101
+ return track((async () => {
102
+ assertAvailable();
103
+ signal = signal ? AbortSignal.any([signal, lifetime.signal]) : lifetime.signal;
104
+ signal.throwIfAborted();
105
+ validate(input);
106
+ return owner().start({
107
+ ...input,
108
+ wakeOnExit: false
109
+ }, signal);
110
+ })());
111
+ },
112
+ async get(id) {
113
+ return owner().get(id);
114
+ },
115
+ async list() {
116
+ return owner().list();
117
+ },
118
+ async stop(id, reason) {
119
+ return owner().stop(id, reason);
120
+ },
121
+ async logs(id, input) {
122
+ return owner().logs(id, input);
123
+ },
124
+ onChange(listener) {
125
+ return subscribed(owner().onChange(() => {
126
+ if (!closing) listener();
127
+ }));
128
+ }
129
+ };
130
+ return {
131
+ start(input, signal) {
132
+ return track(start(input, signal));
133
+ },
134
+ forOwner: () => routed,
135
+ get,
136
+ async list() {
137
+ assertAvailable();
138
+ const records = await options.registry.listAll(options.sessionId);
139
+ assertAvailable();
140
+ return records.filter((record) => record.backend === "native").map(view);
141
+ },
142
+ async stop(id, reason) {
143
+ await required(id);
144
+ await options.operations.stop(id, reason, assertAvailable);
145
+ return required(id);
146
+ },
147
+ async logs(id, input) {
148
+ await required(id);
149
+ return (await options.operations.logs(id, { lines: input?.tail ?? 200 }, assertAvailable)).text;
150
+ },
151
+ onChange(listener) {
152
+ assertAvailable();
153
+ return subscribed(options.registry.subscribe(() => {
154
+ if (!closing) listener();
155
+ }, options.sessionId));
156
+ },
157
+ async dispose() {
158
+ closing = true;
159
+ lifetime.abort();
160
+ const failures = [];
161
+ for (const dispose of subscriptions) try {
162
+ dispose();
163
+ } catch (error) {
164
+ failures.push(error);
165
+ }
166
+ await Promise.allSettled(pending);
167
+ if (failures.length === 1) throw failures[0];
168
+ if (failures.length > 1) throw new AggregateError(failures, "Runner subscription cleanup failed.");
169
+ }
170
+ };
171
+ }
172
+ //#endregion
173
+ export { createRunnerLaunch as n, readPoRunnerLaunch as r, PO_RUNNER_LAUNCH_SERVICE as t };
174
+
175
+ //# sourceMappingURL=runnerLaunch-Bimgdh4h.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runnerLaunch-Bimgdh4h.mjs","names":[],"sources":["../src/services/runnerLaunch/index.ts"],"sourcesContent":["import type { Context } from '@deepseek-ai/cordis';\n\nimport type { IBashRunService } from '../../types/bashRunService';\nimport type {\n PoRunnerLaunchService,\n RunnerLaunchInput,\n RunnerLaunchOperations,\n RunnerView,\n} from '../../types/runnerLaunch';\nimport type { IRunnerRegistry, RunnerRecord } from '../../types/runnerRegistry';\nimport type { RunnerOperations } from '../runnerOperations';\n\nexport const PO_RUNNER_LAUNCH_SERVICE = 'po/runner-launch';\n\nexport function readPoRunnerLaunch(context: Context): PoRunnerLaunchService | undefined {\n return context.get(PO_RUNNER_LAUNCH_SERVICE);\n}\n\ndeclare module '@deepseek-ai/cordis' {\n interface Context {\n 'po/runner-launch': PoRunnerLaunchService;\n }\n}\n\ninterface RunnerLaunchOptions {\n sessionId: string;\n /** The session whose runners `forOwner()` reaches: the workflow owner the host trusts, else `sessionId`. */\n ownerSessionId: string;\n /** Looks up a session's registered local launch. Called on every routed call, never cached. */\n getOwner(sessionId: string): RunnerLaunchOperations | undefined;\n runService: IBashRunService;\n registry: Pick<IRunnerRegistry, 'get' | 'listAll' | 'subscribe'>;\n operations: Pick<RunnerOperations, 'stop' | 'logs'>;\n ensureSession(sessionId: string): Promise<void>;\n watchRunner(id: string): void;\n assertAvailable(): void;\n}\n\nfunction validate(input: RunnerLaunchInput): void {\n if (\n !input ||\n !Array.isArray(input.command) ||\n input.command.length !== 1 ||\n typeof input.command[0] !== 'string' ||\n !input.command[0].trim()\n )\n throw new Error('command must contain exactly one nonempty shell command.');\n if (typeof input.name !== 'string' || !input.name.trim() || typeof input.cwd !== 'string' || !input.cwd.trim())\n throw new Error('name and cwd must be nonempty strings.');\n if (input.wakeOnExit !== undefined && typeof input.wakeOnExit !== 'boolean')\n throw new Error('wakeOnExit must be boolean.');\n if (\n input.env !== undefined &&\n (typeof input.env !== 'object' ||\n input.env === null ||\n Array.isArray(input.env) ||\n Object.entries(input.env).some(\n ([key, value]) => !/^[A-Za-z_][A-Za-z0-9_]*$/u.test(key) || typeof value !== 'string' || value.includes('\\0'),\n ))\n )\n throw new Error('env must be a record of valid environment names and string values without NUL.');\n}\n\n/** Routes packages into the same registry, lifeline and notices as ordinary bash runners. */\nexport function createRunnerLaunch(\n options: RunnerLaunchOptions,\n): PoRunnerLaunchService & { forOwner(): RunnerLaunchOperations; dispose(): Promise<void> } {\n let closing = false;\n const lifetime = new AbortController();\n const pending = new Set<Promise<RunnerView>>();\n const subscriptions = new Set<() => void>();\n const assertAvailable = () => {\n if (closing) throw new Error('Runner launch service is disposed.');\n options.assertAvailable();\n };\n const track = (launch: Promise<RunnerView>): Promise<RunnerView> => {\n pending.add(launch);\n void launch.finally(() => pending.delete(launch)).catch(() => undefined);\n return launch;\n };\n const subscribed = (unsubscribe: () => void): (() => void) => {\n const dispose = () => {\n if (!subscriptions.delete(dispose)) return;\n unsubscribe();\n };\n subscriptions.add(dispose);\n return dispose;\n };\n const view = (record: RunnerRecord): RunnerView => {\n if (record.sessionId !== options.sessionId || record.backend !== 'native')\n throw new Error('Runner is not a native runner owned by this session.');\n return structuredClone({\n id: record.id,\n name: record.name,\n pid: record.pid,\n cwd: record.cwd,\n logPath: record.logPath,\n state: record.state,\n backend: 'native',\n ...(record.exit ? { exit: record.exit } : {}),\n });\n };\n const get = async (id: string) => {\n assertAvailable();\n const record = await options.registry.get(id, options.sessionId);\n assertAvailable();\n return record ? view(record) : undefined;\n };\n const required = async (id: string) => {\n const record = await get(id);\n if (!record) throw new Error(`No native runner with id ${id} in this session.`);\n return record;\n };\n const start = async (input: RunnerLaunchInput, signal?: AbortSignal): Promise<RunnerView> => {\n assertAvailable();\n signal = signal ? AbortSignal.any([signal, lifetime.signal]) : lifetime.signal;\n signal.throwIfAborted();\n validate(input);\n // Do not retain mutable arguments supplied by a package caller across awaits.\n const admitted = structuredClone(input);\n await options.ensureSession(options.sessionId);\n assertAvailable();\n signal?.throwIfAborted();\n const result = await options.runService.run({\n command: admitted.command[0],\n name: admitted.name,\n cwd: admitted.cwd,\n ...(admitted.env ? { env: admitted.env } : {}),\n sessionId: options.sessionId,\n backend: 'native',\n background: true,\n ...(signal ? { signal } : {}),\n });\n if (result.kind === 'failed') throw new Error(result.error);\n if (result.kind !== 'promoted' || result.backend !== 'native')\n throw new Error('Native runner failed to enter supervision.');\n // Shutdown drains starts before disposing the registry, including launches already in flight.\n if (closing || signal?.aborted) {\n await options.operations.stop(result.id, 'launch cancelled');\n throw new Error('Native runner launch was cancelled.');\n }\n assertAvailable();\n const launched = await required(result.id);\n // A release that lands while the view is read is still before handoff, so the runner must not leak.\n if (closing || signal?.aborted) {\n await options.operations.stop(result.id, 'launch cancelled');\n throw new Error('Native runner launch was cancelled.');\n }\n if (admitted.wakeOnExit) options.watchRunner(result.id);\n return launched;\n };\n // The owner is resolved on every call and only from the trusted `ownerSessionId`, so a caller can neither\n // name another session nor keep a handle to an owner that has since closed or been replaced.\n const owner = (): RunnerLaunchOperations => {\n assertAvailable();\n const target = options.getOwner(options.ownerSessionId);\n if (!target) throw new Error('owner unavailable');\n return target;\n };\n const routed: RunnerLaunchOperations = {\n start(input, signal) {\n return track(\n (async () => {\n assertAvailable();\n // Releasing this session cancels its own calls still before handoff; it never touches the owner launch.\n signal = signal ? AbortSignal.any([signal, lifetime.signal]) : lifetime.signal;\n signal.throwIfAborted();\n validate(input);\n // Routed runners never wake this session's agent; the owner's launch tracks the call for its own drain.\n return owner().start({ ...input, wakeOnExit: false }, signal);\n })(),\n );\n },\n async get(id) {\n return owner().get(id);\n },\n async list() {\n return owner().list();\n },\n async stop(id, reason) {\n return owner().stop(id, reason);\n },\n async logs(id, input) {\n return owner().logs(id, input);\n },\n onChange(listener) {\n return subscribed(\n owner().onChange(() => {\n if (!closing) listener();\n }),\n );\n },\n };\n return {\n start(input, signal) {\n return track(start(input, signal));\n },\n forOwner: () => routed,\n get,\n async list() {\n assertAvailable();\n const records = await options.registry.listAll(options.sessionId);\n assertAvailable();\n return records.filter((record) => record.backend === 'native').map(view);\n },\n async stop(id, reason) {\n await required(id);\n await options.operations.stop(id, reason, assertAvailable);\n return required(id);\n },\n async logs(id, input) {\n await required(id);\n return (await options.operations.logs(id, { lines: input?.tail ?? 200 }, assertAvailable)).text;\n },\n onChange(listener) {\n assertAvailable();\n return subscribed(\n options.registry.subscribe(() => {\n if (!closing) listener();\n }, options.sessionId),\n );\n },\n async dispose() {\n closing = true;\n lifetime.abort();\n const failures: unknown[] = [];\n for (const dispose of subscriptions) {\n try {\n dispose();\n } catch (error) {\n failures.push(error);\n }\n }\n // Subscription failures must not let runtime cleanup race a still-promoting launch.\n await Promise.allSettled(pending);\n if (failures.length === 1) throw failures[0];\n if (failures.length > 1) throw new AggregateError(failures, 'Runner subscription cleanup failed.');\n },\n };\n}\n"],"mappings":";AAYA,MAAa,2BAA2B;AAExC,SAAgB,mBAAmB,SAAqD;CACtF,OAAO,QAAQ,IAAI,wBAAwB;AAC7C;AAsBA,SAAS,SAAS,OAAgC;CAChD,IACE,CAAC,SACD,CAAC,MAAM,QAAQ,MAAM,OAAO,KAC5B,MAAM,QAAQ,WAAW,KACzB,OAAO,MAAM,QAAQ,OAAO,YAC5B,CAAC,MAAM,QAAQ,EAAE,CAAC,KAAK,GAEvB,MAAM,IAAI,MAAM,0DAA0D;CAC5E,IAAI,OAAO,MAAM,SAAS,YAAY,CAAC,MAAM,KAAK,KAAK,KAAK,OAAO,MAAM,QAAQ,YAAY,CAAC,MAAM,IAAI,KAAK,GAC3G,MAAM,IAAI,MAAM,wCAAwC;CAC1D,IAAI,MAAM,eAAe,KAAA,KAAa,OAAO,MAAM,eAAe,WAChE,MAAM,IAAI,MAAM,6BAA6B;CAC/C,IACE,MAAM,QAAQ,KAAA,MACb,OAAO,MAAM,QAAQ,YACpB,MAAM,QAAQ,QACd,MAAM,QAAQ,MAAM,GAAG,KACvB,OAAO,QAAQ,MAAM,GAAG,CAAC,CAAC,MACvB,CAAC,KAAK,WAAW,CAAC,4BAA4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O,OAAO,QAAQ,IAAI,GAAG,eAAe,EAAA,CAAG;EAC7F;EACA,SAAS,UAAU;GACjB,gBAAgB;GAChB,OAAO,WACL,QAAQ,SAAS,gBAAgB;IAC/B,IAAI,CAAC,SAAS,SAAS;GACzB,GAAG,QAAQ,SAAS,CACtB;EACF;EACA,MAAM,UAAU;GACd,UAAU;GACV,SAAS,MAAM;GACf,MAAM,WAAsB,CAAC;GAC7B,KAAK,MAAM,WAAW,eACpB,IAAI;IACF,QAAQ;GACV,SAAS,OAAO;IACd,SAAS,KAAK,KAAK;GACrB;GAGF,MAAM,QAAQ,WAAW,OAAO;GAChC,IAAI,SAAS,WAAW,GAAG,MAAM,SAAS;GAC1C,IAAI,SAAS,SAAS,GAAG,MAAM,IAAI,eAAe,UAAU,qCAAqC;EACnG;CACF;AACF"}
@@ -1,4 +1,4 @@
1
- import { n as IRunnerRegistry } from "./runnerRegistry-V-Ocaf4N.mjs";
1
+ import { n as IRunnerRegistry } from "./runnerRegistry-BlZhS9yL.mjs";
2
2
  import { t as IRunnerNamer } from "./type-vWQNTahw.mjs";
3
3
  //#region src/services/runnerNamer/index.d.ts
4
4
  export declare class RunnerNamer implements IRunnerNamer {