@outerlayer/cli 0.38.0-next.20261109143949 → 0.38.0-next.20261110130701

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 (203) hide show
  1. package/README.md +20 -3
  2. package/dist/agent-setup-GZBGCV3K.js +40 -0
  3. package/dist/{agent-subcommand-DCOPM2NX.js → agent-subcommand-5PNHUNZZ.js} +5 -5
  4. package/dist/{artifact-link-cmd-RUGAK5EX.js → artifact-link-cmd-XOFZP7U5.js} +2 -2
  5. package/dist/{bridge-HZRJYECQ.js → bridge-RNM7OWRW.js} +8 -8
  6. package/dist/{build-3LXKCCJF.js → build-VKO7IVOQ.js} +14 -14
  7. package/dist/{build-disk-TYX6DU5R.js → build-disk-M2JYJF6R.js} +12 -12
  8. package/dist/build-info.json +1 -1
  9. package/dist/{builder-VYKWHAUQ.js → builder-HMHJ6U7C.js} +11 -11
  10. package/dist/caller-U26SATTV.js +23 -0
  11. package/dist/{check-YUKNUSAS.js → check-SJCTNS7N.js} +60 -60
  12. package/dist/{chunk-5OBQBINA.js → chunk-2TXYQANG.js} +1 -1
  13. package/dist/{chunk-6EN72I2O.js → chunk-2WNJ2MHD.js} +1 -1
  14. package/dist/{chunk-F3MEL6B6.js → chunk-3DY4DQOC.js} +5 -5
  15. package/dist/{chunk-LYWLBZ37.js → chunk-3GTAPQBG.js} +2 -2
  16. package/dist/{chunk-U463IFDK.js → chunk-3HJK7WTM.js} +8 -8
  17. package/dist/{chunk-O4Q7GPKU.js → chunk-3W5JLANR.js} +3 -3
  18. package/dist/{chunk-22QIA7SH.js → chunk-47JRSV6Y.js} +1 -1
  19. package/dist/{chunk-RVDXHF2M.js → chunk-4EJHQYVI.js} +255 -50
  20. package/dist/{chunk-KX4JKW4Z.js → chunk-5QDHJT73.js} +7 -4
  21. package/dist/{chunk-X45WDWSV.js → chunk-5QFFQCSY.js} +1 -1
  22. package/dist/{chunk-HGWDBTQ3.js → chunk-6RQP5GP5.js} +3 -3
  23. package/dist/{chunk-5TZCV6JB.js → chunk-6XMC6R4W.js} +1 -1
  24. package/dist/{chunk-T63WTVGY.js → chunk-6XROZIV6.js} +8 -8
  25. package/dist/{chunk-GECHL3NC.js → chunk-72LXVD4O.js} +4 -4
  26. package/dist/{chunk-C3K54KRU.js → chunk-735C5J6Q.js} +7 -7
  27. package/dist/{chunk-JMWCPEKP.js → chunk-7E55P2NR.js} +2 -2
  28. package/dist/{chunk-LO3PSFNT.js → chunk-AC6DM3S3.js} +1 -1
  29. package/dist/{chunk-JAURZKSE.js → chunk-ALCZ2SEW.js} +5 -5
  30. package/dist/{chunk-HUP2CGX4.js → chunk-AS4NMHJM.js} +3 -3
  31. package/dist/{chunk-CDDED64E.js → chunk-ATEMEVFF.js} +1 -1
  32. package/dist/{chunk-RMXRQ3OC.js → chunk-ATQHPT3B.js} +1 -1
  33. package/dist/{chunk-7TM2E4RI.js → chunk-B4U5XI4F.js} +69 -9
  34. package/dist/{chunk-2DVQHK37.js → chunk-B5Z4VA4Q.js} +1 -1
  35. package/dist/{chunk-LIH6CIVB.js → chunk-BCQFMAGM.js} +3 -3
  36. package/dist/{chunk-LIMJRKIU.js → chunk-BTH6HTE5.js} +5 -5
  37. package/dist/{chunk-WGC7UFRM.js → chunk-C2PZOLN7.js} +3 -2
  38. package/dist/{chunk-IG5ZZG7R.js → chunk-C574RHGN.js} +3 -3
  39. package/dist/{chunk-4LUHKCDO.js → chunk-CXXQQST7.js} +26 -15
  40. package/dist/{chunk-4K2EMRJP.js → chunk-DKDBMMX7.js} +6 -6
  41. package/dist/{chunk-DX27B42J.js → chunk-EHPKACA7.js} +1 -1
  42. package/dist/{chunk-RVYMYTXX.js → chunk-ENHD5PNW.js} +1 -1
  43. package/dist/{chunk-EGKYININ.js → chunk-F2ADK2KB.js} +5 -5
  44. package/dist/{chunk-GVK7AKFX.js → chunk-FGBBGUM4.js} +10 -8
  45. package/dist/{chunk-HE53NIRE.js → chunk-FXVHF6RX.js} +54 -4
  46. package/dist/{chunk-H3YHAO7L.js → chunk-GJMLLXZJ.js} +1 -1
  47. package/dist/{chunk-4EQQS3VJ.js → chunk-HDEYRLWK.js} +1 -1
  48. package/dist/{chunk-G7HNRAXN.js → chunk-HJK2KI3Q.js} +16 -16
  49. package/dist/{chunk-2J3X2Z4F.js → chunk-I2N427GS.js} +8 -8
  50. package/dist/{chunk-NFZMENCY.js → chunk-I45HTSSA.js} +1 -1
  51. package/dist/{chunk-2XEQCSCQ.js → chunk-IGO766M6.js} +4 -4
  52. package/dist/{chunk-TNAUQADA.js → chunk-ITOIM3WV.js} +1 -1
  53. package/dist/{chunk-CCEP5WBI.js → chunk-IVB6A3I7.js} +13 -11
  54. package/dist/{chunk-SLR6QAOE.js → chunk-L32O52SH.js} +1 -1
  55. package/dist/{chunk-TTG6Y7G7.js → chunk-L6CZTRNW.js} +2 -2
  56. package/dist/{chunk-4OD45RBP.js → chunk-LGJ56FCM.js} +11 -2
  57. package/dist/{chunk-N2QYP3NQ.js → chunk-MBPBYMHU.js} +565 -16
  58. package/dist/{chunk-X56UUEHE.js → chunk-MSARYPFD.js} +12 -3
  59. package/dist/{chunk-OKELGJNN.js → chunk-MT4XF5OL.js} +3 -3
  60. package/dist/{chunk-QP6SPQU5.js → chunk-NE7EG3SN.js} +6 -6
  61. package/dist/{chunk-JKRVSEK7.js → chunk-OEWSICWM.js} +8 -8
  62. package/dist/{chunk-DEWD22FA.js → chunk-OI4ZV7MJ.js} +1 -1
  63. package/dist/{chunk-IJ4DF5QS.js → chunk-OK4RSIB2.js} +1 -1
  64. package/dist/{chunk-PM4YDVAX.js → chunk-OWEJP5HJ.js} +1 -1
  65. package/dist/{chunk-Z4R73UUH.js → chunk-PA6FKP5B.js} +7 -7
  66. package/dist/{chunk-KFHF3GBH.js → chunk-QFQ2UNZU.js} +6 -6
  67. package/dist/{chunk-D7KYG37D.js → chunk-QGUCHNSQ.js} +82 -16
  68. package/dist/{chunk-OYBBYENC.js → chunk-QNHBJU74.js} +8 -8
  69. package/dist/{chunk-LOG4LBUY.js → chunk-RBLXGO5K.js} +2 -2
  70. package/dist/{chunk-KIYP5TML.js → chunk-SBPMDO47.js} +1 -1
  71. package/dist/{chunk-6JW2L7UV.js → chunk-SKGUS2CB.js} +11 -11
  72. package/dist/{chunk-NHT7RHAI.js → chunk-TD6DN5LU.js} +3 -3
  73. package/dist/{chunk-TFR6S7ZB.js → chunk-TUEEGFAQ.js} +10 -10
  74. package/dist/{chunk-ZWWU7COR.js → chunk-TUSIYONR.js} +1 -1
  75. package/dist/{chunk-UCDCPQXU.js → chunk-TW2V2IQ4.js} +1 -1
  76. package/dist/{chunk-GTKR2YEZ.js → chunk-UCUBQWJC.js} +1 -1
  77. package/dist/{chunk-EI6JYZ42.js → chunk-UUSSRXUJ.js} +3 -3
  78. package/dist/{chunk-OPGF3FUY.js → chunk-VRWZNI6U.js} +2 -2
  79. package/dist/{chunk-B3ILHK4Q.js → chunk-VU5PPWIQ.js} +8 -8
  80. package/dist/{chunk-LA5UO6LI.js → chunk-WH2QUYXH.js} +5 -4
  81. package/dist/{chunk-HW7QPCOP.js → chunk-WVMKXDOW.js} +148 -53
  82. package/dist/{chunk-LLVBDIQJ.js → chunk-XAR2CJFV.js} +7 -7
  83. package/dist/{chunk-BFWZGLUU.js → chunk-XCTE5S2C.js} +1 -1
  84. package/dist/{chunk-NR3FDUWS.js → chunk-XFODM3V7.js} +7 -7
  85. package/dist/{chunk-BDTFO5S7.js → chunk-XFU37HIM.js} +3 -3
  86. package/dist/{chunk-Q6ANHBJK.js → chunk-YO2NPS66.js} +1 -1
  87. package/dist/chunk-YOAJLD2D.js +270 -0
  88. package/dist/{chunk-MMSFADKC.js → chunk-YZQYTOCR.js} +1 -1
  89. package/dist/{claude-launcher-YDSG5XIN.js → claude-launcher-WMIUTAXY.js} +8 -8
  90. package/dist/{cli-7VKJRQWW.js → cli-R5SJT3YL.js} +233 -156
  91. package/dist/{cli-update-notice-AWYJ4A7R.js → cli-update-notice-OC4SOSZE.js} +2 -2
  92. package/dist/{command-3WAJBJWX.js → command-LWMX6I7W.js} +55 -54
  93. package/dist/{config-O2LJAZJZ.js → config-ZRGYLVDX.js} +13 -13
  94. package/dist/{connect-cmd-3DBWVCUL.js → connect-cmd-MZXTWM4R.js} +15 -15
  95. package/dist/{container-start-T4GH4WLX.js → container-start-VQR5ERZE.js} +53 -52
  96. package/dist/{context-cleanup-Z23RX7JT.js → context-cleanup-Z3HZZZXW.js} +5 -5
  97. package/dist/{context-show-cmd-OGRCR5OT.js → context-show-cmd-SCOVPVDM.js} +16 -16
  98. package/dist/{control-plane-launch-JZPULKCL.js → control-plane-launch-MWZHJ4G5.js} +16 -16
  99. package/dist/{demo-record-cmd-YPWPHDAN.js → demo-record-cmd-4RVSWVMK.js} +9 -9
  100. package/dist/{demo-voice-cmd-TNZ2G5CJ.js → demo-voice-cmd-PGM5JPCQ.js} +24 -24
  101. package/dist/{dist-OMJJT636.js → dist-XEPPXF4M.js} +2 -2
  102. package/dist/docker-25F2KOBJ.js +20 -0
  103. package/dist/{doctor-KHAB6YWH.js → doctor-3QJLCHQY.js} +55 -54
  104. package/dist/emit-artifact-cmd-Z4SHPKFT.js +44 -0
  105. package/dist/{emit-cmd-3YOUQCID.js → emit-cmd-NHMZ4M5S.js} +8 -8
  106. package/dist/emit-criteria-cmd-HCN3DOJM.js +35 -0
  107. package/dist/{emit-demo-cmd-3UBPYRAM.js → emit-demo-cmd-NOSQTOES.js} +24 -24
  108. package/dist/emit-finding-cmd-YXR3ZVCJ.js +36 -0
  109. package/dist/{emit-result-cmd-KRUV7V74.js → emit-result-cmd-Z7MBE37R.js} +22 -22
  110. package/dist/emit-step-cmd-JOSYDSEO.js +35 -0
  111. package/dist/{exec-client-WJLO2KWS.js → exec-client-SZRXXKJ5.js} +9 -9
  112. package/dist/find-unit-3RHC4375.js +24 -0
  113. package/dist/{findings-cmd-3JP4GYD3.js → findings-cmd-NGFY25WZ.js} +20 -20
  114. package/dist/{fleet-readiness-U4IZZV52.js → fleet-readiness-NWIVQQ4P.js} +16 -16
  115. package/dist/governing-source-DNWVPRXP.js +41 -0
  116. package/dist/guest-init-T7QJW2AJ.js +20 -0
  117. package/dist/{hook-fast-2ENS5AKU.js → hook-fast-ECQBMESE.js} +3 -3
  118. package/dist/{hook-install-JTYPE5ZQ.js → hook-install-MBMG3G6B.js} +5 -5
  119. package/dist/host-checks-EHSA6FLE.js +80 -0
  120. package/dist/host-key-6SMJUTJ2.js +18 -0
  121. package/dist/{image-tag-EX2R462S.js → image-tag-OCVY4W5D.js} +9 -9
  122. package/dist/index.js +4 -4
  123. package/dist/{init-7F2KP6XU.js → init-ETG7XYFQ.js} +51 -50
  124. package/dist/init-F7NB7GBW.js +80 -0
  125. package/dist/{init-agent-RJSMNEWD.js → init-agent-WEYGBAII.js} +51 -50
  126. package/dist/{init-cmd-F72BWVFC.js → init-cmd-KGM7TN6Z.js} +29 -29
  127. package/dist/{init-update-ZWSICDTJ.js → init-update-EUJ4264S.js} +26 -26
  128. package/dist/install-cmd-HWG6LJX5.js +21 -0
  129. package/dist/{layout-4FLIBRPO.js → layout-CGE4KWGO.js} +5 -5
  130. package/dist/{login-browser-ZEOXKIQ2.js → login-browser-G7WNR74C.js} +2 -2
  131. package/dist/{logs-BWGJ2BVT.js → logs-TKWJ4S4W.js} +8 -8
  132. package/dist/loop-K3QREUHK.js +90 -0
  133. package/dist/machine-5GTYN2LP.js +80 -0
  134. package/dist/{machine-skills-UEQA3AUX.js → machine-skills-CXA57QHE.js} +5 -5
  135. package/dist/{mcp-install-cmd-DBKKGLHW.js → mcp-install-cmd-6IGK65DV.js} +5 -5
  136. package/dist/{mcp-serve-cmd-LFXU5UGJ.js → mcp-serve-cmd-DVE5XP2U.js} +11 -11
  137. package/dist/{paths-CSZZQK3X.js → paths-VOWYUJLZ.js} +8 -8
  138. package/dist/pending-35ML3JE5.js +18 -0
  139. package/dist/{pidfile-TTIUEDXW.js → pidfile-MFP6B2KV.js} +9 -9
  140. package/dist/{record-U7DU6IVT.js → record-AWCJ3LTG.js} +9 -9
  141. package/dist/{relay-KZTGUSFJ.js → relay-YVZM5M6B.js} +6 -6
  142. package/dist/{relay-protocol-LG4J5K63.js → relay-protocol-MNWITORT.js} +6 -6
  143. package/dist/run-cmd-MBH5Z2UL.js +114 -0
  144. package/dist/{runner-agents-32J743FJ.js → runner-agents-L3PLYFWJ.js} +5 -5
  145. package/dist/runner-env-IHWYZ3B6.js +24 -0
  146. package/dist/{runner-identity-VQCIKNBK.js → runner-identity-E2XKIJNB.js} +11 -11
  147. package/dist/{runner-key-TFFPQCGE.js → runner-key-3AHJX75Z.js} +51 -50
  148. package/dist/session-sender-IS6S7PBC.js +44 -0
  149. package/dist/{spec-cmd-RQFIJ75J.js → spec-cmd-ZLDYL4N5.js} +21 -21
  150. package/dist/{starter-pack-LO3D6CPP.js → starter-pack-XINCCMDN.js} +6 -6
  151. package/dist/state-NIA6XT7D.js +18 -0
  152. package/dist/{status-KGZWBU26.js → status-GZ7KAIMH.js} +51 -50
  153. package/dist/{sync-cmd-4RSCWFAF.js → sync-cmd-3YZ4IB3T.js} +22 -22
  154. package/dist/update-steps-XY46I7FV.js +81 -0
  155. package/dist/{watch-NH5QZJLE.js → watch-LIIODJ5U.js} +22 -22
  156. package/dist/{work-claim-cmd-FNE2ZMVG.js → work-claim-cmd-GWBWIZ43.js} +25 -25
  157. package/dist/work-cmd-CJWTGOU5.js +33 -0
  158. package/dist/work-comment-cmd-RFVCNEET.js +39 -0
  159. package/dist/{work-demo-cmd-56C6JQD3.js → work-demo-cmd-Q2GKJCVL.js} +18 -18
  160. package/dist/{work-launch-LWDQXLGI.js → work-launch-ODTGCNJC.js} +1 -1
  161. package/dist/{work-logs-cmd-XKVZ2UY6.js → work-logs-cmd-KZQBPU2J.js} +18 -18
  162. package/dist/{work-needs-attention-cmd-DYD3AIRU.js → work-needs-attention-cmd-L3DOYAMK.js} +18 -18
  163. package/dist/{work-no-change-cmd-QVD67UG5.js → work-no-change-cmd-SHP25CJB.js} +18 -18
  164. package/dist/{work-open-pr-cmd-3SSJPKHW.js → work-open-pr-cmd-VATPLVSL.js} +20 -20
  165. package/dist/work-pr-cmd-XBLNONT3.js +34 -0
  166. package/dist/work-proofs-cmd-T5WZG3CX.js +37 -0
  167. package/dist/{work-proofs-record-KEZ6Z4QH.js → work-proofs-record-6YF4BS3K.js} +28 -28
  168. package/dist/{work-stop-cmd-4KNMURDC.js → work-stop-cmd-BLOSL24H.js} +18 -18
  169. package/package.json +2 -2
  170. package/skill-pack/maintained/outerlayer-amend/SKILL.md +1 -0
  171. package/skill-pack/maintained/outerlayer-amend/references/attachments.md +23 -0
  172. package/skill-pack/maintained/outerlayer-build/SKILL.md +5 -0
  173. package/skill-pack/maintained/outerlayer-cli/SKILL.md +9 -0
  174. package/skill-pack/maintained/outerlayer-run/SKILL.md +49 -0
  175. package/skill-pack/shipped.json +2 -0
  176. package/skill-pack/template/spec/SKILL.md +10 -11
  177. package/skill-pack/template/writing-specs/SKILL.md +18 -22
  178. package/dist/agent-setup-MLSWF7RF.js +0 -40
  179. package/dist/caller-VU7QBFHQ.js +0 -23
  180. package/dist/chunk-UNA4YIHE.js +0 -128
  181. package/dist/docker-MOESJVCB.js +0 -20
  182. package/dist/emit-artifact-cmd-W7YBXLA7.js +0 -44
  183. package/dist/emit-criteria-cmd-KZW275Q2.js +0 -35
  184. package/dist/emit-finding-cmd-NL6H2PBJ.js +0 -36
  185. package/dist/emit-step-cmd-SHBIO2JI.js +0 -35
  186. package/dist/find-unit-YNIILXQK.js +0 -24
  187. package/dist/governing-source-VZFU65KP.js +0 -41
  188. package/dist/guest-init-HIKD3MHJ.js +0 -20
  189. package/dist/host-checks-HZLHQ6WH.js +0 -79
  190. package/dist/host-key-V2VVCBGR.js +0 -18
  191. package/dist/init-XTTWPX6J.js +0 -79
  192. package/dist/install-cmd-LX76Y7NB.js +0 -21
  193. package/dist/loop-O5JBFZXP.js +0 -90
  194. package/dist/machine-LGJSYGQS.js +0 -79
  195. package/dist/pending-BHRSEFXV.js +0 -18
  196. package/dist/runner-env-RGYTHURZ.js +0 -24
  197. package/dist/session-sender-3VFTMIM3.js +0 -44
  198. package/dist/state-IH6JOEJZ.js +0 -18
  199. package/dist/update-steps-3LU3NZQL.js +0 -80
  200. package/dist/work-cmd-32J5UQJO.js +0 -33
  201. package/dist/work-comment-cmd-ZUZEAIIH.js +0 -38
  202. package/dist/work-pr-cmd-DF6Q5XHU.js +0 -34
  203. package/dist/work-proofs-cmd-2XWS5N2R.js +0 -37
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { defaultAgents, laptopAgents, contextAgents, userSkillFolderIn, loadMachineSkillFiles, resolvePackRoot } from './chunk-OKELGJNN.js';
4
- import { MAINTAINED_SKILLS, maintainedLineVersion } from './chunk-CDDED64E.js';
3
+ import { defaultAgents, laptopAgents, contextAgents, userSkillFolderIn, loadMachineSkillFiles, resolvePackRoot } from './chunk-MT4XF5OL.js';
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';
7
7
  import { randomBytes } from 'crypto';
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { BUILD_HOME } from './chunk-QP6SPQU5.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-PM4YDVAX.js';
4
- import { removeRetiredSkills } from './chunk-UCDCPQXU.js';
5
- import { defaultFetch, resolveGatewayCredentials } from './chunk-OPGF3FUY.js';
6
- import { withTokenHeader } from './chunk-QP6SPQU5.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-OKELGJNN.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,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { helperSocketPath } from './chunk-HW7QPCOP.js';
4
- import { UNIT_MARKER } from './chunk-4K2EMRJP.js';
5
- import { runnerDir } from './chunk-LO3PSFNT.js';
3
+ import { helperSocketPath } from './chunk-WVMKXDOW.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
 
@@ -4,7 +4,7 @@ import { createRequire } from 'node:module';
4
4
  createRequire(import.meta.url);
5
5
 
6
6
  // src/maintained-line.ts
7
- var MAINTAINED_SKILLS = ["outerlayer-evidence", "outerlayer-amend", "outerlayer-findings", "outerlayer-cli", "outerlayer-build"];
7
+ var MAINTAINED_SKILLS = ["outerlayer-evidence", "outerlayer-amend", "outerlayer-findings", "outerlayer-cli", "outerlayer-build", "outerlayer-run"];
8
8
  var MAINTAINED_LINE_VERSION = /^<!-- maintained by OuterLayer (\S+?)\. /m;
9
9
  function maintainedLineVersion(text) {
10
10
  return MAINTAINED_LINE_VERSION.exec(text)?.[1];
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { currentLink } from './chunk-X45WDWSV.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-KIYP5TML.js';
4
- import { autoConnect } from './chunk-BDTFO5S7.js';
5
- import { workPageUrl } from './chunk-KFHF3GBH.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-OPGF3FUY.js';
9
- import { signRunnerRequest } from './chunk-RVYMYTXX.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-2ENS5AKU.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-OKELGJNN.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-ZWWU7COR.js';
4
- import { VALIDATOR_FILES, VALIDATORS_DIR, POLICY_PATH, POLICY_CONTENT } from './chunk-HGWDBTQ3.js';
5
- import { skillsBaseFor } from './chunk-Q6ANHBJK.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-TNAUQADA.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-OKELGJNN.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,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { readLaunchSpoolState, launchesPath } from './chunk-4OD45RBP.js';
3
+ import { readLaunchSpoolState, launchesPath } from './chunk-LGJ56FCM.js';
4
4
 
5
5
  createRequire(import.meta.url);
6
6
 
@@ -40,7 +40,8 @@ var LaunchFilter = class {
40
40
  }
41
41
  inScope(facts) {
42
42
  if (this.build !== void 0) {
43
- return facts !== void 0 && facts.item === this.build.item && (facts.job === void 0 || facts.job === this.build.jobDir);
43
+ if (facts === void 0 || facts.job !== void 0 && facts.job !== this.build.jobDir) return false;
44
+ return this.build.run === void 0 ? facts.run === void 0 && facts.item === this.build.item : facts.run === this.build.run;
44
45
  }
45
46
  return facts?.job === void 0;
46
47
  }
@@ -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-RMXRQ3OC.js';
4
- import { currentVersion, currentLink, versionDir, execStartLine, isInLayout, packageRootIn, switchCurrent } from './chunk-X45WDWSV.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-LO3PSFNT.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,26 +1,26 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { uploadSpooledSteps } from './chunk-T63WTVGY.js';
4
- import { LaunchFilter } from './chunk-WGC7UFRM.js';
5
- import { migrateLegacyArtifactSidecars, planArtifactUpload, artifactsStatePath, sanitizeTerminal, acquireArtifactSpoolLock, artifactBlobsDir, resolveArtifactTurnIndex, isArtifactTombstoned, ARTIFACT_RETRY_MAX_AGE_MS, writeArtifactSpoolState, reclaimUnneededArtifactBlobs, neededArtifactShas } from './chunk-2DVQHK37.js';
3
+ import { uploadSpooledSteps } from './chunk-6XROZIV6.js';
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-B5Z4VA4Q.js';
6
6
  import { C } from './chunk-2AM6Z5BP.js';
7
- import { cliFetch, resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-OPGF3FUY.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-RVYMYTXX.js';
10
- import { SCRUB_ENV_VARIABLE } from './chunk-QP6SPQU5.js';
11
- import { writeSyncStatus, logHookError, spoolDir } from './chunk-D7KYG37D.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';
15
15
  import { applyReportedCost } from './chunk-BKO6JEZI.js';
16
- import { readLaunchSpoolState, launchStatusIsDecisive, launchedItemsBySession, launchesPath } from './chunk-4OD45RBP.js';
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-OKELGJNN.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';
@@ -935,8 +935,9 @@ function mightStillShip(verdict) {
935
935
 
936
936
  // src/sync-cmd.ts
937
937
  var ITEM_KEY_PREFIX = "olitem_";
938
+ var RUN_KEY_PREFIX = "olrun_";
938
939
  function isItemKey(token) {
939
- return token.startsWith(ITEM_KEY_PREFIX);
940
+ return token.startsWith(ITEM_KEY_PREFIX) || token.startsWith(RUN_KEY_PREFIX);
940
941
  }
941
942
  function isLoopbackUrl(url) {
942
943
  try {
@@ -1156,8 +1157,18 @@ async function runSyncInner(opts, stats) {
1156
1157
  const launchSpool = readLaunchSpoolState(home);
1157
1158
  const launchedSessionIds = launchSpool.ids;
1158
1159
  const launchFilter = new LaunchFilter(launchedSessionIds);
1159
- const itemScope = resolved.credential !== void 0 && isItemKey(resolved.credential) ? { item: parseWorkItemNumber(envVars.OUTERLAYER_WORK), sessionItems: launchedItemsBySession(home) } : void 0;
1160
- const inItemScope = (sessionId) => itemScope === void 0 || itemScope.item !== void 0 && itemScope.sessionItems.get(sessionId) === itemScope.item;
1160
+ const runScoped = resolved.credential !== void 0 && isItemKey(resolved.credential) && (resolved.credential.startsWith(RUN_KEY_PREFIX) || envVars.OUTERLAYER_WORK === void 0);
1161
+ const parsedRun = runScoped ? parseRunEnv(envVars.OUTERLAYER_RUN) : void 0;
1162
+ const itemScope = resolved.credential !== void 0 && isItemKey(resolved.credential) ? {
1163
+ item: runScoped ? void 0 : parseWorkItemNumber(envVars.OUTERLAYER_WORK),
1164
+ run: parsedRun !== void 0 && "run" in parsedRun ? parsedRun.run : void 0,
1165
+ sessionItems: launchedItemsBySession(home)
1166
+ } : void 0;
1167
+ const inItemScope = (sessionId) => {
1168
+ if (itemScope === void 0) return true;
1169
+ if (runScoped) return itemScope.run !== void 0 && launchSpool.records.get(sessionId)?.run === itemScope.run;
1170
+ return itemScope.item !== void 0 && itemScope.sessionItems.get(sessionId) === itemScope.item;
1171
+ };
1161
1172
  const connectionScoped = resolved.kind === "login" && opts.appId === void 0 && !envVars.OUTERLAYER_APP_ID;
1162
1173
  const runNowMs = Date.now();
1163
1174
  const launchSkipVerdict = (mtimeMs) => unlaunchedVerdict({ launchStatusDecisive: launchStatusIsDecisive(launchSpool), idleMs: runNowMs - mtimeMs });
@@ -1900,7 +1911,7 @@ ${C.yellow}!${C.reset} batch ${shippedBatches + 1}/${batches.length} accounting
1900
1911
  }
1901
1912
  }
1902
1913
  releaseArtifactLock();
1903
- const stepPass = await uploadSpooledSteps({
1914
+ const stepPass = runScoped ? void 0 : await uploadSpooledSteps({
1904
1915
  home,
1905
1916
  url,
1906
1917
  apiKey,
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { builtinKind, keepsHostBuilder } from './chunk-KX4JKW4Z.js';
4
- import { parseSize } from './chunk-2J3X2Z4F.js';
5
- import { runnerDir } from './chunk-LO3PSFNT.js';
6
- import { FD_SLOTS_PER_BUILD, FD_STORE_ENV, BUILD_SLICE_MEMORY_ENV, credentialLineIn, withoutCredentialLines } from './chunk-LA5UO6LI.js';
7
- import { credentialAgent, credentialNames, credentialForms } from './chunk-GTKR2YEZ.js';
8
- import { defaultAgents } from './chunk-OKELGJNN.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,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-LO3PSFNT.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-LO3PSFNT.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-4K2EMRJP.js';
4
- import { RUNNER_FILE_MODE } from './chunk-LO3PSFNT.js';
5
- import { parseRunnerEnv, withoutCredentialLines } from './chunk-LA5UO6LI.js';
6
- import { headlessNames, runnerAgentNamed, credentialAgent, orList, credentialShapes, runnerAgents, credentialForms, credentialEnvPath, forwardedVariables } from './chunk-GTKR2YEZ.js';
7
- import { defaultAgents } from './chunk-OKELGJNN.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-4LUHKCDO.js';
4
- import { spoolDir } from './chunk-D7KYG37D.js';
5
- import { parseWorkItemEnv } from './chunk-4OD45RBP.js';
6
- import { sessionFolderIn, legacyAgent } from './chunk-OKELGJNN.js';
3
+ import { LiveUploader } from './chunk-CXXQQST7.js';
4
+ import { spoolDir } from './chunk-QGUCHNSQ.js';
5
+ import { parseRunEnv, parseWorkItemEnv } from './chunk-LGJ56FCM.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
 
@@ -18,11 +18,13 @@ function senderPidfile(home, item) {
18
18
  async function startSessionSender(opts = {}) {
19
19
  const env = opts.env ?? process.env;
20
20
  const stderr = opts.stderr ?? ((s) => void process.stderr.write(s));
21
- const parsed = parseWorkItemEnv(env.OUTERLAYER_WORK);
21
+ const run = env.OUTERLAYER_WORK === void 0 ? parseRunEnv(env.OUTERLAYER_RUN) : void 0;
22
+ const parsed = run ?? parseWorkItemEnv(env.OUTERLAYER_WORK);
22
23
  const jobDir = env.OUTERLAYER_JOB_DIR;
23
24
  if ("reason" in parsed || !jobDir) {
24
25
  throw new Error("a session sender runs inside a runner job: OUTERLAYER_WORK must name the item and OUTERLAYER_JOB_DIR the job");
25
26
  }
27
+ const scope = "run" in parsed ? { run: parsed.run, jobDir } : { item: parsed.number, jobDir };
26
28
  const home = opts.home ?? homeFromEnv(env);
27
29
  const uploader = new LiveUploader({
28
30
  home,
@@ -31,7 +33,7 @@ async function startSessionSender(opts = {}) {
31
33
  sleepImpl: opts.sleepImpl,
32
34
  debounceMs: opts.debounceMs,
33
35
  stderr,
34
- build: { item: parsed.number, jobDir },
36
+ build: scope,
35
37
  onUnauthorized: opts.onFatal,
36
38
  agents: opts.agents
37
39
  });
@@ -41,7 +43,7 @@ async function startSessionSender(opts = {}) {
41
43
  `);
42
44
  };
43
45
  const daemon = new CaptureDaemon({ root: opts.root ?? sessionFolderIn(home, legacyAgent(opts.agents).descriptor), watchOnly: true, rescanMs: RESCAN_MS, onLog });
44
- const pidfile = senderPidfile(home, parsed.number);
46
+ const pidfile = senderPidfile(home, "run" in parsed ? parsed.run : parsed.number);
45
47
  try {
46
48
  mkdirSync(spoolDir(home), { recursive: true });
47
49
  writeFileSync(pidfile, String(process.pid));
@@ -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-OKELGJNN.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-LO3PSFNT.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
 
@@ -1,26 +1,26 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { checkStarterFiles, contextIsGoverned } from './chunk-LIMJRKIU.js';
4
- import { resolveCredentials, getJson, WorkCommandError } from './chunk-7TM2E4RI.js';
5
- import { fleetCheck, checkBuildSkill, checkMachineSkills, checkCommittedMaintainedSkills, checkMaintainedReferences, checkIgnoredSkillFolders } from './chunk-Z4R73UUH.js';
6
- import { withInjectedPrograms } from './chunk-22QIA7SH.js';
7
- import { isLinkedRepository } from './chunk-KFHF3GBH.js';
8
- import { sanitizeTerminal } from './chunk-2DVQHK37.js';
3
+ import { checkStarterFiles, contextIsGoverned } from './chunk-BTH6HTE5.js';
4
+ import { resolveCredentials, getJson, WorkCommandError } from './chunk-B4U5XI4F.js';
5
+ import { fleetCheck, checkBuildSkill, checkMachineSkills, checkCommittedMaintainedSkills, checkMaintainedReferences, checkIgnoredSkillFolders } from './chunk-PA6FKP5B.js';
6
+ import { withInjectedPrograms } from './chunk-47JRSV6Y.js';
7
+ import { isLinkedRepository } from './chunk-QFQ2UNZU.js';
8
+ import { sanitizeTerminal } from './chunk-B5Z4VA4Q.js';
9
9
  import { C } from './chunk-2AM6Z5BP.js';
10
- import { checkFormerSkillNames } from './chunk-UCDCPQXU.js';
11
- import { resolveGatewayCredentials, defaultFetch } from './chunk-OPGF3FUY.js';
12
- import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-D7KYG37D.js';
10
+ import { checkFormerSkillNames } from './chunk-TW2V2IQ4.js';
11
+ import { resolveGatewayCredentials, defaultFetch } from './chunk-VRWZNI6U.js';
12
+ import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-QGUCHNSQ.js';
13
13
  import { CONTROL_PLANE_DIR_VARIABLE } from './chunk-SF2TBJBP.js';
14
14
  import { findGitDirs } from './chunk-BJ3KTMDH.js';
15
15
  import { readStatuslineState, STATE_FRESH_MS } from './chunk-M53UNEO6.js';
16
16
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
17
- import { installAgents, withSettingsText } from './chunk-H3YHAO7L.js';
17
+ import { installAgents, withSettingsText } from './chunk-GJMLLXZJ.js';
18
18
  import { cliForInstall, cliBinResolvable } from './chunk-ZHQC43NH.js';
19
19
  import { readDeliveryRecord, readDegraded, readSourceCache } from './chunk-YQR6E6OV.js';
20
20
  import { deadHooksState, preparePackageManagerCommand } from './chunk-CJPTUU2E.js';
21
- import { defaultAgents, legacyAgent, contextAgents } from './chunk-OKELGJNN.js';
21
+ import { defaultAgents, legacyAgent, contextAgents } from './chunk-MT4XF5OL.js';
22
22
  import { homeFromEnv } from './chunk-352DHUTP.js';
23
- import { SUPPORTED_VERSIONS, resolveRepoIdentity } from './chunk-N2QYP3NQ.js';
23
+ import { SUPPORTED_VERSIONS, resolveRepoIdentity } from './chunk-MBPBYMHU.js';
24
24
  import { readFileSync, mkdirSync, writeFileSync, renameSync, existsSync, accessSync, constants, statSync } from 'fs';
25
25
  import { sep, join, dirname, resolve, delimiter } from 'path';
26
26
  import { execFileSync } from 'child_process';
@@ -1051,8 +1051,8 @@ function doctorExitCode(checks) {
1051
1051
 
1052
1052
  // src/doctor-report.ts
1053
1053
  async function gatherDoctorChecks(options = {}) {
1054
- const { DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK } = await import('./build-disk-TYX6DU5R.js');
1055
- const { defaultRunnerConfigPath, hasRunnerBlock, keyRunnerFactory, loadRunnerConfig, runnerVmOf } = await import('./config-O2LJAZJZ.js');
1054
+ const { DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK } = await import('./build-disk-M2JYJF6R.js');
1055
+ const { defaultRunnerConfigPath, hasRunnerBlock, keyRunnerFactory, loadRunnerConfig, runnerVmOf } = await import('./config-ZRGYLVDX.js');
1056
1056
  const configPath = options.configPath ?? defaultRunnerConfigPath();
1057
1057
  const runnerHost = hasRunnerBlock(configPath);
1058
1058
  const hooks = (() => {
@@ -1080,7 +1080,7 @@ async function gatherDoctorChecks(options = {}) {
1080
1080
  const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
1081
1081
  checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
1082
1082
  } else if (hasRunnerBlock(configPath)) {
1083
- const { runnerHostChecks } = await import('./doctor-KHAB6YWH.js');
1083
+ const { runnerHostChecks } = await import('./doctor-3QJLCHQY.js');
1084
1084
  const gateway = (() => {
1085
1085
  try {
1086
1086
  const loaded = loadRunnerConfig(configPath);
@@ -1108,7 +1108,7 @@ async function gatherDoctorChecks(options = {}) {
1108
1108
  const service = await (async () => {
1109
1109
  const { existsSync: existsSync3 } = await import('fs');
1110
1110
  if (process.platform !== "linux" || !existsSync3("/run/systemd/system")) return void 0;
1111
- const { inspectRunnerService } = await import('./find-unit-YNIILXQK.js');
1111
+ const { inspectRunnerService } = await import('./find-unit-3RHC4375.js');
1112
1112
  return inspectRunnerService(configPath);
1113
1113
  })();
1114
1114
  checks.push(...await runnerHostChecks({ configPath, hooks, gateway, repos, runner, service }));