@outerlayer/cli 0.38.0-next.20261109235338 → 0.38.0-next.20261110133110

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 (183) hide show
  1. package/README.md +9 -2
  2. package/dist/agent-setup-GZBGCV3K.js +40 -0
  3. package/dist/{agent-subcommand-JC5JXZ3X.js → agent-subcommand-5PNHUNZZ.js} +4 -4
  4. package/dist/{artifact-link-cmd-RUGAK5EX.js → artifact-link-cmd-XOFZP7U5.js} +2 -2
  5. package/dist/{bridge-TYO2YB2X.js → bridge-RNM7OWRW.js} +7 -7
  6. package/dist/{build-QUCL3HFM.js → build-VKO7IVOQ.js} +13 -13
  7. package/dist/{build-disk-3JUHPJEQ.js → build-disk-M2JYJF6R.js} +11 -11
  8. package/dist/build-info.json +1 -1
  9. package/dist/{builder-PADLK3VJ.js → builder-HMHJ6U7C.js} +10 -10
  10. package/dist/caller-U26SATTV.js +23 -0
  11. package/dist/{check-DBYJIP44.js → check-3XHEVEXS.js} +56 -56
  12. package/dist/{chunk-6L55K352.js → chunk-25G5KXBE.js} +7 -7
  13. package/dist/{chunk-Y2M2NZX4.js → chunk-2KGYMIVS.js} +10 -10
  14. package/dist/{chunk-IXC5EISR.js → chunk-2TXYQANG.js} +1 -1
  15. package/dist/{chunk-HT4OKJDB.js → chunk-2WNJ2MHD.js} +1 -1
  16. package/dist/{chunk-4NRIC2G5.js → chunk-3DY4DQOC.js} +4 -4
  17. package/dist/{chunk-553QW3PJ.js → chunk-3GTAPQBG.js} +2 -2
  18. package/dist/{chunk-F3NW5TBW.js → chunk-3HJK7WTM.js} +6 -6
  19. package/dist/{chunk-X3CGWGAG.js → chunk-47JRSV6Y.js} +1 -1
  20. package/dist/{chunk-WISVAUTD.js → chunk-5QDHJT73.js} +4 -4
  21. package/dist/{chunk-DPBFNZ6H.js → chunk-5QFFQCSY.js} +1 -1
  22. package/dist/{chunk-KGHVJI7V.js → chunk-67BVM7JK.js} +3 -3
  23. package/dist/{chunk-P43BSQGV.js → chunk-6RQP5GP5.js} +2 -2
  24. package/dist/{chunk-RN5VLKZ2.js → chunk-6XMC6R4W.js} +1 -1
  25. package/dist/{chunk-Y67NEZMW.js → chunk-6XROZIV6.js} +6 -6
  26. package/dist/{chunk-LJPYKCIP.js → chunk-72LXVD4O.js} +4 -4
  27. package/dist/{chunk-4A4TMFGV.js → chunk-735C5J6Q.js} +5 -5
  28. package/dist/{chunk-PCY626FL.js → chunk-7E55P2NR.js} +1 -1
  29. package/dist/{chunk-O7IJBJ6Z.js → chunk-AC6DM3S3.js} +1 -1
  30. package/dist/{chunk-2TA2Z5IJ.js → chunk-ALCZ2SEW.js} +5 -5
  31. package/dist/{chunk-OQHHPJNK.js → chunk-ATQHPT3B.js} +1 -1
  32. package/dist/{chunk-QZP3O6IM.js → chunk-B4U5XI4F.js} +69 -9
  33. package/dist/{chunk-2DVQHK37.js → chunk-B5Z4VA4Q.js} +1 -1
  34. package/dist/{chunk-XMVASSUZ.js → chunk-BCQFMAGM.js} +3 -3
  35. package/dist/{chunk-EYFIWJFI.js → chunk-BTH6HTE5.js} +5 -5
  36. package/dist/{chunk-HWHJDQLC.js → chunk-C574RHGN.js} +3 -3
  37. package/dist/{chunk-KHC7ICRR.js → chunk-CXXQQST7.js} +9 -9
  38. package/dist/{chunk-52IVBUIU.js → chunk-DKDBMMX7.js} +6 -6
  39. package/dist/{chunk-SKKKPLOC.js → chunk-E27XMQKR.js} +3 -3
  40. package/dist/{chunk-XLUQC2PE.js → chunk-EHPKACA7.js} +1 -1
  41. package/dist/{chunk-JLCEQXQF.js → chunk-ENHD5PNW.js} +1 -1
  42. package/dist/{chunk-5J4WME44.js → chunk-F2ADK2KB.js} +5 -5
  43. package/dist/{chunk-AZRZBG45.js → chunk-FGBBGUM4.js} +4 -4
  44. package/dist/{chunk-HE53NIRE.js → chunk-FXVHF6RX.js} +54 -4
  45. package/dist/{chunk-W37QA6WG.js → chunk-GJMLLXZJ.js} +1 -1
  46. package/dist/{chunk-IJWQT2Y7.js → chunk-HDEYRLWK.js} +1 -1
  47. package/dist/{chunk-A237UPRS.js → chunk-HMDEF3UT.js} +16 -16
  48. package/dist/{chunk-G2J574LS.js → chunk-I2N427GS.js} +8 -8
  49. package/dist/{chunk-2YOFSE7U.js → chunk-I64CTY4U.js} +52 -34
  50. package/dist/{chunk-GH5Y3R5R.js → chunk-IGO766M6.js} +4 -4
  51. package/dist/{chunk-XPXJWIOJ.js → chunk-ITOIM3WV.js} +1 -1
  52. package/dist/{chunk-MGOEHY72.js → chunk-IVB6A3I7.js} +7 -7
  53. package/dist/{chunk-7HN6T4MY.js → chunk-L32O52SH.js} +1 -1
  54. package/dist/{chunk-DE5QLWJK.js → chunk-L6CZTRNW.js} +1 -1
  55. package/dist/{chunk-N2QYP3NQ.js → chunk-MBPBYMHU.js} +565 -16
  56. package/dist/{chunk-TYLZR7HX.js → chunk-MSARYPFD.js} +2 -2
  57. package/dist/{chunk-3Q2SEOT3.js → chunk-MT4XF5OL.js} +2 -2
  58. package/dist/{chunk-UU6FN6PZ.js → chunk-NE7EG3SN.js} +4 -4
  59. package/dist/{chunk-PE5J46EE.js → chunk-OEWSICWM.js} +8 -8
  60. package/dist/{chunk-26NMJGEY.js → chunk-OI4ZV7MJ.js} +1 -1
  61. package/dist/{chunk-IJ4DF5QS.js → chunk-OK4RSIB2.js} +1 -1
  62. package/dist/{chunk-ZZ4AX25R.js → chunk-OWEJP5HJ.js} +1 -1
  63. package/dist/{chunk-NL2MMRJI.js → chunk-PA6FKP5B.js} +6 -6
  64. package/dist/{chunk-ZRTGX4GN.js → chunk-QFQ2UNZU.js} +6 -6
  65. package/dist/{chunk-SOLQ3JA6.js → chunk-QGUCHNSQ.js} +66 -11
  66. package/dist/{chunk-NAU7U44X.js → chunk-QNHBJU74.js} +7 -7
  67. package/dist/{chunk-7NP5G2FV.js → chunk-RBLXGO5K.js} +2 -2
  68. package/dist/{chunk-F4XMG7EO.js → chunk-SBPMDO47.js} +1 -1
  69. package/dist/{chunk-5AU2GQGH.js → chunk-TD6DN5LU.js} +3 -3
  70. package/dist/{chunk-FLIRUHVT.js → chunk-TUSIYONR.js} +1 -1
  71. package/dist/{chunk-HITUWIB7.js → chunk-TW2V2IQ4.js} +1 -1
  72. package/dist/{chunk-ZUIHEOSC.js → chunk-UCUBQWJC.js} +1 -1
  73. package/dist/{chunk-DQLHVV62.js → chunk-UUSSRXUJ.js} +3 -3
  74. package/dist/{chunk-QA3U3MJZ.js → chunk-VNHDMOZW.js} +155 -36
  75. package/dist/{chunk-BAWOWJ3G.js → chunk-VQQF6MDT.js} +10 -10
  76. package/dist/{chunk-6ZMFEZ2K.js → chunk-VRWZNI6U.js} +1 -1
  77. package/dist/{chunk-ZIOMM4LL.js → chunk-VU5PPWIQ.js} +7 -7
  78. package/dist/{chunk-2BMH3373.js → chunk-WH2QUYXH.js} +2 -2
  79. package/dist/{chunk-WE4CWGNR.js → chunk-XAR2CJFV.js} +7 -7
  80. package/dist/{chunk-XDHMRHMC.js → chunk-XCTE5S2C.js} +1 -1
  81. package/dist/{chunk-IPB5UOHH.js → chunk-XFU37HIM.js} +3 -3
  82. package/dist/{chunk-C7YFAPMY.js → chunk-YO2NPS66.js} +1 -1
  83. package/dist/chunk-YOAJLD2D.js +270 -0
  84. package/dist/{chunk-3QTC4UWC.js → chunk-YZQYTOCR.js} +1 -1
  85. package/dist/{claude-launcher-UYCMHZOU.js → claude-launcher-WMIUTAXY.js} +7 -7
  86. package/dist/{cli-KEVUJ6PY.js → cli-VQNE6M77.js} +186 -156
  87. package/dist/{command-DNGERCQW.js → command-XQPL75PX.js} +51 -51
  88. package/dist/{config-M66C2AGN.js → config-ZRGYLVDX.js} +12 -12
  89. package/dist/{connect-cmd-JBM5ODV3.js → connect-cmd-MZXTWM4R.js} +13 -13
  90. package/dist/{container-start-4NKXX3MA.js → container-start-M7SFF62T.js} +49 -49
  91. package/dist/{context-cleanup-UE5HQRHP.js → context-cleanup-Z3HZZZXW.js} +4 -4
  92. package/dist/{context-show-cmd-HX5LND6O.js → context-show-cmd-SCOVPVDM.js} +14 -14
  93. package/dist/{control-plane-launch-XEMMZ7VZ.js → control-plane-launch-MWZHJ4G5.js} +14 -14
  94. package/dist/{demo-record-cmd-PI4PFFEO.js → demo-record-cmd-4RVSWVMK.js} +8 -8
  95. package/dist/{demo-voice-cmd-3GASMSCU.js → demo-voice-cmd-PGM5JPCQ.js} +20 -20
  96. package/dist/{dist-OMJJT636.js → dist-XEPPXF4M.js} +2 -2
  97. package/dist/{docker-KWHEDC6K.js → docker-25F2KOBJ.js} +10 -10
  98. package/dist/{doctor-GPATU5TY.js → doctor-Z3U3ICVR.js} +51 -51
  99. package/dist/{emit-artifact-cmd-OH7PNHZF.js → emit-artifact-cmd-Z4SHPKFT.js} +19 -19
  100. package/dist/{emit-cmd-RPICQ5H2.js → emit-cmd-NHMZ4M5S.js} +7 -7
  101. package/dist/{emit-criteria-cmd-JW2GS2SO.js → emit-criteria-cmd-HCN3DOJM.js} +16 -16
  102. package/dist/{emit-demo-cmd-5W6H6AI4.js → emit-demo-cmd-NOSQTOES.js} +20 -20
  103. package/dist/{emit-finding-cmd-PSCJFCBZ.js → emit-finding-cmd-YXR3ZVCJ.js} +16 -16
  104. package/dist/{emit-result-cmd-VJZDDWD3.js → emit-result-cmd-Z7MBE37R.js} +18 -18
  105. package/dist/{emit-step-cmd-ER65MOU6.js → emit-step-cmd-JOSYDSEO.js} +16 -16
  106. package/dist/{exec-client-PHJ4YGYG.js → exec-client-SZRXXKJ5.js} +8 -8
  107. package/dist/find-unit-3RHC4375.js +24 -0
  108. package/dist/{findings-cmd-BN6LO7LI.js → findings-cmd-NGFY25WZ.js} +16 -16
  109. package/dist/{fleet-readiness-FHVT7ZXE.js → fleet-readiness-NWIVQQ4P.js} +14 -14
  110. package/dist/governing-source-DNWVPRXP.js +41 -0
  111. package/dist/{guest-init-IREU7IIE.js → guest-init-T7QJW2AJ.js} +9 -9
  112. package/dist/{hook-fast-OFCB6O5N.js → hook-fast-ECQBMESE.js} +1 -1
  113. package/dist/{hook-install-3SSLJYA3.js → hook-install-MBMG3G6B.js} +4 -4
  114. package/dist/host-checks-QLGWXKOC.js +80 -0
  115. package/dist/host-key-6SMJUTJ2.js +18 -0
  116. package/dist/{image-tag-MYCA26HL.js → image-tag-OCVY4W5D.js} +8 -8
  117. package/dist/index.js +4 -4
  118. package/dist/init-JY3XYZI6.js +80 -0
  119. package/dist/{init-RUY6NPTN.js → init-NRN2DQC3.js} +47 -47
  120. package/dist/{init-agent-Z6PF22UT.js → init-agent-GDOZHPQH.js} +47 -47
  121. package/dist/{init-cmd-3M4QENFU.js → init-cmd-QJYX47LS.js} +27 -27
  122. package/dist/{init-update-V4AWGCUH.js → init-update-EUJ4264S.js} +24 -24
  123. package/dist/{install-cmd-UJO2EMXF.js → install-cmd-HWG6LJX5.js} +10 -10
  124. package/dist/{layout-VZ3MERWV.js → layout-CGE4KWGO.js} +4 -4
  125. package/dist/{login-browser-ZEOXKIQ2.js → login-browser-G7WNR74C.js} +2 -2
  126. package/dist/{logs-SQJ5BKAP.js → logs-TKWJ4S4W.js} +7 -7
  127. package/dist/loop-HWYHQ374.js +90 -0
  128. package/dist/machine-NVXRV4BO.js +80 -0
  129. package/dist/{machine-skills-SAD5OWIH.js → machine-skills-CXA57QHE.js} +4 -4
  130. package/dist/{mcp-install-cmd-7KKOGEFA.js → mcp-install-cmd-6IGK65DV.js} +4 -4
  131. package/dist/{mcp-serve-cmd-EKANKY4W.js → mcp-serve-cmd-DVE5XP2U.js} +9 -9
  132. package/dist/{paths-LYF7UNWL.js → paths-VOWYUJLZ.js} +7 -7
  133. package/dist/pending-35ML3JE5.js +18 -0
  134. package/dist/{pidfile-EYAULWL2.js → pidfile-MFP6B2KV.js} +8 -8
  135. package/dist/{record-CHYO34BN.js → record-AWCJ3LTG.js} +8 -8
  136. package/dist/{relay-J3OROVNN.js → relay-YVZM5M6B.js} +5 -5
  137. package/dist/{relay-protocol-UI7QUDOZ.js → relay-protocol-MNWITORT.js} +5 -5
  138. package/dist/{run-cmd-PIMQNBAX.js → run-cmd-MBH5Z2UL.js} +16 -16
  139. package/dist/{runner-agents-KSP3MLAH.js → runner-agents-L3PLYFWJ.js} +4 -4
  140. package/dist/runner-env-IHWYZ3B6.js +24 -0
  141. package/dist/{runner-identity-WZAKGBRX.js → runner-identity-E2XKIJNB.js} +10 -10
  142. package/dist/{runner-key-HGHQYJJX.js → runner-key-W5M6AYY5.js} +47 -47
  143. package/dist/{session-sender-W6MTYKLE.js → session-sender-IS6S7PBC.js} +19 -19
  144. package/dist/{spec-cmd-RJVMWOOX.js → spec-cmd-ZLDYL4N5.js} +17 -17
  145. package/dist/{starter-pack-52PX6IPU.js → starter-pack-XINCCMDN.js} +5 -5
  146. package/dist/state-NIA6XT7D.js +18 -0
  147. package/dist/{status-YQ25OCUL.js → status-L7R6FKWD.js} +47 -47
  148. package/dist/{sync-cmd-2NBSELL7.js → sync-cmd-3YZ4IB3T.js} +18 -18
  149. package/dist/update-steps-6SPAPBAB.js +81 -0
  150. package/dist/{watch-WQGK2SQB.js → watch-LIIODJ5U.js} +18 -18
  151. package/dist/{work-claim-cmd-CQ3DSJBR.js → work-claim-cmd-GWBWIZ43.js} +23 -23
  152. package/dist/work-cmd-CJWTGOU5.js +33 -0
  153. package/dist/work-comment-cmd-RFVCNEET.js +39 -0
  154. package/dist/{work-demo-cmd-BOKSQSA5.js → work-demo-cmd-Q2GKJCVL.js} +16 -16
  155. package/dist/{work-logs-cmd-TZXDF3UI.js → work-logs-cmd-KZQBPU2J.js} +16 -16
  156. package/dist/{work-needs-attention-cmd-WR5GR3B6.js → work-needs-attention-cmd-L3DOYAMK.js} +16 -16
  157. package/dist/{work-no-change-cmd-TKC3V64O.js → work-no-change-cmd-SHP25CJB.js} +16 -16
  158. package/dist/{work-open-pr-cmd-T2IFI7OR.js → work-open-pr-cmd-VATPLVSL.js} +17 -17
  159. package/dist/{work-pr-cmd-WM6PGSGK.js → work-pr-cmd-XBLNONT3.js} +16 -16
  160. package/dist/{work-proofs-cmd-E4VJP55B.js → work-proofs-cmd-27IPS3EY.js} +18 -18
  161. package/dist/{work-proofs-record-MIVUWECF.js → work-proofs-record-2RDDJ6CK.js} +24 -24
  162. package/dist/{work-stop-cmd-52WGVYF5.js → work-stop-cmd-BLOSL24H.js} +16 -16
  163. package/package.json +1 -1
  164. package/skill-pack/maintained/outerlayer-amend/SKILL.md +1 -0
  165. package/skill-pack/maintained/outerlayer-amend/references/attachments.md +23 -0
  166. package/skill-pack/maintained/outerlayer-build/SKILL.md +5 -0
  167. package/skill-pack/maintained/outerlayer-cli/SKILL.md +9 -0
  168. package/dist/agent-setup-F4KAKOQE.js +0 -40
  169. package/dist/caller-LYH64TZB.js +0 -23
  170. package/dist/chunk-SWXAP4GM.js +0 -128
  171. package/dist/find-unit-D7MX5YW7.js +0 -24
  172. package/dist/governing-source-6WWMRJEI.js +0 -41
  173. package/dist/host-checks-KYLKXG2A.js +0 -80
  174. package/dist/host-key-4764FB4U.js +0 -18
  175. package/dist/init-EPBASJNK.js +0 -80
  176. package/dist/loop-VUNIGNXU.js +0 -90
  177. package/dist/machine-2KFSAU27.js +0 -80
  178. package/dist/pending-3FQ3GG6T.js +0 -18
  179. package/dist/runner-env-AMGOE3UI.js +0 -24
  180. package/dist/state-UIV37NXY.js +0 -18
  181. package/dist/update-steps-FH7UXI5N.js +0 -81
  182. package/dist/work-cmd-B32BDBV2.js +0 -33
  183. package/dist/work-comment-cmd-L5FTPUGE.js +0 -38
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { stripTerminalControls } from './chunk-2YOFSE7U.js';
4
- import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-HT4OKJDB.js';
3
+ import { stripTerminalControls } from './chunk-I64CTY4U.js';
4
+ import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-2WNJ2MHD.js';
5
5
  import { readFileSync } from 'fs';
6
6
 
7
7
  createRequire(import.meta.url);
@@ -55,7 +55,7 @@ function envNamesOf(row, imageEnv) {
55
55
  return [...new Set(names)].sort();
56
56
  }
57
57
  async function readOwnContainer(deps = {}) {
58
- const run = deps.run ?? (await import('./docker-KWHEDC6K.js')).spawnRun;
58
+ const run = deps.run ?? (await import('./docker-25F2KOBJ.js')).spawnRun;
59
59
  const ids = candidateIds(deps.env ?? process.env, deps.readFile ?? ((path) => readFileSync(path, "utf8")));
60
60
  if (ids.length === 0) return { ok: false, reason: "the runner cannot tell which container it runs in: HOSTNAME is empty and /proc/self/mountinfo names none" };
61
61
  let problem = "";
@@ -2,8 +2,8 @@
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-XPXJWIOJ.js';
6
- import { resolvePackRoot, OUTERLAYER_SKILLS_BASE, loadTemplateFiles, AGENTS_SKILLS_BASE, loadMaintainedFiles, rewriteSkillPaths, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MACHINE_SKILL_PATH } from './chunk-3Q2SEOT3.js';
5
+ import { linkedAgentsPath } from './chunk-ITOIM3WV.js';
6
+ import { resolvePackRoot, OUTERLAYER_SKILLS_BASE, loadTemplateFiles, AGENTS_SKILLS_BASE, loadMaintainedFiles, rewriteSkillPaths, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MACHINE_SKILL_PATH } from './chunk-MT4XF5OL.js';
7
7
  import { LEGACY_AGENT } from './chunk-7PZDPISM.js';
8
8
  import { MAINTAINED_SKILLS } from './chunk-ATEMEVFF.js';
9
9
  import { resolvePackageVersion } from './chunk-RA3O54FC.js';
@@ -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 = 48;
7
+ var RUNNER_PROTOCOL = 49;
8
8
 
9
9
  export { RUNNER_PROTOCOL };
@@ -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-F4XMG7EO.js';
5
- import { autoConnect } from './chunk-IPB5UOHH.js';
6
- import { acquireSpoolLockAt } from './chunk-2DVQHK37.js';
4
+ import { detectActiveSession } from './chunk-SBPMDO47.js';
5
+ import { autoConnect } from './chunk-XFU37HIM.js';
6
+ import { acquireSpoolLockAt } from './chunk-B5Z4VA4Q.js';
7
7
  import { C } from './chunk-2AM6Z5BP.js';
8
- import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-6ZMFEZ2K.js';
8
+ import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-VRWZNI6U.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-N2QYP3NQ.js';
13
- import { StepNameSchema, StepBodySchema } from './chunk-HE53NIRE.js';
12
+ import { resolveRepoIdentity } from './chunk-MBPBYMHU.js';
13
+ import { StepNameSchema, StepBodySchema } from './chunk-FXVHF6RX.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';
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { PROXY_WARNING_FLAG } from './chunk-UU6FN6PZ.js';
4
- import { RELAY_ID, RELAY_USER } from './chunk-2BMH3373.js';
5
- import { imageInstalls, GH_VERSION, VOICE_PACK_FILES, VOICE_PACK_VERSION, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, TINI_SHA256, TINI_VERSION, HEADLESS_SHELL_REVISION, HEADLESS_SHELL_BASE_URL, PLAYWRIGHT_FFMPEG_BASE_URL, PLAYWRIGHT_FFMPEG_REVISION, HEADLESS_SHELL, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_VERSION } from './chunk-ZUIHEOSC.js';
6
- import { defaultAgents } from './chunk-3Q2SEOT3.js';
3
+ import { PROXY_WARNING_FLAG } from './chunk-NE7EG3SN.js';
4
+ import { RELAY_ID, RELAY_USER } from './chunk-WH2QUYXH.js';
5
+ import { imageInstalls, GH_VERSION, VOICE_PACK_FILES, VOICE_PACK_VERSION, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, TINI_SHA256, TINI_VERSION, HEADLESS_SHELL_REVISION, HEADLESS_SHELL_BASE_URL, PLAYWRIGHT_FFMPEG_BASE_URL, PLAYWRIGHT_FFMPEG_REVISION, HEADLESS_SHELL, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_VERSION } from './chunk-UCUBQWJC.js';
6
+ import { defaultAgents } from './chunk-MT4XF5OL.js';
7
7
 
8
8
  createRequire(import.meta.url);
9
9
 
@@ -1,15 +1,15 @@
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-F4XMG7EO.js';
5
- import { autoConnect } from './chunk-IPB5UOHH.js';
4
+ import { detectActiveSession } from './chunk-SBPMDO47.js';
5
+ import { autoConnect } from './chunk-XFU37HIM.js';
6
6
  import { C } from './chunk-2AM6Z5BP.js';
7
- import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-6ZMFEZ2K.js';
7
+ import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-VRWZNI6U.js';
8
8
  import { launchedItemForSession } from './chunk-LGJ56FCM.js';
9
9
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
10
10
  import { homeFromEnv } from './chunk-352DHUTP.js';
11
- import { resolveRepoIdentity } from './chunk-N2QYP3NQ.js';
12
- import { CriteriaListSchema } from './chunk-HE53NIRE.js';
11
+ import { resolveRepoIdentity } from './chunk-MBPBYMHU.js';
12
+ import { CriteriaListSchema } from './chunk-FXVHF6RX.js';
13
13
  import { readFileSync } from 'fs';
14
14
 
15
15
  createRequire(import.meta.url);
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { defaultAgents, laptopAgents, contextAgents, userSkillFolderIn, loadMachineSkillFiles, resolvePackRoot } from './chunk-3Q2SEOT3.js';
3
+ import { defaultAgents, laptopAgents, contextAgents, userSkillFolderIn, loadMachineSkillFiles, resolvePackRoot } from './chunk-MT4XF5OL.js';
4
4
  import { MAINTAINED_SKILLS, maintainedLineVersion } from './chunk-ATEMEVFF.js';
5
5
  import { resolvePackageVersion } from './chunk-RA3O54FC.js';
6
6
  import { homeFromEnv } from './chunk-352DHUTP.js';
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { BUILD_HOME } from './chunk-UU6FN6PZ.js';
3
+ import { BUILD_HOME } from './chunk-NE7EG3SN.js';
4
4
  import { readdirSync } from 'fs';
5
5
  import { join, dirname } from 'path';
6
6
 
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { RemovedTargetError, removedTargetError } from './chunk-ZZ4AX25R.js';
4
- import { removeRetiredSkills } from './chunk-HITUWIB7.js';
5
- import { defaultFetch, resolveGatewayCredentials } from './chunk-6ZMFEZ2K.js';
6
- import { withTokenHeader } from './chunk-UU6FN6PZ.js';
3
+ import { RemovedTargetError, removedTargetError } from './chunk-OWEJP5HJ.js';
4
+ import { removeRetiredSkills } from './chunk-TW2V2IQ4.js';
5
+ import { defaultFetch, resolveGatewayCredentials } from './chunk-VRWZNI6U.js';
6
+ import { withTokenHeader } from './chunk-NE7EG3SN.js';
7
7
  import { appendContextProvenance } from './chunk-545P7JY7.js';
8
8
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
9
9
  import { writeDegraded, writeSourceCache, SOURCE_CACHE_TTL_RETRY_MS, writeContextManifest, SOURCE_CACHE_TTL_SUCCESS_MS, readSourceCache, isSourceCacheFresh, clearDegraded } from './chunk-YQR6E6OV.js';
10
- import { normalizeRepoName, loadMaintainedFiles, writeMaintainedFiles, parseOuterlayerConfig, targetIds, classifyTree, emitTree, emitBuilders, defaultAgents, agentRootFolders } from './chunk-3Q2SEOT3.js';
10
+ import { normalizeRepoName, loadMaintainedFiles, writeMaintainedFiles, parseOuterlayerConfig, targetIds, classifyTree, emitTree, emitBuilders, defaultAgents, agentRootFolders } from './chunk-MT4XF5OL.js';
11
11
  import { homeFromEnv } from './chunk-352DHUTP.js';
12
12
  import { execFileSync } from 'child_process';
13
13
  import { existsSync, mkdirSync, writeFileSync, chmodSync, lstatSync, readFileSync, copyFileSync } from 'fs';
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { currentLink } from './chunk-DPBFNZ6H.js';
3
+ import { currentLink } from './chunk-5QFFQCSY.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,17 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { detectActiveSession } from './chunk-F4XMG7EO.js';
4
- import { autoConnect } from './chunk-IPB5UOHH.js';
5
- import { workPageUrl } from './chunk-ZRTGX4GN.js';
6
- import { sanitizeTerminal } from './chunk-2DVQHK37.js';
3
+ import { detectActiveSession } from './chunk-SBPMDO47.js';
4
+ import { autoConnect } from './chunk-XFU37HIM.js';
5
+ import { workPageUrl } from './chunk-QFQ2UNZU.js';
6
+ import { sanitizeTerminal } from './chunk-B5Z4VA4Q.js';
7
7
  import { C } from './chunk-2AM6Z5BP.js';
8
- import { resolveGatewayCredentials, unauthorizedMessage, defaultFetch } from './chunk-6ZMFEZ2K.js';
9
- import { signRunnerRequest } from './chunk-JLCEQXQF.js';
8
+ import { resolveGatewayCredentials, unauthorizedMessage, defaultFetch } from './chunk-VRWZNI6U.js';
9
+ import { signRunnerRequest } from './chunk-ENHD5PNW.js';
10
10
  import { readRepoConnection } from './chunk-BJ3KTMDH.js';
11
11
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
12
12
  import { NATIVE_AGENTS, LEGACY_AGENT } from './chunk-7PZDPISM.js';
13
13
  import { homeFromEnv } from './chunk-352DHUTP.js';
14
- import { resolveRepoIdentity } from './chunk-N2QYP3NQ.js';
14
+ import { resolveRepoIdentity } from './chunk-MBPBYMHU.js';
15
15
 
16
16
  createRequire(import.meta.url);
17
17
 
@@ -320,6 +320,66 @@ async function getJson(url, path, apiKey, appId, fetchImpl, signer, limits) {
320
320
  }
321
321
  return { status: response.status, data: json.data ?? json, pagination: json.pagination ?? null };
322
322
  }
323
+ var RateLimitedError = class extends WorkCommandError {
324
+ constructor(message, retryAfterSeconds) {
325
+ super(message, true, 429, "rate_limited");
326
+ this.retryAfterSeconds = retryAfterSeconds;
327
+ }
328
+ };
329
+ async function refusalOfBytesCall(response, apiKey, endpoint) {
330
+ if (response.status === 401) return await signatureRefusalOf(response) ?? new WorkCommandError(unauthorizedMessage(apiKey), false, 401);
331
+ let error;
332
+ let parsed = true;
333
+ try {
334
+ error = (await response.json()).error;
335
+ } catch {
336
+ parsed = false;
337
+ }
338
+ if (response.status === 429) {
339
+ const header = Number(response.headers.get("retry-after"));
340
+ return new RateLimitedError(error?.message ?? "rate limited", Number.isFinite(header) && header > 0 ? header : void 0);
341
+ }
342
+ if (!parsed) return new WorkCommandError(`${endpoint} answered ${response.status} with a body that is not JSON`, response.status >= 500, response.status);
343
+ return new WorkCommandError(error?.message ?? `request failed (${response.status})`, response.status >= 500, response.status, error?.code);
344
+ }
345
+ async function postBytes(url, path, apiKey, appId, bytes, headers, fetchImpl, signer) {
346
+ const endpoint = new URL(path, url).toString();
347
+ const signature = signer === void 0 ? {} : { ...await signRunnerRequest({ method: "POST", url: endpoint, body: bytes, signer }) };
348
+ let response;
349
+ try {
350
+ response = await fetchImpl(endpoint, {
351
+ method: "POST",
352
+ headers: { authorization: `Bearer ${apiKey}`, "x-outerlayer-app-id": appId, ...headers, ...signature },
353
+ body: Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength)
354
+ });
355
+ } catch (err) {
356
+ throw new WorkCommandError(`network error reaching ${endpoint}: ${String(err)}`, true);
357
+ }
358
+ if (!response.ok) throw await refusalOfBytesCall(response, apiKey, endpoint);
359
+ let json;
360
+ try {
361
+ json = await response.json();
362
+ } catch {
363
+ throw new WorkCommandError(`${endpoint} answered ${response.status} with a body that is not JSON \u2014 the request may not have reached the gateway`, true, response.status);
364
+ }
365
+ return { status: response.status, data: json.data ?? json };
366
+ }
367
+ async function getBytes(url, path, apiKey, appId, fetchImpl, signer, limits) {
368
+ const endpoint = new URL(path, url).toString();
369
+ const signature = await signatureHeaders("GET", endpoint, "", signer);
370
+ let response;
371
+ try {
372
+ response = await fetchImpl(endpoint, {
373
+ method: "GET",
374
+ headers: { authorization: `Bearer ${apiKey}`, "x-outerlayer-app-id": appId, ...signature },
375
+ ...limits?.timeoutMs === void 0 ? {} : { signal: AbortSignal.timeout(limits.timeoutMs) }
376
+ });
377
+ } catch (err) {
378
+ throw new WorkCommandError(`network error reaching ${endpoint}: ${String(err)}`, true);
379
+ }
380
+ if (!response.ok) throw await refusalOfBytesCall(response, apiKey, endpoint);
381
+ return { status: response.status, bytes: new Uint8Array(await response.arrayBuffer()), mediaType: response.headers.get("content-type") ?? "application/octet-stream", disposition: response.headers.get("content-disposition") };
382
+ }
323
383
  async function findLiveItem(creds, repository, subject, fetchImpl) {
324
384
  const query = new URLSearchParams({ repository, issue: String(subject.issue) });
325
385
  const page = await getJson(
@@ -486,7 +546,7 @@ async function runWorkLinkSession(opts) {
486
546
  return await linkSession(opts);
487
547
  } catch (err) {
488
548
  if (opts.logFailures) {
489
- const { logHookError } = await import('./hook-fast-OFCB6O5N.js');
549
+ const { logHookError } = await import('./hook-fast-ECQBMESE.js');
490
550
  const reason = err instanceof Error ? err.message : String(err);
491
551
  logHookError(opts.home ?? homeFromEnv(opts.env ?? process.env), new Error(`work link-session #${opts.number} failed: ${reason}`));
492
552
  }
@@ -694,4 +754,4 @@ async function runWorkList(opts) {
694
754
  return { data, output };
695
755
  }
696
756
 
697
- export { TRACKERS, WorkCommandError, environmentFacts, findLiveItemForIssue, getJson, isSignatureRefusal, parsePositiveInt, patchJson, postJson, resolveCredentials, runWorkBuild, runWorkLinkSession, runWorkList, runWorkRemove, runWorkStatus, signatureRefusalMessage, verifiedTrackerNames };
757
+ export { RateLimitedError, TRACKERS, WorkCommandError, environmentFacts, findLiveItemForIssue, getBytes, getJson, isSignatureRefusal, parsePositiveInt, patchJson, postBytes, postJson, resolveCredentials, runWorkBuild, runWorkLinkSession, runWorkList, runWorkRemove, runWorkStatus, signatureRefusalMessage, verifiedTrackerNames };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { homeFromEnv } from './chunk-352DHUTP.js';
4
- import { ArtifactTombstoneRecordSchema, ArtifactSpoolRecordSchema } from './chunk-HE53NIRE.js';
4
+ import { ArtifactTombstoneRecordSchema, ArtifactSpoolRecordSchema } from './chunk-FXVHF6RX.js';
5
5
  import { mkdirSync, appendFileSync, writeFileSync, renameSync, unlinkSync, existsSync, readdirSync, readFileSync, statSync } from 'fs';
6
6
  import { join, dirname } from 'path';
7
7
 
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { sanitizeTerminal } from './chunk-2DVQHK37.js';
4
- import { resolvePackRoot, parseProofsConfig } from './chunk-3Q2SEOT3.js';
5
- import { CHECK_ITEM_REASON_MAX_LENGTH, CHECK_ITEMS_MAX, CheckItemsSchema, CHECK_ITEM_REFS_MAX, CHECK_ITEM_ID_MAX_LENGTH, CHECK_ITEM_REF_PATH_MAX_LENGTH, JUDGE_NOT_RUN_ITEM_ID, REVIEWED_COMMIT_ITEM_ID } from './chunk-HE53NIRE.js';
3
+ import { sanitizeTerminal } from './chunk-B5Z4VA4Q.js';
4
+ import { resolvePackRoot, parseProofsConfig } from './chunk-MT4XF5OL.js';
5
+ import { CHECK_ITEM_REASON_MAX_LENGTH, CHECK_ITEMS_MAX, CheckItemsSchema, CHECK_ITEM_REFS_MAX, CHECK_ITEM_ID_MAX_LENGTH, CHECK_ITEM_REF_PATH_MAX_LENGTH, JUDGE_NOT_RUN_ITEM_ID, REVIEWED_COMMIT_ITEM_ID } from './chunk-FXVHF6RX.js';
6
6
  import { createHash } from 'crypto';
7
7
  import { join } from 'path';
8
8
  import { pathToFileURL } from 'url';
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { mcpTargetPath, INIT_STDIO_ENTRY, INIT_DOCS_ENTRY, DOCS_MCP_SERVER_NAME } from './chunk-FLIRUHVT.js';
4
- import { VALIDATOR_FILES, VALIDATORS_DIR, POLICY_PATH, POLICY_CONTENT } from './chunk-P43BSQGV.js';
5
- import { skillsBaseFor } from './chunk-C7YFAPMY.js';
3
+ import { mcpTargetPath, INIT_STDIO_ENTRY, INIT_DOCS_ENTRY, DOCS_MCP_SERVER_NAME } from './chunk-TUSIYONR.js';
4
+ import { VALIDATOR_FILES, VALIDATORS_DIR, POLICY_PATH, POLICY_CONTENT } from './chunk-6RQP5GP5.js';
5
+ import { skillsBaseFor } from './chunk-YO2NPS66.js';
6
6
  import { findGitDirs } from './chunk-BJ3KTMDH.js';
7
7
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
8
- import { hasSymlinkComponent } from './chunk-XPXJWIOJ.js';
8
+ import { hasSymlinkComponent } from './chunk-ITOIM3WV.js';
9
9
  import { cloneIsGoverned } from './chunk-YQR6E6OV.js';
10
- import { resolvePackRoot, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, restoreSkillPaths, rewriteSkillPaths, skillDir, loadTemplateFiles, TEMPLATE_SKILLS } from './chunk-3Q2SEOT3.js';
10
+ import { resolvePackRoot, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, restoreSkillPaths, rewriteSkillPaths, skillDir, loadTemplateFiles, TEMPLATE_SKILLS } from './chunk-MT4XF5OL.js';
11
11
  import { createHash } from 'crypto';
12
12
  import { existsSync, readFileSync } from 'fs';
13
13
  import { join } from 'path';
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { launcherPath, pathNotes, writeLauncher, LauncherWriteError } from './chunk-OQHHPJNK.js';
4
- import { currentVersion, currentLink, versionDir, execStartLine, isInLayout, packageRootIn, switchCurrent } from './chunk-DPBFNZ6H.js';
3
+ import { launcherPath, pathNotes, writeLauncher, LauncherWriteError } from './chunk-ATQHPT3B.js';
4
+ import { currentVersion, currentLink, versionDir, execStartLine, isInLayout, packageRootIn, switchCurrent } from './chunk-5QFFQCSY.js';
5
5
  import { compareVersions } from './chunk-TQMI335S.js';
6
- import { runnerDir, RUNNER_DIR_MODE } from './chunk-O7IJBJ6Z.js';
6
+ import { runnerDir, RUNNER_DIR_MODE } from './chunk-AC6DM3S3.js';
7
7
  import { lchownSync, lstatSync, realpathSync, readFileSync, mkdirSync, rmSync, cpSync, existsSync, readdirSync } from 'fs';
8
8
  import { dirname, sep, join } from 'path';
9
9
  import { spawnSync } from 'child_process';
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { uploadSpooledSteps } from './chunk-Y67NEZMW.js';
3
+ import { uploadSpooledSteps } from './chunk-6XROZIV6.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-2DVQHK37.js';
5
+ import { migrateLegacyArtifactSidecars, planArtifactUpload, artifactsStatePath, sanitizeTerminal, acquireArtifactSpoolLock, artifactBlobsDir, resolveArtifactTurnIndex, isArtifactTombstoned, ARTIFACT_RETRY_MAX_AGE_MS, writeArtifactSpoolState, reclaimUnneededArtifactBlobs, neededArtifactShas } from './chunk-B5Z4VA4Q.js';
6
6
  import { C } from './chunk-2AM6Z5BP.js';
7
- import { cliFetch, resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-6ZMFEZ2K.js';
7
+ import { cliFetch, resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-VRWZNI6U.js';
8
8
  import { readCloudConfig, cloudConfigPath, writeCloudConfig } from './chunk-HWVMRETT.js';
9
- import { signerFor, signRunnerRequest } from './chunk-JLCEQXQF.js';
10
- import { SCRUB_ENV_VARIABLE } from './chunk-UU6FN6PZ.js';
11
- import { writeSyncStatus, logHookError, spoolDir } from './chunk-SOLQ3JA6.js';
9
+ import { signerFor, signRunnerRequest } from './chunk-ENHD5PNW.js';
10
+ import { SCRUB_ENV_VARIABLE } from './chunk-NE7EG3SN.js';
11
+ import { writeSyncStatus, logHookError, spoolDir } from './chunk-QGUCHNSQ.js';
12
12
  import { readLatestProvenanceForSession, readContextProvenance } from './chunk-545P7JY7.js';
13
13
  import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
14
14
  import { hookExecSpoolPath } from './chunk-RNCCRUT5.js';
@@ -16,11 +16,11 @@ 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-3Q2SEOT3.js';
19
+ import { legacyAgent, captureAgents, captureAdapters } from './chunk-MT4XF5OL.js';
20
20
  import { NATIVE_AGENTS, LEGACY_AGENT } from './chunk-7PZDPISM.js';
21
21
  import { homeFromEnv, spoolHomeFromEnv } from './chunk-352DHUTP.js';
22
- import { setCustomScrubbers, setLocalIdentity, forkFor, readForkRecord, tailTranscript, enrichSessionRepo, scanAll, setRepoRoot, resolveRepoIdentity, scrubDeep } from './chunk-N2QYP3NQ.js';
23
- import { CAPTURE_TIERS, inferArtifactKind, bannedPathsForTier, downconvertSession, isHumanUserTurn, turnCountBound, EVENT_TYPES } from './chunk-HE53NIRE.js';
22
+ import { setCustomScrubbers, setLocalIdentity, forkFor, readForkRecord, tailTranscript, enrichSessionRepo, scanAll, setRepoRoot, resolveRepoIdentity, scrubDeep } from './chunk-MBPBYMHU.js';
23
+ import { CAPTURE_TIERS, inferArtifactKind, bannedPathsForTier, downconvertSession, isHumanUserTurn, turnCountBound, EVENT_TYPES } from './chunk-FXVHF6RX.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,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { builtinKind, keepsHostBuilder } from './chunk-WISVAUTD.js';
4
- import { parseSize } from './chunk-G2J574LS.js';
5
- import { runnerDir } from './chunk-O7IJBJ6Z.js';
6
- import { FD_SLOTS_PER_BUILD, FD_STORE_ENV, BUILD_SLICE_MEMORY_ENV, credentialLineIn, withoutCredentialLines } from './chunk-2BMH3373.js';
7
- import { credentialAgent, credentialNames, credentialForms } from './chunk-ZUIHEOSC.js';
8
- import { defaultAgents } from './chunk-3Q2SEOT3.js';
3
+ import { builtinKind, keepsHostBuilder } from './chunk-5QDHJT73.js';
4
+ import { parseSize } from './chunk-I2N427GS.js';
5
+ import { runnerDir } from './chunk-AC6DM3S3.js';
6
+ import { FD_SLOTS_PER_BUILD, FD_STORE_ENV, BUILD_SLICE_MEMORY_ENV, credentialLineIn, withoutCredentialLines } from './chunk-WH2QUYXH.js';
7
+ import { credentialAgent, credentialNames, credentialForms } from './chunk-UCUBQWJC.js';
8
+ import { defaultAgents } from './chunk-MT4XF5OL.js';
9
9
  import { existsSync, readFileSync, writeFileSync, chmodSync, renameSync } from 'fs';
10
10
  import { dirname, join } from 'path';
11
11
  import { spawnSync } from 'child_process';
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { helperSocketPath } from './chunk-2YOFSE7U.js';
4
- import { UNIT_MARKER } from './chunk-52IVBUIU.js';
5
- import { runnerDir } from './chunk-O7IJBJ6Z.js';
3
+ import { helperSocketPath } from './chunk-I64CTY4U.js';
4
+ import { UNIT_MARKER } from './chunk-DKDBMMX7.js';
5
+ import { runnerDir } from './chunk-AC6DM3S3.js';
6
6
  import { createHash } from 'crypto';
7
7
  import { join } from 'path';
8
8
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir } from './chunk-O7IJBJ6Z.js';
3
+ import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir } from './chunk-AC6DM3S3.js';
4
4
  import { mkdirSync, writeFileSync, renameSync, existsSync, readFileSync } from 'fs';
5
5
  import { dirname, join } from 'path';
6
6
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { hostKeyPath, runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-O7IJBJ6Z.js';
3
+ import { hostKeyPath, runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-AC6DM3S3.js';
4
4
  import { generateKeyPairSync, createPrivateKey, createPublicKey, sign } from 'crypto';
5
5
  import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
6
6
 
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { DEFAULT_UNIT_NAME } from './chunk-52IVBUIU.js';
4
- import { RUNNER_FILE_MODE } from './chunk-O7IJBJ6Z.js';
5
- import { parseRunnerEnv, withoutCredentialLines } from './chunk-2BMH3373.js';
6
- import { headlessNames, runnerAgentNamed, credentialAgent, orList, credentialShapes, runnerAgents, credentialForms, credentialEnvPath, forwardedVariables } from './chunk-ZUIHEOSC.js';
7
- import { defaultAgents } from './chunk-3Q2SEOT3.js';
3
+ import { DEFAULT_UNIT_NAME } from './chunk-DKDBMMX7.js';
4
+ import { RUNNER_FILE_MODE } from './chunk-AC6DM3S3.js';
5
+ import { parseRunnerEnv, withoutCredentialLines } from './chunk-WH2QUYXH.js';
6
+ import { headlessNames, runnerAgentNamed, credentialAgent, orList, credentialShapes, runnerAgents, credentialForms, credentialEnvPath, forwardedVariables } from './chunk-UCUBQWJC.js';
7
+ import { defaultAgents } from './chunk-MT4XF5OL.js';
8
8
  import { existsSync, readFileSync, writeFileSync, renameSync, rmSync } from 'fs';
9
9
  import { join, dirname } from 'path';
10
10
 
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { LiveUploader } from './chunk-KHC7ICRR.js';
4
- import { spoolDir } from './chunk-SOLQ3JA6.js';
3
+ import { LiveUploader } from './chunk-CXXQQST7.js';
4
+ import { spoolDir } from './chunk-QGUCHNSQ.js';
5
5
  import { parseRunEnv, parseWorkItemEnv } from './chunk-LGJ56FCM.js';
6
- import { sessionFolderIn, legacyAgent } from './chunk-3Q2SEOT3.js';
6
+ import { sessionFolderIn, legacyAgent } from './chunk-MT4XF5OL.js';
7
7
  import { homeFromEnv } from './chunk-352DHUTP.js';
8
- import { CaptureDaemon } from './chunk-N2QYP3NQ.js';
8
+ import { CaptureDaemon } from './chunk-MBPBYMHU.js';
9
9
  import { mkdirSync, writeFileSync, rmSync } from 'fs';
10
10
  import { join } from 'path';
11
11
 
@@ -22654,6 +22654,50 @@ var SAME_PROBLEM_RULES = [
22654
22654
  "2. A gap in the instructions is its own problem, separate from the thing it fails to mention. They are fixed in different places.",
22655
22655
  "3. A finding can report more than one problem. Link each one, or record one finding per problem."
22656
22656
  ].join("\n");
22657
+ var WORK_ITEM_ATTACHMENT_MAX_BYTES = 8 * 1024 * 1024;
22658
+ var WORK_ITEM_ATTACHMENTS_MAX_PER_COMMENT = 10;
22659
+ var WORK_ITEM_ATTACHMENTS_MAX_TOTAL_BYTES = 10 * 1024 * 1024;
22660
+ var WORK_ITEM_ATTACHMENT_MAX_FILENAME_LENGTH = 200;
22661
+ var WORK_ITEM_ATTACHMENT_KINDS = ["image", "video", "pdf", "text", "file"];
22662
+ var WORK_ITEM_ATTACHMENT_MEDIA_TYPES = {
22663
+ image: ["image/png", "image/jpeg", "image/gif", "image/webp"],
22664
+ video: ["video/mp4", "video/webm"],
22665
+ pdf: ["application/pdf"],
22666
+ text: ["text/plain", "text/csv", "text/markdown", "application/json", "application/x-ndjson"],
22667
+ file: ["application/zip", "application/gzip"]
22668
+ };
22669
+ function attachmentKind(mediaType) {
22670
+ var _a3, _b;
22671
+ const base = (_b = (_a3 = mediaType.split(";")[0]) == null ? void 0 : _a3.trim().toLowerCase()) != null ? _b : "";
22672
+ for (const kind of WORK_ITEM_ATTACHMENT_KINDS) {
22673
+ if (WORK_ITEM_ATTACHMENT_MEDIA_TYPES[kind].includes(base)) return kind;
22674
+ }
22675
+ return null;
22676
+ }
22677
+ var CONTROL_CHARACTERS = /[\u0000-\u001f\u007f-\u009f]/g;
22678
+ var PATH_SEPARATORS = /[\\/]/g;
22679
+ function capUtf8Bytes(value, max) {
22680
+ const encoder = new TextEncoder();
22681
+ let bytes = 0;
22682
+ let out = "";
22683
+ for (const ch of value) {
22684
+ bytes += encoder.encode(ch).length;
22685
+ if (bytes > max) break;
22686
+ out += ch;
22687
+ }
22688
+ return out;
22689
+ }
22690
+ function cleanAttachmentFilename(name) {
22691
+ const cleaned = name.replace(CONTROL_CHARACTERS, "").replace(PATH_SEPARATORS, "_").replace(/^[.\s]+/, "").trim();
22692
+ const capped = capUtf8Bytes(cleaned, WORK_ITEM_ATTACHMENT_MAX_FILENAME_LENGTH).trim();
22693
+ return capped === "" ? "file" : capped;
22694
+ }
22695
+ var WorkItemAttachmentIdSchema = external_exports.string().uuid();
22696
+ var WorkItemAttachmentIdsSchema = external_exports.array(WorkItemAttachmentIdSchema).max(WORK_ITEM_ATTACHMENTS_MAX_PER_COMMENT).refine((ids) => new Set(ids).size === ids.length, { message: "an attachment is named once" });
22697
+ var ATTACHMENT_FILENAME_HEADER = "X-Attachment-Filename";
22698
+ var ATTACHMENT_SHA256_HEADER = "X-Attachment-Sha256";
22699
+ var ATTACHMENT_CLIENT_ID_HEADER = "X-Client-Attachment-Id";
22700
+ external_exports.string().min(1).max(160);
22657
22701
  var WORK_ITEM_COMMENT_ACTIONS = ["pass", "fail", "attach", "ready", "request", "follow_up"];
22658
22702
  var WORK_ITEM_COMMENT_MAX_BODY_LENGTH = 2e3;
22659
22703
  var REVIEW_SEND_ID_PATTERN = /^[A-Za-z0-9_.-]{1,100}$/;
@@ -22668,19 +22712,25 @@ external_exports.object({
22668
22712
  /** The id of the thread the comment answers (`threads[].id` from the
22669
22713
  * threads read). Refused with `criterion` or an `action`. The answer is
22670
22714
  * posted back to the source of the thread. */
22671
- thread: external_exports.string().min(1).max(128).optional()
22715
+ thread: external_exports.string().min(1).max(128).optional(),
22716
+ /** The attachments the comment carries, by id, in the order the author gave. At most 10. Every action except `attach` accepts them. A comment that names any may have an empty `body`. */
22717
+ attachments: WorkItemAttachmentIdsSchema.optional()
22672
22718
  });
22673
22719
  var WORK_ITEM_REVIEW_NOTES_MAX = 50;
22674
22720
  var WorkItemReviewNoteSchema = external_exports.object({
22675
22721
  criterion: ArtifactCriterionIdSchema,
22676
- body: external_exports.string().min(1).max(WORK_ITEM_COMMENT_MAX_BODY_LENGTH)
22722
+ body: external_exports.string().min(1).max(WORK_ITEM_COMMENT_MAX_BODY_LENGTH),
22723
+ /** The files the note carries, by id. At most 10. */
22724
+ attachments: WorkItemAttachmentIdsSchema.optional()
22677
22725
  });
22678
22726
  external_exports.object({
22679
22727
  schemaVersion: external_exports.literal(1),
22680
22728
  clientSendId: external_exports.string().regex(REVIEW_SEND_ID_PATTERN),
22681
22729
  notes: external_exports.array(WorkItemReviewNoteSchema).min(1).max(WORK_ITEM_REVIEW_NOTES_MAX),
22682
22730
  /** The reviewer's summary. It is stored in the same statement as the notes, so a running agent that gets the `fail` also gets the summary. */
22683
- summary: external_exports.string().min(1).max(WORK_ITEM_COMMENT_MAX_BODY_LENGTH).optional()
22731
+ summary: external_exports.string().min(1).max(WORK_ITEM_COMMENT_MAX_BODY_LENGTH).optional(),
22732
+ /** The files the summary carries, by id. With no `summary` text the summary comment is stored with an empty body. */
22733
+ summaryAttachments: WorkItemAttachmentIdsSchema.optional()
22684
22734
  });
22685
22735
  var CLI_LOGIN_KIND = "account";
22686
22736
  var CLI_LOGIN_MACHINE_NAME_MAX = 255;
@@ -22950,4 +23000,4 @@ xmlchars/xmlns/1.0/ed3.js:
22950
23000
  *)
22951
23001
  */
22952
23002
 
22953
- export { ARTIFACT_KINDS, ARTIFACT_MAX_BYTES, ARTIFACT_MAX_CAPTION_LENGTH, ARTIFACT_MAX_FILENAME_LENGTH, ARTIFACT_MAX_REPLACES_TARGETS, ArtifactCriterionIdSchema, ArtifactSpoolRecordSchema, ArtifactTombstoneRecordSchema, BUCKET_MODEL_MAX_LENGTH, CAPTURE_TIERS, CHECK_ITEMS_MAX, CHECK_ITEM_HREF_MAX_LENGTH, CHECK_ITEM_ID_MAX_LENGTH, CHECK_ITEM_REASON_MAX_LENGTH, CHECK_ITEM_REFS_MAX, CHECK_ITEM_REF_PATH_MAX_LENGTH, CLI_LOGIN_KIND, CLI_LOGIN_MACHINE_NAME_MAX, CODE_REVIEW_NAME, CheckItemsSchema, CliLoginPollResponseSchema, CliLoginRefusalSchema, CliLoginStartedSchema, CriteriaListSchema, DEMO_MANIFEST_LATEST_VERSION, DEMO_RECORD_MEDIA_TYPE, DemoManifestSchema, EMITTED_RESULTS, EMITTED_RESULT_MAX_BODY_LENGTH, EMITTED_RESULT_MAX_LINK_LENGTH, EVENT_TYPES, EmittedNameSchema, FindingBatchSchema, FindingsResponseSchema, INPUT_BAND_BOUNDARIES, JUDGE_NOT_RUN_ITEM_ID, RESERVED_EMIT_NAMES, REVIEWED_COMMIT_ITEM_ID, SAME_PROBLEM_RULES, SCHEMA_VERSION, SPEED_MAX_LENGTH, StepBodySchema, StepNameSchema, UNREVIEWED_FILES_ITEM_ID, WORK_ITEM_COMMENT_MAX_BODY_LENGTH, bannedPathsForTier, bindTests, downconvertSession, inferArtifactKind, inputBandOf, isHumanUserTurn, isTestSourcePath, itemsAllowResult, mediaTypeForArtifactPath, parseAgentSession, parseJunit, parseTestSelector, turnCountBound };
23003
+ export { ARTIFACT_KINDS, ARTIFACT_MAX_BYTES, ARTIFACT_MAX_CAPTION_LENGTH, ARTIFACT_MAX_FILENAME_LENGTH, ARTIFACT_MAX_REPLACES_TARGETS, ATTACHMENT_CLIENT_ID_HEADER, ATTACHMENT_FILENAME_HEADER, ATTACHMENT_SHA256_HEADER, ArtifactCriterionIdSchema, ArtifactSpoolRecordSchema, ArtifactTombstoneRecordSchema, BUCKET_MODEL_MAX_LENGTH, CAPTURE_TIERS, CHECK_ITEMS_MAX, CHECK_ITEM_HREF_MAX_LENGTH, CHECK_ITEM_ID_MAX_LENGTH, CHECK_ITEM_REASON_MAX_LENGTH, CHECK_ITEM_REFS_MAX, CHECK_ITEM_REF_PATH_MAX_LENGTH, CLI_LOGIN_KIND, CLI_LOGIN_MACHINE_NAME_MAX, CODE_REVIEW_NAME, CheckItemsSchema, CliLoginPollResponseSchema, CliLoginRefusalSchema, CliLoginStartedSchema, CriteriaListSchema, DEMO_MANIFEST_LATEST_VERSION, DEMO_RECORD_MEDIA_TYPE, DemoManifestSchema, EMITTED_RESULTS, EMITTED_RESULT_MAX_BODY_LENGTH, EMITTED_RESULT_MAX_LINK_LENGTH, EVENT_TYPES, EmittedNameSchema, FindingBatchSchema, FindingsResponseSchema, INPUT_BAND_BOUNDARIES, JUDGE_NOT_RUN_ITEM_ID, RESERVED_EMIT_NAMES, REVIEWED_COMMIT_ITEM_ID, SAME_PROBLEM_RULES, SCHEMA_VERSION, SPEED_MAX_LENGTH, StepBodySchema, StepNameSchema, UNREVIEWED_FILES_ITEM_ID, WORK_ITEM_ATTACHMENTS_MAX_PER_COMMENT, WORK_ITEM_ATTACHMENTS_MAX_TOTAL_BYTES, WORK_ITEM_ATTACHMENT_MAX_BYTES, WORK_ITEM_COMMENT_MAX_BODY_LENGTH, attachmentKind, bannedPathsForTier, bindTests, cleanAttachmentFilename, downconvertSession, inferArtifactKind, inputBandOf, isHumanUserTurn, isTestSourcePath, itemsAllowResult, mediaTypeForArtifactPath, parseAgentSession, parseJunit, parseTestSelector, turnCountBound };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { readSettingsText, SettingsParseError, cliForInstall } from './chunk-ZHQC43NH.js';
4
- import { legacyAgent, defaultAgents, HookTextError } from './chunk-3Q2SEOT3.js';
4
+ import { legacyAgent, defaultAgents, HookTextError } from './chunk-MT4XF5OL.js';
5
5
 
6
6
  createRequire(import.meta.url);
7
7
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-O7IJBJ6Z.js';
3
+ import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-AC6DM3S3.js';
4
4
  import { readFileSync, existsSync, rmSync, mkdirSync, writeFileSync, renameSync } from 'fs';
5
5
  import { join } from 'path';
6
6