@outerlayer/cli 0.40.0 → 0.41.0-next.20261117195646

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 (217) hide show
  1. package/README.md +8 -5
  2. package/dist/agent-credential-JN5VDRUX.js +16 -0
  3. package/dist/agent-setup-7A66WE3X.js +43 -0
  4. package/dist/{agent-subcommand-U7TXKOF4.js → agent-subcommand-AE42NSHC.js} +6 -6
  5. package/dist/{artifact-link-cmd-HYEM4X5U.js → artifact-link-cmd-YMMRVRQD.js} +2 -2
  6. package/dist/bridge-PJTQ3XHE.js +19 -0
  7. package/dist/build-75I2U74U.js +28 -0
  8. package/dist/build-disk-Z5YFT47Z.js +23 -0
  9. package/dist/build-info.json +1 -1
  10. package/dist/builder-NNNVIN4P.js +22 -0
  11. package/dist/caller-H3KRGMJH.js +25 -0
  12. package/dist/{check-U5P5FFFB.js → check-KFQCKXHZ.js} +108 -90
  13. package/dist/{chunk-4KCWAP5L.js → chunk-23YVVYQC.js} +1 -1
  14. package/dist/{chunk-J3P4WLJA.js → chunk-26RXLXEX.js} +1 -1
  15. package/dist/{chunk-YYHSGZHO.js → chunk-2RUTYYYA.js} +1 -1
  16. package/dist/{chunk-6IGOHB3O.js → chunk-37WA2LQC.js} +6 -1
  17. package/dist/{chunk-WNX2RR5P.js → chunk-3HH2AQKF.js} +1 -1
  18. package/dist/{chunk-ZHRXINEW.js → chunk-3RXLDGWE.js} +7 -7
  19. package/dist/{chunk-ZCBKVSBK.js → chunk-4I3SN7WG.js} +3 -3
  20. package/dist/{chunk-TWKW3BL3.js → chunk-4RPDWURG.js} +1 -1
  21. package/dist/{chunk-Y34AHK7R.js → chunk-4SMKP5QI.js} +2 -2
  22. package/dist/{chunk-XC2ZN7UA.js → chunk-6SYVSIGA.js} +1 -1
  23. package/dist/{chunk-CQIJVNUB.js → chunk-A2AFTKMN.js} +7 -7
  24. package/dist/{chunk-PKBW4RL7.js → chunk-APVMCKLK.js} +1 -1
  25. package/dist/{chunk-4JUAJVOW.js → chunk-ATXTGXGK.js} +2 -2
  26. package/dist/{chunk-24K3CV6P.js → chunk-B2WCKRMW.js} +6 -6
  27. package/dist/{chunk-LA66NWUO.js → chunk-B3ZKYFBI.js} +1 -1
  28. package/dist/{chunk-HS45JMDJ.js → chunk-B6W2LW7E.js} +1 -1
  29. package/dist/{chunk-3UFBSPHM.js → chunk-BO5TMIRG.js} +4 -4
  30. package/dist/{chunk-5VANIC7Z.js → chunk-BPZ23EMS.js} +7 -7
  31. package/dist/{chunk-CDMNKUFT.js → chunk-CUMLCXFI.js} +2 -2
  32. package/dist/{chunk-YZQDTL3T.js → chunk-D47Z2Z7F.js} +190 -173
  33. package/dist/{chunk-VXL7SLO3.js → chunk-D5TZYUGZ.js} +1 -1
  34. package/dist/{chunk-AE6A5DVR.js → chunk-D5YKSWK3.js} +8 -8
  35. package/dist/{chunk-5GJWIATY.js → chunk-DJCSAWBV.js} +4 -4
  36. package/dist/{chunk-F3J4UKBF.js → chunk-DJK3IK6K.js} +1 -1
  37. package/dist/{chunk-CHIKNMWU.js → chunk-DXZ6QBUJ.js} +1 -1
  38. package/dist/{chunk-7N6MB6NR.js → chunk-EVAK6FAS.js} +6 -6
  39. package/dist/{chunk-WGWIB5JH.js → chunk-EYD5HOQ7.js} +1 -1
  40. package/dist/{chunk-AOAXRPXC.js → chunk-FD42O5SH.js} +13 -4
  41. package/dist/{chunk-FIH3QA4E.js → chunk-FMOGX7RR.js} +5 -5
  42. package/dist/{chunk-EOKIUWXY.js → chunk-FRLGVHJP.js} +1 -1
  43. package/dist/{chunk-7RIWXHSY.js → chunk-G4B473J5.js} +3 -3
  44. package/dist/chunk-GAHP2AI3.js +163 -0
  45. package/dist/{chunk-3KT24F2C.js → chunk-GVGHEQCU.js} +9 -9
  46. package/dist/{chunk-WNPLSKH6.js → chunk-H2NTP6OM.js} +1 -1
  47. package/dist/{chunk-F3P7DP7R.js → chunk-I6G5CO3K.js} +1 -1
  48. package/dist/{chunk-D6CU6N5S.js → chunk-IOSONR7N.js} +2 -2
  49. package/dist/{chunk-SKVA4VMG.js → chunk-J2ADYASG.js} +1 -1
  50. package/dist/{chunk-CVDB3ILT.js → chunk-JMSMNKCK.js} +1 -1
  51. package/dist/{chunk-TTPOEZFE.js → chunk-KTZOD7A3.js} +1 -1
  52. package/dist/{chunk-SGVMC66D.js → chunk-LOWZZ4QA.js} +1 -1
  53. package/dist/{chunk-DCY6QUS6.js → chunk-M4YTSRJI.js} +1 -1
  54. package/dist/chunk-MQ6SKVLA.js +9 -0
  55. package/dist/{chunk-ZZN2TUHE.js → chunk-MYFC3HKP.js} +9 -9
  56. package/dist/{chunk-Q5A5WWZI.js → chunk-NCZNYMTB.js} +23 -21
  57. package/dist/{chunk-R2VUU5TC.js → chunk-NEOM73RW.js} +1 -1
  58. package/dist/{chunk-AQNL3XHS.js → chunk-NPVIEJX6.js} +1 -1
  59. package/dist/{chunk-K5J7AKRL.js → chunk-P7WAAN35.js} +1 -1
  60. package/dist/{chunk-SQIFPWGN.js → chunk-PLVLC7SU.js} +2 -2
  61. package/dist/{chunk-A6DFTKQF.js → chunk-PMJGT7SQ.js} +25 -19
  62. package/dist/{chunk-WVEN3DDJ.js → chunk-PTZF6MC5.js} +6 -6
  63. package/dist/{chunk-OLWDENJZ.js → chunk-Q3QJG2P6.js} +3 -3
  64. package/dist/{chunk-JIMISJV2.js → chunk-Q7Z6ELTL.js} +28 -7
  65. package/dist/{chunk-HHOFP647.js → chunk-QDJBEQCE.js} +1 -1
  66. package/dist/{chunk-BV4I6IIT.js → chunk-QFGKTIPS.js} +3 -3
  67. package/dist/{chunk-2SS737DI.js → chunk-QHGVLLOJ.js} +1 -1
  68. package/dist/{chunk-EOO274OK.js → chunk-QKVOUI56.js} +3 -3
  69. package/dist/{chunk-MUDXPJT6.js → chunk-QPC6OKD2.js} +11 -11
  70. package/dist/{chunk-MRM7CQJ3.js → chunk-QS2O5G64.js} +116 -14
  71. package/dist/{chunk-WKO72EYV.js → chunk-R6ME6MWL.js} +3 -3
  72. package/dist/{chunk-H7IY5B2M.js → chunk-RVUOSR2D.js} +526 -107
  73. package/dist/{chunk-L6UD5LKU.js → chunk-SDCECDBS.js} +5 -5
  74. package/dist/{chunk-P6GTJQMA.js → chunk-SE5ZVVDJ.js} +3 -3
  75. package/dist/{chunk-2ZF62BAK.js → chunk-TLCTOEU5.js} +1 -1
  76. package/dist/{chunk-PG4KH7G6.js → chunk-TVU7AL2Z.js} +6 -6
  77. package/dist/{chunk-XEVGUSP6.js → chunk-UTZULAN6.js} +10 -10
  78. package/dist/{chunk-VIIJAM2R.js → chunk-UYIWLYLX.js} +5 -5
  79. package/dist/{chunk-IGYRJWB4.js → chunk-V5MR6BWR.js} +226 -143
  80. package/dist/{chunk-BEPP2C3U.js → chunk-VATN55FQ.js} +8 -8
  81. package/dist/{chunk-ZCFGRVGX.js → chunk-VYF5BILX.js} +34 -7
  82. package/dist/{chunk-U74YD3WB.js → chunk-W7P5QFRN.js} +7 -7
  83. package/dist/{chunk-QMC2MM2S.js → chunk-WNFITHNX.js} +1 -1
  84. package/dist/{chunk-XMUNNJMO.js → chunk-WOQOZCZZ.js} +4 -4
  85. package/dist/{chunk-UHGU2EAK.js → chunk-WRIQGJKT.js} +225 -17
  86. package/dist/{chunk-DAAZIWK2.js → chunk-X7YMKZ7A.js} +23 -21
  87. package/dist/{chunk-WQRFIWYB.js → chunk-XCAPYFJ3.js} +5 -5
  88. package/dist/{chunk-VUSPSY6N.js → chunk-XDAMSCJG.js} +1 -1
  89. package/dist/{chunk-LAO7LRIR.js → chunk-XMJNIIPM.js} +411 -92
  90. package/dist/{chunk-Q7OOS23E.js → chunk-XNB2VFZI.js} +4 -4
  91. package/dist/{chunk-GBCTYHZ4.js → chunk-YLDCYJRP.js} +15 -13
  92. package/dist/{chunk-YKVFVP4A.js → chunk-YLDHHHBJ.js} +43 -13
  93. package/dist/{chunk-2GAQRL4S.js → chunk-YNZVC7XT.js} +4 -4
  94. package/dist/{chunk-HMW3UCME.js → chunk-YXKZGVUL.js} +36 -8
  95. package/dist/{chunk-YVBJ74GP.js → chunk-YXUSSZAE.js} +23 -21
  96. package/dist/{claude-launcher-ZLZ4UMHJ.js → claude-launcher-HNE36BKE.js} +68 -18
  97. package/dist/{cli-EFLEZPHB.js → cli-NEZV54LS.js} +220 -179
  98. package/dist/{command-22NUIO7Z.js → command-H2R6EFUH.js} +68 -61
  99. package/dist/{config-HZEVAUDO.js → config-DIUO2GQY.js} +16 -14
  100. package/dist/{connect-cmd-IUDF62SX.js → connect-cmd-SXSWOHVT.js} +17 -15
  101. package/dist/{container-start-PQAEL5ZS.js → container-start-B7BACAFN.js} +61 -57
  102. package/dist/{context-cleanup-OT7BL2NG.js → context-cleanup-BUZVQNKC.js} +6 -6
  103. package/dist/{context-show-cmd-JDO6DBBU.js → context-show-cmd-ZWOTXOXV.js} +18 -16
  104. package/dist/{control-plane-launch-M545J63D.js → control-plane-launch-BPJQYN6J.js} +19 -17
  105. package/dist/{demo-record-cmd-DGP3CW3A.js → demo-record-cmd-4H2J2N3X.js} +12 -10
  106. package/dist/{demo-voice-cmd-23BV7L6V.js → demo-voice-cmd-VIOM4SF5.js} +26 -24
  107. package/dist/{dist-AKLRKVET.js → dist-FKOMD5MC.js} +2 -2
  108. package/dist/docker-QQEZWBI3.js +22 -0
  109. package/dist/{doctor-5VN6Q4ZU.js → doctor-Y7CIJZX5.js} +115 -64
  110. package/dist/emit-artifact-cmd-HUAKLOH4.js +46 -0
  111. package/dist/{emit-cmd-RM6FHATP.js → emit-cmd-UDTT7ENT.js} +9 -9
  112. package/dist/emit-criteria-cmd-7LKPQRFE.js +37 -0
  113. package/dist/emit-demo-cmd-7TW5Y3MN.js +49 -0
  114. package/dist/{emit-finding-cmd-E7WKK2A4.js → emit-finding-cmd-T3JBAGS2.js} +20 -18
  115. package/dist/{emit-result-cmd-5LKEMUOD.js → emit-result-cmd-ILRQ6OIL.js} +24 -22
  116. package/dist/emit-step-cmd-4ISFOYRC.js +37 -0
  117. package/dist/exec-client-UJKPJRNK.js +20 -0
  118. package/dist/{find-unit-XKWFS4BL.js → find-unit-OAJKRZI2.js} +17 -15
  119. package/dist/{findings-cmd-5BNDO3YM.js → findings-cmd-37RCXQK2.js} +20 -18
  120. package/dist/fleet-readiness-IVFQSHPL.js +33 -0
  121. package/dist/governing-source-RXJBJHN7.js +45 -0
  122. package/dist/guest-init-EXKSBS7A.js +22 -0
  123. package/dist/{hook-fast-CQ2YCZLB.js → hook-fast-BSH6IHRN.js} +4 -4
  124. package/dist/{hook-install-VWF5C6EL.js → hook-install-NOWMUPSI.js} +6 -6
  125. package/dist/{hook-wrap-fast-Y5KKK67C.js → hook-wrap-fast-7E5LAYEU.js} +3 -3
  126. package/dist/host-checks-GWUYRJXA.js +84 -0
  127. package/dist/host-key-7WPFECOD.js +20 -0
  128. package/dist/{image-tag-VZTFHG6T.js → image-tag-GLR3OAO3.js} +12 -10
  129. package/dist/index.js +6 -6
  130. package/dist/init-4MF5M74X.js +84 -0
  131. package/dist/{init-IXQBYUOM.js → init-BEMNWKES.js} +55 -53
  132. package/dist/{init-agent-BWLBRVNP.js → init-agent-6E3FAOEZ.js} +55 -53
  133. package/dist/init-cmd-R5ICA2LP.js +55 -0
  134. package/dist/{init-update-35IRDVWQ.js → init-update-FAFXM2YE.js} +29 -27
  135. package/dist/install-cmd-HI5OQW5J.js +28 -0
  136. package/dist/launch-agent-JLANNHFC.js +28 -0
  137. package/dist/{layout-F6FDPUC2.js → layout-U2ZTNGVB.js} +6 -6
  138. package/dist/{login-browser-G3NBTYT6.js → login-browser-QAPMBSQA.js} +2 -2
  139. package/dist/{logs-NWVFDJS3.js → logs-RVPQEAYN.js} +11 -9
  140. package/dist/loop-PP7QFT3F.js +94 -0
  141. package/dist/machine-JHWQCYS3.js +84 -0
  142. package/dist/{machine-skills-U7RNJTPH.js → machine-skills-2QFBY2II.js} +6 -6
  143. package/dist/{mcp-install-cmd-QDYJB3RW.js → mcp-install-cmd-KRZJVOND.js} +6 -6
  144. package/dist/{mcp-serve-cmd-JEYAQJPY.js → mcp-serve-cmd-UT3YCM5P.js} +13 -11
  145. package/dist/{paths-DWVALEBM.js → paths-72CWJPND.js} +11 -9
  146. package/dist/pending-ES4EF46B.js +20 -0
  147. package/dist/pidfile-WI6SE35U.js +21 -0
  148. package/dist/record-KX763L6R.js +20 -0
  149. package/dist/{relay-SKBUV4HQ.js → relay-ZZWAUA6P.js} +9 -7
  150. package/dist/{relay-protocol-YSGHT7C4.js → relay-protocol-4GCTOIT4.js} +9 -7
  151. package/dist/{run-cmd-S7IQ6OVY.js → run-cmd-SCXMROKB.js} +20 -18
  152. package/dist/runner-agents-QS3IX55G.js +15 -0
  153. package/dist/runner-env-FU6EWMWW.js +26 -0
  154. package/dist/runner-identity-PUW27LAT.js +22 -0
  155. package/dist/{runner-key-OM2HCEVM.js → runner-key-5G2AJD57.js} +55 -53
  156. package/dist/session-sender-A46R3S66.js +46 -0
  157. package/dist/{setup-cmd-S4ZIVRRF.js → setup-cmd-OZS4QOPI.js} +18 -16
  158. package/dist/{setup-wiring-FRY6CKZ7.js → setup-wiring-G2RLSBQ6.js} +64 -62
  159. package/dist/{shell-function-7N3ILFLG.js → shell-function-6ZFAVOSM.js} +2 -2
  160. package/dist/{spec-cmd-PRGEIOJ7.js → spec-cmd-C4KSLTAD.js} +21 -19
  161. package/dist/{starter-pack-YVBD7AKE.js → starter-pack-G5TQVPMW.js} +7 -7
  162. package/dist/state-TCZAKBBZ.js +20 -0
  163. package/dist/{status-JORNKH3T.js → status-T6WDUAI4.js} +65 -53
  164. package/dist/{statusline-fast-ZWMTN36K.js → statusline-fast-VVJF5W7X.js} +3 -3
  165. package/dist/{sync-cmd-QVSAP72U.js → sync-cmd-ZYTJMWET.js} +24 -22
  166. package/dist/update-steps-PU34FN7N.js +85 -0
  167. package/dist/{watch-F2ELGBST.js → watch-VCKWAILU.js} +24 -22
  168. package/dist/{work-claim-cmd-LEM7P2ME.js → work-claim-cmd-7TR6LNIY.js} +27 -25
  169. package/dist/{work-cmd-M2RCHHKE.js → work-cmd-7KOXRPOJ.js} +20 -18
  170. package/dist/work-comment-cmd-EDXP3K7B.js +41 -0
  171. package/dist/{work-demo-cmd-FQMFCLZ6.js → work-demo-cmd-OYZTKNCG.js} +20 -18
  172. package/dist/{work-logs-cmd-KLPX4TYX.js → work-logs-cmd-P3QS5AFY.js} +20 -18
  173. package/dist/{work-mock-cmd-XJEG6AAT.js → work-mock-cmd-3QEXWV43.js} +20 -18
  174. package/dist/{work-needs-attention-cmd-BOINZLEQ.js → work-needs-attention-cmd-ZTQB2DXB.js} +20 -18
  175. package/dist/{work-no-change-cmd-IINJFYBD.js → work-no-change-cmd-FGHOOPLY.js} +20 -18
  176. package/dist/{work-open-pr-cmd-S2XL6OZV.js → work-open-pr-cmd-WFIPFVQR.js} +21 -19
  177. package/dist/work-pr-cmd-262GWNKI.js +36 -0
  178. package/dist/work-proofs-cmd-PAJSCMJ2.js +39 -0
  179. package/dist/{work-proofs-record-34VAOVND.js → work-proofs-record-A4NZTAME.js} +30 -28
  180. package/dist/{work-stop-cmd-HWG6IUFS.js → work-stop-cmd-CBRWKR4Q.js} +20 -18
  181. package/package.json +1 -1
  182. package/dist/agent-setup-KJVEDAHY.js +0 -41
  183. package/dist/bridge-UIT7F5DZ.js +0 -17
  184. package/dist/build-W2Z43HX5.js +0 -26
  185. package/dist/build-disk-AOY6DOEK.js +0 -21
  186. package/dist/builder-PHD5WM6J.js +0 -20
  187. package/dist/caller-WJVESIHQ.js +0 -23
  188. package/dist/docker-S6XFE42W.js +0 -20
  189. package/dist/emit-artifact-cmd-H3HULADF.js +0 -44
  190. package/dist/emit-criteria-cmd-UM3DXOOD.js +0 -35
  191. package/dist/emit-demo-cmd-BMAXX7M2.js +0 -47
  192. package/dist/emit-step-cmd-6TX7FGWI.js +0 -35
  193. package/dist/exec-client-H2AOUP6U.js +0 -18
  194. package/dist/fleet-readiness-YDRQPUI5.js +0 -31
  195. package/dist/governing-source-CLLOKTZF.js +0 -43
  196. package/dist/guest-init-PDLZDDB4.js +0 -20
  197. package/dist/host-checks-43WBI5JE.js +0 -82
  198. package/dist/host-key-AOUOQNV5.js +0 -18
  199. package/dist/init-IZJENDA6.js +0 -82
  200. package/dist/init-cmd-AL3ODKU6.js +0 -53
  201. package/dist/install-cmd-DMAMD7BD.js +0 -26
  202. package/dist/launch-agent-XAPO3FGT.js +0 -26
  203. package/dist/loop-Q5CTVY7B.js +0 -92
  204. package/dist/machine-55WUTHG3.js +0 -82
  205. package/dist/pending-PA5UWRHN.js +0 -18
  206. package/dist/pidfile-KOM3XD4E.js +0 -19
  207. package/dist/record-S2WGEUIM.js +0 -18
  208. package/dist/runner-agents-ZVIM6XVC.js +0 -14
  209. package/dist/runner-env-WD6CPYTN.js +0 -24
  210. package/dist/runner-identity-LDFFB6YB.js +0 -20
  211. package/dist/session-sender-IZP4E562.js +0 -44
  212. package/dist/state-LAKZKWCJ.js +0 -18
  213. package/dist/update-steps-LM3C7MG6.js +0 -83
  214. package/dist/work-comment-cmd-QGAY3QUN.js +0 -39
  215. package/dist/work-pr-cmd-6YTJRHVC.js +0 -34
  216. package/dist/work-proofs-cmd-OC3O264U.js +0 -37
  217. package/dist/{real-deps-B7NMEDXM.js → real-deps-HNNHF3UN.js} +1 -1
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { isSameProcess } from './chunk-JBJTC3UU.js';
4
- import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-VXL7SLO3.js';
4
+ import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-D5TZYUGZ.js';
5
5
  import { existsSync, readFileSync, mkdirSync, writeFileSync, rmSync } from 'fs';
6
6
  import { dirname } from 'path';
7
7
 
@@ -2,7 +2,7 @@
2
2
  import { createRequire } from 'node:module';
3
3
  import { readContextManifest, removeContextManifest } from './chunk-YQR6E6OV.js';
4
4
  import { removePreCommitGuardHook } from './chunk-CJPTUU2E.js';
5
- import { CONTEXT_PIN_FILENAME, agentRootFolders } from './chunk-LAO7LRIR.js';
5
+ import { CONTEXT_PIN_FILENAME, agentRootFolders } from './chunk-XMJNIIPM.js';
6
6
  import { execFileSync } from 'child_process';
7
7
  import { lstatSync, existsSync, unlinkSync, readdirSync, rmdirSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
8
8
  import { join, dirname, isAbsolute } from 'path';
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { keyRunnerFactory, RunnerConfigError } from './chunk-ZCFGRVGX.js';
4
- import { orgHomeDir } from './chunk-VXL7SLO3.js';
3
+ import { keyRunnerFactory, RunnerConfigError } from './chunk-VYF5BILX.js';
4
+ import { orgHomeDir } from './chunk-D5TZYUGZ.js';
5
5
 
6
6
  createRequire(import.meta.url);
7
7
 
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { DEFAULT_UNIT_NAME } from './chunk-Q5A5WWZI.js';
4
- import { RUNNER_FILE_MODE } from './chunk-VXL7SLO3.js';
5
- import { parseRunnerEnv, withoutCredentialLines } from './chunk-YZQDTL3T.js';
6
- import { headlessNames, runnerAgentNamed, credentialAgent, orList, credentialShapes, runnerAgents, credentialForms, credentialEnvPath, forwardedVariables } from './chunk-MRM7CQJ3.js';
7
- import { defaultAgents } from './chunk-LAO7LRIR.js';
3
+ import { DEFAULT_UNIT_NAME } from './chunk-NCZNYMTB.js';
4
+ import { RUNNER_FILE_MODE } from './chunk-D5TZYUGZ.js';
5
+ import { parseRunnerEnv, withoutCredentialLines } from './chunk-D47Z2Z7F.js';
6
+ import { isHeadlessAgent, runnerAgentNamed, credentialAgent, orList, credentialShapes, runnerAgents, credentialForms, credentialNames, forwardedVariables } from './chunk-QS2O5G64.js';
7
+ import { defaultAgents } from './chunk-XMJNIIPM.js';
8
8
  import { existsSync, readFileSync, writeFileSync, renameSync, rmSync } from 'fs';
9
- import { join, dirname } from 'path';
9
+ import { join, dirname, basename } from 'path';
10
10
 
11
11
  createRequire(import.meta.url);
12
12
  function isAgentName(name, agents = defaultAgents()) {
13
- return headlessNames(agents).includes(name);
13
+ return typeof name === "string" && isHeadlessAgent(name, agents);
14
14
  }
15
15
  var RunnerEnvError = class extends Error {
16
16
  };
@@ -21,10 +21,13 @@ function credentialFromStdin(text, agents = defaultAgents(), named) {
21
21
  const value = (text ?? "").trim();
22
22
  if (value === "") return void 0;
23
23
  const owner = named === void 0 ? void 0 : runnerAgentNamed(named, agents);
24
- if (owner !== void 0 && owner.descriptor.id !== credentialAgent(agents)?.descriptor.id) {
24
+ if (owner !== void 0) {
25
25
  const variable = owner.credentials.identify(value);
26
26
  if (variable !== void 0) return { variable, value };
27
- throw new RunnerEnvError(`the value on stdin is not a credential ${owner.descriptor.label} takes, so nothing was written. ${owner.descriptor.label} needs ${orList(credentialShapes(owner.descriptor).map((shape) => `${shape.phrase}, which starts ${shape.starts}`))}. Pipe one value.`);
27
+ if (owner.descriptor.id !== credentialAgent(agents)?.descriptor.id) {
28
+ throw new RunnerEnvError(`the value on stdin is not a credential ${owner.descriptor.label} takes, so nothing was written. ${owner.descriptor.label} needs ${orList(credentialShapes(owner.descriptor).map((shape) => `${shape.phrase}, which starts ${shape.starts}`))}. Pipe one value.`);
29
+ }
30
+ throw new RunnerEnvError(notFirstAgentCredential(owner));
28
31
  }
29
32
  for (const agent2 of runnerAgents(agents)) {
30
33
  const variable = agent2.credentials.identify(value);
@@ -32,16 +35,19 @@ function credentialFromStdin(text, agents = defaultAgents(), named) {
32
35
  }
33
36
  const agent = credentialAgent(agents);
34
37
  if (agent === void 0) throw new RunnerEnvError("no agent takes a credential on stdin, so nothing was written.");
35
- throw new RunnerEnvError(`the value on stdin is not a ${credentialForms(agent.descriptor).label} credential, so nothing was written. Pipe one value: ${orList(credentialShapes(agent.descriptor).map((shape) => `${shape.phrase}, which starts ${shape.starts}`))}.`);
38
+ throw new RunnerEnvError(notFirstAgentCredential(agent));
39
+ }
40
+ function notFirstAgentCredential(agent) {
41
+ return `the value on stdin is not a ${credentialForms(agent.descriptor).label} credential, so nothing was written. Pipe one value: ${orList(credentialShapes(agent.descriptor).map((shape) => `${shape.phrase}, which starts ${shape.starts}`))}.`;
36
42
  }
37
43
  function hasStoredCredential(configPath, agents = defaultAgents()) {
38
44
  return storedCredentialVariables(configPath, agents).length > 0;
39
45
  }
40
46
  function storedCredentialVariables(configPath, agents = defaultAgents()) {
41
- const own = credentialEnvPath(configPath, agents);
42
47
  const found = /* @__PURE__ */ new Set();
43
- for (const path of [own, runnerEnvPath(configPath)]) {
44
- if (path === void 0 || !existsSync(path)) continue;
48
+ const files = runnerAgents(agents).map((agent) => join(dirname(configPath), credentialNames(agent.descriptor).envFile));
49
+ for (const path of [...files, runnerEnvPath(configPath)]) {
50
+ if (!existsSync(path)) continue;
45
51
  const env = parseRunnerEnv(readFileSync(path, "utf8"));
46
52
  for (const name of forwardedVariables(agents)) if (env[name]) found.add(name);
47
53
  }
@@ -57,22 +63,22 @@ function replaceFile(path, text) {
57
63
  throw err;
58
64
  }
59
65
  }
60
- function storeAgentCredential(configPath, credential, agents = defaultAgents()) {
61
- const owner = runnerAgents(agents).find((agent) => agent.descriptor.credentials.forwarded.includes(credential.variable)) ?? credentialAgent(agents);
66
+ function storeAgentCredential(configPath, credential, agents = defaultAgents(), named) {
67
+ const owner = (named === void 0 ? void 0 : runnerAgentNamed(named, agents)) ?? runnerAgents(agents).find((agent) => agent.descriptor.credentials.forwarded.includes(credential.variable)) ?? credentialAgent(agents);
62
68
  if (owner === void 0) throw new RunnerEnvError("no agent takes a credential, so nothing was written.");
63
69
  const path = join(dirname(configPath), credentialForms(owner.descriptor).envFile);
64
70
  replaceFile(path, `${credential.variable}=${credential.value}
65
71
  `);
66
72
  const runnerPath = runnerEnvPath(configPath);
67
73
  if (existsSync(runnerPath)) {
68
- const dropped = withoutCredentialLines(readFileSync(runnerPath, "utf8"), agents);
74
+ const dropped = withoutCredentialLines(readFileSync(runnerPath, "utf8"), [{ descriptor: owner.descriptor, adapter: owner.adapter }]);
69
75
  if (dropped !== void 0) replaceFile(runnerPath, dropped);
70
76
  }
71
77
  return path;
72
78
  }
73
- function restartForCredential(state, unitName = DEFAULT_UNIT_NAME, agents = defaultAgents()) {
79
+ function restartForCredential(state, unitName = DEFAULT_UNIT_NAME, agents = defaultAgents(), storedIn) {
74
80
  const agent = credentialAgent(agents);
75
- const file = agent === void 0 ? "the credential file" : credentialForms(agent.descriptor).envFile;
81
+ const file = storedIn !== void 0 ? basename(storedIn) : agent === void 0 ? "the credential file" : credentialForms(agent.descriptor).envFile;
76
82
  if (state === "differs") {
77
83
  return `The service ${unitName} was not written by runner init, so it may not load ${file}, the one file that now holds the credential. Add EnvironmentFile=-<config directory>/${file} to it, or run runner install --service --replace. Then restart it: sudo systemctl restart ${unitName}`;
78
84
  }
@@ -80,4 +86,4 @@ function restartForCredential(state, unitName = DEFAULT_UNIT_NAME, agents = defa
80
86
  return `The service ${unitName} loads ${file} only when it starts. Restart it so it uses the stored credential: sudo systemctl restart ${unitName}`;
81
87
  }
82
88
 
83
- export { RunnerEnvError, credentialFromStdin, hasStoredCredential, isAgentName, restartForCredential, storeAgentCredential, storedCredentialVariables };
89
+ export { RunnerEnvError, credentialFromStdin, hasStoredCredential, isAgentName, replaceFile, restartForCredential, storeAgentCredential, storedCredentialVariables };
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { launchRefusalForSession } from './chunk-C2PZOLN7.js';
4
- import { detectActiveSession } from './chunk-J3P4WLJA.js';
5
- import { autoConnect } from './chunk-ZCBKVSBK.js';
6
- import { acquireSpoolLockAt } from './chunk-QMC2MM2S.js';
4
+ import { detectActiveSession } from './chunk-26RXLXEX.js';
5
+ import { autoConnect } from './chunk-4I3SN7WG.js';
6
+ import { acquireSpoolLockAt } from './chunk-WNFITHNX.js';
7
7
  import { C } from './chunk-2AM6Z5BP.js';
8
- import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-EOKIUWXY.js';
8
+ import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-FRLGVHJP.js';
9
9
  import { launchedItemForSession } from './chunk-LGJ56FCM.js';
10
10
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
11
11
  import { homeFromEnv } from './chunk-352DHUTP.js';
12
- import { resolveRepoIdentity } from './chunk-TTPOEZFE.js';
13
- import { StepNameSchema, StepBodySchema } from './chunk-6IGOHB3O.js';
12
+ import { resolveRepoIdentity } from './chunk-KTZOD7A3.js';
13
+ import { StepNameSchema, StepBodySchema } from './chunk-37WA2LQC.js';
14
14
  import { randomUUID } from 'crypto';
15
15
  import { readFileSync, existsSync, mkdirSync, writeFileSync, renameSync, appendFileSync } from 'fs';
16
16
  import { join, dirname } from 'path';
@@ -2,9 +2,9 @@
2
2
  import { createRequire } from 'node:module';
3
3
  import { C } from './chunk-2AM6Z5BP.js';
4
4
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
5
- import { linkedAgentsPath } from './chunk-K5J7AKRL.js';
6
- import { resolvePackRoot, OUTERLAYER_SKILLS_BASE, loadTemplateFiles, AGENTS_SKILLS_BASE, loadMaintainedFiles, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MACHINE_SKILL_PATH } from './chunk-LAO7LRIR.js';
7
- import { LEGACY_AGENT } from './chunk-JIMISJV2.js';
5
+ import { linkedAgentsPath } from './chunk-P7WAAN35.js';
6
+ import { resolvePackRoot, OUTERLAYER_SKILLS_BASE, loadTemplateFiles, AGENTS_SKILLS_BASE, loadMaintainedFiles, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MACHINE_SKILL_PATH } from './chunk-XMJNIIPM.js';
7
+ import { LEGACY_AGENT } from './chunk-Q7Z6ELTL.js';
8
8
  import { MAINTAINED_SKILLS } from './chunk-VSBG7MMU.js';
9
9
  import { resolvePackageVersion } from './chunk-RA3O54FC.js';
10
10
  import { existsSync, mkdirSync, writeFileSync } from 'fs';
@@ -21,6 +21,7 @@ var CLAUDE_CODE = {
21
21
  },
22
22
  versions: { minimum: "2.1.284", tested: { from: "2.1.0", to: "2.1.316" } },
23
23
  providers: ["anthropic"],
24
+ runner: { modelFlag: "--model", managed: true },
24
25
  credentials: {
25
26
  label: "Claude",
26
27
  setupCommand: "claude setup-token",
@@ -72,16 +73,19 @@ var CODEX = {
72
73
  // The one version the rollout parser and the launch were recorded against. `packages/cli/src/runner/image/pins.ts` pins the same version as `CODEX_VERSION`.
73
74
  versions: { minimum: "0.169.0", tested: { from: "0.169.0", to: "0.169.0" } },
74
75
  providers: ["openai"],
76
+ runner: { modelFlag: "--model", managed: true },
75
77
  credentials: {
76
78
  label: "Codex",
77
- setupCommand: "codex login",
79
+ setupCommand: "",
78
80
  forwarded: ["OPENAI_API_KEY"],
79
- stripped: ["OPENAI_API_KEY"],
81
+ // Codex also reads `CODEX_API_KEY`. The runner does not forward it, but removes it so no build gets a real key under that name.
82
+ stripped: ["OPENAI_API_KEY", "CODEX_API_KEY"],
80
83
  placeholders: {
81
84
  OPENAI_API_KEY: "sk-proj-placeholder-not-a-real-key"
82
85
  },
83
86
  kinds: {
84
- OPENAI_API_KEY: { pattern: "^sk-(?!ant-)[A-Za-z0-9_-]+$", provider: "openai", providerKind: "api-key", starts: "sk-" }
87
+ OPENAI_API_KEY: { pattern: "^sk-(?!ant-)[A-Za-z0-9_-]+$", provider: "openai", providerKind: "api-key", starts: "sk-" },
88
+ CODEX_API_KEY: { pattern: ".+", provider: "openai", providerKind: "api-key", starts: "" }
85
89
  }
86
90
  },
87
91
  capture: { sessionFolder: "~/.codex/sessions" },
@@ -96,7 +100,7 @@ var CODEX = {
96
100
  },
97
101
  capabilities: {
98
102
  sessionId: "generated",
99
- resume: false,
103
+ resume: true,
100
104
  fork: false,
101
105
  subagents: { spawnTools: [], transcript: "inline" },
102
106
  cost: "events",
@@ -104,7 +108,7 @@ var CODEX = {
104
108
  permission: {},
105
109
  structuredOutput: false,
106
110
  mcp: true,
107
- judge: false
111
+ judge: true
108
112
  },
109
113
  hooks: {
110
114
  contextCap: 0,
@@ -122,6 +126,7 @@ var OPENCODE = {
122
126
  program: "opencode",
123
127
  versions: { minimum: "2.2.5", tested: { from: "2.2.5", to: "2.2.5" } },
124
128
  providers: ["anthropic"],
129
+ runner: {},
125
130
  credentials: {
126
131
  label: "OpenCode",
127
132
  setupCommand: "",
@@ -192,7 +197,7 @@ var PROVIDERS = {
192
197
  upstream: "https://api.openai.com/",
193
198
  credentialKinds: [{ id: "api-key", label: "API key", header: "Authorization", prefix: "Bearer " }],
194
199
  droppedHeaders: ["authorization"],
195
- destination: { name: "openai", port: 3128, socket: "openai.sock" }
200
+ destination: { name: "openai", port: 3124, socket: "openai.sock" }
196
201
  }
197
202
  };
198
203
 
@@ -200,5 +205,21 @@ var PROVIDERS = {
200
205
  function homeRelative(folder) {
201
206
  return folder.replace(/^~\//, "");
202
207
  }
208
+ var hasOwn = (record, key) => Object.prototype.hasOwnProperty.call(record, key);
209
+ var descriptorOf = (type, agents) => hasOwn(agents, type) ? agents[type] : void 0;
210
+ function agentLabel(type, agents = NATIVE_AGENTS) {
211
+ return descriptorOf(type, agents)?.label;
212
+ }
213
+ function runnerAgentIds(agents = NATIVE_AGENTS) {
214
+ return Object.values(agents).filter((agent) => agent.runner !== void 0).map((agent) => agent.id);
215
+ }
216
+ function isRunnerAgent(type, agents = NATIVE_AGENTS) {
217
+ return descriptorOf(type, agents)?.runner !== void 0;
218
+ }
219
+ var MODEL_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:/@-]{0,99}$/;
220
+ var MODEL_ID_RULE = "A model id has 1 to 100 characters. It starts with a letter or digit, and holds only letters, digits, '.', '_', '-', ':', '/' and '@'.";
221
+ function isModelId(value) {
222
+ return typeof value === "string" && MODEL_ID_PATTERN.test(value);
223
+ }
203
224
 
204
- export { CLAUDE_CODE, CODEX, LEGACY_AGENT, NATIVE_AGENTS, OPENCODE, PROVIDERS, homeRelative };
225
+ export { CLAUDE_CODE, CODEX, LEGACY_AGENT, MODEL_ID_RULE, NATIVE_AGENTS, OPENCODE, PROVIDERS, agentLabel, homeRelative, isModelId, isRunnerAgent, runnerAgentIds };
@@ -4,6 +4,6 @@ import { createRequire } from 'node:module';
4
4
  createRequire(import.meta.url);
5
5
 
6
6
  // src/runner/protocol.ts
7
- var RUNNER_PROTOCOL = 69;
7
+ var RUNNER_PROTOCOL = 70;
8
8
 
9
9
  export { RUNNER_PROTOCOL };
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { TUNNEL_PORT, BRIDGE_ADDRESS, BRIDGE_CIDR } from './chunk-WNPLSKH6.js';
3
+ import { TUNNEL_PORT, BRIDGE_ADDRESS, BRIDGE_CIDR } from './chunk-H2NTP6OM.js';
4
4
  import { startTimeOf } from './chunk-JBJTC3UU.js';
5
- import { EXEC_PORT } from './chunk-XMUNNJMO.js';
6
- import { RELAY_PORT } from './chunk-UHGU2EAK.js';
5
+ import { EXEC_PORT } from './chunk-WOQOZCZZ.js';
6
+ import { RELAY_PORT } from './chunk-WRIQGJKT.js';
7
7
  import { spawn, spawnSync } from 'child_process';
8
8
  import { symlinkSync, lstatSync, writeFileSync, chmodSync, mkdirSync, existsSync } from 'fs';
9
9
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { currentLink } from './chunk-DCY6QUS6.js';
3
+ import { currentLink } from './chunk-M4YTSRJI.js';
4
4
  import { readFileSync, statSync, chmodSync, mkdirSync, writeFileSync, renameSync, rmSync, existsSync, lstatSync, accessSync, constants, realpathSync } from 'fs';
5
5
  import { randomBytes } from 'crypto';
6
6
  import { join, dirname, delimiter, resolve } from 'path';
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { CONTROL_PLANE_DIR_VARIABLE, SUPPORTED_CONTROL_PLANE_LAYOUT } from './chunk-F3J4UKBF.js';
4
- import { legacyAgent, agentById, defaultAgents, legacySubcommand } from './chunk-LAO7LRIR.js';
5
- import { LEGACY_AGENT } from './chunk-JIMISJV2.js';
3
+ import { CONTROL_PLANE_DIR_VARIABLE, SUPPORTED_CONTROL_PLANE_LAYOUT } from './chunk-DJK3IK6K.js';
4
+ import { legacyAgent, agentById, defaultAgents, legacySubcommand } from './chunk-XMJNIIPM.js';
5
+ import { LEGACY_AGENT } from './chunk-Q7Z6ELTL.js';
6
6
  import { MAINTAINED_SKILLS } from './chunk-VSBG7MMU.js';
7
7
  import { lstatSync, readFileSync } from 'fs';
8
8
  import { join } from 'path';
@@ -1,26 +1,26 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { uploadSpooledSteps } from './chunk-WVEN3DDJ.js';
3
+ import { uploadSpooledSteps } from './chunk-PTZF6MC5.js';
4
4
  import { LaunchFilter } from './chunk-C2PZOLN7.js';
5
- import { migrateLegacyArtifactSidecars, planArtifactUpload, artifactsStatePath, sanitizeTerminal, acquireArtifactSpoolLock, artifactBlobsDir, resolveArtifactTurnIndex, isArtifactTombstoned, ARTIFACT_RETRY_MAX_AGE_MS, writeArtifactSpoolState, reclaimUnneededArtifactBlobs, neededArtifactShas } from './chunk-QMC2MM2S.js';
5
+ import { migrateLegacyArtifactSidecars, planArtifactUpload, artifactsStatePath, sanitizeTerminal, acquireArtifactSpoolLock, artifactBlobsDir, resolveArtifactTurnIndex, isArtifactTombstoned, ARTIFACT_RETRY_MAX_AGE_MS, writeArtifactSpoolState, reclaimUnneededArtifactBlobs, neededArtifactShas } from './chunk-WNFITHNX.js';
6
6
  import { C } from './chunk-2AM6Z5BP.js';
7
- import { cliFetch, resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-EOKIUWXY.js';
7
+ import { cliFetch, resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-FRLGVHJP.js';
8
8
  import { readCloudConfig, cloudConfigPath, writeCloudConfig } from './chunk-HWVMRETT.js';
9
- import { signerFor, signRunnerRequest } from './chunk-F3P7DP7R.js';
10
- import { SCRUB_ENV_VARIABLE } from './chunk-UHGU2EAK.js';
11
- import { writeSyncStatus, logHookError, spoolDir } from './chunk-7N6MB6NR.js';
9
+ import { signerFor, signRunnerRequest } from './chunk-I6G5CO3K.js';
10
+ import { SCRUB_ENV_VARIABLE } from './chunk-WRIQGJKT.js';
11
+ import { writeSyncStatus, logHookError, spoolDir } from './chunk-EVAK6FAS.js';
12
12
  import { readLatestProvenanceForSession, readContextProvenance } from './chunk-545P7JY7.js';
13
13
  import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
14
- import { hookExecSpoolPath } from './chunk-2ZF62BAK.js';
14
+ import { hookExecSpoolPath } from './chunk-TLCTOEU5.js';
15
15
  import { applyReportedCost } from './chunk-BKO6JEZI.js';
16
16
  import { readLaunchSpoolState, launchStatusIsDecisive, parseRunEnv, launchedItemsBySession, launchesPath } from './chunk-LGJ56FCM.js';
17
17
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
18
18
  import { removeJournalHooks } from './chunk-CJPTUU2E.js';
19
- import { legacyAgent, captureAgents, captureAdapters } from './chunk-LAO7LRIR.js';
20
- import { NATIVE_AGENTS, LEGACY_AGENT } from './chunk-JIMISJV2.js';
19
+ import { legacyAgent, captureAgents, captureAdapters } from './chunk-XMJNIIPM.js';
20
+ import { NATIVE_AGENTS, LEGACY_AGENT } from './chunk-Q7Z6ELTL.js';
21
21
  import { homeFromEnv, spoolHomeFromEnv } from './chunk-352DHUTP.js';
22
- import { setCustomScrubbers, setLocalIdentity, forkFor, readForkRecord, tailTranscript, enrichSessionRepo, scanAll, setRepoRoot, resolveRepoIdentity, WARNING_CODES, ZSTD_UNSUPPORTED_MESSAGE, scrubDeep } from './chunk-TTPOEZFE.js';
23
- import { CAPTURE_TIERS, inferArtifactKind, bannedPathsForTier, downconvertSession, isHumanUserTurn, turnCountBound, EVENT_TYPES } from './chunk-6IGOHB3O.js';
22
+ import { setCustomScrubbers, setLocalIdentity, forkFor, readForkRecord, tailTranscript, enrichSessionRepo, scanAll, setRepoRoot, resolveRepoIdentity, WARNING_CODES, ZSTD_UNSUPPORTED_MESSAGE, scrubDeep } from './chunk-KTZOD7A3.js';
23
+ import { CAPTURE_TIERS, inferArtifactKind, bannedPathsForTier, downconvertSession, isHumanUserTurn, turnCountBound, EVENT_TYPES } from './chunk-37WA2LQC.js';
24
24
  import { dirname, basename, join, sep } from 'path';
25
25
  import { statSync, readFileSync, readdirSync, mkdirSync, writeFileSync, renameSync, existsSync, rmSync } from 'fs';
26
26
  import { execFileSync } from 'child_process';
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { defaultAgents, agentById } from './chunk-LAO7LRIR.js';
4
- import { PROVIDERS, LEGACY_AGENT } from './chunk-JIMISJV2.js';
3
+ import { STALL_EXIT } from './chunk-MQ6SKVLA.js';
4
+ import { defaultAgents, agentById } from './chunk-XMJNIIPM.js';
5
+ import { PROVIDERS, LEGACY_AGENT, isModelId } from './chunk-Q7Z6ELTL.js';
5
6
  import { join, dirname } from 'path';
6
7
 
7
8
  createRequire(import.meta.url);
@@ -9,6 +10,7 @@ createRequire(import.meta.url);
9
10
  // src/runner/image/pins.ts
10
11
  var CLAUDE_CODE_VERSION = "2.1.284";
11
12
  var OPENCODE_VERSION = "2.2.5";
13
+ var CODEX_VERSION = "0.169.0";
12
14
  var DEFAULT_BASE_IMAGE = "ubuntu:24.04@sha256:008173c23f95b170204355c12626cb5a965d779a7e1283b09e9cffbb1bf33ca3";
13
15
  var NODE_IMAGE = "node:22-bookworm-slim@sha256:43ac6c60b8f89723f746e8a92ce91abd5017e627ce1ddfe4238355d3a30b772c";
14
16
  var BUILDKIT_IMAGE = "moby/buildkit:v0.33.1@sha256:cec9f139f45e93c5c69c60f8b07cfad9f43f4ef6b6a6cd917527fea5ff2e3dea";
@@ -147,7 +149,7 @@ function universalImagePinned(digest = UNIVERSAL_IMAGE_DIGEST) {
147
149
  }
148
150
 
149
151
  // src/runner/runner-agents.ts
150
- var AGENT_PINS = { [LEGACY_AGENT]: CLAUDE_CODE_VERSION, opencode: OPENCODE_VERSION };
152
+ var AGENT_PINS = { [LEGACY_AGENT]: CLAUDE_CODE_VERSION, opencode: OPENCODE_VERSION, codex: CODEX_VERSION };
151
153
  function runnerAgents(agents = defaultAgents()) {
152
154
  return agents.flatMap((agent) => agent.adapter.credentials === void 0 ? [] : [{ descriptor: agent.descriptor, adapter: agent.adapter, credentials: agent.adapter.credentials }]);
153
155
  }
@@ -169,20 +171,101 @@ function jobAgent(job, agents = defaultAgents()) {
169
171
  const id = job?.agent ?? agentIdOfCommand(job?.command, agents);
170
172
  return (id === void 0 ? void 0 : agentById(id, agents)) ?? buildAgent(agents);
171
173
  }
174
+ function listedAgents(config, agents = defaultAgents()) {
175
+ return config.agents !== void 0 && config.agents.length > 0 ? [...config.agents] : [commandAgentId(config, agents)];
176
+ }
177
+ function managedOfferedAgents(config, agents = defaultAgents()) {
178
+ if (config.agents !== void 0 && config.agents.length > 0) return [...config.agents];
179
+ const own = commandAgentId(config, agents);
180
+ const managed = runnerAgents(agents).filter((agent) => agent.descriptor.runner?.managed === true).map((agent) => agent.descriptor.id);
181
+ return [own, ...managed.filter((id) => id !== own)];
182
+ }
183
+ function jobKeyProviders(job, agents = defaultAgents()) {
184
+ const own = jobAgent(job, agents)?.descriptor.providers[0];
185
+ const judge = judgeAgent(agents, job)?.descriptor.providers[0];
186
+ return { required: own === void 0 ? [] : [own], optional: judge === void 0 || judge === own ? [] : [judge] };
187
+ }
188
+ function agentsNeedingCredential(config, agents = defaultAgents()) {
189
+ return listedAgents(config, agents);
190
+ }
191
+ function agentsToHold(config, agents = defaultAgents()) {
192
+ const offered = agentsNeedingCredential(config, agents);
193
+ const judge = judgeAgent(agents)?.descriptor.id;
194
+ const needsJudge = offered.some((id) => !canJudge(jobAgent({ agent: id }, agents)));
195
+ return judge !== void 0 && needsJudge && !offered.includes(judge) ? [...offered, judge] : offered;
196
+ }
197
+ function jobAgentIdFor(input, agents = defaultAgents()) {
198
+ const chosen = input.managed === true || ["implement", "amend", "revise", "review", "criteria"].includes(input.queue);
199
+ const named = input.claimedAgent === void 0 || !chosen ? void 0 : jobAgent({ agent: input.claimedAgent }, agents)?.descriptor.id;
200
+ if (named !== void 0) return named;
201
+ const ownAgent = jobAgent({ command: input.queue === "run" ? input.config.commands.implement : input.command }, agents)?.descriptor.id;
202
+ if (input.queue === "run" && input.runConfigured === true) return agentIdOfCommand(input.command, agents) ?? ownAgent;
203
+ if (input.queue === "implement" || input.queue === "review" || input.queue === "criteria") return defaultAgentId(input.config, input.reported, agents) ?? commandAgentId(input.config, agents);
204
+ if (input.queue === "amend" || input.queue === "revise" || input.queue === "run") return ownAgent !== void 0 && input.reported.includes(ownAgent) ? ownAgent : defaultAgentId(input.config, input.reported, agents) ?? ownAgent;
205
+ return ownAgent;
206
+ }
207
+ function commandAgentId(config, agents = defaultAgents()) {
208
+ const command = config.commands?.implement ?? config.commands?.amend;
209
+ return jobAgent({ command }, agents)?.descriptor.id ?? LEGACY_AGENT;
210
+ }
211
+ function defaultAgentId(config, reported, agents = defaultAgents()) {
212
+ const fromCommand = commandAgentId(config, agents);
213
+ return reported.length === 0 || reported.includes(fromCommand) ? fromCommand : reported[0];
214
+ }
215
+ var AGENT_CHOSEN_QUEUES = ["implement", "amend", "revise"];
216
+ function commandForJob(queue, configured, agent, agents = defaultAgents()) {
217
+ if (configured === void 0 || agent === void 0 || !AGENT_CHOSEN_QUEUES.includes(queue)) return configured;
218
+ const started = agentIdOfCommand(configured, agents);
219
+ if (started === void 0 || started === agent.descriptor.id) return configured;
220
+ const headless = agent.adapter.headless;
221
+ return headless === void 0 ? configured : headless.commandLine(queuePrompt(queue), queue);
222
+ }
223
+ function withJobModel(command, agent, model) {
224
+ if (model === void 0) return { command, applied: false };
225
+ const flag = agent?.adapter.headless?.modelFlag;
226
+ const refuse = (reason) => ({ command, applied: false, reason });
227
+ if (agent === void 0 || flag === void 0) return refuse(`${agent?.descriptor.label ?? "the agent"} takes no model`);
228
+ if (!isModelId(model)) return refuse("it is not a valid model id");
229
+ if (programOf(command) !== agent.descriptor.program) return refuse(`the command does not start ${agent.descriptor.program}`);
230
+ const masked = command.replace(/"(?:[^"\\]|\\.)*"|'[^']*'/g, (span) => "_".repeat(span.length));
231
+ const spellings = [flag, ...agent?.adapter.headless?.modelFlagAliases ?? []].map((spelling) => spelling.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
232
+ const named = new RegExp(`(^|\\s)(${spellings.join("|")})(=|\\s+)(\\S+)`);
233
+ const found = named.exec(masked);
234
+ if (found !== null) {
235
+ const valueAt = found.index + found[1].length + found[2].length + found[3].length;
236
+ return { command: `${command.slice(0, valueAt)}${model}${command.slice(valueAt + found[4].length)}`, applied: true };
237
+ }
238
+ const parts = command.trimStart().split(/(\s+)/);
239
+ const program = parts.findIndex((part) => part.trim() !== "" && !/^[A-Za-z_][A-Za-z0-9_]*=/.test(part));
240
+ const next = program + 2;
241
+ const subcommands = (agent.adapter.headless?.promptFlags ?? []).filter((word) => !word.startsWith("-"));
242
+ const index = next < parts.length && subcommands.includes(parts[next]) ? next : program;
243
+ parts[index] = `${parts[index]} ${flag} ${model}`;
244
+ return { command: `${command.slice(0, command.length - command.trimStart().length)}${parts.join("")}`, applied: true };
245
+ }
172
246
  function headlessAgents(agents = defaultAgents()) {
173
247
  return agents.flatMap((agent) => agent.adapter.headless === void 0 ? [] : [{ descriptor: agent.descriptor, adapter: agent.adapter, headless: agent.adapter.headless }]);
174
248
  }
175
249
  function headlessNames(agents = defaultAgents()) {
176
250
  return headlessAgents(agents).map((agent) => runnerNameOf(agent.descriptor));
177
251
  }
252
+ function isHeadlessAgent(name, agents = defaultAgents()) {
253
+ return headlessAgents(agents).some((agent) => runnerNameOf(agent.descriptor) === name || agent.descriptor.id === name);
254
+ }
255
+ function headlessAgentIds(agents = defaultAgents()) {
256
+ return headlessAgents(agents).map((agent) => agent.descriptor.id);
257
+ }
178
258
  function queuePrompt(queue) {
179
259
  if (queue === "revise") return "/outerlayer-revise";
180
260
  return queue === "implement" ? "/build" : "/outerlayer-amend";
181
261
  }
182
262
  function agentCommands(name, agents = defaultAgents()) {
183
- const found = headlessAgents(agents).find((agent) => runnerNameOf(agent.descriptor) === name);
263
+ const found = headlessAgents(agents).find((agent) => runnerNameOf(agent.descriptor) === name || agent.descriptor.id === name);
184
264
  return found === void 0 ? void 0 : { implement: found.headless.commandLine(queuePrompt("implement"), "implement"), amend: found.headless.commandLine(queuePrompt("amend"), "amend") };
185
265
  }
266
+ function defaultCommandFor(agentId, queue, agents = defaultAgents()) {
267
+ return agentById(agentId, agents)?.adapter.headless?.commandLine(queuePrompt(queue), queue);
268
+ }
186
269
  function defaultCommandLine(queue, agents = defaultAgents()) {
187
270
  return buildAgent(agents)?.adapter.headless?.commandLine(queuePrompt(queue), queue);
188
271
  }
@@ -193,7 +276,7 @@ function runnerNameOf(descriptor) {
193
276
  return descriptor.legacy?.runnerName ?? descriptor.id;
194
277
  }
195
278
  function runnerAgentNamed(name, agents = defaultAgents()) {
196
- return runnerAgents(agents).find((agent) => runnerNameOf(agent.descriptor) === name);
279
+ return runnerAgents(agents).find((agent) => runnerNameOf(agent.descriptor) === name || agent.descriptor.id === name);
197
280
  }
198
281
  function credentialNames(descriptor) {
199
282
  return { envFile: descriptor.legacy?.envFile ?? `${descriptor.id}.env`, credentialId: descriptor.legacy?.credentialId ?? descriptor.id };
@@ -217,12 +300,11 @@ function managedKeyName(agents = defaultAgents(), providers = PROVIDERS) {
217
300
  }
218
301
  function storeVariables(forms) {
219
302
  const [first, ...rest] = forms.variables;
220
- return [`${first} (from \`${forms.setupCommand}\`)`, ...rest].join(" or ");
303
+ return [forms.setupCommand === "" ? `${first}` : `${first} (from \`${forms.setupCommand}\`)`, ...rest].join(" or ");
221
304
  }
222
- function credentialForms(descriptor, agents = defaultAgents()) {
305
+ function credentialForms(descriptor, _agents = defaultAgents()) {
223
306
  const { label, setupCommand, forwarded } = descriptor.credentials;
224
- const owner = runnerAgents(agents).find((agent) => agent.descriptor.credentials.forwarded.some((variable) => forwarded.includes(variable)))?.descriptor ?? descriptor;
225
- return { label, possessive: `${label}'s`, checkName: `${runnerNameOf(descriptor)} credential`, setupCommand, variables: forwarded, runnerName: runnerNameOf(descriptor), envFile: credentialNames(owner).envFile };
307
+ return { label, possessive: `${label}'s`, checkName: `${runnerNameOf(descriptor)} credential`, setupCommand, variables: forwarded, runnerName: runnerNameOf(descriptor), envFile: credentialNames(descriptor).envFile };
226
308
  }
227
309
  function credentialShapes(descriptor, providers = PROVIDERS) {
228
310
  const { setupCommand, forwarded, kinds } = descriptor.credentials;
@@ -239,8 +321,8 @@ function orList(items) {
239
321
  function forwardedVariables(agents = defaultAgents()) {
240
322
  return [...new Set(runnerAgents(agents).flatMap((agent) => agent.descriptor.credentials.forwarded))];
241
323
  }
242
- function strippedVariables(agents = defaultAgents()) {
243
- return [...new Set(runnerAgents(agents).flatMap((agent) => agent.descriptor.credentials.stripped))];
324
+ function strippedVariables(agents = defaultAgents(), only) {
325
+ return [...new Set(runnerAgents(agents).filter((agent) => only === void 0 || only.includes(agent.descriptor.id)).flatMap((agent) => agent.descriptor.credentials.stripped))];
244
326
  }
245
327
  function providersOf(agents = defaultAgents(), providers = PROVIDERS) {
246
328
  const named = runnerAgents(agents).flatMap((agent) => agent.descriptor.providers);
@@ -249,8 +331,13 @@ function providersOf(agents = defaultAgents(), providers = PROVIDERS) {
249
331
  function buildAgentPin(agents = defaultAgents()) {
250
332
  return AGENT_PINS[buildAgent(agents)?.descriptor.id ?? LEGACY_AGENT];
251
333
  }
252
- function judgeAgent(agents = defaultAgents()) {
253
- return buildAgent(agents);
334
+ function canJudge(agent) {
335
+ const headless = agent?.adapter.headless;
336
+ return agent?.descriptor.capabilities.judge === true && headless?.judge !== void 0 && headless.readJudgeOutput !== void 0;
337
+ }
338
+ function judgeAgent(agents = defaultAgents(), job) {
339
+ const own = job === void 0 ? void 0 : jobAgent(job, agents);
340
+ return canJudge(own) ? own : buildAgent(agents);
254
341
  }
255
342
  function imageInstalls(agents = defaultAgents(), buildVersion, versions = {}) {
256
343
  const build = buildAgent(agents);
@@ -262,6 +349,21 @@ function imageInstalls(agents = defaultAgents(), buildVersion, versions = {}) {
262
349
  function imageAgentPins(agents = defaultAgents(), buildVersion) {
263
350
  return imageInstalls(agents, buildVersion).map(({ agent, version }) => ({ id: agent.descriptor.id, version }));
264
351
  }
352
+ function stallReason(job, code, agents = defaultAgents()) {
353
+ if (code !== STALL_EXIT) return void 0;
354
+ const agent = jobAgent(job, agents)?.descriptor;
355
+ const provider = agent === void 0 ? void 0 : PROVIDERS[agent.providers[0] ?? ""];
356
+ const stall = jobAgent(job, agents)?.adapter.headless?.stall;
357
+ if (agent === void 0 || provider === void 0 || stall === void 0) return void 0;
358
+ const minutes = Math.round(stall.afterMs / 6e4);
359
+ return `${agent.label} could not reach ${provider.label} for ${minutes} ${minutes === 1 ? "minute" : "minutes"}, so the launcher stopped the build`;
360
+ }
361
+ function agentErrorReason(job, output, agents = defaultAgents()) {
362
+ const agent = jobAgent(job, agents);
363
+ const message = agent?.adapter.headless?.lastError?.(output);
364
+ if (agent === void 0 || message === void 0) return void 0;
365
+ return `${agent.descriptor.label} reported: ${message}`;
366
+ }
265
367
  function agentVersionOf(toolsJson, agents = defaultAgents(), job) {
266
368
  const agent = jobAgent(job, agents);
267
369
  try {
@@ -273,4 +375,4 @@ function agentVersionOf(toolsJson, agents = defaultAgents(), job) {
273
375
  return AGENT_PINS[agent?.descriptor.id ?? LEGACY_AGENT] ?? buildAgentPin(agents);
274
376
  }
275
377
 
276
- export { AGENT_PINS, BUILDER_DISK_BASE_URL, BUILDER_DISK_SHA256, BUILDER_DISK_VERSION, BUILDKIT_IMAGE, DEFAULT_BASE_IMAGE, FFMPEG_BUILD_TAG, FFMPEG_STATIC, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, FIRECRACKER_VERSION, GH_SHA256, GH_VERSION, GUEST_ASSETS_BASE_URL, GUEST_ASSETS_VERSION, GUEST_HELPER_SHA256, GUEST_KERNEL_SHA256, HEADLESS_SHELL, HEADLESS_SHELL_BASE_URL, HEADLESS_SHELL_REVISION, HOST_HELPER_ASSETS_VERSION, HOST_HELPER_BASE_URL, HOST_HELPER_SHA256, HOST_HELPER_SLICE_SINCE, JAILER_BINARY_SHA256, MANAGED_KIND, MEDIA_PINS, MICROVM_ARCHES, NETWORK_HELPER_SHA256, NODE_IMAGE, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_FFMPEG_BASE_URL, PLAYWRIGHT_FFMPEG_REVISION, PLAYWRIGHT_VERSION, TINI_SHA256, TINI_VERSION, UNIVERSAL_IMAGE, UNIVERSAL_IMAGE_DIGEST, UNIVERSAL_IMAGE_REPOSITORY, UNIVERSAL_IMAGE_SOURCE, VOICE_PACK_FILES, VOICE_PACK_VERSION, agentCommands, agentVersionOf, buildAgent, buildAgentPin, builderDiskPinned, credentialAgent, credentialEnvPath, credentialForms, credentialHandOffKey, credentialNames, credentialShapes, defaultCommandLine, firecrackerArch, forwardedVariables, guestAssetsPinned, headlessNames, hostHelperPinned, hostHelperSupportsSlice, imageAgentPins, imageInstalls, jobAgent, jobCommandEnv, judgeAgent, managedKeyName, networkHelperPinned, orList, providersOf, runnerAgentNamed, runnerAgents, storeVariables, strippedVariables, universalImagePinned };
378
+ export { AGENT_PINS, BUILDER_DISK_BASE_URL, BUILDER_DISK_SHA256, BUILDER_DISK_VERSION, BUILDKIT_IMAGE, DEFAULT_BASE_IMAGE, FFMPEG_BUILD_TAG, FFMPEG_STATIC, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, FIRECRACKER_VERSION, GH_SHA256, GH_VERSION, GUEST_ASSETS_BASE_URL, GUEST_ASSETS_VERSION, GUEST_HELPER_SHA256, GUEST_KERNEL_SHA256, HEADLESS_SHELL, HEADLESS_SHELL_BASE_URL, HEADLESS_SHELL_REVISION, HOST_HELPER_ASSETS_VERSION, HOST_HELPER_BASE_URL, HOST_HELPER_SHA256, HOST_HELPER_SLICE_SINCE, JAILER_BINARY_SHA256, MANAGED_KIND, MEDIA_PINS, MICROVM_ARCHES, NETWORK_HELPER_SHA256, NODE_IMAGE, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_FFMPEG_BASE_URL, PLAYWRIGHT_FFMPEG_REVISION, PLAYWRIGHT_VERSION, TINI_SHA256, TINI_VERSION, UNIVERSAL_IMAGE, UNIVERSAL_IMAGE_DIGEST, UNIVERSAL_IMAGE_REPOSITORY, UNIVERSAL_IMAGE_SOURCE, VOICE_PACK_FILES, VOICE_PACK_VERSION, agentCommands, agentErrorReason, agentIdOfCommand, agentVersionOf, agentsNeedingCredential, agentsToHold, buildAgent, buildAgentPin, builderDiskPinned, canJudge, commandAgentId, commandForJob, credentialAgent, credentialEnvPath, credentialForms, credentialHandOffKey, credentialNames, credentialShapes, defaultAgentId, defaultCommandFor, defaultCommandLine, firecrackerArch, forwardedVariables, guestAssetsPinned, headlessAgentIds, headlessNames, hostHelperPinned, hostHelperSupportsSlice, imageAgentPins, imageInstalls, isHeadlessAgent, jobAgent, jobAgentIdFor, jobCommandEnv, jobKeyProviders, judgeAgent, listedAgents, managedKeyName, managedOfferedAgents, networkHelperPinned, orList, providersOf, runnerAgentNamed, runnerAgents, stallReason, storeVariables, strippedVariables, universalImagePinned, withJobModel };
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { helperSocketPath } from './chunk-H7IY5B2M.js';
4
- import { UNIT_MARKER } from './chunk-Q5A5WWZI.js';
5
- import { runnerDir } from './chunk-VXL7SLO3.js';
3
+ import { helperSocketPath } from './chunk-RVUOSR2D.js';
4
+ import { UNIT_MARKER } from './chunk-NCZNYMTB.js';
5
+ import { runnerDir } from './chunk-D5TZYUGZ.js';
6
6
  import { createHash } from 'crypto';
7
7
  import { join } from 'path';
8
8