@outerlayer/cli 0.36.1-next.20261104165351 → 0.37.0-next.20261104205100

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 (181) hide show
  1. package/dist/agent-setup-DUE6IXPP.js +40 -0
  2. package/dist/{agent-subcommand-ASYEDGY2.js → agent-subcommand-C625JDSN.js} +4 -4
  3. package/dist/{artifact-link-cmd-ZPQXVG5O.js → artifact-link-cmd-72FQTBGO.js} +2 -2
  4. package/dist/{bridge-JYWNVBZW.js → bridge-UHNGV6DM.js} +7 -7
  5. package/dist/{build-G25G35OY.js → build-ALG3MYX2.js} +13 -13
  6. package/dist/{build-disk-LCBVNYLL.js → build-disk-JU2QHE64.js} +11 -11
  7. package/dist/build-info.json +1 -1
  8. package/dist/{builder-VV5Q3IOR.js → builder-4LK2FDCX.js} +10 -10
  9. package/dist/caller-JQC4VW36.js +23 -0
  10. package/dist/{check-3DBOM5UT.js → check-VOJWXIRZ.js} +55 -55
  11. package/dist/{chunk-WUKLQWGY.js → chunk-2JIGPSVF.js} +6 -3
  12. package/dist/{chunk-XGGXKR4M.js → chunk-2KFLMNQU.js} +1 -1
  13. package/dist/{chunk-FHKZZHM3.js → chunk-2LXO2YIW.js} +6 -6
  14. package/dist/{chunk-2CSXFU4A.js → chunk-2QFRAMJX.js} +1 -1
  15. package/dist/{chunk-G3JG75DP.js → chunk-3LT6REKE.js} +2 -2
  16. package/dist/{chunk-IHW5KZN7.js → chunk-3Z5GISKU.js} +42 -142
  17. package/dist/{chunk-ALPMGHDV.js → chunk-4U57GP2X.js} +2 -2
  18. package/dist/{chunk-SMT2K2AR.js → chunk-62RPMJXQ.js} +3 -3
  19. package/dist/{chunk-2BUZUDSH.js → chunk-6BS4DDCY.js} +8 -8
  20. package/dist/{chunk-MA4ZUS4A.js → chunk-6MWBZHBW.js} +1 -1
  21. package/dist/{chunk-ZDFZWQUF.js → chunk-6SC66WGJ.js} +94 -122
  22. package/dist/{chunk-DU2QDWHB.js → chunk-A75ZPAOP.js} +5 -5
  23. package/dist/{chunk-R6G7OGS6.js → chunk-DQZ7XFCI.js} +1 -1
  24. package/dist/{chunk-GXZTSNVW.js → chunk-E2DJ6TWB.js} +3 -3
  25. package/dist/{chunk-5Y7ZBX4U.js → chunk-EDEBGBPL.js} +4 -4
  26. package/dist/{chunk-ZOT3CD34.js → chunk-ERGU3OZP.js} +25 -25
  27. package/dist/{chunk-CQWXQDAZ.js → chunk-FBZE3LGM.js} +1 -1
  28. package/dist/{chunk-EKPSKSEJ.js → chunk-FV52S3JR.js} +2 -2
  29. package/dist/{chunk-TADKX7OA.js → chunk-FX4ZG4E5.js} +16 -16
  30. package/dist/{chunk-6C6WH6KL.js → chunk-FYPVUT27.js} +1 -1
  31. package/dist/{chunk-KNGCCNVO.js → chunk-G43WGW64.js} +4 -4
  32. package/dist/{chunk-ULFMR5UJ.js → chunk-G62P3EFL.js} +3 -3
  33. package/dist/{chunk-3Z5KIYBR.js → chunk-GBCQ3KHH.js} +3 -3
  34. package/dist/{chunk-A72Q4LSP.js → chunk-GF4O3M23.js} +1 -1
  35. package/dist/{chunk-PDBYH3V5.js → chunk-GQA54433.js} +2 -2
  36. package/dist/{chunk-IZKRPQIU.js → chunk-HN76DIHX.js} +7 -7
  37. package/dist/{chunk-C47K5UDL.js → chunk-HOTRWPVM.js} +4 -4
  38. package/dist/{chunk-TLVRBSOX.js → chunk-IHPJFMSV.js} +8 -8
  39. package/dist/{chunk-L2J7B7V6.js → chunk-IJU6DMQA.js} +1 -1
  40. package/dist/{chunk-EJ4MVQYZ.js → chunk-JAHR4LAD.js} +4 -4
  41. package/dist/{chunk-DOSM5H4B.js → chunk-JNGKTJ7L.js} +7 -7
  42. package/dist/{chunk-3TEZYUG6.js → chunk-JO2FOEZE.js} +4 -4
  43. package/dist/{chunk-R6CQLTRC.js → chunk-KCNL7KX2.js} +9 -9
  44. package/dist/{chunk-RFNETJEH.js → chunk-KSSHEWPV.js} +3 -3
  45. package/dist/{chunk-2A5LRRGL.js → chunk-L2PT4NRI.js} +1 -1
  46. package/dist/{chunk-ZV5QX3GK.js → chunk-LLZG5A2J.js} +9 -9
  47. package/dist/{chunk-QQVX4HUP.js → chunk-LNTZH3UL.js} +5 -5
  48. package/dist/{chunk-ULIDETYK.js → chunk-LUQWY7BX.js} +5 -5
  49. package/dist/{chunk-VB6ODZL2.js → chunk-LVZ3UV7T.js} +1 -1
  50. package/dist/{chunk-JXHN4E4Q.js → chunk-MITBH4LH.js} +3 -3
  51. package/dist/{chunk-UDX4B237.js → chunk-MZ2OOMOT.js} +1 -1
  52. package/dist/{chunk-4LA7E3HT.js → chunk-N3FPRSUZ.js} +6 -6
  53. package/dist/{chunk-UYCK4L43.js → chunk-NBGBMZE4.js} +1 -1
  54. package/dist/{chunk-4PGTFUTY.js → chunk-NSDQESOY.js} +1 -1
  55. package/dist/{chunk-NKQL3LHK.js → chunk-NSX2KF4L.js} +1 -1
  56. package/dist/{chunk-V6VMFAKC.js → chunk-OG6RJXQ3.js} +1 -1
  57. package/dist/{chunk-TYLXRXDY.js → chunk-OLZVQCDX.js} +1 -1
  58. package/dist/{chunk-S6AZPAUS.js → chunk-P3KL3ZJF.js} +1 -1
  59. package/dist/{chunk-UN6X7TYJ.js → chunk-P4YTEF6T.js} +1 -1
  60. package/dist/{chunk-K72IBKLA.js → chunk-PNZN656P.js} +1 -1
  61. package/dist/{chunk-FFJHFOFD.js → chunk-Q6FXWSN3.js} +7 -7
  62. package/dist/{chunk-HNKGBQFA.js → chunk-R2IPYS6A.js} +11 -11
  63. package/dist/{chunk-YATN35MN.js → chunk-RFCAK6OI.js} +7 -7
  64. package/dist/{chunk-KWOQTSSZ.js → chunk-RXWFZB3P.js} +1 -1
  65. package/dist/{chunk-Q7CXOTVR.js → chunk-SQWYFCEU.js} +3 -3
  66. package/dist/{chunk-R6SOMMDQ.js → chunk-TCWYLSE3.js} +1 -1
  67. package/dist/{chunk-MFVANFEJ.js → chunk-THL7WJ3F.js} +2 -2
  68. package/dist/{chunk-GBTHXD74.js → chunk-TSYTPW6Y.js} +161 -155
  69. package/dist/{chunk-KQSRABR6.js → chunk-UZNSGMUZ.js} +2 -2
  70. package/dist/{chunk-3NWBJVIL.js → chunk-VNMTA2JE.js} +3 -3
  71. package/dist/{chunk-PCIWQUBH.js → chunk-VTJ5MGGC.js} +6 -6
  72. package/dist/{chunk-KYFMMW65.js → chunk-VV3Y32EV.js} +1 -1
  73. package/dist/{chunk-F3T5QJ24.js → chunk-VVZIFOAN.js} +1 -1
  74. package/dist/{chunk-YMYYRYKE.js → chunk-W6GP4CNN.js} +7 -7
  75. package/dist/{chunk-RTPGEOBA.js → chunk-WCJCGFVQ.js} +1 -1
  76. package/dist/{chunk-RJTFSUZI.js → chunk-XGJXLITW.js} +6 -6
  77. package/dist/{chunk-GPVZFUTD.js → chunk-XMIUPI5N.js} +6 -6
  78. package/dist/{chunk-BCQDEM2N.js → chunk-YLJXRXPX.js} +1 -1
  79. package/dist/{chunk-A6RI6KTI.js → chunk-ZBPUHNUZ.js} +1 -1
  80. package/dist/{chunk-ZEM4IRBH.js → chunk-ZHOPDD7U.js} +5 -5
  81. package/dist/{chunk-FGA3EXGJ.js → chunk-ZQNYV4OZ.js} +1 -1
  82. package/dist/{chunk-3GHHGCNU.js → chunk-ZRITZJ36.js} +6 -6
  83. package/dist/{claude-launcher-WZPO6HPI.js → claude-launcher-HW5YVYWR.js} +7 -7
  84. package/dist/{cli-UPBWBSZK.js → cli-FFPFIMPZ.js} +148 -148
  85. package/dist/{command-FJIGATGO.js → command-MYYGFCW3.js} +50 -50
  86. package/dist/{config-2APX7UB2.js → config-CZJINZN5.js} +12 -12
  87. package/dist/{connect-cmd-NA6MMPXY.js → connect-cmd-4ZEF4WNR.js} +13 -13
  88. package/dist/{container-start-SUDA7O4K.js → container-start-ICNSSPBS.js} +48 -48
  89. package/dist/{context-cleanup-2PECPCE4.js → context-cleanup-7QZQJXID.js} +4 -4
  90. package/dist/{context-show-cmd-PCKELSP2.js → context-show-cmd-JYV7RKMC.js} +14 -14
  91. package/dist/{control-plane-launch-T33K3464.js → control-plane-launch-HLFLGLW6.js} +14 -14
  92. package/dist/{demo-record-cmd-6TY4YHDY.js → demo-record-cmd-MDPZD53Q.js} +8 -8
  93. package/dist/{demo-voice-cmd-LAYGJR4O.js → demo-voice-cmd-4JEXQP4I.js} +20 -20
  94. package/dist/{dist-P4VFDPWT.js → dist-NEH3H3EL.js} +2 -2
  95. package/dist/{docker-PS5OVPIF.js → docker-F4S3PBPD.js} +10 -10
  96. package/dist/{doctor-D6IRPOAQ.js → doctor-LEGPWSQ3.js} +50 -50
  97. package/dist/{emit-artifact-cmd-PQZZORYH.js → emit-artifact-cmd-QDYKKQT5.js} +19 -19
  98. package/dist/{emit-cmd-7JNFV35K.js → emit-cmd-ANJGKYSQ.js} +7 -7
  99. package/dist/{emit-criteria-cmd-HXP5RCRU.js → emit-criteria-cmd-OCLNKIL4.js} +16 -16
  100. package/dist/{emit-demo-cmd-7SGOM2YU.js → emit-demo-cmd-RO3OXK4U.js} +20 -20
  101. package/dist/{emit-finding-cmd-2LEHV4FK.js → emit-finding-cmd-M4OKFZPF.js} +16 -16
  102. package/dist/{emit-result-cmd-P4NAJ2CH.js → emit-result-cmd-CUTNYSOQ.js} +18 -18
  103. package/dist/{emit-step-cmd-K6HYSFGW.js → emit-step-cmd-SY54AQYM.js} +16 -16
  104. package/dist/{exec-client-GEN7MH5Q.js → exec-client-3ZVMZRZD.js} +8 -8
  105. package/dist/find-unit-5ALT2LU3.js +24 -0
  106. package/dist/{findings-cmd-KCDAXNUH.js → findings-cmd-246XYZSE.js} +16 -16
  107. package/dist/{fleet-readiness-OBHMDNEQ.js → fleet-readiness-SOSSKSII.js} +14 -14
  108. package/dist/{governing-source-4PJ6W6RY.js → governing-source-2UXHLXCS.js} +21 -21
  109. package/dist/{guest-init-XN7ZOOK5.js → guest-init-ZNSEHMXA.js} +9 -9
  110. package/dist/{hook-fast-J26JZG67.js → hook-fast-27GO6BM2.js} +1 -1
  111. package/dist/{hook-install-SVEA6RYI.js → hook-install-5OS6ZH4B.js} +4 -4
  112. package/dist/host-checks-VGJVO23Y.js +79 -0
  113. package/dist/host-key-ZRJ4CGFC.js +18 -0
  114. package/dist/{image-tag-MAWC5FC5.js → image-tag-WQB5HVLI.js} +8 -8
  115. package/dist/index.js +4 -4
  116. package/dist/{init-RTJUSLNZ.js → init-F3L4CTBJ.js} +46 -46
  117. package/dist/init-Z6ZVLUJ5.js +79 -0
  118. package/dist/{init-agent-ZQICLASB.js → init-agent-DO233UTF.js} +46 -46
  119. package/dist/{init-cmd-QCLXU6F3.js → init-cmd-AKIPYTNP.js} +27 -27
  120. package/dist/{init-update-4MNOI44P.js → init-update-BIHC42CB.js} +24 -24
  121. package/dist/{install-cmd-LTIF23I4.js → install-cmd-YMPTGHE4.js} +10 -10
  122. package/dist/{layout-J7NA2HJ3.js → layout-DBSSMC4R.js} +4 -4
  123. package/dist/{login-browser-NUQQYH5J.js → login-browser-AMCRDS5C.js} +2 -2
  124. package/dist/{logs-44SEY5AH.js → logs-HIXNEXBT.js} +7 -7
  125. package/dist/loop-MUPQOIW6.js +90 -0
  126. package/dist/machine-WFZ5KM76.js +79 -0
  127. package/dist/{machine-skills-UOF5X7OU.js → machine-skills-QEAB6375.js} +4 -4
  128. package/dist/{mcp-install-cmd-6CP7ODB4.js → mcp-install-cmd-ZL2TJUIK.js} +4 -4
  129. package/dist/{mcp-serve-cmd-QOPRMVCR.js → mcp-serve-cmd-4EGVZBCK.js} +9 -9
  130. package/dist/{paths-IMTP2VFJ.js → paths-AGOA7QX6.js} +7 -7
  131. package/dist/{pending-6LTQDPDQ.js → pending-625SL7WI.js} +8 -8
  132. package/dist/{pidfile-2FKC65BM.js → pidfile-H2DZIODT.js} +8 -8
  133. package/dist/{record-KD3622E7.js → record-UHMPQIUU.js} +8 -8
  134. package/dist/{relay-3RRPUZKH.js → relay-MS7QJ53J.js} +5 -5
  135. package/dist/{relay-protocol-ZFQ3QL76.js → relay-protocol-7LG6NHYA.js} +5 -5
  136. package/dist/{runner-agents-3A2SJEZ7.js → runner-agents-QJCL4MO3.js} +4 -4
  137. package/dist/runner-env-YPIZG3VG.js +24 -0
  138. package/dist/{runner-identity-6UUYHJVJ.js → runner-identity-RPRUONRJ.js} +10 -10
  139. package/dist/{runner-key-R5HMAPIW.js → runner-key-2SKLS37E.js} +46 -46
  140. package/dist/{session-sender-SOYN2W4Z.js → session-sender-B526LNJ6.js} +19 -19
  141. package/dist/{spec-cmd-HVQQ73ST.js → spec-cmd-6TZVHED2.js} +17 -17
  142. package/dist/{starter-pack-RI3RMOOM.js → starter-pack-6TS4PJYJ.js} +5 -5
  143. package/dist/state-ALHXVNOS.js +18 -0
  144. package/dist/{status-AGLJZQF2.js → status-WZCEHCL2.js} +46 -46
  145. package/dist/{sync-cmd-LGYH6DQH.js → sync-cmd-NMWPCIFU.js} +18 -18
  146. package/dist/update-steps-5BGDQTVG.js +80 -0
  147. package/dist/{watch-CHUOAXUM.js → watch-INJRAQRE.js} +18 -18
  148. package/dist/{work-claim-cmd-2LDQQYWT.js → work-claim-cmd-2IOJVHR5.js} +22 -22
  149. package/dist/{work-cmd-ALCIHXMP.js → work-cmd-6JUZHKXN.js} +16 -16
  150. package/dist/{work-comment-cmd-OSC5UISU.js → work-comment-cmd-KK7H6F67.js} +18 -18
  151. package/dist/{work-demo-cmd-EUQ733UV.js → work-demo-cmd-32PXKPZK.js} +16 -16
  152. package/dist/{work-logs-cmd-ILW6PUQT.js → work-logs-cmd-QYSBE2SP.js} +16 -16
  153. package/dist/{work-open-pr-cmd-6IZNKXUC.js → work-open-pr-cmd-PSATZ2BK.js} +17 -17
  154. package/dist/{work-pr-cmd-NC3L2W73.js → work-pr-cmd-BEYPR7TL.js} +16 -16
  155. package/dist/{work-proofs-cmd-24BTANI3.js → work-proofs-cmd-P33QGSIQ.js} +18 -18
  156. package/dist/{work-proofs-record-KGB7FN5R.js → work-proofs-record-FN6M7BIZ.js} +24 -24
  157. package/dist/{work-stop-cmd-C6TTKZW3.js → work-stop-cmd-MUSKJC5M.js} +16 -16
  158. package/package.json +1 -1
  159. package/skill-pack/maintained/outerlayer-build/SKILL.md +8 -9
  160. package/skill-pack/maintained/outerlayer-build/references/agent-briefs.md +56 -45
  161. package/skill-pack/maintained/outerlayer-build/references/criteria-judge.md +40 -36
  162. package/skill-pack/maintained/outerlayer-build/references/evidence.md +5 -7
  163. package/skill-pack/maintained/outerlayer-build/references/release.md +12 -8
  164. package/skill-pack/maintained/outerlayer-build/references/review-briefs.md +5 -5
  165. package/skill-pack/maintained/outerlayer-build/scripts/criterion-citations.mjs +44 -80
  166. package/skill-pack/maintained/outerlayer-cli/SKILL.md +4 -3
  167. package/skill-pack/maintained/outerlayer-cli/references/merge-base-branch.md +29 -2
  168. package/skill-pack/shipped.json +2 -0
  169. package/skill-pack/template/writing-tests/SKILL.md +6 -11
  170. package/skill-pack/validators/acceptance-criteria.yaml +11 -9
  171. package/dist/agent-setup-PBHLFTH5.js +0 -40
  172. package/dist/caller-GSOX6OEA.js +0 -23
  173. package/dist/find-unit-UCWO22YS.js +0 -24
  174. package/dist/host-checks-OLB3DXCU.js +0 -79
  175. package/dist/host-key-V6D7QGRX.js +0 -18
  176. package/dist/init-5LCIMEBR.js +0 -79
  177. package/dist/loop-7T33PKFZ.js +0 -90
  178. package/dist/machine-D7P4L63X.js +0 -79
  179. package/dist/runner-env-CDNYK5XI.js +0 -24
  180. package/dist/state-LBWBA36C.js +0 -18
  181. package/dist/update-steps-HN2DF4QW.js +0 -80
@@ -1,45 +1,45 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { itemsSentence, criteriaOf, hostItemsOf, loadCitationFinder, testFileMatcher, MAX_TEST_FILE_BYTES, MAX_TEST_FILES, criterionInputs, uncitedIds, planCriteria, parseJudgeAnswer, inCriteriaOrder, oneLineReason, judgedItems, IdScan, firstInPathOrder, isSearchCandidate } from './chunk-ZDFZWQUF.js';
3
+ import { itemsSentence, criteriaOf, hostItemsOf, loadCitationFinder, testFileMatcher, planCriteria, judgeGroups, failedItems, inCriteriaOrder, testsByCriterion, oneLineReason, criterionInputs, parseJudgeAnswer, judgedItems, MAX_TEST_FILE_BYTES } from './chunk-6SC66WGJ.js';
4
4
  import { sha256OfFile, downloadPinned, VoiceDownloadError } from './chunk-2PGI6RDE.js';
5
5
  import { zodProblem } from './chunk-I3LTIAOR.js';
6
- import { hasStoredCredential, storeAgentCredential, credentialFromStdin, isAgentName } from './chunk-ZEM4IRBH.js';
7
- import { upgradedStarterText } from './chunk-DU2QDWHB.js';
8
- import { HELPER_PATH, HELPER_RECORD, DOCKERD_LOG } from './chunk-ULFMR5UJ.js';
9
- import { writeDockerClientConfig } from './chunk-V6VMFAKC.js';
10
- import { senderPidfile } from './chunk-3TEZYUG6.js';
11
- import { installScrubContext } from './chunk-R6CQLTRC.js';
6
+ import { hasStoredCredential, storeAgentCredential, credentialFromStdin, isAgentName } from './chunk-ZHOPDD7U.js';
7
+ import { upgradedStarterText } from './chunk-A75ZPAOP.js';
8
+ import { HELPER_PATH, HELPER_RECORD, DOCKERD_LOG } from './chunk-G62P3EFL.js';
9
+ import { writeDockerClientConfig } from './chunk-OG6RJXQ3.js';
10
+ import { senderPidfile } from './chunk-JO2FOEZE.js';
11
+ import { installScrubContext } from './chunk-KCNL7KX2.js';
12
12
  import { readsJobState, READ_JOB_STATE_FORMATS, jobStateFormatOf } from './chunk-ZVB57WI6.js';
13
- import { runnerImageVersion } from './chunk-UYCK4L43.js';
14
- import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey } from './chunk-PDBYH3V5.js';
13
+ import { runnerImageVersion } from './chunk-NBGBMZE4.js';
14
+ import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey } from './chunk-GQA54433.js';
15
15
  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-DOSM5H4B.js';
17
- import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-C47K5UDL.js';
16
+ import { readDefaultBranchFiles, readDefaultBranchHead, buildRepositoryImage, fetchCommit, readBranchHead, diffBetween, prepareImageBuild, KEY_PREFIX, TAG_HOST, SHARED_OWNER, SHARED_NAME, universalBase, metadataFromLabels, writeRecord } from './chunk-JNGKTJ7L.js';
17
+ import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-HOTRWPVM.js';
18
18
  import { isSameProcess, startTimeOf } from './chunk-JBJTC3UU.js';
19
19
  import { currentCliBuild } from './chunk-OGFGZQA3.js';
20
- import { vmExecArgs, runExec, execCapture, waitForAgent } from './chunk-TYLXRXDY.js';
21
- import { socketPathProblem, vsockLinks, linkVsockSockets, GUEST_CID, LEASE_LINK } from './chunk-GXZTSNVW.js';
22
- import { describeCallFailure, shortClaim, retrySend, commandWithShim, logStamp, createRunnerLog, formatDuration, removeKeptContext, formatClock, stageGovernedContext, keptContextTree, removeStagedContext, WORKFLOW_PERMISSION_REASON, refusalCode, resolveGoverningSource, prefetchGovernedContext, controlPlaneTokenFailure, keepStagedContext, pinnedSourceOf, shimScript } from './chunk-FFJHFOFD.js';
23
- import { postJson, WorkCommandError, getJson, isSignatureRefusal } from './chunk-2BUZUDSH.js';
24
- import { runnerCredentialProblem, builtinKind, keyRunnerFactory, optionalEgress, isBuiltinContainer, isBuiltinVm, egressSummary, DEFAULT_WORKSPACE_KEEP_DAYS, DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_SETUP_MINUTES, allowHostProblem, systemClock, emptyEgressCounts, hostAllowed, imageBuildOf, DEFAULT_SAVED_STATE_MAX_BYTES } from './chunk-KNGCCNVO.js';
25
- import { formatBytes, volumeBytes, allocatedBytes, DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK, freeBytes } from './chunk-ALPMGHDV.js';
26
- import { firstLine, writeJobFile, readJobFile, spawnRun, RUNNER_LABEL, BUILD_LABEL, said, NETWORK_HELPER_MEMORY, createDockerHost, builderSpec, containerExecArgs, childEnvironment, readDu, withAnswerProtocol, judgeCommand, MAX_REPORT_BYTES, parseSize, runnerLabelValue, readJobFileChecked, NETWORK_READY_FILE, networkHelperName, prepareRunArgs, containerRunArgs, JUDGE_MAX_TURNS, WORKSPACE_LABEL, homeCopyRunArgs, networkHelperRunArgs, JUDGE_DIR, hashJudgeProgram, identityScript, identityArgs, parseIdentity, mountableHome, homeCopyScript, homeCopyArgs, COMMAND_DIR, judgeProgramRecord, MAX_ITEMS_BYTES, JUDGE_ITEMS, JUDGE_REPORT, identityRunArgs, SAVED_STATE_LABEL } from './chunk-HNKGBQFA.js';
27
- import { universalImagePending, RecipeError, writeSanitizedRecipe, classifyProperties, DOCKER_FEATURE } from './chunk-XGGXKR4M.js';
28
- import { sanitizeTerminal, planArtifactUpload } from './chunk-F3T5QJ24.js';
29
- import { sharedSkillNames, skillConflictMessage } from './chunk-4PGTFUTY.js';
20
+ import { vmExecArgs, runExec, execCapture, waitForAgent } from './chunk-OLZVQCDX.js';
21
+ import { socketPathProblem, vsockLinks, linkVsockSockets, GUEST_CID, LEASE_LINK } from './chunk-E2DJ6TWB.js';
22
+ import { describeCallFailure, shortClaim, retrySend, commandWithShim, logStamp, createRunnerLog, formatDuration, removeKeptContext, formatClock, stageGovernedContext, keptContextTree, removeStagedContext, WORKFLOW_PERMISSION_REASON, refusalCode, resolveGoverningSource, prefetchGovernedContext, controlPlaneTokenFailure, keepStagedContext, pinnedSourceOf, shimScript } from './chunk-Q6FXWSN3.js';
23
+ import { postJson, WorkCommandError, getJson, isSignatureRefusal } from './chunk-6BS4DDCY.js';
24
+ import { runnerCredentialProblem, builtinKind, keyRunnerFactory, optionalEgress, isBuiltinContainer, isBuiltinVm, egressSummary, DEFAULT_WORKSPACE_KEEP_DAYS, DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_SETUP_MINUTES, allowHostProblem, systemClock, emptyEgressCounts, hostAllowed, imageBuildOf, DEFAULT_SAVED_STATE_MAX_BYTES } from './chunk-G43WGW64.js';
25
+ import { formatBytes, volumeBytes, allocatedBytes, DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK, freeBytes } from './chunk-4U57GP2X.js';
26
+ import { firstLine, writeJobFile, readJobFile, spawnRun, RUNNER_LABEL, BUILD_LABEL, said, NETWORK_HELPER_MEMORY, createDockerHost, builderSpec, containerExecArgs, childEnvironment, readDu, withAnswerProtocol, MAX_REPORT_BYTES, parseSize, runnerLabelValue, readJobFileChecked, NETWORK_READY_FILE, networkHelperName, prepareRunArgs, containerRunArgs, judgeCommand, JUDGE_TREE, WORKSPACE_LABEL, homeCopyRunArgs, networkHelperRunArgs, JUDGE_MAX_TURNS, JUDGE_DIR, hashJudgeProgram, identityScript, identityArgs, parseIdentity, mountableHome, homeCopyScript, homeCopyArgs, COMMAND_DIR, judgeProgramRecord, MAX_ITEMS_BYTES, JUDGE_ITEMS, JUDGE_REPORT, identityRunArgs, SAVED_STATE_LABEL } from './chunk-R2IPYS6A.js';
27
+ import { universalImagePending, RecipeError, writeSanitizedRecipe, classifyProperties, DOCKER_FEATURE } from './chunk-2KFLMNQU.js';
28
+ import { sanitizeTerminal, planArtifactUpload } from './chunk-VVZIFOAN.js';
29
+ import { sharedSkillNames, skillConflictMessage } from './chunk-NSDQESOY.js';
30
30
  import { readCloudConfig } from './chunk-HWVMRETT.js';
31
- import { signerFor } from './chunk-UDX4B237.js';
32
- import { vmAssetsDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, jobsDir, storeScopes, spoolDir, orgStoreIn, rootfsDir, imagesDir, sessionsDir, builderCacheDiskPath, buildsDir, buildDir, ghConfigDir, runnerDirOfBuild, mirrorDir, orgHomeDir, jobConsolePath, vsockPath, workspacesDir, builderConsolePath, rootfsPathFor, diskTemplatesDir, deliveryDir, SHIM_DIR } from './chunk-KWOQTSSZ.js';
33
- import { BUILD_HOME, JOB_MOUNT, buildEnvironment, CHECKOUT_DIR, parseIsolation, containerLocalAddress, destinationEnvironment, withHooksPath, startBuildServices, headerVariables, authorEnvironment, sharedUserEnvironment, withTunnelRecord, commitIdentityRecord, repositoriesOf, RELAY_PORT, repositoryPath, lifecycleWorkdir, CHECK_ITEMS_FILE, proxyEnvironment, checkEnvironment, withMiseVariables, checkoutPath, maxDestinations, resolveDestinations, isReservedVariable, classifyAddress, primaryOf, carried6to4, EVAL_INPUT_DIR, isMiseVariableAllowed } from './chunk-RFNETJEH.js';
34
- import { agentCredential, RUNNER_WORDED_REASONS, UNKNOWN_TRACKING_REASON, UNKNOWN_TRANSPORT_REASON, currentAgentCredential, removedAgentCredentialValues, managedAgentCredential, RELAY_USER, realFdStorePort, builtInNames, MAX_MALFORMED_SESSIONS, MALFORMED_REASON, JOIN_WAIT_MS, MAX_OPEN_STREAMS, STREAM_RESET_RATE, STREAM_RESET_BURST, STREAM_WINDOW, SESSION_WINDOW, targetOfPath, AGENT_CREDENTIAL_MISSING, fdName, RELAY_ID, DOCKER_DESKTOP_REASON } from './chunk-EKPSKSEJ.js';
31
+ import { signerFor } from './chunk-MZ2OOMOT.js';
32
+ import { vmAssetsDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, jobsDir, storeScopes, spoolDir, orgStoreIn, rootfsDir, imagesDir, sessionsDir, builderCacheDiskPath, buildsDir, buildDir, ghConfigDir, runnerDirOfBuild, mirrorDir, orgHomeDir, jobConsolePath, vsockPath, workspacesDir, builderConsolePath, rootfsPathFor, diskTemplatesDir, deliveryDir, SHIM_DIR } from './chunk-RXWFZB3P.js';
33
+ import { BUILD_HOME, JOB_MOUNT, buildEnvironment, CHECKOUT_DIR, parseIsolation, containerLocalAddress, destinationEnvironment, withHooksPath, startBuildServices, headerVariables, authorEnvironment, sharedUserEnvironment, withTunnelRecord, commitIdentityRecord, repositoriesOf, RELAY_PORT, repositoryPath, lifecycleWorkdir, CHECK_ITEMS_FILE, proxyEnvironment, checkEnvironment, withMiseVariables, checkoutPath, maxDestinations, resolveDestinations, isReservedVariable, classifyAddress, primaryOf, carried6to4, EVAL_INPUT_DIR, isMiseVariableAllowed } from './chunk-KSSHEWPV.js';
34
+ import { agentCredential, RUNNER_WORDED_REASONS, UNKNOWN_TRACKING_REASON, UNKNOWN_TRANSPORT_REASON, currentAgentCredential, removedAgentCredentialValues, managedAgentCredential, RELAY_USER, realFdStorePort, builtInNames, MAX_MALFORMED_SESSIONS, MALFORMED_REASON, JOIN_WAIT_MS, MAX_OPEN_STREAMS, STREAM_RESET_RATE, STREAM_RESET_BURST, STREAM_WINDOW, SESSION_WINDOW, targetOfPath, AGENT_CREDENTIAL_MISSING, fdName, RELAY_ID, DOCKER_DESKTOP_REASON } from './chunk-FV52S3JR.js';
35
35
  import { versionAtLeast } from './chunk-OV4XTV5M.js';
36
- import { jobAgent, firecrackerArch, MICROVM_ARCHES, FIRECRACKER_VERSION, hostHelperPinned, builderDiskPinned, guestAssetsPinned, runnerAgentNamed, credentialForms, orList, credentialShapes, agentCommands, defaultCommandLine, credentialAgent, 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, 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, agentVersionOf } from './chunk-UN6X7TYJ.js';
37
- import { sessionFolderIn, legacyAgent, defaultAgents, parsePolicy, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, resolvePackRoot, orderSessions, extractFacts, sessionsToTimeline } from './chunk-KQSRABR6.js';
36
+ import { jobAgent, firecrackerArch, MICROVM_ARCHES, FIRECRACKER_VERSION, hostHelperPinned, builderDiskPinned, guestAssetsPinned, runnerAgentNamed, credentialForms, orList, credentialShapes, agentCommands, defaultCommandLine, credentialAgent, 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, 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, agentVersionOf } from './chunk-P4YTEF6T.js';
37
+ import { sessionFolderIn, legacyAgent, defaultAgents, parsePolicy, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, orderSessions, extractFacts, sessionsToTimeline, resolvePackRoot } from './chunk-UZNSGMUZ.js';
38
38
  import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
39
39
  import { resolveVersion } from './chunk-RA3O54FC.js';
40
40
  import { homeFromEnv } from './chunk-352DHUTP.js';
41
- import { scrubText, MIN_SCRUBBED_LITERAL, setCustomScrubbers, setLocalIdentity, setRepoRoot, forkFor, scrubDeep } from './chunk-FGA3EXGJ.js';
42
- import { CheckItemsSchema, downconvertSession } from './chunk-WUKLQWGY.js';
41
+ import { scrubText, MIN_SCRUBBED_LITERAL, setCustomScrubbers, setLocalIdentity, setRepoRoot, forkFor, scrubDeep } from './chunk-ZQNYV4OZ.js';
42
+ import { CheckItemsSchema, CHECK_ITEM_HREF_MAX_LENGTH, downconvertSession } from './chunk-2JIGPSVF.js';
43
43
  import { randomUUID, randomBytes, createHash } from 'crypto';
44
44
  import { rmSync, mkdirSync, existsSync, readFileSync, mkdtempSync, statSync, appendFileSync, writeFileSync, readdirSync, accessSync, constants, openSync, closeSync, renameSync, rmdirSync, createReadStream, lstatSync, unlinkSync, chmodSync, realpathSync, writeSync, truncateSync, cpSync, fstatSync, readSync, createWriteStream, copyFileSync, linkSync } from 'fs';
45
45
  import { join, dirname, isAbsolute, delimiter, sep, basename, relative, resolve } from 'path';
@@ -6457,48 +6457,24 @@ ${rows}
6457
6457
  var LIMIT_KEY_TAIL = " (runner.checks.timeLimitMinutes)";
6458
6458
  var MAX_DIFF_BYTES = 4 * 1024 * 1024;
6459
6459
  var noAgentProgram = (label) => `the image has no ${label} for the judge`;
6460
- var REPORT_CAPTION = "The host's criteria judge, each criterion judged against the test that cites it";
6461
- function testFilesIn(root, isTest, limits2 = { files: MAX_TEST_FILES, bytes: MAX_TEST_FILE_BYTES }) {
6462
- const files = [];
6463
- const walk = (dir, prefix) => {
6464
- for (const name of readdirSync(dir).sort()) {
6465
- if (files.length >= limits2.files) return;
6466
- if (prefix === "" && name === ".git") continue;
6467
- const path = join(dir, name);
6468
- const rel = prefix === "" ? name : `${prefix}/${name}`;
6469
- const stat = lstatSync(path);
6470
- if (stat.isDirectory()) walk(path, rel);
6471
- else if (stat.isFile() && isTest(rel) && stat.size <= limits2.bytes) files.push({ path: rel, contents: readFileSync(path, "utf8") });
6472
- }
6473
- };
6474
- walk(root, "");
6475
- return files;
6476
- }
6477
- function findIdsOutsideTestsIn(root, input, limits2 = { files: MAX_TEST_FILES, bytes: MAX_TEST_FILE_BYTES }) {
6478
- const candidates = [];
6479
- const walk = (dir, prefix) => {
6480
- for (const name of readdirSync(dir)) {
6481
- if (prefix === "" && name === ".git") continue;
6482
- const path = join(dir, name);
6483
- const rel = prefix === "" ? name : `${prefix}/${name}`;
6484
- const stat = lstatSync(path);
6485
- if (stat.isDirectory()) walk(path, rel);
6486
- else if (stat.isFile() && isSearchCandidate({ path: rel, size: stat.size }, input, limits2.bytes)) candidates.push({ path: rel, size: stat.size });
6487
- }
6488
- };
6489
- walk(root, "");
6490
- const scan = new IdScan(input.finder, input.ids);
6491
- for (const { path } of firstInPathOrder(candidates, limits2.files)) {
6492
- if (scan.complete) break;
6493
- let contents;
6494
- try {
6495
- contents = readFileSync(join(root, path), "utf8");
6496
- } catch {
6497
- continue;
6498
- }
6499
- scan.offer(path, contents);
6460
+ var REPORT_CAPTION = "The host's criteria judge, each criterion judged against the tests that prove it";
6461
+ function treeFileText(root, path) {
6462
+ const segments = path.split("/");
6463
+ if (segments.some((segment) => segment === "" || segment === "." || segment === "..")) return void 0;
6464
+ if (segments[0] === ".git") return void 0;
6465
+ let at = root;
6466
+ try {
6467
+ for (const [index, segment] of segments.entries()) {
6468
+ at = join(at, segment);
6469
+ const stat = lstatSync(at);
6470
+ const last = index === segments.length - 1;
6471
+ if (!last && !stat.isDirectory()) return void 0;
6472
+ if (last && (!stat.isFile() || stat.size > MAX_TEST_FILE_BYTES)) return void 0;
6473
+ }
6474
+ return readFileSync(at, "utf8");
6475
+ } catch {
6476
+ return void 0;
6500
6477
  }
6501
- return scan.result();
6502
6478
  }
6503
6479
  function proofsFileIn(root) {
6504
6480
  const path = join(root, ".outerlayer-proofs.yaml");
@@ -6650,27 +6626,15 @@ async function runJudge(input) {
6650
6626
  const fetched = await (deps.fetchCommit ?? fetchCommit)({ remote, dir: branchDir, commit: head, token: readToken });
6651
6627
  if (!fetched.ok) return await fail(check, `the build's tests could not be fetched: ${fetched.reason}`);
6652
6628
  const finder = await loadCitationFinder();
6653
- const list = criteria ?? [];
6654
6629
  const isTest = testFileMatcher(finder, proofsFileIn(branchDir));
6655
- const testFiles = testFilesIn(branchDir, isTest);
6656
- const citations = finder.buildCitations({ ids: list.map((criterion) => criterion.id), files: testFiles, repository: repo, sha: head });
6657
- const testFileText = new Map(testFiles.map((file) => [file.path, file.contents]));
6658
- const inputs = new Map(list.map((criterion) => [criterion.id, criterionInputs({ brief, criterion, citations, testFiles: testFileText })]));
6659
- const uncited = uncitedIds(list, citations);
6660
- let foundIn;
6661
- if (uncited.length > 0) {
6662
- try {
6663
- foundIn = (deps.findIdsOutside ?? findIdsOutsideTestsIn)(branchDir, { isTest, isSearchable: finder.isSearchableFile, finder, ids: uncited });
6664
- } catch (err) {
6665
- log.error(`${tag} the search for the ids of the criteria that no test cites failed: ${describeCallFailure(err)}`);
6666
- }
6667
- }
6668
- const plan = planCriteria({ criteria: list, citations, inputs, previous, noTestFiles: testFiles.length === 0, foundIn });
6630
+ const inputsFor = (criterion, paths) => criterionInputs({ brief, criterion, files: new Map(paths.map((path) => [path, isTest(path) ? treeFileText(branchDir, path) : void 0])) });
6631
+ const list = criteria ?? [];
6632
+ const plan = planCriteria({ criteria: list, previous, inputsFor });
6669
6633
  if (plan.toJudge.length < list.length) {
6670
6634
  log.line(`${tag} judge: ${plan.toJudge.length} of ${list.length} criteria to judge, ${list.length - plan.toJudge.length} settled without the judge`);
6671
6635
  }
6672
6636
  if (criteria !== void 0 && plan.toJudge.length === 0) {
6673
- return await finish2(check, { criteria, items: plan.settled, citations, head, branch, finder, judgeReport: void 0 });
6637
+ return await finish2(check, { criteria, items: plan.settled, head, branch, finder, judgeReport: void 0 });
6674
6638
  }
6675
6639
  let diff = "";
6676
6640
  const startCommit = (job.container ?? job.microvm)?.startCommit;
@@ -6683,40 +6647,31 @@ async function runJudge(input) {
6683
6647
  [the diff was cut at ${MAX_DIFF_BYTES} bytes]
6684
6648
  ` : bytes.toString("utf8");
6685
6649
  }
6686
- await environment.prepare(
6687
- {
6688
- ...criteria === void 0 ? {} : {
6689
- // Only the criteria the judge is asked about. The others are settled.
6690
- "criteria.json": `${JSON.stringify({ criteria: plan.toJudge }, null, 2)}
6691
- `,
6692
- "citations.json": `${JSON.stringify(citations, null, 2)}
6693
- `
6694
- },
6695
- "diff.patch": diff
6696
- },
6697
- branchDir
6698
- );
6650
+ if (criteria !== void 0 && brief.includes("citations.json")) {
6651
+ log.line(`${tag} judge: the brief ${check.judge.brief} asks for a citations.json file, which the host does not write; the judge searches for each criterion's tests instead`);
6652
+ }
6699
6653
  const limitMinutes = config.checks?.timeLimitMinutes ?? DEFAULT_CHECK_TIME_LIMIT_MINUTES;
6700
6654
  const minutes = `${limitMinutes} ${limitMinutes === 1 ? "minute" : "minutes"}`;
6701
- const clear = async () => {
6702
- await environment.clear?.().catch((err) => log.error(`${tag} what the judge left in its folder could not be removed: ${describeCallFailure(err)}`));
6703
- };
6704
6655
  const prompt = withAnswerProtocol(brief, check.judge.subjects);
6705
- const running = environment.run(judgeCommand({ brief: prompt, credential }, runtime.agents), { logPath: join(jobDir, "judge.log") });
6706
- running.catch(() => void 0);
6707
- const timer = timeoutAfter(limitMinutes * 6e4, deps.sleep);
6708
- let outcome;
6709
- try {
6710
- outcome = await Promise.race([running, timer.done]);
6711
- } catch (err) {
6712
- await clear();
6713
- return await fail(check, `the judge could not be run: ${describeCallFailure(err)}`);
6714
- } finally {
6715
- timer.cancel();
6716
- }
6717
- let report;
6718
- let answerText;
6719
- const readOutputs = async () => {
6656
+ const runOnce = async (files, logName) => {
6657
+ await environment.prepare(files, branchDir);
6658
+ const clear = async () => {
6659
+ await environment.clear?.().catch((err) => log.error(`${tag} what the judge left in its folder could not be removed: ${describeCallFailure(err)}`));
6660
+ };
6661
+ const running = environment.run(judgeCommand({ brief: prompt, credential }, runtime.agents), { logPath: join(jobDir, logName) });
6662
+ running.catch(() => void 0);
6663
+ const timer = timeoutAfter(limitMinutes * 6e4, deps.sleep);
6664
+ let outcome;
6665
+ try {
6666
+ outcome = await Promise.race([running, timer.done]);
6667
+ } catch (err) {
6668
+ await clear();
6669
+ throw err;
6670
+ } finally {
6671
+ timer.cancel();
6672
+ }
6673
+ let report;
6674
+ let answerText;
6720
6675
  try {
6721
6676
  report = await environment.readReport();
6722
6677
  } catch (err) {
@@ -6727,42 +6682,83 @@ async function runJudge(input) {
6727
6682
  } catch (err) {
6728
6683
  log.error(`${tag} the judge's items could not be read: ${describeCallFailure(err)}`);
6729
6684
  }
6685
+ if (outcome === "timeout") {
6686
+ await environment.stop().catch((err) => log.error(`${tag} the judge could not be stopped after its time ran out: ${describeCallFailure(err)}`));
6687
+ }
6688
+ await clear();
6689
+ const run = outcome === "timeout" ? { kind: "timeout" } : { kind: "exited", status: outcome.status, stdout: outcome.stdout, stderr: outcome.stderr };
6690
+ return { reply: readJudgeReply(run, minutes, runtime.agents), answer: parseJudgeAnswer(answerText), report };
6691
+ };
6692
+ if (criteria === void 0) {
6693
+ let ran;
6694
+ try {
6695
+ ran = await runOnce({ "diff.patch": diff }, "judge.log");
6696
+ } catch (err) {
6697
+ return await fail(check, `the judge could not be run: ${describeCallFailure(err)}`);
6698
+ }
6699
+ return await finishWhole(check, { ...ran, head, branch });
6700
+ }
6701
+ const testAt = (path, line2) => {
6702
+ if (treeFileText(branchDir, path) === void 0) return void 0;
6703
+ if (!isTest(path)) return "not-a-test";
6704
+ const href = finder.testHref(repo, head, path, line2 ?? 1);
6705
+ return href !== null && href.length <= CHECK_ITEM_HREF_MAX_LENGTH && /^https:\/\/\S+$/.test(href) ? { href } : {};
6730
6706
  };
6731
- if (outcome === "timeout") {
6732
- await readOutputs();
6733
- await environment.stop().catch((err) => log.error(`${tag} the judge could not be stopped after its time ran out: ${describeCallFailure(err)}`));
6734
- } else {
6735
- await readOutputs();
6736
- }
6737
- await clear();
6738
- const run = outcome === "timeout" ? { kind: "timeout" } : { kind: "exited", status: outcome.status, stdout: outcome.stdout, stderr: outcome.stderr };
6739
- const reply = readJudgeReply(run, minutes, runtime.agents);
6740
- const answer = parseJudgeAnswer(answerText);
6741
- if (criteria === void 0) return await finishWhole(check, { reply, answer, report, head, branch });
6742
- const judged = (results2) => [
6743
- ...plan.settled,
6744
- ...judgedItems({ toJudge: plan.toJudge, results: results2, citations, inputs })
6745
- ];
6746
- if (answer?.ok === true) {
6747
- const results2 = new Map(answer.answer.items.map((entry) => [entry.id, entry]));
6748
- return await finish2(check, { criteria, items: judged(results2), citations, head, branch, finder, judgeReport: void 0 });
6749
- }
6750
- if (reply.kind === "none") {
6751
- return await finish2(check, { criteria, items: judged(/* @__PURE__ */ new Map()), citations, head, branch, finder, judgeReport: report, reason: reply.reason, limitKey: reply.limitKey === true });
6752
- }
6753
- if (answer !== void 0) {
6754
- return await finish2(check, { criteria, items: judged(/* @__PURE__ */ new Map()), citations, head, branch, finder, judgeReport: report, reason: answer.reason });
6755
- }
6756
- const failsAll = reply.verdict === "fail" && reply.unmet.size === 0;
6757
- const results = new Map(plan.toJudge.map((criterion) => [criterion.id, { result: failsAll || reply.unmet.has(criterion.id) ? "fail" : "pass" }]));
6758
- return await finish2(check, { criteria, items: judged(results), citations, head, branch, finder, judgeReport: report });
6707
+ let ownTree = false;
6708
+ try {
6709
+ lstatSync(join(branchDir, "tree"));
6710
+ ownTree = true;
6711
+ } catch {
6712
+ }
6713
+ const groups = judgeGroups(plan.toJudge);
6714
+ const items = [...plan.settled];
6715
+ const unanswered = [];
6716
+ let judgeReport;
6717
+ for (const [index, group] of groups.entries()) {
6718
+ const logName = index === 0 ? "judge.log" : `judge-${index + 1}.log`;
6719
+ if (groups.length > 1) log.line(`${tag} judge: group ${index + 1} of ${groups.length} (${group.map((criterion) => criterion.id).join(", ")})`);
6720
+ let ran;
6721
+ try {
6722
+ ran = await runOnce({ "criteria.json": `${JSON.stringify({ criteria: group }, null, 2)}
6723
+ `, "diff.patch": diff }, logName);
6724
+ } catch (err) {
6725
+ const reason = `the judge could not be run: ${describeCallFailure(err)}`;
6726
+ log.error(`${tag} judge failed: ${reason}`);
6727
+ unanswered.push({ reason, limitKey: false });
6728
+ items.push(...failedItems(group, reason));
6729
+ continue;
6730
+ }
6731
+ const judged = (results) => judgedItems({ toJudge: group, commit: head, results, treeRoot: JUDGE_TREE, check: testAt, ownTree, inputsFor });
6732
+ if (ran.answer?.ok === true) {
6733
+ items.push(...judged(new Map(ran.answer.answer.items.map((entry) => [entry.id, entry]))));
6734
+ continue;
6735
+ }
6736
+ if (groups.length === 1) judgeReport = ran.report;
6737
+ if (ran.reply.kind === "none") {
6738
+ const limitKey = ran.reply.limitKey === true;
6739
+ unanswered.push({ reason: ran.reply.reason, limitKey });
6740
+ items.push(...failedItems(group, `${ran.reply.reason}${limitKey ? LIMIT_KEY_TAIL : ""}`));
6741
+ continue;
6742
+ }
6743
+ if (ran.answer !== void 0) {
6744
+ unanswered.push({ reason: ran.answer.reason, limitKey: false });
6745
+ items.push(...failedItems(group, ran.answer.reason));
6746
+ continue;
6747
+ }
6748
+ const reply = ran.reply;
6749
+ const failsAll = reply.verdict === "fail" && reply.unmet.size === 0;
6750
+ items.push(...judged(new Map(group.map((criterion) => [criterion.id, { result: failsAll || reply.unmet.has(criterion.id) ? "fail" : "pass" }]))));
6751
+ }
6752
+ const reasons = [...new Set(unanswered.map((entry) => entry.reason))];
6753
+ const whole = unanswered.length === groups.length && reasons.length === 1 ? { reason: reasons[0], limitKey: unanswered.some((entry) => entry.limitKey) } : void 0;
6754
+ return await finish2(check, { criteria, items, head, branch, finder, judgeReport, ...whole === void 0 ? {} : whole });
6759
6755
  }
6760
6756
  async function finish2(check, at) {
6761
6757
  const items = inCriteriaOrder(at.items, at.criteria);
6762
6758
  const failing = itemsSentence(items, { one: "criterion", many: "criteria" });
6763
6759
  const result = failing === void 0 ? "pass" : "fail";
6764
6760
  const reason = at.reason ?? failing;
6765
- const report = at.judgeReport !== void 0 && at.judgeReport !== "" ? at.judgeReport : renderJudgeReport({ check: check.name, result, reason, items, commit: at.head, extraHead: at.finder.renderBlock(at.citations) });
6761
+ const report = at.judgeReport !== void 0 && at.judgeReport !== "" ? at.judgeReport : renderJudgeReport({ check: check.name, result, reason, items, commit: at.head, extraHead: at.finder.renderBlock(testsByCriterion(items)) });
6766
6762
  const link = await uploadReport(check, report, { branch: at.branch, head: at.head });
6767
6763
  await record(check.name, result, reason, { keyTail: at.limitKey === true ? LIMIT_KEY_TAIL : "", link, items: sendable(items) });
6768
6764
  }
@@ -11292,16 +11288,26 @@ function readInside(root, rel) {
11292
11288
  }
11293
11289
  }
11294
11290
  var MAINTAINED_BRIEF = /^\.(?:agents|outerlayer)\/skills\/(outerlayer-[a-z]+)\/([A-Za-z0-9_./-]+)$/;
11295
- function readBrief(root, brief) {
11291
+ function readBrief(root, brief, log, tag = "") {
11296
11292
  const own = readInside(root, brief);
11297
- if (own !== void 0) return own;
11298
- const match = MAINTAINED_BRIEF.exec(brief);
11299
- if (match === null || match[2].split("/").includes("..") || !MAINTAINED_SKILLS.includes(match[1])) return void 0;
11300
- try {
11301
- return readFileSync(join(resolvePackRoot(), "maintained", match[1], match[2]), "utf8");
11302
- } catch {
11303
- return void 0;
11293
+ const shipped = () => {
11294
+ const match = MAINTAINED_BRIEF.exec(brief);
11295
+ if (match === null || match[2].split("/").includes("..") || !MAINTAINED_SKILLS.includes(match[1])) return void 0;
11296
+ try {
11297
+ return readFileSync(join(resolvePackRoot(), "maintained", match[1], match[2]), "utf8");
11298
+ } catch {
11299
+ return void 0;
11300
+ }
11301
+ };
11302
+ if (own === void 0) return shipped();
11303
+ if (own.includes("citations.json") || own.includes("// proves")) {
11304
+ const current = shipped();
11305
+ if (current !== void 0) {
11306
+ log?.line(`${tag} ${brief} in the repository finds tests by citations, which the host does not write, so the judge follows the brief this CLI ships`);
11307
+ return current;
11308
+ }
11304
11309
  }
11310
+ return own;
11305
11311
  }
11306
11312
  function validatorFilesIn(root) {
11307
11313
  const dir = join(root, VALIDATORS_DIR);
@@ -11340,7 +11346,7 @@ function checksIn(root, log, tag) {
11340
11346
  const hostChecks = loaded.customs.filter((def) => def.runWhere === "host" && def.level !== "off" && def.declaresEmit !== null);
11341
11347
  const checks = [];
11342
11348
  for (const def of hostChecks) {
11343
- if (def.judge !== void 0) checks.push({ name: def.declaresEmit, judge: { brief: def.judge.brief, text: readBrief(root, def.judge.brief), subjects: def.judge.subjects } });
11349
+ if (def.judge !== void 0) checks.push({ name: def.declaresEmit, judge: { brief: def.judge.brief, text: readBrief(root, def.judge.brief, log, tag), subjects: def.judge.subjects } });
11344
11350
  else if (def.command !== void 0) checks.push({ name: def.declaresEmit, command: def.command });
11345
11351
  }
11346
11352
  const unrecorded = loaded.customs.filter((def) => def.level !== "off" && def.declaresEmit === CRITERIA_CHECK && !checks.some((check) => check.name === CRITERIA_CHECK)).map((def) => def.id);
@@ -5,8 +5,8 @@ import { CLAUDE_CODE, NATIVE_AGENTS, LEGACY_AGENT, homeRelative } from './chunk-
5
5
  import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
6
6
  import { resolvePackageVersion } from './chunk-RA3O54FC.js';
7
7
  import { homeFromEnv } from './chunk-352DHUTP.js';
8
- import { forkFor, RAW_MIRROR_SEGMENTS, WarningCollector, WARNING_CODES, isNewerThanSupported, bucketsFromTurns, costOfUsage } from './chunk-FGA3EXGJ.js';
9
- import { RESERVED_EMIT_NAMES, EVENT_TYPES, isHumanUserTurn, INPUT_BAND_BOUNDARIES, parseAgentSession, SCHEMA_VERSION, ARTIFACT_KINDS, ArtifactCriterionIdSchema, SPEED_MAX_LENGTH } from './chunk-WUKLQWGY.js';
8
+ import { forkFor, RAW_MIRROR_SEGMENTS, WarningCollector, WARNING_CODES, isNewerThanSupported, bucketsFromTurns, costOfUsage } from './chunk-ZQNYV4OZ.js';
9
+ import { RESERVED_EMIT_NAMES, EVENT_TYPES, isHumanUserTurn, INPUT_BAND_BOUNDARIES, parseAgentSession, SCHEMA_VERSION, ARTIFACT_KINDS, ArtifactCriterionIdSchema, SPEED_MAX_LENGTH } from './chunk-2JIGPSVF.js';
10
10
  import { __commonJS, __require, __toESM } from './chunk-Z5GEFMRW.js';
11
11
  import { existsSync, readFileSync, mkdirSync, writeFileSync, readdirSync, rmSync, renameSync, realpathSync, readlinkSync, symlinkSync, copyFileSync, statSync, accessSync, constants, lstatSync } from 'fs';
12
12
  import { join as join$1, dirname, sep, basename, relative, delimiter } from 'path';
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { helperSocketPath } from './chunk-GBTHXD74.js';
4
- import { UNIT_MARKER } from './chunk-PCIWQUBH.js';
5
- import { runnerDir } from './chunk-KWOQTSSZ.js';
3
+ import { helperSocketPath } from './chunk-TSYTPW6Y.js';
4
+ import { UNIT_MARKER } from './chunk-VTJ5MGGC.js';
5
+ import { runnerDir } from './chunk-RXWFZB3P.js';
6
6
  import { createHash } from 'crypto';
7
7
  import { join } from 'path';
8
8
 
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { builtinKind, keepsHostBuilder } from './chunk-KNGCCNVO.js';
4
- import { parseSize } from './chunk-HNKGBQFA.js';
5
- import { runnerDir } from './chunk-KWOQTSSZ.js';
6
- import { FD_SLOTS_PER_BUILD, FD_STORE_ENV, BUILD_SLICE_MEMORY_ENV, credentialLineIn, withoutCredentialLines } from './chunk-EKPSKSEJ.js';
7
- import { credentialAgent, credentialNames, credentialForms } from './chunk-UN6X7TYJ.js';
8
- import { defaultAgents } from './chunk-KQSRABR6.js';
3
+ import { builtinKind, keepsHostBuilder } from './chunk-G43WGW64.js';
4
+ import { parseSize } from './chunk-R2IPYS6A.js';
5
+ import { runnerDir } from './chunk-RXWFZB3P.js';
6
+ import { FD_SLOTS_PER_BUILD, FD_STORE_ENV, BUILD_SLICE_MEMORY_ENV, credentialLineIn, withoutCredentialLines } from './chunk-FV52S3JR.js';
7
+ import { credentialAgent, credentialNames, credentialForms } from './chunk-P4YTEF6T.js';
8
+ import { defaultAgents } from './chunk-UZNSGMUZ.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,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
4
- import { skillDir, emitTree, targetIds, classifyTree, emitBuilders, defaultAgents, FORMER_MAINTAINED_NAMES, isMaintainedCopy } from './chunk-KQSRABR6.js';
4
+ import { skillDir, emitTree, targetIds, classifyTree, emitBuilders, defaultAgents, FORMER_MAINTAINED_NAMES, isMaintainedCopy } from './chunk-UZNSGMUZ.js';
5
5
  import { readFileSync, existsSync, unlinkSync, rmdirSync, readdirSync } from 'fs';
6
6
  import { join, dirname, relative, sep } from 'path';
7
7
 
@@ -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-WUKLQWGY.js';
4
+ import { ArtifactTombstoneRecordSchema, ArtifactSpoolRecordSchema } from './chunk-2JIGPSVF.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,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { scrubReason, stripTerminalControls } from './chunk-GBTHXD74.js';
4
- import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-PCIWQUBH.js';
5
- import { RunnerAlreadyRunningError, readPidFile } from './chunk-RTPGEOBA.js';
3
+ import { scrubReason, stripTerminalControls } from './chunk-TSYTPW6Y.js';
4
+ import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-VTJ5MGGC.js';
5
+ import { RunnerAlreadyRunningError, readPidFile } from './chunk-WCJCGFVQ.js';
6
6
  import { isSameProcess } from './chunk-JBJTC3UU.js';
7
- import { isSignatureRefusal, postJson } from './chunk-2BUZUDSH.js';
8
- import { keyRunnerFactory } from './chunk-KNGCCNVO.js';
9
- import { signerFor } from './chunk-UDX4B237.js';
10
- import { pidFilePath } from './chunk-KWOQTSSZ.js';
7
+ import { isSignatureRefusal, postJson } from './chunk-6BS4DDCY.js';
8
+ import { keyRunnerFactory } from './chunk-G43WGW64.js';
9
+ import { signerFor } from './chunk-MZ2OOMOT.js';
10
+ import { pidFilePath } from './chunk-RXWFZB3P.js';
11
11
  import { readFileSync } from 'fs';
12
12
 
13
13
  createRequire(import.meta.url);
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { isSameProcess } from './chunk-JBJTC3UU.js';
4
- import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-KWOQTSSZ.js';
4
+ import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-RXWFZB3P.js';
5
5
  import { existsSync, readFileSync, mkdirSync, writeFileSync, rmSync } from 'fs';
6
6
  import { dirname } from 'path';
7
7
 
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { sanitizeTerminal } from './chunk-F3T5QJ24.js';
4
- import { mcpFiles, skillLinkFolders, isAgentsMdLayout } from './chunk-R6SOMMDQ.js';
5
- import { DEFAULT_DASHBOARD } from './chunk-A6RI6KTI.js';
6
- import { cliFetch, resolveGatewayCredentials } from './chunk-6C6WH6KL.js';
3
+ import { sanitizeTerminal } from './chunk-VVZIFOAN.js';
4
+ import { mcpFiles, skillLinkFolders, isAgentsMdLayout } from './chunk-TCWYLSE3.js';
5
+ import { DEFAULT_DASHBOARD } from './chunk-ZBPUHNUZ.js';
6
+ import { cliFetch, resolveGatewayCredentials } from './chunk-FYPVUT27.js';
7
7
  import { readCloudConfig } from './chunk-HWVMRETT.js';
8
8
  import { findGitDirs, writeRepoConnection, readRepoConnection } from './chunk-BJ3KTMDH.js';
9
9
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
10
- import { defaultAgents } from './chunk-KQSRABR6.js';
11
- import { remoteLookupFailed } from './chunk-FGA3EXGJ.js';
10
+ import { defaultAgents } from './chunk-UZNSGMUZ.js';
11
+ import { remoteLookupFailed } from './chunk-ZQNYV4OZ.js';
12
12
  import { execFileSync } from 'child_process';
13
13
  import { lstatSync } from 'fs';
14
14
  import { join, relative } from 'path';
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { sanitizeTerminal } from './chunk-F3T5QJ24.js';
4
- import { isAgentsMdLayout } from './chunk-R6SOMMDQ.js';
5
- import { resolveGatewayCredentials, defaultFetch } from './chunk-6C6WH6KL.js';
3
+ import { sanitizeTerminal } from './chunk-VVZIFOAN.js';
4
+ import { isAgentsMdLayout } from './chunk-TCWYLSE3.js';
5
+ import { resolveGatewayCredentials, defaultFetch } from './chunk-FYPVUT27.js';
6
6
  import { versionAtLeast } from './chunk-OV4XTV5M.js';
7
7
  import { findGitDirs } from './chunk-BJ3KTMDH.js';
8
- import { machineSkillsState, staleAgentSkills } from './chunk-R6G7OGS6.js';
8
+ import { machineSkillsState, staleAgentSkills } from './chunk-DQZ7XFCI.js';
9
9
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
10
- import { hasSymlinkComponent } from './chunk-NKQL3LHK.js';
11
- import { skillDir, emitTree, targetIds, classifyTree, emitBuilders, AGENTS_SKILLS_BASE, defaultAgents, namesCore, MACHINE_SKILL_PATH, skillBases, isMaintainedCopy, contextAgents, loadTemplateFiles, splitRawFile } from './chunk-KQSRABR6.js';
10
+ import { hasSymlinkComponent } from './chunk-NSX2KF4L.js';
11
+ import { skillDir, emitTree, targetIds, classifyTree, emitBuilders, AGENTS_SKILLS_BASE, defaultAgents, namesCore, MACHINE_SKILL_PATH, skillBases, isMaintainedCopy, contextAgents, loadTemplateFiles, splitRawFile } from './chunk-UZNSGMUZ.js';
12
12
  import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
13
13
  import { execFileSync } from 'child_process';
14
14
  import { existsSync, readFileSync, writeFileSync, realpathSync, readdirSync } from 'fs';
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { currentLink } from './chunk-L2J7B7V6.js';
3
+ import { currentLink } from './chunk-IJU6DMQA.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';
@@ -6,7 +6,7 @@ import { readCloudConfigStrict, CloudConfigError, readCloudConfig, writeCloudCon
6
6
  import { findGitDirs } from './chunk-BJ3KTMDH.js';
7
7
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
8
8
  import { homeFromEnv } from './chunk-352DHUTP.js';
9
- import { CLI_LOGIN_MACHINE_NAME_MAX, CliLoginPollResponseSchema, CLI_LOGIN_KIND, CliLoginRefusalSchema, CliLoginStartedSchema } from './chunk-WUKLQWGY.js';
9
+ import { CLI_LOGIN_MACHINE_NAME_MAX, CliLoginPollResponseSchema, CLI_LOGIN_KIND, CliLoginRefusalSchema, CliLoginStartedSchema } from './chunk-2JIGPSVF.js';
10
10
  import { generateKeyPairSync, privateDecrypt, constants, createPrivateKey } from 'crypto';
11
11
  import { spawn } from 'child_process';
12
12
  import { fstatSync, existsSync, readdirSync, readFileSync, rmSync, mkdirSync, chmodSync, writeFileSync } from 'fs';
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { DEFAULT_UNIT_NAME } from './chunk-PCIWQUBH.js';
4
- import { RUNNER_FILE_MODE } from './chunk-KWOQTSSZ.js';
5
- import { withoutCredentialLines, parseRunnerEnv } from './chunk-EKPSKSEJ.js';
6
- import { headlessNames, runnerAgents, credentialAgent, credentialForms, orList, credentialShapes, credentialEnvPath, forwardedVariables } from './chunk-UN6X7TYJ.js';
7
- import { defaultAgents } from './chunk-KQSRABR6.js';
3
+ import { DEFAULT_UNIT_NAME } from './chunk-VTJ5MGGC.js';
4
+ import { RUNNER_FILE_MODE } from './chunk-RXWFZB3P.js';
5
+ import { withoutCredentialLines, parseRunnerEnv } from './chunk-FV52S3JR.js';
6
+ import { headlessNames, runnerAgents, credentialAgent, credentialForms, orList, credentialShapes, credentialEnvPath, forwardedVariables } from './chunk-P4YTEF6T.js';
7
+ import { defaultAgents } from './chunk-UZNSGMUZ.js';
8
8
  import { existsSync, readFileSync, writeFileSync, renameSync, rmSync } from 'fs';
9
9
  import { join, dirname } from 'path';
10
10
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { inputBandOf, BUCKET_MODEL_MAX_LENGTH } from './chunk-WUKLQWGY.js';
3
+ import { inputBandOf, BUCKET_MODEL_MAX_LENGTH } from './chunk-2JIGPSVF.js';
4
4
  import { readFileSync, mkdirSync, statSync, copyFileSync, renameSync, unlinkSync, writeFileSync, readdirSync, realpathSync, watch as watch$1 } from 'fs';
5
5
  import * as sp5 from 'path';
6
6
  import { join, relative, dirname, resolve, sep } from 'path';