@outerlayer/cli 0.27.1 → 0.28.1

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 (128) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +6 -0
  3. package/dist/{agent-setup-UW36TAQM.js → agent-setup-YVR5RO56.js} +17 -14
  4. package/dist/{bridge-B5VJVECY.js → bridge-WW2V7DTB.js} +3 -2
  5. package/dist/build-5FRC3RKM.js +13 -0
  6. package/dist/build-info.json +1 -1
  7. package/dist/{builder-6Y6ZWGNH.js → builder-4F2XNSFC.js} +7 -6
  8. package/dist/{check-YTXFVWK7.js → check-NDDOASVO.js} +70 -61
  9. package/dist/{chunk-VS27BP3E.js → chunk-2YSCKEL2.js} +7 -7
  10. package/dist/{chunk-BPKO76QR.js → chunk-4XN5FRRJ.js} +4 -4
  11. package/dist/{chunk-EPPIISRD.js → chunk-55XLX5PA.js} +1 -1
  12. package/dist/{chunk-LOKSLO25.js → chunk-5B7BEQPR.js} +1 -1
  13. package/dist/chunk-5BHIBJDA.js +93 -0
  14. package/dist/{chunk-RHAGBUL5.js → chunk-5K3KB4YR.js} +1 -1
  15. package/dist/{chunk-ABXQBEYK.js → chunk-66T6XJAB.js} +1 -1
  16. package/dist/{chunk-LPFOWUHG.js → chunk-6BWJQGTV.js} +20 -13
  17. package/dist/{chunk-BWH36FOC.js → chunk-7CK2TJFB.js} +20 -4
  18. package/dist/{chunk-5VMDGJGH.js → chunk-7UGFIWIW.js} +37 -23
  19. package/dist/{chunk-QKIQ2R7F.js → chunk-ATJOFXTE.js} +3 -3
  20. package/dist/chunk-CDDED64E.js +13 -0
  21. package/dist/{chunk-QHH4OSD4.js → chunk-CTYSTE5C.js} +1 -1
  22. package/dist/{chunk-DJHNEGNM.js → chunk-DKWQMPSL.js} +18 -2
  23. package/dist/{chunk-IMOB4IOI.js → chunk-DQYMQ47E.js} +3 -2
  24. package/dist/{chunk-YETTWTAY.js → chunk-E7R2GIAW.js} +4 -4
  25. package/dist/{chunk-GFUE5TKO.js → chunk-F4FA3ZUT.js} +24 -14
  26. package/dist/{chunk-6TRNCUM4.js → chunk-FGF52V4V.js} +1 -1
  27. package/dist/{chunk-MATUHHN4.js → chunk-GUXWQIEY.js} +1 -1
  28. package/dist/{chunk-2I3LIRZP.js → chunk-HXAEQPZR.js} +101 -10
  29. package/dist/{chunk-R7SGBXUD.js → chunk-IKXY47R5.js} +107 -56
  30. package/dist/{chunk-P33PZIWS.js → chunk-ITAIEJ2T.js} +7 -142
  31. package/dist/{chunk-RHGF73IU.js → chunk-IVX3U7KV.js} +1 -1
  32. package/dist/{chunk-7OUOLGUV.js → chunk-JGML2VUN.js} +3 -7
  33. package/dist/{chunk-6VFH52MP.js → chunk-KVDVNOUK.js} +24 -22
  34. package/dist/{chunk-2F762IXY.js → chunk-LNIFYSNK.js} +3 -3
  35. package/dist/{chunk-XBPUTQ7E.js → chunk-MHAR6S7B.js} +1 -1
  36. package/dist/{chunk-7AQ5AM7U.js → chunk-MQHTM4YJ.js} +177 -21
  37. package/dist/{chunk-6KKM7VGZ.js → chunk-N7WAEEIU.js} +3 -3
  38. package/dist/{chunk-D7ECMB7B.js → chunk-NUHZV3A4.js} +1 -1
  39. package/dist/{chunk-MHX7YX7Y.js → chunk-P2RWZCV7.js} +1 -1
  40. package/dist/chunk-QBQHQEUG.js +300 -0
  41. package/dist/{chunk-FP23SVDD.js → chunk-QJFDAKRF.js} +5 -5
  42. package/dist/{chunk-WUL2OP5A.js → chunk-QKXF7CLR.js} +3 -3
  43. package/dist/{chunk-Y7ZCHBYB.js → chunk-QWAYRAUX.js} +3 -3
  44. package/dist/{chunk-64GMBWAK.js → chunk-R7SS5RLJ.js} +6 -6
  45. package/dist/{chunk-XZ6Q6ZNR.js → chunk-SATUCMAJ.js} +3 -2
  46. package/dist/{chunk-2BTFKNTR.js → chunk-SJZL5F3F.js} +2 -2
  47. package/dist/{chunk-HWDYLXHH.js → chunk-T2QSWFSU.js} +4 -4
  48. package/dist/{chunk-B7DJVG25.js → chunk-T57XUI6N.js} +3 -3
  49. package/dist/{chunk-E5IJ5533.js → chunk-TF7G2PR6.js} +3 -3
  50. package/dist/{chunk-O2IJTY7L.js → chunk-TVZAC2NP.js} +3 -3
  51. package/dist/{chunk-QE3UQAHK.js → chunk-UHU7H57K.js} +26 -7
  52. package/dist/{chunk-WSYXLLA5.js → chunk-USJZ2LDK.js} +6 -6
  53. package/dist/{chunk-EX5MQYEF.js → chunk-VC5J7QPV.js} +5 -5
  54. package/dist/{chunk-N4D5TMVU.js → chunk-VU7ZJPIR.js} +5 -5
  55. package/dist/{chunk-ZFBJUOYT.js → chunk-W3FSGH2M.js} +10 -10
  56. package/dist/{chunk-GLUKDQS4.js → chunk-WWQVKFN6.js} +1 -1
  57. package/dist/{chunk-55GNQPO6.js → chunk-X52PMPOM.js} +7 -7
  58. package/dist/{chunk-YB3CSYXX.js → chunk-XD4ZCMA4.js} +81 -2
  59. package/dist/{chunk-Y4OKEFAX.js → chunk-YL2VDSNF.js} +1 -1
  60. package/dist/{chunk-M3MHHIUW.js → chunk-Z3ASAXVU.js} +1 -1
  61. package/dist/{chunk-XS3FDWSZ.js → chunk-ZTY7HHYB.js} +1 -1
  62. package/dist/{claude-launcher-NQSZBTQ5.js → claude-launcher-7RGVOYCD.js} +6 -5
  63. package/dist/{cli-GHEOBXC7.js → cli-QC6ZKHPK.js} +149 -128
  64. package/dist/cli-update-notice-4DLZ3655.js +9 -0
  65. package/dist/{command-V7B7GTPZ.js → command-3F6GY4CK.js} +53 -37
  66. package/dist/{config-TWS5VZEN.js → config-5QYIKYUP.js} +3 -2
  67. package/dist/{connect-cmd-HGS7YPA2.js → connect-cmd-5TYAOK5M.js} +14 -11
  68. package/dist/{container-start-FHB2VDC4.js → container-start-P7O5XGOB.js} +37 -36
  69. package/dist/{control-plane-launch-DBQA3KLJ.js → control-plane-launch-FZMD4MXX.js} +13 -10
  70. package/dist/{dist-QPHZE47F.js → dist-JFVKLUHL.js} +1 -1
  71. package/dist/{docker-YT6Z3LXI.js → docker-ZTC4EIU4.js} +7 -6
  72. package/dist/{doctor-Y4NCNSJM.js → doctor-QPQDF7FB.js} +159 -41
  73. package/dist/{emit-artifact-cmd-ALDK55Y2.js → emit-artifact-cmd-O3IBUMUY.js} +19 -16
  74. package/dist/{emit-cmd-VAQHRWJR.js → emit-cmd-QUABLVO6.js} +6 -5
  75. package/dist/{emit-criteria-cmd-Q7SM6VP2.js → emit-criteria-cmd-JDO2VUG5.js} +15 -12
  76. package/dist/{emit-finding-cmd-2NBAPDSV.js → emit-finding-cmd-VCQPCLI2.js} +16 -13
  77. package/dist/{emit-result-cmd-KUSL56RI.js → emit-result-cmd-BNS57DD3.js} +19 -16
  78. package/dist/{emit-step-cmd-KD4AKEAT.js → emit-step-cmd-XN44BXYU.js} +16 -13
  79. package/dist/{exec-client-6WVS7DRZ.js → exec-client-VKT2XNB3.js} +4 -3
  80. package/dist/fleet-readiness-G5X3MKP2.js +29 -0
  81. package/dist/{governing-source-VVUA5TKB.js → governing-source-B3M2U4BC.js} +21 -18
  82. package/dist/{guest-init-H5K2RW3P.js → guest-init-QW2DPX7H.js} +5 -4
  83. package/dist/{hook-fast-3SUJM765.js → hook-fast-EFC44SXV.js} +4 -1
  84. package/dist/{host-key-XNKZCWTS.js → host-key-AC6LTZDS.js} +4 -3
  85. package/dist/{image-tag-R34J4O3F.js → image-tag-SS7YKJHN.js} +4 -3
  86. package/dist/index.js +4 -4
  87. package/dist/{init-3DAGX7UY.js → init-36XMFFRQ.js} +38 -37
  88. package/dist/init-HHEAJDPN.js +56 -0
  89. package/dist/{init-cmd-RIDBVSE4.js → init-cmd-K2IKTSXJ.js} +25 -21
  90. package/dist/{init-update-ECWNG47R.js → init-update-RWTQSTPE.js} +51 -35
  91. package/dist/{inspect-IPFA7AAT.js → inspect-L7JIBK3Y.js} +1 -1
  92. package/dist/{install-6OIY3KHZ.js → install-35SAMY75.js} +5 -5
  93. package/dist/{install-cmd-JMT67P35.js → install-cmd-GFY4QF72.js} +6 -5
  94. package/dist/{layout-XNFDTOET.js → layout-BBTQPS6V.js} +4 -3
  95. package/dist/{login-browser-EWXSGHM7.js → login-browser-WSOSQH2T.js} +2 -2
  96. package/dist/{logs-XHAS6LMZ.js → logs-X2IRDP5T.js} +3 -2
  97. package/dist/loop-F5ASKFRJ.js +80 -0
  98. package/dist/{machine-OOQ2NXC3.js → machine-6STGIRJJ.js} +32 -30
  99. package/dist/{machine-skills-FLIRJYP7.js → machine-skills-O7W6NMWB.js} +4 -3
  100. package/dist/{mcp-serve-cmd-LY5A3CE7.js → mcp-serve-cmd-IITCPAAR.js} +9 -6
  101. package/dist/{paths-LHSPNORF.js → paths-32DWGK35.js} +3 -2
  102. package/dist/pending-CSIY4Y2I.js +10 -0
  103. package/dist/{pidfile-DKMYYXLH.js → pidfile-CYCTH6NQ.js} +4 -3
  104. package/dist/{real-deps-KNNBQC75.js → real-deps-QX5YH7FG.js} +1 -1
  105. package/dist/{record-3LPTY3G5.js → record-N4WPZCGK.js} +4 -3
  106. package/dist/{runner-env-YRRNRKF4.js → runner-env-EIB6WFPG.js} +6 -7
  107. package/dist/{runner-identity-YS2BZXZV.js → runner-identity-S3V6I4I3.js} +7 -6
  108. package/dist/{runner-key-EFNTZWNX.js → runner-key-Y76QXVNV.js} +36 -35
  109. package/dist/{session-sender-SC5PSU2G.js → session-sender-LFYMN6TT.js} +20 -17
  110. package/dist/{spec-cmd-JGYHHJ4P.js → spec-cmd-Z6MGATWC.js} +16 -13
  111. package/dist/{starter-pack-GPU4X6B7.js → starter-pack-5SOT5V4I.js} +4 -3
  112. package/dist/{status-7WM7S7JX.js → status-OANG2EM3.js} +39 -37
  113. package/dist/{sync-cmd-ATXJVS7S.js → sync-cmd-TNOOUPY2.js} +19 -16
  114. package/dist/{watch-M7NR3DOW.js → watch-HBNNYATF.js} +19 -16
  115. package/dist/{work-claim-cmd-DNUDZKJA.js → work-claim-cmd-CXALMILD.js} +21 -18
  116. package/dist/{work-cmd-VECTYST6.js → work-cmd-COESFSHE.js} +16 -13
  117. package/dist/{work-comment-cmd-F3NRWKPZ.js → work-comment-cmd-A4ZUVCSA.js} +16 -13
  118. package/dist/{work-logs-cmd-QF6P32FE.js → work-logs-cmd-CTF43MBE.js} +16 -13
  119. package/dist/{work-open-pr-cmd-XE23JA3R.js → work-open-pr-cmd-EMGYJXVD.js} +17 -14
  120. package/dist/{work-pr-cmd-BH56GUKN.js → work-pr-cmd-FEXMS6RH.js} +16 -13
  121. package/dist/{work-stop-cmd-C3F5HNUO.js → work-stop-cmd-NIHAN45R.js} +16 -13
  122. package/package.json +1 -1
  123. package/dist/build-HRLACBOZ.js +0 -12
  124. package/dist/chunk-STSLH5EJ.js +0 -71
  125. package/dist/init-SWKYV6CL.js +0 -55
  126. package/dist/loop-AIJZVUNA.js +0 -79
  127. package/dist/pending-3YZCSKON.js +0 -9
  128. package/dist/{chunk-6BLXUD56.js → chunk-HOU33DW5.js} +1 -1
@@ -0,0 +1,300 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+ import { sanitizeTerminal } from './chunk-BUP5N3X6.js';
4
+ import { isAgentsMdLayout } from './chunk-5B7BEQPR.js';
5
+ import { resolveGatewayCredentials, defaultFetch } from './chunk-7CK2TJFB.js';
6
+ import { versionAtLeast } from './chunk-HCVLP7XA.js';
7
+ import { findGitDirs } from './chunk-BJ3KTMDH.js';
8
+ import { machineSkillsState, staleClaudeSkills } from './chunk-DQYMQ47E.js';
9
+ import { AGENTS_SKILLS_BASE, skillDir, namesCore, MACHINE_SKILL_PATH, isMaintainedCopy, loadTemplateFiles } from './chunk-JGML2VUN.js';
10
+ import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
11
+ import { cliInvocation } from './chunk-CRB3POP4.js';
12
+ import { hasSymlinkComponent } from './chunk-VWFOKRYS.js';
13
+ import { emitTree, ALL_TARGET_IDS, classifyTree, splitRawFile } from './chunk-RKOTJQVG.js';
14
+ import { existsSync, readFileSync, writeFileSync, realpathSync, readdirSync } from 'fs';
15
+ import { join, dirname, posix } from 'path';
16
+
17
+ createRequire(import.meta.url);
18
+ var PROSE_FILE = /\.mdc?$/;
19
+ var ROOT_FILES = ["AGENTS.md", "CLAUDE.md"];
20
+ var FOLDERS = [AGENTS_SKILLS_BASE, ".claude/skills"];
21
+ var SKILL_BASES = [AGENTS_SKILLS_BASE, ".claude/skills"];
22
+ var RELATIVE_NOTE = ", relative to this skill's folder";
23
+ var escape = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
24
+ function withMachinePaths(text, fileDir, skills) {
25
+ let out = text;
26
+ const named2 = [];
27
+ for (const skill of skills) {
28
+ const spellings = /* @__PURE__ */ new Set();
29
+ for (const base of SKILL_BASES) {
30
+ const folder = skillDir(skill, base);
31
+ spellings.add(folder);
32
+ spellings.add(`./${folder}`);
33
+ spellings.add(posix.relative(fileDir, folder));
34
+ }
35
+ const alternatives = [...spellings].map(escape);
36
+ const pattern = new RegExp(`(?<![\\w~./-])(?:${alternatives.join("|")})/([\\w./-]*)(?:${escape(RELATIVE_NOTE)},?)?`, "g");
37
+ const next = out.replace(pattern, (_match, rest) => `${MACHINE_SKILL_PATH}/${skill}/${rest}`);
38
+ if (next !== out) named2.push(skill);
39
+ out = next;
40
+ }
41
+ return { text: out, skills: named2 };
42
+ }
43
+ function filesUnder(root, rel) {
44
+ const found = [];
45
+ for (const entry of readdirSync(join(root, rel), { withFileTypes: true })) {
46
+ const path = `${rel}/${entry.name}`;
47
+ if (entry.isDirectory()) found.push(...filesUnder(root, path));
48
+ else if (PROSE_FILE.test(entry.name)) found.push(path);
49
+ }
50
+ return found;
51
+ }
52
+ function maintainedReferenceRewrites(root, removing) {
53
+ const removed = (folder) => removing.includes(folder);
54
+ const holds = (folder) => !removed(folder) && !hasSymlinkComponent(root, folder) && existsSync(join(root, folder));
55
+ const absent = MAINTAINED_SKILLS.filter((skill) => !SKILL_BASES.some((base) => holds(skillDir(skill, base))));
56
+ const folders = FOLDERS.filter((folder) => !hasSymlinkComponent(root, folder) && existsSync(join(root, folder)));
57
+ const candidates = /* @__PURE__ */ new Set([...ROOT_FILES, ...folders.flatMap((folder) => filesUnder(root, folder))]);
58
+ const rewrites = [];
59
+ for (const path of [...candidates].sort()) {
60
+ if (removing.some((folder) => path.startsWith(`${folder}/`)) || hasSymlinkComponent(root, path)) continue;
61
+ let text;
62
+ try {
63
+ text = readFileSync(join(root, path), "utf8");
64
+ } catch {
65
+ continue;
66
+ }
67
+ const result = withMachinePaths(text, dirname(path), absent);
68
+ if (result.skills.length > 0) rewrites.push({ path, skills: result.skills, text: result.text });
69
+ }
70
+ return rewrites;
71
+ }
72
+ function applyReferenceRewrites(root, rewrites) {
73
+ for (const rewrite of rewrites) writeFileSync(join(root, rewrite.path), rewrite.text);
74
+ }
75
+
76
+ // src/build-skill.ts
77
+ var BUILD_PHASES = ["Intake", "Criteria", "Implement", "Review", "Pull request", "Evidence"];
78
+ var MACHINE_CORE = `${MACHINE_SKILL_PATH}/outerlayer-build/SKILL.md`;
79
+ var CHANGES_HEADING = "## Changes for this repository";
80
+ var NAME = "Build skill";
81
+ function changeHeadings(text) {
82
+ const lines = text.split(/\r?\n/);
83
+ const start = lines.findIndex((line) => line.trim() === CHANGES_HEADING);
84
+ if (start === -1) return [];
85
+ const headings = [];
86
+ for (const line of lines.slice(start + 1)) {
87
+ if (/^## /.test(line)) break;
88
+ const match = /^### (.+?)\s*$/.exec(line);
89
+ if (match) headings.push(match[1]);
90
+ }
91
+ return headings;
92
+ }
93
+ function skillsFolders() {
94
+ const probe = `${skillDir("probe")}/SKILL.md`;
95
+ const compiled = emitTree({
96
+ entries: classifyTree([probe]).entries,
97
+ contents: /* @__PURE__ */ new Map([[probe, "---\nname: probe\ndescription: probe\n---\n"]]),
98
+ assetPaths: [],
99
+ targets: [...ALL_TARGET_IDS]
100
+ });
101
+ return [...new Set(compiled.files.map((file) => dirname(dirname(file.path))))].sort();
102
+ }
103
+ function shortBuild() {
104
+ const file = loadTemplateFiles().find((f) => f.path === `${skillDir("build")}/SKILL.md`);
105
+ if (file === void 0) return "";
106
+ return splitRawFile(file.content).body.split("\n").filter((line) => !line.startsWith("<!--")).join("\n").trim();
107
+ }
108
+ var read = (abs) => {
109
+ try {
110
+ return readFileSync(abs, "utf8");
111
+ } catch {
112
+ return void 0;
113
+ }
114
+ };
115
+ function buildsOf(repoRoot, folders) {
116
+ const source = `${folders[0]}/build/SKILL.md`;
117
+ return (existsSync(join(repoRoot, source)) ? [source] : folders.slice(1).map((f) => `${f}/build/SKILL.md`)).map((path) => ({ path, text: read(join(repoRoot, path)) })).filter((b) => b.text !== void 0);
118
+ }
119
+ function checkBuildSkill(repoRoot) {
120
+ const folders = [".outerlayer/skills", ...skillsFolders()];
121
+ const builds = buildsOf(repoRoot, folders);
122
+ const checks = [];
123
+ const detached = builds.filter((b) => !namesCore(b.text));
124
+ if (detached.length > 0) {
125
+ checks.push({
126
+ name: NAME,
127
+ status: "warn",
128
+ detail: `${detached.map((b) => b.path).join(", ")} does not name outerlayer-build, so it gets no updates from the core`,
129
+ fix: `Move to the short build, and put your own changes under the name of the phase each applies to:
130
+
131
+ ${shortBuild()}`
132
+ });
133
+ }
134
+ for (const build of builds.filter((b) => namesCore(b.text))) {
135
+ const unknown = changeHeadings(build.text).filter((heading) => !BUILD_PHASES.includes(heading));
136
+ if (unknown.length === 0) continue;
137
+ checks.push({
138
+ name: NAME,
139
+ status: "warn",
140
+ detail: `${build.path} has ${unknown.map((h) => `"${h}"`).join(", ")} under "Changes for this repository", which matches no phase`,
141
+ fix: `Rename each heading to a phase: ${BUILD_PHASES.join(", ")}.`
142
+ });
143
+ }
144
+ const agentsMd = isAgentsMdLayout(repoRoot);
145
+ const seen = /* @__PURE__ */ new Set();
146
+ const lacking = folders.filter((folder) => {
147
+ const text = read(join(repoRoot, folder, "build", "SKILL.md")) ?? "";
148
+ if (!namesCore(text) || text.includes(MACHINE_CORE) || existsSync(join(repoRoot, folder, "outerlayer-build", "SKILL.md"))) return false;
149
+ let key = folder;
150
+ try {
151
+ key = realpathSync(join(repoRoot, folder));
152
+ } catch {
153
+ }
154
+ if (seen.has(key)) return false;
155
+ seen.add(key);
156
+ return true;
157
+ });
158
+ if (lacking.length > 0) {
159
+ checks.push({
160
+ name: NAME,
161
+ status: "warn",
162
+ detail: `${lacking.join(", ")} holds build with no outerlayer-build beside it`,
163
+ fix: `Run \`${cliInvocation()} ${agentsMd ? "init --update" : "context emit"}\` to write outerlayer-build, then commit.`
164
+ });
165
+ }
166
+ return checks;
167
+ }
168
+ function committedMaintainedFolders(repoRoot) {
169
+ const found = [];
170
+ for (const base of [AGENTS_SKILLS_BASE, ".claude/skills"]) {
171
+ for (const name of MAINTAINED_SKILLS) {
172
+ const folder = skillDir(name, base);
173
+ if (!hasSymlinkComponent(repoRoot, folder) && isMaintainedCopy(repoRoot, name, base)) found.push(folder);
174
+ }
175
+ }
176
+ return found;
177
+ }
178
+ function checkCommittedMaintainedSkills(repoRoot) {
179
+ if (!isAgentsMdLayout(repoRoot)) return [];
180
+ const folders = committedMaintainedFolders(repoRoot);
181
+ if (folders.length === 0) return [];
182
+ return [
183
+ {
184
+ name: "Committed maintained skills",
185
+ status: "warn",
186
+ detail: `${folders.join(", ")} ${folders.length === 1 ? "is a maintained skill" : "are maintained skills"} that every machine keeps in ${MACHINE_SKILL_PATH}/ now`,
187
+ fix: `Run \`${cliInvocation()} init --update\` to remove ${folders.length === 1 ? "it" : "them"}, then commit. Before you commit, every machine and runner host must run this CLI version or later, and each machine a person works on must run \`${cliInvocation()} init --local\`.`
188
+ }
189
+ ];
190
+ }
191
+ function checkMaintainedReferences(repoRoot) {
192
+ if (!isAgentsMdLayout(repoRoot)) return [];
193
+ const rewrites = maintainedReferenceRewrites(repoRoot, []);
194
+ if (rewrites.length === 0) return [];
195
+ return [
196
+ {
197
+ name: "Paths to the maintained skills",
198
+ status: "warn",
199
+ detail: `${rewrites.map((r) => r.path).join(", ")} ${rewrites.length === 1 ? "names" : "name"} a maintained skill folder that this repository no longer holds`,
200
+ fix: `Run \`${cliInvocation()} init --update\` to change each path to ${MACHINE_SKILL_PATH}/, then commit.`
201
+ }
202
+ ];
203
+ }
204
+ function checkMachineSkills(opts) {
205
+ const build = buildsOf(opts.repoRoot, [".outerlayer/skills", ...skillsFolders()]).find((b) => b.text.includes(MACHINE_CORE));
206
+ if (build === void 0) return [];
207
+ const problems = machineSkillsState(opts.home, opts.version).filter((s) => s.state !== "current");
208
+ const claudeStale = staleClaudeSkills(opts.home, opts.version);
209
+ if (problems.length === 0 && claudeStale.length === 0) return [];
210
+ const parts = [
211
+ ...problems.map((s) => `${MACHINE_SKILL_PATH}/${s.name} ${s.state === "missing" ? "is missing" : "is from another CLI version"}`),
212
+ ...claudeStale.map((name) => `~/.claude/skills/${name} is not this CLI version's copy`)
213
+ ];
214
+ return [
215
+ {
216
+ name: "Maintained skills on this machine",
217
+ status: "warn",
218
+ detail: `${build.path} reads ${MACHINE_CORE}, but ${parts.join(", ")}`,
219
+ fix: `Run \`${cliInvocation()} init --local\` on this machine. If it reports a failed write, fix the permissions on the folder it names first.`
220
+ }
221
+ ];
222
+ }
223
+
224
+ // src/fleet-readiness.ts
225
+ var FIRST_VERSION_WITH_MACHINE_SKILLS = "0.27.0";
226
+ var HOSTS_TIMEOUT_MS = 1e4;
227
+ function shortVersion(host) {
228
+ return host.cliVersion === null ? "no version" : /\d+\.\d+\.\d+\S*/.exec(host.cliVersion)?.[0] ?? host.cliVersion;
229
+ }
230
+ function judgeFleet(hosts) {
231
+ const old = (h) => !versionAtLeast(h.cliVersion ?? "", FIRST_VERSION_WITH_MACHINE_SKILLS);
232
+ const staleBehind = hosts.filter((h) => h.stale && old(h));
233
+ const behind = hosts.filter((h) => !h.stale && old(h));
234
+ if (behind.length > 0) return { state: "behind", behind, staleBehind };
235
+ return { state: "ready", current: hosts.filter((h) => !old(h)), staleBehind };
236
+ }
237
+ function parseHosts(body) {
238
+ const data = body?.data;
239
+ if (!Array.isArray(data)) return void 0;
240
+ const hosts = [];
241
+ for (const row of data) {
242
+ if (typeof row?.host !== "string") return void 0;
243
+ hosts.push({
244
+ host: row.host,
245
+ cliVersion: typeof row.cliVersion === "string" ? row.cliVersion : null,
246
+ lastHeartbeatAt: typeof row.lastHeartbeatAt === "string" ? row.lastHeartbeatAt : null,
247
+ stale: row.status === "stale"
248
+ });
249
+ }
250
+ return hosts;
251
+ }
252
+ async function fleetReadiness(opts = {}) {
253
+ const resolved = resolveGatewayCredentials(opts);
254
+ if (!resolved.ok) return { state: "unknown", reason: sanitizeTerminal(resolved.message) };
255
+ const fetchImpl = opts.fetchImpl ?? defaultFetch;
256
+ let status;
257
+ let body;
258
+ try {
259
+ const res = await fetchImpl(`${resolved.url.replace(/\/+$/, "")}/v1/hosts`, {
260
+ method: "GET",
261
+ headers: { authorization: `Bearer ${resolved.credential}`, "x-outerlayer-app-id": resolved.appId },
262
+ signal: AbortSignal.timeout(HOSTS_TIMEOUT_MS)
263
+ });
264
+ status = res.status;
265
+ body = await res.json().catch(() => void 0);
266
+ } catch (err) {
267
+ return { state: "unknown", reason: `the gateway did not answer: ${sanitizeTerminal(err instanceof Error ? err.message : String(err))}` };
268
+ }
269
+ if (status === 401) return { state: "unknown", reason: `the gateway refused the credential (HTTP 401); run \`${cliInvocation()} login\`` };
270
+ if (status === 403) return { state: "unknown", reason: "the credential cannot list the factory's runner hosts (HTTP 403); it needs the hosts.read permission" };
271
+ if (status >= 300) return { state: "unknown", reason: `the gateway did not list the runner hosts (HTTP ${status})` };
272
+ const hosts = parseHosts(body);
273
+ if (hosts === void 0) return { state: "unknown", reason: "the gateway's list of runner hosts was not in the expected shape" };
274
+ return judgeFleet(hosts);
275
+ }
276
+ var named = (hosts) => hosts.map((h) => `${sanitizeTerminal(h.host)} (${sanitizeTerminal(shortVersion(h))})`).join(", ");
277
+ var lastSeen = (hosts) => hosts.map((h) => `${sanitizeTerminal(h.host)} (${sanitizeTerminal(shortVersion(h))}, last heartbeat ${h.lastHeartbeatAt?.slice(0, 10) ?? "never"})`).join(", ");
278
+ function describeFleet(fleet) {
279
+ const minimum = FIRST_VERSION_WITH_MACHINE_SKILLS;
280
+ if (fleet.state === "unknown") return [`The runner hosts were not checked: ${fleet.reason}.`];
281
+ const lines = fleet.state === "behind" ? [`These runner hosts run a CLI older than ${minimum}: ${named(fleet.behind)}. Do not commit the removal until each one updates.`] : fleet.current.length === 0 ? ["No runner host has reported to this factory."] : [`Every runner host that is sending heartbeats runs ${minimum} or later: ${named(fleet.current)}.`];
282
+ if (fleet.staleBehind.length > 0) {
283
+ lines.push(`These runner hosts stopped sending heartbeats on an older CLI: ${lastSeen(fleet.staleBehind)}. Update each one before it builds again.`);
284
+ }
285
+ return lines;
286
+ }
287
+ var CHECK_NAME = "Runner hosts for the maintained skills";
288
+ async function fleetCheck(opts = {}) {
289
+ const dirs = findGitDirs(opts.cwd ?? process.cwd());
290
+ if (dirs === void 0 || checkCommittedMaintainedSkills(dirs.repoRoot).length === 0) return [];
291
+ const fleet = await fleetReadiness(opts);
292
+ const detail = describeFleet(fleet).join(" ");
293
+ if (fleet.state === "unknown") return [{ name: CHECK_NAME, status: "skipped", detail }];
294
+ if (fleet.state === "behind") {
295
+ return [{ name: CHECK_NAME, status: "warn", detail, fix: `Wait for each host to update, or run \`${cliInvocation()} runner status\` on it to see why it has not.` }];
296
+ }
297
+ return [{ name: CHECK_NAME, status: "pass", detail }];
298
+ }
299
+
300
+ export { applyReferenceRewrites, checkBuildSkill, checkCommittedMaintainedSkills, checkMachineSkills, checkMaintainedReferences, committedMaintainedFolders, describeFleet, fleetCheck, fleetReadiness, maintainedReferenceRewrites, skillsFolders };
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { runEmit } from './chunk-WUL2OP5A.js';
4
- import { installStarterPack } from './chunk-XZ6Q6ZNR.js';
5
- import { AGENTS_MD_LAYOUT, declareAgentsMdLayout, linkClaudeSkills, SKILLS_LINK_PATH, describeSkillsLink, isAgentsMdLayout, holdsTodaysLayoutSources, discoverOuterlayerPaths } from './chunk-LOKSLO25.js';
6
- import { resolveGitCommonDir, defaultGitRunner } from './chunk-BPKO76QR.js';
7
- import { loadTemplateFiles, loadMaintainedFiles, skillDir, AGENTS_SKILLS_BASE } from './chunk-7OUOLGUV.js';
3
+ import { runEmit } from './chunk-QKXF7CLR.js';
8
4
  import { addStdioMcpEntryIfAbsent, addDocsMcpEntryIfAbsent, DOCS_MCP_SERVER_NAME } from './chunk-KT4CN6OU.js';
5
+ import { installStarterPack } from './chunk-SATUCMAJ.js';
6
+ import { AGENTS_MD_LAYOUT, declareAgentsMdLayout, linkClaudeSkills, SKILLS_LINK_PATH, describeSkillsLink, isAgentsMdLayout, holdsTodaysLayoutSources, discoverOuterlayerPaths } from './chunk-5B7BEQPR.js';
9
7
  import { C } from './chunk-ANPNT6PM.js';
8
+ import { resolveGitCommonDir, defaultGitRunner } from './chunk-4XN5FRRJ.js';
9
+ import { loadTemplateFiles, loadMaintainedFiles, skillDir, AGENTS_SKILLS_BASE } from './chunk-JGML2VUN.js';
10
10
  import { cliInvocation } from './chunk-CRB3POP4.js';
11
11
  import { linkedAgentsPath } from './chunk-VWFOKRYS.js';
12
12
  import { cloneIsGoverned } from './chunk-YQR6E6OV.js';
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { isAgentsMdLayout, discoverOuterlayerPaths, isForeignTree, toRepoRelative } from './chunk-LOKSLO25.js';
4
- import { retiredSkillPaths, removeRetiredSkills } from './chunk-MHX7YX7Y.js';
5
- import { maintainedFilesForExistingSkills, loadMaintainedFiles, writeMaintainedFiles } from './chunk-7OUOLGUV.js';
3
+ import { isAgentsMdLayout, discoverOuterlayerPaths, isForeignTree, toRepoRelative } from './chunk-5B7BEQPR.js';
6
4
  import { C } from './chunk-ANPNT6PM.js';
5
+ import { retiredSkillPaths, removeRetiredSkills } from './chunk-P2RWZCV7.js';
6
+ import { maintainedFilesForExistingSkills, loadMaintainedFiles, writeMaintainedFiles } from './chunk-JGML2VUN.js';
7
7
  import { cliInvocation } from './chunk-CRB3POP4.js';
8
8
  import { emitTree, generatedHeaderSource, parseOuterlayerConfig, classifyTree } from './chunk-RKOTJQVG.js';
9
9
  import { existsSync, readFileSync, mkdirSync, writeFileSync, copyFileSync, unlinkSync, rmdirSync, readdirSync } from 'fs';
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { LiveUploader } from './chunk-VS27BP3E.js';
4
- import { spoolDir } from './chunk-DJHNEGNM.js';
5
- import { CaptureDaemon } from './chunk-QE3UQAHK.js';
3
+ import { LiveUploader } from './chunk-2YSCKEL2.js';
4
+ import { CaptureDaemon } from './chunk-UHU7H57K.js';
5
+ import { spoolDir } from './chunk-DKWQMPSL.js';
6
6
  import { parseWorkItemEnv } from './chunk-T2Q7ISPE.js';
7
7
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
8
8
  import { mkdirSync, writeFileSync, rmSync } from 'fs';
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { detectMachine, supportsContainerBuilds, reachDockerStep, describeMachineDocker, supportsMicroVmBuilds } from './chunk-B7DJVG25.js';
4
- import { MIN_ENGINE_MAJOR } from './chunk-R7SGBXUD.js';
5
- import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-GFUE5TKO.js';
6
- import { runnerCredentialProblem } from './chunk-EPPIISRD.js';
7
- import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-RHAGBUL5.js';
3
+ import { detectMachine, supportsContainerBuilds, reachDockerStep, describeMachineDocker, supportsMicroVmBuilds } from './chunk-T57XUI6N.js';
4
+ import { MIN_ENGINE_MAJOR } from './chunk-IKXY47R5.js';
5
+ import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-F4FA3ZUT.js';
6
+ import { runnerCredentialProblem } from './chunk-55XLX5PA.js';
7
+ import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-5K3KB4YR.js';
8
8
  import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
9
9
  import { dirname } from 'path';
10
10
 
@@ -104,7 +104,7 @@ function prepareRunnerInit(configPath, opts = {}) {
104
104
  if (hooks === "builtin:process" && opts.allowProcess !== true) throw new RunnerInitError(processRefusal(machine));
105
105
  if (agent === "claude" && credential === void 0 && opts.credentialInEnvironment !== true && !hasStoredCredential(configPath)) {
106
106
  throw new RunnerInitError(
107
- "--agent claude needs Claude's credential, and none was piped on stdin or is in the runner.env beside the config. Pipe a token from `claude setup-token`, or an Anthropic API key: printf '%s' \"$CLAUDE_CODE_OAUTH_TOKEN\" | outerlayer runner init --agent claude"
107
+ "--agent claude needs Claude's credential, and none was piped on stdin or is in the claude.env beside the config. Pipe a token from `claude setup-token`, or an Anthropic API key: printf '%s' \"$CLAUDE_CODE_OAUTH_TOKEN\" | outerlayer runner init --agent claude"
108
108
  );
109
109
  }
110
110
  return { configPath, config, carried, credential, agent, machine, hooks, needsKey, host: opts.host };
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { resolvePackRoot, OUTERLAYER_SKILLS_BASE, loadTemplateFiles, AGENTS_SKILLS_BASE, loadMaintainedFiles, rewriteSkillPaths, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MAINTAINED_SKILLS, MACHINE_SKILL_PATH } from './chunk-7OUOLGUV.js';
4
3
  import { C } from './chunk-ANPNT6PM.js';
4
+ import { resolvePackRoot, OUTERLAYER_SKILLS_BASE, loadTemplateFiles, AGENTS_SKILLS_BASE, loadMaintainedFiles, rewriteSkillPaths, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MACHINE_SKILL_PATH } from './chunk-JGML2VUN.js';
5
+ import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
6
+ import { resolvePackageVersion } from './chunk-RA3O54FC.js';
5
7
  import { cliInvocation } from './chunk-CRB3POP4.js';
6
8
  import { linkedAgentsPath } from './chunk-VWFOKRYS.js';
7
- import { resolvePackageVersion } from './chunk-RA3O54FC.js';
8
9
  import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'fs';
9
10
  import { join, dirname } from 'path';
10
11
 
@@ -264,10 +264,10 @@ function guestAssetsPinned(arch) {
264
264
  var JAILER_BINARY_SHA256 = {
265
265
  x86_64: "65ef226e96f0ceda55ba643f445801ef2cc0ea667ef67cad8ac4f406c9c8434f"
266
266
  };
267
- var HOST_HELPER_ASSETS_VERSION = "9";
267
+ var HOST_HELPER_ASSETS_VERSION = "10";
268
268
  var HOST_HELPER_BASE_URL = `https://github.com/outerlayerai/guest-assets/releases/download/guest-${HOST_HELPER_ASSETS_VERSION}`;
269
269
  var HOST_HELPER_SHA256 = {
270
- x86_64: "c6f8e8ef6b65e4fff22379aa686d5977864fcbcc06f324672cbb90815a5076e5"
270
+ x86_64: "caa06b7206cceae6d8fc569781b269817ca66cb2ccfe177740fda042ed46bfcc"
271
271
  };
272
272
  function hostHelperPinned(arch = "x86_64", hashes = HOST_HELPER_SHA256) {
273
273
  return hashes[arch] !== "0".repeat(64);
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { claimPidFile, RunnerAlreadyRunningError, releasePidFile } from './chunk-D7ECMB7B.js';
3
+ import { claimPidFile, RunnerAlreadyRunningError, releasePidFile } from './chunk-NUHZV3A4.js';
4
4
  import { startTimeOf } from './chunk-JBJTC3UU.js';
5
- import { CLAUDE_CODE_VERSION, NODE_IMAGE, DEFAULT_BASE_IMAGE, RecipeError, locateRecipe, readRecipe, assertBuildable, TINI_VERSION, GH_VERSION, writeSanitizedRecipe, classifyProperties, GH_SHA256, TINI_SHA256, SANITIZED_NAME } from './chunk-2BTFKNTR.js';
6
- import { RUNNER_DIR_MODE, repoCacheDir, imagesDir, attemptStamp, runnerDir, rootfsPathFor, RUNNER_FILE_MODE } from './chunk-RHAGBUL5.js';
7
- import { withGitConfig, tokenHeader, PROXY_WARNING_FLAG } from './chunk-2I3LIRZP.js';
5
+ import { CLAUDE_CODE_VERSION, NODE_IMAGE, DEFAULT_BASE_IMAGE, RecipeError, locateRecipe, readRecipe, assertBuildable, TINI_VERSION, GH_VERSION, writeSanitizedRecipe, classifyProperties, GH_SHA256, TINI_SHA256, SANITIZED_NAME } from './chunk-SJZL5F3F.js';
6
+ import { RUNNER_DIR_MODE, repoCacheDir, imagesDir, attemptStamp, runnerDir, rootfsPathFor, RUNNER_FILE_MODE } from './chunk-5K3KB4YR.js';
7
+ import { withGitConfig, tokenHeader, PROXY_WARNING_FLAG } from './chunk-HXAEQPZR.js';
8
8
  import { RELAY_ID, RELAY_USER } from './chunk-JGD5TWQ2.js';
9
9
  import { mkdirSync, rmSync, existsSync, mkdtempSync, cpSync, readFileSync, writeFileSync, readdirSync, lstatSync, readlinkSync } from 'fs';
10
10
  import { tmpdir } from 'os';
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { MIN_ENGINE_MAJOR } from './chunk-R7SGBXUD.js';
4
- import { runnerImageVersion } from './chunk-M3MHHIUW.js';
5
- import { firecrackerArch, MICROVM_ARCHES, guestAssetsPinned } from './chunk-2BTFKNTR.js';
3
+ import { MIN_ENGINE_MAJOR } from './chunk-IKXY47R5.js';
4
+ import { runnerImageVersion } from './chunk-Z3ASAXVU.js';
5
+ import { firecrackerArch, MICROVM_ARCHES, guestAssetsPinned } from './chunk-SJZL5F3F.js';
6
6
  import { spawnSync } from 'child_process';
7
7
  import { existsSync, accessSync, constants, statSync, readFileSync } from 'fs';
8
8
 
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { autoConnect, detectActiveSession } from './chunk-2F762IXY.js';
4
- import { defaultFetch, unauthorizedMessage, resolveGatewayCredentials } from './chunk-BWH36FOC.js';
5
- import { resolveRepoIdentity } from './chunk-QE3UQAHK.js';
3
+ import { autoConnect, detectActiveSession } from './chunk-LNIFYSNK.js';
4
+ import { resolveRepoIdentity } from './chunk-UHU7H57K.js';
6
5
  import { C } from './chunk-ANPNT6PM.js';
6
+ import { defaultFetch, unauthorizedMessage, resolveGatewayCredentials } from './chunk-7CK2TJFB.js';
7
7
  import { parseWorkItemEnv } from './chunk-T2Q7ISPE.js';
8
8
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
9
9
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { launchRefusalForSession } from './chunk-ESVW4MJY.js';
4
- import { autoConnect, detectActiveSession } from './chunk-2F762IXY.js';
4
+ import { autoConnect, detectActiveSession } from './chunk-LNIFYSNK.js';
5
5
  import { acquireSpoolLockAt } from './chunk-BUP5N3X6.js';
6
- import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-BWH36FOC.js';
7
- import { resolveRepoIdentity } from './chunk-QE3UQAHK.js';
6
+ import { resolveRepoIdentity } from './chunk-UHU7H57K.js';
8
7
  import { C } from './chunk-ANPNT6PM.js';
8
+ import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-7CK2TJFB.js';
9
9
  import { launchedItemForSession } from './chunk-T2Q7ISPE.js';
10
10
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
11
11
  import { StepNameSchema, StepBodySchema } from './chunk-QZBXLLTV.js';
@@ -21971,14 +21971,14 @@ var ModelRegistryImpl = class {
21971
21971
  };
21972
21972
  var models_default = {
21973
21973
  version: "1.0.0",
21974
- generatedAt: "2026-10-16T03:49:42.065Z",
21974
+ generatedAt: "2026-10-17T03:39:49.068Z",
21975
21975
  sources: {
21976
21976
  litellm: {
21977
- fetchedAt: "2026-10-16T03:49:42.065Z",
21978
- modelCount: 1960
21977
+ fetchedAt: "2026-10-17T03:39:49.068Z",
21978
+ modelCount: 1961
21979
21979
  },
21980
21980
  openrouter: {
21981
- fetchedAt: "2026-10-16T03:49:42.065Z",
21981
+ fetchedAt: "2026-10-17T03:39:49.068Z",
21982
21982
  modelCount: 204
21983
21983
  }
21984
21984
  },
@@ -63578,12 +63578,12 @@ var models_default = {
63578
63578
  "top_p"
63579
63579
  ],
63580
63580
  pricing: {
63581
- inputCostPerToken: 112e-9,
63582
- outputCostPerToken: 336e-9
63581
+ inputCostPerToken: 5e-8,
63582
+ outputCostPerToken: 15e-8
63583
63583
  },
63584
63584
  context: {
63585
63585
  maxInputTokens: 1048576,
63586
- maxOutputTokens: 131072
63586
+ maxOutputTokens: 384e3
63587
63587
  },
63588
63588
  capabilities: {
63589
63589
  vision: true,
@@ -67468,6 +67468,25 @@ var models_default = {
67468
67468
  pdfInput: true
67469
67469
  },
67470
67470
  deprecationDate: "2027-10-01"
67471
+ },
67472
+ "reflection/Beam-1.0-501B-A23B": {
67473
+ provider: "together_ai",
67474
+ displayName: "Reflection/Beam 1.0 501B A23B",
67475
+ mode: "chat",
67476
+ source: "litellm",
67477
+ pricing: {
67478
+ inputCostPerToken: 4e-7,
67479
+ outputCostPerToken: 12e-7,
67480
+ cacheReadCostPerToken: 4e-8
67481
+ },
67482
+ context: {
67483
+ maxInputTokens: 1048576
67484
+ },
67485
+ capabilities: {
67486
+ functionCalling: true,
67487
+ structuredOutput: true,
67488
+ promptCaching: true
67489
+ }
67471
67490
  }
67472
67491
  }
67473
67492
  };
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { WorkCommandError, postJson } from './chunk-55GNQPO6.js';
4
- import { defaultGitRunner, materializeContext, isStagingWriteFault, lookupGoverningSource } from './chunk-BPKO76QR.js';
5
- import { signingFetchFor } from './chunk-BWH36FOC.js';
6
- import { unsupportedLayout, layoutRefusalReason, composeDelivery } from './chunk-6TRNCUM4.js';
3
+ import { WorkCommandError, postJson } from './chunk-X52PMPOM.js';
4
+ import { defaultGitRunner, materializeContext, isStagingWriteFault, lookupGoverningSource } from './chunk-4XN5FRRJ.js';
5
+ import { signingFetchFor } from './chunk-7CK2TJFB.js';
6
+ import { signerFor } from './chunk-YL2VDSNF.js';
7
+ import { SHIM_DIR, stagedContextDir, contextHomeDir, deliveryDir, keptContextDir } from './chunk-5K3KB4YR.js';
8
+ import { unsupportedLayout, layoutRefusalReason, composeDelivery } from './chunk-FGF52V4V.js';
7
9
  import { SHIM_SCRIPT, GOVERNANCE_VARIABLE } from './chunk-HCVLP7XA.js';
8
10
  import { readDegraded, readContextManifest, readSourceCache } from './chunk-YQR6E6OV.js';
9
- import { signerFor } from './chunk-Y4OKEFAX.js';
10
- import { SHIM_DIR, stagedContextDir, contextHomeDir, deliveryDir, keptContextDir } from './chunk-RHAGBUL5.js';
11
11
  import { fstatSync, mkdirSync, writeFileSync, chmodSync, rmSync, cpSync, readFileSync, existsSync, lstatSync } from 'fs';
12
12
  import { relative, join, dirname } from 'path';
13
13
 
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { RecipeError, BUILDKIT_IMAGE } from './chunk-2BTFKNTR.js';
4
3
  import { parseSize } from './chunk-YJLHUKYS.js';
5
- import { compareVersions } from './chunk-QE3UQAHK.js';
6
- import { ensureHostKey } from './chunk-Y4OKEFAX.js';
7
- import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, jobsDir } from './chunk-RHAGBUL5.js';
8
- import { CLAUDE_PORT, JOB_MOUNT, GATEWAY_PORT, GATEWAY_SOCKET, CLAUDE_SOCKET, RELAY_PORT, DESTINATION_BASE_PORT } from './chunk-2I3LIRZP.js';
4
+ import { RecipeError, BUILDKIT_IMAGE } from './chunk-SJZL5F3F.js';
5
+ import { compareVersions } from './chunk-UHU7H57K.js';
6
+ import { ensureHostKey } from './chunk-YL2VDSNF.js';
7
+ import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, jobsDir } from './chunk-5K3KB4YR.js';
8
+ import { CLAUDE_PORT, JOB_MOUNT, GATEWAY_PORT, GATEWAY_SOCKET, CLAUDE_SOCKET, RELAY_PORT, DESTINATION_BASE_PORT } from './chunk-HXAEQPZR.js';
9
9
  import { JOIN_DIR, RELAY_ID, JOIN_SOCKET, TARGET_GATEWAY, TARGET_CLAUDE, destinationTarget, RELAY_USER } from './chunk-JGD5TWQ2.js';
10
10
  import { StringDecoder } from 'string_decoder';
11
11
  import { spawn } from 'child_process';
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { sanitizeTerminal } from './chunk-BUP5N3X6.js';
4
- import { isAgentsMdLayout } from './chunk-LOKSLO25.js';
5
- import { DEFAULT_DASHBOARD } from './chunk-6BLXUD56.js';
6
- import { cliFetch, resolveGatewayCredentials } from './chunk-BWH36FOC.js';
7
- import { writeRepoConnection, findGitDirs, readRepoConnection } from './chunk-BJ3KTMDH.js';
8
- import { remoteLookupFailed } from './chunk-QE3UQAHK.js';
4
+ import { remoteLookupFailed } from './chunk-UHU7H57K.js';
5
+ import { isAgentsMdLayout } from './chunk-5B7BEQPR.js';
6
+ import { DEFAULT_DASHBOARD } from './chunk-HOU33DW5.js';
7
+ import { cliFetch, resolveGatewayCredentials } from './chunk-7CK2TJFB.js';
9
8
  import { readCloudConfig } from './chunk-PJDQPF5N.js';
9
+ import { writeRepoConnection, findGitDirs, readRepoConnection } from './chunk-BJ3KTMDH.js';
10
10
  import { cliInvocation } from './chunk-CRB3POP4.js';
11
11
  import { execFileSync } from 'child_process';
12
12
  import { createInterface } from 'readline/promises';
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { isPlaceholderCommand } from './chunk-64GMBWAK.js';
4
- import { describeCallFailure } from './chunk-WSYXLLA5.js';
5
- import { WorkCommandError, getJson } from './chunk-55GNQPO6.js';
3
+ import { isPlaceholderCommand } from './chunk-R7SS5RLJ.js';
4
+ import { describeCallFailure } from './chunk-USJZ2LDK.js';
5
+ import { builtinKind } from './chunk-55XLX5PA.js';
6
+ import { WorkCommandError, getJson } from './chunk-X52PMPOM.js';
6
7
  import { sanitizeTerminal } from './chunk-BUP5N3X6.js';
7
- import { builtinKind } from './chunk-EPPIISRD.js';
8
- import { signerFor } from './chunk-Y4OKEFAX.js';
9
- import { CLAUDE_CREDENTIAL_VARIABLES, claudeCredential } from './chunk-2I3LIRZP.js';
8
+ import { signerFor } from './chunk-YL2VDSNF.js';
9
+ import { CLAUDE_CREDENTIAL_VARIABLES, claudeCredential } from './chunk-HXAEQPZR.js';
10
10
 
11
11
  createRequire(import.meta.url);
12
12
 
@@ -57,7 +57,7 @@ function formerSkillProblem(queues) {
57
57
  function needsClaudeCredential(hooks) {
58
58
  return builtinKind(hooks.provision) !== "own";
59
59
  }
60
- var CREDENTIAL_FIX = "Run `claude setup-token`, then start the runner with CLAUDE_CODE_OAUTH_TOKEN set to the token it prints (or ANTHROPIC_API_KEY set to an API key), for example with EnvironmentFile= in the runner's systemd unit";
60
+ var CREDENTIAL_FIX = "Run `claude setup-token`, then pipe the token it prints (or an Anthropic API key) to `outerlayer runner init --agent claude`, which stores it in the claude.env beside the config. Or start the runner with CLAUDE_CODE_OAUTH_TOKEN (or ANTHROPIC_API_KEY) set";
61
61
  function claudeCredentialCheck(env, options = {}) {
62
62
  const name = "Claude credential";
63
63
  if (options.service !== void 0) {
@@ -66,13 +66,13 @@ function claudeCredentialCheck(env, options = {}) {
66
66
  return {
67
67
  name,
68
68
  status: "fail",
69
- detail: `the service ${unit} has no Claude credential: neither ${CLAUDE_CREDENTIAL_VARIABLES.slice(0, 2).join(" nor ")} is set in its runner.env, so every build fails at provision as agent_credential_missing`,
69
+ detail: `the service ${unit} has no Claude credential: neither ${CLAUDE_CREDENTIAL_VARIABLES.slice(0, 2).join(" nor ")} is set in its claude.env or runner.env, so every build fails at provision as agent_credential_missing`,
70
70
  fix: `${CREDENTIAL_FIX}, then restart the service: sudo systemctl restart ${unit}.`
71
71
  };
72
72
  }
73
- return { name, status: "pass", detail: `${variables[0]} is set in the runner.env of the service ${unit}` };
73
+ return { name, status: "pass", detail: `${variables[0]} is set in the claude.env or runner.env of the service ${unit}` };
74
74
  }
75
- const held = claudeCredential(env);
75
+ const held = claudeCredential(env, { ignoreHeld: options.ignoreHeld === true });
76
76
  if (held === void 0) {
77
77
  return {
78
78
  name,
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { RELAY_PORT, GATEWAY_SOCKET, GATEWAY_PORT, CLAUDE_SOCKET, CLAUDE_PORT, DESTINATION_BASE_PORT } from './chunk-2I3LIRZP.js';
3
+ import { RELAY_PORT, GATEWAY_SOCKET, GATEWAY_PORT, CLAUDE_SOCKET, CLAUDE_PORT, DESTINATION_BASE_PORT } from './chunk-HXAEQPZR.js';
4
4
  import { symlinkSync, unlinkSync } from 'fs';
5
5
  import { join } from 'path';
6
6