@outerlayer/cli 0.22.1 → 0.23.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 (114) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +4 -1
  3. package/dist/{agent-setup-LTSLXPS3.js → agent-setup-SNDCEHG2.js} +14 -12
  4. package/dist/{artifact-link-cmd-OWRI5AJX.js → artifact-link-cmd-LEI6EOZE.js} +2 -2
  5. package/dist/bridge-QFN3KJP6.js +8 -0
  6. package/dist/{build-6WRNZPVR.js → build-WHHFA7KM.js} +2 -2
  7. package/dist/build-info.json +1 -1
  8. package/dist/{builder-G3MLDMTI.js → builder-7FBQAWQZ.js} +3 -3
  9. package/dist/{check-UYKEMQNR.js → check-3CGLWMHM.js} +37 -37
  10. package/dist/{chunk-ZPSLJFGL.js → chunk-2TT7DEMZ.js} +2 -2
  11. package/dist/{chunk-3V5C64Y5.js → chunk-6AOZD3LY.js} +3 -4
  12. package/dist/{chunk-5NJIWKD4.js → chunk-BOG4ENP7.js} +9 -9
  13. package/dist/{chunk-G3IJ3N6F.js → chunk-BUP5N3X6.js} +1 -1
  14. package/dist/{chunk-FRNYCJ4W.js → chunk-C2XZBNHY.js} +1 -1
  15. package/dist/{chunk-BET347JZ.js → chunk-C64D7HR3.js} +6 -7
  16. package/dist/{chunk-AEKSX4EY.js → chunk-CBCKD6DO.js} +1 -1
  17. package/dist/{chunk-56X5TOJY.js → chunk-D64E222W.js} +5 -6
  18. package/dist/{chunk-URAKVDSI.js → chunk-DJYOCD65.js} +9 -10
  19. package/dist/{chunk-IZSVXRDR.js → chunk-DXDF43YG.js} +1 -1
  20. package/dist/{chunk-F7CU5ABH.js → chunk-DYEFPYME.js} +1 -1
  21. package/dist/{chunk-ORNJJ7XN.js → chunk-FX6IHR5C.js} +11 -12
  22. package/dist/{chunk-ENTHEUKT.js → chunk-G3LHWUBK.js} +4 -4
  23. package/dist/{chunk-5QRP3MVS.js → chunk-GNPTU4BM.js} +9 -4
  24. package/dist/{chunk-JRCSET55.js → chunk-GXV73IIS.js} +6 -6
  25. package/dist/{chunk-5OCIHFGE.js → chunk-HBISTTG3.js} +32 -23
  26. package/dist/chunk-JKNYTNYD.js +151 -0
  27. package/dist/{chunk-CUFFDEF3.js → chunk-KGKFEONR.js} +4 -4
  28. package/dist/{chunk-USWVXQIH.js → chunk-MQ743JX3.js} +3 -3
  29. package/dist/{chunk-XR56WEA5.js → chunk-OGMZJWWD.js} +1 -1
  30. package/dist/chunk-QS43O4DR.js +113 -0
  31. package/dist/{chunk-FOCML5FI.js → chunk-QSEPKZXR.js} +15 -14
  32. package/dist/{chunk-7VUK5RFS.js → chunk-QZBXLLTV.js} +36 -1
  33. package/dist/{chunk-WFSUUUAN.js → chunk-RKOTJQVG.js} +1 -1
  34. package/dist/{chunk-7FEY33MY.js → chunk-TFGXOHF6.js} +13 -13
  35. package/dist/{chunk-V7SAQ645.js → chunk-VJBFQP3H.js} +21 -12
  36. package/dist/{chunk-ZNPE7FW5.js → chunk-VPEGE3QZ.js} +1 -1
  37. package/dist/{chunk-W3SWJ2TD.js → chunk-VWFOKRYS.js} +5 -2
  38. package/dist/{chunk-XCRZTXRL.js → chunk-WX2WEERU.js} +63 -43
  39. package/dist/chunk-WXJXHZVB.js +73 -0
  40. package/dist/{chunk-BOMRFYTZ.js → chunk-WY7HFY62.js} +3 -3
  41. package/dist/{chunk-VSUXCMMH.js → chunk-XFGL53GU.js} +51 -33
  42. package/dist/{chunk-6YBLN4TR.js → chunk-XGPC3IOR.js} +4 -5
  43. package/dist/{chunk-QC72I5GQ.js → chunk-XOEV4FVK.js} +3 -3
  44. package/dist/{chunk-EAQSOE62.js → chunk-XSPA5ODY.js} +21 -19
  45. package/dist/{chunk-JZGFDTNC.js → chunk-Z42JY3LQ.js} +20 -3
  46. package/dist/{chunk-O6RJ3QMU.js → chunk-ZKWKQIJU.js} +86 -6
  47. package/dist/{chunk-QOALB6ZD.js → chunk-ZLZ3XVPI.js} +3 -3
  48. package/dist/{claude-launcher-TBWV3YL3.js → claude-launcher-KEESTJHO.js} +5 -5
  49. package/dist/{cli-U253V422.js → cli-44WGGICQ.js} +126 -112
  50. package/dist/{command-IQTPFSXY.js → command-4FAP2D3P.js} +22 -23
  51. package/dist/connect-cmd-6DUTUK63.js +22 -0
  52. package/dist/{context-cleanup-DSA3HGQU.js → context-cleanup-LTH77FC3.js} +3 -3
  53. package/dist/{control-plane-launch-OWSNH6YA.js → control-plane-launch-SEYCOZFH.js} +8 -9
  54. package/dist/{dist-7IH56ELA.js → dist-SOH3O24Y.js} +2 -2
  55. package/dist/{docker-JU422JL7.js → docker-KMK4LOET.js} +3 -3
  56. package/dist/{doctor-FZTS57ZO.js → doctor-4H77CEB7.js} +24 -25
  57. package/dist/{emit-artifact-cmd-YLZ5WLSF.js → emit-artifact-cmd-XCZ3ALLV.js} +15 -15
  58. package/dist/emit-cmd-WQH2NK7H.js +15 -0
  59. package/dist/{emit-criteria-cmd-MF6TVE7C.js → emit-criteria-cmd-JE72JHKJ.js} +10 -10
  60. package/dist/{emit-finding-cmd-S3YMFTZT.js → emit-finding-cmd-ILIDRMYN.js} +10 -10
  61. package/dist/{emit-result-cmd-JHEUFTPX.js → emit-result-cmd-WPKG5YAS.js} +15 -15
  62. package/dist/{emit-step-cmd-TUI2T3DS.js → emit-step-cmd-OVMLQSL6.js} +11 -11
  63. package/dist/{governing-source-XSEIRSBE.js → governing-source-EQBKPME7.js} +16 -17
  64. package/dist/{guest-init-DF7V5D2R.js → guest-init-HWSE7W6L.js} +3 -2
  65. package/dist/{hook-fast-O3UUN6SO.js → hook-fast-27SHD72I.js} +1 -1
  66. package/dist/{hook-wrap-fast-NPLHJXFK.js → hook-wrap-fast-NOOGDNSW.js} +2 -2
  67. package/dist/{import-capture-cmd-Q56DDZVO.js → import-capture-cmd-TCOKNVBM.js} +12 -7
  68. package/dist/{import-ruler-cmd-T6LLO6Q7.js → import-ruler-cmd-VJOHOJQ7.js} +2 -2
  69. package/dist/index.js +6 -6
  70. package/dist/{init-ZZZPYGUH.js → init-HAAHIQFN.js} +23 -24
  71. package/dist/{init-VZE72CR4.js → init-WQ62BXDN.js} +23 -24
  72. package/dist/{init-cmd-W5VV62ZN.js → init-cmd-VPFIDY64.js} +24 -24
  73. package/dist/init-update-UZIJ2FMU.js +529 -0
  74. package/dist/layout-UOJQGEPW.js +10 -0
  75. package/dist/{login-browser-BN5UKPHS.js → login-browser-4OMZFP3U.js} +4 -3
  76. package/dist/{logout-cmd-RZFWTNYD.js → logout-cmd-5V5MMBSY.js} +2 -2
  77. package/dist/{loop-6WENRS5S.js → loop-JPW2QJ64.js} +37 -37
  78. package/dist/{machine-M4MQBV5A.js → machine-PGDRWPI2.js} +22 -23
  79. package/dist/{mcp-install-cmd-GD4QUP7Z.js → mcp-install-cmd-GGWB3JJ2.js} +2 -2
  80. package/dist/{mcp-serve-cmd-SBW7HYKD.js → mcp-serve-cmd-CNRC5AL5.js} +3 -3
  81. package/dist/{runner-identity-FTHZFMGY.js → runner-identity-IIZ3RK7M.js} +3 -3
  82. package/dist/{runner-key-QT7GKGEE.js → runner-key-BPP5XRYR.js} +23 -24
  83. package/dist/{session-sender-BK6TGNVO.js → session-sender-EKKZ5DEU.js} +16 -16
  84. package/dist/{settings-J2652U5N.js → settings-AKYEOCC2.js} +1 -1
  85. package/dist/{spec-cmd-ZNJ3GXWC.js → spec-cmd-JDHGNFVJ.js} +11 -11
  86. package/dist/{starter-pack-5EQYGSJF.js → starter-pack-55EFILC5.js} +7 -4
  87. package/dist/{status-JOO7MGIC.js → status-UCQDEMFX.js} +30 -30
  88. package/dist/{statusline-fast-2OK3DVAA.js → statusline-fast-GVRSBHAF.js} +2 -2
  89. package/dist/{sync-cmd-W2FPY3T5.js → sync-cmd-NSVXOYFJ.js} +15 -15
  90. package/dist/{watch-WLH5ZUZU.js → watch-NQVZWPBJ.js} +15 -15
  91. package/dist/{work-claim-cmd-4PLDTEZR.js → work-claim-cmd-FPJXQAXP.js} +13 -13
  92. package/dist/{work-cmd-KWHAYUYB.js → work-cmd-FMPDXPU6.js} +11 -11
  93. package/dist/{work-comment-cmd-4CUI7ZDE.js → work-comment-cmd-ZVUE2IUN.js} +11 -11
  94. package/dist/{work-logs-cmd-AF253WLM.js → work-logs-cmd-CQH2SYT4.js} +11 -11
  95. package/dist/{work-open-pr-cmd-JETE6HRL.js → work-open-pr-cmd-YY2OGJOI.js} +12 -12
  96. package/dist/{work-pr-cmd-V5G4CPMG.js → work-pr-cmd-EHFTEVJO.js} +11 -11
  97. package/dist/{work-stop-cmd-FIEKUDGE.js → work-stop-cmd-LGWSBSBT.js} +11 -11
  98. package/package.json +1 -1
  99. package/skill-pack/maintained/outerlayer-amend/SKILL.md +83 -82
  100. package/skill-pack/maintained/outerlayer-build/SKILL.md +4 -2
  101. package/skill-pack/maintained/outerlayer-build/references/agent-briefs.md +17 -4
  102. package/skill-pack/maintained/outerlayer-build/references/criteria-judge.md +10 -0
  103. package/skill-pack/maintained/outerlayer-build/references/release.md +7 -4
  104. package/skill-pack/maintained/outerlayer-build/references/review-briefs.md +10 -3
  105. package/skill-pack/maintained/outerlayer-cli/SKILL.md +13 -4
  106. package/skill-pack/maintained/outerlayer-cli/references/merge-base-branch.md +54 -0
  107. package/dist/chunk-NTRCK4NH.js +0 -38
  108. package/dist/chunk-QF7WZUU6.js +0 -56
  109. package/dist/connect-cmd-ZFOK6HEL.js +0 -17
  110. package/dist/emit-cmd-3W5IO5ET.js +0 -14
  111. package/dist/init-update-YFPIQS5G.js +0 -211
  112. package/dist/{chunk-F35VMF5M.js → chunk-GOSFARMS.js} +1 -1
  113. package/dist/{chunk-3AZYLAJC.js → chunk-QILR6TZP.js} +1 -1
  114. package/dist/{chunk-DIB2WLBL.js → chunk-YVZJ6GKF.js} +1 -1
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { splitRawFile } from './chunk-WFSUUUAN.js';
3
+ import { splitRawFile } from './chunk-RKOTJQVG.js';
4
4
  import { resolvePackageVersion } from './chunk-RA3O54FC.js';
5
5
  import { existsSync, readFileSync, mkdirSync, writeFileSync, readdirSync } from 'fs';
6
6
  import { join, dirname } from 'path';
@@ -12,17 +12,26 @@ var MAINTAINED_SKILLS = ["outerlayer-evidence", "outerlayer-amend", "outerlayer-
12
12
  function templateClassLine(version) {
13
13
  return `<!-- yours to edit. Copied once from the default template by outerlayer init ${version}; never overwritten. -->`;
14
14
  }
15
- function maintainedClassLine(version) {
16
- return `<!-- maintained by OuterLayer ${version}. Edits are overwritten on the next outerlayer context emit. -->`;
15
+ function maintainedClassLine(version, base) {
16
+ const command = base === AGENTS_SKILLS_BASE ? "outerlayer init --update" : "outerlayer context emit";
17
+ return `<!-- maintained by OuterLayer ${version}. Edits are overwritten on the next ${command}. -->`;
18
+ }
19
+ var OUTERLAYER_SKILLS_BASE = ".outerlayer/skills";
20
+ var AGENTS_SKILLS_BASE = ".agents/skills";
21
+ function rewriteSkillPaths(content, base) {
22
+ return base === OUTERLAYER_SKILLS_BASE ? content : content.split(`${OUTERLAYER_SKILLS_BASE}/`).join(`${base}/`);
23
+ }
24
+ function restoreSkillPaths(content, base) {
25
+ return base === OUTERLAYER_SKILLS_BASE ? content : content.split(`${base}/`).join(`${OUTERLAYER_SKILLS_BASE}/`);
17
26
  }
18
27
  function resolvePackRoot(entryPath = fileURLToPath(import.meta.url)) {
19
28
  return join(dirname(dirname(entryPath)), "skill-pack");
20
29
  }
21
- function skillDir(skill) {
22
- return `.outerlayer/skills/${skill}`;
30
+ function skillDir(skill, base = OUTERLAYER_SKILLS_BASE) {
31
+ return `${base}/${skill}`;
23
32
  }
24
- function renderSkillFile(skillClass, content, version) {
25
- const line = skillClass === "maintained" ? maintainedClassLine(version) : templateClassLine(version);
33
+ function renderSkillFile(skillClass, content, version, base) {
34
+ const line = skillClass === "maintained" ? maintainedClassLine(version, base) : templateClassLine(version);
26
35
  const { frontmatterInner, body } = splitRawFile(content);
27
36
  if (frontmatterInner === null) return `${line}
28
37
  ${content}`;
@@ -42,7 +51,7 @@ function filesUnder(dir, base = dir) {
42
51
  function orderSkillFiles(relPaths) {
43
52
  return [...relPaths.filter((p) => p === "SKILL.md"), ...relPaths.filter((p) => p !== "SKILL.md")];
44
53
  }
45
- function loadClass(packRoot, skillClass, names, version) {
54
+ function loadClass(packRoot, skillClass, names, version, base) {
46
55
  const files = [];
47
56
  for (const skill of names) {
48
57
  const dir = join(packRoot, skillClass, skill);
@@ -52,18 +61,18 @@ function loadClass(packRoot, skillClass, names, version) {
52
61
  files.push({
53
62
  skill,
54
63
  skillClass,
55
- path: `${skillDir(skill)}/${rel}`,
56
- content: rel === "SKILL.md" ? renderSkillFile(skillClass, raw, version) : raw
64
+ path: `${skillDir(skill, base)}/${rel}`,
65
+ content: rewriteSkillPaths(rel === "SKILL.md" ? renderSkillFile(skillClass, raw, version, base) : raw, base)
57
66
  });
58
67
  }
59
68
  }
60
69
  return files;
61
70
  }
62
- function loadTemplateFiles(packRoot = resolvePackRoot(), version = resolvePackageVersion()) {
63
- return loadClass(packRoot, "template", TEMPLATE_SKILLS, version);
71
+ function loadTemplateFiles(packRoot = resolvePackRoot(), version = resolvePackageVersion(), base = OUTERLAYER_SKILLS_BASE) {
72
+ return loadClass(packRoot, "template", TEMPLATE_SKILLS, version, base);
64
73
  }
65
- function loadMaintainedFiles(packRoot = resolvePackRoot(), version = resolvePackageVersion()) {
66
- return loadClass(packRoot, "maintained", MAINTAINED_SKILLS, version);
74
+ function loadMaintainedFiles(packRoot = resolvePackRoot(), version = resolvePackageVersion(), base = OUTERLAYER_SKILLS_BASE) {
75
+ return loadClass(packRoot, "maintained", MAINTAINED_SKILLS, version, base);
67
76
  }
68
77
  function writeMaintainedFiles(repoRoot, files) {
69
78
  const created = [];
@@ -78,15 +87,15 @@ function writeMaintainedFiles(repoRoot, files) {
78
87
  }
79
88
  return { created, rewritten };
80
89
  }
81
- function maintainedFilesForExistingSkills(repoRoot, files) {
90
+ function maintainedFilesForExistingSkills(repoRoot, files, base = OUTERLAYER_SKILLS_BASE) {
82
91
  return files.filter(
83
- (file) => existsSync(join(repoRoot, skillDir(file.skill))) || formerNameExists(repoRoot, file.skill) || requiredByBuild(repoRoot, file.skill)
92
+ (file) => existsSync(join(repoRoot, skillDir(file.skill, base))) || formerNameExists(repoRoot, file.skill, base) || requiredByBuild(repoRoot, file.skill, base)
84
93
  );
85
94
  }
86
95
  function namesCore(text) {
87
96
  return text.includes("outerlayer-build");
88
97
  }
89
- function requiredByBuild(repoRoot, skill) {
98
+ function requiredByBuild(repoRoot, skill, base) {
90
99
  if (skill !== "outerlayer-build") return false;
91
100
  const named = (file) => {
92
101
  try {
@@ -95,7 +104,7 @@ function requiredByBuild(repoRoot, skill) {
95
104
  return false;
96
105
  }
97
106
  };
98
- if (named(join(repoRoot, skillDir("build"), "SKILL.md"))) return true;
107
+ if (named(join(repoRoot, skillDir("build", base), "SKILL.md"))) return true;
99
108
  const dir = join(repoRoot, ".outerlayer", "validators");
100
109
  try {
101
110
  return readdirSync(dir).some((name) => name.endsWith(".yaml") && named(join(dir, name)));
@@ -110,15 +119,15 @@ var FORMER_MAINTAINED_NAMES = {
110
119
  outerlayer: "outerlayer-cli"
111
120
  };
112
121
  var MAINTAINED_LINE = /^<!-- maintained by OuterLayer \S+?\. /m;
113
- function isMaintainedCopy(repoRoot, skill) {
122
+ function isMaintainedCopy(repoRoot, skill, base = OUTERLAYER_SKILLS_BASE) {
114
123
  try {
115
- return MAINTAINED_LINE.test(readFileSync(join(repoRoot, skillDir(skill), "SKILL.md"), "utf8"));
124
+ return MAINTAINED_LINE.test(readFileSync(join(repoRoot, skillDir(skill, base), "SKILL.md"), "utf8"));
116
125
  } catch {
117
126
  return false;
118
127
  }
119
128
  }
120
- function formerNameExists(repoRoot, skill) {
121
- return Object.entries(FORMER_MAINTAINED_NAMES).some(([former, current]) => current === skill && isMaintainedCopy(repoRoot, former));
129
+ function formerNameExists(repoRoot, skill, base) {
130
+ return Object.entries(FORMER_MAINTAINED_NAMES).some(([former, current]) => current === skill && isMaintainedCopy(repoRoot, former, base));
122
131
  }
123
132
 
124
- export { FORMER_MAINTAINED_NAMES, MAINTAINED_SKILLS, TEMPLATE_SKILLS, isMaintainedCopy, loadMaintainedFiles, loadTemplateFiles, maintainedFilesForExistingSkills, namesCore, resolvePackRoot, skillDir, writeMaintainedFiles };
133
+ export { AGENTS_SKILLS_BASE, FORMER_MAINTAINED_NAMES, MAINTAINED_SKILLS, OUTERLAYER_SKILLS_BASE, TEMPLATE_SKILLS, isMaintainedCopy, loadMaintainedFiles, loadTemplateFiles, maintainedFilesForExistingSkills, namesCore, resolvePackRoot, restoreSkillPaths, rewriteSkillPaths, skillDir, writeMaintainedFiles };
@@ -0,0 +1,151 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+ import { AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE } from './chunk-HBISTTG3.js';
4
+ import { normalizePath, CONTEXT_PIN_FILENAME } from './chunk-RKOTJQVG.js';
5
+ import { existsSync, readdirSync, readFileSync, mkdirSync, writeFileSync, lstatSync, readlinkSync, symlinkSync, rmdirSync } from 'fs';
6
+ import { relative, sep, join } from 'path';
7
+
8
+ createRequire(import.meta.url);
9
+ var SKIP_DIRS = /* @__PURE__ */ new Set(["node_modules", ".git"]);
10
+ function toRepoRelative(repoRoot, absPath) {
11
+ return normalizePath(relative(repoRoot, absPath).split(sep).join("/"));
12
+ }
13
+ function isForeignTree(dir) {
14
+ return existsSync(join(dir, ".git")) || existsSync(join(dir, CONTEXT_PIN_FILENAME));
15
+ }
16
+ function discoverOuterlayerPaths(repoRoot) {
17
+ const out = [];
18
+ walk(repoRoot, repoRoot, false, out);
19
+ return out.sort();
20
+ }
21
+ function walk(dir, repoRoot, insideOuterlayer, out) {
22
+ let entries;
23
+ try {
24
+ entries = readdirSync(dir, { withFileTypes: true });
25
+ } catch {
26
+ return;
27
+ }
28
+ for (const entry of entries) {
29
+ if (entry.isSymbolicLink()) continue;
30
+ const full = join(dir, entry.name);
31
+ if (entry.isDirectory()) {
32
+ if (!insideOuterlayer && SKIP_DIRS.has(entry.name)) continue;
33
+ if (!insideOuterlayer && isForeignTree(full)) continue;
34
+ walk(full, repoRoot, insideOuterlayer || entry.name === ".outerlayer", out);
35
+ } else if (entry.isFile() && insideOuterlayer) {
36
+ out.push(toRepoRelative(repoRoot, full));
37
+ }
38
+ }
39
+ }
40
+
41
+ // src/layout.ts
42
+ var AGENTS_MD_LAYOUT = 2;
43
+ var FIRST_VERSION_READING_AGENTS_SKILLS = "0.21.0";
44
+ var SKILLS_LINK_PATH = ".claude/skills";
45
+ var SKILLS_LINK_TARGET = "../.agents/skills";
46
+ var CONFIG_PATH = ".outerlayer/config.json";
47
+ function readConfigObject(repoRoot) {
48
+ try {
49
+ const doc = JSON.parse(readFileSync(join(repoRoot, CONFIG_PATH), "utf8"));
50
+ return doc !== null && typeof doc === "object" && !Array.isArray(doc) ? doc : void 0;
51
+ } catch {
52
+ return void 0;
53
+ }
54
+ }
55
+ function declaredLayout(repoRoot) {
56
+ const layout = readConfigObject(repoRoot)?.layout;
57
+ return typeof layout === "number" ? layout : void 0;
58
+ }
59
+ var MOVED_SOURCE = /(^|\/)\.outerlayer\/(AGENTS\.md|skills\/)/;
60
+ function isAgentsMdLayout(repoRoot) {
61
+ if (declaredLayout(repoRoot) !== AGENTS_MD_LAYOUT) return false;
62
+ return !discoverOuterlayerPaths(repoRoot).some((path) => MOVED_SOURCE.test(path));
63
+ }
64
+ function skillsBaseFor(repoRoot) {
65
+ return isAgentsMdLayout(repoRoot) ? AGENTS_SKILLS_BASE : OUTERLAYER_SKILLS_BASE;
66
+ }
67
+ var TODAYS_LAYOUT_SOURCE = /(^|\/)\.outerlayer\/(AGENTS\.md|mcp\.json|skills\/|commands\/)/;
68
+ function holdsTodaysLayoutSources(outerlayerPaths) {
69
+ return outerlayerPaths.some((path) => TODAYS_LAYOUT_SOURCE.test(path));
70
+ }
71
+ function declareAgentsMdLayout(repoRoot) {
72
+ const abs = join(repoRoot, CONFIG_PATH);
73
+ let doc = {};
74
+ if (existsSync(abs)) {
75
+ const existing = readConfigObject(repoRoot);
76
+ if (existing === void 0) return false;
77
+ if (existing.layout === AGENTS_MD_LAYOUT) return true;
78
+ doc = existing;
79
+ }
80
+ mkdirSync(join(repoRoot, ".outerlayer"), { recursive: true });
81
+ writeFileSync(abs, `${JSON.stringify({ ...doc, layout: AGENTS_MD_LAYOUT }, null, 2)}
82
+ `);
83
+ return true;
84
+ }
85
+ function filesBelow(repoRoot, rel) {
86
+ const out = [];
87
+ let entries;
88
+ try {
89
+ entries = readdirSync(join(repoRoot, rel), { withFileTypes: true });
90
+ } catch {
91
+ return [];
92
+ }
93
+ for (const entry of entries) {
94
+ const child = `${rel}/${entry.name}`;
95
+ if (entry.isDirectory()) out.push(...filesBelow(repoRoot, child));
96
+ else out.push(child);
97
+ }
98
+ return out.sort();
99
+ }
100
+ function linkClaudeSkills(repoRoot) {
101
+ const abs = join(repoRoot, SKILLS_LINK_PATH);
102
+ let stat;
103
+ try {
104
+ stat = lstatSync(abs);
105
+ } catch {
106
+ stat = void 0;
107
+ }
108
+ if (stat?.isSymbolicLink()) {
109
+ try {
110
+ return readlinkSync(abs) === SKILLS_LINK_TARGET ? { status: "present" } : { status: "elsewhere" };
111
+ } catch {
112
+ return { status: "elsewhere" };
113
+ }
114
+ }
115
+ if (stat !== void 0) {
116
+ if (!stat.isDirectory()) return { status: "blocked", blocking: [SKILLS_LINK_PATH] };
117
+ const files = filesBelow(repoRoot, SKILLS_LINK_PATH);
118
+ if (files.length > 0) return { status: "blocked", blocking: files };
119
+ removeEmptyTree(abs);
120
+ }
121
+ try {
122
+ mkdirSync(join(repoRoot, ".claude"), { recursive: true });
123
+ symlinkSync(SKILLS_LINK_TARGET, abs, "dir");
124
+ return { status: "linked" };
125
+ } catch (err) {
126
+ return { status: "failed", reason: err instanceof Error ? err.message : String(err) };
127
+ }
128
+ }
129
+ function removeEmptyTree(abs) {
130
+ for (const entry of readdirSync(abs, { withFileTypes: true })) {
131
+ if (entry.isDirectory()) removeEmptyTree(join(abs, entry.name));
132
+ }
133
+ rmdirSync(abs);
134
+ }
135
+ var WINDOWS_LINK_NOTE = "On Windows, git commits a link only when core.symlinks is true. Without it, git writes a text file and Claude Code finds no skills.";
136
+ function describeSkillsLink(outcome) {
137
+ switch (outcome.status) {
138
+ case "linked":
139
+ return `Linked ${SKILLS_LINK_PATH} to ${SKILLS_LINK_TARGET}, so Claude Code finds the skills. ${WINDOWS_LINK_NOTE}`;
140
+ case "present":
141
+ return "";
142
+ case "blocked":
143
+ return `Left ${SKILLS_LINK_PATH}/ as it is and made no link, because it still holds ${outcome.blocking.join(", ")}.`;
144
+ case "elsewhere":
145
+ return `Left ${SKILLS_LINK_PATH} as it is: it is a link to somewhere other than ${SKILLS_LINK_TARGET}.`;
146
+ case "failed":
147
+ return `Could not link ${SKILLS_LINK_PATH} to ${SKILLS_LINK_TARGET}: ${outcome.reason}. On Windows, git needs core.symlinks and a permission to create links. The launcher, \`outerlayer claude\`, does not need the link.`;
148
+ }
149
+ }
150
+
151
+ export { AGENTS_MD_LAYOUT, FIRST_VERSION_READING_AGENTS_SKILLS, SKILLS_LINK_PATH, declareAgentsMdLayout, describeSkillsLink, discoverOuterlayerPaths, filesBelow, holdsTodaysLayoutSources, isAgentsMdLayout, isForeignTree, linkClaudeSkills, readConfigObject, skillsBaseFor, toRepoRelative };
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { WorkCommandError, postJson } from './chunk-BET347JZ.js';
4
- import { defaultGitRunner, materializeContext, isStagingWriteFault, lookupGoverningSource } from './chunk-6YBLN4TR.js';
5
- import { signingFetchFor } from './chunk-QF7WZUU6.js';
6
- import { unsupportedLayout, layoutRefusalReason, composeDelivery } from './chunk-ZNPE7FW5.js';
3
+ import { WorkCommandError, postJson } from './chunk-C64D7HR3.js';
4
+ import { defaultGitRunner, materializeContext, isStagingWriteFault, lookupGoverningSource } from './chunk-XGPC3IOR.js';
5
+ import { signingFetchFor } from './chunk-QS43O4DR.js';
6
+ import { unsupportedLayout, layoutRefusalReason, composeDelivery } from './chunk-VPEGE3QZ.js';
7
7
  import { SHIM_SCRIPT, GOVERNANCE_VARIABLE } from './chunk-HCVLP7XA.js';
8
8
  import { readDegraded, readContextManifest, readSourceCache } from './chunk-YQR6E6OV.js';
9
9
  import { signerFor } from './chunk-OW52QLK3.js';
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { skillDir, FORMER_MAINTAINED_NAMES, isMaintainedCopy } from './chunk-5OCIHFGE.js';
3
+ import { skillDir, FORMER_MAINTAINED_NAMES, isMaintainedCopy } from './chunk-HBISTTG3.js';
4
4
  import { cliInvocation } from './chunk-CRB3POP4.js';
5
- import { emitTree, ALL_TARGET_IDS, classifyTree } from './chunk-WFSUUUAN.js';
5
+ import { emitTree, ALL_TARGET_IDS, classifyTree } from './chunk-RKOTJQVG.js';
6
6
  import { readFileSync, existsSync, unlinkSync, rmdirSync, readdirSync } from 'fs';
7
7
  import { join, dirname, relative, sep } from 'path';
8
8
 
@@ -70,7 +70,7 @@ function checkFormerSkillNames(repoRoot) {
70
70
  checks.push({
71
71
  name: "Renamed skills",
72
72
  status: "warn",
73
- detail: `copies under earlier names: ${retired.map(skillDir).join(", ")}`,
73
+ detail: `copies under earlier names: ${retired.map((former) => skillDir(former)).join(", ")}`,
74
74
  fix: `Run \`${cliInvocation()} context emit\` to replace them with the current names, then commit.`
75
75
  });
76
76
  }
@@ -2,7 +2,7 @@
2
2
  import { createRequire } from 'node:module';
3
3
  import { RecipeError, BUILDKIT_IMAGE } from './chunk-3W333NFO.js';
4
4
  import { parseSize } from './chunk-7RQ73DLO.js';
5
- import { compareVersions } from './chunk-AEKSX4EY.js';
5
+ import { compareVersions } from './chunk-CBCKD6DO.js';
6
6
  import { ensureHostKey } from './chunk-OW52QLK3.js';
7
7
  import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, jobsDir } from './chunk-IHNQWF6F.js';
8
8
  import { CLAUDE_PORT, JOB_MOUNT, GATEWAY_PORT, GATEWAY_SOCKET, CLAUDE_SOCKET, RELAY_PORT, DESTINATION_BASE_PORT } from './chunk-URWYRAIC.js';
@@ -0,0 +1,113 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+ import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
4
+ import { readCloudConfig, cloudConfigPath } from './chunk-EABW6AJQ.js';
5
+ import { cliInvocation } from './chunk-CRB3POP4.js';
6
+ import { homeFromEnv } from './chunk-VNVZDWO3.js';
7
+ import { resolvePackageVersion } from './chunk-RA3O54FC.js';
8
+ import { signRunnerRequest, signerFor } from './chunk-OW52QLK3.js';
9
+
10
+ createRequire(import.meta.url);
11
+
12
+ // src/credentials.ts
13
+ var MISSING_HELP = `Run \`${cliInvocation()} login\` to sign in, or set OUTERLAYER_URL / OUTERLAYER_API_KEY / OUTERLAYER_APP_ID. Mint a key in the dashboard: Settings \u2192 API keys.`;
14
+ var NO_FACTORY_MESSAGE = `you are logged in, but no factory is chosen for this repository. Run \`${cliInvocation()} connect\` to choose one, or pass --app-id / set OUTERLAYER_APP_ID.`;
15
+ var NO_FACTORY_OUTSIDE_REPOSITORY_MESSAGE = "you are logged in, but this directory is not in a git repository, so no factory is chosen. Pass --app-id / set OUTERLAYER_APP_ID, or run this from inside a connected repository.";
16
+ var LOGIN_TOKEN_PREFIX = "olu_";
17
+ function unauthorizedMessage(credential) {
18
+ return credential.startsWith(LOGIN_TOKEN_PREFIX) ? `not authorized \u2014 the login is expired or was revoked. Run \`${cliInvocation()} login\` to sign in again.` : "not authorized \u2014 the API key is unknown, expired, or bound to a different factory. Mint a fresh key: dashboard \u2192 Settings \u2192 API keys.";
19
+ }
20
+ function resolveGatewayCredentials(sources = {}) {
21
+ const env = sources.env ?? process.env;
22
+ const config = readCloudConfig(sources.home ?? homeFromEnv(env));
23
+ const url = sources.url ?? env.OUTERLAYER_URL ?? config.url;
24
+ const key = sources.apiKey ?? (env.OUTERLAYER_API_KEY || void 0) ?? config.apiKey;
25
+ const kind = key ? "key" : "login";
26
+ const credential = key ?? config.accountToken;
27
+ const cwd = sources.cwd ?? process.cwd();
28
+ const appId = sources.appId ?? (env.OUTERLAYER_APP_ID || void 0) ?? (kind === "key" ? config.appId : readRepoConnection(cwd)?.appId);
29
+ if (credential && url && !appId && kind === "login") {
30
+ const message = findGitDirs(cwd) === void 0 ? NO_FACTORY_OUTSIDE_REPOSITORY_MESSAGE : NO_FACTORY_MESSAGE;
31
+ return { ok: false, message, url, credential, appId, kind };
32
+ }
33
+ if (!url || !credential || !appId) {
34
+ const missing = [!url && "--url", !credential && "a login or OUTERLAYER_API_KEY", !appId && "--app-id"].filter(Boolean).join(", ");
35
+ return { ok: false, message: `missing ${missing}. ${MISSING_HELP}`, url, credential, appId, kind };
36
+ }
37
+ return { ok: true, url, credential, appId, kind };
38
+ }
39
+
40
+ // src/signing-fetch.ts
41
+ function bodyBytes(body) {
42
+ if (body === void 0 || body === null) return new Uint8Array(0);
43
+ if (typeof body === "string") return new TextEncoder().encode(body);
44
+ if (body instanceof Uint8Array) return body;
45
+ if (body instanceof ArrayBuffer) return new Uint8Array(body);
46
+ return void 0;
47
+ }
48
+ async function savedKeySigner(headers, home) {
49
+ const authorization = headers.get("authorization");
50
+ if (authorization === null || !authorization.startsWith("Bearer ")) return void 0;
51
+ if (headers.has("signature")) return void 0;
52
+ if (readCloudConfig(home).apiKey !== authorization.slice("Bearer ".length)) return void 0;
53
+ try {
54
+ return await signerFor(cloudConfigPath(home));
55
+ } catch {
56
+ return void 0;
57
+ }
58
+ }
59
+ function signedBy(base, signerOf) {
60
+ return (async (input, init) => {
61
+ if (input instanceof Request) return base(input, init);
62
+ const headers = new Headers(init?.headers);
63
+ const signer = await signerOf(headers);
64
+ const body = bodyBytes(init?.body);
65
+ if (signer === void 0 || body === void 0) return base(input, init);
66
+ const signature = await signRunnerRequest({ method: init?.method ?? "GET", url: input.toString(), body, signer });
67
+ for (const [name, value] of Object.entries(signature)) headers.set(name, value);
68
+ return base(input, { ...init, headers });
69
+ });
70
+ }
71
+ function signingFetch(base, home = () => homeFromEnv()) {
72
+ return signedBy(base, (headers) => savedKeySigner(headers, home()));
73
+ }
74
+ function signingFetchFor(base, configPath, apiKey) {
75
+ return signedBy(base, async (headers) => {
76
+ const authorization = headers.get("authorization");
77
+ if (authorization !== `Bearer ${apiKey}` || headers.has("signature")) return void 0;
78
+ try {
79
+ return await signerFor(configPath);
80
+ } catch {
81
+ return void 0;
82
+ }
83
+ });
84
+ }
85
+ function cliUserAgent(version = resolvePackageVersion()) {
86
+ return `outerlayer-cli/${version}`;
87
+ }
88
+ function withHeader(headers, name, value) {
89
+ if (headers instanceof Headers) {
90
+ if (headers.has(name)) return headers;
91
+ const copy = new Headers(headers);
92
+ copy.set(name, value);
93
+ return copy;
94
+ }
95
+ if (Array.isArray(headers)) {
96
+ return headers.some(([key]) => key.toLowerCase() === name) ? headers : [...headers, [name, value]];
97
+ }
98
+ const record = headers ?? {};
99
+ return Object.keys(record).some((key) => key.toLowerCase() === name) ? record : { ...record, [name]: value };
100
+ }
101
+ function withCliUserAgent(base, userAgent = () => cliUserAgent()) {
102
+ return ((input, init) => {
103
+ if (input instanceof Request) return base(input, init);
104
+ return base(input, { ...init, headers: withHeader(init?.headers, "user-agent", userAgent()) });
105
+ });
106
+ }
107
+ function globalFetch(input, init) {
108
+ return globalThis.fetch(input, init);
109
+ }
110
+ var cliFetch = withCliUserAgent(globalFetch);
111
+ var defaultFetch = signingFetch(cliFetch);
112
+
113
+ export { cliFetch, defaultFetch, resolveGatewayCredentials, signingFetchFor, unauthorizedMessage };
@@ -1,24 +1,25 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { senderPidfile } from './chunk-BOMRFYTZ.js';
4
- import { DOCKERD_LOG, HELPER_PATH, HELPER_RECORD } from './chunk-JZGFDTNC.js';
5
- import { installScrubContext } from './chunk-URAKVDSI.js';
6
- import { ADDED_USER, AssetError, obtainImage, ensureRootfs, gitRemoteFor, startServicesFor, createBuildDisk, machineConfig, resolveAgentUser, AgentUserError, runBuildSteps, shellQuote, LEASE_SECONDS, createContainerRuntime, stopContainer, cleanupContainer, outOfMemoryReason, containerSenderCommand, signalInContainer, syncInContainer, copyTranscriptsFromContainer, senderAliveScript, GH_CONFIG_YML, ghHostsYml, isLiteralAddress, deleteBuildDisk, startCheckContainer, lifecycleSteps, lifecycleFailureReason, writeEvalInput, DeliveryFailure, EVAL_INPUT_NAME, copyTranscripts, senderSignalScript, containerJudgeEnvironment, copyJudgeTree } from './chunk-5NJIWKD4.js';
7
- import { readBranchHead, fetchCommit, diffBetween } from './chunk-3AZYLAJC.js';
8
- import { HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, writeJobFile, readJobFile, COMMAND_DIR, childEnvironment, judgeCommand, JUDGE_MAX_TURNS, MAX_REPORT_BYTES, JUDGE_DIR } from './chunk-XR56WEA5.js';
3
+ import { senderPidfile } from './chunk-WY7HFY62.js';
4
+ import { DOCKERD_LOG, HELPER_PATH, HELPER_RECORD } from './chunk-Z42JY3LQ.js';
5
+ import { writeDockerClientConfig } from './chunk-WXJXHZVB.js';
6
+ import { installScrubContext } from './chunk-DJYOCD65.js';
7
+ import { ADDED_USER, AssetError, obtainImage, ensureRootfs, gitRemoteFor, startServicesFor, createBuildDisk, machineConfig, resolveAgentUser, AgentUserError, runBuildSteps, shellQuote, LEASE_SECONDS, createContainerRuntime, stopContainer, cleanupContainer, outOfMemoryReason, containerSenderCommand, signalInContainer, syncInContainer, copyTranscriptsFromContainer, senderAliveScript, GH_CONFIG_YML, ghHostsYml, isLiteralAddress, deleteBuildDisk, startCheckContainer, lifecycleSteps, lifecycleFailureReason, writeEvalInput, DeliveryFailure, EVAL_INPUT_NAME, copyTranscripts, senderSignalScript, containerJudgeEnvironment, copyJudgeTree } from './chunk-BOG4ENP7.js';
8
+ import { readBranchHead, fetchCommit, diffBetween } from './chunk-QILR6TZP.js';
9
+ import { isSameProcess, startTimeOf } from './chunk-JBJTC3UU.js';
10
+ import { HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, writeJobFile, readJobFile, COMMAND_DIR, childEnvironment, judgeCommand, JUDGE_MAX_TURNS, MAX_REPORT_BYTES, JUDGE_DIR } from './chunk-OGMZJWWD.js';
9
11
  import { CLAUDE_CODE_VERSION } from './chunk-3W333NFO.js';
10
12
  import { waitForAgent, vmExecArgs } from './chunk-NYTZ7HVN.js';
11
13
  import { socketPathProblem, vsockLinks, linkVsockSockets } from './chunk-2Q3PZ42G.js';
12
- import { describeCallFailure, resolveGoverningSource, refusalCode, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, logStamp, createRunnerLog, formatDuration, retrySend, formatClock } from './chunk-CUFFDEF3.js';
13
- import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-BET347JZ.js';
14
- import { planArtifactUpload } from './chunk-G3IJ3N6F.js';
14
+ import { describeCallFailure, resolveGoverningSource, refusalCode, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, logStamp, createRunnerLog, formatDuration, retrySend, formatClock } from './chunk-KGKFEONR.js';
15
+ import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-C64D7HR3.js';
16
+ import { planArtifactUpload } from './chunk-BUP5N3X6.js';
15
17
  import { isBuiltinContainer, isBuiltinProcess, isBuiltinVm, DEFAULT_CHECK_TIME_LIMIT_MINUTES } from './chunk-V5CG75NX.js';
16
18
  import { parseSize } from './chunk-7RQ73DLO.js';
17
- import { isSameProcess, startTimeOf } from './chunk-JBJTC3UU.js';
18
- import { scrubText } from './chunk-AEKSX4EY.js';
19
+ import { scrubText } from './chunk-CBCKD6DO.js';
19
20
  import { readCloudConfig } from './chunk-EABW6AJQ.js';
20
- import { resolvePackRoot } from './chunk-5OCIHFGE.js';
21
- import { parsePolicy } from './chunk-WFSUUUAN.js';
21
+ import { resolvePackRoot } from './chunk-HBISTTG3.js';
22
+ import { parsePolicy } from './chunk-RKOTJQVG.js';
22
23
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
23
24
  import { resolveVersion } from './chunk-RA3O54FC.js';
24
25
  import { signerFor } from './chunk-OW52QLK3.js';
@@ -413,7 +414,7 @@ async function waitForDocker(runtime, state, agentUser, now) {
413
414
  if (firstLine(granted.stderr) !== "") lastError = `giving the agent's group the Docker socket failed: ${firstLine(granted.stderr)}`;
414
415
  } else {
415
416
  const answered = await runtime.vm.exec(state.vsockPath, request);
416
- if (answered.status === 0) return void 0;
417
+ if (answered.status === 0) return writeDockerClientConfig(asRoot.bind(null, runtime, state), agentUser);
417
418
  lastError = firstLine(answered.stderr) === "" ? "" : `docker info said: ${firstLine(answered.stderr)}`;
418
419
  }
419
420
  if (now().getTime() >= deadline) break;
@@ -22514,6 +22514,41 @@ external_exports.object({
22514
22514
  clientSendId: external_exports.string().regex(REVIEW_SEND_ID_PATTERN),
22515
22515
  notes: external_exports.array(WorkItemReviewNoteSchema).min(1).max(WORK_ITEM_REVIEW_NOTES_MAX)
22516
22516
  });
22517
+ var CLI_LOGIN_KIND = "account";
22518
+ var CLI_LOGIN_MACHINE_NAME_MAX = 255;
22519
+ external_exports.object({
22520
+ public_key: external_exports.string().min(1),
22521
+ // The characters a key name may hold; the CLI cuts its host name to these.
22522
+ machine_name: external_exports.string().trim().min(1).max(CLI_LOGIN_MACHINE_NAME_MAX).regex(/^[\w\s\-().]+$/, "Invalid characters in machine_name"),
22523
+ kind: external_exports.literal(CLI_LOGIN_KIND)
22524
+ });
22525
+ var CliLoginStartResponseSchema = external_exports.object({
22526
+ id: external_exports.string(),
22527
+ code: external_exports.string(),
22528
+ verification_url: external_exports.string(),
22529
+ interval: external_exports.number(),
22530
+ expires_at: external_exports.string()
22531
+ });
22532
+ var CliLoginStartedSchema = CliLoginStartResponseSchema.pick({ id: true, code: true, expires_at: true }).extend({
22533
+ interval: CliLoginStartResponseSchema.shape.interval.positive().optional().catch(void 0)
22534
+ });
22535
+ var CliLoginPollResponseSchema = external_exports.discriminatedUnion("status", [
22536
+ external_exports.object({ status: external_exports.literal("pending") }),
22537
+ external_exports.object({ status: external_exports.literal("denied") }),
22538
+ external_exports.object({
22539
+ status: external_exports.literal("approved"),
22540
+ /** The account token, RSA-OAEP (SHA-256) encrypted to the start's public key, in base64. */
22541
+ encrypted_token: external_exports.string(),
22542
+ /** The gateway the token works against. */
22543
+ gateway_url: external_exports.string(),
22544
+ /** The email of the account the token signs in to. */
22545
+ email: external_exports.string()
22546
+ })
22547
+ ]);
22548
+ var CliLoginRefusalSchema = external_exports.object({
22549
+ error: external_exports.string(),
22550
+ message: external_exports.string().optional()
22551
+ });
22517
22552
  /*! Bundled license information:
22518
22553
 
22519
22554
  xmlchars/xml/1.0/ed5.js:
@@ -22544,4 +22579,4 @@ xmlchars/xmlns/1.0/ed3.js:
22544
22579
  *)
22545
22580
  */
22546
22581
 
22547
- export { ARTIFACT_KINDS, ARTIFACT_MAX_CAPTION_LENGTH, ARTIFACT_MAX_FILENAME_LENGTH, ARTIFACT_MAX_REPLACES_TARGETS, ArtifactCriterionIdSchema, ArtifactSpoolRecordSchema, ArtifactTombstoneRecordSchema, BUCKET_MODEL_MAX_LENGTH, CAPTURE_TIERS, CriteriaListSchema, EMITTED_RESULTS, EMITTED_RESULT_MAX_BODY_LENGTH, EMITTED_RESULT_MAX_LINK_LENGTH, EVENT_TYPES, EmittedNameSchema, FindingBatchSchema, FindingsResponseSchema, INPUT_BAND_BOUNDARIES, RESERVED_EMIT_NAMES, SAME_PROBLEM_RULES, SCHEMA_VERSION, SPEED_MAX_LENGTH, StepBodySchema, StepNameSchema, bannedPathsForTier, bindTests, downconvertSession, inferArtifactKind, inputBandOf, isHumanUserTurn, mediaTypeForArtifactPath, parseAgentSession, parseJunit, parseTestSelector, turnCountBound };
22582
+ export { ARTIFACT_KINDS, ARTIFACT_MAX_CAPTION_LENGTH, ARTIFACT_MAX_FILENAME_LENGTH, ARTIFACT_MAX_REPLACES_TARGETS, ArtifactCriterionIdSchema, ArtifactSpoolRecordSchema, ArtifactTombstoneRecordSchema, BUCKET_MODEL_MAX_LENGTH, CAPTURE_TIERS, CLI_LOGIN_KIND, CLI_LOGIN_MACHINE_NAME_MAX, CliLoginPollResponseSchema, CliLoginRefusalSchema, CliLoginStartedSchema, CriteriaListSchema, EMITTED_RESULTS, EMITTED_RESULT_MAX_BODY_LENGTH, EMITTED_RESULT_MAX_LINK_LENGTH, EVENT_TYPES, EmittedNameSchema, FindingBatchSchema, FindingsResponseSchema, INPUT_BAND_BOUNDARIES, RESERVED_EMIT_NAMES, SAME_PROBLEM_RULES, SCHEMA_VERSION, SPEED_MAX_LENGTH, StepBodySchema, StepNameSchema, bannedPathsForTier, bindTests, downconvertSession, inferArtifactKind, inputBandOf, isHumanUserTurn, mediaTypeForArtifactPath, parseAgentSession, parseJunit, parseTestSelector, turnCountBound };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { RESERVED_EMIT_NAMES, ARTIFACT_KINDS, ArtifactCriterionIdSchema } from './chunk-7VUK5RFS.js';
3
+ import { RESERVED_EMIT_NAMES, ARTIFACT_KINDS, ArtifactCriterionIdSchema } from './chunk-QZBXLLTV.js';
4
4
  import { __commonJS, __require, __toESM } from './chunk-Z5GEFMRW.js';
5
5
 
6
6
  createRequire(import.meta.url);
@@ -1,25 +1,25 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { releaseLease, isUnfinished, setStage, jobEnv, runHook, describeHookEnd, provisionMicroVm, deliverCommitHooks, provisionProcess, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, hostCommandEnvironment, execArgv, microVmCommandLine, runCommand, commandLogOffset, execCommandLine, startSender, startHostServices, finishJob, isContainerTracked, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, stopOrphanedMicroVms, unfinishedJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, hookLimitsFor, AttemptLogBook, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, listTrackedJobs, restartSender, ALREADY_RELEASED } from './chunk-FOCML5FI.js';
3
+ import { releaseLease, isUnfinished, setStage, jobEnv, runHook, describeHookEnd, provisionMicroVm, deliverCommitHooks, provisionProcess, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, hostCommandEnvironment, execArgv, microVmCommandLine, runCommand, commandLogOffset, execCommandLine, startSender, startHostServices, finishJob, isContainerTracked, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, stopOrphanedMicroVms, unfinishedJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, hookLimitsFor, AttemptLogBook, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, listTrackedJobs, restartSender, ALREADY_RELEASED } from './chunk-QSEPKZXR.js';
4
+ import { writePendingUpdate } from './chunk-CQAEV3Z5.js';
5
+ import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-UF5L4BAI.js';
4
6
  import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
5
- import { compareVersions, satisfiesRange } from './chunk-I2UOAV7X.js';
6
7
  import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-YETTWTAY.js';
8
+ import { compareVersions, satisfiesRange } from './chunk-I2UOAV7X.js';
7
9
  import { RUNNER_PROTOCOL } from './chunk-TPKYTORP.js';
8
- import { writePendingUpdate } from './chunk-CQAEV3Z5.js';
9
- import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-UF5L4BAI.js';
10
- import { currentSkillCommand, formerSkillProblem, placeholderQueues, placeholderProblem } from './chunk-ENTHEUKT.js';
10
+ import { currentSkillCommand, formerSkillProblem, placeholderQueues, placeholderProblem } from './chunk-G3LHWUBK.js';
11
11
  import { freeBytes, formatBytes } from './chunk-YYYRBYWG.js';
12
12
  import { writeMarker, readMarker, currentVersion, removeMarker, entryIn, versionDir, startedThroughCurrent, switchCurrent, cleanVersions, isInLayout, stagingDir } from './chunk-276D7BJ7.js';
13
13
  import { RepoFilter } from './chunk-TBT347UY.js';
14
+ import { LEASE_SECONDS, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, lifecycleSteps, lifecycleFailureReason, prepareBranch, containerCommandExec, measureDisk, setUpRunnerCgroup, createContainerRuntime, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied } from './chunk-BOG4ENP7.js';
14
15
  import { checkFit } from './chunk-OBCFK4QD.js';
15
- import { LEASE_SECONDS, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, lifecycleSteps, lifecycleFailureReason, prepareBranch, containerCommandExec, measureDisk, setUpRunnerCgroup, createContainerRuntime, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied } from './chunk-5NJIWKD4.js';
16
- import { writeJobFile, ensureRunnerIdentity, readJobFile, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun, BUILD_LABEL, RUNNER_LABEL, readJobFileChecked } from './chunk-XR56WEA5.js';
17
- import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-CUFFDEF3.js';
18
- import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-BET347JZ.js';
19
- import { isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-V5CG75NX.js';
20
- import { exceedsDisk } from './chunk-7RQ73DLO.js';
21
16
  import { claimPidFile, readPidFile, releasePidFile } from './chunk-XACXXKQ5.js';
22
17
  import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
18
+ import { writeJobFile, ensureRunnerIdentity, readJobFile, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun, BUILD_LABEL, RUNNER_LABEL, readJobFileChecked } from './chunk-OGMZJWWD.js';
19
+ import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-KGKFEONR.js';
20
+ import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-C64D7HR3.js';
21
+ import { isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-V5CG75NX.js';
22
+ import { exceedsDisk } from './chunk-7RQ73DLO.js';
23
23
  import { resolveVersion } from './chunk-RA3O54FC.js';
24
24
  import { loadHostKey, ensureHostKey, signerFor } from './chunk-OW52QLK3.js';
25
25
  import { RUNNER_DIR_MODE, runnerDir, buildDir, attemptStamp, jobDir, RUNNER_FILE_MODE, jobsDir, pidFilePath, spoolDir, rootfsDir } from './chunk-IHNQWF6F.js';
@@ -1552,7 +1552,7 @@ var CLAIM_REFUSAL_CODES = new Set(
1552
1552
  "pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous pull_request_repository_not_connected repository_not_reachable branch_claimed_elsewhere".split(" ")
1553
1553
  );
1554
1554
  async function tryClaimAndStart(state, item, queue) {
1555
- const { postJson: postJson2 } = await import('./work-cmd-KWHAYUYB.js');
1555
+ const { postJson: postJson2 } = await import('./work-cmd-FMPDXPU6.js');
1556
1556
  const log = logOf(state);
1557
1557
  const hostKey = await loadHostKey(state.config.configPath);
1558
1558
  const claim = await retrySend(
@@ -2521,7 +2521,7 @@ async function start(configPath, deps = { fetchImpl: fetch }) {
2521
2521
  const outcome = await onStartUnderMarker({
2522
2522
  configPath,
2523
2523
  own: ownVersionOf(deps),
2524
- check: update.check ? () => update.check(configPath) : async () => (await import('./check-UYKEMQNR.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl }),
2524
+ check: update.check ? () => update.check(configPath) : async () => (await import('./check-3CGLWMHM.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl }),
2525
2525
  now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
2526
2526
  log
2527
2527
  });