@outerlayer/cli 0.38.0-next.20261110130701 → 0.38.0-next.20261110212358
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/dist/build-info.json +1 -1
- package/dist/{check-SJCTNS7N.js → check-3XHEVEXS.js} +5 -5
- package/dist/{chunk-XFODM3V7.js → chunk-25G5KXBE.js} +1 -1
- package/dist/{chunk-3W5JLANR.js → chunk-67BVM7JK.js} +1 -1
- package/dist/{chunk-AS4NMHJM.js → chunk-E27XMQKR.js} +1 -1
- package/dist/{chunk-HJK2KI3Q.js → chunk-HMDEF3UT.js} +1 -1
- package/dist/{chunk-WVMKXDOW.js → chunk-I64CTY4U.js} +22 -4
- package/dist/{chunk-QNHBJU74.js → chunk-KGHYNTF6.js} +2 -2
- package/dist/{chunk-SKGUS2CB.js → chunk-S56J4BMQ.js} +7 -7
- package/dist/{chunk-4EJHQYVI.js → chunk-VNHDMOZW.js} +8 -7
- package/dist/{chunk-TUEEGFAQ.js → chunk-VQQF6MDT.js} +1 -1
- package/dist/{cli-R5SJT3YL.js → cli-PS6GSOAE.js} +37 -27
- package/dist/{command-LWMX6I7W.js → command-XQPL75PX.js} +2 -2
- package/dist/{container-start-VQR5ERZE.js → container-start-M7SFF62T.js} +3 -3
- package/dist/{demo-voice-cmd-PGM5JPCQ.js → demo-voice-cmd-TQP3PZE2.js} +1 -1
- package/dist/{doctor-3QJLCHQY.js → doctor-Z3U3ICVR.js} +3 -3
- package/dist/{emit-demo-cmd-NOSQTOES.js → emit-demo-cmd-R3TIGMFX.js} +1 -1
- package/dist/{host-checks-EHSA6FLE.js → host-checks-QLGWXKOC.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{init-F7NB7GBW.js → init-JY3XYZI6.js} +1 -1
- package/dist/{init-ETG7XYFQ.js → init-NRN2DQC3.js} +1 -1
- package/dist/{init-agent-WEYGBAII.js → init-agent-GDOZHPQH.js} +1 -1
- package/dist/{init-cmd-KGM7TN6Z.js → init-cmd-QJYX47LS.js} +1 -1
- package/dist/{loop-K3QREUHK.js → loop-HWYHQ374.js} +5 -5
- package/dist/{machine-5GTYN2LP.js → machine-NVXRV4BO.js} +1 -1
- package/dist/{runner-key-3AHJX75Z.js → runner-key-W5M6AYY5.js} +1 -1
- package/dist/{status-GZ7KAIMH.js → status-L7R6FKWD.js} +1 -1
- package/dist/{update-steps-XY46I7FV.js → update-steps-6SPAPBAB.js} +2 -2
- package/dist/{work-proofs-cmd-T5WZG3CX.js → work-proofs-cmd-7HSLB52S.js} +1 -1
- package/dist/{work-proofs-record-6YF4BS3K.js → work-proofs-record-BE6UMZPH.js} +96 -16
- package/package.json +1 -1
- package/skill-pack/maintained/outerlayer-build/SKILL.md +13 -4
- package/skill-pack/maintained/outerlayer-build/references/agent-briefs.md +10 -8
- package/skill-pack/maintained/outerlayer-build/references/evidence.md +33 -23
- package/skill-pack/maintained/outerlayer-build/references/release.md +2 -2
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"2026-11-
|
|
1
|
+
{"id":"2026-11-10T21:30:48.557Z","root":"/home/runner/work/outerlayer/outerlayer","pkg":"outerlayer"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { probeCredentials } from './chunk-
|
|
3
|
+
import { probeCredentials } from './chunk-VNHDMOZW.js';
|
|
4
4
|
import './chunk-3JVYMD4G.js';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-25G5KXBE.js';
|
|
6
6
|
import './chunk-E7R2GIAW.js';
|
|
7
7
|
import './chunk-EHPKACA7.js';
|
|
8
8
|
import './chunk-HDEYRLWK.js';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-67BVM7JK.js';
|
|
10
10
|
import './chunk-YZQYTOCR.js';
|
|
11
|
-
import { fleetConfigProblem, managedProblems, managedFactsOf, askFleetMachine } from './chunk-
|
|
11
|
+
import { fleetConfigProblem, managedProblems, managedFactsOf, askFleetMachine } from './chunk-VQQF6MDT.js';
|
|
12
12
|
import './chunk-5QFFQCSY.js';
|
|
13
13
|
import { findServiceUnit } from './chunk-3GTAPQBG.js';
|
|
14
|
-
import { placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, HELPER_ENV, helperSocketPath, probeHelper, needsAgentCredential, agentCredentialCheck, claimPermissionProblem, formerSkillQueues, modellessQueues, formerSkillProblem, modellessProblem } from './chunk-
|
|
14
|
+
import { placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, HELPER_ENV, helperSocketPath, probeHelper, needsAgentCredential, agentCredentialCheck, claimPermissionProblem, formerSkillQueues, modellessQueues, formerSkillProblem, modellessProblem } from './chunk-I64CTY4U.js';
|
|
15
15
|
import './chunk-BCQFMAGM.js';
|
|
16
16
|
import './chunk-6XMC6R4W.js';
|
|
17
17
|
import './chunk-2PGI6RDE.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { scrubReason, stripTerminalControls } from './chunk-
|
|
3
|
+
import { scrubReason, stripTerminalControls } from './chunk-I64CTY4U.js';
|
|
4
4
|
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-DKDBMMX7.js';
|
|
5
5
|
import { RunnerAlreadyRunningError, readPidFile } from './chunk-OI4ZV7MJ.js';
|
|
6
6
|
import { isSameProcess } from './chunk-JBJTC3UU.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { stripTerminalControls } from './chunk-
|
|
3
|
+
import { stripTerminalControls } from './chunk-I64CTY4U.js';
|
|
4
4
|
import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-2WNJ2MHD.js';
|
|
5
5
|
import { readFileSync } from 'fs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { helperSocketPath } from './chunk-
|
|
3
|
+
import { helperSocketPath } from './chunk-I64CTY4U.js';
|
|
4
4
|
import { UNIT_MARKER } from './chunk-DKDBMMX7.js';
|
|
5
5
|
import { runnerDir } from './chunk-AC6DM3S3.js';
|
|
6
6
|
import { createHash } from 'crypto';
|
|
@@ -1080,7 +1080,7 @@ async function gatherDoctorChecks(options = {}) {
|
|
|
1080
1080
|
const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
|
|
1081
1081
|
checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
|
|
1082
1082
|
} else if (hasRunnerBlock(configPath)) {
|
|
1083
|
-
const { runnerHostChecks } = await import('./doctor-
|
|
1083
|
+
const { runnerHostChecks } = await import('./doctor-Z3U3ICVR.js');
|
|
1084
1084
|
const gateway = (() => {
|
|
1085
1085
|
try {
|
|
1086
1086
|
const loaded = loadRunnerConfig(configPath);
|
|
@@ -5553,6 +5553,16 @@ function microVmCommandLine(input) {
|
|
|
5553
5553
|
const { options, env } = vmExecFor(input, ["/bin/sh", "-c", commandWithShim(input.job, input.cmdline)]);
|
|
5554
5554
|
return { line: [process.execPath, input.cli, "vm-exec", ...vmExecArgs(options)].map(shellQuote).join(" "), options, env };
|
|
5555
5555
|
}
|
|
5556
|
+
async function clearMicroVmCommandDir(runtime, state, commandDir) {
|
|
5557
|
+
const files = ["exit-code", "command.pid", "command.log"].map((name) => shellQuote(`${commandDir}/${name}`)).join(" ");
|
|
5558
|
+
const cleared = await withinTime(
|
|
5559
|
+
(signal) => runtime.vm.exec(state.vsockPath, { argv: ["/bin/sh", "-c", `rm -f ${files}`], user: state.agentUser ?? ADDED_USER, cwd: "/", env: { PATH: GUEST_PATH2 } }, { signal })
|
|
5560
|
+
);
|
|
5561
|
+
if (cleared.status !== 0) {
|
|
5562
|
+
const said2 = firstLine(cleared.stderr);
|
|
5563
|
+
throw new Error(`the files an earlier command left in ${commandDir} could not be removed: exit ${cleared.status}${said2 === "" ? "" : `: ${said2}`}`);
|
|
5564
|
+
}
|
|
5565
|
+
}
|
|
5556
5566
|
async function startMicroVmCommand(input) {
|
|
5557
5567
|
const state = input.job.microvm;
|
|
5558
5568
|
const env = withExtraEnv(buildEnvironment({
|
|
@@ -5576,12 +5586,14 @@ async function startMicroVmCommand(input) {
|
|
|
5576
5586
|
proxiedEnvironment: proxiedEnvironment(input.jobDir),
|
|
5577
5587
|
trustEnvironment: trustEnvironment(input.jobDir)
|
|
5578
5588
|
}), input.extraEnv);
|
|
5589
|
+
const commandDir = state.commandDir ?? MICROVM_COMMAND_DIR;
|
|
5590
|
+
await clearMicroVmCommandDir(input.runtime, state, commandDir);
|
|
5579
5591
|
const started = await input.runtime.vm.exec(state.vsockPath, {
|
|
5580
5592
|
argv: ["/bin/sh", "-c", commandWithShim(input.job, input.cmdline)],
|
|
5581
5593
|
user: state.agentUser ?? ADDED_USER,
|
|
5582
5594
|
cwd: CHECKOUT_DIR,
|
|
5583
5595
|
env: execEnvironment(state.imageEnv, env),
|
|
5584
|
-
detach:
|
|
5596
|
+
detach: commandDir
|
|
5585
5597
|
});
|
|
5586
5598
|
if (started.status !== 0) {
|
|
5587
5599
|
const said2 = firstLine(started.stderr);
|
|
@@ -8865,6 +8877,7 @@ async function renewLease(config, item, fetchImpl) {
|
|
|
8865
8877
|
}
|
|
8866
8878
|
}
|
|
8867
8879
|
var ALREADY_RELEASED = "already released";
|
|
8880
|
+
var CLAIM_NOT_NEWEST = "claim_not_newest";
|
|
8868
8881
|
async function releaseLease(config, item, outcome, detail, fetchImpl) {
|
|
8869
8882
|
const send = async (environment2, sent2, log2, resume2, disk2) => postJson(
|
|
8870
8883
|
config.url,
|
|
@@ -9466,10 +9479,11 @@ async function finishJob(job, jobDirPath, outcome, config, deps, ending) {
|
|
|
9466
9479
|
}
|
|
9467
9480
|
dropManagedBuildSettings(jobDirPath);
|
|
9468
9481
|
const alreadyReleased = release.ok && wasAlreadyReleased(release.value, outcome, sentAtMs);
|
|
9482
|
+
const superseded = !release.ok && release.code === CLAIM_NOT_NEWEST;
|
|
9469
9483
|
const endedAt = now();
|
|
9470
9484
|
job.outcome = outcome;
|
|
9471
9485
|
job.endedAt = endedAt.toISOString();
|
|
9472
|
-
job.releaseFailed = release.ok ? alreadyReleased ? ALREADY_RELEASED : void 0 : release.reason;
|
|
9486
|
+
job.releaseFailed = release.ok ? alreadyReleased ? ALREADY_RELEASED : void 0 : superseded ? void 0 : release.reason;
|
|
9473
9487
|
writeJobFile(jobFilePath, job);
|
|
9474
9488
|
deps.attemptLogs?.close(job.item, itemScope(job));
|
|
9475
9489
|
const total = formatDuration(endedAt.getTime() - new Date(job.startedAt).getTime());
|
|
@@ -9477,6 +9491,8 @@ async function finishJob(job, jobDirPath, outcome, config, deps, ending) {
|
|
|
9477
9491
|
log.line(
|
|
9478
9492
|
`${tag} lease was already released (outcome ${release.ok ? release.value.outcome ?? "none" : "unknown"}) \xB7 this attempt ended as ${outcome ?? "not attempted"}`
|
|
9479
9493
|
);
|
|
9494
|
+
} else if (superseded) {
|
|
9495
|
+
log.line(`${tag} not released: its lease lapsed and a newer lease holds the item \xB7 this attempt ended as ${outcome ?? "not attempted"}`);
|
|
9480
9496
|
} else if (release.ok) {
|
|
9481
9497
|
log.line(
|
|
9482
9498
|
outcome === void 0 ? `${tag} released \xB7 not attempted (provision exit 75) \xB7 ${total}` : `${tag} released \xB7 outcome ${outcome} \xB7 ${total}${egressText(tunnelRecord)}`
|
|
@@ -9492,7 +9508,7 @@ async function sendRelease(config, job, outcome, detail, fetchImpl) {
|
|
|
9492
9508
|
await releaseRun(claimCalls(config, job), String(job.item), outcome, fetchImpl);
|
|
9493
9509
|
return {};
|
|
9494
9510
|
}
|
|
9495
|
-
return releaseLease(claimCalls(config, job), claimItem(config, job), outcome, detail, fetchImpl);
|
|
9511
|
+
return releaseLease(claimCalls(config, job), claimItem(config, job), outcome, { ...detail, claimId: job.claimId }, fetchImpl);
|
|
9496
9512
|
}
|
|
9497
9513
|
function egressText(record) {
|
|
9498
9514
|
if (record === void 0) return "";
|
|
@@ -9547,7 +9563,9 @@ async function retryFailedReleases(jobsDirPath, config, deps) {
|
|
|
9547
9563
|
job.releaseFailed = release.reason;
|
|
9548
9564
|
writeJobFile(jobFilePath, job);
|
|
9549
9565
|
}
|
|
9550
|
-
results.push(
|
|
9566
|
+
results.push(
|
|
9567
|
+
release.ok ? { job, released: true } : { job, released: false, reason: release.code === CLAIM_NOT_NEWEST ? "its lease lapsed and a newer lease holds the item" : release.reason, final: !release.retryable }
|
|
9568
|
+
);
|
|
9551
9569
|
}
|
|
9552
9570
|
return results;
|
|
9553
9571
|
}
|
|
@@ -14,7 +14,7 @@ import { resolveRepoIdentity } from './chunk-MBPBYMHU.js';
|
|
|
14
14
|
import { ARTIFACT_MAX_BYTES, ARTIFACT_MAX_CAPTION_LENGTH, DEMO_RECORD_MEDIA_TYPE, ARTIFACT_MAX_REPLACES_TARGETS, DEMO_MANIFEST_LATEST_VERSION, DemoManifestSchema, ARTIFACT_KINDS } from './chunk-FXVHF6RX.js';
|
|
15
15
|
import { __commonJS, __require, __toESM } from './chunk-Z5GEFMRW.js';
|
|
16
16
|
import { createHash } from 'crypto';
|
|
17
|
-
import { mkdtempSync, writeFileSync, statSync,
|
|
17
|
+
import { readFileSync, mkdtempSync, writeFileSync, statSync, rmSync, mkdirSync, existsSync, copyFileSync, accessSync, constants, realpathSync, createReadStream, createWriteStream } from 'fs';
|
|
18
18
|
import { tmpdir } from 'os';
|
|
19
19
|
import { resolve, dirname, join, relative, sep, isAbsolute, delimiter, normalize } from 'path';
|
|
20
20
|
import { execFileSync, spawn } from 'child_process';
|
|
@@ -3706,4 +3706,4 @@ async function renderOnly(params) {
|
|
|
3706
3706
|
}
|
|
3707
3707
|
}
|
|
3708
3708
|
|
|
3709
|
-
export { EmitDemoError, realSpeaker, runEmitDemo };
|
|
3709
|
+
export { EmitDemoError, chapterPassed, planScreenshots, readStill, realSpeaker, runEmitDemo };
|
|
@@ -129,14 +129,14 @@ function governingDir(cwd) {
|
|
|
129
129
|
async function testProofMode(cwd) {
|
|
130
130
|
const dir = governingDir(cwd);
|
|
131
131
|
if (dir === void 0) return "any";
|
|
132
|
-
const { testProofIn } = await import('./host-checks-
|
|
132
|
+
const { testProofIn } = await import('./host-checks-QLGWXKOC.js');
|
|
133
133
|
return testProofIn(dir);
|
|
134
134
|
}
|
|
135
135
|
async function judgeCheckName(cwd) {
|
|
136
136
|
const dir = governingDir(cwd);
|
|
137
137
|
if (dir === void 0) return {};
|
|
138
138
|
if (!existsSync(dir)) return { note: `the governed context at ${dir} is not readable` };
|
|
139
|
-
const { checksIn, isJudgeCheck } = await import('./host-checks-
|
|
139
|
+
const { checksIn, isJudgeCheck } = await import('./host-checks-QLGWXKOC.js');
|
|
140
140
|
const quiet = { line: () => void 0, error: () => void 0 };
|
|
141
141
|
const check = checksIn(dir, quiet, "").checks.find((c) => isJudgeCheck(c) && c.judge.subjects === "criteria");
|
|
142
142
|
return check === void 0 ? {} : { name: check.name };
|
|
@@ -301,7 +301,7 @@ function classifyProofsAt(data, heads, listing = {}) {
|
|
|
301
301
|
return entries;
|
|
302
302
|
}
|
|
303
303
|
var STATE_LABEL = { current: "current", "out-of-date": "out of date", missing: "missing" };
|
|
304
|
-
function
|
|
304
|
+
function renderProofRow(e) {
|
|
305
305
|
const id = sanitizeTerminal(e.id);
|
|
306
306
|
if (e.state === "failed") {
|
|
307
307
|
return `${id} none failed ${sanitizeTerminal(e.commit)} The judge failed it: ${sanitizeTerminal(e.reason)} No test file has changed since. Add or change a test that proves ${id}.`;
|
|
@@ -314,7 +314,7 @@ function renderEntry(e) {
|
|
|
314
314
|
function render(entries, notes, json, tests) {
|
|
315
315
|
if (json) return JSON.stringify(entries);
|
|
316
316
|
const none = tests ? "No criterion declares a proof." : "No criterion declares a proof other than test.";
|
|
317
|
-
const lines = entries.length === 0 ? [none] : entries.map(
|
|
317
|
+
const lines = entries.length === 0 ? [none] : entries.map(renderProofRow);
|
|
318
318
|
if (notes.length > 0) lines.push(`The command could not check the judge's results: ${notes.map(sanitizeTerminal).join("; ")}.`);
|
|
319
319
|
return lines.join("\n");
|
|
320
320
|
}
|
|
@@ -371,8 +371,8 @@ async function runWorkProofs(opts) {
|
|
|
371
371
|
}
|
|
372
372
|
async function runWorkProofsCommand(opts) {
|
|
373
373
|
try {
|
|
374
|
-
if (opts.record) {
|
|
375
|
-
const { runWorkProofsRecord } = await import('./work-proofs-record-
|
|
374
|
+
if (opts.record || opts.check) {
|
|
375
|
+
const { runWorkProofsRecord } = await import('./work-proofs-record-BE6UMZPH.js');
|
|
376
376
|
const result2 = await runWorkProofsRecord(opts);
|
|
377
377
|
process.exitCode = result2.exitCode;
|
|
378
378
|
return;
|
|
@@ -390,4 +390,4 @@ async function runWorkProofsCommand(opts) {
|
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
392
|
|
|
393
|
-
export { classifyProofs, classifyProofsAt, freshXmlFiles, joinResults, kindProblem, otherPullRequestHeads, ownPullRequest, proofsCommentBody, proofsCommentId, resolveProofsItem, runWorkProofs, runWorkProofsCommand, testFilesOf, testProofMode, testSelectors };
|
|
393
|
+
export { classifyProofs, classifyProofsAt, freshXmlFiles, joinResults, kindProblem, otherPullRequestHeads, ownPullRequest, proofsCommentBody, proofsCommentId, renderProofRow, resolveProofsItem, runWorkProofs, runWorkProofsCommand, testFilesOf, testProofMode, testSelectors };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
|
|
4
|
-
import { reportFailedStart, fitImageBuildMemory } from './chunk-
|
|
4
|
+
import { reportFailedStart, fitImageBuildMemory } from './chunk-25G5KXBE.js';
|
|
5
5
|
import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-E7R2GIAW.js';
|
|
6
6
|
import { writeFleetState } from './chunk-EHPKACA7.js';
|
|
7
7
|
import { writePendingUpdate } from './chunk-HDEYRLWK.js';
|
|
8
|
-
import { renderUpdateSteps } from './chunk-
|
|
8
|
+
import { renderUpdateSteps } from './chunk-67BVM7JK.js';
|
|
9
9
|
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-YZQYTOCR.js';
|
|
10
|
-
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-
|
|
10
|
+
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-VQQF6MDT.js';
|
|
11
11
|
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-5QFFQCSY.js';
|
|
12
|
-
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, itemTag, releaseLease, runIsolation, runCommandOf, claimRun, LEASE_SECONDS, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, recordsProofsOnly, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, setStage, jobEnv, runHook, describeHookEnd, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionSandbox, deliverSandboxHooks, provisionMicroVm, deliverCommitHooks, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, keptCommitsLine, currentSkillCommand, formerSkillProblem, commandLogOffset, startSandboxCommand, MICROVM_COMMAND_DIR, startMicroVmCommand, microVmCommandLine, runCommand, containerCommandExec, execCommandLine, startSender, startHostServices, finishJob, sampleGuest, foldSample, isSandboxTracked, isContainerTracked, isMicroVmTracked, probeSandboxCommand, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, SandboxGoneError, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isIsolatedJob, isTimedOut, readCpuUsec, isIdle, HELPER_ENV, setUpRunnerCgroup, stopOrphanedMicroVms, unfinishedJobs, sweepImageBuilders, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, vmAlive, filesAreCopied, listItemDisks, usableCpus, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewRun, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, sweepSandboxes, parseCpuList, ensureTunnel, keepGhConfigCurrent, restartSender, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, shellQuote, deliverJobFiles, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, writeGuestGhConfig, inTeardown } from './chunk-
|
|
12
|
+
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, itemTag, releaseLease, runIsolation, runCommandOf, claimRun, LEASE_SECONDS, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, recordsProofsOnly, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, setStage, jobEnv, runHook, describeHookEnd, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionSandbox, deliverSandboxHooks, provisionMicroVm, deliverCommitHooks, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, keptCommitsLine, currentSkillCommand, formerSkillProblem, commandLogOffset, startSandboxCommand, MICROVM_COMMAND_DIR, startMicroVmCommand, microVmCommandLine, runCommand, containerCommandExec, execCommandLine, startSender, startHostServices, finishJob, sampleGuest, foldSample, isSandboxTracked, isContainerTracked, isMicroVmTracked, probeSandboxCommand, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, SandboxGoneError, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isIsolatedJob, isTimedOut, readCpuUsec, isIdle, HELPER_ENV, setUpRunnerCgroup, stopOrphanedMicroVms, unfinishedJobs, sweepImageBuilders, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, vmAlive, filesAreCopied, listItemDisks, usableCpus, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewRun, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, sweepSandboxes, parseCpuList, ensureTunnel, keepGhConfigCurrent, restartSender, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, shellQuote, deliverJobFiles, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, writeGuestGhConfig, inTeardown } from './chunk-I64CTY4U.js';
|
|
13
13
|
import { RUNNER_PROTOCOL } from './chunk-6XMC6R4W.js';
|
|
14
14
|
import { RUNNER_RESERVE_BYTES } from './chunk-DKDBMMX7.js';
|
|
15
15
|
import { RepoFilter } from './chunk-CXXQQST7.js';
|
|
@@ -3977,7 +3977,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
3977
3977
|
check: update.check ? () => update.check(configPath) : async () => {
|
|
3978
3978
|
const held = runnerAgents(deps.agents).flatMap((agent) => heldAgentCredential(agent.descriptor.id) ?? []);
|
|
3979
3979
|
const env = { ...process.env, ...Object.fromEntries(held.map((credential) => [credential.variable, credential.value])) };
|
|
3980
|
-
return (await import('./check-
|
|
3980
|
+
return (await import('./check-3XHEVEXS.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
|
|
3981
3981
|
},
|
|
3982
3982
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
3983
3983
|
log
|
|
@@ -4102,13 +4102,14 @@ async function startRunner(configPath, deps, startup) {
|
|
|
4102
4102
|
}
|
|
4103
4103
|
await adoptTrackedBuilds(state, jobsDir(configPath));
|
|
4104
4104
|
await adoptTrackedMicroVms(state, microVmPlan);
|
|
4105
|
-
for (const
|
|
4105
|
+
for (const retried of await retryFailedReleases(jobsDir(configPath), config, {
|
|
4106
4106
|
fetchImpl: deps.fetchImpl,
|
|
4107
4107
|
now: deps.now,
|
|
4108
4108
|
log
|
|
4109
4109
|
})) {
|
|
4110
|
+
const { job } = retried;
|
|
4110
4111
|
log.line(
|
|
4111
|
-
released ? `released the lease on ${itemTag(job)} that an earlier attempt could not \xB7 outcome ${job.outcome ?? "none"}` : `the lease on ${itemTag(job)}
|
|
4112
|
+
retried.released ? `released the lease on ${itemTag(job)} that an earlier attempt could not \xB7 outcome ${job.outcome ?? "none"}` : retried.final ? `the lease on ${itemTag(job)} that an earlier attempt could not release is not released: ${retried.reason} \xB7 not retried again` : `the lease on ${itemTag(job)} still cannot be released: ${retried.reason}`
|
|
4112
4113
|
);
|
|
4113
4114
|
}
|
|
4114
4115
|
for (const recovered of await recoverLostJobs(jobsDir(configPath), config, finishDepsOf(state))) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { placeholderQueues, placeholderProblem } from './chunk-
|
|
3
|
+
import { placeholderQueues, placeholderProblem } from './chunk-I64CTY4U.js';
|
|
4
4
|
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-DKDBMMX7.js';
|
|
5
5
|
import { getJson, WorkCommandError } from './chunk-B4U5XI4F.js';
|
|
6
6
|
import { isBuiltinVm, builtinKind, EGRESS_SWITCHABLE_KEYS, imageBuildOf, keepsHostBuilder } from './chunk-5QDHJT73.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { gatherDoctorChecks, doctorExitCode, summarizeChecks, renderDoctorText, recordWrapped, recordUnwrapped, recordRemoval, readManifest, recordInstall, recordStatusline } from './chunk-
|
|
3
|
+
import { gatherDoctorChecks, doctorExitCode, summarizeChecks, renderDoctorText, recordWrapped, recordUnwrapped, recordRemoval, readManifest, recordInstall, recordStatusline } from './chunk-HMDEF3UT.js';
|
|
4
4
|
import './chunk-BTH6HTE5.js';
|
|
5
5
|
import { verifiedTrackerNames, TRACKERS } from './chunk-B4U5XI4F.js';
|
|
6
6
|
import './chunk-SBPMDO47.js';
|
|
@@ -3944,13 +3944,13 @@ what CLIs older than ${FIRST_VERSION_READING_AGENTS_SKILLS} do. \`` + cliInvocat
|
|
|
3944
3944
|
if (changed.length > 0 && !opts.json) process.stdout.write(`Removed the claude function from ${changed.join(", ")}.
|
|
3945
3945
|
`);
|
|
3946
3946
|
}
|
|
3947
|
-
const shell = !opts.remove && opts.shellFunction !== void 0 ? (await import('./init-cmd-
|
|
3947
|
+
const shell = !opts.remove && opts.shellFunction !== void 0 ? (await import('./init-cmd-QJYX47LS.js')).applyShellFunctionFlag(opts.shellFunction, { home: homeFromEnv(), shellPath: process.env.SHELL }) : void 0;
|
|
3948
3948
|
if (opts.json) writeJson(shell === void 0 ? outcome.result : { ...outcome.result, shellFunction: { outcome: shell.outcome, reason: shell.reason } });
|
|
3949
3949
|
else process.stdout.write(outcome.text + skillsLine + (shell?.text ?? ""));
|
|
3950
3950
|
return;
|
|
3951
3951
|
}
|
|
3952
3952
|
await installMachineSkillsForSetup();
|
|
3953
|
-
const { runInitCommand } = await import('./init-cmd-
|
|
3953
|
+
const { runInitCommand } = await import('./init-cmd-QJYX47LS.js');
|
|
3954
3954
|
const code = await runInitCommand(
|
|
3955
3955
|
{ json: opts.json, factory: opts.factory, shellFunction: opts.shellFunction },
|
|
3956
3956
|
{
|
|
@@ -4424,7 +4424,7 @@ its criterion, and the new record retires the old record. The id must be the ite
|
|
|
4424
4424
|
as \`work demo --item <n> --json\` prints it.
|
|
4425
4425
|
`
|
|
4426
4426
|
).action(async (manifest, opts) => {
|
|
4427
|
-
const { runEmitDemo, EmitDemoError } = await import('./emit-demo-cmd-
|
|
4427
|
+
const { runEmitDemo, EmitDemoError } = await import('./emit-demo-cmd-R3TIGMFX.js');
|
|
4428
4428
|
let item;
|
|
4429
4429
|
if (opts.item !== void 0) {
|
|
4430
4430
|
item = parseTrackerNumber(opts.item);
|
|
@@ -4467,7 +4467,7 @@ as \`work demo --item <n> --json\` prints it.
|
|
|
4467
4467
|
}
|
|
4468
4468
|
});
|
|
4469
4469
|
program2.command("demo-voice", { hidden: true }).description("Speak demo lines for a recorder: JSON lines in on stdin, out on stdout").action(async () => {
|
|
4470
|
-
const { runDemoVoice } = await import('./demo-voice-cmd-
|
|
4470
|
+
const { runDemoVoice } = await import('./demo-voice-cmd-TQP3PZE2.js');
|
|
4471
4471
|
await runDemoVoice();
|
|
4472
4472
|
});
|
|
4473
4473
|
const demoCmd = program2.command("demo").description("Record demos with the recorder this CLI carries");
|
|
@@ -5097,12 +5097,13 @@ live addition remains on it.
|
|
|
5097
5097
|
throw err;
|
|
5098
5098
|
}
|
|
5099
5099
|
});
|
|
5100
|
-
workCmd.command("proofs").description("List each proof
|
|
5100
|
+
workCmd.command("proofs").description("List each proof's state; --record records them, --check only runs their tests").option("--item <number>", "the item's number inside this factory (default: OUTERLAYER_WORK)").option("--json", "machine-readable JSON output").option("--record", "rerun the tests that name each stale proof and emit their output").option("--check", "run the same tests as --record and report each proof as passed or failed").option("--comment", "with --record, comment on the general thread with each proof not current").option("--pr <number>", "the item's own pull request, when it links several in this repository").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "factory id the key is bound to (or OUTERLAYER_APP_ID / config)").addHelpText(
|
|
5101
5101
|
"after",
|
|
5102
5102
|
`
|
|
5103
5103
|
${cliInvocation()} work proofs --item 7
|
|
5104
5104
|
${cliInvocation()} work proofs --json
|
|
5105
5105
|
${cliInvocation()} work proofs --record --comment
|
|
5106
|
+
${cliInvocation()} work proofs --check
|
|
5106
5107
|
|
|
5107
5108
|
A proof is current when it was recorded at this checkout's HEAD, or at the head of a
|
|
5108
5109
|
linked pull request that is open or merged. Run \`outerlayer sync\` first, so the
|
|
@@ -5119,14 +5120,23 @@ its files, then teardown. A test writes <criterion id>.<ext> under $OUTERLAYER_P
|
|
|
5119
5120
|
--record emits it at HEAD. For a test proof it runs the test files its newest results named,
|
|
5120
5121
|
and emits the JUnit XML the run wrote, bound to the same tests. It lists the proofs last. It
|
|
5121
5122
|
stops at once if a tracked file differs from HEAD.
|
|
5123
|
+
|
|
5124
|
+
--check runs the same setup, tests and teardown as --record. It reports each proof as passed or
|
|
5125
|
+
failed, and the rows the judge failed. It emits, syncs and posts nothing. A runner build uses it,
|
|
5126
|
+
because the host records the proofs at the pushed head. Exits 0 when every proof passed and, in
|
|
5127
|
+
a runner build, no row is failed.
|
|
5122
5128
|
`
|
|
5123
5129
|
).action(async (opts) => {
|
|
5130
|
+
if (opts.check && opts.record) {
|
|
5131
|
+
fail("--check and --record cannot be used together.");
|
|
5132
|
+
return;
|
|
5133
|
+
}
|
|
5124
5134
|
if (opts.comment && !opts.record) {
|
|
5125
5135
|
fail("--comment needs --record.");
|
|
5126
5136
|
return;
|
|
5127
5137
|
}
|
|
5128
|
-
if (opts.pr !== void 0 && !opts.record) {
|
|
5129
|
-
fail("--pr needs --record.");
|
|
5138
|
+
if (opts.pr !== void 0 && !opts.record && !opts.check) {
|
|
5139
|
+
fail("--pr needs --record or --check.");
|
|
5130
5140
|
return;
|
|
5131
5141
|
}
|
|
5132
5142
|
const pr = opts.pr === void 0 ? void 0 : parseTrackerNumber(opts.pr);
|
|
@@ -5134,7 +5144,7 @@ stops at once if a tracked file differs from HEAD.
|
|
|
5134
5144
|
fail(trackerNumberError("--pr", opts.pr));
|
|
5135
5145
|
return;
|
|
5136
5146
|
}
|
|
5137
|
-
const { runWorkProofsCommand } = await import('./work-proofs-cmd-
|
|
5147
|
+
const { runWorkProofsCommand } = await import('./work-proofs-cmd-7HSLB52S.js');
|
|
5138
5148
|
await runWorkProofsCommand({ ...opts, ...pr === void 0 ? {} : { pr } });
|
|
5139
5149
|
});
|
|
5140
5150
|
workCmd.command("list").description("List live work items for this factory").option("--stage <spec|build|review>", "filter by stage").option("--section <attention|waiting|flowing>", "filter by Queue section").option("--repo <owner/name>", "repository (default: the current checkout's remote)").option("--unclaimed", "only items with no live lease").option("--claimed", "only items with a live lease, held by a host or a local session").option("--startable", "only items a host can start: a build request, no open PR, no live lease").option("--needs <amend>", "only items with a thread waiting on an agent").option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "factory id the key is bound to (or OUTERLAYER_APP_ID / config)").action(async (opts) => {
|
|
@@ -5357,7 +5367,7 @@ function registerRunnerCommands(program2) {
|
|
|
5357
5367
|
const configOption = "the cloud config file to run against (default: ~/.outerlayer/config.json)";
|
|
5358
5368
|
runnerCmd.command("start").description("Run the loop: claim work, run it, report, clean up, repeat").option("--config <path>", configOption).action(async (opts) => {
|
|
5359
5369
|
const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-ZRGYLVDX.js');
|
|
5360
|
-
const { start, RunnerStartError } = await import('./loop-
|
|
5370
|
+
const { start, RunnerStartError } = await import('./loop-HWYHQ374.js');
|
|
5361
5371
|
const { RunnerAlreadyRunningError } = await import('./pidfile-MFP6B2KV.js');
|
|
5362
5372
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
5363
5373
|
try {
|
|
@@ -5381,8 +5391,8 @@ The image sets OUTERLAYER_RUNNER_IMAGE; outside the image, use \`runner start\`.
|
|
|
5381
5391
|
`
|
|
5382
5392
|
).action(async () => {
|
|
5383
5393
|
const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-ZRGYLVDX.js');
|
|
5384
|
-
const { containerStart, containerStartExit } = await import('./container-start-
|
|
5385
|
-
const { start, RunnerStartError } = await import('./loop-
|
|
5394
|
+
const { containerStart, containerStartExit } = await import('./container-start-M7SFF62T.js');
|
|
5395
|
+
const { start, RunnerStartError } = await import('./loop-HWYHQ374.js');
|
|
5386
5396
|
const { RunnerAlreadyRunningError } = await import('./pidfile-MFP6B2KV.js');
|
|
5387
5397
|
try {
|
|
5388
5398
|
const outcome = containerStartExit(await containerStart({
|
|
@@ -5406,14 +5416,14 @@ The image sets OUTERLAYER_RUNNER_IMAGE; outside the image, use \`runner start\`.
|
|
|
5406
5416
|
).action(async (opts) => {
|
|
5407
5417
|
const { defaultRunnerConfigPath } = await import('./config-ZRGYLVDX.js');
|
|
5408
5418
|
const { runnerDir } = await import('./paths-VOWYUJLZ.js');
|
|
5409
|
-
const { runUpdateSteps } = await import('./update-steps-
|
|
5419
|
+
const { runUpdateSteps } = await import('./update-steps-6SPAPBAB.js');
|
|
5410
5420
|
const text = await runUpdateSteps({ runnerDirPath: runnerDir(opts.config ?? defaultRunnerConfigPath()) });
|
|
5411
5421
|
process.stdout.write(`${text}
|
|
5412
5422
|
`);
|
|
5413
5423
|
});
|
|
5414
5424
|
runnerCmd.command("check").description("Validate the config, the hooks and the key, and print the effective settings").option("--config <path>", configOption).action(async (opts) => {
|
|
5415
5425
|
const { defaultRunnerConfigPath } = await import('./config-ZRGYLVDX.js');
|
|
5416
|
-
const { runRunnerCheck } = await import('./check-
|
|
5426
|
+
const { runRunnerCheck } = await import('./check-3XHEVEXS.js');
|
|
5417
5427
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
5418
5428
|
const result = await runRunnerCheck(configPath);
|
|
5419
5429
|
if (!result.ok) {
|
|
@@ -5447,13 +5457,13 @@ The image sets OUTERLAYER_RUNNER_IMAGE; outside the image, use \`runner start\`.
|
|
|
5447
5457
|
}
|
|
5448
5458
|
}
|
|
5449
5459
|
const buildCpusMax = opts.buildCpusMax === void 0 ? void 0 : Number(opts.buildCpusMax);
|
|
5450
|
-
if (buildCpusMax !== void 0 && !(await import('./command-
|
|
5460
|
+
if (buildCpusMax !== void 0 && !(await import('./command-XQPL75PX.js')).cpusAreValid(buildCpusMax)) {
|
|
5451
5461
|
fail(`--build-cpus-max ${opts.buildCpusMax} is not a number of CPUs from 0.01 to 1024.`);
|
|
5452
5462
|
return;
|
|
5453
5463
|
}
|
|
5454
5464
|
try {
|
|
5455
5465
|
if (opts.service === true) {
|
|
5456
|
-
const { installServiceCommand, serviceSuccessText } = await import('./command-
|
|
5466
|
+
const { installServiceCommand, serviceSuccessText } = await import('./command-XQPL75PX.js');
|
|
5457
5467
|
const result2 = await installServiceCommand({
|
|
5458
5468
|
configPath,
|
|
5459
5469
|
print: opts.print,
|
|
@@ -5508,7 +5518,7 @@ To keep it running, run ${C.yellow}${cliInvocation()} runner install --service${
|
|
|
5508
5518
|
return;
|
|
5509
5519
|
}
|
|
5510
5520
|
const { defaultRunnerConfigPath } = await import('./config-ZRGYLVDX.js');
|
|
5511
|
-
const { uninstallServiceCommand } = await import('./command-
|
|
5521
|
+
const { uninstallServiceCommand } = await import('./command-XQPL75PX.js');
|
|
5512
5522
|
const result = await uninstallServiceCommand({ configPath: opts.config ?? defaultRunnerConfigPath(), unitName: opts.unitName, home: homeFromEnv() });
|
|
5513
5523
|
if (result.ok) for (const line of result.lines) process.stdout.write(`${C.green}\u2713${C.reset} ${line}
|
|
5514
5524
|
`);
|
|
@@ -5539,10 +5549,10 @@ already in ${words().envFile} is used.
|
|
|
5539
5549
|
`
|
|
5540
5550
|
).action(async (opts) => {
|
|
5541
5551
|
const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-ZRGYLVDX.js');
|
|
5542
|
-
const { prepareRunnerInit, runRunnerInit, RunnerInitError, writeRunnerInit } = await import('./init-
|
|
5543
|
-
const { obtainRunnerKey, runnerKeyLogin } = await import('./runner-key-
|
|
5544
|
-
const { detectMachine } = await import('./machine-
|
|
5545
|
-
const { chooseVm, runVmInit, VmInitError } = await import('./init-
|
|
5552
|
+
const { prepareRunnerInit, runRunnerInit, RunnerInitError, writeRunnerInit } = await import('./init-JY3XYZI6.js');
|
|
5553
|
+
const { obtainRunnerKey, runnerKeyLogin } = await import('./runner-key-W5M6AYY5.js');
|
|
5554
|
+
const { detectMachine } = await import('./machine-NVXRV4BO.js');
|
|
5555
|
+
const { chooseVm, runVmInit, VmInitError } = await import('./init-NRN2DQC3.js');
|
|
5546
5556
|
const { credentialFromStdin, isAgentName, restartForCredential, RunnerEnvError } = await import('./runner-env-IHWYZ3B6.js');
|
|
5547
5557
|
const { headlessNames: headlessNames2 } = await import('./runner-agents-L3PLYFWJ.js');
|
|
5548
5558
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
@@ -5556,7 +5566,7 @@ already in ${words().envFile} is used.
|
|
|
5556
5566
|
return;
|
|
5557
5567
|
}
|
|
5558
5568
|
try {
|
|
5559
|
-
const { agentCredentialText, credentialQuestion, initAgent, terminalQuestion } = await import('./init-agent-
|
|
5569
|
+
const { agentCredentialText, credentialQuestion, initAgent, terminalQuestion } = await import('./init-agent-GDOZHPQH.js');
|
|
5560
5570
|
agent = await initAgent({
|
|
5561
5571
|
flag: agent,
|
|
5562
5572
|
handOff: opts.configStdin === true,
|
|
@@ -5696,7 +5706,7 @@ ${C.yellow}The runner will not update itself: ${installErr.message}${C.reset}
|
|
|
5696
5706
|
let serviceUp = false;
|
|
5697
5707
|
let restart;
|
|
5698
5708
|
if (installedLayout) {
|
|
5699
|
-
const { installServiceCommand } = await import('./command-
|
|
5709
|
+
const { installServiceCommand } = await import('./command-XQPL75PX.js');
|
|
5700
5710
|
const service = await installServiceCommand({
|
|
5701
5711
|
configPath,
|
|
5702
5712
|
entryPath: process.argv[1] ?? "",
|
|
@@ -5834,7 +5844,7 @@ A repository with no devcontainer file builds on the universal image the CLI pin
|
|
|
5834
5844
|
});
|
|
5835
5845
|
runnerCmd.command("stop").description("Take no more work; finish running jobs, then exit").option("--config <path>", "the cloud config file naming the runner to stop").option("--now", "end running jobs immediately, with outcome stopped").action(async (opts) => {
|
|
5836
5846
|
const { defaultRunnerConfigPath } = await import('./config-ZRGYLVDX.js');
|
|
5837
|
-
const { requestStop } = await import('./loop-
|
|
5847
|
+
const { requestStop } = await import('./loop-HWYHQ374.js');
|
|
5838
5848
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
5839
5849
|
const { runnerImageVersion } = await import('./image-tag-OCVY4W5D.js');
|
|
5840
5850
|
await requestStop(configPath, Boolean(opts.now), void 0, { image: runnerImageVersion() !== void 0 });
|
|
@@ -5842,8 +5852,8 @@ A repository with no devcontainer file builds on the universal image the CLI pin
|
|
|
5842
5852
|
runnerCmd.command("status").description("List running jobs; with --recent, finished ones too").option("--config <path>", "the cloud config file naming the runner to inspect").option("--recent", "also list finished jobs, newest first, capped at 20").option("--json", "machine-readable JSON output").action(async (opts) => {
|
|
5843
5853
|
const { defaultRunnerConfigPath, loadRunnerConfig } = await import('./config-ZRGYLVDX.js');
|
|
5844
5854
|
const { jobsDir, runnerDir } = await import('./paths-VOWYUJLZ.js');
|
|
5845
|
-
const { listJobFiles, runnerProcessState } = await import('./loop-
|
|
5846
|
-
const { renderStatus } = await import('./status-
|
|
5855
|
+
const { listJobFiles, runnerProcessState } = await import('./loop-HWYHQ374.js');
|
|
5856
|
+
const { renderStatus } = await import('./status-L7R6FKWD.js');
|
|
5847
5857
|
const { readHousekeepingRecord } = await import('./record-AWCJ3LTG.js');
|
|
5848
5858
|
const path2 = await import('path');
|
|
5849
5859
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
@@ -5909,7 +5919,7 @@ A repository with no devcontainer file builds on the universal image the CLI pin
|
|
|
5909
5919
|
});
|
|
5910
5920
|
runnerCmd.command("logs").argument("<item>", "the work item's number in the factory, or a build's claim id").description("Print the newest attempt's log for one item or claim id").option("--config <path>", "the cloud config file naming the runner to inspect").option("-f, --follow", "keep printing as the log grows").action(async (itemArg, opts) => {
|
|
5911
5921
|
const { defaultRunnerConfigPath } = await import('./config-ZRGYLVDX.js');
|
|
5912
|
-
const { listJobFiles } = await import('./loop-
|
|
5922
|
+
const { listJobFiles } = await import('./loop-HWYHQ374.js');
|
|
5913
5923
|
const { describeAmbiguous, logPathFor, selectAttempt, tail, RunnerLogsError } = await import('./logs-TKWJ4S4W.js');
|
|
5914
5924
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
5915
5925
|
const jobs = listJobFiles(configPath);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { realOwnership, accountNamed, handOver, runRunnerInstall, launcherSummary, restartNote, accountIdentity } from './chunk-C574RHGN.js';
|
|
4
|
-
import { installHelper, helperUnitFor, helperSocketFor, uninstallHelper } from './chunk-
|
|
4
|
+
import { installHelper, helperUnitFor, helperSocketFor, uninstallHelper } from './chunk-E27XMQKR.js';
|
|
5
5
|
import './chunk-ATQHPT3B.js';
|
|
6
6
|
import { currentLink, execStartCommand } from './chunk-5QFFQCSY.js';
|
|
7
|
-
import { detectMachine, ensureFirecrackerAndJailer } from './chunk-
|
|
7
|
+
import { detectMachine, ensureFirecrackerAndJailer } from './chunk-I64CTY4U.js';
|
|
8
8
|
import './chunk-BCQFMAGM.js';
|
|
9
9
|
import './chunk-6XMC6R4W.js';
|
|
10
10
|
import './chunk-2PGI6RDE.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { reportFailedStart, BUILD_MEMORY_VARIABLE } from './chunk-
|
|
4
|
-
import { readOwnContainer } from './chunk-
|
|
5
|
-
import { detectMachine, supportsContainerBuilds, MIN_ENGINE_MAJOR, describeMachineDocker, RunnerInitError, prepareRunnerInit, writeRunnerInit } from './chunk-
|
|
3
|
+
import { reportFailedStart, BUILD_MEMORY_VARIABLE } from './chunk-25G5KXBE.js';
|
|
4
|
+
import { readOwnContainer } from './chunk-67BVM7JK.js';
|
|
5
|
+
import { detectMachine, supportsContainerBuilds, MIN_ENGINE_MAJOR, describeMachineDocker, RunnerInitError, prepareRunnerInit, writeRunnerInit } from './chunk-I64CTY4U.js';
|
|
6
6
|
import './chunk-BCQFMAGM.js';
|
|
7
7
|
import './chunk-6XMC6R4W.js';
|
|
8
8
|
import './chunk-2PGI6RDE.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { realSpeaker } from './chunk-
|
|
3
|
+
import { realSpeaker } from './chunk-KGHYNTF6.js';
|
|
4
4
|
import './chunk-ER6KQCVJ.js';
|
|
5
5
|
import './chunk-VU5PPWIQ.js';
|
|
6
6
|
import './chunk-2PGI6RDE.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { helperBinaryFor } from './chunk-
|
|
3
|
+
import { helperBinaryFor } from './chunk-E27XMQKR.js';
|
|
4
4
|
import { launcherCheck } from './chunk-ATQHPT3B.js';
|
|
5
|
-
import { managedProblems, fleetConfigProblem, askFleetMachine } from './chunk-
|
|
5
|
+
import { managedProblems, fleetConfigProblem, askFleetMachine } from './chunk-VQQF6MDT.js';
|
|
6
6
|
import './chunk-5QFFQCSY.js';
|
|
7
|
-
import { needsAgentCredential, agentCredentialCheck, detectMachine, supportsContainerBuilds, describeMachineDocker, MIN_ENGINE_MAJOR, reachDockerStep, supportsMicroVmBuilds, microVmArchSupported, microVmAssetsPinned, helperFirecrackerNote, probeHelper, helperSocketPath, KIND_LABEL, missingPermissionOf, missingPermissionFix } from './chunk-
|
|
7
|
+
import { needsAgentCredential, agentCredentialCheck, detectMachine, supportsContainerBuilds, describeMachineDocker, MIN_ENGINE_MAJOR, reachDockerStep, supportsMicroVmBuilds, microVmArchSupported, microVmAssetsPinned, helperFirecrackerNote, probeHelper, helperSocketPath, KIND_LABEL, missingPermissionOf, missingPermissionFix } from './chunk-I64CTY4U.js';
|
|
8
8
|
import './chunk-BCQFMAGM.js';
|
|
9
9
|
import './chunk-6XMC6R4W.js';
|
|
10
10
|
import './chunk-2PGI6RDE.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { EmitDemoError, realSpeaker, runEmitDemo } from './chunk-
|
|
3
|
+
export { EmitDemoError, realSpeaker, runEmitDemo } from './chunk-KGHYNTF6.js';
|
|
4
4
|
import './chunk-ER6KQCVJ.js';
|
|
5
5
|
import './chunk-VU5PPWIQ.js';
|
|
6
6
|
import './chunk-2PGI6RDE.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { CRITERIA_CHECK, MAX_CHECK_ITEMS_BYTES, checksIn, commandItems, isJudgeCheck, makeRecorder, readDefinitions, runHostChecks, testProofIn, timeoutAfter } from './chunk-
|
|
3
|
+
export { CRITERIA_CHECK, MAX_CHECK_ITEMS_BYTES, checksIn, commandItems, isJudgeCheck, makeRecorder, readDefinitions, runHostChecks, testProofIn, timeoutAfter } from './chunk-I64CTY4U.js';
|
|
4
4
|
import './chunk-BCQFMAGM.js';
|
|
5
5
|
import './chunk-6XMC6R4W.js';
|
|
6
6
|
import './chunk-2PGI6RDE.js';
|
package/dist/index.js
CHANGED
|
@@ -25,5 +25,5 @@ var { runSubcommand } = await import('./agent-subcommand-5PNHUNZZ.js');
|
|
|
25
25
|
var launcherCode = await runSubcommand(argv);
|
|
26
26
|
if (launcherCode !== void 0) process.exit(launcherCode);
|
|
27
27
|
(await import('./hook-fast-ECQBMESE.js')).recordLinkExitFailure(argv);
|
|
28
|
-
var { runCli } = await import('./cli-
|
|
28
|
+
var { runCli } = await import('./cli-PS6GSOAE.js');
|
|
29
29
|
await runCli(process.argv);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { PLACEHOLDER_MARKER, RunnerInitError, isPlaceholderCommand, prepareRunnerInit, readConfigObject, runRunnerInit, writeRunnerInit } from './chunk-
|
|
3
|
+
export { PLACEHOLDER_MARKER, RunnerInitError, isPlaceholderCommand, prepareRunnerInit, readConfigObject, runRunnerInit, writeRunnerInit } from './chunk-I64CTY4U.js';
|
|
4
4
|
import './chunk-BCQFMAGM.js';
|
|
5
5
|
import './chunk-6XMC6R4W.js';
|
|
6
6
|
import './chunk-2PGI6RDE.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { npmSupportsProvenance } from './chunk-E7R2GIAW.js';
|
|
4
|
-
import { RunnerInitError, readConfigObject } from './chunk-
|
|
4
|
+
import { RunnerInitError, readConfigObject } from './chunk-I64CTY4U.js';
|
|
5
5
|
import './chunk-BCQFMAGM.js';
|
|
6
6
|
import './chunk-6XMC6R4W.js';
|
|
7
7
|
import './chunk-2PGI6RDE.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RunnerInitError } from './chunk-
|
|
3
|
+
import { RunnerInitError } from './chunk-I64CTY4U.js';
|
|
4
4
|
import './chunk-BCQFMAGM.js';
|
|
5
5
|
import './chunk-6XMC6R4W.js';
|
|
6
6
|
import './chunk-2PGI6RDE.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { summarizeChecks, summaryText, renderDoctorText } from './chunk-
|
|
3
|
+
import { summarizeChecks, summaryText, renderDoctorText } from './chunk-HMDEF3UT.js';
|
|
4
4
|
import { shellFunctionInstalled, removeShellFunction, installShellFunction, SHELL_FUNCTION_LINE } from './chunk-IRFN2ZHJ.js';
|
|
5
5
|
import './chunk-BTH6HTE5.js';
|
|
6
6
|
import './chunk-B4U5XI4F.js';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { LAPSED_REASON, RunnerStartError, applyComments, fleetKeepalive, leaseTimeLeftFor, listJobFiles, logUnusableHelper, prepareSession, probeBuild, probeCredentials, requestStop, runnerProcessState, runtimeOf, sampleUsage, start, tick, watchTick } from './chunk-
|
|
3
|
+
export { LAPSED_REASON, RunnerStartError, applyComments, fleetKeepalive, leaseTimeLeftFor, listJobFiles, logUnusableHelper, prepareSession, probeBuild, probeCredentials, requestStop, runnerProcessState, runtimeOf, sampleUsage, start, tick, watchTick } from './chunk-VNHDMOZW.js';
|
|
4
4
|
import './chunk-3JVYMD4G.js';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-25G5KXBE.js';
|
|
6
6
|
import './chunk-E7R2GIAW.js';
|
|
7
7
|
import './chunk-EHPKACA7.js';
|
|
8
8
|
import './chunk-HDEYRLWK.js';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-67BVM7JK.js';
|
|
10
10
|
import './chunk-YZQYTOCR.js';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-VQQF6MDT.js';
|
|
12
12
|
import './chunk-5QFFQCSY.js';
|
|
13
|
-
import './chunk-
|
|
13
|
+
import './chunk-I64CTY4U.js';
|
|
14
14
|
import './chunk-BCQFMAGM.js';
|
|
15
15
|
import './chunk-6XMC6R4W.js';
|
|
16
16
|
import './chunk-2PGI6RDE.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { describeMachineDocker, detectMachine, microVmArchSupported, microVmAssetsPinned, reachDockerStep, supportsContainerBuilds, supportsMicroVmBuilds } from './chunk-
|
|
3
|
+
export { describeMachineDocker, detectMachine, microVmArchSupported, microVmAssetsPinned, reachDockerStep, supportsContainerBuilds, supportsMicroVmBuilds } from './chunk-I64CTY4U.js';
|
|
4
4
|
import './chunk-BCQFMAGM.js';
|
|
5
5
|
import './chunk-6XMC6R4W.js';
|
|
6
6
|
import './chunk-2PGI6RDE.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { readConfigObject, RunnerInitError } from './chunk-
|
|
3
|
+
import { readConfigObject, RunnerInitError } from './chunk-I64CTY4U.js';
|
|
4
4
|
import './chunk-BCQFMAGM.js';
|
|
5
5
|
import './chunk-6XMC6R4W.js';
|
|
6
6
|
import './chunk-2PGI6RDE.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { isReadable, LEASE_SECONDS, ALREADY_RELEASED, RENEW_INTERVAL_SECONDS } from './chunk-
|
|
3
|
+
import { isReadable, LEASE_SECONDS, ALREADY_RELEASED, RENEW_INTERVAL_SECONDS } from './chunk-I64CTY4U.js';
|
|
4
4
|
import './chunk-BCQFMAGM.js';
|
|
5
5
|
import './chunk-6XMC6R4W.js';
|
|
6
6
|
import './chunk-2PGI6RDE.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { readOwnContainer, renderUpdateSteps, runUpdateSteps } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
export { readOwnContainer, renderUpdateSteps, runUpdateSteps } from './chunk-67BVM7JK.js';
|
|
4
|
+
import './chunk-I64CTY4U.js';
|
|
5
5
|
import './chunk-BCQFMAGM.js';
|
|
6
6
|
import './chunk-6XMC6R4W.js';
|
|
7
7
|
import './chunk-2PGI6RDE.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { classifyProofs, classifyProofsAt, otherPullRequestHeads, resolveProofsItem, runWorkProofs, runWorkProofsCommand } from './chunk-
|
|
3
|
+
export { classifyProofs, classifyProofsAt, otherPullRequestHeads, renderProofRow, resolveProofsItem, runWorkProofs, runWorkProofsCommand } from './chunk-S56J4BMQ.js';
|
|
4
4
|
import './chunk-BCQFMAGM.js';
|
|
5
5
|
import './chunk-B4U5XI4F.js';
|
|
6
6
|
import './chunk-SBPMDO47.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { runWorkComment } from './chunk-YOAJLD2D.js';
|
|
4
|
-
import { resolveProofsItem, ownPullRequest, otherPullRequestHeads, testProofMode, classifyProofsAt, runWorkProofs, proofsCommentId, testFilesOf, freshXmlFiles, joinResults, testSelectors, kindProblem, proofsCommentBody } from './chunk-
|
|
5
|
-
import { runEmitDemo } from './chunk-
|
|
4
|
+
import { resolveProofsItem, ownPullRequest, otherPullRequestHeads, testProofMode, classifyProofsAt, runWorkProofs, proofsCommentId, testFilesOf, freshXmlFiles, joinResults, testSelectors, kindProblem, renderProofRow, proofsCommentBody } from './chunk-S56J4BMQ.js';
|
|
5
|
+
import { runEmitDemo, planScreenshots, chapterPassed, readStill } from './chunk-KGHYNTF6.js';
|
|
6
6
|
import { readNewestDemo } from './chunk-ER6KQCVJ.js';
|
|
7
7
|
import { runEmitArtifact } from './chunk-VU5PPWIQ.js';
|
|
8
8
|
import { runnerMatcher } from './chunk-BCQFMAGM.js';
|
|
@@ -46,18 +46,18 @@ import './chunk-ATEMEVFF.js';
|
|
|
46
46
|
import './chunk-RA3O54FC.js';
|
|
47
47
|
import './chunk-352DHUTP.js';
|
|
48
48
|
import { resolveRepoIdentity } from './chunk-MBPBYMHU.js';
|
|
49
|
-
import { ARTIFACT_MAX_CAPTION_LENGTH } from './chunk-FXVHF6RX.js';
|
|
49
|
+
import { ARTIFACT_MAX_CAPTION_LENGTH, DemoManifestSchema, ARTIFACT_MAX_BYTES } from './chunk-FXVHF6RX.js';
|
|
50
50
|
import './chunk-Z5GEFMRW.js';
|
|
51
51
|
import { spawnSync, spawn } from 'child_process';
|
|
52
|
-
import { mkdtempSync, writeFileSync, rmSync, openSync, closeSync, readdirSync
|
|
52
|
+
import { mkdtempSync, writeFileSync, rmSync, readFileSync, openSync, closeSync, readdirSync } from 'fs';
|
|
53
53
|
import { tmpdir } from 'os';
|
|
54
|
-
import { join } from 'path';
|
|
54
|
+
import { join, dirname, relative, resolve, sep, isAbsolute } from 'path';
|
|
55
55
|
|
|
56
56
|
createRequire(import.meta.url);
|
|
57
57
|
var runShell = (command, params) => {
|
|
58
58
|
const logPath = join(params.logDir, `${params.groups.length}-${Date.now()}.log`);
|
|
59
59
|
const fd = openSync(logPath, "w");
|
|
60
|
-
return new Promise((
|
|
60
|
+
return new Promise((resolve2) => {
|
|
61
61
|
const child = spawn("sh", ["-c", command], { cwd: params.cwd, env: params.env, detached: true, stdio: ["ignore", fd, fd] });
|
|
62
62
|
closeSync(fd);
|
|
63
63
|
if (child.pid !== void 0) params.groups.push(child.pid);
|
|
@@ -76,7 +76,7 @@ var runShell = (command, params) => {
|
|
|
76
76
|
text = readFileSync(logPath, "utf8");
|
|
77
77
|
} catch {
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
resolve2({ status, timedOut, tail: text.trimEnd().split("\n").slice(-8).join("\n") });
|
|
80
80
|
};
|
|
81
81
|
child.on("error", () => finish(null));
|
|
82
82
|
child.on("exit", (status) => finish(status));
|
|
@@ -141,6 +141,8 @@ var CONFIG_FILE = ".outerlayer-proofs.yaml";
|
|
|
141
141
|
var DEFAULT_TIMEOUT_MS = 10 * 60 * 1e3;
|
|
142
142
|
var DEMO_PROOFS = /* @__PURE__ */ new Set(["screenshot", "video"]);
|
|
143
143
|
var NO_TEST = "no test at HEAD names this criterion";
|
|
144
|
+
var DemoRefused = class extends Error {
|
|
145
|
+
};
|
|
144
146
|
function changedTrackedFiles(root) {
|
|
145
147
|
const status = spawnSync("git", ["status", "--porcelain=v1", "-z", "--untracked-files=no"], { cwd: root, encoding: "utf8", maxBuffer: 16 * 1024 * 1024 });
|
|
146
148
|
if (status.error !== void 0 || status.status !== 0) {
|
|
@@ -219,7 +221,7 @@ async function runWorkProofsRecord(opts) {
|
|
|
219
221
|
const changed = changedTrackedFiles(root);
|
|
220
222
|
if (changed.length > 0) {
|
|
221
223
|
throw new WorkCommandError(
|
|
222
|
-
`the working copy differs from HEAD in ${changed.join(", ")}. Only the committed files run, so nothing was recorded. Commit or discard the change, then record again.`
|
|
224
|
+
opts.check ? `the working copy differs from HEAD in ${changed.join(", ")}. Only the committed files run, so nothing was checked. Commit or discard the change, then check again.` : `the working copy differs from HEAD in ${changed.join(", ")}. Only the committed files run, so nothing was recorded. Commit or discard the change, then record again.`
|
|
223
225
|
);
|
|
224
226
|
}
|
|
225
227
|
const fetchImpl = opts.fetchImpl ?? defaultFetch;
|
|
@@ -251,8 +253,9 @@ async function runWorkProofsRecord(opts) {
|
|
|
251
253
|
if (todo.length === 0) {
|
|
252
254
|
const closing2 = await runWorkProofs({ ...opts, item, env, quiet: true, checkoutHead: head, fetchImpl });
|
|
253
255
|
if (!opts.quiet) process.stdout.write(closing2.output + "\n");
|
|
254
|
-
return { exitCode: closing2.exitCode, output: closing2.output, emitted: [], notCurrent: [] };
|
|
256
|
+
return { exitCode: closing2.exitCode, output: closing2.output, emitted: [], notCurrent: [], passed: [] };
|
|
255
257
|
}
|
|
258
|
+
const check = opts.check === true;
|
|
256
259
|
const configText = showAtHead(root, CONFIG_FILE);
|
|
257
260
|
const parsed = configText === void 0 ? void 0 : parseProofsConfig(configText);
|
|
258
261
|
if (parsed === void 0 || !parsed.ok) {
|
|
@@ -268,6 +271,7 @@ async function runWorkProofsRecord(opts) {
|
|
|
268
271
|
const proofOf = (id) => declared.get(id).proof;
|
|
269
272
|
const reasons = /* @__PURE__ */ new Map();
|
|
270
273
|
const emitted = /* @__PURE__ */ new Map();
|
|
274
|
+
const passed = /* @__PURE__ */ new Set();
|
|
271
275
|
const testIds = todo.filter((id) => proofOf(id) === "test");
|
|
272
276
|
const testsOf = /* @__PURE__ */ new Map();
|
|
273
277
|
const matchesRunner = runnerMatcher(config.runners);
|
|
@@ -384,7 +388,7 @@ async function runWorkProofsRecord(opts) {
|
|
|
384
388
|
} catch {
|
|
385
389
|
}
|
|
386
390
|
if (left.length > 0) {
|
|
387
|
-
say(`The run changed tracked files: ${left.join(", ")}. The next --record records nothing until they match HEAD. Make setup, the tests and teardown leave them unchanged.`);
|
|
391
|
+
say(`The run changed tracked files: ${left.join(", ")}. The next ${check ? "--check checks" : "--record records"} nothing until they match HEAD. Make setup, the tests and teardown leave them unchanged.`);
|
|
388
392
|
}
|
|
389
393
|
}
|
|
390
394
|
await emitProofs();
|
|
@@ -396,24 +400,30 @@ async function runWorkProofsRecord(opts) {
|
|
|
396
400
|
const manifests = runs.flatMap((run) => findManifests(run.proofOut));
|
|
397
401
|
const chapters = /* @__PURE__ */ new Set();
|
|
398
402
|
if (manifests.length > 1) {
|
|
399
|
-
say(
|
|
403
|
+
say(`${check ? "Failed" : "Not recorded"}, the demo: the runners left ${manifests.length} demo manifests, so it is unclear which to store`);
|
|
400
404
|
} else if (manifests.length === 1) {
|
|
401
405
|
for (const id of chapterCriteria(manifests[0])) chapters.add(id);
|
|
402
|
-
|
|
406
|
+
if (check) checkDemoOrRefuse(manifests[0]);
|
|
407
|
+
else await recordDemo(manifests[0], chapters);
|
|
403
408
|
}
|
|
404
409
|
for (const [id, tests] of testsOf) {
|
|
405
410
|
const ran = runs.filter((run) => run.criteria.includes(id));
|
|
406
411
|
if (ran.length === 0) continue;
|
|
407
412
|
const fail = (reason) => {
|
|
408
413
|
reasons.set(id, reason);
|
|
409
|
-
say(`Not recorded, ${id}: ${reason}`);
|
|
414
|
+
if (!check) say(`Not recorded, ${id}: ${reason}`);
|
|
410
415
|
};
|
|
411
416
|
const joined = joinResults([...new Set(ran.flatMap((run) => run.results))], new Set(tests.items.map((test) => test.name)), root);
|
|
417
|
+
const failed = ran.find((run) => run.failure !== void 0)?.failure;
|
|
412
418
|
if (!joined.ok) {
|
|
413
|
-
const failed = ran.find((run) => run.failure !== void 0)?.failure;
|
|
414
419
|
fail(failed === void 0 ? joined.reason : `${failed}, and ${joined.reason}`);
|
|
415
420
|
continue;
|
|
416
421
|
}
|
|
422
|
+
if (check) {
|
|
423
|
+
if (failed === void 0) passed.add(id);
|
|
424
|
+
else reasons.set(id, failed);
|
|
425
|
+
continue;
|
|
426
|
+
}
|
|
417
427
|
const resultsFile = join(logDir, `${id}.xml`);
|
|
418
428
|
writeFileSync(resultsFile, joined.xml);
|
|
419
429
|
try {
|
|
@@ -453,7 +463,7 @@ async function runWorkProofsRecord(opts) {
|
|
|
453
463
|
if (emitted.has(id)) continue;
|
|
454
464
|
const fail = (reason) => {
|
|
455
465
|
reasons.set(id, reason);
|
|
456
|
-
say(`Not recorded, ${id}: ${reason}`);
|
|
466
|
+
if (!check) say(`Not recorded, ${id}: ${reason}`);
|
|
457
467
|
};
|
|
458
468
|
if (run.failure !== void 0) {
|
|
459
469
|
fail(`${run.failure}, so its files are not recorded`);
|
|
@@ -464,6 +474,10 @@ async function runWorkProofsRecord(opts) {
|
|
|
464
474
|
fail(problem);
|
|
465
475
|
continue;
|
|
466
476
|
}
|
|
477
|
+
if (check) {
|
|
478
|
+
passed.add(id);
|
|
479
|
+
continue;
|
|
480
|
+
}
|
|
467
481
|
try {
|
|
468
482
|
const caption = (declared.get(id).text ?? `Proof for ${id}`).slice(0, ARTIFACT_MAX_CAPTION_LENGTH);
|
|
469
483
|
const before = spooledCount;
|
|
@@ -487,6 +501,56 @@ async function runWorkProofsRecord(opts) {
|
|
|
487
501
|
}
|
|
488
502
|
}
|
|
489
503
|
}
|
|
504
|
+
function checkDemo(manifest) {
|
|
505
|
+
const demoCriteria = todo.filter((id) => DEMO_PROOFS.has(proofOf(id)));
|
|
506
|
+
let raw;
|
|
507
|
+
try {
|
|
508
|
+
raw = JSON.parse(readFileSync(manifest, "utf8"));
|
|
509
|
+
} catch {
|
|
510
|
+
raw = void 0;
|
|
511
|
+
}
|
|
512
|
+
const parsed2 = DemoManifestSchema.safeParse(raw);
|
|
513
|
+
if (!parsed2.success) {
|
|
514
|
+
const reason = "the demo manifest is not valid";
|
|
515
|
+
for (const id of demoCriteria) reasons.set(id, reason);
|
|
516
|
+
say(`Failed, the demo: ${reason}`);
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
const manifestDir = dirname(manifest);
|
|
520
|
+
const frames = planScreenshots({ manifest: parsed2.data, proofs: new Map([...declared].map(([id, c]) => [id, c.proof])) });
|
|
521
|
+
const problems = parsed2.data.chapters.map((chapter, index) => {
|
|
522
|
+
if (!chapterPassed(chapter.checks)) return chapter.checks.length === 0 ? "its demo chapter ran no check" : "its demo chapter has a failed check";
|
|
523
|
+
const decision = frames[index];
|
|
524
|
+
if (chapter.criterionId === null || declared.get(chapter.criterionId)?.proof !== "screenshot" || decision === void 0) return void 0;
|
|
525
|
+
if ("skip" in decision) return `its demo chapter ${decision.skip}`;
|
|
526
|
+
const inside = relative(manifestDir, resolve(manifestDir, decision.bind.file));
|
|
527
|
+
if (inside === ".." || inside.startsWith(`..${sep}`) || isAbsolute(inside)) throw new DemoRefused(`the frame "${decision.bind.file}" is outside the manifest's folder`);
|
|
528
|
+
let bytes;
|
|
529
|
+
try {
|
|
530
|
+
bytes = readStill(manifestDir, decision.bind.file, decision.bind.sha256, "frame");
|
|
531
|
+
} catch (err) {
|
|
532
|
+
throw new DemoRefused(err instanceof Error ? err.message : String(err));
|
|
533
|
+
}
|
|
534
|
+
if (bytes.length > ARTIFACT_MAX_BYTES) return `its screenshot frame is over the ${ARTIFACT_MAX_BYTES / (1024 * 1024)} MiB limit`;
|
|
535
|
+
return void 0;
|
|
536
|
+
});
|
|
537
|
+
for (const id of demoCriteria) {
|
|
538
|
+
const indexes = parsed2.data.chapters.flatMap((chapter, index) => chapter.criterionId === id ? [index] : []);
|
|
539
|
+
if (indexes.length === 0) continue;
|
|
540
|
+
if (indexes.some((index) => problems[index] === void 0)) passed.add(id);
|
|
541
|
+
else reasons.set(id, problems[indexes[0]]);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
function checkDemoOrRefuse(manifest) {
|
|
545
|
+
try {
|
|
546
|
+
checkDemo(manifest);
|
|
547
|
+
} catch (err) {
|
|
548
|
+
if (!(err instanceof DemoRefused)) throw err;
|
|
549
|
+
const reason = `the demo would not be stored: ${err.message}`;
|
|
550
|
+
for (const id of todo.filter((id2) => DEMO_PROOFS.has(proofOf(id2)))) reasons.set(id, reason);
|
|
551
|
+
say(`Failed, the demo: ${err.message}`);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
490
554
|
async function recordDemo(manifest, chapters) {
|
|
491
555
|
const demoCriteria = todo.filter((id) => DEMO_PROOFS.has(proofOf(id)));
|
|
492
556
|
let replaces;
|
|
@@ -524,6 +588,21 @@ async function runWorkProofsRecord(opts) {
|
|
|
524
588
|
}
|
|
525
589
|
for (const failure of result.failures) say(`Demo check failed: ${oneLine(failure)}`);
|
|
526
590
|
}
|
|
591
|
+
if (check) return finishCheck();
|
|
592
|
+
async function finishCheck() {
|
|
593
|
+
const failedProofs = todo.filter((id) => !passed.has(id)).map((id) => ({ id, proof: proofOf(id), reason: reasons.get(id) ?? "it was not checked in this run" }));
|
|
594
|
+
for (const id of todo) {
|
|
595
|
+
if (passed.has(id)) say(`Passed ${id} (${proofOf(id)})`);
|
|
596
|
+
}
|
|
597
|
+
for (const proof of failedProofs) say(`Failed ${proof.id} (${proof.proof}): ${proof.reason}`);
|
|
598
|
+
const closing2 = await runWorkProofs({ ...opts, item, env, quiet: true, checkoutHead: head, fetchImpl });
|
|
599
|
+
const judged = closing2.entries.filter((entry) => entry.state === "failed");
|
|
600
|
+
const inRunnerBuild = env.OUTERLAYER_JOB_DIR !== void 0;
|
|
601
|
+
const output2 = [...lines, ...judged.map(renderProofRow)].join("\n");
|
|
602
|
+
if (!opts.quiet) process.stdout.write(output2 + "\n");
|
|
603
|
+
const ok = failedProofs.length === 0 && !(inRunnerBuild && judged.length > 0);
|
|
604
|
+
return { exitCode: ok ? 0 : 1, output: output2, emitted: [], notCurrent: failedProofs, passed: [...passed] };
|
|
605
|
+
}
|
|
527
606
|
if (spooledCount > 0) {
|
|
528
607
|
try {
|
|
529
608
|
const synced = await (opts.sync ?? (() => runSync({ ...common })))();
|
|
@@ -565,7 +644,8 @@ async function runWorkProofsRecord(opts) {
|
|
|
565
644
|
exitCode: closing.exitCode,
|
|
566
645
|
output,
|
|
567
646
|
emitted: [...emitted].map(([criterion, artifactId]) => ({ criterion, artifactId })),
|
|
568
|
-
notCurrent
|
|
647
|
+
notCurrent,
|
|
648
|
+
passed: []
|
|
569
649
|
};
|
|
570
650
|
}
|
|
571
651
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outerlayer/cli",
|
|
3
|
-
"version": "0.38.0-next.
|
|
3
|
+
"version": "0.38.0-next.20261110212358",
|
|
4
4
|
"description": "OuterLayer CLI — commands: init, claude, opencode, connect, doctor, login, logout, sync, daemon (alias: watch), emit, demo, findings, work, run, spec, runner, hooks, mcp, context. Capture and sync coding-agent sessions, and record proof of factory work.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Magu Studios, Inc.",
|
|
@@ -422,9 +422,11 @@ Run them in order.
|
|
|
422
422
|
then apply the team's changes for this phase. Read [references/evidence.md](references/evidence.md)
|
|
423
423
|
when the pull request opens, and run it. Write and commit the demo test and the
|
|
424
424
|
file-proof tests. Each test uses the id of the criterion it records a proof for. When the
|
|
425
|
-
repository has no `.outerlayer-proofs.yaml`, write and commit one.
|
|
426
|
-
|
|
427
|
-
|
|
425
|
+
repository has no `.outerlayer-proofs.yaml`, write and commit one. In a
|
|
426
|
+
runner build, check each proof with `outerlayer work proofs --check`, and
|
|
427
|
+
record none: the host records them at the pushed head. In a local session,
|
|
428
|
+
record each proof with `outerlayer work proofs --record` after the last
|
|
429
|
+
push. Check the proofs with `outerlayer work proofs`, as that file says.
|
|
428
430
|
|
|
429
431
|
Optional steps a team may turn off: the manual test and screenshots in the
|
|
430
432
|
Evidence phase, for a repository with no user interface.
|
|
@@ -441,7 +443,14 @@ is "The tests need STRIPE_KEY. Add it as a build variable." Keep it under 200
|
|
|
441
443
|
characters. The Work page and the Activity tab show your sentence as the reason
|
|
442
444
|
the item needs attention. Skip it when the build opens a pull request.
|
|
443
445
|
|
|
444
|
-
|
|
446
|
+
In a runner build, end the run only when `outerlayer work proofs --check`
|
|
447
|
+
exits 0 at the last commit, or when `build-reports/evidence.md` names each
|
|
448
|
+
proof that failed and the reason. Do not run `--record`: the host records each
|
|
449
|
+
proof at the pushed head. A row marked `failed` fails the check, and no reason
|
|
450
|
+
excuses it: add or change a test that proves the criterion, commit, and check
|
|
451
|
+
again.
|
|
452
|
+
|
|
453
|
+
In a local session, run the release command below last, after the pull request is open and the
|
|
445
454
|
evidence is emitted, and run no other tool call after it. Before it, run `outerlayer sync` and then
|
|
446
455
|
`outerlayer work proofs --item "$OUTERLAYER_WORK"`. End the run only when it
|
|
447
456
|
exits 0, or when `build-reports/evidence.md` names each proof it still lists
|
|
@@ -338,17 +338,19 @@ each proof that is not current, and runs them.
|
|
|
338
338
|
- A proof that no test can make stays without a test. Give the reason in
|
|
339
339
|
`build-reports/evidence.md`.
|
|
340
340
|
|
|
341
|
-
Commit the setup file and every test.
|
|
342
|
-
`outerlayer work proofs --
|
|
343
|
-
|
|
344
|
-
|
|
341
|
+
Commit the setup file and every test. In a runner build (`OUTERLAYER_JOB_DIR`
|
|
342
|
+
is set), run `outerlayer work proofs --check` from the committed checkout. In a
|
|
343
|
+
local session, run `outerlayer work proofs --record`. Each stops when a
|
|
344
|
+
tracked file differs from HEAD, and runs only what is committed at HEAD. Each
|
|
345
|
+
skips a proof that is current. `--record` emits each proof at HEAD. `--check`
|
|
346
|
+
emits nothing, because the host records each proof at the pushed head. Never emit by hand
|
|
345
347
|
a proof that a test can make, except a `test` proof the first time, as above. Always pass `--pr <number>` when the item links
|
|
346
348
|
more than one pull request in the repository.
|
|
347
349
|
|
|
348
|
-
The output names each proof that is still not current, with the
|
|
349
|
-
that test, commit it and
|
|
350
|
-
head moved. Each run starts the app again. The
|
|
351
|
-
the run's last head.
|
|
350
|
+
The output names each proof that failed or is still not current, with the
|
|
351
|
+
reason. Fix that test, commit it and run the same command again. Do not run it
|
|
352
|
+
again only because the head moved. Each run starts the app again. The
|
|
353
|
+
orchestrator runs it once more, at the run's last head.
|
|
352
354
|
|
|
353
355
|
Run `outerlayer sync`, then `outerlayer work proofs --item "$OUTERLAYER_WORK"`.
|
|
354
356
|
|
|
@@ -36,36 +36,46 @@ changed since: a row marked `failed`. The row gives the judge's reason. Add or
|
|
|
36
36
|
change a test that proves the criterion, and commit. The judge finds a
|
|
37
37
|
criterion's tests itself, so a test needs no comment that names the criterion.
|
|
38
38
|
|
|
39
|
-
A commit makes every proof out of date, and each
|
|
40
|
-
again. So
|
|
41
|
-
still needs, such as a fix or a merge of the base branch.
|
|
42
|
-
commit, then run `outerlayer work proofs --record` once. It records each
|
|
43
|
-
proof that is not current and skips the rest. If a commit lands after that,
|
|
44
|
-
record once more after it. The final report names that head and the proofs
|
|
45
|
-
recorded there.
|
|
39
|
+
A commit makes every proof out of date, and each run of the proof tests starts
|
|
40
|
+
the app again. So run them only at the run's last head. First make every
|
|
41
|
+
commit the run still needs, such as a fix or a merge of the base branch.
|
|
46
42
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
43
|
+
In a runner build (`OUTERLAYER_JOB_DIR` is set), do not record a proof. Run
|
|
44
|
+
`outerlayer work proofs --check` once, at the last commit. It runs the same
|
|
45
|
+
setup, tests and teardown as `--record`. It reports each proof as passed or
|
|
46
|
+
failed, and emits nothing. After the run ends, the host records each proof
|
|
47
|
+
once, at the pushed head. A proof that fails the check fails there too. Fix
|
|
48
|
+
its test, commit, and check again. The run ends when the check exits 0, or
|
|
49
|
+
when `build-reports/evidence.md` names each proof that failed and the reason.
|
|
50
|
+
|
|
51
|
+
In a local session, push the last commit, then run
|
|
52
|
+
`outerlayer work proofs --record` once. It records each proof that is not
|
|
53
|
+
current and skips the rest. If a commit lands after that, record once more
|
|
54
|
+
after it. The final report names that head and the proofs recorded there.
|
|
55
|
+
|
|
56
|
+
Run `--check` and `--record` in the foreground with the longest timeout. Never
|
|
57
|
+
cut their output with `| tail`. The lines before the list say why a proof
|
|
58
|
+
failed or was not recorded.
|
|
53
59
|
|
|
54
60
|
A criterion that declares `proof: test` is recorded the first time as the
|
|
55
61
|
Evidence brief in [agent-briefs.md](agent-briefs.md) says, unless the policy
|
|
56
62
|
file sets `criteria.test_proof: ci`. After that, `--record` runs the same tests
|
|
57
|
-
again and records their results, as the host does at the final commit.
|
|
58
|
-
do so only when the results name each
|
|
59
|
-
`.outerlayer-proofs.yaml` matches that file. A
|
|
60
|
-
JUnit reporter names the file by default.
|
|
61
|
-
`addFileAttribute` option. Otherwise, give
|
|
62
|
-
`--test "<test name>=<path>"`. The list command names a proof
|
|
63
|
+
again and records their results, as the host does at the final commit.
|
|
64
|
+
`--check` runs the same tests. Both can do so only when the results name each
|
|
65
|
+
test's file, and a runner in `.outerlayer-proofs.yaml` matches that file. A
|
|
66
|
+
line is not needed. Vitest's JUnit reporter names the file by default.
|
|
67
|
+
jest-junit names it only with its `addFileAttribute` option. Otherwise, give
|
|
68
|
+
the file with `--test "<test name>=<path>"`. The list command names a proof
|
|
63
69
|
the host cannot record again, and why. Fix the proofs file before the run
|
|
64
|
-
ends.
|
|
70
|
+
ends. In a local session, the final report names each test proof with its
|
|
71
|
+
artifact. In a runner build, it names each test proof that passed the check.
|
|
65
72
|
|
|
66
|
-
|
|
67
|
-
as out of date or missing goes in
|
|
68
|
-
|
|
73
|
+
In a local session, run the list command once more before the run ends. A
|
|
74
|
+
criterion still listed as out of date or missing goes in
|
|
75
|
+
`build-reports/evidence.md` with the reason. In a runner build, the list shows
|
|
76
|
+
each proof as out of date or missing until the host records it. There, a
|
|
77
|
+
proof that fails `--check` goes in `build-reports/evidence.md` with the
|
|
78
|
+
reason. A written reason never excuses a `failed` row. Fix it first. Never
|
|
69
79
|
drive the browser yourself.
|
|
70
80
|
|
|
71
81
|
Re-read the pull request's evidence comment. Resolve or escalate every row that
|
|
@@ -80,8 +80,8 @@ Then run `outerlayer sync`. List every unsatisfied criterion in the final
|
|
|
80
80
|
report. A criterion that declares a proof form such as a screenshot or video is
|
|
81
81
|
proven only by an artifact bound to it on the pull request. The judge cannot
|
|
82
82
|
see that. Run `outerlayer work proofs --item "$OUTERLAYER_WORK"`, as the
|
|
83
|
-
evidence phase says,
|
|
84
|
-
missing.
|
|
83
|
+
evidence phase says. In a local session, record again any proof it lists as
|
|
84
|
+
out of date or missing. In a runner build, the host records them.
|
|
85
85
|
|
|
86
86
|
## The criteria verdict
|
|
87
87
|
|