@outerlayer/cli 0.20.0 → 0.22.0

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 (146) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +15 -5
  3. package/dist/{agent-setup-AM42SA2D.js → agent-setup-XAJH6MPW.js} +13 -12
  4. package/dist/build-GTMEADQD.js +12 -0
  5. package/dist/build-command-ND2ENDBS.js +50 -0
  6. package/dist/build-info.json +1 -1
  7. package/dist/{builder-C4QNTYMS.js → builder-OAUSTZHL.js} +7 -5
  8. package/dist/{check-BR5D27CX.js → check-3YHMJQ3P.js} +48 -50
  9. package/dist/{chunk-AD3EYI7P.js → chunk-22DYXLU7.js} +259 -56
  10. package/dist/{chunk-P53VEAOF.js → chunk-2CMJLYV6.js} +1 -1
  11. package/dist/{chunk-FBTGMSQF.js → chunk-2HT2XGJX.js} +16 -9
  12. package/dist/{chunk-S5PCA3SN.js → chunk-2J5JGLW5.js} +1 -1
  13. package/dist/{chunk-R22NZSGA.js → chunk-34XORKFD.js} +9 -9
  14. package/dist/{chunk-QOZKPLVJ.js → chunk-3W333NFO.js} +40 -1
  15. package/dist/{chunk-HOKXGFDR.js → chunk-4JHVPFH6.js} +22 -16
  16. package/dist/{chunk-AMFWYESY.js → chunk-4NM3I3VV.js} +1 -1
  17. package/dist/{chunk-PIZRPNKR.js → chunk-4QKLMNI3.js} +5 -5
  18. package/dist/{chunk-NNLA7LLQ.js → chunk-5OCIHFGE.js} +29 -5
  19. package/dist/{chunk-PSN33ERW.js → chunk-6IO62VJS.js} +3 -3
  20. package/dist/{chunk-7YP7T6GV.js → chunk-7V7KG3YM.js} +2 -2
  21. package/dist/{chunk-QNLX477Q.js → chunk-AEKSX4EY.js} +165 -72
  22. package/dist/{chunk-JHGEBPLE.js → chunk-ATRIVTRE.js} +3 -3
  23. package/dist/{chunk-X5H2WYMB.js → chunk-BLW6GPBZ.js} +1 -1
  24. package/dist/{chunk-MLAAT4S6.js → chunk-C3HKR67W.js} +3 -3
  25. package/dist/{chunk-XZ4H4X5F.js → chunk-C3OVGKVJ.js} +15 -8
  26. package/dist/{chunk-BM63HB2M.js → chunk-EAQSOE62.js} +2 -2
  27. package/dist/{chunk-LW7G5TJB.js → chunk-EXV37PKS.js} +2 -2
  28. package/dist/{chunk-B6SCN5NY.js → chunk-FGW2774C.js} +175 -44
  29. package/dist/{chunk-KYS3TQAG.js → chunk-G2WME4RG.js} +4 -4
  30. package/dist/{chunk-LRG3ZMZD.js → chunk-G6DZCKA6.js} +4 -4
  31. package/dist/chunk-GISNHSYL.js +41 -0
  32. package/dist/{chunk-G2YNJIGF.js → chunk-HCVLP7XA.js} +10 -1
  33. package/dist/{chunk-QEFKA2QD.js → chunk-I66MQDXH.js} +2 -2
  34. package/dist/{chunk-3CWUOFV6.js → chunk-IRBNIRQJ.js} +12 -7
  35. package/dist/{chunk-CG36IONK.js → chunk-JRCSET55.js} +2 -2
  36. package/dist/{chunk-CGGPS7SI.js → chunk-JVB63NIB.js} +5 -5
  37. package/dist/{chunk-M2ZWWTWZ.js → chunk-KDHYLBRR.js} +1 -1
  38. package/dist/{chunk-N2PXGQRL.js → chunk-KIGSGZBB.js} +1 -1
  39. package/dist/{chunk-EAEELQVQ.js → chunk-KOQELWQ6.js} +5 -5
  40. package/dist/{chunk-MTP2QEVO.js → chunk-KPBQYEND.js} +1 -1
  41. package/dist/{chunk-VYAL7PUE.js → chunk-LOB2SUM3.js} +1 -1
  42. package/dist/{chunk-GGOMT6KF.js → chunk-PHHBYAL6.js} +1 -1
  43. package/dist/{chunk-IF2OSI5T.js → chunk-QOALB6ZD.js} +2 -2
  44. package/dist/{chunk-ZX4I2MEK.js → chunk-TPKYTORP.js} +1 -1
  45. package/dist/{chunk-XNGMQ27R.js → chunk-UD3EXMKB.js} +2 -2
  46. package/dist/{chunk-7UWVLZXD.js → chunk-USWVXQIH.js} +1 -1
  47. package/dist/{chunk-BQXFBI7T.js → chunk-V7MQKOZY.js} +32 -7
  48. package/dist/{chunk-6X4SQ5MY.js → chunk-V7SAQ645.js} +1 -1
  49. package/dist/{chunk-TWF3RICI.js → chunk-VSUXCMMH.js} +110 -11
  50. package/dist/{chunk-FVMYKL6L.js → chunk-VWLOQ6FI.js} +1 -1
  51. package/dist/{chunk-3ZR7Y23Y.js → chunk-VX74ND77.js} +650 -70
  52. package/dist/{chunk-Z7K3L4FC.js → chunk-W3SWJ2TD.js} +2 -2
  53. package/dist/chunk-WERZMIKA.js +718 -0
  54. package/dist/{chunk-GEMQLBMW.js → chunk-WMHYIBJW.js} +6 -6
  55. package/dist/{chunk-5VML45HH.js → chunk-XCRZTXRL.js} +2 -2
  56. package/dist/{chunk-ECODQ7II.js → chunk-ZFLOGMUC.js} +1 -1
  57. package/dist/chunk-ZNPE7FW5.js +137 -0
  58. package/dist/claude-launcher-4BQNXYAF.js +267 -0
  59. package/dist/{cli-MKF7TU7X.js → cli-NMGVZQPB.js} +161 -120
  60. package/dist/{command-ZQNEPDS6.js → command-GE62AJZY.js} +32 -34
  61. package/dist/{config-CLSGABD5.js → config-7Q52COZ3.js} +3 -2
  62. package/dist/{connect-cmd-UNYKGDAL.js → connect-cmd-ZFOK6HEL.js} +5 -5
  63. package/dist/{context-cleanup-CHEWNYU6.js → context-cleanup-DSA3HGQU.js} +1 -1
  64. package/dist/{control-plane-launch-34LNRJWR.js → control-plane-launch-SZTE4TUS.js} +62 -28
  65. package/dist/{dist-WO7NOJNG.js → dist-7IH56ELA.js} +1 -1
  66. package/dist/{docker-BFU3AQGY.js → docker-2OVBKVRK.js} +7 -7
  67. package/dist/{doctor-DHUM5DBB.js → doctor-3SQGZVYP.js} +35 -36
  68. package/dist/{emit-artifact-cmd-XBHM647X.js → emit-artifact-cmd-R42BE6ID.js} +19 -18
  69. package/dist/{emit-cmd-W55AEBCA.js → emit-cmd-3W5IO5ET.js} +3 -3
  70. package/dist/{emit-criteria-cmd-UNMWHOUY.js → emit-criteria-cmd-MQZE7W4Y.js} +13 -12
  71. package/dist/{emit-finding-cmd-7JHVRYOP.js → emit-finding-cmd-ZS5JEGGM.js} +13 -12
  72. package/dist/{emit-result-cmd-5NZMLCJK.js → emit-result-cmd-FUE3DXBW.js} +19 -18
  73. package/dist/{emit-step-cmd-347XNGPQ.js → emit-step-cmd-T7PRA44X.js} +14 -13
  74. package/dist/{exec-client-7UMESIE2.js → exec-client-YIDTWXMZ.js} +4 -3
  75. package/dist/{governing-source-HAA4OW57.js → governing-source-TORXL4I4.js} +19 -18
  76. package/dist/{guest-init-KPBQOFE5.js → guest-init-TO6HAWIT.js} +4 -3
  77. package/dist/{hook-fast-RL5E5OXE.js → hook-fast-WFB2ZMRB.js} +2 -2
  78. package/dist/host-key-2LXQDSBO.js +9 -0
  79. package/dist/{import-capture-cmd-TK4XY7RD.js → import-capture-cmd-Q56DDZVO.js} +1 -1
  80. package/dist/index.js +5 -5
  81. package/dist/init-2CRAVIUU.js +52 -0
  82. package/dist/{init-V6FOMD2V.js → init-AHDZCMDC.js} +32 -33
  83. package/dist/{init-cmd-Z4O4PPLZ.js → init-cmd-IXDL2ZSL.js} +25 -23
  84. package/dist/{init-update-7DVAKWW3.js → init-update-YB3PODDH.js} +69 -24
  85. package/dist/{install-4SEFIIW2.js → install-CZUIW2AF.js} +5 -4
  86. package/dist/{install-cmd-QDOTR4OM.js → install-cmd-Q7RJGFUO.js} +6 -5
  87. package/dist/{login-browser-DX35MARZ.js → login-browser-BN5UKPHS.js} +3 -3
  88. package/dist/{logout-cmd-5V5MMBSY.js → logout-cmd-RZFWTNYD.js} +2 -2
  89. package/dist/{logs-AMLKC3VP.js → logs-RJPYTVQE.js} +3 -2
  90. package/dist/loop-ZDW6TRAA.js +75 -0
  91. package/dist/machine-JCOHLASP.js +47 -0
  92. package/dist/{mcp-install-cmd-GGWB3JJ2.js → mcp-install-cmd-GD4QUP7Z.js} +2 -2
  93. package/dist/{mcp-serve-cmd-N3UTY6EE.js → mcp-serve-cmd-IULQPVHL.js} +6 -5
  94. package/dist/{paths-7XP63OAX.js → paths-N3LU4O2Z.js} +3 -2
  95. package/dist/pending-GRCV3ZR4.js +9 -0
  96. package/dist/{pidfile-3DM4OBKO.js → pidfile-IF3TCL5A.js} +4 -3
  97. package/dist/receive-files-T2BIUBQL.js +254 -0
  98. package/dist/{record-3WP6V2K5.js → record-73PQE77B.js} +4 -3
  99. package/dist/relay-PSZ4LGMW.js +210 -0
  100. package/dist/relay-protocol-K7KP2SPI.js +6 -0
  101. package/dist/{runner-env-FRZFFHDF.js → runner-env-LDOBJESN.js} +6 -5
  102. package/dist/runner-identity-RWCBTY2A.js +14 -0
  103. package/dist/{runner-key-5FOWCW7J.js → runner-key-HMYLP6WN.js} +32 -33
  104. package/dist/{session-sender-U2BBUWNO.js → session-sender-2G25JYHI.js} +20 -19
  105. package/dist/{spec-cmd-FVLJOFGC.js → spec-cmd-LBVXM6XS.js} +13 -12
  106. package/dist/{starter-pack-6LQVLBIA.js → starter-pack-5EQYGSJF.js} +2 -2
  107. package/dist/{status-BINH7MBG.js → status-QZB2GWXJ.js} +36 -38
  108. package/dist/{statusline-fast-KN3BX67H.js → statusline-fast-2OK3DVAA.js} +2 -2
  109. package/dist/{sync-cmd-VXOUFS4I.js → sync-cmd-TQQIR4PN.js} +19 -18
  110. package/dist/{watch-OH645CV2.js → watch-4JES4PCS.js} +19 -18
  111. package/dist/{work-claim-cmd-DRQCHCOK.js → work-claim-cmd-XG6O7B63.js} +17 -16
  112. package/dist/{work-cmd-5I3J2XQQ.js → work-cmd-L6WMPAA2.js} +13 -12
  113. package/dist/{work-comment-cmd-UCCPWUSR.js → work-comment-cmd-SNTDCPGH.js} +13 -12
  114. package/dist/{work-logs-cmd-7352CJPG.js → work-logs-cmd-3S7IAVII.js} +13 -12
  115. package/dist/{work-open-pr-cmd-LSH4VHJM.js → work-open-pr-cmd-E3WMO5XT.js} +15 -14
  116. package/dist/{work-pr-cmd-H4OQR26N.js → work-pr-cmd-22T6FG4T.js} +14 -13
  117. package/dist/{work-stop-cmd-CRDHXQVW.js → work-stop-cmd-WR7ESS4Z.js} +13 -12
  118. package/package.json +2 -2
  119. package/skill-pack/maintained/outerlayer-build/SKILL.md +347 -0
  120. package/skill-pack/{template/build → maintained/outerlayer-build}/references/evidence.md +2 -2
  121. package/skill-pack/{template/build → maintained/outerlayer-build}/references/release.md +4 -4
  122. package/skill-pack/{template/build → maintained/outerlayer-build}/references/review-loop.md +3 -1
  123. package/skill-pack/shipped.json +2 -0
  124. package/skill-pack/template/build/SKILL.md +4 -253
  125. package/skill-pack/validators/acceptance-criteria.yaml +1 -1
  126. package/dist/build-TQ6X5PYN.js +0 -12
  127. package/dist/chunk-3UZTIRLF.js +0 -320
  128. package/dist/chunk-CX22S5BA.js +0 -45
  129. package/dist/chunk-LLM3I5YU.js +0 -89
  130. package/dist/chunk-SADUQSO4.js +0 -50
  131. package/dist/chunk-VMJPFQNE.js +0 -261
  132. package/dist/claude-launcher-J5M44PFS.js +0 -115
  133. package/dist/host-key-U4B5QETR.js +0 -8
  134. package/dist/init-XG47KCI4.js +0 -53
  135. package/dist/loop-EAZQMAE2.js +0 -77
  136. package/dist/machine-TRHBT5NE.js +0 -48
  137. package/dist/pending-532ABZYC.js +0 -8
  138. package/dist/relay-L76HDX72.js +0 -46
  139. package/dist/{chunk-YVZJ6GKF.js → chunk-DIB2WLBL.js} +1 -1
  140. package/dist/{chunk-GOSFARMS.js → chunk-F35VMF5M.js} +1 -1
  141. package/dist/{chunk-DSF2FWAZ.js → chunk-IZSVXRDR.js} +1 -1
  142. /package/skill-pack/{template/build → maintained/outerlayer-build}/references/agent-briefs.md +0 -0
  143. /package/skill-pack/{template/build → maintained/outerlayer-build}/references/criteria-judge.md +0 -0
  144. /package/skill-pack/{template/build → maintained/outerlayer-build}/references/review-briefs.md +0 -0
  145. /package/skill-pack/{template/build → maintained/outerlayer-build}/scripts/criterion-citations.mjs +0 -0
  146. /package/skill-pack/{template/build → maintained/outerlayer-build}/scripts/record-criteria.mjs +0 -0
@@ -1,40 +1,42 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { gatherDoctorChecks, doctorExitCode, summarizeChecks, renderDoctorText, recordWrapped, recordUnwrapped, recordRemoval, readManifest, recordInstall, recordStatusline } from './chunk-HOKXGFDR.js';
4
- import './chunk-TWF3RICI.js';
5
- import { verifiedTrackerNames, TRACKERS } from './chunk-FBTGMSQF.js';
6
- import './chunk-IF2OSI5T.js';
7
- import './chunk-CG36IONK.js';
3
+ import { gatherDoctorChecks, doctorExitCode, summarizeChecks, renderDoctorText, recordWrapped, recordUnwrapped, recordRemoval, readManifest, recordInstall, recordStatusline } from './chunk-4JHVPFH6.js';
4
+ import './chunk-VSUXCMMH.js';
5
+ import { verifiedTrackerNames, TRACKERS } from './chunk-2HT2XGJX.js';
6
+ import './chunk-QOALB6ZD.js';
7
+ import './chunk-JRCSET55.js';
8
8
  import './chunk-G3IJ3N6F.js';
9
- import './chunk-BM63HB2M.js';
10
- import { hookFiredMarkerPath, installedCliDistDir } from './chunk-PSN33ERW.js';
11
- import './chunk-DSF2FWAZ.js';
12
- import './chunk-BKO6JEZI.js';
13
- import './chunk-QNLX477Q.js';
14
- import './chunk-YVZJ6GKF.js';
15
- import './chunk-6X4SQ5MY.js';
16
- import './chunk-GOSFARMS.js';
17
- import { C, warnDeprecated, API_KEY_FLAG_DEPRECATION, NO_COLOR_FLAG, stripNoColor } from './chunk-ANPNT6PM.js';
18
- import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
19
- import { settingsPath, readSettings, SettingsParseError, listHookCandidates, wrapHooks, writeSettings, unwrapHooks, REGISTERED_EVENTS, cliCommand, removeHooks, removeStatusline, cliBinResolvable, mergeHooks, repointWrappedHooks, AUTO_WRAP_EVENTS, mergeStatusline } from './chunk-5QRP3MVS.js';
20
- import './chunk-7UWVLZXD.js';
21
- import './chunk-FVMYKL6L.js';
9
+ import './chunk-EAQSOE62.js';
10
+ import './chunk-F35VMF5M.js';
11
+ import './chunk-USWVXQIH.js';
12
+ import './chunk-VWLOQ6FI.js';
22
13
  import './chunk-NTRCK4NH.js';
14
+ import { hookFiredMarkerPath, installedCliDistDir } from './chunk-6IO62VJS.js';
23
15
  import './chunk-ZJSNLVCE.js';
16
+ import './chunk-IZSVXRDR.js';
17
+ import './chunk-BKO6JEZI.js';
18
+ import './chunk-HCVLP7XA.js';
24
19
  import { findGitDirs } from './chunk-BJ3KTMDH.js';
25
- import './chunk-G2YNJIGF.js';
26
- import './chunk-NNLA7LLQ.js';
20
+ import './chunk-AEKSX4EY.js';
21
+ import './chunk-DIB2WLBL.js';
27
22
  import './chunk-EABW6AJQ.js';
23
+ import './chunk-V7SAQ645.js';
24
+ import './chunk-5OCIHFGE.js';
25
+ import { C, warnDeprecated, API_KEY_FLAG_DEPRECATION, NO_COLOR_FLAG, stripNoColor } from './chunk-ANPNT6PM.js';
26
+ import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
28
27
  import { cliInvocation, packageRunnerOf } from './chunk-CRB3POP4.js';
28
+ import { settingsPath, readSettings, SettingsParseError, listHookCandidates, wrapHooks, writeSettings, unwrapHooks, REGISTERED_EVENTS, cliCommand, removeHooks, removeStatusline, cliBinResolvable, mergeHooks, repointWrappedHooks, AUTO_WRAP_EVENTS, mergeStatusline } from './chunk-5QRP3MVS.js';
29
+ import './chunk-W3SWJ2TD.js';
29
30
  import { cloneIsGoverned } from './chunk-YQR6E6OV.js';
30
31
  import { removeJournalHooks, removePreCommitGuardHook } from './chunk-TUSYOL2O.js';
31
32
  import './chunk-WFSUUUAN.js';
32
33
  import './chunk-7VUK5RFS.js';
33
34
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
34
35
  import { resolveVersion } from './chunk-RA3O54FC.js';
35
- import './chunk-M2ZWWTWZ.js';
36
- import './chunk-N2PXGQRL.js';
37
- import './chunk-BQXFBI7T.js';
36
+ import './chunk-KDHYLBRR.js';
37
+ import './chunk-KIGSGZBB.js';
38
+ import './chunk-V7MQKOZY.js';
39
+ import './chunk-GISNHSYL.js';
38
40
  import './chunk-Z5GEFMRW.js';
39
41
  import { EventEmitter } from 'events';
40
42
  import childProcess, { execFileSync } from 'child_process';
@@ -3649,7 +3651,7 @@ function apiKeyOption() {
3649
3651
  return new Option("--api-key <key>", `deprecated: use \`${cliInvocation()} login\` or OUTERLAYER_API_KEY`).hideHelp();
3650
3652
  }
3651
3653
  async function installStarterPackInRepo() {
3652
- const { installStarterPack, formatStarterPackOutput } = await import('./starter-pack-6LQVLBIA.js');
3654
+ const { installStarterPack, formatStarterPackOutput } = await import('./starter-pack-5EQYGSJF.js');
3653
3655
  const cwd = process.cwd();
3654
3656
  let repoRoot = cwd;
3655
3657
  try {
@@ -3779,8 +3781,8 @@ ${starter.output}`),
3779
3781
  }
3780
3782
  }
3781
3783
  async function realConnectDepsForCwd() {
3782
- const { realConnectDeps } = await import('./connect-cmd-UNYKGDAL.js');
3783
- const { resolveRepoIdentity } = await import('./dist-WO7NOJNG.js');
3784
+ const { realConnectDeps } = await import('./connect-cmd-ZFOK6HEL.js');
3785
+ const { resolveRepoIdentity } = await import('./dist-7IH56ELA.js');
3784
3786
  return {
3785
3787
  ...realConnectDeps(),
3786
3788
  home: homeFromEnv(),
@@ -3843,7 +3845,7 @@ states under Starter files.
3843
3845
  `
3844
3846
  ).action(async (opts) => {
3845
3847
  if (opts.update || opts.dryRun) {
3846
- const { runInitUpdate, formatInitUpdate, updateFlagProblem } = await import('./init-update-7DVAKWW3.js');
3848
+ const { runInitUpdate, formatInitUpdate, updateFlagProblem } = await import('./init-update-YB3PODDH.js');
3847
3849
  const problem = updateFlagProblem(opts);
3848
3850
  if (problem !== void 0) {
3849
3851
  fail(problem);
@@ -3857,7 +3859,7 @@ states under Starter files.
3857
3859
  }
3858
3860
  let starterTemplate;
3859
3861
  if (opts.template !== void 0) {
3860
- const { assertKnownTemplate, StarterPackError } = await import('./starter-pack-6LQVLBIA.js');
3862
+ const { assertKnownTemplate, StarterPackError } = await import('./starter-pack-5EQYGSJF.js');
3861
3863
  try {
3862
3864
  assertKnownTemplate(opts.template);
3863
3865
  } catch (err) {
@@ -3890,12 +3892,12 @@ states under Starter files.
3890
3892
  if (changed.length > 0 && !opts.json) process.stdout.write(`Removed the claude function from ${changed.join(", ")}.
3891
3893
  `);
3892
3894
  }
3893
- const shell = !opts.remove && opts.shellFunction !== void 0 ? (await import('./init-cmd-Z4O4PPLZ.js')).applyShellFunctionFlag(opts.shellFunction, { home: homeFromEnv(), shellPath: process.env.SHELL }) : void 0;
3895
+ const shell = !opts.remove && opts.shellFunction !== void 0 ? (await import('./init-cmd-IXDL2ZSL.js')).applyShellFunctionFlag(opts.shellFunction, { home: homeFromEnv(), shellPath: process.env.SHELL }) : void 0;
3894
3896
  if (opts.json) writeJson(shell === void 0 ? outcome.result : { ...outcome.result, shellFunction: { outcome: shell.outcome, reason: shell.reason } });
3895
3897
  else process.stdout.write(outcome.text + (shell?.text ?? ""));
3896
3898
  return;
3897
3899
  }
3898
- const { runInitCommand } = await import('./init-cmd-Z4O4PPLZ.js');
3900
+ const { runInitCommand } = await import('./init-cmd-IXDL2ZSL.js');
3899
3901
  const code = await runInitCommand(
3900
3902
  { json: opts.json, factory: opts.factory, shellFunction: opts.shellFunction },
3901
3903
  {
@@ -3907,7 +3909,7 @@ states under Starter files.
3907
3909
  return { ok, text, detail };
3908
3910
  },
3909
3911
  runAgentSetup: async () => {
3910
- const { runAgentSetup } = await import('./agent-setup-AM42SA2D.js');
3912
+ const { runAgentSetup } = await import('./agent-setup-XAJH6MPW.js');
3911
3913
  return runAgentSetup({ cwd: process.cwd() });
3912
3914
  },
3913
3915
  runDoctorChecks: gatherDoctorChecks,
@@ -3916,7 +3918,7 @@ states under Starter files.
3916
3918
  shellPath: process.env.SHELL,
3917
3919
  interactive: Boolean(process.stdin.isTTY && process.stderr.isTTY) && opts.json !== true,
3918
3920
  ask: async () => {
3919
- const { promptOnTerminal } = await import('./connect-cmd-UNYKGDAL.js');
3921
+ const { promptOnTerminal } = await import('./connect-cmd-ZFOK6HEL.js');
3920
3922
  const answer = await promptOnTerminal({
3921
3923
  message: `Should plain claude start Claude Code through ${cliInvocation()} claude? That is how a session in a governed repository gets its control plane. It adds one block to your zsh or bash startup file.`,
3922
3924
  options: [
@@ -3955,7 +3957,7 @@ linked (true, false, or null when it could not be checked) and, when false,
3955
3957
  linkUrl.
3956
3958
  `
3957
3959
  ).action(async (opts) => {
3958
- const { runConnectCommand } = await import('./connect-cmd-UNYKGDAL.js');
3960
+ const { runConnectCommand } = await import('./connect-cmd-ZFOK6HEL.js');
3959
3961
  const code = await runConnectCommand({ factory: opts.factory, json: opts.json }, await realConnectDepsForCwd(), {
3960
3962
  stdout: process.stdout,
3961
3963
  stderr: process.stderr
@@ -3994,7 +3996,7 @@ Every later command reads the saved file, so none of them needs a key on
3994
3996
  its command line. A saved key is checked for real on the first \`sync\`.
3995
3997
  `
3996
3998
  ).action(async (opts) => {
3997
- const { runLoginCommand, realLoginDeps } = await import('./login-browser-DX35MARZ.js');
3999
+ const { runLoginCommand, realLoginDeps } = await import('./login-browser-BN5UKPHS.js');
3998
4000
  const code = await runLoginCommand(
3999
4001
  {
4000
4002
  browser: opts.browser !== false,
@@ -4018,7 +4020,7 @@ dashboard cannot be reached the local copy is still deleted and the exit
4018
4020
  code is 1: revoke the token on /profile/security.
4019
4021
  `
4020
4022
  ).action(async () => {
4021
- const { runLogoutCommand, realLogoutDeps } = await import('./logout-cmd-5V5MMBSY.js');
4023
+ const { runLogoutCommand, realLogoutDeps } = await import('./logout-cmd-RZFWTNYD.js');
4022
4024
  const code = await runLogoutCommand(realLogoutDeps());
4023
4025
  if (code !== 0) process.exitCode = code;
4024
4026
  });
@@ -4033,7 +4035,7 @@ code is 1: revoke the token on /profile/security.
4033
4035
  else fail(found.reason);
4034
4036
  return;
4035
4037
  }
4036
- const { runSync, SyncConfigError, SyncTransportError } = await import('./sync-cmd-VXOUFS4I.js');
4038
+ const { runSync, SyncConfigError, SyncTransportError } = await import('./sync-cmd-TQQIR4PN.js');
4037
4039
  try {
4038
4040
  const result = await runSync({
4039
4041
  url: opts.url,
@@ -4064,7 +4066,7 @@ code is 1: revoke the token on /profile/security.
4064
4066
  if (invokedCommandToken(argv) === "watch") {
4065
4067
  warnDeprecated(`\`${cliInvocation()} watch\` is now \`${cliInvocation()} daemon\`; the old name will be removed in a future release.`);
4066
4068
  }
4067
- const { runWatch } = await import('./watch-OH645CV2.js');
4069
+ const { runWatch } = await import('./watch-4JES4PCS.js');
4068
4070
  await runWatch({ once: opts.once });
4069
4071
  });
4070
4072
  program2.command("hook <event>", { hidden: true }).description("capture-hook fast path, installed by `init`").action(() => {
@@ -4075,27 +4077,57 @@ code is 1: revoke the token on /profile/security.
4075
4077
  });
4076
4078
  program2.command("claude [args...]").description("start Claude Code with the repository's control plane attached").allowUnknownOption().helpOption(false).action(() => {
4077
4079
  });
4078
- program2.command("broker-relay", { hidden: true }).description("relay a build's loopback connections to the runner's tunnel and destinations").requiredOption("--port <port>", "the loopback port to listen on").requiredOption("--socket <path>", "the runner's tunnel socket").option("--forward <port=socket>", "also relay a loopback port to a destination's socket; repeatable", (value, previous) => [...previous, value], []).action(async (opts) => {
4079
- const { startRelay } = await import('./relay-L76HDX72.js');
4080
+ const brokerRelay = program2.command("broker-relay", { hidden: true }).description("relay a build's loopback connections to the runner's tunnel and destinations").enablePositionalOptions().option("--port <port>", "the loopback port to listen on").option("--socket <path>", "the runner's tunnel socket").option("--join <path>", "the socket the runner's joining process connects to").option("--lease-watchdog", "exit when the runner's lease expiry passes; needs --join").option("--forward <port=target>", "also relay a loopback port to a destination; repeatable", (value, previous) => [...previous, value], []).action(async (opts) => {
4081
+ const { startRelay, startSessionRelay } = await import('./relay-PSZ4LGMW.js');
4082
+ const { TARGET_TUNNEL, targetOfPath } = await import('./relay-protocol-K7KP2SPI.js');
4080
4083
  const port = Number(opts.port);
4081
4084
  if (!Number.isInteger(port) || port < 1 || port > 65535) {
4082
- fail(`--port must be a port number, not ${opts.port}`);
4085
+ fail(opts.port === void 0 ? "--port is required" : `--port must be a port number, not ${opts.port}`);
4086
+ return;
4087
+ }
4088
+ if (opts.socket === void 0 === (opts.join === void 0)) {
4089
+ fail("give one of --socket and --join");
4083
4090
  return;
4084
4091
  }
4085
4092
  const forwards = [];
4086
4093
  for (const spec of opts.forward) {
4087
4094
  const eq = spec.indexOf("=");
4088
4095
  const forwardPort = Number(spec.slice(0, eq));
4089
- if (eq === -1 || !Number.isInteger(forwardPort) || forwardPort < 1 || forwardPort > 65535 || eq === spec.length - 1) {
4090
- fail(`--forward must be <port>=<socket path>, not ${spec}`);
4096
+ const portOk = eq !== -1 && Number.isInteger(forwardPort) && forwardPort >= 1 && forwardPort <= 65535 && eq !== spec.length - 1;
4097
+ if (!portOk || opts.join !== void 0 && targetOfPath(`/${spec.slice(eq + 1)}`) === void 0) {
4098
+ fail(`--forward must be <port>=<${opts.join === void 0 ? "socket path" : "target"}>, not ${spec}`);
4091
4099
  return;
4092
4100
  }
4093
- forwards.push({ port: forwardPort, socketPath: spec.slice(eq + 1) });
4101
+ forwards.push({ port: forwardPort, spec: spec.slice(eq + 1) });
4102
+ }
4103
+ if (opts.join !== void 0) {
4104
+ await startSessionRelay({
4105
+ joinPath: opts.join,
4106
+ ...opts.leaseWatchdog === true ? { onLeaseExpired: () => process.exit(0) } : {},
4107
+ ports: [{ port, target: TARGET_TUNNEL }, ...forwards.map((forward) => ({ port: forward.port, target: forward.spec }))]
4108
+ });
4109
+ return;
4110
+ }
4111
+ await startRelay({ port, socketPath: opts.socket, forwards: forwards.map((forward) => ({ port: forward.port, socketPath: forward.spec })) });
4112
+ });
4113
+ brokerRelay.command("join").description("carry the runner's session to the relay over standard input and output").option("--socket <path>", "the relay's joining socket", "/run/outerlayer-relay/join.sock").action(async (opts) => {
4114
+ const { joinRelay } = await import('./relay-PSZ4LGMW.js');
4115
+ try {
4116
+ await joinRelay({ socketPath: opts.socket, input: process.stdin, output: process.stdout });
4117
+ } catch (err) {
4118
+ fail(`could not join the relay at ${opts.socket}: ${err instanceof Error ? err.message : String(err)}`);
4119
+ }
4120
+ });
4121
+ program2.command("receive-files", { hidden: true }).description("unpack a tar stream from standard input into a folder of a container build").requiredOption("--into <dir>", "the folder to fill: /outerlayer/job, /outerlayer/judge, or a folder beneath one").option("--replace", "empty the folder first").action(async (opts) => {
4122
+ const { receiveFiles } = await import('./receive-files-T2BIUBQL.js');
4123
+ try {
4124
+ await receiveFiles(process.stdin, { into: opts.into, replace: opts.replace === true });
4125
+ } catch (err) {
4126
+ fail(err instanceof Error ? err.message : "the files could not be received");
4094
4127
  }
4095
- await startRelay({ port, socketPath: opts.socket, forwards });
4096
4128
  });
4097
4129
  program2.command("vm-exec", { hidden: true }).description("run a command in a microVM build's guest through its exec agent").requiredOption("--socket <path>", "the Unix socket Firecracker serves the build's vsock device on").option("--user <user>", "the user to run as", "").option("--cwd <dir>", "the working directory", "/").option("--env <NAME=value>", "an environment value the command line carries; repeatable", (value, previous) => [...previous, value], []).option("--pass <NAME>", "an environment variable whose value is read from this process; repeatable", (value, previous) => [...previous, value], []).argument("<argv...>", "the command and its arguments").action(async (argv2, opts) => {
4098
- const { runVmExec } = await import('./exec-client-7UMESIE2.js');
4130
+ const { runVmExec } = await import('./exec-client-YIDTWXMZ.js');
4099
4131
  const env = {};
4100
4132
  for (const entry of opts.env) {
4101
4133
  const eq = entry.indexOf("=");
@@ -4119,8 +4151,12 @@ code is 1: revoke the token on /profile/security.
4119
4151
  process.exit(255);
4120
4152
  }
4121
4153
  });
4154
+ program2.command("build-command", { hidden: true }).description("run a container build's command and record its exit code").option("--dir <path>", "the folder for command.log, command.pid and exit-code", "/build/.command").argument("<command...>", "the command to run, after --").action(async (command, opts) => {
4155
+ const { runBuildCommand } = await import('./build-command-ND2ENDBS.js');
4156
+ process.exitCode = await runBuildCommand({ dir: opts.dir, argv: command });
4157
+ });
4122
4158
  program2.command("session-sender", { hidden: true }).description("stream a runner build's sessions to its work item while the build runs").action(async () => {
4123
- const { runSessionSender } = await import('./session-sender-U2BBUWNO.js');
4159
+ const { runSessionSender } = await import('./session-sender-2G25JYHI.js');
4124
4160
  try {
4125
4161
  await runSessionSender();
4126
4162
  } catch (err) {
@@ -4128,7 +4164,7 @@ code is 1: revoke the token on /profile/security.
4128
4164
  }
4129
4165
  });
4130
4166
  program2.command("vm-init", { hidden: true }).description("lay out a microVM build's guest; the guest helper runs it").action(async () => {
4131
- const { realGuestHost, runGuestInit } = await import('./guest-init-KPBQOFE5.js');
4167
+ const { realGuestHost, runGuestInit } = await import('./guest-init-TO6HAWIT.js');
4132
4168
  const { readFileSync: readFileSync3 } = await import('fs');
4133
4169
  try {
4134
4170
  runGuestInit(realGuestHost(), readFileSync3("/proc/cmdline", "utf8"));
@@ -4156,7 +4192,7 @@ async function runCli(processArgv) {
4156
4192
  await buildProgram(argv).parseAsync(argv);
4157
4193
  }
4158
4194
  async function compileContext(opts) {
4159
- const { runEmit, EmitError } = await import('./emit-cmd-W55AEBCA.js');
4195
+ const { runEmit, EmitError } = await import('./emit-cmd-3W5IO5ET.js');
4160
4196
  try {
4161
4197
  const result = runEmit({ cwd: opts.dir, check: opts.check, json: opts.json });
4162
4198
  if (result.exitCode !== 0) process.exitCode = result.exitCode;
@@ -4203,7 +4239,7 @@ Compiling .outerlayer/ moved to \`${cliInvocation()} context emit\`.
4203
4239
  await compileContext({ dir: opts.dir, check: opts.check, json: opts.json });
4204
4240
  return;
4205
4241
  }
4206
- const { runEmitResult, EmitResultError } = await import('./emit-result-cmd-5NZMLCJK.js');
4242
+ const { runEmitResult, EmitResultError } = await import('./emit-result-cmd-FUE3DXBW.js');
4207
4243
  try {
4208
4244
  const result = await runEmitResult({
4209
4245
  name,
@@ -4253,7 +4289,7 @@ everywhere, bytes and deep link untouched; a still-queued one is cancelled
4253
4289
  locally so it never uploads. One correction can retire several duplicates.
4254
4290
  `
4255
4291
  ).action(async (file, opts) => {
4256
- const { runEmitArtifact, EmitArtifactError } = await import('./emit-artifact-cmd-XBHM647X.js');
4292
+ const { runEmitArtifact, EmitArtifactError } = await import('./emit-artifact-cmd-R42BE6ID.js');
4257
4293
  let pr;
4258
4294
  if (opts.pr !== void 0) {
4259
4295
  pr = parseTrackerNumber(opts.pr);
@@ -4312,7 +4348,7 @@ recent events with their ids. --find <text> searches all of them.
4312
4348
  item that session was launched for is used automatically.
4313
4349
  `
4314
4350
  ).action(async (opts) => {
4315
- const { runEmitFinding, refuseRemovedFindingFlags, EmitFindingError } = await import('./emit-finding-cmd-7JHVRYOP.js');
4351
+ const { runEmitFinding, refuseRemovedFindingFlags, EmitFindingError } = await import('./emit-finding-cmd-ZS5JEGGM.js');
4316
4352
  try {
4317
4353
  refuseRemovedFindingFlags(opts);
4318
4354
  const result = await runEmitFinding({
@@ -4379,7 +4415,7 @@ the whole batch. "untimed": true records one with no time on purpose.
4379
4415
  that session was launched for is used automatically.
4380
4416
  `
4381
4417
  ).action(async (file, opts) => {
4382
- const { runEmitFindings, EmitFindingError } = await import('./emit-finding-cmd-7JHVRYOP.js');
4418
+ const { runEmitFindings, EmitFindingError } = await import('./emit-finding-cmd-ZS5JEGGM.js');
4383
4419
  try {
4384
4420
  const result = await runEmitFindings({
4385
4421
  file,
@@ -4414,7 +4450,7 @@ command, the command exits 0, and \`sync\` sends it later. If the gateway refuse
4414
4450
  the step, the command prints why and exits 1.
4415
4451
  `
4416
4452
  ).action(async (name, opts) => {
4417
- const { runEmitStep, EmitStepError } = await import('./emit-step-cmd-347XNGPQ.js');
4453
+ const { runEmitStep, EmitStepError } = await import('./emit-step-cmd-T7PRA44X.js');
4418
4454
  try {
4419
4455
  await runEmitStep({
4420
4456
  name,
@@ -4457,7 +4493,7 @@ of the item, and a (proof: <kind>) annotation names its proof.
4457
4493
  ${cliInvocation()} emit criteria acceptance/412-login.md --item 412
4458
4494
  `
4459
4495
  ).action(async (file, opts) => {
4460
- const { runEmitCriteria, EmitCriteriaError } = await import('./emit-criteria-cmd-UNMWHOUY.js');
4496
+ const { runEmitCriteria, EmitCriteriaError } = await import('./emit-criteria-cmd-MQZE7W4Y.js');
4461
4497
  try {
4462
4498
  const result = await runEmitCriteria({
4463
4499
  file,
@@ -4481,9 +4517,9 @@ function registerSpecCommands(program2) {
4481
4517
  const specCmd = program2.command("spec").description("Find, file and edit the issue a spec lives in, in your factory's tracker");
4482
4518
  const credentialOptions = (command) => command.option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "factory id the key is bound to (or OUTERLAYER_APP_ID / config)");
4483
4519
  const run = async (action) => {
4484
- const { WorkCommandError } = await import('./work-cmd-5I3J2XQQ.js');
4520
+ const { WorkCommandError } = await import('./work-cmd-L6WMPAA2.js');
4485
4521
  try {
4486
- await action(await import('./spec-cmd-FVLJOFGC.js'));
4522
+ await action(await import('./spec-cmd-LBVXM6XS.js'));
4487
4523
  } catch (err) {
4488
4524
  if (err instanceof WorkCommandError) {
4489
4525
  fail(err.message);
@@ -4507,11 +4543,12 @@ function registerSpecCommands(program2) {
4507
4543
  }
4508
4544
  function registerWorkCommands(program2) {
4509
4545
  const workCmd = program2.command("work").description("Start, remove, or read what the factory is working on (the Work page)");
4510
- workCmd.command("build").description("Start work on an item: a host builds it, or with --local you do").option("--issue <number>", "issue number, or a Linear/Jira key like ENG-123 (adds it to Work first)").option(TRACKER_OPTION_FLAG, "tracker for a keyed --issue \u2014 required if more than one is connected").option("--item <number>", "the item's own number inside this factory \u2014 must already exist").option("--local", "you build it in a session you start; no host takes it").option("--repo <owner/name>", "repository \u2014 the checkout's remote for a number, never guessed for a key").option("--note <text>", "a short note stored with the request").option("--session-id <id>", "session id to record as-is, skipping detection").option("--retry <count>", "retries after a gateway answer worth trying again").option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "factory id the key is bound to (or OUTERLAYER_APP_ID / config)").addHelpText(
4546
+ workCmd.command("build").description("Start work on an item: a host builds it, or with --local you do").option("--issue <number>", "issue number, or a Linear/Jira key like ENG-123 (adds it to Work first)").option(TRACKER_OPTION_FLAG, "tracker for a keyed --issue \u2014 required if more than one is connected").option("--item <number>", "the item's own number inside this factory \u2014 must already exist").option("--local", "you build it in a session you start; no host takes it").option("--repo <owner/name>", "repository \u2014 the checkout's remote for a number, never guessed for a key").option("--note <text>", "a short note for people to read; the agent never sees it").option("--instructions <text>", "text the build's agent receives, up to 2000 characters; not with --local").option("--session-id <id>", "session id to record as-is, skipping detection").option("--retry <count>", "retries after a gateway answer worth trying again").option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "factory id the key is bound to (or OUTERLAYER_APP_ID / config)").addHelpText(
4511
4547
  "after",
4512
4548
  `
4513
4549
  ${cliInvocation()} work build --issue 42 # a host builds it
4514
4550
  ${cliInvocation()} work build --item 7 # retry an item already on Work
4551
+ ${cliInvocation()} work build --issue 42 --instructions "skip the docs" # the agent reads this
4515
4552
  ${cliInvocation()} work build --issue 42 --local # you build it
4516
4553
  ${cliInvocation()} work build --issue ENG-123 --tracker linear # a Linear issue
4517
4554
 
@@ -4524,7 +4561,7 @@ takes it, and prints the line that starts your session on it. That
4524
4561
  session links itself and holds the item's lease while it works.
4525
4562
  `
4526
4563
  ).action(async (opts) => {
4527
- const { runWorkBuild, WorkCommandError } = await import('./work-cmd-5I3J2XQQ.js');
4564
+ const { runWorkBuild, WorkCommandError } = await import('./work-cmd-L6WMPAA2.js');
4528
4565
  try {
4529
4566
  await runWorkBuild(opts);
4530
4567
  } catch (err) {
@@ -4547,7 +4584,7 @@ renews that session's own 20-minute lease, unless --no-lease or
4547
4584
  --ended is given, or another worker already holds a live one.
4548
4585
  `
4549
4586
  ).action(async (number, opts) => {
4550
- const { runWorkLinkSession, WorkCommandError } = await import('./work-cmd-5I3J2XQQ.js');
4587
+ const { runWorkLinkSession, WorkCommandError } = await import('./work-cmd-L6WMPAA2.js');
4551
4588
  try {
4552
4589
  await runWorkLinkSession({ ...opts, number, noLease: opts.lease === false, logFailures: opts.logFailures === true });
4553
4590
  } catch (err) {
@@ -4571,8 +4608,8 @@ criterion's new proof; --ready hands the thread back to a person. At
4571
4608
  most one action flag may be given.
4572
4609
  `
4573
4610
  ).action(async (opts) => {
4574
- const { runWorkComment, WorkCommentCommandError } = await import('./work-comment-cmd-UCCPWUSR.js');
4575
- const { WorkCommandError } = await import('./work-cmd-5I3J2XQQ.js');
4611
+ const { runWorkComment, WorkCommentCommandError } = await import('./work-comment-cmd-SNTDCPGH.js');
4612
+ const { WorkCommandError } = await import('./work-cmd-L6WMPAA2.js');
4576
4613
  try {
4577
4614
  await runWorkComment(opts);
4578
4615
  } catch (err) {
@@ -4593,8 +4630,8 @@ criterion that carries proof or a comment, each with who is waiting
4593
4630
  on whom next.
4594
4631
  `
4595
4632
  ).action(async (opts) => {
4596
- const { runWorkThreads, WorkCommentCommandError } = await import('./work-comment-cmd-UCCPWUSR.js');
4597
- const { WorkCommandError } = await import('./work-cmd-5I3J2XQQ.js');
4633
+ const { runWorkThreads, WorkCommentCommandError } = await import('./work-comment-cmd-SNTDCPGH.js');
4634
+ const { WorkCommandError } = await import('./work-cmd-L6WMPAA2.js');
4598
4635
  try {
4599
4636
  await runWorkThreads(opts);
4600
4637
  } catch (err) {
@@ -4618,8 +4655,8 @@ still running, or that an older runner released, has no log and the
4618
4655
  command exits 1.
4619
4656
  `
4620
4657
  ).action(async (opts) => {
4621
- const { runWorkLogs, WorkLogsCommandError } = await import('./work-logs-cmd-7352CJPG.js');
4622
- const { WorkCommandError } = await import('./work-cmd-5I3J2XQQ.js');
4658
+ const { runWorkLogs, WorkLogsCommandError } = await import('./work-logs-cmd-3S7IAVII.js');
4659
+ const { WorkCommandError } = await import('./work-cmd-L6WMPAA2.js');
4623
4660
  try {
4624
4661
  await runWorkLogs(opts);
4625
4662
  } catch (err) {
@@ -4642,8 +4679,8 @@ item is not built again until a new build request. Exits 1 when no host
4642
4679
  build is running for the item.
4643
4680
  `
4644
4681
  ).action(async (opts) => {
4645
- const { runWorkStop, WorkStopCommandError } = await import('./work-stop-cmd-CRDHXQVW.js');
4646
- const { WorkCommandError } = await import('./work-cmd-5I3J2XQQ.js');
4682
+ const { runWorkStop, WorkStopCommandError } = await import('./work-stop-cmd-WR7ESS4Z.js');
4683
+ const { WorkCommandError } = await import('./work-cmd-L6WMPAA2.js');
4647
4684
  try {
4648
4685
  await runWorkStop(opts);
4649
4686
  } catch (err) {
@@ -4664,7 +4701,7 @@ deletes anything \u2014 the item is removed from Work only once no
4664
4701
  live addition remains on it.
4665
4702
  `
4666
4703
  ).action(async (opts) => {
4667
- const { runWorkRemove, WorkCommandError } = await import('./work-cmd-5I3J2XQQ.js');
4704
+ const { runWorkRemove, WorkCommandError } = await import('./work-cmd-L6WMPAA2.js');
4668
4705
  try {
4669
4706
  await runWorkRemove(opts);
4670
4707
  } catch (err) {
@@ -4676,7 +4713,7 @@ live addition remains on it.
4676
4713
  }
4677
4714
  });
4678
4715
  workCmd.command("status").description("Show one item's stage, gate ledger, and additions").option("--item <number>", "the item's number inside this factory").option("--issue <number>", "issue number, or a Linear/Jira key like ENG-123").option(TRACKER_OPTION_FLAG, "tracker for a keyed --issue, when both hold the key").option("--repo <owner/name>", "repository for an issue number (default: the checkout's remote)").option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "factory id the key is bound to (or OUTERLAYER_APP_ID / config)").action(async (opts) => {
4679
- const { runWorkStatus, WorkCommandError } = await import('./work-cmd-5I3J2XQQ.js');
4716
+ const { runWorkStatus, WorkCommandError } = await import('./work-cmd-L6WMPAA2.js');
4680
4717
  try {
4681
4718
  await runWorkStatus(opts);
4682
4719
  } catch (err) {
@@ -4688,7 +4725,7 @@ live addition remains on it.
4688
4725
  }
4689
4726
  });
4690
4727
  workCmd.command("list").description("List live work items for this factory").option("--stage <spec|build|review>", "filter by stage").option("--section <attention|waiting|flowing>", "filter by Queue section").option("--repo <owner/name>", "repository (default: the current checkout's remote)").option("--unclaimed", "only items with no live lease").option("--claimed", "only items with a live lease, held by a host or a local session").option("--startable", "only items a host can start: a build request, no open PR, no live lease").option("--needs <amend>", "only items with a thread waiting on an agent").option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "factory id the key is bound to (or OUTERLAYER_APP_ID / config)").action(async (opts) => {
4691
- const { runWorkList, WorkCommandError } = await import('./work-cmd-5I3J2XQQ.js');
4728
+ const { runWorkList, WorkCommandError } = await import('./work-cmd-L6WMPAA2.js');
4692
4729
  try {
4693
4730
  await runWorkList(opts);
4694
4731
  } catch (err) {
@@ -4709,7 +4746,7 @@ by a different key is refused; claiming again with the same key extends
4709
4746
  it. --host is a label only.
4710
4747
  `
4711
4748
  ).action(async (opts) => {
4712
- const { runWorkClaim, WorkCommandError } = await import('./work-claim-cmd-DRQCHCOK.js');
4749
+ const { runWorkClaim, WorkCommandError } = await import('./work-claim-cmd-XG6O7B63.js');
4713
4750
  try {
4714
4751
  await runWorkClaim(opts);
4715
4752
  } catch (err) {
@@ -4729,7 +4766,7 @@ Extends the live lease this API key holds. Refused with a 410 if the
4729
4766
  lease has expired, or a 403 if a different key holds it.
4730
4767
  `
4731
4768
  ).action(async (opts) => {
4732
- const { runWorkRenew, WorkCommandError } = await import('./work-claim-cmd-DRQCHCOK.js');
4769
+ const { runWorkRenew, WorkCommandError } = await import('./work-claim-cmd-XG6O7B63.js');
4733
4770
  try {
4734
4771
  await runWorkRenew(opts);
4735
4772
  } catch (err) {
@@ -4761,7 +4798,7 @@ applies to a host's lease only. A later tool call in the session
4761
4798
  takes the lease again.
4762
4799
  `
4763
4800
  ).action(async (opts) => {
4764
- const { runWorkRelease, WorkCommandError } = await import('./work-claim-cmd-DRQCHCOK.js');
4801
+ const { runWorkRelease, WorkCommandError } = await import('./work-claim-cmd-XG6O7B63.js');
4765
4802
  try {
4766
4803
  await runWorkRelease(opts);
4767
4804
  } catch (err) {
@@ -4788,7 +4825,7 @@ Idempotent: declaring the same pull request twice is a no-op.
4788
4825
  needs your own login; an agent session or a factory key is refused.
4789
4826
  `
4790
4827
  ).action(async (number, opts) => {
4791
- const { runWorkPr, WorkPrCommandError } = await import('./work-pr-cmd-H4OQR26N.js');
4828
+ const { runWorkPr, WorkPrCommandError } = await import('./work-pr-cmd-22T6FG4T.js');
4792
4829
  try {
4793
4830
  await runWorkPr({ ...opts, number });
4794
4831
  } catch (err) {
@@ -4813,8 +4850,8 @@ login, then declares the pull request on the item, as \`work pr\` does.
4813
4850
  Run it again after a change to the title or description.
4814
4851
  `
4815
4852
  ).action(async (opts) => {
4816
- const { runWorkOpenPr, WorkOpenPrCommandError } = await import('./work-open-pr-cmd-LSH4VHJM.js');
4817
- const { WorkCommandError } = await import('./work-cmd-5I3J2XQQ.js');
4853
+ const { runWorkOpenPr, WorkOpenPrCommandError } = await import('./work-open-pr-cmd-E3WMO5XT.js');
4854
+ const { WorkCommandError } = await import('./work-cmd-L6WMPAA2.js');
4818
4855
  try {
4819
4856
  await runWorkOpenPr(opts);
4820
4857
  } catch (err) {
@@ -4830,9 +4867,9 @@ function registerRunnerCommands(program2) {
4830
4867
  const runnerCmd = program2.command("runner").description("Take work from the implement and amend queues on this machine");
4831
4868
  const configOption = "the cloud config file to run against (default: ~/.outerlayer/config.json)";
4832
4869
  runnerCmd.command("start").description("Run the loop: claim work, run it, report, clean up, repeat").option("--config <path>", configOption).action(async (opts) => {
4833
- const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-CLSGABD5.js');
4834
- const { start, RunnerStartError } = await import('./loop-EAZQMAE2.js');
4835
- const { RunnerAlreadyRunningError } = await import('./pidfile-3DM4OBKO.js');
4870
+ const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-7Q52COZ3.js');
4871
+ const { start, RunnerStartError } = await import('./loop-ZDW6TRAA.js');
4872
+ const { RunnerAlreadyRunningError } = await import('./pidfile-IF3TCL5A.js');
4836
4873
  const configPath = opts.config ?? defaultRunnerConfigPath();
4837
4874
  try {
4838
4875
  const { realUpdateDeps } = await import('./real-deps-KNNBQC75.js');
@@ -4846,8 +4883,8 @@ function registerRunnerCommands(program2) {
4846
4883
  }
4847
4884
  });
4848
4885
  runnerCmd.command("check").description("Validate the config, the hooks and the key, and print the effective settings").option("--config <path>", configOption).action(async (opts) => {
4849
- const { defaultRunnerConfigPath } = await import('./config-CLSGABD5.js');
4850
- const { runRunnerCheck } = await import('./check-BR5D27CX.js');
4886
+ const { defaultRunnerConfigPath } = await import('./config-7Q52COZ3.js');
4887
+ const { runRunnerCheck } = await import('./check-3YHMJQ3P.js');
4851
4888
  const configPath = opts.config ?? defaultRunnerConfigPath();
4852
4889
  const result = await runRunnerCheck(configPath);
4853
4890
  if (!result.ok) {
@@ -4863,8 +4900,8 @@ function registerRunnerCommands(program2) {
4863
4900
  `);
4864
4901
  });
4865
4902
  runnerCmd.command("install").description("Put this CLI in the runner's install layout; --service adds its service").option("--config <path>", configOption).option("--service", "set up the service that keeps the runner running").option("--print", "with --service, print the unit and set up nothing").option("--user <account>", "with --service, the account the service runs as").option("--replace", "replace a unit or launcher file this command did not write").option("--allow-downgrade", "install this CLI even when it is older than the version the runner runs").option("--unit-name <name>", "with --service, the unit's name, to run a second runner beside the first").action(async (opts) => {
4866
- const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-CLSGABD5.js');
4867
- const { runRunnerInstall, RunnerInstallError, launcherSummary, restartNote } = await import('./install-cmd-QDOTR4OM.js');
4903
+ const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-7Q52COZ3.js');
4904
+ const { runRunnerInstall, RunnerInstallError, launcherSummary, restartNote } = await import('./install-cmd-Q7RJGFUO.js');
4868
4905
  const configPath = opts.config ?? defaultRunnerConfigPath();
4869
4906
  if (opts.service !== true) {
4870
4907
  for (const flag of ["print", "user", "unitName"]) {
@@ -4876,7 +4913,7 @@ function registerRunnerCommands(program2) {
4876
4913
  }
4877
4914
  try {
4878
4915
  if (opts.service === true) {
4879
- const { installServiceCommand } = await import('./command-ZQNEPDS6.js');
4916
+ const { installServiceCommand } = await import('./command-GE62AJZY.js');
4880
4917
  const result2 = await installServiceCommand({
4881
4918
  configPath,
4882
4919
  print: opts.print,
@@ -4931,8 +4968,8 @@ To keep it running, run ${C.yellow}${cliInvocation()} runner install --service${
4931
4968
  fail(`pass --service: \`${cliInvocation()} runner uninstall --service\` removes the runner's service.`);
4932
4969
  return;
4933
4970
  }
4934
- const { defaultRunnerConfigPath } = await import('./config-CLSGABD5.js');
4935
- const { uninstallServiceCommand } = await import('./command-ZQNEPDS6.js');
4971
+ const { defaultRunnerConfigPath } = await import('./config-7Q52COZ3.js');
4972
+ const { uninstallServiceCommand } = await import('./command-GE62AJZY.js');
4936
4973
  const result = await uninstallServiceCommand({ configPath: opts.config ?? defaultRunnerConfigPath(), unitName: opts.unitName, home: homeFromEnv() });
4937
4974
  if (result.ok) for (const line of result.lines) process.stdout.write(`${C.green}\u2713${C.reset} ${line}
4938
4975
  `);
@@ -4959,12 +4996,12 @@ already in runner.env is used.
4959
4996
  printf '%s' "$CLAUDE_CODE_OAUTH_TOKEN" | ${cliInvocation()} runner init --agent claude --factory <org>/<factory>
4960
4997
  `
4961
4998
  ).action(async (opts) => {
4962
- const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-CLSGABD5.js');
4963
- const { prepareRunnerInit, runRunnerInit, RunnerInitError, writeRunnerInit } = await import('./init-XG47KCI4.js');
4964
- const { obtainRunnerKey, runnerKeyLogin } = await import('./runner-key-5FOWCW7J.js');
4965
- const { detectMachine } = await import('./machine-TRHBT5NE.js');
4966
- const { chooseVm, runVmInit, VmInitError } = await import('./init-V6FOMD2V.js');
4967
- const { AGENT_COMMANDS, credentialFromStdin, isAgentName, restartForCredential, RunnerEnvError } = await import('./runner-env-FRZFFHDF.js');
4999
+ const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-7Q52COZ3.js');
5000
+ const { prepareRunnerInit, runRunnerInit, RunnerInitError, writeRunnerInit } = await import('./init-2CRAVIUU.js');
5001
+ const { obtainRunnerKey, runnerKeyLogin } = await import('./runner-key-HMYLP6WN.js');
5002
+ const { detectMachine } = await import('./machine-JCOHLASP.js');
5003
+ const { chooseVm, runVmInit, VmInitError } = await import('./init-AHDZCMDC.js');
5004
+ const { AGENT_COMMANDS, credentialFromStdin, isAgentName, restartForCredential, RunnerEnvError } = await import('./runner-env-LDOBJESN.js');
4968
5005
  const configPath = opts.config ?? defaultRunnerConfigPath();
4969
5006
  if (opts.agent !== void 0 && !isAgentName(opts.agent)) {
4970
5007
  fail(`--agent ${opts.agent}: runner init writes commands for ${Object.keys(AGENT_COMMANDS).join(", ")}. For another agent, leave --agent out and edit runner.commands.`);
@@ -4978,7 +5015,7 @@ already in runner.env is used.
4978
5015
  try {
4979
5016
  let credential;
4980
5017
  if (agent !== void 0) {
4981
- const { readPipedKey } = await import('./login-browser-DX35MARZ.js');
5018
+ const { readPipedKey } = await import('./login-browser-BN5UKPHS.js');
4982
5019
  credential = credentialFromStdin(
4983
5020
  await readPipedKey(process.stdin, {
4984
5021
  onWaiting: () => process.stderr.write(`runner init is waiting for Claude's credential on stdin; close stdin to use the one already in runner.env
@@ -4995,7 +5032,7 @@ already in runner.env is used.
4995
5032
  const chunks = [];
4996
5033
  for await (const chunk of process.stdin) chunks.push(Buffer.from(chunk));
4997
5034
  const result2 = runRunnerInit(configPath, { machine, configFromStdin: Buffer.concat(chunks).toString("utf8"), requireContainer: true });
4998
- const { ensureHostKey: ensureHostKey2 } = await import('./host-key-U4B5QETR.js');
5035
+ const { ensureHostKey: ensureHostKey2 } = await import('./host-key-2LXQDSBO.js');
4999
5036
  const hostKey2 = await ensureHostKey2(configPath);
5000
5037
  process.stdout.write(`host key ${hostKey2.fingerprint}
5001
5038
  hooks: ${result2.hooks}
@@ -5054,7 +5091,7 @@ hooks: ${result2.hooks}
5054
5091
  const prepared = prepareRunnerInit(configPath, { machine, allowProcess, agent, credential, keyFromLogin: makeKey !== void 0 });
5055
5092
  const created = makeKey === void 0 ? void 0 : await makeKey();
5056
5093
  const result = writeRunnerInit(prepared, created);
5057
- const { ensureHostKey } = await import('./host-key-U4B5QETR.js');
5094
+ const { ensureHostKey } = await import('./host-key-2LXQDSBO.js');
5058
5095
  const hostKey = await ensureHostKey(configPath);
5059
5096
  if (created !== void 0) {
5060
5097
  process.stdout.write(`${C.green}\u2713${C.reset} saved the runner key in ${result.configPath}
@@ -5082,7 +5119,7 @@ ${C.yellow}${result.note}${C.reset}
5082
5119
  To isolate builds in containers instead, run ${C.yellow}${cliInvocation()} runner init --vm${C.reset}.
5083
5120
  `);
5084
5121
  }
5085
- const { runRunnerInstall, RunnerInstallError, RunnerDowngradeError, launcherSummary } = await import('./install-cmd-QDOTR4OM.js');
5122
+ const { runRunnerInstall, RunnerInstallError, RunnerDowngradeError, launcherSummary } = await import('./install-cmd-Q7RJGFUO.js');
5086
5123
  let installedLayout = false;
5087
5124
  let noService = "it starts the runner from the install layout, which needs a CLI installed with npm";
5088
5125
  try {
@@ -5114,7 +5151,7 @@ ${C.yellow}The runner will not update itself: ${installErr.message}${C.reset}
5114
5151
  let serviceUp = false;
5115
5152
  let restart;
5116
5153
  if (installedLayout) {
5117
- const { installServiceCommand } = await import('./command-ZQNEPDS6.js');
5154
+ const { installServiceCommand } = await import('./command-GE62AJZY.js');
5118
5155
  const service = await installServiceCommand({
5119
5156
  configPath,
5120
5157
  entryPath: process.argv[1] ?? "",
@@ -5158,12 +5195,12 @@ Next:
5158
5195
  "after",
5159
5196
  "\nA repository governed by a control plane builds the control plane's image, at the commit\nthe gateway has stored for it. A repository that governs itself fetches the head of its\ndefault branch into the runner's cache. Either way it reads .devcontainer/devcontainer.json\nand builds the image with the devcontainer CLI. Settings\nthat reach the host or widen the container's privileges are ignored and listed. The\nimage holds this CLI and a pinned Claude Code. Nothing runs inside the image.\n"
5160
5197
  ).action(async (opts) => {
5161
- const { defaultRunnerConfigPath } = await import('./config-CLSGABD5.js');
5162
- const { buildRepositoryImage, RecipeError } = await import('./build-TQ6X5PYN.js');
5198
+ const { defaultRunnerConfigPath } = await import('./config-7Q52COZ3.js');
5199
+ const { buildRepositoryImage, RecipeError } = await import('./build-GTMEADQD.js');
5163
5200
  const { currentCliBuild } = await import('./cli-build-K56DK4DS.js');
5164
- const { createDockerHost } = await import('./docker-BFU3AQGY.js');
5165
- const { builderSpec } = await import('./builder-C4QNTYMS.js');
5166
- const { loadRunnerConfig } = await import('./config-CLSGABD5.js');
5201
+ const { createDockerHost } = await import('./docker-2OVBKVRK.js');
5202
+ const { builderSpec } = await import('./builder-OAUSTZHL.js');
5203
+ const { loadRunnerConfig } = await import('./config-7Q52COZ3.js');
5167
5204
  const configPath = opts.config ?? defaultRunnerConfigPath();
5168
5205
  const loaded = (() => {
5169
5206
  try {
@@ -5174,7 +5211,11 @@ Next:
5174
5211
  })();
5175
5212
  const memory = loaded?.build?.memory ?? "8g";
5176
5213
  try {
5177
- const { imageTargetFor } = await import('./governing-source-HAA4OW57.js');
5214
+ const { ensureRunnerIdentity } = await import('./runner-identity-RWCBTY2A.js');
5215
+ await ensureRunnerIdentity(configPath, { log: (line) => console.error(line) }).catch((err) => {
5216
+ console.error(`the runner's Docker identity could not be stored: ${err instanceof Error ? err.message : String(err)}`);
5217
+ });
5218
+ const { imageTargetFor } = await import('./governing-source-TORXL4I4.js');
5178
5219
  const target = await imageTargetFor({ config: loaded, repository: opts.repository, fetchImpl: fetch });
5179
5220
  if (!target.ok) {
5180
5221
  if (opts.json) {
@@ -5237,22 +5278,22 @@ Next:
5237
5278
  }
5238
5279
  });
5239
5280
  runnerCmd.command("stop").description("Take no more work; wait for running jobs to finish, then exit").option("--config <path>", "the cloud config file naming the runner to stop").option("--now", "end running jobs immediately, with outcome stopped").action(async (opts) => {
5240
- const { defaultRunnerConfigPath } = await import('./config-CLSGABD5.js');
5241
- const { requestStop } = await import('./loop-EAZQMAE2.js');
5281
+ const { defaultRunnerConfigPath } = await import('./config-7Q52COZ3.js');
5282
+ const { requestStop } = await import('./loop-ZDW6TRAA.js');
5242
5283
  const configPath = opts.config ?? defaultRunnerConfigPath();
5243
5284
  await requestStop(configPath, Boolean(opts.now));
5244
5285
  });
5245
5286
  runnerCmd.command("status").description("List running jobs; with --recent, finished ones too").option("--config <path>", "the cloud config file naming the runner to inspect").option("--recent", "also list finished jobs, newest first, capped at 20").option("--json", "machine-readable JSON output").action(async (opts) => {
5246
- const { defaultRunnerConfigPath, loadRunnerConfig } = await import('./config-CLSGABD5.js');
5247
- const { jobsDir, runnerDir } = await import('./paths-7XP63OAX.js');
5248
- const { listJobFiles, runnerProcessState } = await import('./loop-EAZQMAE2.js');
5249
- const { renderStatus } = await import('./status-BINH7MBG.js');
5250
- const { readHousekeepingRecord } = await import('./record-3WP6V2K5.js');
5287
+ const { defaultRunnerConfigPath, loadRunnerConfig } = await import('./config-7Q52COZ3.js');
5288
+ const { jobsDir, runnerDir } = await import('./paths-N3LU4O2Z.js');
5289
+ const { listJobFiles, runnerProcessState } = await import('./loop-ZDW6TRAA.js');
5290
+ const { renderStatus } = await import('./status-QZB2GWXJ.js');
5291
+ const { readHousekeepingRecord } = await import('./record-73PQE77B.js');
5251
5292
  const path2 = await import('path');
5252
5293
  const configPath = opts.config ?? defaultRunnerConfigPath();
5253
5294
  const all = listJobFiles(configPath);
5254
5295
  const housekeeping = readHousekeepingRecord(runnerDir(configPath));
5255
- const { readPendingUpdate } = await import('./pending-532ABZYC.js');
5296
+ const { readPendingUpdate } = await import('./pending-GRCV3ZR4.js');
5256
5297
  const pendingUpdate = readPendingUpdate(runnerDir(configPath));
5257
5298
  let host = "unknown";
5258
5299
  let concurrency = 1;
@@ -5266,7 +5307,7 @@ Next:
5266
5307
  const service = await (async () => {
5267
5308
  if (process.platform !== "linux" || !existsSync("/run/systemd/system")) return void 0;
5268
5309
  const { inspectService, realInspectProbes } = await import('./inspect-6UYAAXH7.js');
5269
- const { DEFAULT_UNIT_NAME } = await import('./install-4SEFIIW2.js');
5310
+ const { DEFAULT_UNIT_NAME } = await import('./install-CZUIW2AF.js');
5270
5311
  const facts = inspectService(DEFAULT_UNIT_NAME, path2.dirname(configPath), realInspectProbes());
5271
5312
  return facts === void 0 ? void 0 : { unit: facts.unit, running: facts.mainPid !== void 0, delegated: facts.delegate };
5272
5313
  })();
@@ -5301,9 +5342,9 @@ Next:
5301
5342
  );
5302
5343
  });
5303
5344
  runnerCmd.command("logs").argument("<item>", "the work item's number in the factory").description("Print the newest attempt's log for one item").option("--config <path>", "the cloud config file naming the runner to inspect").option("-f, --follow", "keep printing as the log grows").action(async (itemArg, opts) => {
5304
- const { defaultRunnerConfigPath } = await import('./config-CLSGABD5.js');
5305
- const { listJobFiles } = await import('./loop-EAZQMAE2.js');
5306
- const { newestAttempt, logPathFor, tail, RunnerLogsError } = await import('./logs-AMLKC3VP.js');
5345
+ const { defaultRunnerConfigPath } = await import('./config-7Q52COZ3.js');
5346
+ const { listJobFiles } = await import('./loop-ZDW6TRAA.js');
5347
+ const { newestAttempt, logPathFor, tail, RunnerLogsError } = await import('./logs-RJPYTVQE.js');
5307
5348
  const configPath = opts.config ?? defaultRunnerConfigPath();
5308
5349
  const item = parseTrackerNumber(itemArg);
5309
5350
  if (item === void 0) {
@@ -5529,7 +5570,7 @@ Self-host deployments also need --app-id: without a key service to resolve the
5529
5570
  caller from the bearer token, the gateway answers 401 without that header.
5530
5571
  `
5531
5572
  ).action(async (opts) => {
5532
- const { runMcpInstall, handleMcpInstallError, McpInstallError } = await import('./mcp-install-cmd-GGWB3JJ2.js');
5573
+ const { runMcpInstall, handleMcpInstallError, McpInstallError } = await import('./mcp-install-cmd-GD4QUP7Z.js');
5533
5574
  try {
5534
5575
  if (opts.transport !== void 0 && opts.transport !== "stdio" && opts.transport !== "http") {
5535
5576
  throw new McpInstallError(`--transport must be "stdio" or "http", got "${opts.transport}"`);
@@ -5551,7 +5592,7 @@ caller from the bearer token, the gateway answers 401 without that header.
5551
5592
  "after",
5552
5593
  "\nWhat the stdio .mcp.json entry spawns. Reads newline-delimited JSON-RPC 2.0 on\nstdin and writes responses on stdout. The API key comes from OUTERLAYER_API_KEY\nor ~/.outerlayer/config.json at start-up; with neither the command exits 1 and\nprints why, which the MCP client shows as the connect error.\n"
5553
5594
  ).action(async (opts) => {
5554
- const { runMcpServe, handleMcpServeError } = await import('./mcp-serve-cmd-N3UTY6EE.js');
5595
+ const { runMcpServe, handleMcpServeError } = await import('./mcp-serve-cmd-IULQPVHL.js');
5555
5596
  try {
5556
5597
  await runMcpServe({ url: opts.url, appId: opts.appId });
5557
5598
  } catch (err) {
@@ -5576,9 +5617,9 @@ function registerImportCommands(program2) {
5576
5617
  });
5577
5618
  importCmd.command("capture").description("Install the maintained skills into .outerlayer/").option("--dir <path>", "repo root to write into (default: cwd)").option("--json", "machine-readable JSON output").addHelpText(
5578
5619
  "after",
5579
- "\nInstalls the four maintained skills (outerlayer-evidence, outerlayer-amend,\nouterlayer-findings, outerlayer-cli) and an AGENTS.md snippet teaching agents to run\n`emit artifact`. A skill that differs from this CLI's bundle is rewritten to it, and the output says so.\n"
5620
+ "\nInstalls the five maintained skills (outerlayer-evidence, outerlayer-amend,\nouterlayer-findings, outerlayer-cli, outerlayer-build) and an AGENTS.md snippet teaching agents to run\n`emit artifact`. A skill that differs from this CLI's bundle is rewritten to it, and the output says so.\n"
5580
5621
  ).action(async (opts) => {
5581
- const { runImportCapture, ImportCaptureError } = await import('./import-capture-cmd-TK4XY7RD.js');
5622
+ const { runImportCapture, ImportCaptureError } = await import('./import-capture-cmd-Q56DDZVO.js');
5582
5623
  try {
5583
5624
  runImportCapture({ cwd: opts.dir, json: opts.json });
5584
5625
  } catch (err) {
@@ -5594,7 +5635,7 @@ function registerContextCommands(program2) {
5594
5635
  const contextCmd = program2.command("context").description("Compile agent context");
5595
5636
  contextCmd.command("emit").description("Compile .outerlayer/ into each configured target tool's native files").option("--check", "compare against disk, write nothing, exit 1 on drift (CI mode)").option("--dir <path>", "repo root to read from (default: cwd)").option("--json", "machine-readable JSON output").addHelpText(
5596
5637
  "after",
5597
- '\nTargets come from .outerlayer/config.json only; there is no --target flag.\nMissing or empty config: {"targets": [...]}, e.g. {"targets": ["claude-code"]}.\nKnown targets: claude-code, cursor, codex, copilot, factory.\n\nThe maintained skills (outerlayer-evidence, outerlayer-amend, outerlayer-findings,\nouterlayer-cli) follow this CLI: emit rewrites one that differs from its bundle, and --check\nreports it as drift. A copy under an earlier name (amend, emitting-evidence,\nreporting-findings, outerlayer) is deleted, and --check reports it as retired.\nTemplates (spec, writing-specs, writing-tests, build) are never rewritten or reported.\n\nOrphan detection (--check) only covers header-carrying outputs: every markdown\ntarget file gets a generated-by comment, but .mcp.json and .cursor/mcp.json are\nJSON with no comment syntax, so they can never be flagged as orphaned; missing\nand content drift still apply to them.\n'
5638
+ '\nTargets come from .outerlayer/config.json only; there is no --target flag.\nMissing or empty config: {"targets": [...]}, e.g. {"targets": ["claude-code"]}.\nKnown targets: claude-code, cursor, codex, copilot, factory.\n\nThe maintained skills (outerlayer-evidence, outerlayer-amend, outerlayer-findings,\nouterlayer-cli, outerlayer-build) follow this CLI: emit rewrites one that differs from its bundle, and --check\nreports it as drift. A copy under an earlier name (amend, emitting-evidence,\nreporting-findings, outerlayer) is deleted, and --check reports it as retired.\nTemplates (spec, writing-specs, writing-tests, build) are never rewritten or reported.\n\nOrphan detection (--check) only covers header-carrying outputs: every markdown\ntarget file gets a generated-by comment, but .mcp.json and .cursor/mcp.json are\nJSON with no comment syntax, so they can never be flagged as orphaned; missing\nand content drift still apply to them.\n'
5598
5639
  ).action(async (opts) => {
5599
5640
  await compileContext({ dir: opts.dir, check: opts.check, json: opts.json });
5600
5641
  });