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

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 (175) hide show
  1. package/README.md +14 -2
  2. package/dist/{agent-setup-MLSWF7RF.js → agent-setup-F4KAKOQE.js} +19 -19
  3. package/dist/{agent-subcommand-DCOPM2NX.js → agent-subcommand-JC5JXZ3X.js} +3 -3
  4. package/dist/{bridge-HZRJYECQ.js → bridge-TYO2YB2X.js} +6 -6
  5. package/dist/{build-3LXKCCJF.js → build-QUCL3HFM.js} +12 -12
  6. package/dist/{build-disk-TYX6DU5R.js → build-disk-3JUHPJEQ.js} +10 -10
  7. package/dist/build-info.json +1 -1
  8. package/dist/{builder-VYKWHAUQ.js → builder-PADLK3VJ.js} +9 -9
  9. package/dist/caller-LYH64TZB.js +23 -0
  10. package/dist/{check-BLT4S3D2.js → check-DBYJIP44.js} +56 -56
  11. package/dist/{chunk-DEWD22FA.js → chunk-26NMJGEY.js} +1 -1
  12. package/dist/{chunk-LA5UO6LI.js → chunk-2BMH3373.js} +5 -4
  13. package/dist/{chunk-JAURZKSE.js → chunk-2TA2Z5IJ.js} +5 -5
  14. package/dist/{chunk-ZGJF4OPI.js → chunk-2YOFSE7U.js} +190 -58
  15. package/dist/{chunk-OKELGJNN.js → chunk-3Q2SEOT3.js} +1 -1
  16. package/dist/{chunk-MMSFADKC.js → chunk-3QTC4UWC.js} +1 -1
  17. package/dist/{chunk-C3K54KRU.js → chunk-4A4TMFGV.js} +5 -5
  18. package/dist/{chunk-F3MEL6B6.js → chunk-4NRIC2G5.js} +4 -4
  19. package/dist/{chunk-4K2EMRJP.js → chunk-52IVBUIU.js} +6 -6
  20. package/dist/{chunk-LYWLBZ37.js → chunk-553QW3PJ.js} +2 -2
  21. package/dist/{chunk-NHT7RHAI.js → chunk-5AU2GQGH.js} +3 -3
  22. package/dist/{chunk-EGKYININ.js → chunk-5J4WME44.js} +5 -5
  23. package/dist/{chunk-G7TP233H.js → chunk-6L55K352.js} +7 -7
  24. package/dist/{chunk-OPGF3FUY.js → chunk-6ZMFEZ2K.js} +2 -2
  25. package/dist/{chunk-SLR6QAOE.js → chunk-7HN6T4MY.js} +1 -1
  26. package/dist/{chunk-LOG4LBUY.js → chunk-7NP5G2FV.js} +2 -2
  27. package/dist/{chunk-UVL27UZW.js → chunk-A237UPRS.js} +14 -14
  28. package/dist/{chunk-CDDED64E.js → chunk-ATEMEVFF.js} +1 -1
  29. package/dist/{chunk-GVK7AKFX.js → chunk-AZRZBG45.js} +9 -7
  30. package/dist/{chunk-RGHHH3K5.js → chunk-BAWOWJ3G.js} +10 -10
  31. package/dist/{chunk-WGC7UFRM.js → chunk-C2PZOLN7.js} +3 -2
  32. package/dist/{chunk-Q6ANHBJK.js → chunk-C7YFAPMY.js} +1 -1
  33. package/dist/{chunk-TTG6Y7G7.js → chunk-DE5QLWJK.js} +2 -2
  34. package/dist/{chunk-X45WDWSV.js → chunk-DPBFNZ6H.js} +1 -1
  35. package/dist/{chunk-EI6JYZ42.js → chunk-DQLHVV62.js} +3 -3
  36. package/dist/{chunk-LIMJRKIU.js → chunk-EYFIWJFI.js} +5 -5
  37. package/dist/{chunk-U463IFDK.js → chunk-F3NW5TBW.js} +6 -6
  38. package/dist/{chunk-KIYP5TML.js → chunk-F4XMG7EO.js} +1 -1
  39. package/dist/{chunk-ZWWU7COR.js → chunk-FLIRUHVT.js} +1 -1
  40. package/dist/{chunk-2J3X2Z4F.js → chunk-G2J574LS.js} +7 -7
  41. package/dist/{chunk-2XEQCSCQ.js → chunk-GH5Y3R5R.js} +4 -4
  42. package/dist/{chunk-UCDCPQXU.js → chunk-HITUWIB7.js} +1 -1
  43. package/dist/{chunk-6EN72I2O.js → chunk-HT4OKJDB.js} +1 -1
  44. package/dist/{chunk-IG5ZZG7R.js → chunk-HWHJDQLC.js} +3 -3
  45. package/dist/{chunk-NFZMENCY.js → chunk-I45HTSSA.js} +1 -1
  46. package/dist/{chunk-4EQQS3VJ.js → chunk-IJWQT2Y7.js} +1 -1
  47. package/dist/{chunk-BDTFO5S7.js → chunk-IPB5UOHH.js} +2 -2
  48. package/dist/{chunk-5OBQBINA.js → chunk-IXC5EISR.js} +1 -1
  49. package/dist/{chunk-RVYMYTXX.js → chunk-JLCEQXQF.js} +1 -1
  50. package/dist/{chunk-7N75UQ3J.js → chunk-KGHVJI7V.js} +3 -3
  51. package/dist/{chunk-4LUHKCDO.js → chunk-KHC7ICRR.js} +23 -12
  52. package/dist/{chunk-4OD45RBP.js → chunk-LGJ56FCM.js} +11 -2
  53. package/dist/{chunk-GECHL3NC.js → chunk-LJPYKCIP.js} +4 -4
  54. package/dist/{chunk-CCEP5WBI.js → chunk-MGOEHY72.js} +13 -11
  55. package/dist/{chunk-OYBBYENC.js → chunk-NAU7U44X.js} +6 -6
  56. package/dist/{chunk-Z4R73UUH.js → chunk-NL2MMRJI.js} +6 -6
  57. package/dist/{chunk-LO3PSFNT.js → chunk-O7IJBJ6Z.js} +1 -1
  58. package/dist/{chunk-RMXRQ3OC.js → chunk-OQHHPJNK.js} +1 -1
  59. package/dist/{chunk-HGWDBTQ3.js → chunk-P43BSQGV.js} +3 -3
  60. package/dist/{chunk-JMWCPEKP.js → chunk-PCY626FL.js} +2 -2
  61. package/dist/{chunk-JKRVSEK7.js → chunk-PE5J46EE.js} +8 -8
  62. package/dist/{chunk-DYHDUG2S.js → chunk-QA3U3MJZ.js} +129 -42
  63. package/dist/{chunk-7TM2E4RI.js → chunk-QZP3O6IM.js} +6 -6
  64. package/dist/{chunk-MLM4BYK2.js → chunk-RN5VLKZ2.js} +1 -1
  65. package/dist/{chunk-GC7CAT2N.js → chunk-SKKKPLOC.js} +3 -3
  66. package/dist/{chunk-D7KYG37D.js → chunk-SOLQ3JA6.js} +19 -8
  67. package/dist/{chunk-UNA4YIHE.js → chunk-SWXAP4GM.js} +4 -4
  68. package/dist/{chunk-X56UUEHE.js → chunk-TYLZR7HX.js} +12 -3
  69. package/dist/{chunk-QP6SPQU5.js → chunk-UU6FN6PZ.js} +5 -5
  70. package/dist/{chunk-H3YHAO7L.js → chunk-W37QA6WG.js} +1 -1
  71. package/dist/{chunk-LLVBDIQJ.js → chunk-WE4CWGNR.js} +7 -7
  72. package/dist/{chunk-KX4JKW4Z.js → chunk-WISVAUTD.js} +7 -4
  73. package/dist/{chunk-22QIA7SH.js → chunk-X3CGWGAG.js} +1 -1
  74. package/dist/{chunk-BFWZGLUU.js → chunk-XDHMRHMC.js} +1 -1
  75. package/dist/{chunk-DX27B42J.js → chunk-XLUQC2PE.js} +1 -1
  76. package/dist/{chunk-LIH6CIVB.js → chunk-XMVASSUZ.js} +1 -1
  77. package/dist/{chunk-TNAUQADA.js → chunk-XPXJWIOJ.js} +1 -1
  78. package/dist/{chunk-LCWUVQUI.js → chunk-Y2M2NZX4.js} +8 -8
  79. package/dist/{chunk-T63WTVGY.js → chunk-Y67NEZMW.js} +5 -5
  80. package/dist/{chunk-B3ILHK4Q.js → chunk-ZIOMM4LL.js} +5 -5
  81. package/dist/{chunk-KFHF3GBH.js → chunk-ZRTGX4GN.js} +3 -3
  82. package/dist/{chunk-GTKR2YEZ.js → chunk-ZUIHEOSC.js} +1 -1
  83. package/dist/{chunk-PM4YDVAX.js → chunk-ZZ4AX25R.js} +1 -1
  84. package/dist/{claude-launcher-YDSG5XIN.js → claude-launcher-UYCMHZOU.js} +6 -6
  85. package/dist/{cli-YZUSUBAY.js → cli-KEVUJ6PY.js} +193 -146
  86. package/dist/{cli-update-notice-AWYJ4A7R.js → cli-update-notice-OC4SOSZE.js} +2 -2
  87. package/dist/{command-5HL4C2VH.js → command-DNGERCQW.js} +51 -50
  88. package/dist/{config-O2LJAZJZ.js → config-M66C2AGN.js} +11 -11
  89. package/dist/{connect-cmd-3DBWVCUL.js → connect-cmd-JBM5ODV3.js} +11 -11
  90. package/dist/{container-start-4M2RTEIX.js → container-start-4NKXX3MA.js} +49 -48
  91. package/dist/{context-cleanup-Z23RX7JT.js → context-cleanup-UE5HQRHP.js} +3 -3
  92. package/dist/{context-show-cmd-OGRCR5OT.js → context-show-cmd-HX5LND6O.js} +12 -12
  93. package/dist/{control-plane-launch-JZPULKCL.js → control-plane-launch-XEMMZ7VZ.js} +14 -14
  94. package/dist/{demo-record-cmd-YPWPHDAN.js → demo-record-cmd-PI4PFFEO.js} +7 -7
  95. package/dist/{demo-voice-cmd-TNZ2G5CJ.js → demo-voice-cmd-3GASMSCU.js} +20 -20
  96. package/dist/{docker-MOESJVCB.js → docker-KWHEDC6K.js} +9 -9
  97. package/dist/{doctor-YB5GRCLW.js → doctor-GPATU5TY.js} +51 -50
  98. package/dist/{emit-artifact-cmd-W7YBXLA7.js → emit-artifact-cmd-OH7PNHZF.js} +19 -19
  99. package/dist/{emit-cmd-3YOUQCID.js → emit-cmd-RPICQ5H2.js} +6 -6
  100. package/dist/{emit-criteria-cmd-KZW275Q2.js → emit-criteria-cmd-JW2GS2SO.js} +16 -16
  101. package/dist/{emit-demo-cmd-3UBPYRAM.js → emit-demo-cmd-5W6H6AI4.js} +20 -20
  102. package/dist/{emit-finding-cmd-NL6H2PBJ.js → emit-finding-cmd-PSCJFCBZ.js} +16 -16
  103. package/dist/{emit-result-cmd-KRUV7V74.js → emit-result-cmd-VJZDDWD3.js} +18 -18
  104. package/dist/{emit-step-cmd-SHBIO2JI.js → emit-step-cmd-ER65MOU6.js} +16 -16
  105. package/dist/{exec-client-WJLO2KWS.js → exec-client-PHJ4YGYG.js} +7 -7
  106. package/dist/find-unit-D7MX5YW7.js +24 -0
  107. package/dist/{findings-cmd-3JP4GYD3.js → findings-cmd-BN6LO7LI.js} +16 -16
  108. package/dist/{fleet-readiness-U4IZZV52.js → fleet-readiness-FHVT7ZXE.js} +13 -13
  109. package/dist/governing-source-6WWMRJEI.js +41 -0
  110. package/dist/{guest-init-HIKD3MHJ.js → guest-init-IREU7IIE.js} +8 -8
  111. package/dist/{hook-fast-2ENS5AKU.js → hook-fast-OFCB6O5N.js} +3 -3
  112. package/dist/{hook-install-JTYPE5ZQ.js → hook-install-3SSLJYA3.js} +3 -3
  113. package/dist/host-checks-KYLKXG2A.js +80 -0
  114. package/dist/{host-key-V2VVCBGR.js → host-key-4764FB4U.js} +7 -7
  115. package/dist/{image-tag-EX2R462S.js → image-tag-MYCA26HL.js} +7 -7
  116. package/dist/index.js +4 -4
  117. package/dist/init-EPBASJNK.js +80 -0
  118. package/dist/{init-OSSS3TDT.js → init-RUY6NPTN.js} +47 -46
  119. package/dist/{init-agent-A257RKPJ.js → init-agent-Z6PF22UT.js} +47 -46
  120. package/dist/{init-cmd-KV24ZVEK.js → init-cmd-3M4QENFU.js} +25 -25
  121. package/dist/{init-update-ZWSICDTJ.js → init-update-V4AWGCUH.js} +22 -22
  122. package/dist/{install-cmd-LX76Y7NB.js → install-cmd-UJO2EMXF.js} +9 -9
  123. package/dist/{layout-4FLIBRPO.js → layout-VZ3MERWV.js} +3 -3
  124. package/dist/{logs-BWGJ2BVT.js → logs-SQJ5BKAP.js} +6 -6
  125. package/dist/loop-VUNIGNXU.js +90 -0
  126. package/dist/machine-2KFSAU27.js +80 -0
  127. package/dist/{machine-skills-UEQA3AUX.js → machine-skills-SAD5OWIH.js} +3 -3
  128. package/dist/{mcp-install-cmd-DBKKGLHW.js → mcp-install-cmd-7KKOGEFA.js} +3 -3
  129. package/dist/{mcp-serve-cmd-LFXU5UGJ.js → mcp-serve-cmd-EKANKY4W.js} +9 -9
  130. package/dist/{paths-CSZZQK3X.js → paths-LYF7UNWL.js} +6 -6
  131. package/dist/pending-3FQ3GG6T.js +18 -0
  132. package/dist/{pidfile-TTIUEDXW.js → pidfile-EYAULWL2.js} +7 -7
  133. package/dist/{record-U7DU6IVT.js → record-CHYO34BN.js} +7 -7
  134. package/dist/{relay-KZTGUSFJ.js → relay-J3OROVNN.js} +4 -4
  135. package/dist/{relay-protocol-LG4J5K63.js → relay-protocol-UI7QUDOZ.js} +4 -4
  136. package/dist/run-cmd-PIMQNBAX.js +114 -0
  137. package/dist/{runner-agents-32J743FJ.js → runner-agents-KSP3MLAH.js} +3 -3
  138. package/dist/{runner-env-RGYTHURZ.js → runner-env-AMGOE3UI.js} +13 -13
  139. package/dist/{runner-identity-VQCIKNBK.js → runner-identity-WZAKGBRX.js} +9 -9
  140. package/dist/{runner-key-OXEPM7UD.js → runner-key-HGHQYJJX.js} +47 -46
  141. package/dist/{session-sender-3VFTMIM3.js → session-sender-W6MTYKLE.js} +19 -19
  142. package/dist/{spec-cmd-RQFIJ75J.js → spec-cmd-RJVMWOOX.js} +17 -17
  143. package/dist/{starter-pack-LO3D6CPP.js → starter-pack-52PX6IPU.js} +4 -4
  144. package/dist/{state-IH6JOEJZ.js → state-UIV37NXY.js} +7 -7
  145. package/dist/{status-CA5BTEQ6.js → status-YQ25OCUL.js} +47 -46
  146. package/dist/{sync-cmd-4RSCWFAF.js → sync-cmd-2NBSELL7.js} +18 -18
  147. package/dist/update-steps-FH7UXI5N.js +81 -0
  148. package/dist/{watch-NH5QZJLE.js → watch-WQGK2SQB.js} +18 -18
  149. package/dist/{work-claim-cmd-ANXDKSAU.js → work-claim-cmd-CQ3DSJBR.js} +21 -21
  150. package/dist/{work-cmd-32J5UQJO.js → work-cmd-B32BDBV2.js} +14 -14
  151. package/dist/{work-comment-cmd-ZUZEAIIH.js → work-comment-cmd-L5FTPUGE.js} +16 -16
  152. package/dist/{work-demo-cmd-56C6JQD3.js → work-demo-cmd-BOKSQSA5.js} +14 -14
  153. package/dist/{work-launch-LWDQXLGI.js → work-launch-ODTGCNJC.js} +1 -1
  154. package/dist/{work-logs-cmd-XKVZ2UY6.js → work-logs-cmd-TZXDF3UI.js} +14 -14
  155. package/dist/{work-needs-attention-cmd-DYD3AIRU.js → work-needs-attention-cmd-WR5GR3B6.js} +14 -14
  156. package/dist/{work-no-change-cmd-QVD67UG5.js → work-no-change-cmd-TKC3V64O.js} +14 -14
  157. package/dist/{work-open-pr-cmd-3SSJPKHW.js → work-open-pr-cmd-T2IFI7OR.js} +16 -16
  158. package/dist/{work-pr-cmd-DF6Q5XHU.js → work-pr-cmd-WM6PGSGK.js} +15 -15
  159. package/dist/{work-proofs-cmd-VRHB5NLE.js → work-proofs-cmd-E4VJP55B.js} +17 -17
  160. package/dist/{work-proofs-record-GOS6TXUM.js → work-proofs-record-MIVUWECF.js} +24 -24
  161. package/dist/{work-stop-cmd-4KNMURDC.js → work-stop-cmd-52WGVYF5.js} +14 -14
  162. package/package.json +2 -2
  163. package/skill-pack/maintained/outerlayer-run/SKILL.md +49 -0
  164. package/skill-pack/shipped.json +2 -0
  165. package/skill-pack/template/spec/SKILL.md +10 -11
  166. package/skill-pack/template/writing-specs/SKILL.md +18 -22
  167. package/dist/caller-VU7QBFHQ.js +0 -23
  168. package/dist/find-unit-YNIILXQK.js +0 -24
  169. package/dist/governing-source-VZFU65KP.js +0 -41
  170. package/dist/host-checks-ZMWJM23Z.js +0 -79
  171. package/dist/init-MPQKWZES.js +0 -79
  172. package/dist/loop-3BEQNXZN.js +0 -90
  173. package/dist/machine-QZ2YQWCN.js +0 -79
  174. package/dist/pending-BHRSEFXV.js +0 -18
  175. package/dist/update-steps-7RBEK5YJ.js +0 -80
@@ -1,41 +1,42 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { itemsSentence, criteriaOf, hostItemsOf, loadCitationFinder, testFileMatcher, planCriteria, wholeItems, judgeGroups, failedItems, inCriteriaOrder, testsByCriterion, oneLineReason, criterionInputs, parseJudgeAnswer, judgedItems, openPullRequests, MAX_TEST_FILE_BYTES } from './chunk-LIH6CIVB.js';
3
+ import { itemsSentence, criteriaOf, hostItemsOf, loadCitationFinder, testFileMatcher, planCriteria, wholeItems, judgeGroups, failedItems, inCriteriaOrder, testsByCriterion, oneLineReason, criterionInputs, parseJudgeAnswer, judgedItems, openPullRequests, MAX_TEST_FILE_BYTES } from './chunk-XMVASSUZ.js';
4
+ import { RUNNER_PROTOCOL } from './chunk-RN5VLKZ2.js';
4
5
  import { sha256OfFile, downloadPinned, VoiceDownloadError } from './chunk-2PGI6RDE.js';
5
6
  import { zodProblem } from './chunk-I3LTIAOR.js';
6
- import { hasStoredCredential, storedCredentialVariables, storeAgentCredential, isAgentName, credentialFromStdin } from './chunk-EGKYININ.js';
7
- import { upgradedStarterText } from './chunk-LIMJRKIU.js';
8
- import { HELPER_PATH, HELPER_RECORD, DOCKERD_LOG } from './chunk-EI6JYZ42.js';
9
- import { writeDockerClientConfig } from './chunk-SLR6QAOE.js';
10
- import { senderPidfile } from './chunk-GVK7AKFX.js';
11
- import { installScrubContext } from './chunk-4LUHKCDO.js';
7
+ import { hasStoredCredential, storedCredentialVariables, storeAgentCredential, isAgentName, credentialFromStdin } from './chunk-5J4WME44.js';
8
+ import { upgradedStarterText } from './chunk-EYFIWJFI.js';
9
+ import { HELPER_PATH, HELPER_RECORD, DOCKERD_LOG } from './chunk-DQLHVV62.js';
10
+ import { writeDockerClientConfig } from './chunk-7HN6T4MY.js';
11
+ import { senderPidfile } from './chunk-AZRZBG45.js';
12
+ import { installScrubContext } from './chunk-KHC7ICRR.js';
12
13
  import { readsJobState, READ_JOB_STATE_FORMATS, jobStateFormatOf } from './chunk-ZVB57WI6.js';
13
- import { runnerImageVersion } from './chunk-6EN72I2O.js';
14
- import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey } from './chunk-X56UUEHE.js';
14
+ import { runnerImageVersion } from './chunk-HT4OKJDB.js';
15
+ import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey, configForJob } from './chunk-TYLZR7HX.js';
15
16
  import { receiveFiles } from './chunk-NN33FYXG.js';
16
- import { readDefaultBranchFiles, readDefaultBranchHead, buildRepositoryImage, fetchCommit, readBranchHead, diffBetween, prepareImageBuild, KEY_PREFIX, TAG_HOST, SHARED_OWNER, SHARED_NAME, universalBase, metadataFromLabels, writeRecord } from './chunk-LLVBDIQJ.js';
17
- import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-GECHL3NC.js';
17
+ import { readDefaultBranchFiles, readDefaultBranchHead, buildRepositoryImage, fetchCommit, readBranchHead, diffBetween, prepareImageBuild, KEY_PREFIX, TAG_HOST, SHARED_OWNER, SHARED_NAME, universalBase, metadataFromLabels, writeRecord } from './chunk-WE4CWGNR.js';
18
+ import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-LJPYKCIP.js';
18
19
  import { isSameProcess, startTimeOf } from './chunk-JBJTC3UU.js';
19
20
  import { currentCliBuild } from './chunk-OGFGZQA3.js';
20
- import { vmExecArgs, runExec, execCapture, waitForAgent } from './chunk-BFWZGLUU.js';
21
- import { socketPathProblem, vsockLinks, linkVsockSockets, GUEST_CID, LEASE_LINK } from './chunk-NHT7RHAI.js';
22
- import { describeCallFailure, shortClaim, retrySend, resolveGoverningSource, prefetchGovernedContext, refusalCode, commandWithShim, logStamp, createRunnerLog, formatDuration, removeKeptContext, formatClock, stageGovernedContext, keptContextTree, removeStagedContext, keepStagedContext, pinnedSourceOf, WORKFLOW_PERMISSION_REASON, shimScript, controlPlaneTokenFailure } from './chunk-CCEP5WBI.js';
23
- import { postJson, WorkCommandError, getJson, isSignatureRefusal } from './chunk-7TM2E4RI.js';
24
- import { runnerCredentialProblem, builtinKind, keyRunnerFactory, sandboxSizeOf, networkOf, sandboxTimeLimitMinutes, DEFAULT_SETUP_MINUTES, optionalEgress, isBuiltinContainer, isBuiltinVm, isBuiltinSandbox, egressSummary, DEFAULT_WORKSPACE_KEEP_DAYS, DEFAULT_CHECK_TIME_LIMIT_MINUTES, allowHostProblem, systemClock, emptyEgressCounts, hostAllowed, imageBuildOf, DEFAULT_SAVED_STATE_MAX_BYTES } from './chunk-KX4JKW4Z.js';
25
- import { formatBytes, volumeBytes, allocatedBytes, DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK, freeBytes } from './chunk-LOG4LBUY.js';
26
- import { runnerLabelValue, said, RUNNER_LABEL, BUILD_LABEL, prepareRunArgs, containerRunArgs, firstLine, writeJobFile, readJobFile, spawnRun, NETWORK_HELPER_MEMORY, createDockerHost, builderSpec, mountableHome, homeCopyRunArgs, containerExecArgs, childEnvironment, readDu, identityRunArgs, parseIdentity, withAnswerProtocol, JUDGE_TREE, MAX_REPORT_BYTES, parseSize, readJobFileChecked, NETWORK_READY_FILE, networkHelperName, judgeCommand, JUDGE_DIR, WORKSPACE_LABEL, networkHelperRunArgs, JUDGE_MAX_TURNS, JUDGE_ITEMS, answerFileName, hashJudgeProgram, identityScript, identityArgs, homeCopyScript, homeCopyArgs, COMMAND_DIR, judgeProgramRecord, MAX_ITEMS_BYTES, JUDGE_REPORT, SAVED_STATE_LABEL } from './chunk-2J3X2Z4F.js';
27
- import { universalImagePending, RecipeError, writeSanitizedRecipe, classifyProperties, DOCKER_FEATURE } from './chunk-5OBQBINA.js';
21
+ import { vmExecArgs, runExec, execCapture, waitForAgent } from './chunk-XDHMRHMC.js';
22
+ import { socketPathProblem, vsockLinks, linkVsockSockets, GUEST_CID, LEASE_LINK } from './chunk-5AU2GQGH.js';
23
+ import { describeCallFailure, shortClaim, retrySend, SELF_GOVERNED, resolveGoverningSource, prefetchGovernedContext, refusalCode, commandWithShim, logStamp, createRunnerLog, formatDuration, removeKeptContext, formatClock, stageGovernedContext, keptContextTree, removeStagedContext, keepStagedContext, pinnedSourceOf, WORKFLOW_PERMISSION_REASON, shimScript, controlPlaneTokenFailure } from './chunk-MGOEHY72.js';
24
+ import { postJson, WorkCommandError, isSignatureRefusal, getJson } from './chunk-QZP3O6IM.js';
25
+ import { isBuiltinContainer, isBuiltinVm, isBuiltinSandbox, keyRunnerFactory, runnerCredentialProblem, builtinKind, sandboxSizeOf, networkOf, sandboxTimeLimitMinutes, DEFAULT_SETUP_MINUTES, optionalEgress, egressSummary, DEFAULT_WORKSPACE_KEEP_DAYS, DEFAULT_CHECK_TIME_LIMIT_MINUTES, allowHostProblem, systemClock, emptyEgressCounts, hostAllowed, imageBuildOf, DEFAULT_SAVED_STATE_MAX_BYTES } from './chunk-WISVAUTD.js';
26
+ import { formatBytes, volumeBytes, allocatedBytes, DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK, freeBytes } from './chunk-7NP5G2FV.js';
27
+ import { runnerLabelValue, said, RUNNER_LABEL, BUILD_LABEL, prepareRunArgs, containerRunArgs, firstLine, writeJobFile, readJobFile, spawnRun, NETWORK_HELPER_MEMORY, createDockerHost, builderSpec, mountableHome, homeCopyRunArgs, containerExecArgs, childEnvironment, readDu, identityRunArgs, parseIdentity, withAnswerProtocol, JUDGE_TREE, MAX_REPORT_BYTES, parseSize, readJobFileChecked, NETWORK_READY_FILE, networkHelperName, judgeCommand, JUDGE_DIR, WORKSPACE_LABEL, networkHelperRunArgs, JUDGE_MAX_TURNS, JUDGE_ITEMS, answerFileName, hashJudgeProgram, identityScript, identityArgs, homeCopyScript, homeCopyArgs, COMMAND_DIR, judgeProgramRecord, MAX_ITEMS_BYTES, JUDGE_REPORT, SAVED_STATE_LABEL } from './chunk-G2J574LS.js';
28
+ import { universalImagePending, RecipeError, writeSanitizedRecipe, classifyProperties, DOCKER_FEATURE } from './chunk-IXC5EISR.js';
28
29
  import { sanitizeTerminal, planArtifactUpload } from './chunk-2DVQHK37.js';
29
- import { sharedSkillNames, skillConflictMessage } from './chunk-TTG6Y7G7.js';
30
+ import { sharedSkillNames, skillConflictMessage } from './chunk-DE5QLWJK.js';
30
31
  import { readCloudConfig } from './chunk-HWVMRETT.js';
31
- import { signerFor } from './chunk-RVYMYTXX.js';
32
- import { vmAssetsDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, buildDir, ghConfigDir, workspacesDir, jobsDir, storeScopes, spoolDir, orgStoreIn, rootfsDir, imagesDir, sessionsDir, builderCacheDiskPath, buildsDir, runnerDirOfBuild, mirrorDir, orgHomeDir, deliveryDir, jobConsolePath, vsockPath, SHIM_DIR, builderConsolePath, rootfsPathFor, diskTemplatesDir } from './chunk-LO3PSFNT.js';
33
- import { BUILD_HOME, repositoriesOf, primaryOf, SandboxError, describeSandboxError, buildEnvironment, CHECKOUT_DIR, JOB_MOUNT, heldBuildAuthority, IMAGE_BUNDLES, writeTrustFiles, trustEnvironment, parseIsolation, containerLocalAddress, destinationEnvironment, withHooksPath, startBuildServices, headerVariables, authorEnvironment, sharedUserEnvironment, withTunnelRecord, commitIdentityRecord, RELAY_PORT, repositoryPath, lifecycleWorkdir, CHECK_ITEMS_FILE, parseProxied, toolProxyEnvironment, readBundleScript, applyTrust, STAND_IN, proxyEnvironment, dropBuildAuthority, sandboxSettingsFrom, createSandboxClient, hostKeyOf, buildAuthorityFor, checkEnvironment, withMiseVariables, checkoutPath, variablesFor, carried6to4, classifyAddress, EVAL_INPUT_DIR, isMiseVariableAllowed, variableForPath, droppedRequestHeaders, hasDotDotSegment, routeNameOf } from './chunk-QP6SPQU5.js';
34
- import { agentCredential, builtInNames, RUNNER_WORDED_REASONS, UNKNOWN_TRACKING_REASON, UNKNOWN_TRANSPORT_REASON, RELAY_USER, MAX_MALFORMED_SESSIONS, MALFORMED_REASON, JOIN_WAIT_MS, currentAgentCredential, removedAgentCredentialValues, managedAgentCredential, realFdStorePort, RELAY_ID, MAX_OPEN_STREAMS, STREAM_RESET_RATE, STREAM_RESET_BURST, STREAM_WINDOW, SESSION_WINDOW, targetOfPath, AGENT_CREDENTIAL_MISSING, fdName, DOCKER_DESKTOP_REASON } from './chunk-LA5UO6LI.js';
32
+ import { signerFor } from './chunk-JLCEQXQF.js';
33
+ import { vmAssetsDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, buildDir, ghConfigDir, workspacesDir, jobsDir, storeScopes, spoolDir, orgStoreIn, rootfsDir, imagesDir, sessionsDir, builderCacheDiskPath, buildsDir, runnerDirOfBuild, mirrorDir, orgHomeDir, deliveryDir, jobConsolePath, vsockPath, SHIM_DIR, builderConsolePath, rootfsPathFor, diskTemplatesDir } from './chunk-O7IJBJ6Z.js';
34
+ import { BUILD_HOME, repositoriesOf, primaryOf, SandboxError, describeSandboxError, buildEnvironment, CHECKOUT_DIR, JOB_MOUNT, heldBuildAuthority, IMAGE_BUNDLES, writeTrustFiles, trustEnvironment, parseIsolation, containerLocalAddress, destinationEnvironment, withHooksPath, startBuildServices, headerVariables, authorEnvironment, sharedUserEnvironment, withTunnelRecord, commitIdentityRecord, RELAY_PORT, repositoryPath, lifecycleWorkdir, CHECK_ITEMS_FILE, parseProxied, toolProxyEnvironment, readBundleScript, applyTrust, STAND_IN, proxyEnvironment, dropBuildAuthority, sandboxSettingsFrom, createSandboxClient, hostKeyOf, buildAuthorityFor, checkEnvironment, withMiseVariables, checkoutPath, variablesFor, carried6to4, classifyAddress, EVAL_INPUT_DIR, isMiseVariableAllowed, variableForPath, droppedRequestHeaders, hasDotDotSegment, routeNameOf } from './chunk-UU6FN6PZ.js';
35
+ import { agentCredential, builtInNames, RUNNER_WORDED_REASONS, UNKNOWN_TRACKING_REASON, UNKNOWN_TRANSPORT_REASON, RELAY_USER, MAX_MALFORMED_SESSIONS, MALFORMED_REASON, JOIN_WAIT_MS, currentAgentCredential, removedAgentCredentialValues, managedAgentCredential, realFdStorePort, RELAY_ID, MAX_OPEN_STREAMS, STREAM_RESET_RATE, STREAM_RESET_BURST, STREAM_WINDOW, SESSION_WINDOW, targetOfPath, AGENT_CREDENTIAL_MISSING, fdName, DOCKER_DESKTOP_REASON } from './chunk-2BMH3373.js';
35
36
  import { versionAtLeast } from './chunk-SF2TBJBP.js';
36
- import { jobAgent, firecrackerArch, MICROVM_ARCHES, FIRECRACKER_VERSION, hostHelperPinned, builderDiskPinned, guestAssetsPinned, runnerAgentNamed, credentialForms, orList, credentialShapes, agentCommands, defaultCommandLine, credentialAgent, agentVersionOf, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, JAILER_BINARY_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, GUEST_ASSETS_VERSION, BUILDER_DISK_VERSION, credentialHandOffKey, strippedVariables, runnerAgents, judgeAgent, networkHelperPinned, NETWORK_HELPER_SHA256, universalImagePinned, UNIVERSAL_IMAGE, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, GH_VERSION, TINI_SHA256, TINI_VERSION, HEADLESS_SHELL, HEADLESS_SHELL_BASE_URL, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_FFMPEG_BASE_URL, VOICE_PACK_FILES, BUILDER_DISK_SHA256, BUILDER_DISK_BASE_URL, DEFAULT_BASE_IMAGE } from './chunk-GTKR2YEZ.js';
37
- import { sessionFolderIn, legacyAgent, defaultAgents, parsePolicy, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, orderSessions, extractFacts, sessionsToTimeline, resolvePackRoot } from './chunk-OKELGJNN.js';
38
- import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
37
+ import { jobAgent, firecrackerArch, MICROVM_ARCHES, FIRECRACKER_VERSION, hostHelperPinned, builderDiskPinned, guestAssetsPinned, runnerAgentNamed, credentialForms, orList, credentialShapes, agentCommands, defaultCommandLine, credentialAgent, agentVersionOf, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, JAILER_BINARY_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, GUEST_ASSETS_VERSION, BUILDER_DISK_VERSION, credentialHandOffKey, strippedVariables, runnerAgents, judgeAgent, networkHelperPinned, NETWORK_HELPER_SHA256, universalImagePinned, UNIVERSAL_IMAGE, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, GH_VERSION, TINI_SHA256, TINI_VERSION, HEADLESS_SHELL, HEADLESS_SHELL_BASE_URL, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_FFMPEG_BASE_URL, VOICE_PACK_FILES, BUILDER_DISK_SHA256, BUILDER_DISK_BASE_URL, DEFAULT_BASE_IMAGE } from './chunk-ZUIHEOSC.js';
38
+ import { sessionFolderIn, legacyAgent, defaultAgents, parsePolicy, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, orderSessions, extractFacts, sessionsToTimeline, resolvePackRoot } from './chunk-3Q2SEOT3.js';
39
+ import { MAINTAINED_SKILLS } from './chunk-ATEMEVFF.js';
39
40
  import { resolveVersion } from './chunk-RA3O54FC.js';
40
41
  import { homeFromEnv } from './chunk-352DHUTP.js';
41
42
  import { scrubText, MIN_SCRUBBED_LITERAL, setCustomScrubbers, setLocalIdentity, setRepoRoot, forkFor, scrubDeep } from './chunk-N2QYP3NQ.js';
@@ -1588,6 +1589,79 @@ function createLeaseChannel(valueMs) {
1588
1589
  };
1589
1590
  }
1590
1591
 
1592
+ // src/runner/run-job.ts
1593
+ function runIsolation(config) {
1594
+ if (config.fleet === true || config.managed === true || !config.queues.includes("implement")) return void 0;
1595
+ if (isBuiltinContainer(config.hooks.provision)) return "container";
1596
+ if (isBuiltinVm(config.hooks.provision) || isBuiltinSandbox(config.hooks.provision)) return "vm";
1597
+ return void 0;
1598
+ }
1599
+ function claimRepos(repos) {
1600
+ if (repos === void 0 || (repos.include?.length ?? 0) === 0 && (repos.exclude?.length ?? 0) === 0) return void 0;
1601
+ const bare = (pattern) => pattern.replace(/^github\.com\//i, "");
1602
+ return { include: (repos.include ?? []).map(bare), exclude: (repos.exclude ?? []).map(bare) };
1603
+ }
1604
+ function parseClaim(data) {
1605
+ const run = data.run;
1606
+ const runKey = data.runKey;
1607
+ if (run === null || run === void 0 || typeof run !== "object") return { kind: "none" };
1608
+ if (typeof run.id !== "string" || typeof run.repository !== "string" || typeof run.instructions !== "string" || typeof run.issuesLeft !== "number" || typeof run.timeLimitSeconds !== "number" || typeof runKey !== "string" || runKey === "") {
1609
+ return { kind: "malformed", reason: "the gateway's answer to the run claim is missing a field the runner needs; upgrade the runner or the gateway" };
1610
+ }
1611
+ return {
1612
+ kind: "claimed",
1613
+ run: { id: run.id, automationId: typeof run.automationId === "string" ? run.automationId : "", repository: run.repository, instructions: run.instructions, issuesLeft: run.issuesLeft, timeLimitSeconds: run.timeLimitSeconds, leaseExpiresAt: typeof run.leaseExpiresAt === "string" ? run.leaseExpiresAt : "" },
1614
+ runKey
1615
+ };
1616
+ }
1617
+ async function claimRun(input) {
1618
+ const { config } = input;
1619
+ const repos = claimRepos(config.repos);
1620
+ const { data } = await postJson(
1621
+ config.url,
1622
+ "/v1/schedule-runs/claim",
1623
+ config.apiKey,
1624
+ keyRunnerFactory(config),
1625
+ {
1626
+ host: config.host,
1627
+ runnerProtocol: RUNNER_PROTOCOL,
1628
+ cliVersion: input.cliVersion,
1629
+ isolation: input.isolation,
1630
+ seconds: LEASE_SECONDS,
1631
+ ...repos === void 0 ? {} : { repos },
1632
+ ...input.hostKey === void 0 ? {} : { hostKey: input.hostKey }
1633
+ },
1634
+ input.fetchImpl,
1635
+ void 0,
1636
+ input.signer
1637
+ );
1638
+ return parseClaim(data);
1639
+ }
1640
+ function releaseOutcomeOf(outcome) {
1641
+ if (outcome === "ok") return "ended";
1642
+ if (outcome === "timed_out") return "timed_out";
1643
+ return "failed";
1644
+ }
1645
+ async function renewRun(config, runId, fetchImpl, timeoutMs) {
1646
+ try {
1647
+ await postJson(config.url, `/v1/schedule-runs/${runId}/renew`, config.apiKey, config.appId, { seconds: LEASE_SECONDS }, fetchImpl, timeoutMs, await signerFor(config.configPath));
1648
+ return "renewed";
1649
+ } catch (err) {
1650
+ if (err instanceof WorkCommandError && isSignatureRefusal(err.code)) return "retry_later";
1651
+ if (err instanceof WorkCommandError && !err.retryable) return "lease_lost";
1652
+ return "retry_later";
1653
+ }
1654
+ }
1655
+ async function releaseRun(config, runId, outcome, fetchImpl) {
1656
+ const { data } = await postJson(config.url, `/v1/schedule-runs/${runId}/release`, config.apiKey, config.appId, { outcome: releaseOutcomeOf(outcome) }, fetchImpl, void 0, await signerFor(config.configPath));
1657
+ return { state: typeof data.state === "string" ? data.state : void 0 };
1658
+ }
1659
+ var RUN_PROMPT = "/outerlayer-run";
1660
+ function runCommandOf(config, agents = defaultAgents()) {
1661
+ if (config.commands.run !== void 0) return config.commands.run;
1662
+ return jobAgent({ command: config.commands.implement }, agents)?.adapter.headless?.commandLine(RUN_PROMPT, "implement");
1663
+ }
1664
+
1591
1665
  // src/runner/container/agent-user.ts
1592
1666
  var ADDED_USER = "ol-agent";
1593
1667
  var RELAY_REFUSAL = `the agent's user cannot be \`${RELAY_USER}\``;
@@ -3744,7 +3818,7 @@ async function provisionSandbox(input) {
3744
3818
  } catch (err) {
3745
3819
  return fail(err instanceof SandboxError ? describeSandboxError(err) : describeCallFailure(err));
3746
3820
  }
3747
- const governing = await resolveGoverningSource({ config, repository, fetchImpl: input.fetchImpl });
3821
+ const governing = input.queue === "run" ? SELF_GOVERNED : await resolveGoverningSource({ config, repository, fetchImpl: input.fetchImpl });
3748
3822
  if (!governing.ok) return fail(governing.reason);
3749
3823
  const governingSource = governing.source;
3750
3824
  const controlPlaneUrl = (controlPlane) => runtime.remoteFor?.(controlPlane) ?? `${runtime.github.gitUrl}/${controlPlane}.git`;
@@ -3783,6 +3857,7 @@ async function provisionSandbox(input) {
3783
3857
  const env = buildEnvironment({
3784
3858
  config,
3785
3859
  item: item.number,
3860
+ ...input.queue === "run" ? { run: true } : {},
3786
3861
  itemKey,
3787
3862
  repository,
3788
3863
  repositories,
@@ -3832,7 +3907,7 @@ async function provisionSandbox(input) {
3832
3907
  environment.credentials = tokens.used();
3833
3908
  let services;
3834
3909
  try {
3835
- const gitRemote = gitRemoteFor(runtime, { repositories, tokens, buildDir: buildDir2, log: (line2) => log.line(`${tag} ${line2}`) });
3910
+ const gitRemote = gitRemoteFor(runtime, { repositories, tokens, buildDir: buildDir2, log: (line2) => log.line(`${tag} ${line2}`), ...input.queue === "run" ? { readOnly: true } : {} });
3836
3911
  services = await startServicesFor(runtime, config, buildDir2, jobDir, itemKey, true, gitRemote, "stream", input.leaseExpiryMs === void 0 ? void 0 : leaseFor(runtime, buildId, input.leaseExpiryMs), void 0, (line2) => log.line(`${tag} ${line2}`));
3837
3912
  runtime.tunnels.set(buildId, services);
3838
3913
  } catch (err) {
@@ -4056,6 +4131,7 @@ async function runCliInSandbox(input, argv, logName) {
4056
4131
  const env = buildEnvironment({
4057
4132
  config: claimCalls(input.config, job),
4058
4133
  item: job.item,
4134
+ ...job.queue === "run" ? { run: true } : {},
4059
4135
  itemKey: job.itemKey,
4060
4136
  branch: job.branch,
4061
4137
  repository: state.repository,
@@ -4996,7 +5072,7 @@ async function provisionMicroVmOnce(input, allowRestore, itemDiskFailed) {
4996
5072
  } catch (err) {
4997
5073
  return fail(err instanceof AssetError ? err.message : `the microVM's assets could not be had: ${describeCallFailure(err)}`);
4998
5074
  }
4999
- const governing = await resolveGoverningSource({ config, repository, fetchImpl: input.fetchImpl });
5075
+ const governing = input.queue === "run" ? SELF_GOVERNED : await resolveGoverningSource({ config, repository, fetchImpl: input.fetchImpl });
5000
5076
  if (!governing.ok) return fail(governing.reason);
5001
5077
  const governingSource = governing.source;
5002
5078
  const controlPlaneUrl = (controlPlane) => runtime.remoteFor?.(controlPlane) ?? `${runtime.github.gitUrl}/${controlPlane}.git`;
@@ -5074,6 +5150,7 @@ async function provisionMicroVmOnce(input, allowRestore, itemDiskFailed) {
5074
5150
  const envInput = {
5075
5151
  config,
5076
5152
  item: item.number,
5153
+ ...input.queue === "run" ? { run: true } : {},
5077
5154
  itemKey,
5078
5155
  repository,
5079
5156
  repositories,
@@ -5146,7 +5223,7 @@ async function provisionMicroVmOnce(input, allowRestore, itemDiskFailed) {
5146
5223
  makeBuildsDirPrivate(buildDir2);
5147
5224
  let services;
5148
5225
  try {
5149
- const gitRemote = gitRemoteFor(runtime, { repositories, tokens, buildDir: buildDir2, organizationId: input.organizationId, log: (line2) => log.line(`${tag} ${line2}`) });
5226
+ const gitRemote = gitRemoteFor(runtime, { repositories, tokens, buildDir: buildDir2, organizationId: input.organizationId, log: (line2) => log.line(`${tag} ${line2}`), ...input.queue === "run" ? { readOnly: true } : {} });
5150
5227
  services = await startServicesFor(runtime, config, buildDir2, jobDir, itemKey, true, gitRemote, "socket", void 0, void 0, (line2) => log.line(`${tag} ${line2}`));
5151
5228
  runtime.tunnels.set(buildId, services);
5152
5229
  } catch (err) {
@@ -5440,6 +5517,7 @@ function vmExecFor(input, argv) {
5440
5517
  const built = buildEnvironment({
5441
5518
  config: claimCalls(input.config, input.job),
5442
5519
  item: input.job.item,
5520
+ ...input.job.queue === "run" ? { run: true } : {},
5443
5521
  itemKey: input.job.itemKey,
5444
5522
  branch: input.job.branch,
5445
5523
  repository: state.repository,
@@ -5480,6 +5558,7 @@ async function startMicroVmCommand(input) {
5480
5558
  const env = withExtraEnv(buildEnvironment({
5481
5559
  config: claimCalls(input.config, input.job),
5482
5560
  item: input.job.item,
5561
+ ...input.job.queue === "run" ? { run: true } : {},
5483
5562
  itemKey: input.job.itemKey,
5484
5563
  branch: input.job.branch,
5485
5564
  repository: state.repository,
@@ -5535,6 +5614,7 @@ async function runCliInMicroVm(input, argv, logName, goneReason2) {
5535
5614
  const env = buildEnvironment({
5536
5615
  config: claimCalls(input.config, job),
5537
5616
  item: job.item,
5617
+ ...job.queue === "run" ? { run: true } : {},
5538
5618
  itemKey: job.itemKey,
5539
5619
  branch: job.branch,
5540
5620
  repository: state.repository,
@@ -7068,6 +7148,9 @@ async function startSender(input) {
7068
7148
  return void 0;
7069
7149
  }
7070
7150
  }
7151
+ function pidfileKey(job) {
7152
+ return job.queue === "run" ? String(job.item) : Number(job.item);
7153
+ }
7071
7154
  function launchFor(config, job, jobDir, deps) {
7072
7155
  if (job.microvm !== void 0) {
7073
7156
  const runtime = deps.runtime ?? createContainerRuntime();
@@ -7090,7 +7173,7 @@ async function restartSender(input) {
7090
7173
  const state = job.container;
7091
7174
  if (state !== void 0 && job.itemKey !== void 0) {
7092
7175
  const runtime = deps.runtime ?? createContainerRuntime();
7093
- const pidfile = senderPidfile(BUILD_HOME2, Number(job.item));
7176
+ const pidfile = senderPidfile(BUILD_HOME2, pidfileKey(job));
7094
7177
  const sleep = deps.sleep ?? ((ms) => new Promise((resolve2) => setTimeout(resolve2, ms)));
7095
7178
  const running = async () => {
7096
7179
  const probe = await runtime.host.exec({ container: state.container, user: state.agentUser ?? ADDED_USER, env: { literals: {}, passed: {} }, argv: ["/bin/sh", "-c", senderAliveScript(pidfile)] });
@@ -7156,8 +7239,8 @@ async function stopSender(input) {
7156
7239
  if (sender === void 0) return;
7157
7240
  const tag = `${itemTag(job)}`;
7158
7241
  const sleep = deps.sleep ?? ((ms) => new Promise((resolve2) => setTimeout(resolve2, ms)));
7159
- const inContainer = job.container === void 0 ? void 0 : { state: job.container, runtime: deps.runtime ?? createContainerRuntime(), pidfile: senderPidfile(BUILD_HOME2, Number(job.item)) };
7160
- const inGuest = job.microvm === void 0 ? void 0 : { state: job.microvm, runtime: deps.runtime ?? createContainerRuntime(), pidfile: senderPidfile(BUILD_HOME2, Number(job.item)) };
7242
+ const inContainer = job.container === void 0 ? void 0 : { state: job.container, runtime: deps.runtime ?? createContainerRuntime(), pidfile: senderPidfile(BUILD_HOME2, pidfileKey(job)) };
7243
+ const inGuest = job.microvm === void 0 ? void 0 : { state: job.microvm, runtime: deps.runtime ?? createContainerRuntime(), pidfile: senderPidfile(BUILD_HOME2, pidfileKey(job)) };
7161
7244
  const signalInside = async (signal) => {
7162
7245
  if (inContainer !== void 0) return signalInContainer(inContainer.runtime, inContainer.state, inContainer.pidfile, signal).catch(() => void 0);
7163
7246
  if (inGuest !== void 0) return signalInGuest(inGuest.runtime, inGuest.state, inGuest.pidfile, signal).catch(() => void 0);
@@ -7846,6 +7929,28 @@ function unreviewedItem(changed, reviewed, commit) {
7846
7929
  return { id: UNREVIEWED_FILES_ITEM_ID, result: "skipped", commit, reason: `${reason}.` };
7847
7930
  }
7848
7931
 
7932
+ // src/runner/code-review-report.ts
7933
+ var REPORT_RETRY_WINDOW_MS = 2e4;
7934
+ var MAX_REASON_LENGTH = 2e3;
7935
+ async function reportCodeReview(config, job, report, deps) {
7936
+ if (job.codeReview !== true) return;
7937
+ const tag = itemTag(job);
7938
+ try {
7939
+ const calls = claimCalls(config, job);
7940
+ const item = claimItem(config, job);
7941
+ const body = report.result === "failed" ? { ...report, runnerReason: report.runnerReason.slice(0, MAX_REASON_LENGTH) } : report;
7942
+ const signer = await signerFor(calls.configPath);
7943
+ const sent = await retrySend(() => postJson(calls.url, `/v1/work-items/${item}/claim/code-review`, calls.apiKey, calls.appId, body, deps.fetchImpl, void 0, signer), {
7944
+ now: deps.now,
7945
+ sleep: deps.sleep,
7946
+ windowMs: REPORT_RETRY_WINDOW_MS
7947
+ });
7948
+ if (!sent.ok) deps.log.line(`${tag} the code review's report was not recorded: ${sent.reason}`);
7949
+ } catch (err) {
7950
+ deps.log.line(`${tag} the code review's report was not sent: ${describeCallFailure(err)}`);
7951
+ }
7952
+ }
7953
+
7849
7954
  // src/runner/judge.ts
7850
7955
  var LIMIT_KEY_TAIL = " (runner.checks.timeLimitMinutes)";
7851
7956
  var MAX_DIFF_BYTES = 4 * 1024 * 1024;
@@ -7997,9 +8102,11 @@ async function runJudge(input) {
7997
8102
  log.line(`${tag} judge started (${checks.map((check) => check.name).join(", ")})`);
7998
8103
  const startedMs = now().getTime();
7999
8104
  const record = makeRecorder({ config, job, jobDir, deps });
8000
- const fail = (check, reason) => {
8105
+ const reportReview = (check, what) => check.builtIn === true ? reportCodeReview(config, job, what, deps) : Promise.resolve();
8106
+ const fail = async (check, reason) => {
8001
8107
  log.error(`${tag} judge failed: ${reason}`);
8002
- return record(check.name, "fail", reason, check.judge.subjects === "none" ? { items: notRunItems(reason) } : {});
8108
+ await record(check.name, "fail", reason, check.judge.subjects === "none" ? { items: notRunItems(reason) } : {});
8109
+ await reportReview(check, { result: "failed", reason: "review_not_run", runnerReason: oneLineReason(cleanReason(reason)) ?? "the code review did not run" });
8003
8110
  };
8004
8111
  try {
8005
8112
  for (const check of checks) {
@@ -8015,17 +8122,19 @@ async function runJudge(input) {
8015
8122
  }
8016
8123
  async function noReview() {
8017
8124
  const started = job.container ?? job.microvm;
8018
- if (started === void 0) return "this build ran under a provision hook of the host's own";
8125
+ if (started === void 0) return { text: "this build ran under a provision hook of the host's own", report: { result: "skipped", reason: "own_provision_hook" } };
8019
8126
  const workItem = await readItem();
8020
8127
  const open = openPullRequests(workItem);
8021
- if (open.length > 1) return "the item has more than one open pull request";
8022
- if (open.length === 1 && open[0].toLowerCase() !== repo.toLowerCase()) return "the item's open pull request is in another repository";
8128
+ if (open.length > 1) return { text: "the item has more than one open pull request", report: { result: "skipped", reason: "several_pull_requests" } };
8129
+ if (open.length === 1 && open[0].toLowerCase() !== repo.toLowerCase()) {
8130
+ return { text: "the item's open pull request is in another repository", report: { result: "skipped", reason: "other_repository" } };
8131
+ }
8023
8132
  if (job.branch === void 0) return void 0;
8024
8133
  const read = await (deps.readBranch ?? readBranchHead)({ remote: remoteOf(), dir: scratch, branch: job.branch, token: readToken });
8025
8134
  if (read.kind === "unreadable") return void 0;
8026
- if (read.kind === "absent" || read.sha === started.startCommit) return "the branch holds nothing to review";
8135
+ if (read.kind === "absent" || read.sha === started.startCommit) return { text: "the branch holds nothing to review", report: { result: "skipped", reason: "nothing_new" } };
8027
8136
  try {
8028
- return await hostReviewed(itemCalls(config, job), workItem, read.sha, deps.fetchImpl) ? "a host result already covers the branch head" : void 0;
8137
+ return await hostReviewed(itemCalls(config, job), workItem, read.sha, deps.fetchImpl) ? { text: "a host result already covers the branch head", report: { result: "skipped", reason: "already_reviewed", commit: read.sha } } : void 0;
8029
8138
  } catch (err) {
8030
8139
  log.line(`${tag} the item's results could not be read, so the head is reviewed: ${describeCallFailure(err)}`);
8031
8140
  return void 0;
@@ -8040,7 +8149,8 @@ async function runJudge(input) {
8040
8149
  return await fail(check, `the item could not be read: ${describeCallFailure(err)}`);
8041
8150
  }
8042
8151
  if (skipped !== void 0) {
8043
- log.line(`${tag} no code review: ${skipped}`);
8152
+ log.line(`${tag} no code review: ${skipped.text}`);
8153
+ await reportReview(check, skipped.report);
8044
8154
  return;
8045
8155
  }
8046
8156
  }
@@ -8338,6 +8448,12 @@ async function runJudge(input) {
8338
8448
  const complete = at.result === "fail" ? named.some((item) => item.result === "fail") : named.some((item) => item.commit !== void 0);
8339
8449
  const items = check.builtIn === true && !notRun && !complete ? [...named, { id: REVIEWED_COMMIT_ITEM_ID, result: at.result, commit: at.head, ...at.reason === void 0 ? {} : { reason: at.reason } }] : at.items;
8340
8450
  await record(check.name, at.result, at.reason, { keyTail: at.limitKey === true ? LIMIT_KEY_TAIL : "", link, items: sendable(items) });
8451
+ if (notRun) {
8452
+ await reportReview(check, { result: "failed", reason: "review_not_run", runnerReason: oneLineReason(cleanReason(at.reason ?? "")) ?? "the judge did not run" });
8453
+ } else {
8454
+ const failing = named.filter((item) => item.result === "fail").length;
8455
+ await reportReview(check, { result: "reviewed", reason: "reviewed", commit: at.head, problems: at.result === "fail" ? Math.max(failing, 1) : failing });
8456
+ }
8341
8457
  }
8342
8458
  function sendable(items) {
8343
8459
  if (items === void 0) return void 0;
@@ -8948,6 +9064,7 @@ async function finishJob(job, jobDirPath, outcome, config, deps, ending) {
8948
9064
  const jobFilePath = join(jobDirPath, "job.json");
8949
9065
  const logPath = join(jobDirPath, "command.log");
8950
9066
  const tag = `${itemTag(job)}`;
9067
+ const isRun = job.queue === "run";
8951
9068
  deps.attemptLogs?.open(job.item, jobDirPath, itemScope(job));
8952
9069
  const valuesNotHeld = (job.managedVariables?.length ?? 0) > 0 && managedBuildSettingsFor(jobDirPath) === void 0;
8953
9070
  if (job.sender !== void 0) {
@@ -9078,7 +9195,7 @@ async function finishJob(job, jobDirPath, outcome, config, deps, ending) {
9078
9195
  log.error(`${tag} removing an earlier attempt's check environment failed: ${describeCallFailure(err)} \xB7 continuing`);
9079
9196
  }
9080
9197
  }
9081
- if (outcome === "ok" && !job.cleanupRan && job.proofsRan !== true && !valuesNotHeld && job.workdir !== void 0 && job.itemKey !== void 0 && await declaresRecordedProof(itemCalls(config, job), job.item, deps.fetchImpl)) {
9198
+ if (outcome === "ok" && !isRun && !job.cleanupRan && job.proofsRan !== true && !valuesNotHeld && job.workdir !== void 0 && job.itemKey !== void 0 && await declaresRecordedProof(itemCalls(config, job), job.item, deps.fetchImpl)) {
9082
9199
  setStage(job, jobDirPath, "proofs");
9083
9200
  job.proofsRan = true;
9084
9201
  writeJobFile(jobFilePath, job);
@@ -9099,12 +9216,16 @@ async function finishJob(job, jobDirPath, outcome, config, deps, ending) {
9099
9216
  log.error(`${tag} the host's proof recording stopped: ${describeCallFailure(err)} \xB7 continuing`);
9100
9217
  }
9101
9218
  }
9102
- if (valuesNotHeld && outcome === "ok" && !job.cleanupRan) log.error(`${tag} the host's judge and checks skipped: ${VALUES_NOT_HELD}`);
9103
- if (outcome === "ok" && !job.cleanupRan && job.sandbox !== void 0 && job.judgeRan !== true) {
9219
+ if (valuesNotHeld && outcome === "ok" && !isRun && !job.cleanupRan) {
9220
+ log.error(`${tag} the host's judge and checks skipped: ${VALUES_NOT_HELD}`);
9221
+ await reportCodeReview(config, job, { result: "skipped", reason: "variables_lost" }, { fetchImpl: deps.fetchImpl, log, now: deps.now, sleep: deps.sleep });
9222
+ }
9223
+ if (outcome === "ok" && !isRun && !job.cleanupRan && job.sandbox !== void 0 && job.judgeRan !== true) {
9104
9224
  job.judgeNotRun = "the host's judge and checks do not run for a build in a sandbox";
9105
9225
  log.line(`${tag} the host's judge and checks are not run for a build in a sandbox`);
9226
+ await reportCodeReview(config, job, { result: "skipped", reason: "sandbox" }, { fetchImpl: deps.fetchImpl, log, now: deps.now, sleep: deps.sleep });
9106
9227
  }
9107
- if (outcome === "ok" && !job.cleanupRan && job.judgeRan !== true && !valuesNotHeld && job.sandbox === void 0) {
9228
+ if (outcome === "ok" && !isRun && !job.cleanupRan && job.judgeRan !== true && !valuesNotHeld && job.sandbox === void 0) {
9108
9229
  setStage(job, jobDirPath, "judge");
9109
9230
  job.judgeRan = true;
9110
9231
  writeJobFile(jobFilePath, job);
@@ -9119,7 +9240,7 @@ async function finishJob(job, jobDirPath, outcome, config, deps, ending) {
9119
9240
  log.error(`${tag} the host's judge stopped: ${describeCallFailure(err)} \xB7 continuing`);
9120
9241
  }
9121
9242
  }
9122
- if (outcome === "ok" && !job.cleanupRan && job.checksRan !== true && !valuesNotHeld && job.sandbox === void 0) {
9243
+ if (outcome === "ok" && !isRun && !job.cleanupRan && job.checksRan !== true && !valuesNotHeld && job.sandbox === void 0) {
9123
9244
  setStage(job, jobDirPath, "checks");
9124
9245
  job.checksRan = true;
9125
9246
  writeJobFile(jobFilePath, job);
@@ -9252,7 +9373,7 @@ async function finishJob(job, jobDirPath, outcome, config, deps, ending) {
9252
9373
  writeJobFile(jobFilePath, job);
9253
9374
  }
9254
9375
  let verdictReason;
9255
- if (outcome === "ok") {
9376
+ if (outcome === "ok" && !isRun) {
9256
9377
  const decision = await settleVerdict({
9257
9378
  read: () => readItemEvaluation(itemCalls(config, job), job.item, deps.fetchImpl, job.claimId),
9258
9379
  now,
@@ -9269,7 +9390,7 @@ async function finishJob(job, jobDirPath, outcome, config, deps, ending) {
9269
9390
  log.error(`${tag} the command exited 0 but the item is not done: ${verdictReason}`);
9270
9391
  }
9271
9392
  }
9272
- if (config.hooks.report) {
9393
+ if (config.hooks.report && !isRun) {
9273
9394
  setStage(job, jobDirPath, "report");
9274
9395
  log.line(`${tag} report started \xB7 phase end`);
9275
9396
  const reportStartedMs = now().getTime();
@@ -9336,7 +9457,7 @@ async function finishJob(job, jobDirPath, outcome, config, deps, ending) {
9336
9457
  const runnerLog = valuesNotHeld ? `The runner sends no log for this attempt: ${VALUES_NOT_HELD}.
9337
9458
  ` : releaseLogFor(jobDirPath, job, config);
9338
9459
  const detail = outcome === void 0 ? { log: runnerLog } : { stage: job.endStage, exitCode: job.endExitCode, reason: job.reason, environment: job.environment, resume: job.resume, disk: job.disk, log: runnerLog };
9339
- const release = await retrySend(() => releaseLease(claimCalls(config, job), claimItem(config, job), outcome, detail, deps.fetchImpl), {
9460
+ const release = await retrySend(() => sendRelease(config, job, outcome, detail, deps.fetchImpl), {
9340
9461
  now: deps.now,
9341
9462
  sleep: deps.sleep
9342
9463
  });
@@ -9366,6 +9487,13 @@ async function finishJob(job, jobDirPath, outcome, config, deps, ending) {
9366
9487
  }
9367
9488
  return job;
9368
9489
  }
9490
+ async function sendRelease(config, job, outcome, detail, fetchImpl) {
9491
+ if (job.queue === "run") {
9492
+ await releaseRun(claimCalls(config, job), String(job.item), outcome, fetchImpl);
9493
+ return {};
9494
+ }
9495
+ return releaseLease(claimCalls(config, job), claimItem(config, job), outcome, detail, fetchImpl);
9496
+ }
9369
9497
  function egressText(record) {
9370
9498
  if (record === void 0) return "";
9371
9499
  return record.egress === void 0 ? " \xB7 tunnel counts not recorded" : ` \xB7 ${egressSummary(record.egress)}`;
@@ -9407,7 +9535,7 @@ async function retryFailedReleases(jobsDirPath, config, deps) {
9407
9535
  }
9408
9536
  const runnerLog = readScrubbedReleaseLog(dirPath) ?? releaseLogFor(dirPath, job, config);
9409
9537
  const detail = job.outcome === void 0 ? { log: runnerLog } : { stage: job.endStage, exitCode: job.endExitCode, reason: job.reason, environment: job.environment, resume: job.resume, disk: job.disk, log: runnerLog };
9410
- const release = await retrySend(() => releaseLease(claimCalls(config, job), claimItem(config, job), job.outcome, detail, deps.fetchImpl), {
9538
+ const release = await retrySend(() => sendRelease(config, job, job.outcome, detail, deps.fetchImpl), {
9411
9539
  now: deps.now,
9412
9540
  sleep: deps.sleep
9413
9541
  });
@@ -11675,7 +11803,7 @@ async function provisionContainerOnce(input, allowRestore, itemDiskFailed) {
11675
11803
  if (/docker desktop/i.test(await host.operatingSystem() ?? "") && !(runnerImageVersion(runtime.hostEnv) !== void 0 && runtime.platform === "linux")) {
11676
11804
  return fail(DOCKER_DESKTOP_REASON);
11677
11805
  }
11678
- const governing = await resolveGoverningSource({ config, repository, fetchImpl: input.fetchImpl });
11806
+ const governing = input.queue === "run" ? SELF_GOVERNED : await resolveGoverningSource({ config, repository, fetchImpl: input.fetchImpl });
11679
11807
  if (!governing.ok) return fail(governing.reason);
11680
11808
  const governingSource = governing.source;
11681
11809
  const controlPlaneUrl = (controlPlane) => runtime.remoteFor?.(controlPlane) ?? `${runtime.github.gitUrl}/${controlPlane}.git`;
@@ -11754,6 +11882,7 @@ async function provisionContainerOnce(input, allowRestore, itemDiskFailed) {
11754
11882
  const envInput = {
11755
11883
  config,
11756
11884
  item: item.number,
11885
+ ...input.queue === "run" ? { run: true } : {},
11757
11886
  itemKey,
11758
11887
  repository,
11759
11888
  repositories,
@@ -11829,7 +11958,7 @@ async function provisionContainerOnce(input, allowRestore, itemDiskFailed) {
11829
11958
  environment.credentials = tokens.used();
11830
11959
  let services;
11831
11960
  try {
11832
- const gitRemote = gitRemoteFor(runtime, { repositories, tokens, buildDir: buildDir2, log: (line2) => log.line(`${tag} ${line2}`) });
11961
+ const gitRemote = gitRemoteFor(runtime, { repositories, tokens, buildDir: buildDir2, log: (line2) => log.line(`${tag} ${line2}`), ...input.queue === "run" ? { readOnly: true } : {} });
11833
11962
  services = await startServicesFor(runtime, config, buildDir2, jobDir, itemKey, true, gitRemote, "stream", input.leaseExpiryMs === void 0 ? void 0 : leaseFor(runtime, buildId, input.leaseExpiryMs), void 0, (line2) => log.line(`${tag} ${line2}`));
11834
11963
  runtime.tunnels.set(buildId, services);
11835
11964
  } catch (err) {
@@ -12008,6 +12137,7 @@ function containerCommandExec(input) {
12008
12137
  const built = buildEnvironment({
12009
12138
  config: claimCalls(input.config, input.job),
12010
12139
  item: input.job.item,
12140
+ ...input.job.queue === "run" ? { run: true } : {},
12011
12141
  itemKey: input.job.itemKey,
12012
12142
  branch: input.job.branch,
12013
12143
  repository: state.repository,
@@ -12037,6 +12167,7 @@ function containerSenderCommand(input) {
12037
12167
  const env = buildEnvironment({
12038
12168
  config: claimCalls(input.config, input.job),
12039
12169
  item: input.job.item,
12170
+ ...input.job.queue === "run" ? { run: true } : {},
12040
12171
  itemKey: input.job.itemKey,
12041
12172
  branch: input.job.branch,
12042
12173
  repository: state.repository,
@@ -12137,7 +12268,7 @@ function leaseFor(runtime, buildId, expiryMs) {
12137
12268
  }
12138
12269
  return channel;
12139
12270
  }
12140
- async function ensureTunnel(runtime, state, jobDir, config, itemKey, branch, repositories, log, leaseExpiryMs) {
12271
+ async function ensureTunnel(runtime, state, jobDir, config, itemKey, branch, repositories, log, leaseExpiryMs, readOnly) {
12141
12272
  if (runtime.tunnels.has(state.buildId)) return;
12142
12273
  const transport = transportOf(state);
12143
12274
  if (transport === "unknown") {
@@ -12146,7 +12277,7 @@ async function ensureTunnel(runtime, state, jobDir, config, itemKey, branch, rep
12146
12277
  }
12147
12278
  const tokens = runtime.credentials.get(jobDir);
12148
12279
  const served = repositoriesOf({ repositories, repository: state.repository, branch });
12149
- const gitRemote = tokens === void 0 || served.length === 0 ? void 0 : gitRemoteFor(runtime, { repositories: served, tokens, buildDir: state.buildDir });
12280
+ const gitRemote = tokens === void 0 || served.length === 0 ? void 0 : gitRemoteFor(runtime, { repositories: served, tokens, buildDir: state.buildDir, ...readOnly === true ? { readOnly: true } : {} });
12150
12281
  const lease = transport === "exec" && leaseExpiryMs !== void 0 ? leaseFor(runtime, state.buildId, leaseExpiryMs) : void 0;
12151
12282
  if (state.stopped === true) lease?.stop();
12152
12283
  const services = await startServicesFor(runtime, config, state.buildDir, jobDir, itemKey, state.builtIns === true, gitRemote, transport === "exec" ? "stream" : "socket", lease);
@@ -12172,7 +12303,7 @@ async function runCliInContainer(input, argv, logName) {
12172
12303
  const { runtime, job } = input;
12173
12304
  const state = job.container;
12174
12305
  try {
12175
- await ensureTunnel(runtime, state, input.jobDir, input.config, job.itemKey, job.branch, job.repositories, input.log, () => leaseExpiresAtMs(job));
12306
+ await ensureTunnel(runtime, state, input.jobDir, configForJob(input.config, job), job.itemKey, job.branch, job.repositories, input.log, () => leaseExpiresAtMs(job), job.queue === "run");
12176
12307
  if (state.stopped) {
12177
12308
  const network = await ensureNetworkReady(runtime, state);
12178
12309
  if (network !== void 0) return { ok: false, reason: network };
@@ -12186,6 +12317,7 @@ async function runCliInContainer(input, argv, logName) {
12186
12317
  const env = buildEnvironment({
12187
12318
  config: claimCalls(input.config, job),
12188
12319
  item: job.item,
12320
+ ...job.queue === "run" ? { run: true } : {},
12189
12321
  itemKey: job.itemKey,
12190
12322
  branch: job.branch,
12191
12323
  repository: state.repository,
@@ -12332,7 +12464,7 @@ function containerJudgeEnvironment(input) {
12332
12464
  };
12333
12465
  return {
12334
12466
  stop: async () => {
12335
- if (input.config !== void 0) await ensureTunnel(runtime, state, input.jobDir, input.config, job.itemKey, job.branch, job.repositories, input.log);
12467
+ if (input.config !== void 0) await ensureTunnel(runtime, state, input.jobDir, configForJob(input.config, job), job.itemKey, job.branch, job.repositories, input.log, void 0, job.queue === "run");
12336
12468
  await stopContainer(runtime, state);
12337
12469
  const network = await ensureNetworkReady(runtime, state);
12338
12470
  if (network !== void 0) throw new Error(network);
@@ -13017,4 +13149,4 @@ async function runHostChecks(input) {
13017
13149
  }
13018
13150
  }
13019
13151
 
13020
- export { ADOPTED_FETCH_RETRY_WINDOW_MS, ALREADY_RELEASED, AttemptLogBook, CRITERIA_CHECK, EXIT_CODE_FILE, GUEST_USAGE_INTERVAL_MS, HELPER_ENV, KIND_LABEL, LEASE_SECONDS, MAX_CHECK_ITEMS_BYTES, MICROVM_COMMAND_DIR, MIN_ENGINE_MAJOR, PLACEHOLDER_MARKER, RENEW_INTERVAL_SECONDS, RunnerInitError, SandboxGoneError, agentCredentialCheck, appendCommandLog, attemptNote, checksIn, claimPermissionProblem, commandItems, commandLogOffset, containerCommandExec, createContainerRuntime, createHousekeepingDocker, createLeaseChannel, currentSkillCommand, decideHostBuildSkill, deliverCommitHooks, deliverContainerHooks, deliverExecMaven, deliverJobFiles, deliverSandboxHooks, describeHookEnd, describeMachineDocker, detectMachine, ensureFirecrackerAndJailer, ensureNetworkReady, ensureTunnel, execArgv, execCommandLine, fetchManagedBuildSettings, fetchManagedClaudeKey, filesAreCopied, finishJob, foldSample, formerSkillProblem, formerSkillQueues, freeItemDisksUntil, gitRemoteFor, helperFirecrackerNote, helperSocketPath, holdManagedBuildSettings, holdManagedClaudeKey, hookLimitsFor, hostCommandEnvironment, hostEnvironment, housekeepingDockerIfReachable, inTeardown, installTrust, isContainerTracked, isGroupAlive, isIdle, isIsolatedJob, isJudgeCheck, isMicroVmTracked, isPlaceholderCommand, isReadable, isSandboxTracked, isTimedOut, isTracked, isUnfinished, itemScope, itemTag, jobEnv, jobRecordsClaim, judgeProbe, keepGhConfigCurrent, keptCommitsLine, leaseExpiresAtMs, leaseTimeLeftMs, lifecycleFailureReason, lifecycleSteps, listAdoptableJobs, listItemDisks, listTrackedJobs, listUnreadableJobs, listenOnBroker, makeRecorder, managedBuildSettingsFor, measureDisk, microVmArchSupported, microVmAssetsPinned, microVmCommandLine, microVmOomKills, missingPermissionFix, missingPermissionOf, modellessProblem, modellessQueues, needsAgentCredential, needsBuildSkill, needsRenew, outcomeFromExitCode, parseCpuList, permissionModeProblem, permissionModeProblems, placeholderProblem, placeholderQueues, prepareBranch, prepareResume, prepareRunnerInit, probeCommand, probeHelper, probeMicroVmCommand, probeSandboxCommand, provisionContainer, provisionEnvironment, provisionMicroVm, provisionSandbox, reachDockerStep, readConfigObject, readCpuUsec, readDefinitions, readProvisionOut, readRecords, recordsProofsOnly, recoverLostJobs, releaseLease, removeOldestUntil, renewLease, resolveHostBuild, restartSender, restoreSessionIntoContainer, restoreSessionIntoMicroVm, retryFailedReleases, runCommand, runHook, runHostChecks, runHousekeeping, runRunnerInit, runWithSpawn, sampleGuest, savedStatesDir, scrubReason, serveLease, setStage, setUpRunnerCgroup, shellQuote, startHostServices, startMicroVmCommand, startSandboxCommand, startSender, startServicesFor, stopOrphanedMicroVms, stoppedHelperReason, stripTerminalControls, supportsContainerBuilds, supportsMicroVmBuilds, sweepImageBuilders, sweepSandboxes, testProofIn, timeoutAfter, unfinishedJobs, usableCpus, vmAlive, withTunnelLog, workdirProblem, writeGuestGhConfig, writeRunnerInit };
13152
+ export { ADOPTED_FETCH_RETRY_WINDOW_MS, ALREADY_RELEASED, AttemptLogBook, CRITERIA_CHECK, EXIT_CODE_FILE, GUEST_USAGE_INTERVAL_MS, HELPER_ENV, KIND_LABEL, LEASE_SECONDS, MAX_CHECK_ITEMS_BYTES, MICROVM_COMMAND_DIR, MIN_ENGINE_MAJOR, PLACEHOLDER_MARKER, RENEW_INTERVAL_SECONDS, RunnerInitError, SandboxGoneError, agentCredentialCheck, appendCommandLog, attemptNote, checksIn, claimPermissionProblem, claimRun, commandItems, commandLogOffset, containerCommandExec, createContainerRuntime, createHousekeepingDocker, createLeaseChannel, currentSkillCommand, decideHostBuildSkill, deliverCommitHooks, deliverContainerHooks, deliverExecMaven, deliverJobFiles, deliverSandboxHooks, describeHookEnd, describeMachineDocker, detectMachine, ensureFirecrackerAndJailer, ensureNetworkReady, ensureTunnel, execArgv, execCommandLine, fetchManagedBuildSettings, fetchManagedClaudeKey, filesAreCopied, finishJob, foldSample, formerSkillProblem, formerSkillQueues, freeItemDisksUntil, gitRemoteFor, helperFirecrackerNote, helperSocketPath, holdManagedBuildSettings, holdManagedClaudeKey, hookLimitsFor, hostCommandEnvironment, hostEnvironment, housekeepingDockerIfReachable, inTeardown, installTrust, isContainerTracked, isGroupAlive, isIdle, isIsolatedJob, isJudgeCheck, isMicroVmTracked, isPlaceholderCommand, isReadable, isSandboxTracked, isTimedOut, isTracked, isUnfinished, itemScope, itemTag, jobEnv, jobRecordsClaim, judgeProbe, keepGhConfigCurrent, keptCommitsLine, leaseExpiresAtMs, leaseTimeLeftMs, lifecycleFailureReason, lifecycleSteps, listAdoptableJobs, listItemDisks, listTrackedJobs, listUnreadableJobs, listenOnBroker, makeRecorder, managedBuildSettingsFor, measureDisk, microVmArchSupported, microVmAssetsPinned, microVmCommandLine, microVmOomKills, missingPermissionFix, missingPermissionOf, modellessProblem, modellessQueues, needsAgentCredential, needsBuildSkill, needsRenew, outcomeFromExitCode, parseCpuList, permissionModeProblem, permissionModeProblems, placeholderProblem, placeholderQueues, prepareBranch, prepareResume, prepareRunnerInit, probeCommand, probeHelper, probeMicroVmCommand, probeSandboxCommand, provisionContainer, provisionEnvironment, provisionMicroVm, provisionSandbox, reachDockerStep, readConfigObject, readCpuUsec, readDefinitions, readProvisionOut, readRecords, recordsProofsOnly, recoverLostJobs, releaseLease, removeOldestUntil, renewLease, renewRun, resolveHostBuild, restartSender, restoreSessionIntoContainer, restoreSessionIntoMicroVm, retryFailedReleases, runCommand, runCommandOf, runHook, runHostChecks, runHousekeeping, runIsolation, runRunnerInit, runWithSpawn, sampleGuest, savedStatesDir, scrubReason, serveLease, setStage, setUpRunnerCgroup, shellQuote, startHostServices, startMicroVmCommand, startSandboxCommand, startSender, startServicesFor, stopOrphanedMicroVms, stoppedHelperReason, stripTerminalControls, supportsContainerBuilds, supportsMicroVmBuilds, sweepImageBuilders, sweepSandboxes, testProofIn, timeoutAfter, unfinishedJobs, usableCpus, vmAlive, withTunnelLog, workdirProblem, writeGuestGhConfig, writeRunnerInit };
@@ -2,7 +2,7 @@
2
2
  import { createRequire } from 'node:module';
3
3
  import { CLAUDE_CODE_HOOKS, OPENCODE_CODEC } from './chunk-PLVHIQJN.js';
4
4
  import { CLAUDE_CODE, OPENCODE, NATIVE_AGENTS, LEGACY_AGENT, homeRelative } from './chunk-7PZDPISM.js';
5
- import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
5
+ import { MAINTAINED_SKILLS } from './chunk-ATEMEVFF.js';
6
6
  import { resolvePackageVersion } from './chunk-RA3O54FC.js';
7
7
  import { homeFromEnv } from './chunk-352DHUTP.js';
8
8
  import { forkFor, RAW_MIRROR_SEGMENTS, WarningCollector, WARNING_CODES, isNewerThanSupported, bucketsFromTurns, costOfUsage } from './chunk-N2QYP3NQ.js';
@@ -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-O7IJBJ6Z.js';
4
4
  import { readFileSync, mkdirSync, writeFileSync, renameSync } from 'fs';
5
5
  import { join } from 'path';
6
6
 
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { launchRefusalForSession } from './chunk-WGC7UFRM.js';
4
- import { detectActiveSession } from './chunk-KIYP5TML.js';
5
- import { autoConnect } from './chunk-BDTFO5S7.js';
3
+ import { launchRefusalForSession } from './chunk-C2PZOLN7.js';
4
+ import { detectActiveSession } from './chunk-F4XMG7EO.js';
5
+ import { autoConnect } from './chunk-IPB5UOHH.js';
6
6
  import { C } from './chunk-2AM6Z5BP.js';
7
- import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-OPGF3FUY.js';
8
- import { launchedItemForSession } from './chunk-4OD45RBP.js';
7
+ import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-6ZMFEZ2K.js';
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
11
  import { resolveRepoIdentity } from './chunk-N2QYP3NQ.js';
@@ -1,10 +1,10 @@
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';
3
+ import { detectActiveSession } from './chunk-F4XMG7EO.js';
4
+ import { autoConnect } from './chunk-IPB5UOHH.js';
5
5
  import { C } from './chunk-2AM6Z5BP.js';
6
- import { defaultFetch, unauthorizedMessage, resolveGatewayCredentials } from './chunk-OPGF3FUY.js';
7
- import { parseWorkItemEnv } from './chunk-4OD45RBP.js';
6
+ import { defaultFetch, unauthorizedMessage, resolveGatewayCredentials } from './chunk-6ZMFEZ2K.js';
7
+ import { parseWorkItemEnv } from './chunk-LGJ56FCM.js';
8
8
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
9
9
  import { homeFromEnv } from './chunk-352DHUTP.js';
10
10
  import { resolveRepoIdentity } from './chunk-N2QYP3NQ.js';