@outerlayer/cli 0.40.0-next.20261117034333 → 0.40.0-next.20261117055025

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 (186) hide show
  1. package/README.md +5 -1
  2. package/dist/agent-setup-4J2JL5EB.js +41 -0
  3. package/dist/{agent-subcommand-MW4TF4SG.js → agent-subcommand-64YO6FE4.js} +4 -4
  4. package/dist/{artifact-link-cmd-XUHNVFVU.js → artifact-link-cmd-HYEM4X5U.js} +2 -2
  5. package/dist/{bridge-WEK2IMAD.js → bridge-H72K6N7O.js} +7 -7
  6. package/dist/{build-LJSUCORB.js → build-PBQIJPCC.js} +13 -13
  7. package/dist/{build-disk-S2XHWSDH.js → build-disk-3COAKTPF.js} +11 -11
  8. package/dist/build-info.json +1 -1
  9. package/dist/{builder-TCRJKB2W.js → builder-GOJQQOIV.js} +10 -10
  10. package/dist/caller-BZBHMIA2.js +23 -0
  11. package/dist/{check-Z6GAY2C4.js → check-Y5CTVK5F.js} +55 -55
  12. package/dist/{chunk-UAZBE4O3.js → chunk-2AEXGFFJ.js} +10 -10
  13. package/dist/{chunk-ZQTMWBLA.js → chunk-2L2LLHQW.js} +1 -1
  14. package/dist/{chunk-PB4QDL6Q.js → chunk-3FZXSMIL.js} +4 -4
  15. package/dist/{chunk-V77IQKWK.js → chunk-3QNW4M64.js} +17 -17
  16. package/dist/{chunk-4FTRLX6A.js → chunk-3RG2ZR3J.js} +5 -5
  17. package/dist/{chunk-MEZVLRJK.js → chunk-3RSCWOYQ.js} +10 -10
  18. package/dist/{chunk-ABY722KN.js → chunk-3TEE7JVW.js} +1 -1
  19. package/dist/{chunk-7QIQ7QR3.js → chunk-52CTFVXD.js} +1 -1
  20. package/dist/{chunk-BZFRU6M7.js → chunk-6FWHB4TW.js} +8 -8
  21. package/dist/{chunk-CH3PO7UY.js → chunk-6IGOHB3O.js} +3 -2
  22. package/dist/{chunk-BEK2BZAI.js → chunk-7CK4Z6VC.js} +6 -6
  23. package/dist/{chunk-NWWED36F.js → chunk-7QDRLTFW.js} +1 -1
  24. package/dist/{chunk-TZNIDZGI.js → chunk-AAGXH2FR.js} +1 -1
  25. package/dist/{chunk-QJI56HI2.js → chunk-AQS3AG4T.js} +7 -7
  26. package/dist/{chunk-UUVURKWB.js → chunk-ATK2MNGU.js} +4 -4
  27. package/dist/{chunk-3ETI7MKK.js → chunk-BIBHD4KJ.js} +4 -4
  28. package/dist/{chunk-GQI5N56J.js → chunk-BIXO533I.js} +2 -2
  29. package/dist/{chunk-TTBG7YZW.js → chunk-CKS7B2ZJ.js} +7 -7
  30. package/dist/{chunk-KCLFDN26.js → chunk-CZYUSXAR.js} +3 -3
  31. package/dist/{chunk-D2QNQOFX.js → chunk-D3PPI7I4.js} +1 -1
  32. package/dist/{chunk-3PXV4I75.js → chunk-DMW22UQE.js} +3 -3
  33. package/dist/{chunk-RUSF2YGL.js → chunk-EBSN6K35.js} +6 -6
  34. package/dist/{chunk-MBOQJTOS.js → chunk-FBFYIEHC.js} +4 -4
  35. package/dist/{chunk-H6L6SWMN.js → chunk-FRQLJUID.js} +2 -2
  36. package/dist/{chunk-H4JQKCVP.js → chunk-FUNAQRMN.js} +9 -9
  37. package/dist/{chunk-5EWESACE.js → chunk-FYL2RFHI.js} +3 -3
  38. package/dist/{chunk-PZZS6DHY.js → chunk-G2KLJMPR.js} +8 -8
  39. package/dist/{chunk-K6THWLSJ.js → chunk-H37HSQGH.js} +1 -1
  40. package/dist/{chunk-UFGV3JZ5.js → chunk-H73CCPAW.js} +1 -1
  41. package/dist/{chunk-FLHDVJAV.js → chunk-H7BNWYIA.js} +5 -5
  42. package/dist/{chunk-EBWA6KIE.js → chunk-HHOFP647.js} +1 -1
  43. package/dist/{chunk-AGKUDDIN.js → chunk-HQEPFG5U.js} +1 -1
  44. package/dist/{chunk-D3CALDGC.js → chunk-IHMGZWOB.js} +1 -1
  45. package/dist/{chunk-ABXHYH2Y.js → chunk-ISTSELPU.js} +6 -6
  46. package/dist/{chunk-CNMC4OXO.js → chunk-IXHMDBXY.js} +7 -7
  47. package/dist/{chunk-F4PRZBBJ.js → chunk-J4EPJMU6.js} +2 -2
  48. package/dist/{chunk-33RKRHJG.js → chunk-J7UWKTRV.js} +1 -1
  49. package/dist/{chunk-HI6R4XYD.js → chunk-JMQDGBAF.js} +2 -2
  50. package/dist/{chunk-HSGZ4JEV.js → chunk-K3IO22FH.js} +1 -1
  51. package/dist/{chunk-MG2Y5XYV.js → chunk-K7RHVH7G.js} +218 -59
  52. package/dist/{chunk-PHC24VUU.js → chunk-KPCGSGZS.js} +5 -5
  53. package/dist/{chunk-X6BGCNE3.js → chunk-KZEZBZ4W.js} +8 -8
  54. package/dist/{chunk-WEPLWKV6.js → chunk-L4T6CI57.js} +3 -3
  55. package/dist/{chunk-7PIUTUXI.js → chunk-LX4GPGNE.js} +3 -3
  56. package/dist/{chunk-ZASDJ7F5.js → chunk-MAWSNLSZ.js} +4 -4
  57. package/dist/{chunk-GBLNHZ3E.js → chunk-MN73QQDA.js} +4 -4
  58. package/dist/{chunk-LYHR47YE.js → chunk-O6YRZ4CP.js} +2 -2
  59. package/dist/{chunk-AH2BO6Q6.js → chunk-OA2KHMXX.js} +6 -6
  60. package/dist/{chunk-ZYIVNB6B.js → chunk-PC6BJDBE.js} +4 -4
  61. package/dist/{chunk-6NODVJGM.js → chunk-PIP32M2V.js} +3 -3
  62. package/dist/{chunk-WZ6K327V.js → chunk-PKYJMXRB.js} +8 -8
  63. package/dist/{chunk-CW6H5JXV.js → chunk-PVDIDOKH.js} +40 -9
  64. package/dist/{chunk-V6UDJVVD.js → chunk-QKMVEQXO.js} +3 -3
  65. package/dist/{chunk-FG2E3HES.js → chunk-QMC2MM2S.js} +1 -1
  66. package/dist/{chunk-6ZBUQIJA.js → chunk-QMOE5Y4X.js} +1 -1
  67. package/dist/{chunk-EU6JHHES.js → chunk-QYJYYF3J.js} +247 -61
  68. package/dist/{chunk-P7OXJ3ZD.js → chunk-RC5WWCUS.js} +5 -5
  69. package/dist/{chunk-UE42G3QY.js → chunk-SS3SQYDS.js} +1 -1
  70. package/dist/{chunk-SK4BESZM.js → chunk-SSVM6C5N.js} +1 -1
  71. package/dist/{chunk-UN7RXMOB.js → chunk-T4SVE4O4.js} +4 -4
  72. package/dist/{chunk-I7ZQKMKG.js → chunk-TPLMLNME.js} +1 -1
  73. package/dist/{chunk-VG6FUXGK.js → chunk-UAGUV74T.js} +1 -1
  74. package/dist/{chunk-KDVQGQXM.js → chunk-V56S4A34.js} +1 -1
  75. package/dist/{chunk-S4CX66JO.js → chunk-V65YF5VP.js} +1 -1
  76. package/dist/{chunk-5O7P6VXS.js → chunk-VEW4BPVJ.js} +1 -1
  77. package/dist/{chunk-6QXGAGQY.js → chunk-VH7P6XUP.js} +1 -1
  78. package/dist/{chunk-6GJMRVMX.js → chunk-VUSPSY6N.js} +1 -1
  79. package/dist/{chunk-ZIN6G7DS.js → chunk-WAI7EGGE.js} +1 -1
  80. package/dist/{chunk-H2THCHUP.js → chunk-WHIAOWEN.js} +1 -1
  81. package/dist/{chunk-F6J3ACXH.js → chunk-XVE7HD6X.js} +6 -6
  82. package/dist/{chunk-YICV7DAE.js → chunk-XVTDFLRQ.js} +3 -3
  83. package/dist/{chunk-IQYAPM4S.js → chunk-Y73IIGAU.js} +7 -7
  84. package/dist/{chunk-33DTLCL6.js → chunk-YAB2SVSI.js} +2 -2
  85. package/dist/{chunk-2QFZBWBP.js → chunk-YVLGGDYK.js} +1 -1
  86. package/dist/{chunk-XT6LWXJ2.js → chunk-ZHXBFXG2.js} +1 -1
  87. package/dist/{claude-launcher-HWC5S5HD.js → claude-launcher-43RD6G3Y.js} +7 -7
  88. package/dist/{cli-TWF7CU3E.js → cli-YSZ2PWXK.js} +169 -169
  89. package/dist/{command-KGYVPB7B.js → command-NBKHR4MM.js} +52 -52
  90. package/dist/{config-J4VSNOH4.js → config-OJTLS62B.js} +12 -12
  91. package/dist/{connect-cmd-LPC6J27D.js → connect-cmd-L5KO3U67.js} +13 -13
  92. package/dist/{container-start-O6BAIQGT.js → container-start-NRCXZWBS.js} +49 -49
  93. package/dist/{context-cleanup-VWJSWUJB.js → context-cleanup-REXSRAU6.js} +4 -4
  94. package/dist/{context-show-cmd-B427F3M4.js → context-show-cmd-DAVFJJHX.js} +14 -14
  95. package/dist/{control-plane-launch-WV253P7I.js → control-plane-launch-TARK67QP.js} +14 -14
  96. package/dist/{demo-record-cmd-YRND2HVT.js → demo-record-cmd-BRBXTCSL.js} +8 -8
  97. package/dist/{demo-voice-cmd-TUIXJ7CY.js → demo-voice-cmd-67ZE46PS.js} +20 -20
  98. package/dist/{dist-UV2JOW3N.js → dist-3AH72O53.js} +2 -2
  99. package/dist/{docker-6NO5B657.js → docker-FEOTGBDS.js} +10 -10
  100. package/dist/{doctor-V3Z5CR5Q.js → doctor-3QBRH4YU.js} +51 -51
  101. package/dist/{emit-artifact-cmd-MWDEBRB2.js → emit-artifact-cmd-ZDQ5PPRN.js} +19 -19
  102. package/dist/{emit-cmd-2ADJWBJP.js → emit-cmd-MY3TTOV7.js} +7 -7
  103. package/dist/{emit-criteria-cmd-35O7KR37.js → emit-criteria-cmd-SED3RVYR.js} +16 -16
  104. package/dist/{emit-demo-cmd-HJCW3JEA.js → emit-demo-cmd-VBHIORA3.js} +20 -20
  105. package/dist/{emit-finding-cmd-Q4SN3OA7.js → emit-finding-cmd-NQRNWPFW.js} +16 -16
  106. package/dist/{emit-result-cmd-7VEMDT2P.js → emit-result-cmd-CA3FQUGR.js} +18 -18
  107. package/dist/{emit-step-cmd-DYQM5OQA.js → emit-step-cmd-EZQD56H5.js} +16 -16
  108. package/dist/{exec-client-6WGSNY56.js → exec-client-JEOB57LW.js} +8 -8
  109. package/dist/{find-unit-6BX4K4WV.js → find-unit-HJRHPB3Y.js} +13 -13
  110. package/dist/{findings-cmd-WHQBJZNA.js → findings-cmd-4HKGMYM7.js} +16 -16
  111. package/dist/{fleet-readiness-A67D5OP4.js → fleet-readiness-SPPQPJZI.js} +14 -14
  112. package/dist/{governing-source-C4BMFNFZ.js → governing-source-URY2L5EI.js} +21 -21
  113. package/dist/{guest-init-ZWEJGXQS.js → guest-init-KXWFAIS5.js} +9 -9
  114. package/dist/{hook-fast-SZ5L3ZJK.js → hook-fast-3EMC5BR5.js} +1 -1
  115. package/dist/{hook-install-63GJ3OUI.js → hook-install-2S7NZOBO.js} +4 -4
  116. package/dist/host-checks-527RRKUD.js +82 -0
  117. package/dist/host-key-JGKWDEN7.js +18 -0
  118. package/dist/{image-tag-6HQDPX45.js → image-tag-DJ2DYY75.js} +8 -8
  119. package/dist/index.js +4 -4
  120. package/dist/{init-KOG5S5KX.js → init-6KSNBYRM.js} +47 -47
  121. package/dist/init-ILAIAVL7.js +82 -0
  122. package/dist/{init-agent-XIDQULDZ.js → init-agent-D7K7PKUI.js} +47 -47
  123. package/dist/init-cmd-ZEM335MG.js +53 -0
  124. package/dist/{init-update-7SBDG65Z.js → init-update-2PHTQUR6.js} +24 -24
  125. package/dist/install-cmd-2SO5XQMZ.js +26 -0
  126. package/dist/launch-agent-ZCE2MKWW.js +26 -0
  127. package/dist/{layout-2MIQCJ3U.js → layout-4GFI5FUZ.js} +4 -4
  128. package/dist/{login-browser-ZYWUIEOQ.js → login-browser-G3NBTYT6.js} +2 -2
  129. package/dist/{logs-SP6RPVCP.js → logs-IGY3Z45I.js} +7 -7
  130. package/dist/loop-OY7YZMHJ.js +92 -0
  131. package/dist/machine-HJUWRAJ4.js +82 -0
  132. package/dist/{machine-skills-UYWZXOZI.js → machine-skills-FJPUFZ7N.js} +4 -4
  133. package/dist/{mcp-install-cmd-U2SEWH66.js → mcp-install-cmd-DWN6GODI.js} +4 -4
  134. package/dist/{mcp-serve-cmd-VAQL3CJB.js → mcp-serve-cmd-3ACPN3DK.js} +9 -9
  135. package/dist/{paths-G7LFPGQQ.js → paths-KPYCKVEO.js} +7 -7
  136. package/dist/pending-LR3J3B32.js +18 -0
  137. package/dist/{pidfile-FIVR2HKB.js → pidfile-2TYTTJAD.js} +8 -8
  138. package/dist/{record-K3I7V46A.js → record-SXQN3F2G.js} +8 -8
  139. package/dist/{relay-AQBBQJ5I.js → relay-XUWU6YJA.js} +5 -5
  140. package/dist/{relay-protocol-XZ7WESQL.js → relay-protocol-2ELEUOSS.js} +5 -5
  141. package/dist/{run-cmd-BRUSQKEA.js → run-cmd-ZC6H5JMT.js} +16 -16
  142. package/dist/{runner-agents-KF6EECFW.js → runner-agents-RKBGYF6D.js} +4 -4
  143. package/dist/runner-env-7AZQ443N.js +24 -0
  144. package/dist/{runner-identity-JM3ZQ2PJ.js → runner-identity-IA53MENM.js} +10 -10
  145. package/dist/{runner-key-P6FUFO6Y.js → runner-key-DQG25VKO.js} +47 -47
  146. package/dist/{session-sender-N3U3ZTL3.js → session-sender-HUD6KDQS.js} +19 -19
  147. package/dist/{setup-cmd-F7Y4SFTK.js → setup-cmd-6BBZWFJX.js} +14 -14
  148. package/dist/{setup-wiring-LU6AY2QA.js → setup-wiring-M3NSQHVV.js} +54 -54
  149. package/dist/{spec-cmd-ZNXNMAYA.js → spec-cmd-VKL4K2QQ.js} +17 -17
  150. package/dist/{starter-pack-NEQLRMTX.js → starter-pack-ETRBBABF.js} +5 -5
  151. package/dist/state-5QGIGKBB.js +18 -0
  152. package/dist/{status-N326EK5I.js → status-HSUAGN6D.js} +47 -47
  153. package/dist/{sync-cmd-KG7YQGM6.js → sync-cmd-EPN6VJ4R.js} +18 -18
  154. package/dist/update-steps-CF2EKH43.js +83 -0
  155. package/dist/{watch-3VJ363V2.js → watch-YSSMGF7F.js} +18 -18
  156. package/dist/{work-claim-cmd-MXWB5NG6.js → work-claim-cmd-TV4TJNBE.js} +23 -23
  157. package/dist/{work-cmd-X55AAJG2.js → work-cmd-VWXZLMF4.js} +16 -16
  158. package/dist/{work-comment-cmd-7AL5KEVJ.js → work-comment-cmd-A6OMDNWD.js} +18 -18
  159. package/dist/{work-demo-cmd-6UFGGEMI.js → work-demo-cmd-RO2MNERR.js} +16 -16
  160. package/dist/{work-logs-cmd-DCAV3J7A.js → work-logs-cmd-FNVY6PFY.js} +16 -16
  161. package/dist/{work-mock-cmd-O7KFTS65.js → work-mock-cmd-AC2Z3W7V.js} +16 -16
  162. package/dist/{work-needs-attention-cmd-OD5PTHLX.js → work-needs-attention-cmd-2IEXGHHV.js} +16 -16
  163. package/dist/{work-no-change-cmd-ABYXIOZT.js → work-no-change-cmd-VN5YDUZZ.js} +16 -16
  164. package/dist/{work-open-pr-cmd-WRFHZXVM.js → work-open-pr-cmd-GX3AEJMQ.js} +17 -17
  165. package/dist/{work-pr-cmd-VEH4HP7P.js → work-pr-cmd-PU7YFJDD.js} +16 -16
  166. package/dist/{work-proofs-cmd-TKA3J2II.js → work-proofs-cmd-SM2GQTEF.js} +18 -18
  167. package/dist/{work-proofs-record-WTBSJLET.js → work-proofs-record-RTWRGKIG.js} +24 -24
  168. package/dist/{work-stop-cmd-WF7R6ILK.js → work-stop-cmd-4PKBXINK.js} +16 -16
  169. package/package.json +1 -1
  170. package/skill-pack/maintained/outerlayer-review/SKILL.md +4 -1
  171. package/skill-pack/shipped.json +3 -0
  172. package/skill-pack/template/review/SKILL.md +14 -0
  173. package/dist/agent-setup-UU3NQZ3A.js +0 -41
  174. package/dist/caller-VJBDXZXG.js +0 -23
  175. package/dist/host-checks-SYD7WFUN.js +0 -82
  176. package/dist/host-key-AYXCAME4.js +0 -18
  177. package/dist/init-ULMPF7MK.js +0 -82
  178. package/dist/init-cmd-P7FYHTLS.js +0 -53
  179. package/dist/install-cmd-TWYZTNRV.js +0 -26
  180. package/dist/launch-agent-5MCXT6QN.js +0 -26
  181. package/dist/loop-OU2U7SUJ.js +0 -92
  182. package/dist/machine-NE34TJIO.js +0 -82
  183. package/dist/pending-OEAYMKZO.js +0 -18
  184. package/dist/runner-env-XAO7EBCK.js +0 -24
  185. package/dist/state-VXN7EX2K.js +0 -18
  186. package/dist/update-steps-YQQXESUZ.js +0 -83
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { toolsDockerfile } from './chunk-UUVURKWB.js';
4
- import { claimPidFile, RunnerAlreadyRunningError, releasePidFile } from './chunk-6QXGAGQY.js';
3
+ import { toolsDockerfile } from './chunk-ATK2MNGU.js';
4
+ import { claimPidFile, RunnerAlreadyRunningError, releasePidFile } from './chunk-VH7P6XUP.js';
5
5
  import { startTimeOf } from './chunk-JBJTC3UU.js';
6
6
  import { withNewTokenRetry, REFUSED_BY_REMOTE } from './chunk-FJGYU2EK.js';
7
- import { runnerLabelValue } from './chunk-PZZS6DHY.js';
8
- import { RecipeError, locateRecipe, readRecipe, assertBuildable, writeSanitizedRecipe, classifyProperties, SANITIZED_NAME } from './chunk-K6THWLSJ.js';
7
+ import { runnerLabelValue } from './chunk-G2KLJMPR.js';
8
+ import { RecipeError, locateRecipe, readRecipe, assertBuildable, writeSanitizedRecipe, classifyProperties, SANITIZED_NAME } from './chunk-H37HSQGH.js';
9
9
  import { removeLeftoverGitLocks } from './chunk-A2WPWZJA.js';
10
- import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, repoCacheDir, imagesDir, imageBuildLogsDir, attemptStamp, orgStore, rootfsPathFor } from './chunk-H2THCHUP.js';
11
- import { withGitConfig, tokenHeader } from './chunk-ZYIVNB6B.js';
12
- import { UNIVERSAL_IMAGE_DIGEST, UNIVERSAL_IMAGE_REPOSITORY, UNIVERSAL_IMAGE_SOURCE, buildAgentPin, NODE_IMAGE, UNIVERSAL_IMAGE, MEDIA_PINS, TINI_VERSION, GH_VERSION, imageAgentPins } from './chunk-7QIQ7QR3.js';
10
+ import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, repoCacheDir, imagesDir, imageBuildLogsDir, attemptStamp, orgStore, rootfsPathFor } from './chunk-WHIAOWEN.js';
11
+ import { withGitConfig, tokenHeader } from './chunk-PC6BJDBE.js';
12
+ import { UNIVERSAL_IMAGE_DIGEST, UNIVERSAL_IMAGE_REPOSITORY, UNIVERSAL_IMAGE_SOURCE, buildAgentPin, NODE_IMAGE, UNIVERSAL_IMAGE, MEDIA_PINS, TINI_VERSION, GH_VERSION, imageAgentPins } from './chunk-52CTFVXD.js';
13
13
  import { mkdirSync, writeFileSync, existsSync, mkdtempSync, rmSync, cpSync, readFileSync, readdirSync, lstatSync, readlinkSync } from 'fs';
14
14
  import { tmpdir } from 'os';
15
15
  import { join, dirname } from 'path';
@@ -174,7 +174,7 @@ async function readDefaultBranchFiles(input) {
174
174
  const over = (args, timeoutMs = CLONE_TIMEOUT_MS, raw = false) => withNewTokenRetry2(credential, () => git(input.dir, args, timeoutMs, credential, raw));
175
175
  try {
176
176
  mkdirSync(input.dir, { recursive: true, mode: RUNNER_DIR_MODE });
177
- const defaultBranch = defaultBranchOf(await over(["ls-remote", "--symref", input.remote, "HEAD"], HEAD_TIMEOUT_MS));
177
+ const defaultBranch = input.branch ?? defaultBranchOf(await over(["ls-remote", "--symref", input.remote, "HEAD"], HEAD_TIMEOUT_MS));
178
178
  if (defaultBranch === null) return { ok: false, reason: `${input.remote} does not say which branch is its default; the runner will not guess one` };
179
179
  await git(input.dir, ["init", "--quiet"]);
180
180
  await git(input.dir, ["config", "remote.origin.url", input.remote]);
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { newTokenRetry } from './chunk-FJGYU2EK.js';
4
- import { WorkCommandError, postJson } from './chunk-X6BGCNE3.js';
5
- import { defaultGitRunner, materializeContext, fetchControlPlaneCommit, lookupGoverningSource } from './chunk-4FTRLX6A.js';
6
- import { buildRefusalReason } from './chunk-33RKRHJG.js';
7
- import { unsupportedLayout, layoutRefusalReason, composeDelivery } from './chunk-XT6LWXJ2.js';
8
- import { signingFetchFor } from './chunk-NWWED36F.js';
9
- import { signerFor } from './chunk-6ZBUQIJA.js';
10
- import { SHIM_DIR, stagedContextDir, contextHomeDir, deliveryDir, keptContextDir } from './chunk-H2THCHUP.js';
11
- import { SandboxError, describeSandboxError } from './chunk-ZYIVNB6B.js';
4
+ import { WorkCommandError, postJson } from './chunk-KZEZBZ4W.js';
5
+ import { defaultGitRunner, materializeContext, fetchControlPlaneCommit, lookupGoverningSource } from './chunk-3RG2ZR3J.js';
6
+ import { buildRefusalReason } from './chunk-J7UWKTRV.js';
7
+ import { unsupportedLayout, layoutRefusalReason, composeDelivery } from './chunk-ZHXBFXG2.js';
8
+ import { signingFetchFor } from './chunk-7QDRLTFW.js';
9
+ import { signerFor } from './chunk-QMOE5Y4X.js';
10
+ import { SHIM_DIR, stagedContextDir, contextHomeDir, deliveryDir, keptContextDir } from './chunk-WHIAOWEN.js';
11
+ import { SandboxError, describeSandboxError } from './chunk-PC6BJDBE.js';
12
12
  import { SHIM_SCRIPT, shimScriptFor, GOVERNANCE_VARIABLE } from './chunk-F3J4UKBF.js';
13
13
  import { readDegraded, readContextManifest, readSourceCache } from './chunk-YQR6E6OV.js';
14
14
  import { fstatSync, mkdirSync, writeFileSync, chmodSync, rmSync, cpSync, readFileSync, existsSync, lstatSync } from 'fs';
@@ -512,6 +512,37 @@ async function prefetchGovernedContext(input) {
512
512
  return { reason: `context_unavailable: the control plane named for ${repository} could not be fetched: ${err instanceof Error ? err.message : String(err)}`, transient: false };
513
513
  }
514
514
  }
515
+ async function readGovernedFiles(input) {
516
+ const { repository, source } = input;
517
+ const git = input.git ?? defaultGitRunner;
518
+ let tokenRepository;
519
+ try {
520
+ const fetched = await fetchControlPlaneCommit({
521
+ git,
522
+ home: contextHomeDir(input.configPath, input.organizationId),
523
+ repository: source.repository,
524
+ sha: source.sha,
525
+ remoteUrl: input.controlPlaneUrl(source.repository),
526
+ token: async () => {
527
+ if (input.controlPlaneToken === void 0) return void 0;
528
+ const access = await controlPlaneAccess(input.controlPlaneToken, [{ repository: source.repository }], repository, input.log, input.tag);
529
+ tokenRepository = access?.repository;
530
+ return access?.token;
531
+ },
532
+ policy: buildFetch(true)
533
+ });
534
+ if (!fetched.ok) return { ok: false, reason: fetchFailureReason(fetched, credentialName(tokenRepository), source.repository, source.sha, repository) };
535
+ const files = {};
536
+ for (const path of input.paths) {
537
+ const shown = git(["show", `${fetched.localRef}:${path}`], { cwd: fetched.cacheRepoDir, timeoutMs: 1e4 });
538
+ files[path] = shown.ok ? shown.stdout.toString("utf8") : null;
539
+ }
540
+ return { ok: true, files };
541
+ } catch (err) {
542
+ if (err instanceof TokenRefused) return { ok: false, reason: tokenRefusedReason(err, repository) };
543
+ return { ok: false, reason: `context_unavailable: the control plane named for ${repository} could not be read: ${err instanceof Error ? err.message : String(err)}` };
544
+ }
545
+ }
515
546
  function removeStagedContext(buildDir) {
516
547
  rmSync(stagedContextDir(buildDir), { recursive: true, force: true });
517
548
  }
@@ -567,4 +598,4 @@ async function imageTargetFor(input) {
567
598
  return { ok: true, repository: resolved.source.repository, pinned: { commit: resolved.source.sha, ref: resolved.source.ref } };
568
599
  }
569
600
 
570
- export { BuildTokens, SELF_GOVERNED, WORKFLOW_PERMISSION_REASON, classifyRefusal, commandWithShim, controlPlaneTokenFailure, createRunnerLog, describeCallFailure, formatClock, formatDuration, imageTargetFor, keepStagedContext, keptContextTree, logStamp, pinnedSourceOf, prefetchGovernedContext, refusalCode, relativeToRunner, removeKeptContext, removeStagedContext, resolveGoverningSource, retrySend, shimScript, shortClaim, stageGovernedContext };
601
+ export { BuildTokens, SELF_GOVERNED, WORKFLOW_PERMISSION_REASON, classifyRefusal, commandWithShim, controlPlaneTokenFailure, createRunnerLog, describeCallFailure, formatClock, formatDuration, imageTargetFor, keepStagedContext, keptContextTree, logStamp, pinnedSourceOf, prefetchGovernedContext, readGovernedFiles, refusalCode, relativeToRunner, removeKeptContext, removeStagedContext, resolveGoverningSource, retrySend, shimScript, shortClaim, stageGovernedContext };
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { fetchFactories, selectFactory, saveFactoryConnection, autoConnectedLine } from './chunk-BEK2BZAI.js';
4
- import { resolveGatewayCredentials } from './chunk-NWWED36F.js';
3
+ import { fetchFactories, selectFactory, saveFactoryConnection, autoConnectedLine } from './chunk-7CK4Z6VC.js';
4
+ import { resolveGatewayCredentials } from './chunk-7QDRLTFW.js';
5
5
  import { readCloudConfig } from './chunk-HWVMRETT.js';
6
6
  import { findGitDirs, readRepoConnection } from './chunk-BJ3KTMDH.js';
7
7
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
8
8
  import { homeFromEnv } from './chunk-352DHUTP.js';
9
- import { resolveRepoIdentity } from './chunk-ZIN6G7DS.js';
9
+ import { resolveRepoIdentity } from './chunk-WAI7EGGE.js';
10
10
 
11
11
  createRequire(import.meta.url);
12
12
 
@@ -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-CH3PO7UY.js';
4
+ import { ArtifactTombstoneRecordSchema, ArtifactSpoolRecordSchema } from './chunk-6IGOHB3O.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,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { hostKeyPath, runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-H2THCHUP.js';
3
+ import { hostKeyPath, runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-WHIAOWEN.js';
4
4
  import { generateKeyPairSync, createPrivateKey, createPublicKey, sign } from 'crypto';
5
5
  import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
6
6