@outerlayer/cli 0.5.1 → 0.7.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 +29 -0
- package/README.md +19 -0
- package/dist/{agent-setup-IFH3FB5X.js → agent-setup-TXLDY5RV.js} +7 -6
- package/dist/{build-PAEKVYVK.js → build-JF5UOWKJ.js} +2 -1
- package/dist/build-info.json +1 -1
- package/dist/{check-4Q33B5ZE.js → check-ASZL5BEO.js} +39 -23
- package/dist/chunk-2VO25HHO.js +75 -0
- package/dist/{chunk-XDDW4FRS.js → chunk-5FWNEQNZ.js} +3 -3
- package/dist/{chunk-CHLVJNTE.js → chunk-6IYLDODX.js} +18 -6
- package/dist/{chunk-W7UTFZDH.js → chunk-6QWV3YDJ.js} +2 -2
- package/dist/{chunk-EGABNHZG.js → chunk-6ZZHWY2Z.js} +149 -18
- package/dist/{lima-XN65D7GN.js → chunk-77MM5RYD.js} +0 -1
- package/dist/chunk-7FTNIAHS.js +211 -0
- package/dist/{chunk-EMY4I27X.js → chunk-7ZR5UPMB.js} +555 -5
- package/dist/{chunk-F4NU4H3V.js → chunk-AII7CKTH.js} +133 -35
- package/dist/{chunk-ZXBITXTS.js → chunk-AIW6GLET.js} +1 -1
- package/dist/{chunk-UWH5DSUP.js → chunk-AJKEHABI.js} +507 -90
- package/dist/{chunk-RTXKYLCA.js → chunk-AQ54MKSQ.js} +2 -2
- package/dist/{chunk-Z62HNKEJ.js → chunk-CEBIA5FD.js} +31 -5
- package/dist/{chunk-EX6M5JPR.js → chunk-D6FXM5OW.js} +6302 -28611
- package/dist/{chunk-RMAZ2NWA.js → chunk-DGAIVMMN.js} +23 -2
- package/dist/{chunk-3DD6AOWC.js → chunk-DTXOJDEH.js} +26 -2
- package/dist/{chunk-T52PKE2Y.js → chunk-E4PIFIC3.js} +244 -17
- package/dist/{chunk-H5NCNVDA.js → chunk-EV3M3EH7.js} +2 -2
- package/dist/chunk-FBTE2A2X.js +38 -0
- package/dist/{chunk-DVDEBNQJ.js → chunk-GQD22KKN.js} +17 -6
- package/dist/{chunk-BCJNHMZT.js → chunk-HHJDN6AU.js} +18 -3
- package/dist/chunk-HKMPVPO7.js +55 -0
- package/dist/{chunk-UFFXNXLQ.js → chunk-JPR2WHHF.js} +31 -29
- package/dist/{chunk-ZMYPLFG3.js → chunk-M3SQ4YGD.js} +1 -1
- package/dist/{chunk-H4CK2YK4.js → chunk-MQPRB5K7.js} +18 -10
- package/dist/{chunk-AUFG23AA.js → chunk-OD2VTIHN.js} +19 -47
- package/dist/chunk-OUUINEYB.js +27 -0
- package/dist/chunk-PUN7LMNS.js +39 -0
- package/dist/{install-cmd-7WXOIFDO.js → chunk-Q5G2ODUZ.js} +1 -2
- package/dist/{chunk-B2G7JHHB.js → chunk-R7STSBLC.js} +1 -1
- package/dist/{chunk-OR6AEEDO.js → chunk-SSU747O6.js} +85 -25
- package/dist/chunk-T6OIJQRT.js +31 -0
- package/dist/{chunk-YYYXRJUW.js → chunk-TI7B7UEO.js} +1 -1
- package/dist/{chunk-WO2BXCTQ.js → chunk-VXLJORHL.js} +1 -1
- package/dist/{chunk-CBPPJSAR.js → chunk-WVGSB3Z2.js} +2 -2
- package/dist/{chunk-JLDZTG3A.js → chunk-X2FSFU4C.js} +4 -1
- package/dist/chunk-YNJEOGDL.js +22434 -0
- package/dist/{chunk-W4SQCOZU.js → chunk-ZOAEPWGL.js} +1 -1
- package/dist/{chunk-WOBNRVQT.js → chunk-ZYHKJKSU.js} +1 -1
- package/dist/{chunk-WIOZAJ2W.js → chunk-ZZXLM64C.js} +1 -1
- package/dist/{cli-LHSUYYMI.js → cli-LEVCGAQV.js} +154 -79
- package/dist/command-FLSYCGIB.js +187 -0
- package/dist/config-I3TVFYLH.js +10 -0
- package/dist/{connect-cmd-OJBFHZWP.js → connect-cmd-MJMUONDY.js} +4 -4
- package/dist/{context-adopt-UMA4O5NY.js → context-adopt-CE4KDXS3.js} +5 -4
- package/dist/{context-materialize-G2FUFC72.js → context-materialize-QL33HDJN.js} +5 -4
- package/dist/{dist-WDV7U7UJ.js → dist-PXBSA7QX.js} +2 -1
- package/dist/{doctor-MOA3RIEP.js → doctor-FVDT3KJZ.js} +46 -19
- package/dist/{emit-artifact-cmd-FDWYKURA.js → emit-artifact-cmd-7RPMRSVP.js} +13 -7
- package/dist/{emit-cmd-DCERAU27.js → emit-cmd-2QRMYPYO.js} +4 -3
- package/dist/{emit-criteria-cmd-OCXHLK34.js → emit-criteria-cmd-MKI7WETO.js} +12 -3
- package/dist/{emit-finding-cmd-POW7PKIA.js → emit-finding-cmd-RMLGZASB.js} +14 -3
- package/dist/{emit-result-cmd-ID35SH53.js → emit-result-cmd-MTXAZ2GV.js} +15 -9
- package/dist/{exec-client-4XGXV3XN.js → exec-client-NPYNUAF3.js} +4 -3
- package/dist/{guest-init-GENRHNP7.js → guest-init-JWNNAH2H.js} +4 -3
- package/dist/{hook-fast-EYENPK6F.js → hook-fast-XBOZ3N6L.js} +1 -1
- package/dist/{import-capture-cmd-AVZ4VIVJ.js → import-capture-cmd-T4556ELW.js} +3 -2
- package/dist/{import-ruler-cmd-GUHL6IY5.js → import-ruler-cmd-SG3UVGI7.js} +2 -1
- package/dist/index.js +3 -2
- package/dist/{init-FYDJAKTM.js → init-BACXESVV.js} +21 -14
- package/dist/{init-2IPOIXJV.js → init-VLW7H6RW.js} +40 -62
- package/dist/{init-cmd-KLIDRVXQ.js → init-cmd-VJFB5L7X.js} +10 -9
- package/dist/inspect-XAUSB7L3.js +63 -0
- package/dist/install-NMAPLLBQ.js +14 -0
- package/dist/install-cmd-B5SEU3G7.js +8 -0
- package/dist/lima-7NPCNGWT.js +6 -0
- package/dist/{logs-7RYUH5A6.js → logs-H55NWW4H.js} +1 -0
- package/dist/loop-D3243JKT.js +64 -0
- package/dist/{machine-ECU3QCZD.js → machine-EB3GEVI4.js} +20 -13
- package/dist/session-sender-LMACEJJS.js +29 -0
- package/dist/{starter-pack-LIZYMKYQ.js → starter-pack-MUXMAU4S.js} +4 -3
- package/dist/{status-CLATHCTQ.js → status-F4THTJJK.js} +36 -16
- package/dist/{sync-cmd-SWQ5KLPL.js → sync-cmd-M6JA3OEE.js} +7 -7
- package/dist/{watch-3YW6Z3DQ.js → watch-NB5TGPEZ.js} +7 -7
- package/dist/{work-claim-cmd-3OPWA77E.js → work-claim-cmd-UHMWOS3G.js} +14 -7
- package/dist/{work-cmd-NUR4CAG6.js → work-cmd-6UMCFTAW.js} +9 -3
- package/dist/{work-comment-cmd-6TTTYGHM.js → work-comment-cmd-E4LEUIXZ.js} +9 -3
- package/dist/{work-launch-YI4CJDAP.js → work-launch-R5HTAP6X.js} +1 -1
- package/dist/{work-open-pr-cmd-KZ7QQFLD.js → work-open-pr-cmd-OPZWGSEQ.js} +10 -4
- package/dist/{work-pr-cmd-QNUBE6IQ.js → work-pr-cmd-IDIAFFRU.js} +9 -2
- package/package.json +2 -1
- package/skill-pack/template/build/scripts/record-criteria.mjs +2 -1
- package/dist/chunk-D2KWEAN6.js +0 -55
- package/dist/chunk-ZOC7JSYC.js +0 -83
- package/dist/config-HL2AIR3K.js +0 -9
- package/dist/loop-NEBUGD2Q.js +0 -45
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { runRunnerInstall } from './chunk-Q5G2ODUZ.js';
|
|
4
|
+
import { currentLink, execStartCommand } from './chunk-TI7B7UEO.js';
|
|
5
|
+
import { readJobFile } from './chunk-T6OIJQRT.js';
|
|
6
|
+
import { installService, uninstallService, realTaskScheduler } from './chunk-7FTNIAHS.js';
|
|
7
|
+
import './chunk-FBTE2A2X.js';
|
|
8
|
+
import './chunk-OUUINEYB.js';
|
|
9
|
+
import { realLima } from './chunk-77MM5RYD.js';
|
|
10
|
+
import { writeLaunchAgent, launchAgentPath } from './chunk-LF6MLJCY.js';
|
|
11
|
+
import { detectMachine } from './chunk-AQ54MKSQ.js';
|
|
12
|
+
import './chunk-E4PIFIC3.js';
|
|
13
|
+
import './chunk-CEBIA5FD.js';
|
|
14
|
+
import './chunk-N5FOE5PS.js';
|
|
15
|
+
import './chunk-OGFGZQA3.js';
|
|
16
|
+
import './chunk-774HEQL6.js';
|
|
17
|
+
import './chunk-QOZKPLVJ.js';
|
|
18
|
+
import './chunk-ZOAEPWGL.js';
|
|
19
|
+
import './chunk-R7STSBLC.js';
|
|
20
|
+
import './chunk-DGAIVMMN.js';
|
|
21
|
+
import './chunk-PUN7LMNS.js';
|
|
22
|
+
import './chunk-BFESLKPP.js';
|
|
23
|
+
import './chunk-SSU747O6.js';
|
|
24
|
+
import './chunk-ZYHKJKSU.js';
|
|
25
|
+
import './chunk-D6FXM5OW.js';
|
|
26
|
+
import './chunk-USO2DKBD.js';
|
|
27
|
+
import './chunk-N6LURUEF.js';
|
|
28
|
+
import './chunk-YRYMNBGQ.js';
|
|
29
|
+
import { runnerVmOf, loadRunnerConfig } from './chunk-DTXOJDEH.js';
|
|
30
|
+
import './chunk-F6GFZXZ3.js';
|
|
31
|
+
import './chunk-OD2VTIHN.js';
|
|
32
|
+
import './chunk-HKMPVPO7.js';
|
|
33
|
+
import './chunk-WZBHBH3J.js';
|
|
34
|
+
import './chunk-5FWNEQNZ.js';
|
|
35
|
+
import './chunk-ZJSNLVCE.js';
|
|
36
|
+
import './chunk-ZZXLM64C.js';
|
|
37
|
+
import './chunk-VXLJORHL.js';
|
|
38
|
+
import './chunk-7ZR5UPMB.js';
|
|
39
|
+
import './chunk-BCLJSQCV.js';
|
|
40
|
+
import './chunk-BOLTI6LR.js';
|
|
41
|
+
import './chunk-YNJEOGDL.js';
|
|
42
|
+
import './chunk-EABW6AJQ.js';
|
|
43
|
+
import './chunk-RA3O54FC.js';
|
|
44
|
+
import './chunk-M5POMKKW.js';
|
|
45
|
+
import './chunk-ZM2IMMYN.js';
|
|
46
|
+
import './chunk-XCCLFVXM.js';
|
|
47
|
+
import './chunk-BJ3KTMDH.js';
|
|
48
|
+
import './chunk-VNVZDWO3.js';
|
|
49
|
+
import './chunk-Z5GEFMRW.js';
|
|
50
|
+
import { userInfo, totalmem } from 'os';
|
|
51
|
+
import { join } from 'path';
|
|
52
|
+
import { rmSync, existsSync, readdirSync, readFileSync } from 'fs';
|
|
53
|
+
import { spawnSync } from 'child_process';
|
|
54
|
+
|
|
55
|
+
createRequire(import.meta.url);
|
|
56
|
+
async function serviceInVm(lima, instance, action, options) {
|
|
57
|
+
const limactl = lima.locate();
|
|
58
|
+
if (limactl === void 0) {
|
|
59
|
+
return { ok: false, lines: ["limactl is not installed, and the runner's service lives in the Linux VM it manages. Install Lima with `brew install lima`."] };
|
|
60
|
+
}
|
|
61
|
+
const ran = await lima.shell(instance, ["outerlayer", "runner", action, "--service", ...options.extraArgs ?? []]);
|
|
62
|
+
const lines = [...ran.stdout.split("\n"), ...ran.stderr.split("\n")].map((line) => line.trim()).filter((line) => line !== "");
|
|
63
|
+
if (ran.status !== 0) return { ok: false, lines: lines.length > 0 ? lines : [`outerlayer runner ${action} --service failed in the VM ${instance} with exit status ${ran.status}`] };
|
|
64
|
+
if (action === "install") {
|
|
65
|
+
const path = writeLaunchAgent(options.home, limactl, instance);
|
|
66
|
+
lines.push(`the VM ${instance} starts at login through ${path}`);
|
|
67
|
+
} else {
|
|
68
|
+
rmSync(launchAgentPath(options.home), { force: true });
|
|
69
|
+
lines.push("removed the launch agent that started the VM at login");
|
|
70
|
+
}
|
|
71
|
+
return { ok: true, lines };
|
|
72
|
+
}
|
|
73
|
+
var WSL_CONF = "/etc/wsl.conf";
|
|
74
|
+
function readText(path) {
|
|
75
|
+
try {
|
|
76
|
+
return readFileSync(path, "utf8");
|
|
77
|
+
} catch {
|
|
78
|
+
return void 0;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function sudoWrite(path, text) {
|
|
82
|
+
const result = spawnSync("sudo", ["tee", path], { input: text, stdio: ["pipe", "ignore", "inherit"] });
|
|
83
|
+
if (result.status !== 0) throw new Error(`sudo tee ${path} failed with exit status ${result.status}`);
|
|
84
|
+
}
|
|
85
|
+
function realSystemd() {
|
|
86
|
+
return {
|
|
87
|
+
running: () => existsSync("/run/systemd/system"),
|
|
88
|
+
read: readText,
|
|
89
|
+
write: sudoWrite,
|
|
90
|
+
remove: (path) => {
|
|
91
|
+
spawnSync("sudo", ["rm", "-f", path], { stdio: ["inherit", "ignore", "inherit"] });
|
|
92
|
+
},
|
|
93
|
+
systemctl: (args, options) => {
|
|
94
|
+
const result = options?.sudo === true ? spawnSync("sudo", ["systemctl", ...args], { encoding: "utf8", stdio: ["inherit", "pipe", "inherit"] }) : spawnSync("systemctl", args, { encoding: "utf8" });
|
|
95
|
+
return { status: result.status ?? -1, stdout: result.stdout ?? "" };
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function realWslConf() {
|
|
100
|
+
return { read: () => readText(WSL_CONF), write: (text) => sudoWrite(WSL_CONF, text) };
|
|
101
|
+
}
|
|
102
|
+
function buildsRunningIn(runnerDirPath) {
|
|
103
|
+
const jobs = join(runnerDirPath, "jobs");
|
|
104
|
+
if (!existsSync(jobs)) return false;
|
|
105
|
+
try {
|
|
106
|
+
return readdirSync(jobs, { withFileTypes: true }).some((entry) => {
|
|
107
|
+
if (!entry.isDirectory()) return false;
|
|
108
|
+
const job = readJobFile(join(jobs, entry.name, "job.json"));
|
|
109
|
+
return job === null || job.outcome === void 0 && job.endedAt === void 0;
|
|
110
|
+
});
|
|
111
|
+
} catch {
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function realServiceDeps() {
|
|
116
|
+
const platform = detectMachine().platform;
|
|
117
|
+
return {
|
|
118
|
+
platform,
|
|
119
|
+
say: (line) => process.stdout.write(`running: ${line}
|
|
120
|
+
`),
|
|
121
|
+
systemd: realSystemd(),
|
|
122
|
+
...platform === "wsl2" ? { tasks: realTaskScheduler(), wslConf: realWslConf(), distro: process.env.WSL_DISTRO_NAME } : {},
|
|
123
|
+
usableMemoryBytes: totalmem(),
|
|
124
|
+
buildsRunning: buildsRunningIn,
|
|
125
|
+
// Asked as the account, through sudo, which the unit's own install needs anyway.
|
|
126
|
+
accountCan: (account, flag, path) => spawnSync("sudo", ["-n", "-u", account, "test", flag, path], { stdio: "ignore" }).status === 0
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// src/runner/service/command.ts
|
|
131
|
+
function accountCannotStart(account, nodePath, entry, can) {
|
|
132
|
+
if (!can(account, "-x", nodePath)) {
|
|
133
|
+
return `\u2717 the service would run as ${account}, which cannot execute ${nodePath}, the Node this install runs on. Nothing is set up: run the install as ${account} with a Node it can execute, or install Node where ${account} can reach it`;
|
|
134
|
+
}
|
|
135
|
+
if (!can(account, "-r", entry)) {
|
|
136
|
+
return `\u2717 the service would run as ${account}, which cannot read ${entry}. Nothing is set up: put the runner's config where ${account} can read it, or run the install as ${account}`;
|
|
137
|
+
}
|
|
138
|
+
return void 0;
|
|
139
|
+
}
|
|
140
|
+
function vmArgs(input) {
|
|
141
|
+
return [...input.print === true ? ["--print"] : [], ...input.replace === true ? ["--replace"] : [], ...input.user === void 0 ? [] : ["--user", input.user], ...input.unitName === void 0 ? [] : ["--unit-name", input.unitName]];
|
|
142
|
+
}
|
|
143
|
+
async function installServiceCommand(input, deps = {}) {
|
|
144
|
+
const vm = runnerVmOf(input.configPath);
|
|
145
|
+
if (vm !== void 0) {
|
|
146
|
+
const result = await serviceInVm((deps.lima ?? realLima)(), vm.instance, "install", { home: input.home, extraArgs: vmArgs(input) });
|
|
147
|
+
return { ok: result.ok, state: "vm", lines: result.lines };
|
|
148
|
+
}
|
|
149
|
+
const config = loadRunnerConfig(input.configPath);
|
|
150
|
+
if (input.print !== true && input.layoutInstalled !== true) {
|
|
151
|
+
runRunnerInstall({ configPath: input.configPath, entryPath: input.entryPath, nodePath: input.nodePath });
|
|
152
|
+
}
|
|
153
|
+
const account = input.user ?? userInfo().username;
|
|
154
|
+
const serviceDeps = (deps.service ?? realServiceDeps)();
|
|
155
|
+
if (input.print !== true && account !== userInfo().username && serviceDeps.accountCan !== void 0) {
|
|
156
|
+
const entry = join(currentLink(input.configPath), "node_modules", "@outerlayer", "cli", "dist", "index.js");
|
|
157
|
+
const problem = accountCannotStart(account, input.nodePath, entry, serviceDeps.accountCan);
|
|
158
|
+
if (problem !== void 0) return { ok: false, state: "refused", lines: [problem] };
|
|
159
|
+
}
|
|
160
|
+
const outcome = installService(
|
|
161
|
+
{
|
|
162
|
+
configPath: input.configPath,
|
|
163
|
+
hooks: config.hooks,
|
|
164
|
+
concurrency: config.concurrency,
|
|
165
|
+
buildMemory: config.build?.memory ?? "8g",
|
|
166
|
+
timeLimitMinutes: config.timeLimitMinutes,
|
|
167
|
+
execStart: execStartCommand(input.configPath, input.nodePath),
|
|
168
|
+
user: account,
|
|
169
|
+
unitName: input.unitName,
|
|
170
|
+
print: input.print,
|
|
171
|
+
replace: input.replace
|
|
172
|
+
},
|
|
173
|
+
serviceDeps
|
|
174
|
+
);
|
|
175
|
+
return { ok: outcome.ok, state: outcome.state, lines: outcome.lines, unit: outcome.unit };
|
|
176
|
+
}
|
|
177
|
+
async function uninstallServiceCommand(input, deps = {}) {
|
|
178
|
+
const vm = runnerVmOf(input.configPath);
|
|
179
|
+
if (vm !== void 0) {
|
|
180
|
+
const result = await serviceInVm((deps.lima ?? realLima)(), vm.instance, "uninstall", { home: input.home, extraArgs: input.unitName === void 0 ? [] : ["--unit-name", input.unitName] });
|
|
181
|
+
return { ok: result.ok, state: "vm", lines: result.lines };
|
|
182
|
+
}
|
|
183
|
+
const outcome = uninstallService({ configPath: input.configPath, unitName: input.unitName }, (deps.service ?? realServiceDeps)());
|
|
184
|
+
return { ok: outcome.ok, state: outcome.state, lines: outcome.lines };
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export { installServiceCommand, uninstallServiceCommand };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
export { DEFAULT_CHECK_TIME_LIMIT_MINUTES, RunnerConfigError, builtinKind, checkHooks, defaultRunnerConfigPath, hasRunnerBlock, isBuiltinContainer, isBuiltinProcess, isBuiltinVm, loadRunnerConfig, resolveBuild, runnerVmOf } from './chunk-DTXOJDEH.js';
|
|
4
|
+
import './chunk-F6GFZXZ3.js';
|
|
5
|
+
import './chunk-OD2VTIHN.js';
|
|
6
|
+
import './chunk-HKMPVPO7.js';
|
|
7
|
+
import './chunk-VNVZDWO3.js';
|
|
8
|
+
import './chunk-Z5GEFMRW.js';
|
|
9
|
+
|
|
10
|
+
createRequire(import.meta.url);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { promptOnTerminal, realConnectDeps, runConnect, runConnectCommand } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-EX6M5JPR.js';
|
|
3
|
+
export { connectedLine, fetchFactories, promptOnTerminal, realConnectDeps, runConnect, runConnectCommand, saveFactoryConnection, selectFactory } from './chunk-SSU747O6.js';
|
|
4
|
+
import './chunk-ZYHKJKSU.js';
|
|
5
|
+
import './chunk-D6FXM5OW.js';
|
|
7
6
|
import './chunk-USO2DKBD.js';
|
|
8
7
|
import './chunk-N6LURUEF.js';
|
|
9
8
|
import './chunk-YRYMNBGQ.js';
|
|
10
9
|
import './chunk-BOLTI6LR.js';
|
|
10
|
+
import './chunk-YNJEOGDL.js';
|
|
11
11
|
import './chunk-EABW6AJQ.js';
|
|
12
12
|
import './chunk-BJ3KTMDH.js';
|
|
13
13
|
import './chunk-VNVZDWO3.js';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { defaultGitRunner, hasSymlinkComponent } from './chunk-
|
|
4
|
-
import { writeContextManifest, writePinIfChanged, touchLastCheck, clearDegraded, writeSourceCache, SOURCE_CACHE_TTL_SUCCESS_MS, writeBuildHold } from './chunk-WIOZAJ2W.js';
|
|
5
|
-
import './chunk-WO2BXCTQ.js';
|
|
6
|
-
import './chunk-EMY4I27X.js';
|
|
3
|
+
import { defaultGitRunner, hasSymlinkComponent } from './chunk-5FWNEQNZ.js';
|
|
7
4
|
import './chunk-ZJSNLVCE.js';
|
|
5
|
+
import { writeContextManifest, writePinIfChanged, touchLastCheck, clearDegraded, writeSourceCache, SOURCE_CACHE_TTL_SUCCESS_MS, writeBuildHold } from './chunk-ZZXLM64C.js';
|
|
6
|
+
import './chunk-VXLJORHL.js';
|
|
7
|
+
import './chunk-7ZR5UPMB.js';
|
|
8
8
|
import './chunk-BCLJSQCV.js';
|
|
9
9
|
import './chunk-BOLTI6LR.js';
|
|
10
|
+
import './chunk-YNJEOGDL.js';
|
|
10
11
|
import './chunk-EABW6AJQ.js';
|
|
11
12
|
import './chunk-RA3O54FC.js';
|
|
12
13
|
import './chunk-M5POMKKW.js';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { defaultGitRunner, hasSymlinkComponent, materializeContext, parseOwnerRepo, parseRemoteHost, resolveGitCommonDir } from './chunk-
|
|
4
|
-
import './chunk-WIOZAJ2W.js';
|
|
5
|
-
import './chunk-WO2BXCTQ.js';
|
|
6
|
-
import './chunk-EMY4I27X.js';
|
|
3
|
+
export { defaultGitRunner, hasSymlinkComponent, materializeContext, parseOwnerRepo, parseRemoteHost, resolveGitCommonDir } from './chunk-5FWNEQNZ.js';
|
|
7
4
|
import './chunk-ZJSNLVCE.js';
|
|
5
|
+
import './chunk-ZZXLM64C.js';
|
|
6
|
+
import './chunk-VXLJORHL.js';
|
|
7
|
+
import './chunk-7ZR5UPMB.js';
|
|
8
8
|
import './chunk-BCLJSQCV.js';
|
|
9
9
|
import './chunk-BOLTI6LR.js';
|
|
10
|
+
import './chunk-YNJEOGDL.js';
|
|
10
11
|
import './chunk-EABW6AJQ.js';
|
|
11
12
|
import './chunk-RA3O54FC.js';
|
|
12
13
|
import './chunk-M5POMKKW.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { CaptureDaemon, PRICE_TABLE_SOURCE, SECRET_PATTERNS, SOURCE_ADAPTERS, SUPPORTED_VERSIONS, StatuslineAggregator, WARNING_CODES, claudeCodeAdapter, codexAdapter, codexSessionIdFromPath, compareVersions, completePrefix, computeStatuslineState, costOfUsage, cursorAdapter, cursorChatIdFromPath, defaultCodexSessionsDir, defaultCursorChatsDir, defaultCursorProjectsDir, defaultProjectsDir, defaultRawDir, enrichSessionRepo, findCodexRollouts, findCursorChats, findTranscripts, isNewerThanSupported, isPriceKnown, normalizeErrorSignature, normalizeRemote, parseCodexRollout, parseCursorChat, parseTranscript, readStatuslineState, readSyncWatermarkMs, remoteLookupFailed, resolvePrice, resolveRepoIdentity, rootChildIds, scanAll, scrubDeep, scrubText, sessionIdFromPath, setCustomScrubbers, setLocalIdentity, setRepoRoot, statuslineStatePath, tailTranscript, workspacesByHash, writeStatuslineState } from './chunk-
|
|
3
|
+
export { CaptureDaemon, PRICE_TABLE_SOURCE, SECRET_PATTERNS, SOURCE_ADAPTERS, SUPPORTED_VERSIONS, StatuslineAggregator, WARNING_CODES, claudeCodeAdapter, codexAdapter, codexSessionIdFromPath, compareVersions, completePrefix, computeStatuslineState, costOfUsage, cursorAdapter, cursorChatIdFromPath, defaultCodexSessionsDir, defaultCursorChatsDir, defaultCursorProjectsDir, defaultProjectsDir, defaultRawDir, enrichSessionRepo, findCodexRollouts, findCursorChats, findTranscripts, isNewerThanSupported, isPriceKnown, normalizeErrorSignature, normalizeRemote, parseCodexRollout, parseCursorChat, parseTranscript, readStatuslineState, readSyncWatermarkMs, remoteLookupFailed, resolvePrice, resolveRepoIdentity, rootChildIds, scanAll, scrubDeep, scrubText, sessionIdFromPath, setCustomScrubbers, setLocalIdentity, setRepoRoot, statuslineStatePath, tailTranscript, workspacesByHash, writeStatuslineState } from './chunk-D6FXM5OW.js';
|
|
4
|
+
import './chunk-YNJEOGDL.js';
|
|
4
5
|
import './chunk-Z5GEFMRW.js';
|
|
5
6
|
|
|
6
7
|
createRequire(import.meta.url);
|
|
@@ -1,33 +1,40 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { needsClaudeCredential, claudeCredentialCheck, missingPermissionOf, missingPermissionFix } from './chunk-
|
|
3
|
+
import { needsClaudeCredential, claudeCredentialCheck, missingPermissionOf, missingPermissionFix } from './chunk-6IYLDODX.js';
|
|
4
4
|
import { freeBytes, formatBytes } from './chunk-YYYRBYWG.js';
|
|
5
5
|
import { RepoFilter } from './chunk-TBT347UY.js';
|
|
6
|
-
import './chunk-
|
|
7
|
-
import { detectMachine, supportsContainerBuilds, describeMachineDocker, reachDockerStep, supportsMicroVmBuilds, microVmArchSupported, microVmAssetsPinned } from './chunk-
|
|
8
|
-
import { MIN_ENGINE_MAJOR } from './chunk-
|
|
9
|
-
import { CLAUDE_CODE_VERSION } from './chunk-
|
|
6
|
+
import './chunk-6QWV3YDJ.js';
|
|
7
|
+
import { detectMachine, supportsContainerBuilds, describeMachineDocker, reachDockerStep, supportsMicroVmBuilds, microVmArchSupported, microVmAssetsPinned } from './chunk-AQ54MKSQ.js';
|
|
8
|
+
import { MIN_ENGINE_MAJOR } from './chunk-E4PIFIC3.js';
|
|
9
|
+
import { CLAUDE_CODE_VERSION } from './chunk-CEBIA5FD.js';
|
|
10
10
|
import './chunk-N5FOE5PS.js';
|
|
11
11
|
import './chunk-OGFGZQA3.js';
|
|
12
12
|
import { resolveDevcontainerCli } from './chunk-774HEQL6.js';
|
|
13
13
|
import { locateRecipe, assertBuildable, readRecipe, RecipeError } from './chunk-QOZKPLVJ.js';
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
16
|
-
import { getJson, WorkCommandError, signatureRefusalMessage } from './chunk-
|
|
14
|
+
import './chunk-ZOAEPWGL.js';
|
|
15
|
+
import './chunk-R7STSBLC.js';
|
|
16
|
+
import { getJson, WorkCommandError, signatureRefusalMessage } from './chunk-DGAIVMMN.js';
|
|
17
|
+
import './chunk-PUN7LMNS.js';
|
|
17
18
|
import './chunk-BFESLKPP.js';
|
|
18
|
-
import './chunk-
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
19
|
+
import './chunk-SSU747O6.js';
|
|
20
|
+
import './chunk-ZYHKJKSU.js';
|
|
21
|
+
import { compareVersions } from './chunk-D6FXM5OW.js';
|
|
22
|
+
import './chunk-USO2DKBD.js';
|
|
23
|
+
import './chunk-N6LURUEF.js';
|
|
24
|
+
import './chunk-YRYMNBGQ.js';
|
|
25
|
+
import { builtinKind } from './chunk-DTXOJDEH.js';
|
|
21
26
|
import { parseSize } from './chunk-F6GFZXZ3.js';
|
|
22
|
-
import './chunk-
|
|
27
|
+
import './chunk-OD2VTIHN.js';
|
|
28
|
+
import './chunk-HKMPVPO7.js';
|
|
23
29
|
import './chunk-WZBHBH3J.js';
|
|
24
|
-
import { defaultGitRunner } from './chunk-
|
|
25
|
-
import './chunk-WIOZAJ2W.js';
|
|
26
|
-
import './chunk-WO2BXCTQ.js';
|
|
27
|
-
import './chunk-EMY4I27X.js';
|
|
30
|
+
import { defaultGitRunner } from './chunk-5FWNEQNZ.js';
|
|
28
31
|
import './chunk-ZJSNLVCE.js';
|
|
32
|
+
import './chunk-ZZXLM64C.js';
|
|
33
|
+
import './chunk-VXLJORHL.js';
|
|
34
|
+
import './chunk-7ZR5UPMB.js';
|
|
29
35
|
import { defaultFetch } from './chunk-BCLJSQCV.js';
|
|
30
36
|
import './chunk-BOLTI6LR.js';
|
|
37
|
+
import './chunk-YNJEOGDL.js';
|
|
31
38
|
import './chunk-EABW6AJQ.js';
|
|
32
39
|
import './chunk-RA3O54FC.js';
|
|
33
40
|
import { loadHostKey } from './chunk-M5POMKKW.js';
|
|
@@ -46,8 +53,17 @@ createRequire(import.meta.url);
|
|
|
46
53
|
// src/runner/microvm/doctor.ts
|
|
47
54
|
var GIB = 1024 ** 3;
|
|
48
55
|
var gib = (bytes) => `${Number((bytes / GIB).toFixed(1))} GiB`;
|
|
49
|
-
function kvmCheck(machine) {
|
|
56
|
+
function kvmCheck(machine, service) {
|
|
50
57
|
const name = "KVM";
|
|
58
|
+
if (service?.hasKvmGroup !== void 0 && machine.kvm?.state !== "absent" && machine.kvm !== void 0) {
|
|
59
|
+
if (service.hasKvmGroup) return { name, status: "pass", detail: `the service ${service.unit} has the group that owns /dev/kvm, so each build runs in a microVM of its own` };
|
|
60
|
+
return {
|
|
61
|
+
name,
|
|
62
|
+
status: "fail",
|
|
63
|
+
detail: `the service ${service.unit} cannot open /dev/kvm: its main process is not in the kvm group, so every build fails at provision, even if this shell can open it`,
|
|
64
|
+
fix: `sudo usermod -aG ${machine.kvm.group ?? "kvm"} <the service's account>, then restart the service: sudo systemctl restart ${service.unit}. A service reads its groups only when it starts`
|
|
65
|
+
};
|
|
66
|
+
}
|
|
51
67
|
const kvm = machine.kvm;
|
|
52
68
|
if (kvm?.state === "usable") return { name, status: "pass", detail: "this user can open /dev/kvm, so each build runs in a microVM of its own" };
|
|
53
69
|
if (kvm?.state === "no-permission") {
|
|
@@ -88,6 +104,16 @@ function memoryCheck(input) {
|
|
|
88
104
|
fix: "lower runner.concurrency or runner.build.memory, or run the runner on a host with more memory"
|
|
89
105
|
};
|
|
90
106
|
}
|
|
107
|
+
function delegationCheck(service) {
|
|
108
|
+
const name = "MicroVM memory limit";
|
|
109
|
+
if (service.delegate !== false) return { name, status: "pass", detail: `the service ${service.unit} is delegated its cgroup, so each microVM build gets a memory limit of its own` };
|
|
110
|
+
return {
|
|
111
|
+
name,
|
|
112
|
+
status: "warn",
|
|
113
|
+
detail: `the service ${service.unit} does not set Delegate=yes, so microVM builds have no limit of their own: one build that uses too much memory can take the others with it`,
|
|
114
|
+
fix: "run `outerlayer runner install --service --replace` to write the unit this CLI generates, which sets Delegate=yes"
|
|
115
|
+
};
|
|
116
|
+
}
|
|
91
117
|
|
|
92
118
|
// src/runner/image/doctor.ts
|
|
93
119
|
var LATEST_URL = "https://registry.npmjs.org/@anthropic-ai/claude-code/latest";
|
|
@@ -419,11 +445,12 @@ async function runnerHostChecks(env) {
|
|
|
419
445
|
},
|
|
420
446
|
...env.hooks === void 0 ? [] : [isolationCheck(env.machine ?? detectMachine(), env.hooks)],
|
|
421
447
|
...env.hooks !== void 0 && builtinKind(env.hooks.provision) === "vm" ? [
|
|
422
|
-
kvmCheck(env.machine ?? detectMachine()),
|
|
448
|
+
kvmCheck(env.machine ?? detectMachine(), env.service),
|
|
449
|
+
...env.service === void 0 ? [] : [delegationCheck(env.service)],
|
|
423
450
|
...env.runner === void 0 ? [] : [memoryCheck({ concurrency: env.runner.concurrency, buildMemory: env.runner.buildMemory, hostMemory: env.hostMemory ?? totalmem() })]
|
|
424
451
|
] : [],
|
|
425
452
|
...env.runner?.minFreeDisk === void 0 ? [] : [freeDiskCheck(env.configPath, env.runner.minFreeDisk, env.freeBytes ?? freeBytes)],
|
|
426
|
-
...env.hooks !== void 0 && needsClaudeCredential(env.hooks) ? [claudeCredentialCheck(env.env ?? process.env, { shell: true })] : [],
|
|
453
|
+
...env.hooks !== void 0 && needsClaudeCredential(env.hooks) ? [claudeCredentialCheck(env.env ?? process.env, env.service === void 0 ? { shell: true } : { service: { unit: env.service.unit, variables: env.service.credentialVariables } })] : [],
|
|
427
454
|
...env.gateway === void 0 ? [] : [await hostKeyBindingCheck(env.configPath, env.gateway, env.fetchImpl ?? defaultFetch)],
|
|
428
455
|
...env.gateway === void 0 || env.hooks === void 0 || !["container", "vm"].includes(builtinKind(env.hooks.provision)) ? [] : [await controlPlaneAccessCheck({ ...env, gateway: env.gateway }, env.fetchImpl ?? defaultFetch)],
|
|
429
456
|
devcontainerRunnable() ? { name: "Devcontainer CLI", status: "pass", detail: "installed beside the outerlayer CLI" } : {
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { staleBuildRefusal, staleBuildWarning } from './chunk-
|
|
4
|
-
import {
|
|
5
|
-
import { launchRefusalForSession } from './chunk-BCJNHMZT.js';
|
|
3
|
+
import { staleBuildRefusal, staleBuildWarning, detectCi } from './chunk-6ZZHWY2Z.js';
|
|
4
|
+
import { launchRefusalForSession } from './chunk-HHJDN6AU.js';
|
|
6
5
|
import './chunk-TBT347UY.js';
|
|
7
6
|
import './chunk-F7CU5ABH.js';
|
|
8
7
|
import './chunk-BKO6JEZI.js';
|
|
8
|
+
import { autoConnect } from './chunk-PUN7LMNS.js';
|
|
9
9
|
import { detectActiveSession } from './chunk-BFESLKPP.js';
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
10
|
+
import './chunk-SSU747O6.js';
|
|
11
|
+
import { readEffectiveArtifactSpoolState, localArtifactIds, isArtifactTombstoned, artifactBlobsDir, appendArtifactRecord, artifactsSpoolPath, findPendingArtifactRecord, appendArtifactTombstone } from './chunk-ZYHKJKSU.js';
|
|
12
|
+
import { resolveRepoIdentity } from './chunk-D6FXM5OW.js';
|
|
13
|
+
import './chunk-USO2DKBD.js';
|
|
14
|
+
import './chunk-N6LURUEF.js';
|
|
12
15
|
import './chunk-YRYMNBGQ.js';
|
|
13
|
-
import './chunk-
|
|
16
|
+
import './chunk-GQD22KKN.js';
|
|
14
17
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
15
18
|
import './chunk-5QRP3MVS.js';
|
|
16
19
|
import './chunk-ZJSNLVCE.js';
|
|
17
20
|
import { defaultFetch } from './chunk-BCLJSQCV.js';
|
|
18
21
|
import { resolveGatewayCredentials, unauthorizedMessage } from './chunk-BOLTI6LR.js';
|
|
22
|
+
import { ARTIFACT_MAX_CAPTION_LENGTH, ArtifactCriterionIdSchema, ARTIFACT_MAX_FILENAME_LENGTH, mediaTypeForArtifactPath, inferArtifactKind, ARTIFACT_MAX_REPLACES_TARGETS, parseTestSelector, parseJunit, bindTests } from './chunk-YNJEOGDL.js';
|
|
19
23
|
import './chunk-EABW6AJQ.js';
|
|
20
24
|
import './chunk-M5POMKKW.js';
|
|
21
25
|
import './chunk-ZM2IMMYN.js';
|
|
22
|
-
import './chunk-
|
|
26
|
+
import './chunk-JPR2WHHF.js';
|
|
23
27
|
import './chunk-XCCLFVXM.js';
|
|
24
28
|
import './chunk-BJ3KTMDH.js';
|
|
25
29
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
@@ -320,6 +324,8 @@ async function runEmitArtifact(opts) {
|
|
|
320
324
|
"nothing to attach this to \u2014 no recorded session, no PR, and no git repo. Run inside a recorded Claude Code session, from a git checkout, in CI with PR context, or pass --pr <number>."
|
|
321
325
|
);
|
|
322
326
|
}
|
|
327
|
+
const noFactory = await autoConnect({ ...opts, home, env });
|
|
328
|
+
if (noFactory !== void 0) throw new EmitArtifactError(noFactory);
|
|
323
329
|
const resolved = resolveGatewayCredentials({ ...opts, home, env });
|
|
324
330
|
if (!resolved.ok) throw new EmitArtifactError(resolved.message);
|
|
325
331
|
const { url, credential: apiKey, appId } = resolved;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { EmitError, runEmit } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
3
|
+
export { EmitError, runEmit } from './chunk-EV3M3EH7.js';
|
|
4
|
+
import './chunk-VXLJORHL.js';
|
|
5
|
+
import './chunk-7ZR5UPMB.js';
|
|
6
|
+
import './chunk-YNJEOGDL.js';
|
|
6
7
|
import './chunk-RA3O54FC.js';
|
|
7
8
|
import './chunk-Z5GEFMRW.js';
|
|
8
9
|
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { launchRefusalForSession } from './chunk-
|
|
3
|
+
import { launchRefusalForSession } from './chunk-HHJDN6AU.js';
|
|
4
|
+
import { autoConnect } from './chunk-PUN7LMNS.js';
|
|
4
5
|
import { detectActiveSession } from './chunk-BFESLKPP.js';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
6
|
+
import './chunk-SSU747O6.js';
|
|
7
|
+
import './chunk-ZYHKJKSU.js';
|
|
8
|
+
import { resolveRepoIdentity } from './chunk-D6FXM5OW.js';
|
|
9
|
+
import './chunk-USO2DKBD.js';
|
|
10
|
+
import './chunk-N6LURUEF.js';
|
|
11
|
+
import './chunk-YRYMNBGQ.js';
|
|
12
|
+
import { launchedItemForSession } from './chunk-GQD22KKN.js';
|
|
7
13
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
8
14
|
import { defaultFetch } from './chunk-BCLJSQCV.js';
|
|
9
15
|
import { resolveGatewayCredentials, unauthorizedMessage } from './chunk-BOLTI6LR.js';
|
|
16
|
+
import { CriteriaListSchema } from './chunk-YNJEOGDL.js';
|
|
10
17
|
import './chunk-EABW6AJQ.js';
|
|
11
18
|
import './chunk-M5POMKKW.js';
|
|
12
19
|
import './chunk-ZM2IMMYN.js';
|
|
@@ -120,6 +127,8 @@ async function runEmitCriteria(opts) {
|
|
|
120
127
|
nowMs: now().getTime()
|
|
121
128
|
});
|
|
122
129
|
const target = resolveTarget({ item: opts.item, sessionId, home });
|
|
130
|
+
const refusal = await autoConnect({ url: opts.url, apiKey: opts.apiKey, appId: opts.appId, cwd, home, env, fetchImpl: opts.fetchImpl });
|
|
131
|
+
if (refusal !== void 0) throw new EmitCriteriaError(refusal);
|
|
123
132
|
const resolved = resolveGatewayCredentials({ url: opts.url, apiKey: opts.apiKey, appId: opts.appId, cwd, home, env });
|
|
124
133
|
if (!resolved.ok) throw new EmitCriteriaError(resolved.message);
|
|
125
134
|
const { url, credential: apiKey, appId } = resolved;
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { launchRefusalForSession } from './chunk-
|
|
3
|
+
import { launchRefusalForSession } from './chunk-HHJDN6AU.js';
|
|
4
|
+
import { autoConnect } from './chunk-PUN7LMNS.js';
|
|
4
5
|
import { detectActiveSession } from './chunk-BFESLKPP.js';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
6
|
+
import './chunk-SSU747O6.js';
|
|
7
|
+
import './chunk-ZYHKJKSU.js';
|
|
8
|
+
import { resolveRepoIdentity } from './chunk-D6FXM5OW.js';
|
|
9
|
+
import './chunk-USO2DKBD.js';
|
|
10
|
+
import './chunk-N6LURUEF.js';
|
|
11
|
+
import './chunk-YRYMNBGQ.js';
|
|
12
|
+
import { launchedItemForSession } from './chunk-GQD22KKN.js';
|
|
7
13
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
8
14
|
import { readLatestProvenanceForSession } from './chunk-ZJSNLVCE.js';
|
|
9
15
|
import { defaultFetch } from './chunk-BCLJSQCV.js';
|
|
10
16
|
import { resolveGatewayCredentials, unauthorizedMessage } from './chunk-BOLTI6LR.js';
|
|
17
|
+
import { FindingBatchSchema } from './chunk-YNJEOGDL.js';
|
|
11
18
|
import './chunk-EABW6AJQ.js';
|
|
12
19
|
import './chunk-M5POMKKW.js';
|
|
13
20
|
import './chunk-ZM2IMMYN.js';
|
|
@@ -117,6 +124,8 @@ function resolveUploadTarget(opts) {
|
|
|
117
124
|
return { item: { number: launchedNumber }, sessionId };
|
|
118
125
|
}
|
|
119
126
|
async function upload(batch, target, opts) {
|
|
127
|
+
const refusal = await autoConnect(opts);
|
|
128
|
+
if (refusal !== void 0) throw new EmitFindingError(refusal);
|
|
120
129
|
const resolved = resolveGatewayCredentials(opts);
|
|
121
130
|
if (!resolved.ok) throw new EmitFindingError(resolved.message);
|
|
122
131
|
const { url, credential: apiKey, appId } = resolved;
|
|
@@ -187,6 +196,7 @@ async function runEmitFinding(opts) {
|
|
|
187
196
|
url: opts.url,
|
|
188
197
|
apiKey: opts.apiKey,
|
|
189
198
|
appId: opts.appId,
|
|
199
|
+
cwd,
|
|
190
200
|
quiet: opts.quiet,
|
|
191
201
|
home,
|
|
192
202
|
env,
|
|
@@ -230,6 +240,7 @@ async function runEmitFindings(opts) {
|
|
|
230
240
|
url: opts.url,
|
|
231
241
|
apiKey: opts.apiKey,
|
|
232
242
|
appId: opts.appId,
|
|
243
|
+
cwd,
|
|
233
244
|
quiet: opts.quiet,
|
|
234
245
|
home,
|
|
235
246
|
env,
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import {
|
|
5
|
-
import { launchRefusalForSession } from './chunk-BCJNHMZT.js';
|
|
3
|
+
import { detectCi } from './chunk-6ZZHWY2Z.js';
|
|
4
|
+
import { launchRefusalForSession } from './chunk-HHJDN6AU.js';
|
|
6
5
|
import './chunk-TBT347UY.js';
|
|
7
6
|
import './chunk-F7CU5ABH.js';
|
|
8
7
|
import './chunk-BKO6JEZI.js';
|
|
8
|
+
import { autoConnect } from './chunk-PUN7LMNS.js';
|
|
9
9
|
import { detectActiveSession } from './chunk-BFESLKPP.js';
|
|
10
|
-
import './chunk-
|
|
11
|
-
import
|
|
10
|
+
import './chunk-SSU747O6.js';
|
|
11
|
+
import './chunk-ZYHKJKSU.js';
|
|
12
|
+
import { resolveRepoIdentity } from './chunk-D6FXM5OW.js';
|
|
13
|
+
import './chunk-USO2DKBD.js';
|
|
14
|
+
import './chunk-N6LURUEF.js';
|
|
12
15
|
import './chunk-YRYMNBGQ.js';
|
|
13
|
-
import './chunk-
|
|
16
|
+
import './chunk-GQD22KKN.js';
|
|
14
17
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
15
18
|
import './chunk-5QRP3MVS.js';
|
|
16
19
|
import './chunk-ZJSNLVCE.js';
|
|
17
20
|
import { defaultFetch } from './chunk-BCLJSQCV.js';
|
|
18
21
|
import { resolveGatewayCredentials, unauthorizedMessage } from './chunk-BOLTI6LR.js';
|
|
22
|
+
import { EmittedNameSchema, EMITTED_RESULT_MAX_LINK_LENGTH, EMITTED_RESULTS, EMITTED_RESULT_MAX_BODY_LENGTH } from './chunk-YNJEOGDL.js';
|
|
19
23
|
import './chunk-EABW6AJQ.js';
|
|
20
24
|
import './chunk-M5POMKKW.js';
|
|
21
25
|
import './chunk-ZM2IMMYN.js';
|
|
22
|
-
import './chunk-
|
|
26
|
+
import './chunk-JPR2WHHF.js';
|
|
23
27
|
import './chunk-XCCLFVXM.js';
|
|
24
28
|
import './chunk-BJ3KTMDH.js';
|
|
25
29
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
@@ -128,14 +132,16 @@ async function runEmitResult(opts) {
|
|
|
128
132
|
);
|
|
129
133
|
}
|
|
130
134
|
if (sessionId !== void 0) {
|
|
131
|
-
const
|
|
132
|
-
if (
|
|
135
|
+
const refusal2 = launchRefusalForSession(sessionId, home);
|
|
136
|
+
if (refusal2 !== void 0) throw new EmitResultError(refusal2);
|
|
133
137
|
}
|
|
134
138
|
if (item === void 0) {
|
|
135
139
|
throw new EmitResultError(
|
|
136
140
|
"nothing to attach this to \u2014 no work item. Pass --item <number>; a recorded session alone does not name one."
|
|
137
141
|
);
|
|
138
142
|
}
|
|
143
|
+
const refusal = await autoConnect({ ...opts, home, env });
|
|
144
|
+
if (refusal !== void 0) throw new EmitResultError(refusal);
|
|
139
145
|
const resolved = resolveGatewayCredentials({ ...opts, home, env });
|
|
140
146
|
if (!resolved.ok) throw new EmitResultError(resolved.message);
|
|
141
147
|
const { url, credential: apiKey, appId } = resolved;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { CAPTURE_LIMIT_BYTES, ExecConnectionError, HANDSHAKE_TIMEOUT_MS, execCapture, runExec, runVmExec, vmExecArgs, waitForAgent } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
3
|
+
export { CAPTURE_LIMIT_BYTES, ExecConnectionError, HANDSHAKE_TIMEOUT_MS, execCapture, runExec, runVmExec, vmExecArgs, waitForAgent } from './chunk-ZOAEPWGL.js';
|
|
4
|
+
import './chunk-R7STSBLC.js';
|
|
5
|
+
import './chunk-OD2VTIHN.js';
|
|
6
|
+
import './chunk-HKMPVPO7.js';
|
|
6
7
|
import './chunk-Z5GEFMRW.js';
|
|
7
8
|
|
|
8
9
|
createRequire(import.meta.url);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { DOCKERD_LOG, HELPER_PATH, realGuestHost, relayPortsFrom, runGuestInit } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
3
|
+
export { DOCKERD_LOG, HELPER_PATH, realGuestHost, relayPortsFrom, runGuestInit } from './chunk-WVGSB3Z2.js';
|
|
4
|
+
import './chunk-R7STSBLC.js';
|
|
5
|
+
import './chunk-OD2VTIHN.js';
|
|
6
|
+
import './chunk-HKMPVPO7.js';
|
|
6
7
|
import './chunk-Z5GEFMRW.js';
|
|
7
8
|
|
|
8
9
|
createRequire(import.meta.url);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { AUTO_SYNC_DEBOUNCE_MS, WORK_LEASE_RENEW_DEBOUNCE_MS, WORK_LINK_RETRIES, contextPossiblyGoverned, handleWorkLaunch, handleWorkSessionEnd, hookFiredMarkerPath, maybeAutoSync, maybeRenewWorkLease, runHookFast, spoolDir } from './chunk-
|
|
3
|
+
export { AUTO_SYNC_DEBOUNCE_MS, WORK_LEASE_RENEW_DEBOUNCE_MS, WORK_LINK_RETRIES, contextPossiblyGoverned, handleWorkLaunch, handleWorkSessionEnd, hookFiredMarkerPath, logHookError, maybeAutoSync, maybeRenewWorkLease, recordLinkExitFailure, runHookFast, spoolDir } from './chunk-JPR2WHHF.js';
|
|
4
4
|
import './chunk-XCCLFVXM.js';
|
|
5
5
|
import './chunk-BJ3KTMDH.js';
|
|
6
6
|
import './chunk-VNVZDWO3.js';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { loadMaintainedFiles, writeMaintainedFiles } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import { loadMaintainedFiles, writeMaintainedFiles } from './chunk-VXLJORHL.js';
|
|
4
|
+
import './chunk-7ZR5UPMB.js';
|
|
5
|
+
import './chunk-YNJEOGDL.js';
|
|
5
6
|
import './chunk-RA3O54FC.js';
|
|
6
7
|
import './chunk-Z5GEFMRW.js';
|
|
7
8
|
import { statSync, existsSync, readFileSync, writeFileSync } from 'fs';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { normalizePath } from './chunk-
|
|
3
|
+
import { normalizePath } from './chunk-7ZR5UPMB.js';
|
|
4
|
+
import './chunk-YNJEOGDL.js';
|
|
4
5
|
import './chunk-Z5GEFMRW.js';
|
|
5
6
|
import { existsSync, readdirSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
|
|
6
7
|
import { join, dirname } from 'path';
|