@outerlayer/cli 0.22.2 → 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 (97) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/{agent-setup-KXPDPTAJ.js → agent-setup-SNDCEHG2.js} +13 -10
  3. package/dist/{artifact-link-cmd-OWRI5AJX.js → artifact-link-cmd-LEI6EOZE.js} +2 -2
  4. package/dist/{build-6WRNZPVR.js → build-WHHFA7KM.js} +2 -2
  5. package/dist/build-info.json +1 -1
  6. package/dist/{builder-G3MLDMTI.js → builder-7FBQAWQZ.js} +3 -3
  7. package/dist/{check-N6WLZCER.js → check-3CGLWMHM.js} +32 -32
  8. package/dist/{chunk-ZCXP35T3.js → chunk-2TT7DEMZ.js} +2 -2
  9. package/dist/{chunk-BVR6MQLS.js → chunk-6AOZD3LY.js} +2 -2
  10. package/dist/{chunk-WKSBSEWT.js → chunk-BOG4ENP7.js} +9 -9
  11. package/dist/{chunk-G3IJ3N6F.js → chunk-BUP5N3X6.js} +1 -1
  12. package/dist/{chunk-FVDVC2GF.js → chunk-C2XZBNHY.js} +1 -1
  13. package/dist/{chunk-FQE5RDHI.js → chunk-C64D7HR3.js} +5 -5
  14. package/dist/{chunk-AEKSX4EY.js → chunk-CBCKD6DO.js} +1 -1
  15. package/dist/{chunk-JD6GWYY7.js → chunk-D64E222W.js} +4 -4
  16. package/dist/{chunk-U6RKHNC7.js → chunk-DJYOCD65.js} +6 -6
  17. package/dist/{chunk-QZX6DAAW.js → chunk-FX6IHR5C.js} +8 -8
  18. package/dist/{chunk-IPS2JCHK.js → chunk-G3LHWUBK.js} +4 -4
  19. package/dist/{chunk-EMUNEAQK.js → chunk-GXV73IIS.js} +3 -3
  20. package/dist/{chunk-5OCIHFGE.js → chunk-HBISTTG3.js} +32 -23
  21. package/dist/chunk-JKNYTNYD.js +151 -0
  22. package/dist/{chunk-IMCVQF5F.js → chunk-KGKFEONR.js} +3 -3
  23. package/dist/{chunk-USWVXQIH.js → chunk-MQ743JX3.js} +3 -3
  24. package/dist/{chunk-XR56WEA5.js → chunk-OGMZJWWD.js} +1 -1
  25. package/dist/{chunk-KOIMUHIS.js → chunk-QSEPKZXR.js} +13 -13
  26. package/dist/{chunk-7VUK5RFS.js → chunk-QZBXLLTV.js} +36 -1
  27. package/dist/{chunk-WFSUUUAN.js → chunk-RKOTJQVG.js} +1 -1
  28. package/dist/{chunk-2CPOAPU4.js → chunk-TFGXOHF6.js} +12 -12
  29. package/dist/{chunk-V7SAQ645.js → chunk-VJBFQP3H.js} +21 -12
  30. package/dist/{chunk-ZNPE7FW5.js → chunk-VPEGE3QZ.js} +1 -1
  31. package/dist/{chunk-W3SWJ2TD.js → chunk-VWFOKRYS.js} +5 -2
  32. package/dist/{chunk-XCRZTXRL.js → chunk-WX2WEERU.js} +63 -43
  33. package/dist/{chunk-4542B3RR.js → chunk-WY7HFY62.js} +3 -3
  34. package/dist/{chunk-VSUXCMMH.js → chunk-XFGL53GU.js} +51 -33
  35. package/dist/{chunk-SNVXHNU7.js → chunk-XGPC3IOR.js} +3 -3
  36. package/dist/{chunk-HWZCE745.js → chunk-XOEV4FVK.js} +2 -2
  37. package/dist/{chunk-EAQSOE62.js → chunk-XSPA5ODY.js} +21 -19
  38. package/dist/{chunk-4OYKJJ2V.js → chunk-ZKWKQIJU.js} +86 -6
  39. package/dist/{chunk-B42BIYC6.js → chunk-ZLZ3XVPI.js} +2 -2
  40. package/dist/{claude-launcher-QD3C427Y.js → claude-launcher-KEESTJHO.js} +5 -5
  41. package/dist/{cli-A2Y67WAB.js → cli-44WGGICQ.js} +115 -108
  42. package/dist/{command-Q5Q2EIO4.js → command-4FAP2D3P.js} +21 -21
  43. package/dist/{connect-cmd-TNGEIWCA.js → connect-cmd-6DUTUK63.js} +7 -7
  44. package/dist/{context-cleanup-DSA3HGQU.js → context-cleanup-LTH77FC3.js} +3 -3
  45. package/dist/{control-plane-launch-HE6OSWKO.js → control-plane-launch-SEYCOZFH.js} +7 -7
  46. package/dist/{dist-7IH56ELA.js → dist-SOH3O24Y.js} +2 -2
  47. package/dist/{docker-JU422JL7.js → docker-KMK4LOET.js} +3 -3
  48. package/dist/{doctor-BRN4BGMA.js → doctor-4H77CEB7.js} +23 -23
  49. package/dist/{emit-artifact-cmd-GPAJCCUC.js → emit-artifact-cmd-XCZ3ALLV.js} +11 -11
  50. package/dist/emit-cmd-WQH2NK7H.js +15 -0
  51. package/dist/{emit-criteria-cmd-R3FKHSQG.js → emit-criteria-cmd-JE72JHKJ.js} +8 -8
  52. package/dist/{emit-finding-cmd-IK7RAVP5.js → emit-finding-cmd-ILIDRMYN.js} +8 -8
  53. package/dist/{emit-result-cmd-5FJTF7YD.js → emit-result-cmd-WPKG5YAS.js} +11 -11
  54. package/dist/{emit-step-cmd-VRTD5YPP.js → emit-step-cmd-OVMLQSL6.js} +9 -9
  55. package/dist/{governing-source-WM736XR4.js → governing-source-EQBKPME7.js} +15 -15
  56. package/dist/{guest-init-2OZ4YC7R.js → guest-init-HWSE7W6L.js} +2 -2
  57. package/dist/{hook-fast-QUGEI2IT.js → hook-fast-27SHD72I.js} +1 -1
  58. package/dist/{import-capture-cmd-Q56DDZVO.js → import-capture-cmd-TCOKNVBM.js} +12 -7
  59. package/dist/{import-ruler-cmd-T6LLO6Q7.js → import-ruler-cmd-VJOHOJQ7.js} +2 -2
  60. package/dist/index.js +4 -4
  61. package/dist/{init-X7FCQDFX.js → init-HAAHIQFN.js} +22 -22
  62. package/dist/{init-U3I43XCP.js → init-WQ62BXDN.js} +22 -22
  63. package/dist/{init-cmd-VCKH2DUQ.js → init-cmd-VPFIDY64.js} +19 -18
  64. package/dist/init-update-UZIJ2FMU.js +529 -0
  65. package/dist/layout-UOJQGEPW.js +10 -0
  66. package/dist/{login-browser-BN5UKPHS.js → login-browser-4OMZFP3U.js} +4 -3
  67. package/dist/{logout-cmd-RZFWTNYD.js → logout-cmd-5V5MMBSY.js} +2 -2
  68. package/dist/{loop-P3QDQOE5.js → loop-JPW2QJ64.js} +32 -32
  69. package/dist/{machine-EEFOW32K.js → machine-PGDRWPI2.js} +21 -21
  70. package/dist/{mcp-install-cmd-GD4QUP7Z.js → mcp-install-cmd-GGWB3JJ2.js} +2 -2
  71. package/dist/{runner-identity-FTHZFMGY.js → runner-identity-IIZ3RK7M.js} +3 -3
  72. package/dist/{runner-key-O42EUXQU.js → runner-key-BPP5XRYR.js} +22 -22
  73. package/dist/{session-sender-HF6DXFA2.js → session-sender-EKKZ5DEU.js} +12 -12
  74. package/dist/{spec-cmd-ADPH236D.js → spec-cmd-JDHGNFVJ.js} +9 -9
  75. package/dist/{starter-pack-5EQYGSJF.js → starter-pack-55EFILC5.js} +7 -4
  76. package/dist/{status-LXFIVGP3.js → status-UCQDEMFX.js} +26 -26
  77. package/dist/{sync-cmd-5XS3CUV5.js → sync-cmd-NSVXOYFJ.js} +11 -11
  78. package/dist/{watch-FBZHZV56.js → watch-NQVZWPBJ.js} +11 -11
  79. package/dist/{work-claim-cmd-LIIINECF.js → work-claim-cmd-FPJXQAXP.js} +11 -11
  80. package/dist/{work-cmd-SM6DY2WK.js → work-cmd-FMPDXPU6.js} +9 -9
  81. package/dist/{work-comment-cmd-VYVXGT4W.js → work-comment-cmd-ZVUE2IUN.js} +9 -9
  82. package/dist/{work-logs-cmd-XZSCWWMW.js → work-logs-cmd-CQH2SYT4.js} +9 -9
  83. package/dist/{work-open-pr-cmd-YZNC3P3R.js → work-open-pr-cmd-YY2OGJOI.js} +10 -10
  84. package/dist/{work-pr-cmd-AMN23KFJ.js → work-pr-cmd-EHFTEVJO.js} +9 -9
  85. package/dist/{work-stop-cmd-HSR2GOJJ.js → work-stop-cmd-LGWSBSBT.js} +9 -9
  86. package/package.json +1 -1
  87. package/skill-pack/maintained/outerlayer-build/references/agent-briefs.md +7 -1
  88. package/skill-pack/maintained/outerlayer-build/references/criteria-judge.md +10 -0
  89. package/skill-pack/maintained/outerlayer-build/references/review-briefs.md +4 -0
  90. package/skill-pack/maintained/outerlayer-cli/SKILL.md +5 -3
  91. package/dist/emit-cmd-3W5IO5ET.js +0 -14
  92. package/dist/init-update-TCMH7M3Q.js +0 -210
  93. package/dist/{chunk-F35VMF5M.js → chunk-GOSFARMS.js} +1 -1
  94. package/dist/{chunk-3AZYLAJC.js → chunk-QILR6TZP.js} +1 -1
  95. package/dist/{chunk-DIB2WLBL.js → chunk-YVZJ6GKF.js} +1 -1
  96. package/dist/{chunk-SFHR45FA.js → chunk-Z42JY3LQ.js} +1 -1
  97. package/dist/{mcp-serve-cmd-TQSPFRC7.js → mcp-serve-cmd-CNRC5AL5.js} +1 -1
@@ -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-FQE5RDHI.js';
4
- import { defaultGitRunner, materializeContext, isStagingWriteFault, lookupGoverningSource } from './chunk-SNVXHNU7.js';
3
+ import { WorkCommandError, postJson } from './chunk-C64D7HR3.js';
4
+ import { defaultGitRunner, materializeContext, isStagingWriteFault, lookupGoverningSource } from './chunk-XGPC3IOR.js';
5
5
  import { signingFetchFor } from './chunk-QS43O4DR.js';
6
- import { unsupportedLayout, layoutRefusalReason, composeDelivery } from './chunk-ZNPE7FW5.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';
@@ -1,25 +1,25 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { senderPidfile } from './chunk-4542B3RR.js';
4
- import { DOCKERD_LOG, HELPER_PATH, HELPER_RECORD } from './chunk-SFHR45FA.js';
3
+ import { senderPidfile } from './chunk-WY7HFY62.js';
4
+ import { DOCKERD_LOG, HELPER_PATH, HELPER_RECORD } from './chunk-Z42JY3LQ.js';
5
5
  import { writeDockerClientConfig } from './chunk-WXJXHZVB.js';
6
- import { installScrubContext } from './chunk-U6RKHNC7.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-WKSBSEWT.js';
8
- import { readBranchHead, fetchCommit, diffBetween } from './chunk-3AZYLAJC.js';
9
- import { HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, writeJobFile, readJobFile, COMMAND_DIR, childEnvironment, judgeCommand, JUDGE_MAX_TURNS, MAX_REPORT_BYTES, JUDGE_DIR } from './chunk-XR56WEA5.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';
10
11
  import { CLAUDE_CODE_VERSION } from './chunk-3W333NFO.js';
11
12
  import { waitForAgent, vmExecArgs } from './chunk-NYTZ7HVN.js';
12
13
  import { socketPathProblem, vsockLinks, linkVsockSockets } from './chunk-2Q3PZ42G.js';
13
- import { describeCallFailure, resolveGoverningSource, refusalCode, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, logStamp, createRunnerLog, formatDuration, retrySend, formatClock } from './chunk-IMCVQF5F.js';
14
- import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-FQE5RDHI.js';
15
- 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';
16
17
  import { isBuiltinContainer, isBuiltinProcess, isBuiltinVm, DEFAULT_CHECK_TIME_LIMIT_MINUTES } from './chunk-V5CG75NX.js';
17
18
  import { parseSize } from './chunk-7RQ73DLO.js';
18
- import { isSameProcess, startTimeOf } from './chunk-JBJTC3UU.js';
19
- import { scrubText } from './chunk-AEKSX4EY.js';
19
+ import { scrubText } from './chunk-CBCKD6DO.js';
20
20
  import { readCloudConfig } from './chunk-EABW6AJQ.js';
21
- import { resolvePackRoot } from './chunk-5OCIHFGE.js';
22
- import { parsePolicy } from './chunk-WFSUUUAN.js';
21
+ import { resolvePackRoot } from './chunk-HBISTTG3.js';
22
+ import { parsePolicy } from './chunk-RKOTJQVG.js';
23
23
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
24
24
  import { resolveVersion } from './chunk-RA3O54FC.js';
25
25
  import { signerFor } from './chunk-OW52QLK3.js';
@@ -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-KOIMUHIS.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';
4
5
  import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-UF5L4BAI.js';
5
6
  import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
6
- import { compareVersions, satisfiesRange } from './chunk-I2UOAV7X.js';
7
7
  import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-YETTWTAY.js';
8
+ import { compareVersions, satisfiesRange } from './chunk-I2UOAV7X.js';
8
9
  import { RUNNER_PROTOCOL } from './chunk-TPKYTORP.js';
9
- import { writePendingUpdate } from './chunk-CQAEV3Z5.js';
10
- import { currentSkillCommand, formerSkillProblem, placeholderQueues, placeholderProblem } from './chunk-IPS2JCHK.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-WKSBSEWT.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-IMCVQF5F.js';
18
- import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-FQE5RDHI.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-SM6DY2WK.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-N6WLZCER.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
  });
@@ -1,8 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { resolvePackRoot, loadTemplateFiles, loadMaintainedFiles, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MAINTAINED_SKILLS } from './chunk-5OCIHFGE.js';
4
3
  import { C } from './chunk-ANPNT6PM.js';
4
+ import { resolvePackRoot, OUTERLAYER_SKILLS_BASE, loadTemplateFiles, loadMaintainedFiles, rewriteSkillPaths, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MAINTAINED_SKILLS } from './chunk-HBISTTG3.js';
5
5
  import { cliInvocation } from './chunk-CRB3POP4.js';
6
+ import { linkedAgentsPath } from './chunk-VWFOKRYS.js';
6
7
  import { resolvePackageVersion } from './chunk-RA3O54FC.js';
7
8
  import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'fs';
8
9
  import { join, dirname } from 'path';
@@ -26,16 +27,19 @@ function assertKnownTemplate(name) {
26
27
  function installStarterPack(opts) {
27
28
  const packRoot = opts.packRoot ?? resolvePackRoot();
28
29
  const version = opts.version ?? resolvePackageVersion();
29
- const templateFiles = loadTemplateFiles(packRoot, version);
30
- const maintainedFiles = loadMaintainedFiles(packRoot, version);
30
+ const base = opts.base ?? OUTERLAYER_SKILLS_BASE;
31
+ const linked = base.startsWith(".agents/") ? linkedAgentsPath(opts.repoRoot) : void 0;
32
+ if (linked !== void 0) throw new StarterPackError(`${linked} is a link, and a write there would land outside the repository; replace it with a folder and run this again`);
33
+ const templateFiles = loadTemplateFiles(packRoot, version, base);
34
+ const maintainedFiles = loadMaintainedFiles(packRoot, version, base);
31
35
  const validatorFiles = VALIDATOR_FILES.map(({ name }) => ({
32
36
  path: `${VALIDATORS_DIR}/${name}`,
33
- content: readFileSync(join(packRoot, "validators", name), "utf8")
37
+ content: rewriteSkillPaths(readFileSync(join(packRoot, "validators", name), "utf8"), base)
34
38
  }));
35
39
  const copied = [];
36
40
  const kept = [];
37
41
  for (const skill of TEMPLATE_SKILLS) {
38
- if (existsSync(join(opts.repoRoot, skillDir(skill)))) {
42
+ if (existsSync(join(opts.repoRoot, skillDir(skill, base)))) {
39
43
  kept.push(skill);
40
44
  continue;
41
45
  }
@@ -67,6 +71,7 @@ function installStarterPack(opts) {
67
71
  validatorsWritten.push(file.path);
68
72
  }
69
73
  return {
74
+ base,
70
75
  copied,
71
76
  kept,
72
77
  maintained: [...written.created, ...written.rewritten],
@@ -75,21 +80,23 @@ function installStarterPack(opts) {
75
80
  validatorsKept
76
81
  };
77
82
  }
78
- var skillFile = (skill) => `${skillDir(skill)}/SKILL.md`;
83
+ var skillFile = (skill, base) => `${skillDir(skill, base)}/SKILL.md`;
79
84
  function validatorLabel(path) {
80
85
  return VALIDATOR_FILES.find(({ name }) => path === `${VALIDATORS_DIR}/${name}`)?.label ?? "a check";
81
86
  }
82
87
  function formatStarterPackOutput(result) {
83
88
  const lines = [];
84
- lines.push(`${C.green}\u2713${C.reset} Installed the starter skills in .outerlayer/skills/`, "");
89
+ const { base } = result;
90
+ lines.push(`${C.green}\u2713${C.reset} Installed the starter skills in ${base}/`, "");
85
91
  lines.push("Yours to edit \u2014 copied once, never overwritten:");
86
92
  for (const skill of TEMPLATE_SKILLS) {
87
93
  lines.push(
88
- result.kept.includes(skill) ? ` ${C.dim}kept${C.reset} ${skillDir(skill)}/ ${C.dim}(already exists, left exactly as it is)${C.reset}` : ` ${skillFile(skill)}`
94
+ result.kept.includes(skill) ? ` ${C.dim}kept${C.reset} ${skillDir(skill, base)}/ ${C.dim}(already exists, left exactly as it is)${C.reset}` : ` ${skillFile(skill, base)}`
89
95
  );
90
96
  }
91
- lines.push("", "Rewritten on every emit \u2014 edits are overwritten by the installed CLI:");
92
- for (const skill of MAINTAINED_SKILLS) lines.push(` ${skillFile(skill)}`);
97
+ const rewriter = base === OUTERLAYER_SKILLS_BASE ? "emit" : "`init --update`";
98
+ lines.push("", `Rewritten on every ${rewriter} \u2014 edits are overwritten by the installed CLI:`);
99
+ for (const skill of MAINTAINED_SKILLS) lines.push(` ${skillFile(skill, base)}`);
93
100
  lines.push(
94
101
  "",
95
102
  result.policy === "written" ? `${C.green}\u2713${C.reset} Wrote ${POLICY_PATH} (review required)` : `${C.dim}${POLICY_PATH} already exists \u2014 left as it is${C.reset}`,
@@ -98,8 +105,10 @@ function formatStarterPackOutput(result) {
98
105
  ),
99
106
  ...result.validatorsKept.map((path) => `${C.dim}${path} already exists \u2014 left as it is${C.reset}`),
100
107
  "",
101
- `Next: create .outerlayer/config.json naming your agent tools, for example {"targets": ["claude-code"]},`,
102
- `then run ${C.yellow}${cliInvocation()} context emit${C.reset} to compile the skills into their native files.`
108
+ ...base === OUTERLAYER_SKILLS_BASE ? [
109
+ `Next: create .outerlayer/config.json naming your agent tools, for example {"targets": ["claude-code"]},`,
110
+ `then run ${C.yellow}${cliInvocation()} context emit${C.reset} to compile the skills into their native files.`
111
+ ] : [`Agents read these skills from ${base}/ as they are. Nothing needs compiling.`]
103
112
  );
104
113
  return lines.join("\n") + "\n";
105
114
  }
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { rewriteControlPlanePaths, rewriteAgentsFilePaths, SUPPORTED_CONTROL_PLANE_LAYOUT, rewriteHookCommand } from './chunk-HCVLP7XA.js';
4
- import { MAINTAINED_SKILLS } from './chunk-5OCIHFGE.js';
4
+ import { MAINTAINED_SKILLS } from './chunk-HBISTTG3.js';
5
5
  import { existsSync, mkdirSync, copyFileSync, lstatSync, readdirSync, writeFileSync, readFileSync } from 'fs';
6
6
  import { join, dirname } from 'path';
7
7
 
@@ -2,7 +2,7 @@
2
2
  import { createRequire } from 'node:module';
3
3
  import { readContextManifest, removeContextManifest } from './chunk-YQR6E6OV.js';
4
4
  import { removePreCommitGuardHook } from './chunk-TUSYOL2O.js';
5
- import { CONTEXT_PIN_FILENAME } from './chunk-WFSUUUAN.js';
5
+ import { CONTEXT_PIN_FILENAME } from './chunk-RKOTJQVG.js';
6
6
  import { execFileSync } from 'child_process';
7
7
  import { lstatSync, existsSync, unlinkSync, readdirSync, rmdirSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
8
8
  import { join, dirname, isAbsolute } from 'path';
@@ -80,6 +80,9 @@ function hasSymlinkComponent(root, rel) {
80
80
  }
81
81
  return false;
82
82
  }
83
+ function linkedAgentsPath(root) {
84
+ return [".agents", ".agents/skills"].find((rel) => hasSymlinkComponent(root, rel));
85
+ }
83
86
  function trackedPaths(repoRoot) {
84
87
  try {
85
88
  const out = execFileSync("git", ["ls-files", "-z", "--", "AGENTS.md", ".claude", ".outerlayer"], {
@@ -171,4 +174,4 @@ function cleanupEarlierCopies(input) {
171
174
  return result;
172
175
  }
173
176
 
174
- export { cleanupEarlierCopies, hasSymlinkComponent };
177
+ export { cleanupEarlierCopies, hasSymlinkComponent, linkedAgentsPath };