@outerlayer/cli 0.38.0-next.20261105131925 → 0.38.0-next.20261105155912
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/README.md +5 -0
- package/dist/build-info.json +1 -1
- package/dist/{check-HXGQQAJS.js → check-CZM3LZ7Y.js} +6 -6
- package/dist/{chunk-AWRRWWA7.js → chunk-5YWOGS66.js} +3 -3
- package/dist/{chunk-GEW4TNCL.js → chunk-EOVVSXRH.js} +1 -1
- package/dist/{chunk-GTJ2WSYI.js → chunk-GLJX2CZY.js} +27 -8
- package/dist/{chunk-GYUHWK2N.js → chunk-OCDG3ZWH.js} +1 -1
- package/dist/{chunk-TE6GQJRW.js → chunk-OVHBDADU.js} +1 -1
- package/dist/{chunk-KFJIOCZS.js → chunk-RVIZRXBK.js} +1 -1
- package/dist/{chunk-7476RWW6.js → chunk-TOH7FJH3.js} +62 -11
- package/dist/{chunk-LFHJZDES.js → chunk-WHPMCF7R.js} +1 -1
- package/dist/{chunk-IYG543BV.js → chunk-XQSTN7NG.js} +1 -1
- package/dist/{cli-6LEVGWVU.js → cli-YMSYVF7O.js} +26 -26
- package/dist/{command-HRXMLFOT.js → command-ZOWMTOWA.js} +2 -2
- package/dist/{container-start-JNTWQOMK.js → container-start-RZSGWDZG.js} +3 -3
- package/dist/{doctor-2Z224QH4.js → doctor-NILQ2RUT.js} +3 -3
- package/dist/{host-checks-TXG6OTBM.js → host-checks-PPTMNHRA.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{init-YENLMMJU.js → init-5ERGXSUD.js} +1 -1
- package/dist/{init-NCBQ2DOK.js → init-7OHFUQBV.js} +1 -1
- package/dist/{init-agent-CNHQT7YK.js → init-agent-B5ADPZIB.js} +1 -1
- package/dist/{init-cmd-I3BH7SXO.js → init-cmd-ZT2PXGPD.js} +1 -1
- package/dist/{logs-2OR2R52N.js → logs-XKEW5EOB.js} +17 -2
- package/dist/{loop-TIX5JGHS.js → loop-HTKTSGBA.js} +6 -6
- package/dist/{machine-62FUJBEK.js → machine-RBYGRRSM.js} +1 -1
- package/dist/{runner-key-E3ORW6RS.js → runner-key-VCWF2EN7.js} +1 -1
- package/dist/{status-3RD4MERA.js → status-HHM6TH6J.js} +1 -1
- package/dist/{update-steps-4AI2DSYF.js → update-steps-WD25IX2R.js} +2 -2
- package/dist/{work-claim-cmd-VBRJO6FU.js → work-claim-cmd-7TLC4DKU.js} +1 -1
- package/dist/{work-proofs-cmd-6DV35Y2W.js → work-proofs-cmd-UQU6SSFD.js} +1 -1
- package/dist/{work-proofs-record-7YI27TFT.js → work-proofs-record-MKCYQLS2.js} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -152,6 +152,11 @@ content:
|
|
|
152
152
|
requests. After the gateway refuses that call, and in `outerlayer runner
|
|
153
153
|
check`, it also sends `GET /v1/fleet/machine` with the fleet machine key, to
|
|
154
154
|
learn why.
|
|
155
|
+
Each housekeeping pass, a runner also asks which of the work items it keeps
|
|
156
|
+
build disks for are closed. A fleet machine sends `POST /v1/fleet/item-states`
|
|
157
|
+
and any other runner sends `POST /v1/runner/item-states`. The reply names
|
|
158
|
+
only items that caller claimed. The runner removes the disk of an item whose
|
|
159
|
+
pull request merged or closed.
|
|
155
160
|
When a build's command exits 0, it reads that work item once more, for its
|
|
156
161
|
evidence verdict, before releasing it: it sends nothing but the request.
|
|
157
162
|
Just before that read, the runner runs the repository's host checks. A host
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"2026-11-
|
|
1
|
+
{"id":"2026-11-05T16:06:01.962Z","root":"/home/runner/work/outerlayer/outerlayer","pkg":"outerlayer"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { probeCredentials } from './chunk-
|
|
3
|
+
import { probeCredentials } from './chunk-TOH7FJH3.js';
|
|
4
4
|
import './chunk-IG7SBYJY.js';
|
|
5
5
|
import './chunk-SUMRSD2Q.js';
|
|
6
6
|
import './chunk-L25GQH45.js';
|
|
7
7
|
import './chunk-3JVYMD4G.js';
|
|
8
8
|
import './chunk-E7R2GIAW.js';
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
12
|
-
import { fleetConfigProblem, managedProblems, managedFactsOf, askFleetMachine } from './chunk-
|
|
9
|
+
import './chunk-EOVVSXRH.js';
|
|
10
|
+
import './chunk-XQSTN7NG.js';
|
|
11
|
+
import './chunk-OVHBDADU.js';
|
|
12
|
+
import { fleetConfigProblem, managedProblems, managedFactsOf, askFleetMachine } from './chunk-OCDG3ZWH.js';
|
|
13
13
|
import './chunk-HOCVTWV2.js';
|
|
14
14
|
import { findServiceUnit } from './chunk-35RIDLSD.js';
|
|
15
|
-
import { placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, HELPER_ENV, helperSocketPath, probeHelper, needsAgentCredential, agentCredentialCheck, claimPermissionProblem, formerSkillQueues, modellessQueues, formerSkillProblem, modellessProblem } from './chunk-
|
|
15
|
+
import { placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, HELPER_ENV, helperSocketPath, probeHelper, needsAgentCredential, agentCredentialCheck, claimPermissionProblem, formerSkillQueues, modellessQueues, formerSkillProblem, modellessProblem } from './chunk-GLJX2CZY.js';
|
|
16
16
|
import './chunk-3B5H5MGB.js';
|
|
17
17
|
import './chunk-2PGI6RDE.js';
|
|
18
18
|
import './chunk-I3LTIAOR.js';
|
|
@@ -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-PPTMNHRA.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-PPTMNHRA.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 };
|
|
@@ -368,7 +368,7 @@ async function runWorkProofs(opts) {
|
|
|
368
368
|
async function runWorkProofsCommand(opts) {
|
|
369
369
|
try {
|
|
370
370
|
if (opts.record) {
|
|
371
|
-
const { runWorkProofsRecord } = await import('./work-proofs-record-
|
|
371
|
+
const { runWorkProofsRecord } = await import('./work-proofs-record-MKCYQLS2.js');
|
|
372
372
|
const result2 = await runWorkProofsRecord(opts);
|
|
373
373
|
process.exitCode = result2.exitCode;
|
|
374
374
|
return;
|
|
@@ -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-GLJX2CZY.js';
|
|
4
4
|
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-HU3POMM4.js';
|
|
5
5
|
import { RunnerAlreadyRunningError, readPidFile } from './chunk-JCEJARDB.js';
|
|
6
6
|
import { isSameProcess } from './chunk-JBJTC3UU.js';
|
|
@@ -29,7 +29,7 @@ import { sanitizeTerminal, planArtifactUpload } from './chunk-VVZIFOAN.js';
|
|
|
29
29
|
import { sharedSkillNames, skillConflictMessage } from './chunk-FRQPX2QR.js';
|
|
30
30
|
import { readCloudConfig } from './chunk-HWVMRETT.js';
|
|
31
31
|
import { signerFor } from './chunk-U63SE2NJ.js';
|
|
32
|
-
import { vmAssetsDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, jobsDir, storeScopes, spoolDir, orgStoreIn, rootfsDir, imagesDir, sessionsDir, builderCacheDiskPath, buildsDir, buildDir, ghConfigDir, runnerDirOfBuild, mirrorDir, orgHomeDir, jobConsolePath, vsockPath,
|
|
32
|
+
import { vmAssetsDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, workspacesDir, jobsDir, storeScopes, spoolDir, orgStoreIn, rootfsDir, imagesDir, sessionsDir, builderCacheDiskPath, buildsDir, buildDir, ghConfigDir, runnerDirOfBuild, mirrorDir, orgHomeDir, jobConsolePath, vsockPath, builderConsolePath, rootfsPathFor, diskTemplatesDir, deliveryDir, SHIM_DIR } from './chunk-2C3XLYO5.js';
|
|
33
33
|
import { BUILD_HOME, JOB_MOUNT, heldBuildAuthority, IMAGE_BUNDLES, writeTrustFiles, buildEnvironment, trustEnvironment, CHECKOUT_DIR, parseIsolation, containerLocalAddress, destinationEnvironment, withHooksPath, startBuildServices, headerVariables, authorEnvironment, sharedUserEnvironment, withTunnelRecord, commitIdentityRecord, repositoriesOf, RELAY_PORT, repositoryPath, lifecycleWorkdir, CHECK_ITEMS_FILE, parseProxied, readBundleScript, applyTrust, STAND_IN, proxyEnvironment, dropBuildAuthority, hostKeyOf, buildAuthorityFor, checkEnvironment, withMiseVariables, checkoutPath, primaryOf, variablesFor, carried6to4, classifyAddress, EVAL_INPUT_DIR, isMiseVariableAllowed, variableForPath, droppedRequestHeaders, hasDotDotSegment, routeNameOf } from './chunk-XUXDUOJI.js';
|
|
34
34
|
import { agentCredential, RUNNER_WORDED_REASONS, UNKNOWN_TRACKING_REASON, UNKNOWN_TRANSPORT_REASON, RELAY_USER, currentAgentCredential, removedAgentCredentialValues, managedAgentCredential, realFdStorePort, builtInNames, MAX_MALFORMED_SESSIONS, MALFORMED_REASON, JOIN_WAIT_MS, MAX_OPEN_STREAMS, STREAM_RESET_RATE, STREAM_RESET_BURST, STREAM_WINDOW, SESSION_WINDOW, targetOfPath, AGENT_CREDENTIAL_MISSING, fdName, RELAY_ID, DOCKER_DESKTOP_REASON } from './chunk-DP6ZOSCR.js';
|
|
35
35
|
import { versionAtLeast } from './chunk-OV4XTV5M.js';
|
|
@@ -42,7 +42,7 @@ import { scrubText, MIN_SCRUBBED_LITERAL, setCustomScrubbers, setLocalIdentity,
|
|
|
42
42
|
import { CheckItemsSchema, CHECK_ITEM_HREF_MAX_LENGTH, downconvertSession } from './chunk-2JIGPSVF.js';
|
|
43
43
|
import { randomUUID, randomBytes, createHash } from 'crypto';
|
|
44
44
|
import { rmSync, mkdirSync, existsSync, readFileSync, mkdtempSync, statSync, appendFileSync, writeFileSync, readdirSync, accessSync, constants, openSync, closeSync, renameSync, rmdirSync, createReadStream, lstatSync, unlinkSync, chmodSync, realpathSync, writeSync, truncateSync, cpSync, fstatSync, readSync, createWriteStream, copyFileSync, linkSync } from 'fs';
|
|
45
|
-
import { join, dirname, isAbsolute, delimiter,
|
|
45
|
+
import { join, dirname, isAbsolute, delimiter, basename, sep, relative, resolve } from 'path';
|
|
46
46
|
import { Readable, PassThrough, Duplex, Transform } from 'stream';
|
|
47
47
|
import { spawn, spawnSync } from 'child_process';
|
|
48
48
|
import { createServer, createConnection, connect, isIP } from 'net';
|
|
@@ -2974,7 +2974,8 @@ var DISK_REASON_TEXT = {
|
|
|
2974
2974
|
disk_not_restored: "the kept disk could not be copied",
|
|
2975
2975
|
checkout_not_switched: "the kept checkout could not be switched to the branch",
|
|
2976
2976
|
build_type_cannot_restore: "this build type cannot restore a disk",
|
|
2977
|
-
fresh_requested: "a member asked for a fresh disk"
|
|
2977
|
+
fresh_requested: "a member asked for a fresh disk",
|
|
2978
|
+
holder_busy: "the machine that holds its disk was busy"
|
|
2978
2979
|
};
|
|
2979
2980
|
function itemDiskDecision(input) {
|
|
2980
2981
|
if (input.fresh === true) return { state: { restored: false, reason: "fresh_requested" } };
|
|
@@ -2985,7 +2986,7 @@ function itemDiskDecision(input) {
|
|
|
2985
2986
|
} catch {
|
|
2986
2987
|
kept = void 0;
|
|
2987
2988
|
}
|
|
2988
|
-
if (kept === void 0) return { state: { restored: false, reason: "no_kept_disk" } };
|
|
2989
|
+
if (kept === void 0) return { state: { restored: false, reason: input.heldElsewhere === true ? "holder_busy" : "no_kept_disk" } };
|
|
2989
2990
|
if (kept.record.repository !== input.repository) return { state: { restored: false, reason: "no_kept_disk" } };
|
|
2990
2991
|
if (kept.record.imageId !== input.imageId) return { state: { restored: false, reason: "other_image" } };
|
|
2991
2992
|
if (kept.record.diskBytes !== input.diskBytes) return { state: { restored: false, reason: "other_disk_size" } };
|
|
@@ -4052,7 +4053,7 @@ async function provisionMicroVmOnce(input, allowRestore, itemDiskFailed) {
|
|
|
4052
4053
|
if (!obtained.ok) return obtained.aborted === true ? { ok: false, reason: obtained.reason, aborted: true } : fail(obtained.reason);
|
|
4053
4054
|
const { report } = obtained.built;
|
|
4054
4055
|
const tagged = taggedLog(log, tag);
|
|
4055
|
-
const itemDisk = input.workItemId === void 0 ? { state: void 0 } : itemDiskFailed !== void 0 ? { state: { restored: false, reason: itemDiskFailed } } : itemDiskDecision({ fresh: input.fresh, builtin: true, backend: "disk", configPath: config.configPath, organizationId: input.organizationId, workItemId: input.workItemId, repository, imageId: report.imageId, diskBytes: limits2.diskBytes });
|
|
4056
|
+
const itemDisk = input.workItemId === void 0 ? { state: void 0 } : itemDiskFailed !== void 0 ? { state: { restored: false, reason: itemDiskFailed } } : itemDiskDecision({ fresh: input.fresh, heldElsewhere: input.diskHeldElsewhere, builtin: true, backend: "disk", configPath: config.configPath, organizationId: input.organizationId, workItemId: input.workItemId, repository, imageId: report.imageId, diskBytes: limits2.diskBytes });
|
|
4056
4057
|
const keptDisk = itemDisk.kept;
|
|
4057
4058
|
if (itemDisk.state?.restored === false) tagged(`this job starts without a kept disk: ${DISK_REASON_TEXT[itemDisk.state.reason]}`);
|
|
4058
4059
|
const plan = keptDisk !== void 0 ? keptDiskPlan() : await planSavedState({
|
|
@@ -8343,6 +8344,7 @@ async function housekeepingDockerIfReachable(deps) {
|
|
|
8343
8344
|
}
|
|
8344
8345
|
var DAY_MS = 864e5;
|
|
8345
8346
|
var STAGING_GRACE_MS = 36e5;
|
|
8347
|
+
var MAX_STATE_IDS = 1e3;
|
|
8346
8348
|
var keptAtOf = (entry) => Date.parse(entry.kept.record.keptAt);
|
|
8347
8349
|
var oldestFirst2 = (entries) => [...entries].sort((a, b) => keptAtOf(a) - keptAtOf(b));
|
|
8348
8350
|
var bytesOf = (entries) => entries.reduce((sum, entry) => sum + entry.kept.record.bytes, 0);
|
|
@@ -8396,7 +8398,23 @@ async function removeItemDisks(input) {
|
|
|
8396
8398
|
}
|
|
8397
8399
|
};
|
|
8398
8400
|
const entries = allEntries(configPath);
|
|
8399
|
-
|
|
8401
|
+
if (input.itemStates !== void 0 && entries.length > 0) {
|
|
8402
|
+
let states = void 0;
|
|
8403
|
+
let threw = false;
|
|
8404
|
+
try {
|
|
8405
|
+
states = await input.itemStates([...new Set(entries.map((entry) => entry.kept.record.workItemId))].slice(0, MAX_STATE_IDS));
|
|
8406
|
+
} catch (err) {
|
|
8407
|
+
threw = true;
|
|
8408
|
+
input.error(`housekeeping: could not ask which kept disks belong to closed work items: ${describeCallFailure(err)}`);
|
|
8409
|
+
}
|
|
8410
|
+
if (states === void 0 && !threw) input.error("housekeeping: could not ask which kept disks belong to closed work items: the gateway gave no answer");
|
|
8411
|
+
if (states !== void 0) {
|
|
8412
|
+
for (const entry of entries) {
|
|
8413
|
+
if (states[entry.kept.record.workItemId] === "closed") await remove(entry, "its pull request closed");
|
|
8414
|
+
}
|
|
8415
|
+
}
|
|
8416
|
+
}
|
|
8417
|
+
for (const entry of entries.filter((candidate) => !gone.has(candidate))) {
|
|
8400
8418
|
const sinceMs = nowMs - keptAtOf(entry);
|
|
8401
8419
|
if (sinceMs >= limits2.keepDays * DAY_MS) await remove(entry, `no job replaced it for ${formatDuration(sinceMs)}, past runner.housekeeping.workspaceKeepDays`);
|
|
8402
8420
|
}
|
|
@@ -8683,6 +8701,7 @@ async function runHousekeeping(options) {
|
|
|
8683
8701
|
limits: { max: options.workspaceMax ?? Number.POSITIVE_INFINITY, orgMax: options.workspaceOrgMax ?? Number.POSITIVE_INFINITY, keepDays: options.workspaceKeepDays ?? DEFAULT_WORKSPACE_KEEP_DAYS },
|
|
8684
8702
|
nowMs,
|
|
8685
8703
|
removeVolume: options.docker === void 0 ? void 0 : (name) => options.docker.removeVolume(name),
|
|
8704
|
+
...options.itemStates === void 0 ? {} : { itemStates: options.itemStates },
|
|
8686
8705
|
log: (line2) => options.log.line(line2),
|
|
8687
8706
|
error: (line2) => options.log.error(line2)
|
|
8688
8707
|
});
|
|
@@ -10587,7 +10606,7 @@ async function provisionContainerOnce(input, allowRestore, itemDiskFailed) {
|
|
|
10587
10606
|
const { report } = built;
|
|
10588
10607
|
const tagged = taggedLog(log, tag);
|
|
10589
10608
|
const diskBytes = parseSize(config.build?.disk ?? DEFAULT_BUILD_DISK) ?? 0;
|
|
10590
|
-
const itemDisk = input.workItemId === void 0 ? { state: void 0 } : itemDiskFailed !== void 0 ? { state: { restored: false, reason: itemDiskFailed } } : itemDiskDecision({ fresh: input.fresh, builtin: true, backend: "volume", configPath: config.configPath, organizationId: input.organizationId, workItemId: input.workItemId, repository, imageId: report.imageId, diskBytes });
|
|
10609
|
+
const itemDisk = input.workItemId === void 0 ? { state: void 0 } : itemDiskFailed !== void 0 ? { state: { restored: false, reason: itemDiskFailed } } : itemDiskDecision({ fresh: input.fresh, heldElsewhere: input.diskHeldElsewhere, builtin: true, backend: "volume", configPath: config.configPath, organizationId: input.organizationId, workItemId: input.workItemId, repository, imageId: report.imageId, diskBytes });
|
|
10591
10610
|
const keptDisk = itemDisk.kept;
|
|
10592
10611
|
if (itemDisk.state?.restored === false) tagged(`this job starts without a kept disk: ${DISK_REASON_TEXT[itemDisk.state.reason]}`);
|
|
10593
10612
|
const plan = keptDisk !== void 0 ? keptDiskPlan() : await planSavedState({
|
|
@@ -11880,4 +11899,4 @@ async function runHostChecks(input) {
|
|
|
11880
11899
|
}
|
|
11881
11900
|
}
|
|
11882
11901
|
|
|
11883
|
-
export { ADOPTED_FETCH_RETRY_WINDOW_MS, ALREADY_RELEASED, AttemptLogBook, EXIT_CODE_FILE, GUEST_USAGE_INTERVAL_MS, HELPER_ENV, KIND_LABEL, LEASE_SECONDS, MAX_CHECK_ITEMS_BYTES, MICROVM_COMMAND_DIR, MIN_ENGINE_MAJOR, PLACEHOLDER_MARKER, RENEW_INTERVAL_SECONDS, RunnerInitError, agentCredentialCheck, appendCommandLog, attemptNote, checksIn, claimPermissionProblem, commandItems, commandLogOffset, containerCommandExec, createContainerRuntime, createHousekeepingDocker, createLeaseChannel, currentSkillCommand, decideHostBuildSkill, deliverCommitHooks, deliverContainerHooks, deliverExecMaven, deliverJobFiles, describeHookEnd, describeMachineDocker, detectMachine, ensureFirecrackerAndJailer, ensureNetworkReady, ensureTunnel, execArgv, execCommandLine, fetchManagedBuildSettings, fetchManagedClaudeKey, filesAreCopied, finishJob, foldSample, formerSkillProblem, formerSkillQueues, freeItemDisksUntil, gitRemoteFor, helperFirecrackerNote, helperSocketPath, holdManagedBuildSettings, holdManagedClaudeKey, hookLimitsFor, hostCommandEnvironment, hostEnvironment, housekeepingDockerIfReachable, inTeardown, installTrust, isContainerTracked, isGroupAlive, isIdle, isJudgeCheck, isMicroVmTracked, isPlaceholderCommand, isReadable, isTimedOut, isTracked, isUnfinished, itemScope, itemTag, jobEnv, jobRecordsClaim, judgeProbe, keepGhConfigCurrent, leaseExpiresAtMs, leaseTimeLeftMs, lifecycleFailureReason, lifecycleSteps, listAdoptableJobs, listTrackedJobs, listUnreadableJobs, listenOnBroker, makeRecorder, managedBuildSettingsFor, measureDisk, microVmArchSupported, microVmAssetsPinned, microVmCommandLine, microVmOomKills, missingPermissionFix, missingPermissionOf, modellessProblem, modellessQueues, needsAgentCredential, needsBuildSkill, needsRenew, outcomeFromExitCode, parseCpuList, permissionModeProblem, permissionModeProblems, placeholderProblem, placeholderQueues, prepareBranch, prepareResume, prepareRunnerInit, probeCommand, probeHelper, probeMicroVmCommand, provisionContainer, provisionEnvironment, provisionMicroVm, reachDockerStep, readConfigObject, readCpuUsec, readDefinitions, readProvisionOut, readRecords, recoverLostJobs, releaseLease, removeOldestUntil, renewLease, resolveHostBuild, restartSender, restoreSessionIntoContainer, restoreSessionIntoMicroVm, retryFailedReleases, runCommand, runHook, runHostChecks, runHousekeeping, runRunnerInit, runWithSpawn, sampleGuest, savedStatesDir, scrubReason, serveLease, setStage, setUpRunnerCgroup, shellQuote, startHostServices, startMicroVmCommand, startSender, startServicesFor, stopOrphanedMicroVms, stoppedHelperReason, stripTerminalControls, supportsContainerBuilds, supportsMicroVmBuilds, sweepImageBuilders, testProofIn, timeoutAfter, unfinishedJobs, usableCpus, vmAlive, withTunnelLog, workdirProblem, writeGuestGhConfig, writeRunnerInit };
|
|
11902
|
+
export { ADOPTED_FETCH_RETRY_WINDOW_MS, ALREADY_RELEASED, AttemptLogBook, EXIT_CODE_FILE, GUEST_USAGE_INTERVAL_MS, HELPER_ENV, KIND_LABEL, LEASE_SECONDS, MAX_CHECK_ITEMS_BYTES, MICROVM_COMMAND_DIR, MIN_ENGINE_MAJOR, PLACEHOLDER_MARKER, RENEW_INTERVAL_SECONDS, RunnerInitError, agentCredentialCheck, appendCommandLog, attemptNote, checksIn, claimPermissionProblem, commandItems, commandLogOffset, containerCommandExec, createContainerRuntime, createHousekeepingDocker, createLeaseChannel, currentSkillCommand, decideHostBuildSkill, deliverCommitHooks, deliverContainerHooks, deliverExecMaven, deliverJobFiles, describeHookEnd, describeMachineDocker, detectMachine, ensureFirecrackerAndJailer, ensureNetworkReady, ensureTunnel, execArgv, execCommandLine, fetchManagedBuildSettings, fetchManagedClaudeKey, filesAreCopied, finishJob, foldSample, formerSkillProblem, formerSkillQueues, freeItemDisksUntil, gitRemoteFor, helperFirecrackerNote, helperSocketPath, holdManagedBuildSettings, holdManagedClaudeKey, hookLimitsFor, hostCommandEnvironment, hostEnvironment, housekeepingDockerIfReachable, inTeardown, installTrust, isContainerTracked, isGroupAlive, isIdle, isJudgeCheck, isMicroVmTracked, isPlaceholderCommand, isReadable, isTimedOut, isTracked, isUnfinished, itemScope, itemTag, jobEnv, jobRecordsClaim, judgeProbe, keepGhConfigCurrent, leaseExpiresAtMs, leaseTimeLeftMs, lifecycleFailureReason, lifecycleSteps, listAdoptableJobs, listItemDisks, listTrackedJobs, listUnreadableJobs, listenOnBroker, makeRecorder, managedBuildSettingsFor, measureDisk, microVmArchSupported, microVmAssetsPinned, microVmCommandLine, microVmOomKills, missingPermissionFix, missingPermissionOf, modellessProblem, modellessQueues, needsAgentCredential, needsBuildSkill, needsRenew, outcomeFromExitCode, parseCpuList, permissionModeProblem, permissionModeProblems, placeholderProblem, placeholderQueues, prepareBranch, prepareResume, prepareRunnerInit, probeCommand, probeHelper, probeMicroVmCommand, provisionContainer, provisionEnvironment, provisionMicroVm, reachDockerStep, readConfigObject, readCpuUsec, readDefinitions, readProvisionOut, readRecords, recoverLostJobs, releaseLease, removeOldestUntil, renewLease, resolveHostBuild, restartSender, restoreSessionIntoContainer, restoreSessionIntoMicroVm, retryFailedReleases, runCommand, runHook, runHostChecks, runHousekeeping, runRunnerInit, runWithSpawn, sampleGuest, savedStatesDir, scrubReason, serveLease, setStage, setUpRunnerCgroup, shellQuote, startHostServices, startMicroVmCommand, startSender, startServicesFor, stopOrphanedMicroVms, stoppedHelperReason, stripTerminalControls, supportsContainerBuilds, supportsMicroVmBuilds, sweepImageBuilders, testProofIn, timeoutAfter, unfinishedJobs, usableCpus, vmAlive, withTunnelLog, workdirProblem, writeGuestGhConfig, writeRunnerInit };
|
|
@@ -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-GLJX2CZY.js';
|
|
4
4
|
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-HU3POMM4.js';
|
|
5
5
|
import { getJson, WorkCommandError } from './chunk-GMRIR2MF.js';
|
|
6
6
|
import { isBuiltinVm, builtinKind, EGRESS_SWITCHABLE_KEYS, imageBuildOf, keepsHostBuilder } from './chunk-SKV6FO37.js';
|
|
@@ -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-GLJX2CZY.js';
|
|
4
4
|
import { UNIT_MARKER } from './chunk-HU3POMM4.js';
|
|
5
5
|
import { runnerDir } from './chunk-2C3XLYO5.js';
|
|
6
6
|
import { createHash } from 'crypto';
|
|
@@ -5,12 +5,12 @@ import { writePendingUpdate } from './chunk-SUMRSD2Q.js';
|
|
|
5
5
|
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-L25GQH45.js';
|
|
6
6
|
import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
|
|
7
7
|
import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-E7R2GIAW.js';
|
|
8
|
-
import { reportFailedStart, fitImageBuildMemory } from './chunk-
|
|
9
|
-
import { renderUpdateSteps } from './chunk-
|
|
10
|
-
import { RUNNER_PROTOCOL } from './chunk-
|
|
11
|
-
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-
|
|
8
|
+
import { reportFailedStart, fitImageBuildMemory } from './chunk-EOVVSXRH.js';
|
|
9
|
+
import { renderUpdateSteps } from './chunk-XQSTN7NG.js';
|
|
10
|
+
import { RUNNER_PROTOCOL } from './chunk-OVHBDADU.js';
|
|
11
|
+
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-OCDG3ZWH.js';
|
|
12
12
|
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-HOCVTWV2.js';
|
|
13
|
-
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, releaseLease, LEASE_SECONDS, itemTag, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, setStage, jobEnv, runHook, describeHookEnd, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionMicroVm, deliverCommitHooks, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, currentSkillCommand, formerSkillProblem, MICROVM_COMMAND_DIR, commandLogOffset, startMicroVmCommand, microVmCommandLine, runCommand, containerCommandExec, execCommandLine, startSender, startHostServices, finishJob, sampleGuest, foldSample, isContainerTracked, isMicroVmTracked, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, HELPER_ENV, setUpRunnerCgroup, stopOrphanedMicroVms, unfinishedJobs, sweepImageBuilders, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, usableCpus, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied, restartSender, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, vmAlive, writeGuestGhConfig, shellQuote, deliverJobFiles, inTeardown } from './chunk-
|
|
13
|
+
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, releaseLease, LEASE_SECONDS, itemTag, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, setStage, jobEnv, runHook, describeHookEnd, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionMicroVm, deliverCommitHooks, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, currentSkillCommand, formerSkillProblem, MICROVM_COMMAND_DIR, commandLogOffset, startMicroVmCommand, microVmCommandLine, runCommand, containerCommandExec, execCommandLine, startSender, startHostServices, finishJob, sampleGuest, foldSample, isContainerTracked, isMicroVmTracked, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, HELPER_ENV, setUpRunnerCgroup, stopOrphanedMicroVms, unfinishedJobs, sweepImageBuilders, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, listItemDisks, usableCpus, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied, restartSender, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, vmAlive, writeGuestGhConfig, shellQuote, deliverJobFiles, inTeardown } from './chunk-GLJX2CZY.js';
|
|
14
14
|
import { RUNNER_RESERVE_BYTES } from './chunk-HU3POMM4.js';
|
|
15
15
|
import { RepoFilter } from './chunk-H6H5GCM6.js';
|
|
16
16
|
import { JOB_STATE_FORMAT, readsJobState, jobStateFormatOf } from './chunk-ZVB57WI6.js';
|
|
@@ -86,6 +86,19 @@ function heldImages(configPath) {
|
|
|
86
86
|
}
|
|
87
87
|
return [...held].sort().slice(0, MAX_IMAGES);
|
|
88
88
|
}
|
|
89
|
+
var MAX_DISKS = 500;
|
|
90
|
+
var WORK_ITEM_UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
91
|
+
function heldItemDisks(configPath) {
|
|
92
|
+
const held = /* @__PURE__ */ new Set();
|
|
93
|
+
for (const scope of storeScopes(configPath)) {
|
|
94
|
+
if (scope === void 0) continue;
|
|
95
|
+
for (const kept of listItemDisks(configPath, scope)) {
|
|
96
|
+
const id = kept.record.workItemId.toLowerCase();
|
|
97
|
+
if (WORK_ITEM_UUID.test(id)) held.add(id);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return [...held].sort().slice(0, MAX_DISKS);
|
|
101
|
+
}
|
|
89
102
|
|
|
90
103
|
// src/runner/fleet/loop.ts
|
|
91
104
|
var FLEET_CALL_TIMEOUT_MS = 2e4;
|
|
@@ -175,13 +188,14 @@ function parseAnswer(data) {
|
|
|
175
188
|
...typeof data.runnerVersion === "string" ? { runnerVersion: data.runnerVersion } : {}
|
|
176
189
|
};
|
|
177
190
|
}
|
|
178
|
-
async function callFleetRoute(ports, memory, room, images) {
|
|
191
|
+
async function callFleetRoute(ports, memory, room, images, disks) {
|
|
179
192
|
const config = ports.config();
|
|
180
193
|
const hostKey = await ensureHostKey(config.configPath);
|
|
181
194
|
const body = {
|
|
182
195
|
total: room.total,
|
|
183
196
|
free: room.free,
|
|
184
197
|
images,
|
|
198
|
+
disks,
|
|
185
199
|
cliVersion: ports.cliVersion,
|
|
186
200
|
runnerProtocol: RUNNER_PROTOCOL,
|
|
187
201
|
// The first accepted call binds the machine to this host's key; the calls after it are signed and need not repeat it.
|
|
@@ -226,9 +240,10 @@ async function runFleetTick(ports, memory) {
|
|
|
226
240
|
const held = await ports.held();
|
|
227
241
|
memory.held = held;
|
|
228
242
|
const images = ports.images();
|
|
243
|
+
const disks = ports.disks();
|
|
229
244
|
for (let called = 0; called < MAX_CLAIMS_PER_POLL; called++) {
|
|
230
245
|
const room = fleetRoom(ports.facts(), ports.jobs(), held, ports.draining());
|
|
231
|
-
const answer = await callFleetRoute(ports, memory, room, images);
|
|
246
|
+
const answer = await callFleetRoute(ports, memory, room, images, disks);
|
|
232
247
|
if (answer === void 0) return;
|
|
233
248
|
memory.last = {
|
|
234
249
|
calledAt: ports.now().toISOString(),
|
|
@@ -265,7 +280,7 @@ async function runFleetKeepalive(ports, memory, minGapMs) {
|
|
|
265
280
|
if (memory.lastAnsweredMs !== void 0 && ports.now().getTime() - memory.lastAnsweredMs < minGapMs) return;
|
|
266
281
|
if (memory.keyDoubted || fleetConfigProblem(ports.config()) !== void 0) return;
|
|
267
282
|
const room = fleetRoom(ports.facts(), ports.jobs(), memory.held, ports.draining());
|
|
268
|
-
const answer = await callFleetRoute(ports, memory, { total: room.total, free: NO_ROOM }, ports.images());
|
|
283
|
+
const answer = await callFleetRoute(ports, memory, { total: room.total, free: NO_ROOM }, ports.images(), ports.disks());
|
|
269
284
|
if (answer === void 0) return;
|
|
270
285
|
memory.last = {
|
|
271
286
|
calledAt: ports.now().toISOString(),
|
|
@@ -921,6 +936,37 @@ function settleUpdate(args) {
|
|
|
921
936
|
args.log.error(`could not keep the update to ${marker.to}: ${messageOf(err)}`);
|
|
922
937
|
}
|
|
923
938
|
}
|
|
939
|
+
|
|
940
|
+
// src/runner/housekeeping/item-states.ts
|
|
941
|
+
var MAX_ITEM_STATE_IDS = 1e3;
|
|
942
|
+
var ITEM_STATES_TIMEOUT_MS = 2e4;
|
|
943
|
+
var FLEET_PATH = "/v1/fleet/item-states";
|
|
944
|
+
var RUNNER_PATH = "/v1/runner/item-states";
|
|
945
|
+
async function askItemStates(config, fetchImpl, ids, options = {}) {
|
|
946
|
+
try {
|
|
947
|
+
const hostKey = await ensureHostKey(config.configPath);
|
|
948
|
+
const fleet = config.fleet === true;
|
|
949
|
+
const { data } = await postJson(
|
|
950
|
+
config.url,
|
|
951
|
+
fleet ? FLEET_PATH : RUNNER_PATH,
|
|
952
|
+
config.apiKey,
|
|
953
|
+
fleet ? "" : config.appId ?? "",
|
|
954
|
+
{ workItemIds: ids.slice(0, MAX_ITEM_STATE_IDS) },
|
|
955
|
+
fetchImpl,
|
|
956
|
+
options.timeoutMs ?? ITEM_STATES_TIMEOUT_MS,
|
|
957
|
+
hostKey.signer
|
|
958
|
+
);
|
|
959
|
+
const states = data.states;
|
|
960
|
+
if (typeof states !== "object" || states === null || Array.isArray(states)) return void 0;
|
|
961
|
+
const known = {};
|
|
962
|
+
for (const [id, state] of Object.entries(states)) {
|
|
963
|
+
if (state === "open" || state === "closed") known[id] = state;
|
|
964
|
+
}
|
|
965
|
+
return known;
|
|
966
|
+
} catch {
|
|
967
|
+
return void 0;
|
|
968
|
+
}
|
|
969
|
+
}
|
|
924
970
|
var HOOKS_DIR_NAME = "git-hooks";
|
|
925
971
|
var CO_AUTHOR_FILE = "co-author";
|
|
926
972
|
var HOOKS = [
|
|
@@ -2018,6 +2064,7 @@ function fleetPortsOf(state) {
|
|
|
2018
2064
|
jobs: () => [...state.jobs.values()].map((active) => active.job.size === void 0 ? {} : { size: active.job.size }),
|
|
2019
2065
|
facts: () => fleetFactsOf(state),
|
|
2020
2066
|
images: () => heldImages(state.config.configPath),
|
|
2067
|
+
disks: () => heldItemDisks(state.config.configPath),
|
|
2021
2068
|
applyStops: (stops) => applyStops(state, stops),
|
|
2022
2069
|
considerVersion: (named) => considerNamedVersion(state, named),
|
|
2023
2070
|
revoked: () => endRevokedBuilds(state),
|
|
@@ -2150,6 +2197,7 @@ async function housekeepingPass(state) {
|
|
|
2150
2197
|
workspaceMax: config.workspaceMax,
|
|
2151
2198
|
workspaceOrgMax: config.workspaceOrgMax,
|
|
2152
2199
|
workspaceKeepDays: config.workspaceKeepDays,
|
|
2200
|
+
itemStates: (ids) => askItemStates(state.config, state.deps.fetchImpl, ids),
|
|
2153
2201
|
removeHostBuilder: !hostBuilder,
|
|
2154
2202
|
docker,
|
|
2155
2203
|
now: state.deps.now ?? (() => /* @__PURE__ */ new Date()),
|
|
@@ -2377,7 +2425,7 @@ async function startClaimedBuild(state, item, queue, data, fleet) {
|
|
|
2377
2425
|
log.line(`${tag}: ${entry.repository} is left out of this build because its GitHub App installation is suspended`);
|
|
2378
2426
|
}
|
|
2379
2427
|
try {
|
|
2380
|
-
await startJob(state, item, queue, claimId, itemKey, branch, identity, repositories, fleet, data.freshDisk === true);
|
|
2428
|
+
await startJob(state, item, queue, claimId, itemKey, branch, identity, repositories, fleet, data.freshDisk === true, data.diskHeldElsewhere === true);
|
|
2381
2429
|
} catch (err) {
|
|
2382
2430
|
const stranded = [...state.jobs.values()].find((active) => active.job.claimId === claimId);
|
|
2383
2431
|
if (stranded === void 0) throw err;
|
|
@@ -2434,7 +2482,7 @@ async function prepareSession(state, active, item, queue, tag) {
|
|
|
2434
2482
|
return void 0;
|
|
2435
2483
|
}
|
|
2436
2484
|
}
|
|
2437
|
-
async function startJob(state, item, queue, claimId, itemKey, branch, identity, claimed, fleet, freshDisk) {
|
|
2485
|
+
async function startJob(state, item, queue, claimId, itemKey, branch, identity, claimed, fleet, freshDisk, diskHeldElsewhere) {
|
|
2438
2486
|
const log = logOf(state);
|
|
2439
2487
|
const startedAt = nowOf(state);
|
|
2440
2488
|
const repositories = repositoriesOf({ repositories: claimed, repository: item.specRepository, branch });
|
|
@@ -2454,6 +2502,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
2454
2502
|
// The work item the kept session belongs to. A fleet claim names it too, from the same listing.
|
|
2455
2503
|
workItemId: item.id,
|
|
2456
2504
|
...freshDisk ? { freshDisk: true } : {},
|
|
2505
|
+
...diskHeldElsewhere ? { diskHeldElsewhere: true } : {},
|
|
2457
2506
|
...fleet === void 0 ? {} : { appId: fleet.appId, organizationId: fleet.organizationId, size: fleet.size },
|
|
2458
2507
|
...primary === void 0 ? {} : { repository: primary.repository, repositories },
|
|
2459
2508
|
startedAt: startedAt.toISOString()
|
|
@@ -2554,6 +2603,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
2554
2603
|
queue,
|
|
2555
2604
|
workItemId: item.id,
|
|
2556
2605
|
...freshDisk ? { fresh: true } : {},
|
|
2606
|
+
...diskHeldElsewhere ? { diskHeldElsewhere: true } : {},
|
|
2557
2607
|
item,
|
|
2558
2608
|
itemKey,
|
|
2559
2609
|
tokens,
|
|
@@ -2599,6 +2649,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
2599
2649
|
queue,
|
|
2600
2650
|
workItemId: item.id,
|
|
2601
2651
|
...freshDisk ? { fresh: true } : {},
|
|
2652
|
+
...diskHeldElsewhere ? { diskHeldElsewhere: true } : {},
|
|
2602
2653
|
item,
|
|
2603
2654
|
itemKey,
|
|
2604
2655
|
tokens,
|
|
@@ -3601,7 +3652,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
3601
3652
|
check: update.check ? () => update.check(configPath) : async () => {
|
|
3602
3653
|
const held = runnerAgents(deps.agents).flatMap((agent) => heldAgentCredential(agent.descriptor.id) ?? []);
|
|
3603
3654
|
const env = { ...process.env, ...Object.fromEntries(held.map((credential) => [credential.variable, credential.value])) };
|
|
3604
|
-
return (await import('./check-
|
|
3655
|
+
return (await import('./check-CZM3LZ7Y.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
|
|
3605
3656
|
},
|
|
3606
3657
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
3607
3658
|
log
|
|
@@ -1079,7 +1079,7 @@ async function gatherDoctorChecks() {
|
|
|
1079
1079
|
const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
|
|
1080
1080
|
checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
|
|
1081
1081
|
} else if (hasRunnerBlock(configPath)) {
|
|
1082
|
-
const { runnerHostChecks } = await import('./doctor-
|
|
1082
|
+
const { runnerHostChecks } = await import('./doctor-NILQ2RUT.js');
|
|
1083
1083
|
const gateway = (() => {
|
|
1084
1084
|
try {
|
|
1085
1085
|
const loaded = loadRunnerConfig(configPath);
|
|
@@ -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-GLJX2CZY.js';
|
|
4
4
|
import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-2RKPEUGK.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 { 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-WHPMCF7R.js';
|
|
4
4
|
import './chunk-2FDWTE6F.js';
|
|
5
5
|
import { verifiedTrackerNames, TRACKERS } from './chunk-GMRIR2MF.js';
|
|
6
6
|
import './chunk-IJN3GP4M.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-ZT2PXGPD.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-ZT2PXGPD.js');
|
|
3954
3954
|
const code = await runInitCommand(
|
|
3955
3955
|
{ json: opts.json, factory: opts.factory, shellFunction: opts.shellFunction },
|
|
3956
3956
|
{
|
|
@@ -5046,7 +5046,7 @@ stops at once if a tracked file differs from HEAD.
|
|
|
5046
5046
|
fail(trackerNumberError("--pr", opts.pr));
|
|
5047
5047
|
return;
|
|
5048
5048
|
}
|
|
5049
|
-
const { runWorkProofsCommand } = await import('./work-proofs-cmd-
|
|
5049
|
+
const { runWorkProofsCommand } = await import('./work-proofs-cmd-UQU6SSFD.js');
|
|
5050
5050
|
await runWorkProofsCommand({ ...opts, ...pr === void 0 ? {} : { pr } });
|
|
5051
5051
|
});
|
|
5052
5052
|
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) => {
|
|
@@ -5071,7 +5071,7 @@ by a different key is refused; claiming again with the same key extends
|
|
|
5071
5071
|
it. --host is a label only.
|
|
5072
5072
|
`
|
|
5073
5073
|
).action(async (opts) => {
|
|
5074
|
-
const { runWorkClaim, WorkCommandError } = await import('./work-claim-cmd-
|
|
5074
|
+
const { runWorkClaim, WorkCommandError } = await import('./work-claim-cmd-7TLC4DKU.js');
|
|
5075
5075
|
try {
|
|
5076
5076
|
await runWorkClaim(opts);
|
|
5077
5077
|
} catch (err) {
|
|
@@ -5091,7 +5091,7 @@ Extends the live lease this API key holds. Refused with a 410 if the
|
|
|
5091
5091
|
lease has expired, or a 403 if a different key holds it.
|
|
5092
5092
|
`
|
|
5093
5093
|
).action(async (opts) => {
|
|
5094
|
-
const { runWorkRenew, WorkCommandError } = await import('./work-claim-cmd-
|
|
5094
|
+
const { runWorkRenew, WorkCommandError } = await import('./work-claim-cmd-7TLC4DKU.js');
|
|
5095
5095
|
try {
|
|
5096
5096
|
await runWorkRenew(opts);
|
|
5097
5097
|
} catch (err) {
|
|
@@ -5123,7 +5123,7 @@ applies to a host's lease only. A later tool call in the session
|
|
|
5123
5123
|
takes the lease again.
|
|
5124
5124
|
`
|
|
5125
5125
|
).action(async (opts) => {
|
|
5126
|
-
const { runWorkRelease, WorkCommandError } = await import('./work-claim-cmd-
|
|
5126
|
+
const { runWorkRelease, WorkCommandError } = await import('./work-claim-cmd-7TLC4DKU.js');
|
|
5127
5127
|
try {
|
|
5128
5128
|
await runWorkRelease(opts);
|
|
5129
5129
|
} catch (err) {
|
|
@@ -5209,7 +5209,7 @@ function registerRunnerCommands(program2) {
|
|
|
5209
5209
|
const configOption = "the cloud config file to run against (default: ~/.outerlayer/config.json)";
|
|
5210
5210
|
runnerCmd.command("start").description("Run the loop: claim work, run it, report, clean up, repeat").option("--config <path>", configOption).action(async (opts) => {
|
|
5211
5211
|
const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-J4NNZ2XO.js');
|
|
5212
|
-
const { start, RunnerStartError } = await import('./loop-
|
|
5212
|
+
const { start, RunnerStartError } = await import('./loop-HTKTSGBA.js');
|
|
5213
5213
|
const { RunnerAlreadyRunningError } = await import('./pidfile-3BILBCEO.js');
|
|
5214
5214
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
5215
5215
|
try {
|
|
@@ -5233,8 +5233,8 @@ The image sets OUTERLAYER_RUNNER_IMAGE; outside the image, use \`runner start\`.
|
|
|
5233
5233
|
`
|
|
5234
5234
|
).action(async () => {
|
|
5235
5235
|
const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-J4NNZ2XO.js');
|
|
5236
|
-
const { containerStart, containerStartExit } = await import('./container-start-
|
|
5237
|
-
const { start, RunnerStartError } = await import('./loop-
|
|
5236
|
+
const { containerStart, containerStartExit } = await import('./container-start-RZSGWDZG.js');
|
|
5237
|
+
const { start, RunnerStartError } = await import('./loop-HTKTSGBA.js');
|
|
5238
5238
|
const { RunnerAlreadyRunningError } = await import('./pidfile-3BILBCEO.js');
|
|
5239
5239
|
try {
|
|
5240
5240
|
const outcome = containerStartExit(await containerStart({
|
|
@@ -5258,14 +5258,14 @@ The image sets OUTERLAYER_RUNNER_IMAGE; outside the image, use \`runner start\`.
|
|
|
5258
5258
|
).action(async (opts) => {
|
|
5259
5259
|
const { defaultRunnerConfigPath } = await import('./config-J4NNZ2XO.js');
|
|
5260
5260
|
const { runnerDir } = await import('./paths-6AMRSXZK.js');
|
|
5261
|
-
const { runUpdateSteps } = await import('./update-steps-
|
|
5261
|
+
const { runUpdateSteps } = await import('./update-steps-WD25IX2R.js');
|
|
5262
5262
|
const text = await runUpdateSteps({ runnerDirPath: runnerDir(opts.config ?? defaultRunnerConfigPath()) });
|
|
5263
5263
|
process.stdout.write(`${text}
|
|
5264
5264
|
`);
|
|
5265
5265
|
});
|
|
5266
5266
|
runnerCmd.command("check").description("Validate the config, the hooks and the key, and print the effective settings").option("--config <path>", configOption).action(async (opts) => {
|
|
5267
5267
|
const { defaultRunnerConfigPath } = await import('./config-J4NNZ2XO.js');
|
|
5268
|
-
const { runRunnerCheck } = await import('./check-
|
|
5268
|
+
const { runRunnerCheck } = await import('./check-CZM3LZ7Y.js');
|
|
5269
5269
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
5270
5270
|
const result = await runRunnerCheck(configPath);
|
|
5271
5271
|
if (!result.ok) {
|
|
@@ -5299,13 +5299,13 @@ The image sets OUTERLAYER_RUNNER_IMAGE; outside the image, use \`runner start\`.
|
|
|
5299
5299
|
}
|
|
5300
5300
|
}
|
|
5301
5301
|
const buildCpusMax = opts.buildCpusMax === void 0 ? void 0 : Number(opts.buildCpusMax);
|
|
5302
|
-
if (buildCpusMax !== void 0 && !(await import('./command-
|
|
5302
|
+
if (buildCpusMax !== void 0 && !(await import('./command-ZOWMTOWA.js')).cpusAreValid(buildCpusMax)) {
|
|
5303
5303
|
fail(`--build-cpus-max ${opts.buildCpusMax} is not a number of CPUs from 0.01 to 1024.`);
|
|
5304
5304
|
return;
|
|
5305
5305
|
}
|
|
5306
5306
|
try {
|
|
5307
5307
|
if (opts.service === true) {
|
|
5308
|
-
const { installServiceCommand } = await import('./command-
|
|
5308
|
+
const { installServiceCommand } = await import('./command-ZOWMTOWA.js');
|
|
5309
5309
|
const result2 = await installServiceCommand({
|
|
5310
5310
|
configPath,
|
|
5311
5311
|
print: opts.print,
|
|
@@ -5363,7 +5363,7 @@ To keep it running, run ${C.yellow}${cliInvocation()} runner install --service${
|
|
|
5363
5363
|
return;
|
|
5364
5364
|
}
|
|
5365
5365
|
const { defaultRunnerConfigPath } = await import('./config-J4NNZ2XO.js');
|
|
5366
|
-
const { uninstallServiceCommand } = await import('./command-
|
|
5366
|
+
const { uninstallServiceCommand } = await import('./command-ZOWMTOWA.js');
|
|
5367
5367
|
const result = await uninstallServiceCommand({ configPath: opts.config ?? defaultRunnerConfigPath(), unitName: opts.unitName, home: homeFromEnv() });
|
|
5368
5368
|
if (result.ok) for (const line of result.lines) process.stdout.write(`${C.green}\u2713${C.reset} ${line}
|
|
5369
5369
|
`);
|
|
@@ -5394,10 +5394,10 @@ already in ${words().envFile} is used.
|
|
|
5394
5394
|
`
|
|
5395
5395
|
).action(async (opts) => {
|
|
5396
5396
|
const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-J4NNZ2XO.js');
|
|
5397
|
-
const { prepareRunnerInit, runRunnerInit, RunnerInitError, writeRunnerInit } = await import('./init-
|
|
5398
|
-
const { obtainRunnerKey, runnerKeyLogin } = await import('./runner-key-
|
|
5399
|
-
const { detectMachine } = await import('./machine-
|
|
5400
|
-
const { chooseVm, runVmInit, VmInitError } = await import('./init-
|
|
5397
|
+
const { prepareRunnerInit, runRunnerInit, RunnerInitError, writeRunnerInit } = await import('./init-5ERGXSUD.js');
|
|
5398
|
+
const { obtainRunnerKey, runnerKeyLogin } = await import('./runner-key-VCWF2EN7.js');
|
|
5399
|
+
const { detectMachine } = await import('./machine-RBYGRRSM.js');
|
|
5400
|
+
const { chooseVm, runVmInit, VmInitError } = await import('./init-7OHFUQBV.js');
|
|
5401
5401
|
const { credentialFromStdin, isAgentName, restartForCredential, RunnerEnvError } = await import('./runner-env-72OTIZV2.js');
|
|
5402
5402
|
const { headlessNames } = await import('./runner-agents-FQ4FODZN.js');
|
|
5403
5403
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
@@ -5411,7 +5411,7 @@ already in ${words().envFile} is used.
|
|
|
5411
5411
|
return;
|
|
5412
5412
|
}
|
|
5413
5413
|
try {
|
|
5414
|
-
const { agentCredentialText, credentialQuestion, initAgent, terminalQuestion } = await import('./init-agent-
|
|
5414
|
+
const { agentCredentialText, credentialQuestion, initAgent, terminalQuestion } = await import('./init-agent-B5ADPZIB.js');
|
|
5415
5415
|
agent = await initAgent({
|
|
5416
5416
|
flag: agent,
|
|
5417
5417
|
handOff: opts.configStdin === true,
|
|
@@ -5550,7 +5550,7 @@ ${C.yellow}The runner will not update itself: ${installErr.message}${C.reset}
|
|
|
5550
5550
|
let serviceUp = false;
|
|
5551
5551
|
let restart;
|
|
5552
5552
|
if (installedLayout) {
|
|
5553
|
-
const { installServiceCommand } = await import('./command-
|
|
5553
|
+
const { installServiceCommand } = await import('./command-ZOWMTOWA.js');
|
|
5554
5554
|
const service = await installServiceCommand({
|
|
5555
5555
|
configPath,
|
|
5556
5556
|
entryPath: process.argv[1] ?? "",
|
|
@@ -5688,7 +5688,7 @@ A repository with no devcontainer file builds on the universal image the CLI pin
|
|
|
5688
5688
|
});
|
|
5689
5689
|
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) => {
|
|
5690
5690
|
const { defaultRunnerConfigPath } = await import('./config-J4NNZ2XO.js');
|
|
5691
|
-
const { requestStop } = await import('./loop-
|
|
5691
|
+
const { requestStop } = await import('./loop-HTKTSGBA.js');
|
|
5692
5692
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
5693
5693
|
const { runnerImageVersion } = await import('./image-tag-5Z2NKCHC.js');
|
|
5694
5694
|
await requestStop(configPath, Boolean(opts.now), void 0, { image: runnerImageVersion() !== void 0 });
|
|
@@ -5696,8 +5696,8 @@ A repository with no devcontainer file builds on the universal image the CLI pin
|
|
|
5696
5696
|
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) => {
|
|
5697
5697
|
const { defaultRunnerConfigPath, loadRunnerConfig } = await import('./config-J4NNZ2XO.js');
|
|
5698
5698
|
const { jobsDir, runnerDir } = await import('./paths-6AMRSXZK.js');
|
|
5699
|
-
const { listJobFiles, runnerProcessState } = await import('./loop-
|
|
5700
|
-
const { renderStatus } = await import('./status-
|
|
5699
|
+
const { listJobFiles, runnerProcessState } = await import('./loop-HTKTSGBA.js');
|
|
5700
|
+
const { renderStatus } = await import('./status-HHM6TH6J.js');
|
|
5701
5701
|
const { readHousekeepingRecord } = await import('./record-MV6WJGZT.js');
|
|
5702
5702
|
const path2 = await import('path');
|
|
5703
5703
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
@@ -5763,8 +5763,8 @@ A repository with no devcontainer file builds on the universal image the CLI pin
|
|
|
5763
5763
|
});
|
|
5764
5764
|
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) => {
|
|
5765
5765
|
const { defaultRunnerConfigPath } = await import('./config-J4NNZ2XO.js');
|
|
5766
|
-
const { listJobFiles } = await import('./loop-
|
|
5767
|
-
const { describeAmbiguous, logPathFor, selectAttempt, tail, RunnerLogsError } = await import('./logs-
|
|
5766
|
+
const { listJobFiles } = await import('./loop-HTKTSGBA.js');
|
|
5767
|
+
const { describeAmbiguous, logPathFor, selectAttempt, tail, RunnerLogsError } = await import('./logs-XKEW5EOB.js');
|
|
5768
5768
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
5769
5769
|
const jobs = listJobFiles(configPath);
|
|
5770
5770
|
const selected = selectAttempt(jobs, itemArg);
|
|
@@ -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-GZETHU2Z.js';
|
|
4
|
-
import { installHelper, helperUnitFor, helperSocketFor, uninstallHelper } from './chunk-
|
|
4
|
+
import { installHelper, helperUnitFor, helperSocketFor, uninstallHelper } from './chunk-RVIZRXBK.js';
|
|
5
5
|
import './chunk-MB7IX6DO.js';
|
|
6
6
|
import { currentLink, execStartCommand } from './chunk-HOCVTWV2.js';
|
|
7
|
-
import { detectMachine, ensureFirecrackerAndJailer } from './chunk-
|
|
7
|
+
import { detectMachine, ensureFirecrackerAndJailer } from './chunk-GLJX2CZY.js';
|
|
8
8
|
import './chunk-3B5H5MGB.js';
|
|
9
9
|
import './chunk-2PGI6RDE.js';
|
|
10
10
|
import './chunk-I3LTIAOR.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-EOVVSXRH.js';
|
|
4
|
+
import { readOwnContainer } from './chunk-XQSTN7NG.js';
|
|
5
|
+
import { detectMachine, supportsContainerBuilds, MIN_ENGINE_MAJOR, describeMachineDocker, RunnerInitError, prepareRunnerInit, writeRunnerInit } from './chunk-GLJX2CZY.js';
|
|
6
6
|
import './chunk-3B5H5MGB.js';
|
|
7
7
|
import './chunk-2PGI6RDE.js';
|
|
8
8
|
import './chunk-I3LTIAOR.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-RVIZRXBK.js';
|
|
4
4
|
import { launcherCheck } from './chunk-MB7IX6DO.js';
|
|
5
|
-
import { managedProblems, fleetConfigProblem, askFleetMachine } from './chunk-
|
|
5
|
+
import { managedProblems, fleetConfigProblem, askFleetMachine } from './chunk-OCDG3ZWH.js';
|
|
6
6
|
import './chunk-HOCVTWV2.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-GLJX2CZY.js';
|
|
8
8
|
import './chunk-3B5H5MGB.js';
|
|
9
9
|
import './chunk-2PGI6RDE.js';
|
|
10
10
|
import './chunk-I3LTIAOR.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { MAX_CHECK_ITEMS_BYTES, checksIn, commandItems, isJudgeCheck, makeRecorder, readDefinitions, runHostChecks, testProofIn, timeoutAfter } from './chunk-
|
|
3
|
+
export { MAX_CHECK_ITEMS_BYTES, checksIn, commandItems, isJudgeCheck, makeRecorder, readDefinitions, runHostChecks, testProofIn, timeoutAfter } from './chunk-GLJX2CZY.js';
|
|
4
4
|
import './chunk-3B5H5MGB.js';
|
|
5
5
|
import './chunk-2PGI6RDE.js';
|
|
6
6
|
import './chunk-I3LTIAOR.js';
|
package/dist/index.js
CHANGED
|
@@ -25,5 +25,5 @@ var { runSubcommand } = await import('./agent-subcommand-KPQGEOPQ.js');
|
|
|
25
25
|
var launcherCode = await runSubcommand(argv);
|
|
26
26
|
if (launcherCode !== void 0) process.exit(launcherCode);
|
|
27
27
|
(await import('./hook-fast-RNST4WJH.js')).recordLinkExitFailure(argv);
|
|
28
|
-
var { runCli } = await import('./cli-
|
|
28
|
+
var { runCli } = await import('./cli-YMSYVF7O.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-GLJX2CZY.js';
|
|
4
4
|
import './chunk-3B5H5MGB.js';
|
|
5
5
|
import './chunk-2PGI6RDE.js';
|
|
6
6
|
import './chunk-I3LTIAOR.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-GLJX2CZY.js';
|
|
5
5
|
import './chunk-3B5H5MGB.js';
|
|
6
6
|
import './chunk-2PGI6RDE.js';
|
|
7
7
|
import './chunk-I3LTIAOR.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-GLJX2CZY.js';
|
|
4
4
|
import './chunk-3B5H5MGB.js';
|
|
5
5
|
import './chunk-2PGI6RDE.js';
|
|
6
6
|
import './chunk-I3LTIAOR.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-WHPMCF7R.js';
|
|
4
4
|
import { shellFunctionInstalled, removeShellFunction, installShellFunction, SHELL_FUNCTION_LINE } from './chunk-2QIK3JRV.js';
|
|
5
5
|
import './chunk-2FDWTE6F.js';
|
|
6
6
|
import './chunk-GMRIR2MF.js';
|
|
@@ -13,7 +13,7 @@ import './chunk-352DHUTP.js';
|
|
|
13
13
|
import './chunk-QAFR65VC.js';
|
|
14
14
|
import './chunk-2JIGPSVF.js';
|
|
15
15
|
import './chunk-Z5GEFMRW.js';
|
|
16
|
-
import { existsSync, watch, statSync, createReadStream } from 'fs';
|
|
16
|
+
import { existsSync, watch, statSync, createReadStream, readdirSync } from 'fs';
|
|
17
17
|
import { join } from 'path';
|
|
18
18
|
|
|
19
19
|
createRequire(import.meta.url);
|
|
@@ -52,10 +52,25 @@ function describeAmbiguous(argument, attempts) {
|
|
|
52
52
|
const rows = attempts.map(({ job }) => ` organization ${job.organizationId ?? "(none)"} claim ${job.claimId} factory ${job.appId ?? "(none)"} started ${job.startedAt}`);
|
|
53
53
|
return [`#${argument} is the number of builds of more than one factory. Run \`outerlayer runner logs <claim id>\` with one of these claim ids:`, ...rows].join("\n");
|
|
54
54
|
}
|
|
55
|
+
function latestJudgeLog(dirPath) {
|
|
56
|
+
let best = 1;
|
|
57
|
+
let name = "judge.log";
|
|
58
|
+
try {
|
|
59
|
+
for (const entry of readdirSync(dirPath)) {
|
|
60
|
+
const group = /^judge-(\d+)\.log$/.exec(entry);
|
|
61
|
+
if (group !== null && Number(group[1]) > best) {
|
|
62
|
+
best = Number(group[1]);
|
|
63
|
+
name = entry;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
} catch {
|
|
67
|
+
}
|
|
68
|
+
return name;
|
|
69
|
+
}
|
|
55
70
|
function logPathFor(configPath, dirName, job) {
|
|
56
71
|
const dirPath = join(jobsDir(configPath), dirName);
|
|
57
72
|
const finished = job.outcome !== void 0 || job.endedAt !== void 0;
|
|
58
|
-
const byStage = finished || job.stage === void 0 ? "command.log" : STAGE_LOG[job.stage];
|
|
73
|
+
const byStage = finished || job.stage === void 0 ? "command.log" : job.stage === "judge" ? latestJudgeLog(dirPath) : STAGE_LOG[job.stage];
|
|
59
74
|
const candidate = join(dirPath, byStage);
|
|
60
75
|
if (existsSync(candidate)) return candidate;
|
|
61
76
|
const command = join(dirPath, "command.log");
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { LAPSED_REASON, RunnerStartError, fleetKeepalive, leaseTimeLeftFor, listJobFiles, logUnusableHelper, prepareSession, probeBuild, probeCredentials, requestStop, runnerProcessState, runtimeOf, sampleUsage, start, tick, watchTick } from './chunk-
|
|
3
|
+
export { LAPSED_REASON, RunnerStartError, fleetKeepalive, leaseTimeLeftFor, listJobFiles, logUnusableHelper, prepareSession, probeBuild, probeCredentials, requestStop, runnerProcessState, runtimeOf, sampleUsage, start, tick, watchTick } from './chunk-TOH7FJH3.js';
|
|
4
4
|
import './chunk-IG7SBYJY.js';
|
|
5
5
|
import './chunk-SUMRSD2Q.js';
|
|
6
6
|
import './chunk-L25GQH45.js';
|
|
7
7
|
import './chunk-3JVYMD4G.js';
|
|
8
8
|
import './chunk-E7R2GIAW.js';
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
9
|
+
import './chunk-EOVVSXRH.js';
|
|
10
|
+
import './chunk-XQSTN7NG.js';
|
|
11
|
+
import './chunk-OVHBDADU.js';
|
|
12
|
+
import './chunk-OCDG3ZWH.js';
|
|
13
13
|
import './chunk-HOCVTWV2.js';
|
|
14
|
-
import './chunk-
|
|
14
|
+
import './chunk-GLJX2CZY.js';
|
|
15
15
|
import './chunk-3B5H5MGB.js';
|
|
16
16
|
import './chunk-2PGI6RDE.js';
|
|
17
17
|
import './chunk-I3LTIAOR.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-GLJX2CZY.js';
|
|
4
4
|
import './chunk-3B5H5MGB.js';
|
|
5
5
|
import './chunk-2PGI6RDE.js';
|
|
6
6
|
import './chunk-I3LTIAOR.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-GLJX2CZY.js';
|
|
4
4
|
import './chunk-3B5H5MGB.js';
|
|
5
5
|
import './chunk-2PGI6RDE.js';
|
|
6
6
|
import './chunk-I3LTIAOR.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-GLJX2CZY.js';
|
|
4
4
|
import './chunk-3B5H5MGB.js';
|
|
5
5
|
import './chunk-2PGI6RDE.js';
|
|
6
6
|
import './chunk-I3LTIAOR.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-XQSTN7NG.js';
|
|
4
|
+
import './chunk-GLJX2CZY.js';
|
|
5
5
|
import './chunk-3B5H5MGB.js';
|
|
6
6
|
import './chunk-2PGI6RDE.js';
|
|
7
7
|
import './chunk-I3LTIAOR.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RUNNER_PROTOCOL } from './chunk-
|
|
3
|
+
import { RUNNER_PROTOCOL } from './chunk-OVHBDADU.js';
|
|
4
4
|
import { resolveCredentials, WorkCommandError, parsePositiveInt, postJson, environmentFacts, findLiveItemForIssue } from './chunk-GMRIR2MF.js';
|
|
5
5
|
export { WorkCommandError } from './chunk-GMRIR2MF.js';
|
|
6
6
|
import './chunk-IJN3GP4M.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, resolveProofsItem, runWorkProofs, runWorkProofsCommand } from './chunk-5YWOGS66.js';
|
|
4
4
|
import './chunk-3B5H5MGB.js';
|
|
5
5
|
import './chunk-GMRIR2MF.js';
|
|
6
6
|
import './chunk-IJN3GP4M.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { resolveProofsItem, ownPullRequest, otherPullRequestHeads, testProofMode, classifyProofsAt, runWorkProofs, proofsCommentId, testFilesOf, freshXmlFiles, joinResults, testSelectors, kindProblem, proofsCommentBody } from './chunk-
|
|
3
|
+
import { resolveProofsItem, ownPullRequest, otherPullRequestHeads, testProofMode, classifyProofsAt, runWorkProofs, proofsCommentId, testFilesOf, freshXmlFiles, joinResults, testSelectors, kindProblem, proofsCommentBody } from './chunk-5YWOGS66.js';
|
|
4
4
|
import { runEmitDemo } from './chunk-J7MMYBBV.js';
|
|
5
5
|
import { readNewestDemo } from './chunk-ER6KQCVJ.js';
|
|
6
6
|
import { runWorkComment } from './chunk-EVFZUFCO.js';
|
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.20261105155912",
|
|
4
4
|
"description": "OuterLayer CLI — commands: init, claude, connect, doctor, login, logout, sync, daemon (alias: watch), emit, demo, findings, work, 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.",
|