@outerlayer/cli 0.17.0 → 0.18.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.
- package/CHANGELOG.md +47 -0
- package/README.md +15 -0
- package/dist/agent-setup-RBTEACYU.js +28 -0
- package/dist/{artifact-link-cmd-2F47LT7F.js → artifact-link-cmd-AVM2EKTV.js} +4 -3
- package/dist/{build-BG2YENGK.js → build-TQ6X5PYN.js} +5 -4
- package/dist/build-info.json +1 -1
- package/dist/{builder-2D3WSOOY.js → builder-DUI2ZH2H.js} +5 -6
- package/dist/{check-5XE7XMC4.js → check-5C4YDZYV.js} +53 -50
- package/dist/{chunk-R7PF5OOU.js → chunk-3CWUOFV6.js} +21 -14
- package/dist/{chunk-G5NPRL2K.js → chunk-3OFZM4X6.js} +548 -68
- package/dist/{chunk-2MNPHL23.js → chunk-47TTLEDX.js} +6 -5
- package/dist/{chunk-PLMTLGYH.js → chunk-52NC2FIU.js} +4 -3
- package/dist/chunk-6CHIYEZZ.js +564 -0
- package/dist/{chunk-TI7B7UEO.js → chunk-AMFWYESY.js} +1 -1
- package/dist/{chunk-YRYMNBGQ.js → chunk-ANPNT6PM.js} +2 -1
- package/dist/{chunk-YU3VKZ5F.js → chunk-B3UKB46N.js} +6 -6
- package/dist/{chunk-JXYVA45C.js → chunk-BMYGAGBJ.js} +1050 -304
- package/dist/{chunk-4Q7OMKAT.js → chunk-BQXFBI7T.js} +81 -5
- package/dist/chunk-CRB3POP4.js +34 -0
- package/dist/{chunk-F47JBIAW.js → chunk-DSF2FWAZ.js} +2 -1
- package/dist/{chunk-N5FOE5PS.js → chunk-ECODQ7II.js} +4 -33
- package/dist/{chunk-NBGDBTO2.js → chunk-ESC6UR76.js} +6 -5
- package/dist/{chunk-HHJDN6AU.js → chunk-ESVW4MJY.js} +1 -1
- package/dist/{chunk-42ZI52JW.js → chunk-F4XSVQJ4.js} +4 -3
- package/dist/{chunk-LWSJQJC6.js → chunk-FUB7LRUE.js} +7 -7
- package/dist/chunk-G2YNJIGF.js +44 -0
- package/dist/{chunk-QKFB4K7X.js → chunk-GGOMT6KF.js} +1 -1
- package/dist/{chunk-VQYBXPI7.js → chunk-GOBOJMOJ.js} +5 -5
- package/dist/{chunk-N6LURUEF.js → chunk-GOSFARMS.js} +1 -1
- package/dist/chunk-JBJTC3UU.js +35 -0
- package/dist/{chunk-NWQTTSBB.js → chunk-JF42URPU.js} +16 -15
- package/dist/{chunk-ADJRGVZC.js → chunk-KDVIU23F.js} +1 -1
- package/dist/{chunk-S3NYLI2P.js → chunk-KK4VBOH6.js} +93 -37
- package/dist/{chunk-KMDLFI4P.js → chunk-L2USZT6T.js} +1 -1
- package/dist/{chunk-WTE3MQML.js → chunk-LXAY4A2G.js} +3 -12
- package/dist/{chunk-V7NIVOFD.js → chunk-M2ZWWTWZ.js} +1 -1
- package/dist/{chunk-ERI5GBNI.js → chunk-MLAAT4S6.js} +3 -3
- package/dist/{chunk-POJMEEJJ.js → chunk-MNTSH4CL.js} +1 -1
- package/dist/{chunk-WUYTWNMA.js → chunk-MQJSXHV7.js} +1 -1
- package/dist/{chunk-O765JR4W.js → chunk-MTP2QEVO.js} +1 -1
- package/dist/{chunk-ZM2IMMYN.js → chunk-N2PXGQRL.js} +9 -1
- package/dist/{chunk-J5M7BSJQ.js → chunk-N3CUDFCW.js} +9 -3
- package/dist/{chunk-4KSQKQXE.js → chunk-NACDBXUG.js} +19 -15
- package/dist/{chunk-ONKJUM6R.js → chunk-NL4XPC7W.js} +1 -1
- package/dist/{chunk-WVUIRTWA.js → chunk-QQM2UJ6T.js} +31 -26
- package/dist/{chunk-KG5ECZGJ.js → chunk-RAZTWYZN.js} +10 -9
- package/dist/{chunk-4NPZVMJU.js → chunk-S26M3YBJ.js} +60 -4
- package/dist/{chunk-UGP76IZ5.js → chunk-S5PCA3SN.js} +1 -1
- package/dist/{chunk-3NSNIIBE.js → chunk-S76AYB4M.js} +17 -16
- package/dist/{chunk-RMWLBUCJ.js → chunk-SADUQSO4.js} +1 -1
- package/dist/{chunk-OZGHL5Y5.js → chunk-SWCTGCSC.js} +2 -2
- package/dist/{chunk-GQD22KKN.js → chunk-T2Q7ISPE.js} +2 -1
- package/dist/{chunk-C5Y5ZJJZ.js → chunk-T4Y6SCG3.js} +5 -4
- package/dist/{chunk-BWQ66M6N.js → chunk-ULSIJGLS.js} +45 -13
- package/dist/{chunk-NNRTPG7X.js → chunk-UYOYTKE2.js} +4 -4
- package/dist/{chunk-PTW6W5NR.js → chunk-VYAL7PUE.js} +1 -1
- package/dist/{chunk-YZ5F4PIS.js → chunk-W5VPCONO.js} +146 -247
- package/dist/{chunk-6Y5RUTHO.js → chunk-WBT5X3NH.js} +5 -4
- package/dist/{chunk-RLYZLUQ7.js → chunk-WGAUY5LE.js} +2 -2
- package/dist/{chunk-RSNSZ2LJ.js → chunk-X5H2WYMB.js} +1 -1
- package/dist/{chunk-OHVJA253.js → chunk-X5N6KC6V.js} +47 -29
- package/dist/{chunk-22RMZBGW.js → chunk-XGP3VYOG.js} +1 -1
- package/dist/{chunk-HYZRY4KZ.js → chunk-XNGMQ27R.js} +16 -6
- package/dist/{chunk-HGECYFEI.js → chunk-Y5GE76XC.js} +131 -54
- package/dist/{chunk-MAK5LYRF.js → chunk-Y5MXET4M.js} +277 -535
- package/dist/{chunk-XCK2YAY5.js → chunk-YVZJ6GKF.js} +3 -2
- package/dist/{chunk-YO4PSLVB.js → chunk-ZRL6HKBY.js} +1 -1
- package/dist/claude-launcher-YVXI76NX.js +102 -0
- package/dist/{cli-A76AXELQ.js → cli-C77H54BV.js} +468 -161
- package/dist/{command-R2QCVX55.js → command-H5CILO4S.js} +40 -37
- package/dist/{config-N3C6DFQA.js → config-FXDG4NPJ.js} +2 -3
- package/dist/{connect-cmd-JBKAQNSF.js → connect-cmd-ZW5FV3ZW.js} +9 -8
- package/dist/{context-adopt-NFHCLVUB.js → context-adopt-O5OFXMKI.js} +13 -12
- package/dist/context-materialize-Y5IJ4MQT.js +23 -0
- package/dist/{dist-LKDWQWZ7.js → dist-QTX4RSCL.js} +2 -2
- package/dist/{docker-4J77Q2BF.js → docker-RC3PRX3Q.js} +7 -8
- package/dist/{doctor-4TAIARIG.js → doctor-2NQQML6P.js} +46 -39
- package/dist/{emit-artifact-cmd-MPZVR56N.js → emit-artifact-cmd-7MP63KXU.js} +25 -22
- package/dist/emit-cmd-PPN4QQF2.js +14 -0
- package/dist/{emit-criteria-cmd-EFGYI23V.js → emit-criteria-cmd-3RXPDLNK.js} +16 -14
- package/dist/{emit-finding-cmd-5GF3V4LR.js → emit-finding-cmd-OL7JB6H3.js} +18 -16
- package/dist/{emit-result-cmd-I4OADKMD.js → emit-result-cmd-UZVMOCF4.js} +20 -17
- package/dist/{exec-client-CQV746UF.js → exec-client-7UMESIE2.js} +3 -4
- package/dist/governing-source-BUU4IABS.js +35 -0
- package/dist/guest-init-KPBQOFE5.js +9 -0
- package/dist/{hook-fast-R4FVSZ2H.js → hook-fast-W5MKHMJT.js} +4 -1
- package/dist/host-key-U4B5QETR.js +8 -0
- package/dist/{import-capture-cmd-EQ35EARA.js → import-capture-cmd-ZO6KGHI2.js} +7 -5
- package/dist/{import-ruler-cmd-BGAZXCQM.js → import-ruler-cmd-KJMWL5V6.js} +5 -3
- package/dist/index.js +8 -4
- package/dist/init-VWXIZEAN.js +54 -0
- package/dist/{init-PWU5YVL7.js → init-WNXXYMO7.js} +38 -35
- package/dist/{init-cmd-XAVO7HYZ.js → init-cmd-WS6TIRYT.js} +28 -24
- package/dist/{init-update-CVCWD6VS.js → init-update-E3J6TVIN.js} +27 -26
- package/dist/{install-HDBIPHTX.js → install-CBWIEF3R.js} +4 -5
- package/dist/{install-cmd-5HYMXLEW.js → install-cmd-QDOTR4OM.js} +5 -4
- package/dist/{login-browser-QZCS3WW6.js → login-browser-O63QZN7D.js} +4 -3
- package/dist/{logout-cmd-QAUFDJ6J.js → logout-cmd-5V5MMBSY.js} +3 -2
- package/dist/{logs-H55NWW4H.js → logs-AMLKC3VP.js} +3 -1
- package/dist/loop-UGI2BJOT.js +76 -0
- package/dist/machine-JOW4RNZ7.js +49 -0
- package/dist/{mcp-install-cmd-FDTPQQS6.js → mcp-install-cmd-GGWB3JJ2.js} +3 -2
- package/dist/{mcp-serve-cmd-3KVYEUXG.js → mcp-serve-cmd-DOTY5FKY.js} +10 -8
- package/dist/paths-7XP63OAX.js +7 -0
- package/dist/pending-532ABZYC.js +8 -0
- package/dist/{pidfile-UZRH774M.js → pidfile-3DM4OBKO.js} +4 -2
- package/dist/{record-C43U4PKS.js → record-3WP6V2K5.js} +3 -2
- package/dist/{runner-env-EN7YE7QX.js → runner-env-4NB2GA7O.js} +5 -6
- package/dist/{runner-key-6SLBI7PP.js → runner-key-TC3NFWFV.js} +38 -35
- package/dist/{session-sender-FO3LCREV.js → session-sender-NNVPSPY7.js} +17 -14
- package/dist/spec-cmd-OWVTBB4J.js +116 -0
- package/dist/{starter-pack-KF66HGZR.js → starter-pack-OPWUDOWX.js} +7 -5
- package/dist/{status-7VNQN5PW.js → status-TKCLLKFG.js} +42 -39
- package/dist/{statusline-fast-SVTMBMD7.js → statusline-fast-KN3BX67H.js} +2 -1
- package/dist/{sync-cmd-GVPPFZ3G.js → sync-cmd-Q6VYNPWG.js} +16 -13
- package/dist/{watch-23HSAEI6.js → watch-ARAGADTF.js} +16 -13
- package/dist/{work-claim-cmd-LKL3GHFQ.js → work-claim-cmd-34FERLYX.js} +25 -27
- package/dist/work-cmd-7S5B2H2P.js +25 -0
- package/dist/{work-comment-cmd-AWHP56M2.js → work-comment-cmd-SZJSPM5S.js} +15 -13
- package/dist/{work-launch-R5HTAP6X.js → work-launch-LEQ2MPM3.js} +3 -1
- package/dist/{work-open-pr-cmd-IOM4AVQQ.js → work-open-pr-cmd-RPXKCBWS.js} +17 -15
- package/dist/work-pr-cmd-5LGANL32.js +26 -0
- package/package.json +3 -2
- package/skill-pack/maintained/outerlayer-amend/SKILL.md +4 -2
- package/skill-pack/shipped.json +17 -2
- package/skill-pack/template/build/SKILL.md +23 -10
- package/skill-pack/template/build/references/agent-briefs.md +3 -1
- package/skill-pack/template/build/references/criteria-judge.md +27 -0
- package/skill-pack/template/build/references/release.md +19 -28
- package/skill-pack/template/spec/SKILL.md +35 -10
- package/skill-pack/validators/acceptance-criteria.yaml +25 -26
- package/dist/agent-setup-T624CWPD.js +0 -27
- package/dist/chunk-BYT5O5RV.js +0 -61
- package/dist/context-materialize-IV2TUUFO.js +0 -22
- package/dist/emit-cmd-IJ3GVRFD.js +0 -12
- package/dist/guest-init-LJP5GPZF.js +0 -9
- package/dist/host-key-YMLXY6QB.js +0 -7
- package/dist/init-6XPDRDTC.js +0 -51
- package/dist/loop-FK3LPMMZ.js +0 -73
- package/dist/machine-SQXEBAM2.js +0 -46
- package/dist/paths-OYKMVYJP.js +0 -6
- package/dist/pending-MXLSRYMO.js +0 -7
- package/dist/work-cmd-Z2WXLZPH.js +0 -23
- package/dist/work-pr-cmd-HNEUIEN7.js +0 -24
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { C } from './chunk-
|
|
3
|
+
import { C } from './chunk-ANPNT6PM.js';
|
|
4
4
|
import { readCloudConfig } from './chunk-EABW6AJQ.js';
|
|
5
|
+
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
5
6
|
import { existsSync, writeFileSync, readFileSync, mkdirSync } from 'fs';
|
|
6
7
|
import { join, dirname } from 'path';
|
|
7
8
|
|
|
@@ -12,7 +13,7 @@ function defaultMcpUrl(home) {
|
|
|
12
13
|
const origin = readCloudConfig(home).url;
|
|
13
14
|
if (!origin) {
|
|
14
15
|
throw new McpInstallError(
|
|
15
|
-
|
|
16
|
+
`no gateway URL: pass --url <your gateway>, or run \`${cliInvocation()} login\` first.`
|
|
16
17
|
);
|
|
17
18
|
}
|
|
18
19
|
return `${origin.replace(/\/+$/, "")}/v1/mcp`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { readCloudConfig, cloudConfigPath } from './chunk-EABW6AJQ.js';
|
|
4
|
-
import { signRunnerRequest, signerFor } from './chunk-
|
|
4
|
+
import { signRunnerRequest, signerFor } from './chunk-M2ZWWTWZ.js';
|
|
5
5
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
6
6
|
|
|
7
7
|
createRequire(import.meta.url);
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { versionAtLeast, MINIMUM_CLAUDE_VERSION, SHIM_SCRIPT, CONTROL_PLANE_DIR_VARIABLE } from './chunk-G2YNJIGF.js';
|
|
4
|
+
export { MINIMUM_CLAUDE_VERSION } from './chunk-G2YNJIGF.js';
|
|
5
|
+
import './chunk-Z5GEFMRW.js';
|
|
6
|
+
import { spawnSync, execFileSync, spawn } from 'child_process';
|
|
7
|
+
import { existsSync, accessSync, constants, statSync, readFileSync } from 'fs';
|
|
8
|
+
import { join, delimiter, isAbsolute, resolve } from 'path';
|
|
9
|
+
|
|
10
|
+
createRequire(import.meta.url);
|
|
11
|
+
function readDeliveryRecord(cwd) {
|
|
12
|
+
let common;
|
|
13
|
+
try {
|
|
14
|
+
common = execFileSync("git", ["rev-parse", "--git-common-dir"], { cwd, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"], timeout: 5e3 }).trim();
|
|
15
|
+
} catch {
|
|
16
|
+
return { kind: "none" };
|
|
17
|
+
}
|
|
18
|
+
const path = join(isAbsolute(common) ? common : resolve(cwd, common), "outerlayer", "delivery.json");
|
|
19
|
+
if (!existsSync(path)) return { kind: "none" };
|
|
20
|
+
try {
|
|
21
|
+
const parsed = JSON.parse(readFileSync(path, "utf8"));
|
|
22
|
+
if (typeof parsed.dir === "string" && isAbsolute(parsed.dir) && typeof parsed.repository === "string" && typeof parsed.sha === "string") {
|
|
23
|
+
return { kind: "found", record: { repository: parsed.repository, sha: parsed.sha, dir: parsed.dir } };
|
|
24
|
+
}
|
|
25
|
+
} catch {
|
|
26
|
+
}
|
|
27
|
+
return { kind: "invalid", path };
|
|
28
|
+
}
|
|
29
|
+
function findClaude(path) {
|
|
30
|
+
for (const entry of (path ?? "").split(delimiter)) {
|
|
31
|
+
if (entry === "") continue;
|
|
32
|
+
const candidate = join(entry, "claude");
|
|
33
|
+
try {
|
|
34
|
+
accessSync(candidate, constants.X_OK);
|
|
35
|
+
if (statSync(candidate).size === Buffer.byteLength(SHIM_SCRIPT) && readFileSync(candidate, "utf8") === SHIM_SCRIPT) continue;
|
|
36
|
+
} catch {
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
return candidate;
|
|
40
|
+
}
|
|
41
|
+
return void 0;
|
|
42
|
+
}
|
|
43
|
+
var SIGNALS = ["SIGINT", "SIGTERM", "SIGHUP"];
|
|
44
|
+
var SIGNAL_NUMBERS = { SIGHUP: 1, SIGINT: 2, SIGTERM: 15 };
|
|
45
|
+
function run(program, argv, env, cwd, stderr) {
|
|
46
|
+
return new Promise((done) => {
|
|
47
|
+
const child = spawn(program, argv, { cwd, env, stdio: "inherit" });
|
|
48
|
+
const forward = (signal) => () => {
|
|
49
|
+
child.kill(signal);
|
|
50
|
+
};
|
|
51
|
+
const handlers = SIGNALS.map((signal) => [signal, forward(signal)]);
|
|
52
|
+
for (const [signal, handler] of handlers) process.on(signal, handler);
|
|
53
|
+
const finish = (code) => {
|
|
54
|
+
for (const [signal, handler] of handlers) process.off(signal, handler);
|
|
55
|
+
done(code);
|
|
56
|
+
};
|
|
57
|
+
child.on("error", (err) => {
|
|
58
|
+
stderr(`outerlayer claude: could not start ${program}: ${err.message}
|
|
59
|
+
`);
|
|
60
|
+
finish(127);
|
|
61
|
+
});
|
|
62
|
+
child.on("exit", (code, signal) => finish(code ?? 128 + (signal === null ? 0 : SIGNAL_NUMBERS[signal] ?? 0)));
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
async function runClaudeLauncher(args, deps = {}) {
|
|
66
|
+
const cwd = deps.cwd ?? process.cwd();
|
|
67
|
+
const env = deps.env ?? process.env;
|
|
68
|
+
const stderr = deps.stderr ?? ((text) => void process.stderr.write(text));
|
|
69
|
+
const claude = findClaude(env.PATH);
|
|
70
|
+
if (claude === void 0) {
|
|
71
|
+
stderr("outerlayer claude: no claude program found on PATH\n");
|
|
72
|
+
return 127;
|
|
73
|
+
}
|
|
74
|
+
const found = readDeliveryRecord(cwd);
|
|
75
|
+
if (found.kind === "none") return run(claude, args, env, cwd, stderr);
|
|
76
|
+
if (found.kind === "invalid") {
|
|
77
|
+
stderr(`outerlayer claude: ${found.path} is not a readable delivery record, so the control plane cannot be attached
|
|
78
|
+
`);
|
|
79
|
+
return 1;
|
|
80
|
+
}
|
|
81
|
+
const { dir } = found.record;
|
|
82
|
+
if (!existsSync(dir)) {
|
|
83
|
+
stderr(`outerlayer claude: the control plane of ${found.record.repository} is not at ${dir}, so it cannot be attached
|
|
84
|
+
`);
|
|
85
|
+
return 1;
|
|
86
|
+
}
|
|
87
|
+
const reported = spawnSync(claude, ["--version"], { env, encoding: "utf8", timeout: 15e3, stdio: ["ignore", "pipe", "ignore"] }).stdout ?? "";
|
|
88
|
+
if (/\d+\.\d+\.\d+/.test(reported) && !versionAtLeast(reported)) {
|
|
89
|
+
stderr(`outerlayer claude: Claude Code ${reported.trim().split(/\s+/)[0]} is older than ${MINIMUM_CLAUDE_VERSION}, the oldest version known to load a control plane's instructions for subagents; the minimum version is ${MINIMUM_CLAUDE_VERSION}
|
|
90
|
+
`);
|
|
91
|
+
return 1;
|
|
92
|
+
}
|
|
93
|
+
return run(
|
|
94
|
+
claude,
|
|
95
|
+
["--add-dir", dir, "--settings", join(dir, "settings.json"), ...args],
|
|
96
|
+
{ ...env, CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD: "1", [CONTROL_PLANE_DIR_VARIABLE]: dir },
|
|
97
|
+
cwd,
|
|
98
|
+
stderr
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export { runClaudeLauncher };
|