@outerlayer/cli 0.34.1-next.20261029194956 → 0.35.0-next.20261029212400
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/{caller-YGK3NKQQ.js → caller-24725IIW.js} +2 -2
- package/dist/{check-ET6SHA6E.js → check-OH235Q4X.js} +15 -14
- package/dist/{chunk-WJPBZFSF.js → chunk-2FHNB4SZ.js} +1 -1
- package/dist/{chunk-HTJR62XR.js → chunk-36C7KAEW.js} +1 -1
- package/dist/{chunk-HQTZGH4P.js → chunk-6XWPVFZM.js} +1 -1
- package/dist/{chunk-HJS267VR.js → chunk-7KMTCVXQ.js} +1 -1
- package/dist/{chunk-73IJ5PMZ.js → chunk-7WZ6BF3C.js} +104 -13
- package/dist/{chunk-BMMSKKVA.js → chunk-BBOXWWM5.js} +1 -1
- package/dist/{chunk-R4DVA45E.js → chunk-ESB75DKO.js} +5 -5
- package/dist/{chunk-HKTYIHLZ.js → chunk-IBWJCFQG.js} +2 -2
- package/dist/{chunk-N7NDTX22.js → chunk-LV6Q3XMZ.js} +5 -5
- package/dist/{chunk-ZLNNIRMH.js → chunk-MCBZS34Y.js} +4 -4
- package/dist/{chunk-QJCXP4TA.js → chunk-MYD23JQX.js} +5 -0
- package/dist/{chunk-AL2LHM4B.js → chunk-NVB62Z6R.js} +4 -4
- package/dist/{chunk-MTUV27NY.js → chunk-PAGH2XKJ.js} +4 -2
- package/dist/{chunk-DGMOTHFM.js → chunk-QDLC645D.js} +4 -4
- package/dist/{chunk-QRDF5A3U.js → chunk-SOBWIJDO.js} +1 -1
- package/dist/{chunk-FJ7KTNMD.js → chunk-TMIJHMEN.js} +1 -1
- package/dist/{chunk-NFBWTJ3A.js → chunk-UDFPOCTO.js} +1 -1
- package/dist/{chunk-UY5XJIJC.js → chunk-ULUBM4GF.js} +4 -4
- package/dist/{cli-BIUIERG2.js → cli-2NL3JNSW.js} +60 -60
- package/dist/{command-N2SBQGYR.js → command-OG6CTDFO.js} +8 -8
- package/dist/{config-FVSPGZIO.js → config-ODVINAUA.js} +1 -1
- package/dist/{container-start-S7DEKQFO.js → container-start-TLDNOXCE.js} +10 -10
- package/dist/{doctor-KJT3VOXC.js → doctor-OD76KMBS.js} +9 -9
- package/dist/{find-unit-QS446AID.js → find-unit-JC7VVTGL.js} +3 -3
- package/dist/{governing-source-YXZXD6LI.js → governing-source-AXTXU5ZB.js} +2 -2
- package/dist/{host-checks-LIZKBSGH.js → host-checks-53FR7GYM.js} +8 -8
- package/dist/index.js +1 -1
- package/dist/{init-XHZRN7M6.js → init-IPQM7NDZ.js} +7 -7
- package/dist/{init-O6PJ5VFU.js → init-XYOKVOJX.js} +7 -7
- package/dist/{init-cmd-LDYOMR2V.js → init-cmd-2LPSXFLM.js} +2 -2
- package/dist/{loop-C3B2UQHJ.js → loop-DVKNTJNR.js} +13 -13
- package/dist/{machine-L5EBOAQK.js → machine-QPS4E3B2.js} +7 -7
- package/dist/{runner-env-HUZ2TMAK.js → runner-env-7PD3EBDY.js} +3 -3
- package/dist/{runner-key-ECXF2WPY.js → runner-key-ZF3YFC5N.js} +7 -7
- package/dist/{spec-cmd-HMPVRZP2.js → spec-cmd-PUZD5BBF.js} +1 -1
- package/dist/{status-WBSVJDBI.js → status-PFTXJHJZ.js} +8 -8
- package/dist/{update-steps-QP4NXMZA.js → update-steps-C344CWFD.js} +9 -9
- package/dist/{work-claim-cmd-GF6O4PE4.js → work-claim-cmd-DAGGI5J4.js} +4 -4
- package/dist/{work-cmd-PKQ3UANC.js → work-cmd-DGRY7K5A.js} +1 -1
- package/dist/{work-comment-cmd-X26ER5HH.js → work-comment-cmd-CLHJKFBW.js} +2 -2
- package/dist/{work-demo-cmd-WBOSB5QG.js → work-demo-cmd-6BM56RVQ.js} +1 -1
- package/dist/{work-logs-cmd-VRPW3AAL.js → work-logs-cmd-GXCMJFFO.js} +1 -1
- package/dist/{work-open-pr-cmd-BYQSZHFN.js → work-open-pr-cmd-IGUKSZGC.js} +1 -1
- package/dist/{work-proofs-cmd-3IQSWSNT.js → work-proofs-cmd-AUQGPJLN.js} +2 -2
- package/dist/{work-proofs-record-LE4M664P.js → work-proofs-record-BAKLIA45.js} +3 -3
- package/dist/{work-stop-cmd-5J5MUNDK.js → work-stop-cmd-EEETWUSK.js} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -132,6 +132,11 @@ content:
|
|
|
132
132
|
the numbers of the items it waits on. The reply can name a build that
|
|
133
133
|
someone stopped with `outerlayer work stop`; the runner then ends that
|
|
134
134
|
build and releases it as stopped, with the name of whoever stopped it.
|
|
135
|
+
Between polls it also holds one signed request open to
|
|
136
|
+
`GET /v1/hosts/wait`, for up to 50 seconds at a time. The answer carries a
|
|
137
|
+
cursor and a flag that says whether something changed in the factory, and
|
|
138
|
+
no work. The runner then looks for work at once. `runner.wait: false` turns
|
|
139
|
+
this off.
|
|
135
140
|
A runner with `runner.fleet: true` is a fleet machine and sends no
|
|
136
141
|
heartbeat. Each poll it sends `POST /v1/fleet/next`, signed with the host
|
|
137
142
|
key: its free room, the repositories whose images it holds and its CLI
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"2026-10-
|
|
1
|
+
{"id":"2026-10-29T21:26:42.434Z+7ba9723","root":"/home/runner/work/outerlayer/outerlayer","pkg":"outerlayer"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { claimCalls, claimItem, itemCalls, leftByRunnerKey, runnerCalls, spoolHomeFor } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
export { claimCalls, claimItem, itemCalls, leftByRunnerKey, runnerCalls, spoolHomeFor } from './chunk-UDFPOCTO.js';
|
|
4
|
+
import './chunk-MYD23JQX.js';
|
|
5
5
|
import './chunk-UJTYMT7G.js';
|
|
6
6
|
import './chunk-CQQWIWYG.js';
|
|
7
7
|
import './chunk-NGT2CCGM.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { probeCredentials } from './chunk-
|
|
3
|
+
import { probeCredentials } from './chunk-7WZ6BF3C.js';
|
|
4
4
|
import './chunk-ZI7JENTB.js';
|
|
5
5
|
import './chunk-3JVYMD4G.js';
|
|
6
6
|
import './chunk-E7R2GIAW.js';
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
7
|
+
import './chunk-QDLC645D.js';
|
|
8
|
+
import './chunk-6XWPVFZM.js';
|
|
9
|
+
import './chunk-LV6Q3XMZ.js';
|
|
10
10
|
import './chunk-YC5KTX7D.js';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-TMIJHMEN.js';
|
|
12
12
|
import './chunk-LW2A24IA.js';
|
|
13
13
|
import './chunk-SHPCVBT3.js';
|
|
14
14
|
import './chunk-ZVB57WI6.js';
|
|
@@ -19,12 +19,12 @@ import './chunk-HXCUMPPY.js';
|
|
|
19
19
|
import './chunk-RO2XIOEN.js';
|
|
20
20
|
import './chunk-EBFU4YCI.js';
|
|
21
21
|
import './chunk-AAGU5FJF.js';
|
|
22
|
-
import { fleetConfigProblem, managedProblems, managedFactsOf, askFleetMachine } from './chunk-
|
|
22
|
+
import { fleetConfigProblem, managedProblems, managedFactsOf, askFleetMachine } from './chunk-MCBZS34Y.js';
|
|
23
23
|
import './chunk-7R655ODT.js';
|
|
24
24
|
import './chunk-TBT347UY.js';
|
|
25
|
-
import { findServiceUnit } from './chunk-
|
|
25
|
+
import { findServiceUnit } from './chunk-36C7KAEW.js';
|
|
26
26
|
import './chunk-Q7ZHL6FY.js';
|
|
27
|
-
import { placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, HELPER_ENV, helperSocketPath, probeHelper, needsClaudeCredential, claudeCredentialCheck, claimPermissionProblem, formerSkillQueues, formerSkillProblem } from './chunk-
|
|
27
|
+
import { placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, HELPER_ENV, helperSocketPath, probeHelper, needsClaudeCredential, claudeCredentialCheck, claimPermissionProblem, formerSkillQueues, formerSkillProblem } from './chunk-ESB75DKO.js';
|
|
28
28
|
import './chunk-2PGI6RDE.js';
|
|
29
29
|
import './chunk-5ESKQSQP.js';
|
|
30
30
|
import './chunk-F26I6GKL.js';
|
|
@@ -33,20 +33,20 @@ import './chunk-JBJTC3UU.js';
|
|
|
33
33
|
import './chunk-OGFGZQA3.js';
|
|
34
34
|
import './chunk-4PH4DVV4.js';
|
|
35
35
|
import './chunk-UZGQT6OF.js';
|
|
36
|
-
import './chunk-
|
|
36
|
+
import './chunk-SOBWIJDO.js';
|
|
37
37
|
import './chunk-SQGD4LYW.js';
|
|
38
38
|
import './chunk-TQMI335S.js';
|
|
39
|
-
import './chunk-
|
|
40
|
-
import './chunk-
|
|
41
|
-
import './chunk-
|
|
42
|
-
import { loadRunnerConfig, RunnerConfigError, checkHooks, keyRunnerFactory } from './chunk-
|
|
39
|
+
import './chunk-2FHNB4SZ.js';
|
|
40
|
+
import './chunk-BBOXWWM5.js';
|
|
41
|
+
import './chunk-UDFPOCTO.js';
|
|
42
|
+
import { loadRunnerConfig, RunnerConfigError, checkHooks, keyRunnerFactory } from './chunk-MYD23JQX.js';
|
|
43
43
|
import './chunk-UJTYMT7G.js';
|
|
44
44
|
import './chunk-CQQWIWYG.js';
|
|
45
45
|
import './chunk-NGT2CCGM.js';
|
|
46
46
|
import './chunk-PZN4L2DN.js';
|
|
47
47
|
import './chunk-OHQMGLJP.js';
|
|
48
48
|
import './chunk-VQCAJUDV.js';
|
|
49
|
-
import './chunk-
|
|
49
|
+
import './chunk-PAGH2XKJ.js';
|
|
50
50
|
import './chunk-IP7BIBXJ.js';
|
|
51
51
|
import './chunk-L5GF2A43.js';
|
|
52
52
|
import './chunk-TYRKGKMX.js';
|
|
@@ -192,6 +192,7 @@ async function runRunnerCheck(configPath, deps = {}) {
|
|
|
192
192
|
`queues ${config.queues.join(", ")}`,
|
|
193
193
|
`concurrency ${config.concurrency}`,
|
|
194
194
|
`poll ${config.pollSeconds}s`,
|
|
195
|
+
`wait ${config.wait === false || config.fleet === true ? "off" : "on"}`,
|
|
195
196
|
`time limit ${config.timeLimitMinutes}m`,
|
|
196
197
|
`idle limit ${config.idleLimitMinutes}m`,
|
|
197
198
|
`auto update ${config.autoUpdate ? "on" : "off"}`,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { DEFAULT_UNIT_NAME } from './chunk-
|
|
3
|
+
import { DEFAULT_UNIT_NAME } from './chunk-BBOXWWM5.js';
|
|
4
4
|
import { RUNNER_FILE_MODE } from './chunk-YQHUCOUL.js';
|
|
5
5
|
import { claudeEnvPath, withoutCredentialLines, parseRunnerEnv } from './chunk-GANAOCHR.js';
|
|
6
6
|
import { existsSync, readFileSync, writeFileSync, renameSync, rmSync } from 'fs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { escapeUnitPath, UNIT_MARKER, DEFAULT_UNIT_NAME } from './chunk-
|
|
3
|
+
import { escapeUnitPath, UNIT_MARKER, DEFAULT_UNIT_NAME } from './chunk-BBOXWWM5.js';
|
|
4
4
|
import { inspectService, realInspectProbes } from './chunk-GANAOCHR.js';
|
|
5
5
|
import { realpathSync, readFileSync, readdirSync } from 'fs';
|
|
6
6
|
import { resolve, dirname, join } from 'path';
|
|
@@ -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-LV6Q3XMZ.js';
|
|
4
4
|
import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-SQGD4LYW.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 { resolveCredentials, postJson, getJson } from './chunk-
|
|
3
|
+
import { resolveCredentials, postJson, getJson } from './chunk-PAGH2XKJ.js';
|
|
4
4
|
import { detectActiveSession } from './chunk-IP7BIBXJ.js';
|
|
5
5
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
6
6
|
import { sanitizeTerminal } from './chunk-XSX42Q2H.js';
|
|
@@ -3,28 +3,28 @@ import { createRequire } from 'node:module';
|
|
|
3
3
|
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-ZI7JENTB.js';
|
|
4
4
|
import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
|
|
5
5
|
import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-E7R2GIAW.js';
|
|
6
|
-
import { reportFailedStart, fitImageBuildMemory } from './chunk-
|
|
7
|
-
import { renderUpdateSteps } from './chunk-
|
|
8
|
-
import { releaseLease, isUnfinished, setStage, jobEnv, runHook, describeHookEnd, provisionMicroVm, deliverCommitHooks, provisionProcess, readProvisionOut, workdirProblem, MICROVM_COMMAND_DIR, commandLogOffset, startMicroVmCommand, microVmCommandLine, runCommand, startSender, finishJob, sampleGuest, foldSample, isContainerTracked, isMicroVmTracked, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, stopOrphanedMicroVms, unfinishedJobs, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, listTrackedJobs, restartSender, serveLease, vmAlive, writeGuestGhConfig, ALREADY_RELEASED, inTeardown } from './chunk-
|
|
9
|
-
import { RUNNER_PROTOCOL } from './chunk-
|
|
6
|
+
import { reportFailedStart, fitImageBuildMemory } from './chunk-QDLC645D.js';
|
|
7
|
+
import { renderUpdateSteps } from './chunk-6XWPVFZM.js';
|
|
8
|
+
import { releaseLease, isUnfinished, setStage, jobEnv, runHook, describeHookEnd, provisionMicroVm, deliverCommitHooks, provisionProcess, readProvisionOut, workdirProblem, MICROVM_COMMAND_DIR, commandLogOffset, startMicroVmCommand, microVmCommandLine, runCommand, startSender, finishJob, sampleGuest, foldSample, isContainerTracked, isMicroVmTracked, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, stopOrphanedMicroVms, unfinishedJobs, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, listTrackedJobs, restartSender, serveLease, vmAlive, writeGuestGhConfig, ALREADY_RELEASED, inTeardown } from './chunk-LV6Q3XMZ.js';
|
|
9
|
+
import { RUNNER_PROTOCOL } from './chunk-TMIJHMEN.js';
|
|
10
10
|
import { writeFleetState } from './chunk-LW2A24IA.js';
|
|
11
11
|
import { writePendingUpdate } from './chunk-SHPCVBT3.js';
|
|
12
12
|
import { JOB_STATE_FORMAT, readsJobState, jobStateFormatOf } from './chunk-ZVB57WI6.js';
|
|
13
|
-
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, createHousekeepingDocker, housekeepingDockerIfReachable, KIND_LABEL, RECIPE_KEY_LABEL, askFleetMachine } from './chunk-
|
|
13
|
+
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, createHousekeepingDocker, housekeepingDockerIfReachable, KIND_LABEL, RECIPE_KEY_LABEL, askFleetMachine } from './chunk-MCBZS34Y.js';
|
|
14
14
|
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-7R655ODT.js';
|
|
15
15
|
import { RepoFilter } from './chunk-TBT347UY.js';
|
|
16
|
-
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, LEASE_SECONDS, itemTag, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionEnvironment, resolveHostBuild, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, currentSkillCommand, formerSkillProblem, containerCommandExec, execCommandLine, startHostServices, HELPER_ENV, setUpRunnerCgroup, sweepImageBuilders, usableCpus, stoppedHelperReason, measureDisk, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, createLeaseChannel, selectStaleIncomplete, selectExpired, selectToFit, removeSavedState } from './chunk-
|
|
16
|
+
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, LEASE_SECONDS, itemTag, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionEnvironment, resolveHostBuild, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, currentSkillCommand, formerSkillProblem, containerCommandExec, execCommandLine, startHostServices, HELPER_ENV, setUpRunnerCgroup, sweepImageBuilders, usableCpus, stoppedHelperReason, measureDisk, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, createLeaseChannel, selectStaleIncomplete, selectExpired, selectToFit, removeSavedState } from './chunk-ESB75DKO.js';
|
|
17
17
|
import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-AUVJMR3P.js';
|
|
18
18
|
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
19
|
-
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-
|
|
19
|
+
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-SOBWIJDO.js';
|
|
20
20
|
import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-SQGD4LYW.js';
|
|
21
21
|
import { isVersion, compareVersions, satisfiesRange } from './chunk-TQMI335S.js';
|
|
22
|
-
import { RUNNER_RESERVE_BYTES } from './chunk-
|
|
23
|
-
import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls } from './chunk-
|
|
24
|
-
import { keyRunnerFactory, isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-
|
|
22
|
+
import { RUNNER_RESERVE_BYTES } from './chunk-BBOXWWM5.js';
|
|
23
|
+
import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls } from './chunk-UDFPOCTO.js';
|
|
24
|
+
import { keyRunnerFactory, isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-MYD23JQX.js';
|
|
25
25
|
import { allocatedBytes, freeBytes, formatBytes } from './chunk-UJTYMT7G.js';
|
|
26
26
|
import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, exceedsDisk, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun, readJobFileChecked } from './chunk-CQQWIWYG.js';
|
|
27
|
-
import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-
|
|
27
|
+
import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-PAGH2XKJ.js';
|
|
28
28
|
import { loadHostKey, ensureHostKey, signerFor } from './chunk-XU5BNWX7.js';
|
|
29
29
|
import { resolveVersion } from './chunk-RA3O54FC.js';
|
|
30
30
|
import { RUNNER_DIR_MODE, runnerDir, buildDir, attemptStamp, jobDir, RUNNER_FILE_MODE, jobsDir, pidFilePath, storeScopes, imagesDir, spoolDir, orgStoreIn, builderCacheDiskPath, rootfsDir } from './chunk-YQHUCOUL.js';
|
|
@@ -1288,6 +1288,69 @@ async function judgeMicroVmAdoption(input) {
|
|
|
1288
1288
|
const names2 = state.fdStore ?? [];
|
|
1289
1289
|
return names2.length > 0 && names2.every((name) => inherited.has(name)) ? "adopt" : "unservable";
|
|
1290
1290
|
}
|
|
1291
|
+
|
|
1292
|
+
// src/runner/wait.ts
|
|
1293
|
+
var WAIT_REQUEST_TIMEOUT_MS = 7e4;
|
|
1294
|
+
var FIRST_RETRY_MS = 1e3;
|
|
1295
|
+
var HELD_AT_LEAST_MS = 1e3;
|
|
1296
|
+
var QUICK_ANSWERS_BEFORE_FAILURE = 3;
|
|
1297
|
+
function answerOf(data) {
|
|
1298
|
+
const answer = data?.data ?? data;
|
|
1299
|
+
const { changed, cursor } = answer ?? {};
|
|
1300
|
+
if (typeof changed !== "boolean" || typeof cursor !== "string") throw new Error("the gateway's answer has no changed flag and cursor");
|
|
1301
|
+
return { changed, cursor };
|
|
1302
|
+
}
|
|
1303
|
+
function startWaiting(ports) {
|
|
1304
|
+
const controller = new AbortController();
|
|
1305
|
+
const { signal } = controller;
|
|
1306
|
+
const now = ports.now ?? Date.now;
|
|
1307
|
+
const sleep = ports.sleep ?? ((ms) => new Promise((resolve) => {
|
|
1308
|
+
const timer = setTimeout(resolve, ms);
|
|
1309
|
+
signal.addEventListener(
|
|
1310
|
+
"abort",
|
|
1311
|
+
() => {
|
|
1312
|
+
clearTimeout(timer);
|
|
1313
|
+
resolve();
|
|
1314
|
+
},
|
|
1315
|
+
{ once: true }
|
|
1316
|
+
);
|
|
1317
|
+
}));
|
|
1318
|
+
const capMs = ports.pollSeconds * 1e3;
|
|
1319
|
+
void (async () => {
|
|
1320
|
+
let cursor;
|
|
1321
|
+
let failures = 0;
|
|
1322
|
+
let failedLogged = false;
|
|
1323
|
+
let quick = 0;
|
|
1324
|
+
while (!signal.aborted) {
|
|
1325
|
+
try {
|
|
1326
|
+
const path = cursor === void 0 ? "/v1/hosts/wait" : `/v1/hosts/wait?cursor=${encodeURIComponent(cursor)}`;
|
|
1327
|
+
const startedAt = now();
|
|
1328
|
+
const reply = await getJson(ports.url, path, ports.apiKey, ports.appId, ports.fetchImpl, await signerFor(ports.configPath), {
|
|
1329
|
+
signal,
|
|
1330
|
+
timeoutMs: WAIT_REQUEST_TIMEOUT_MS
|
|
1331
|
+
});
|
|
1332
|
+
const answer = answerOf(reply.data);
|
|
1333
|
+
quick = !answer.changed && cursor !== void 0 && now() - startedAt < HELD_AT_LEAST_MS ? quick + 1 : 0;
|
|
1334
|
+
if (quick >= QUICK_ANSWERS_BEFORE_FAILURE) throw new Error("the gateway answered at once with no change, three times in a row");
|
|
1335
|
+
if (failedLogged) ports.log.line("waiting for work works again");
|
|
1336
|
+
failedLogged = false;
|
|
1337
|
+
failures = 0;
|
|
1338
|
+
cursor = answer.cursor;
|
|
1339
|
+
if (answer.changed) ports.wake();
|
|
1340
|
+
} catch (err) {
|
|
1341
|
+
if (signal.aborted) return;
|
|
1342
|
+
failures++;
|
|
1343
|
+
if (!failedLogged) {
|
|
1344
|
+
failedLogged = true;
|
|
1345
|
+
const reason = err.status === 404 ? "the gateway does not have the wait route, so it may be an older version" : describeCallFailure(err);
|
|
1346
|
+
ports.log.line(`waiting for work failed: ${reason} \xB7 checking every ${ports.pollSeconds}s meanwhile`);
|
|
1347
|
+
}
|
|
1348
|
+
await sleep(Math.min(FIRST_RETRY_MS * 2 ** (failures - 1), capMs));
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
})();
|
|
1352
|
+
return { stop: () => controller.abort() };
|
|
1353
|
+
}
|
|
1291
1354
|
function linuxSignalName(number) {
|
|
1292
1355
|
const names2 = {
|
|
1293
1356
|
1: "SIGHUP",
|
|
@@ -2040,6 +2103,18 @@ async function tick(state) {
|
|
|
2040
2103
|
state.ticking = false;
|
|
2041
2104
|
}
|
|
2042
2105
|
await sendTickHeartbeat(state, state.lastWorkRequest);
|
|
2106
|
+
if (state.wakeAgain === true) {
|
|
2107
|
+
state.wakeAgain = false;
|
|
2108
|
+
if (state.intakeClosed !== true) await tick(state);
|
|
2109
|
+
}
|
|
2110
|
+
}
|
|
2111
|
+
function wake(state) {
|
|
2112
|
+
if (state.intakeClosed === true) return;
|
|
2113
|
+
if (state.ticking === true) {
|
|
2114
|
+
state.wakeAgain = true;
|
|
2115
|
+
return;
|
|
2116
|
+
}
|
|
2117
|
+
void tick(state);
|
|
2043
2118
|
}
|
|
2044
2119
|
function fleetTickOf(state) {
|
|
2045
2120
|
state.fleet ??= newFleetMemory();
|
|
@@ -2337,7 +2412,7 @@ var CLAIM_REFUSAL_CODES = new Set(
|
|
|
2337
2412
|
"pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous pull_request_repository_not_connected repository_not_reachable branch_claimed_elsewhere".split(" ")
|
|
2338
2413
|
);
|
|
2339
2414
|
async function tryClaimAndStart(state, item, queue) {
|
|
2340
|
-
const { postJson: postJson2 } = await import('./work-cmd-
|
|
2415
|
+
const { postJson: postJson2 } = await import('./work-cmd-DGRY7K5A.js');
|
|
2341
2416
|
const log = logOf(state);
|
|
2342
2417
|
const hostKey = await loadHostKey(state.config.configPath);
|
|
2343
2418
|
const claim = await retrySend(
|
|
@@ -3679,7 +3754,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
3679
3754
|
check: update.check ? () => update.check(configPath) : async () => {
|
|
3680
3755
|
const held = heldClaudeCredential();
|
|
3681
3756
|
const env = held === void 0 ? process.env : { ...process.env, [held.variable]: held.value };
|
|
3682
|
-
return (await import('./check-
|
|
3757
|
+
return (await import('./check-OH235Q4X.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
|
|
3683
3758
|
},
|
|
3684
3759
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
3685
3760
|
log
|
|
@@ -3819,6 +3894,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
3819
3894
|
}
|
|
3820
3895
|
startup.report = void 0;
|
|
3821
3896
|
let intakeClosed = false;
|
|
3897
|
+
let waiting;
|
|
3822
3898
|
let closed = false;
|
|
3823
3899
|
let stopping = false;
|
|
3824
3900
|
let exited = false;
|
|
@@ -3879,6 +3955,8 @@ async function startRunner(configPath, deps, startup) {
|
|
|
3879
3955
|
const stopIntake = () => {
|
|
3880
3956
|
if (intakeClosed) return;
|
|
3881
3957
|
intakeClosed = true;
|
|
3958
|
+
state.intakeClosed = true;
|
|
3959
|
+
waiting?.stop();
|
|
3882
3960
|
clearInterval(pollTimer);
|
|
3883
3961
|
if (fleetPoller === void 0) {
|
|
3884
3962
|
pollTimer = setInterval(() => void sendTickHeartbeat(state, void 0), (state.pollTimerSeconds ?? state.config.pollSeconds) * 1e3);
|
|
@@ -3968,6 +4046,19 @@ async function startRunner(configPath, deps, startup) {
|
|
|
3968
4046
|
deps.onReady?.();
|
|
3969
4047
|
await tick(state);
|
|
3970
4048
|
if (update !== void 0) settleUpdate({ configPath, own: ownVersionOf(deps), now: () => nowOf(state).getTime(), log });
|
|
4049
|
+
if (config.wait !== false && fleetPoller === void 0 && !intakeClosed) {
|
|
4050
|
+
waiting = startWaiting({
|
|
4051
|
+
url: config.url,
|
|
4052
|
+
apiKey: config.apiKey,
|
|
4053
|
+
appId: keyRunnerFactory(config),
|
|
4054
|
+
configPath: config.configPath,
|
|
4055
|
+
pollSeconds: state.pollTimerSeconds,
|
|
4056
|
+
fetchImpl: deps.fetchImpl,
|
|
4057
|
+
log,
|
|
4058
|
+
wake: () => wake(state),
|
|
4059
|
+
sleep: deps.waitSleep
|
|
4060
|
+
});
|
|
4061
|
+
}
|
|
3971
4062
|
return handle;
|
|
3972
4063
|
}
|
|
3973
4064
|
function describeWaiting(active, nowMs) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { builtinKind, keepsHostBuilder } from './chunk-
|
|
3
|
+
import { builtinKind, keepsHostBuilder } from './chunk-MYD23JQX.js';
|
|
4
4
|
import { parseSize } from './chunk-CQQWIWYG.js';
|
|
5
5
|
import { runnerDir } from './chunk-YQHUCOUL.js';
|
|
6
6
|
import { FD_SLOTS_PER_BUILD, FD_STORE_ENV, BUILD_SLICE_MEMORY_ENV, CLAUDE_CREDENTIAL_ID, CLAUDE_ENV_FILE, credentialLineIn, withoutCredentialLines } from './chunk-GANAOCHR.js';
|
|
@@ -7,16 +7,16 @@ import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
|
7
7
|
import { currentCliBuild } from './chunk-OGFGZQA3.js';
|
|
8
8
|
import { runExec, execCapture, waitForAgent } from './chunk-4PH4DVV4.js';
|
|
9
9
|
import { GUEST_CID, linkVsockSockets } from './chunk-UZGQT6OF.js';
|
|
10
|
-
import { retrySend, describeCallFailure, formatDuration, keepStagedContext, controlPlaneTokenFailure, refusalCode, resolveGoverningSource, prefetchGovernedContext, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, shimScript, WORKFLOW_PERMISSION_REASON } from './chunk-
|
|
10
|
+
import { retrySend, describeCallFailure, formatDuration, keepStagedContext, controlPlaneTokenFailure, refusalCode, resolveGoverningSource, prefetchGovernedContext, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, shimScript, WORKFLOW_PERMISSION_REASON } from './chunk-SOBWIJDO.js';
|
|
11
11
|
import { runnerImageVersion } from './chunk-SQGD4LYW.js';
|
|
12
|
-
import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-
|
|
13
|
-
import { claimCalls } from './chunk-
|
|
14
|
-
import { optionalEgress, runnerCredentialProblem, builtinKind, keyRunnerFactory, DEFAULT_SETUP_MINUTES, allowHostProblem, DEFAULT_SAVED_STATE_MAX_BYTES, systemClock, emptyEgressCounts, hostAllowed } from './chunk-
|
|
12
|
+
import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-2FHNB4SZ.js';
|
|
13
|
+
import { claimCalls } from './chunk-UDFPOCTO.js';
|
|
14
|
+
import { optionalEgress, runnerCredentialProblem, builtinKind, keyRunnerFactory, DEFAULT_SETUP_MINUTES, allowHostProblem, DEFAULT_SAVED_STATE_MAX_BYTES, systemClock, emptyEgressCounts, hostAllowed } from './chunk-MYD23JQX.js';
|
|
15
15
|
import { DEFAULT_BUILD_DISK, formatBytes, allocatedBytes } from './chunk-UJTYMT7G.js';
|
|
16
16
|
import { parseSize, NETWORK_HELPER_MEMORY, createDockerHost, builderSpec, runnerLabelValue, RUNNER_LABEL, BUILD_LABEL, prepareRunArgs, networkHelperName, containerRunArgs, HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, mountableHome, homeCopyRunArgs, containerExecArgs, childEnvironment, readDu, JUDGE_DIR, MAX_ITEMS_BYTES, JUDGE_ITEMS, MAX_REPORT_BYTES, JUDGE_REPORT, NETWORK_READY_FILE, spawnRun, identityRunArgs, parseIdentity, networkHelperRunArgs, SAVED_STATE_LABEL } from './chunk-CQQWIWYG.js';
|
|
17
17
|
import { RecipeError, DOCKER_FEATURE, universalImagePending, writeSanitizedRecipe, classifyProperties } from './chunk-NGT2CCGM.js';
|
|
18
18
|
import { firecrackerArch, MICROVM_ARCHES, FIRECRACKER_VERSION, hostHelperPinned, CLAUDE_CODE_VERSION, builderDiskPinned, guestAssetsPinned, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, JAILER_BINARY_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, GUEST_ASSETS_VERSION, BUILDER_DISK_VERSION, networkHelperPinned, NETWORK_HELPER_SHA256, universalImagePinned, UNIVERSAL_IMAGE, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, GH_VERSION, TINI_SHA256, TINI_VERSION, HEADLESS_SHELL, HEADLESS_SHELL_BASE_URL, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_FFMPEG_BASE_URL, VOICE_PACK_FILES, BUILDER_DISK_SHA256, BUILDER_DISK_BASE_URL, DEFAULT_BASE_IMAGE } from './chunk-PZN4L2DN.js';
|
|
19
|
-
import { postJson, WorkCommandError, getJson } from './chunk-
|
|
19
|
+
import { postJson, WorkCommandError, getJson } from './chunk-PAGH2XKJ.js';
|
|
20
20
|
import { sanitizeTerminal } from './chunk-XSX42Q2H.js';
|
|
21
21
|
import { signerFor } from './chunk-XU5BNWX7.js';
|
|
22
22
|
import { sharedSkillNames, skillConflictMessage } from './chunk-FGF52V4V.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { helperSocketPath } from './chunk-
|
|
4
|
-
import { UNIT_MARKER } from './chunk-
|
|
3
|
+
import { helperSocketPath } from './chunk-ESB75DKO.js';
|
|
4
|
+
import { UNIT_MARKER } from './chunk-BBOXWWM5.js';
|
|
5
5
|
import { runnerDir } from './chunk-YQHUCOUL.js';
|
|
6
6
|
import { createHash } from 'crypto';
|
|
7
7
|
import { join } from 'path';
|
|
@@ -8,18 +8,18 @@ import { zodProblem } from './chunk-I3LTIAOR.js';
|
|
|
8
8
|
import { senderPidfile } from './chunk-HXCUMPPY.js';
|
|
9
9
|
import { installScrubContext } from './chunk-RO2XIOEN.js';
|
|
10
10
|
import { upgradedStarterText } from './chunk-Q7ZHL6FY.js';
|
|
11
|
-
import { ADDED_USER, shellQuote, GH_CONFIG_YML, ghHostsYml, firstLine, provisionWithFreshFallback, itemTag, hasClaudeCredential, AssetError, obtainImage, taggedLog, planSavedState, clockOf, savedStateBase, savedStatesDir, ensureRootfs, makeBuildsDirPrivate, gitRemoteFor, startServicesFor, createLeaseChannel, createBuildDisk, machineConfig, startJailedInto, resolveAgentUser, AgentUserError, agentUidOf, userIdChangedReason, runBuildSteps, setupInputFor, runtimeStepInput, settleFailedSteps, keepRuntimeStep, keepMissingSetupScripts, createContainerRuntime, containerSenderCommand, hostCommandEnvironment, execArgv, signalInContainer, startHostServices, LEASE_SECONDS, itemScope, managedBuildSettingsFor, stopContainer, cleanupContainer, recordProofsInContainer, PROOFS_LOG, outOfMemoryReason, closeHostBuild, dropManagedClaudeKey, dropManagedBuildSettings, startCheckContainer, ranRuntimeStep, provisionRuntimes, lifecycleSteps, lifecycleFailureReason, runSetupScripts, writeEvalInput, DeliveryFailure, EVAL_INPUT_NAME, syncInContainer, copyTranscriptsFromContainer, senderAliveScript, discardUnusableState, MANAGED_UNJAILED_REASON, uidFromProbe, saveAndPrune, managedMachineLimits, withFactoryHosts, helperFirecrackerNote, said, managedClaudeKeyValuesFor, managedBuildSettingValuesFor, managedClaudeKeyValues, managedBuildSettingValues, stopJailed, deleteBuildDisk, RECORD_PROOFS_ARGV, managedClaudeKeyFor, ROOT_DISK_ID_PREFIX, copyTranscripts, writeRecord, containerJudgeEnvironment, deleteRecord, senderSignalScript, copyJudgeTree } from './chunk-
|
|
11
|
+
import { ADDED_USER, shellQuote, GH_CONFIG_YML, ghHostsYml, firstLine, provisionWithFreshFallback, itemTag, hasClaudeCredential, AssetError, obtainImage, taggedLog, planSavedState, clockOf, savedStateBase, savedStatesDir, ensureRootfs, makeBuildsDirPrivate, gitRemoteFor, startServicesFor, createLeaseChannel, createBuildDisk, machineConfig, startJailedInto, resolveAgentUser, AgentUserError, agentUidOf, userIdChangedReason, runBuildSteps, setupInputFor, runtimeStepInput, settleFailedSteps, keepRuntimeStep, keepMissingSetupScripts, createContainerRuntime, containerSenderCommand, hostCommandEnvironment, execArgv, signalInContainer, startHostServices, LEASE_SECONDS, itemScope, managedBuildSettingsFor, stopContainer, cleanupContainer, recordProofsInContainer, PROOFS_LOG, outOfMemoryReason, closeHostBuild, dropManagedClaudeKey, dropManagedBuildSettings, startCheckContainer, ranRuntimeStep, provisionRuntimes, lifecycleSteps, lifecycleFailureReason, runSetupScripts, writeEvalInput, DeliveryFailure, EVAL_INPUT_NAME, syncInContainer, copyTranscriptsFromContainer, senderAliveScript, discardUnusableState, MANAGED_UNJAILED_REASON, uidFromProbe, saveAndPrune, managedMachineLimits, withFactoryHosts, helperFirecrackerNote, said, managedClaudeKeyValuesFor, managedBuildSettingValuesFor, managedClaudeKeyValues, managedBuildSettingValues, stopJailed, deleteBuildDisk, RECORD_PROOFS_ARGV, managedClaudeKeyFor, ROOT_DISK_ID_PREFIX, copyTranscripts, writeRecord, containerJudgeEnvironment, deleteRecord, senderSignalScript, copyJudgeTree } from './chunk-ESB75DKO.js';
|
|
12
12
|
import { fetchCommit, readBranchHead, diffBetween } from './chunk-5ESKQSQP.js';
|
|
13
13
|
import { isSameProcess, startTimeOf } from './chunk-JBJTC3UU.js';
|
|
14
14
|
import { waitForAgent, vmExecArgs } from './chunk-4PH4DVV4.js';
|
|
15
15
|
import { socketPathProblem, vsockLinks, LEASE_LINK, linkVsockSockets } from './chunk-UZGQT6OF.js';
|
|
16
|
-
import { describeCallFailure, resolveGoverningSource, prefetchGovernedContext, refusalCode, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, logStamp, createRunnerLog, formatDuration, removeKeptContext, retrySend, formatClock, keptContextTree, WORKFLOW_PERMISSION_REASON } from './chunk-
|
|
17
|
-
import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey } from './chunk-
|
|
18
|
-
import { imageBuildOf, isBuiltinContainer, isBuiltinProcess, isBuiltinVm, egressSummary, DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_SETUP_MINUTES, optionalEgress } from './chunk-
|
|
16
|
+
import { describeCallFailure, resolveGoverningSource, prefetchGovernedContext, refusalCode, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, logStamp, createRunnerLog, formatDuration, removeKeptContext, retrySend, formatClock, keptContextTree, WORKFLOW_PERMISSION_REASON } from './chunk-SOBWIJDO.js';
|
|
17
|
+
import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey } from './chunk-UDFPOCTO.js';
|
|
18
|
+
import { imageBuildOf, isBuiltinContainer, isBuiltinProcess, isBuiltinVm, egressSummary, DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_SETUP_MINUTES, optionalEgress } from './chunk-MYD23JQX.js';
|
|
19
19
|
import { formatBytes, DEFAULT_CACHE_DISK, allocatedBytes } from './chunk-UJTYMT7G.js';
|
|
20
20
|
import { HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, writeJobFile, readJobFile, parseSize, identityScript, identityArgs, parseIdentity, mountableHome, homeCopyScript, homeCopyArgs, childEnvironment, withAnswerProtocol, judgeCommand, MAX_REPORT_BYTES, JUDGE_MAX_TURNS, JUDGE_DIR, COMMAND_DIR, MAX_ITEMS_BYTES } from './chunk-CQQWIWYG.js';
|
|
21
21
|
import { CLAUDE_CODE_VERSION, FIRECRACKER_VERSION } from './chunk-PZN4L2DN.js';
|
|
22
|
-
import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-
|
|
22
|
+
import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-PAGH2XKJ.js';
|
|
23
23
|
import { planArtifactUpload } from './chunk-XSX42Q2H.js';
|
|
24
24
|
import { readCloudConfig } from './chunk-HWVMRETT.js';
|
|
25
25
|
import { signerFor } from './chunk-XU5BNWX7.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { placeholderQueues, placeholderProblem } from './chunk-
|
|
4
|
-
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-
|
|
5
|
-
import { isBuiltinVm, builtinKind, EGRESS_SWITCHABLE_KEYS, imageBuildOf, keepsHostBuilder } from './chunk-
|
|
3
|
+
import { placeholderQueues, placeholderProblem } from './chunk-ESB75DKO.js';
|
|
4
|
+
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-BBOXWWM5.js';
|
|
5
|
+
import { isBuiltinVm, builtinKind, EGRESS_SWITCHABLE_KEYS, imageBuildOf, keepsHostBuilder } from './chunk-MYD23JQX.js';
|
|
6
6
|
import { realBuildDiskProbe, checkDiskFit, DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK, volumeBytes } from './chunk-UJTYMT7G.js';
|
|
7
7
|
import { spawnRun, RUNNER_LABEL, BUILD_LABEL } from './chunk-CQQWIWYG.js';
|
|
8
8
|
import { builderDiskPinned } from './chunk-PZN4L2DN.js';
|
|
9
|
-
import { getJson, WorkCommandError } from './chunk-
|
|
9
|
+
import { getJson, WorkCommandError } from './chunk-PAGH2XKJ.js';
|
|
10
10
|
import { ensureHostKey } from './chunk-XU5BNWX7.js';
|
|
11
11
|
import { BUILD_SLICE_MEMORY_ENV, FORWARDED_CLAUDE_CREDENTIAL_VARIABLES, claudeCredentialVariablesSet, claudeCredential, claudeEnvPath, parseRunnerEnv } from './chunk-GANAOCHR.js';
|
|
12
12
|
import { closeSync, openSync, constants, readFileSync } from 'fs';
|
|
@@ -210,6 +210,7 @@ var RUNNER_KEYS = [
|
|
|
210
210
|
"housekeeping",
|
|
211
211
|
"checks",
|
|
212
212
|
"autoUpdate",
|
|
213
|
+
"wait",
|
|
213
214
|
"managed",
|
|
214
215
|
"fleet",
|
|
215
216
|
"update"
|
|
@@ -327,6 +328,9 @@ function loadRunnerConfig(configPath) {
|
|
|
327
328
|
if (runner.autoUpdate !== void 0 && typeof runner.autoUpdate !== "boolean") {
|
|
328
329
|
fail(configPath, "runner.autoUpdate", "must be true or false");
|
|
329
330
|
}
|
|
331
|
+
if (runner.wait !== void 0 && typeof runner.wait !== "boolean") {
|
|
332
|
+
fail(configPath, "runner.wait", "must be true or false");
|
|
333
|
+
}
|
|
330
334
|
if (runner.managed !== void 0 && typeof runner.managed !== "boolean") {
|
|
331
335
|
fail(configPath, "runner.managed", "must be true or false");
|
|
332
336
|
}
|
|
@@ -396,6 +400,7 @@ function loadRunnerConfig(configPath) {
|
|
|
396
400
|
// and cleanup are built-in together or not at all (checkBuiltinHooks), so
|
|
397
401
|
// provision alone tells which.
|
|
398
402
|
autoUpdate: runner.autoUpdate ?? builtinKind(runner.hooks.provision) !== "own",
|
|
403
|
+
wait: runner.wait ?? true,
|
|
399
404
|
// A fleet runner is a managed runner: its builds run under the jailer with the managed checks.
|
|
400
405
|
...fleet ? { managed: true } : runner.managed === void 0 ? {} : { managed: runner.managed }
|
|
401
406
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { criteriaOf, loadCitationFinder, hostItemsOf, criterionInputs, NO_CITING_TEST_REASON, NO_TEST_FILES_REASON, NO_VERDICT_REASON, isFoundInReason, uncitedIds, planCriteria, pickSearchable, IdScan, testFileMatcher, foundInReason, MAX_TEST_FILE_BYTES, MAX_TEST_FILES, groupBySize } from './chunk-YC5KTX7D.js';
|
|
4
|
-
import { WorkCommandError, resolveCredentials, getJson } from './chunk-
|
|
4
|
+
import { WorkCommandError, resolveCredentials, getJson } from './chunk-PAGH2XKJ.js';
|
|
5
5
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
6
6
|
import { sanitizeTerminal } from './chunk-XSX42Q2H.js';
|
|
7
7
|
import { defaultFetch } from './chunk-GBMTKV5B.js';
|
|
@@ -217,14 +217,14 @@ function governingDir(cwd) {
|
|
|
217
217
|
async function testProofMode(cwd) {
|
|
218
218
|
const dir = governingDir(cwd);
|
|
219
219
|
if (dir === void 0) return "any";
|
|
220
|
-
const { testProofIn } = await import('./host-checks-
|
|
220
|
+
const { testProofIn } = await import('./host-checks-53FR7GYM.js');
|
|
221
221
|
return testProofIn(dir);
|
|
222
222
|
}
|
|
223
223
|
async function judgeCheckName(cwd) {
|
|
224
224
|
const dir = governingDir(cwd);
|
|
225
225
|
if (dir === void 0) return {};
|
|
226
226
|
if (!existsSync(dir)) return { note: `the governed context at ${dir} is not readable` };
|
|
227
|
-
const { checksIn, isJudgeCheck } = await import('./host-checks-
|
|
227
|
+
const { checksIn, isJudgeCheck } = await import('./host-checks-53FR7GYM.js');
|
|
228
228
|
const quiet = { line: () => void 0, error: () => void 0 };
|
|
229
229
|
const check = checksIn(dir, quiet, "").checks.find((c) => isJudgeCheck(c) && c.judge.subjects === "criteria");
|
|
230
230
|
return check === void 0 ? {} : { name: check.name };
|
|
@@ -369,7 +369,7 @@ async function runWorkProofs(opts) {
|
|
|
369
369
|
async function runWorkProofsCommand(opts) {
|
|
370
370
|
try {
|
|
371
371
|
if (opts.record) {
|
|
372
|
-
const { runWorkProofsRecord } = await import('./work-proofs-record-
|
|
372
|
+
const { runWorkProofsRecord } = await import('./work-proofs-record-BAKLIA45.js');
|
|
373
373
|
const result2 = await runWorkProofsRecord(opts);
|
|
374
374
|
process.exitCode = result2.exitCode;
|
|
375
375
|
return;
|
|
@@ -273,10 +273,11 @@ function readBodyBefore(response, deadline) {
|
|
|
273
273
|
read.then(resolve, reject);
|
|
274
274
|
});
|
|
275
275
|
}
|
|
276
|
-
async function getJson(url, path, apiKey, appId, fetchImpl, signer) {
|
|
276
|
+
async function getJson(url, path, apiKey, appId, fetchImpl, signer, limits) {
|
|
277
277
|
const endpoint = new URL(path, url).toString();
|
|
278
278
|
let response;
|
|
279
279
|
const signature = await signatureHeaders("GET", endpoint, "", signer);
|
|
280
|
+
const ends = [limits?.signal, limits?.timeoutMs === void 0 ? void 0 : AbortSignal.timeout(limits.timeoutMs)].filter((s) => s !== void 0);
|
|
280
281
|
try {
|
|
281
282
|
response = await fetchImpl(endpoint, {
|
|
282
283
|
method: "GET",
|
|
@@ -284,7 +285,8 @@ async function getJson(url, path, apiKey, appId, fetchImpl, signer) {
|
|
|
284
285
|
authorization: `Bearer ${apiKey}`,
|
|
285
286
|
"x-outerlayer-app-id": appId,
|
|
286
287
|
...signature
|
|
287
|
-
}
|
|
288
|
+
},
|
|
289
|
+
...ends.length === 0 ? {} : { signal: AbortSignal.any(ends) }
|
|
288
290
|
});
|
|
289
291
|
} catch (err) {
|
|
290
292
|
throw new WorkCommandError(`network error reaching ${endpoint}: ${String(err)}`);
|
|
@@ -1,11 +1,11 @@
|
|
|
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-LV6Q3XMZ.js';
|
|
4
4
|
import { RunnerAlreadyRunningError, readPidFile } from './chunk-AUVJMR3P.js';
|
|
5
5
|
import { isSameProcess } from './chunk-JBJTC3UU.js';
|
|
6
|
-
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-
|
|
7
|
-
import { keyRunnerFactory } from './chunk-
|
|
8
|
-
import { isSignatureRefusal, postJson } from './chunk-
|
|
6
|
+
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-BBOXWWM5.js';
|
|
7
|
+
import { keyRunnerFactory } from './chunk-MYD23JQX.js';
|
|
8
|
+
import { isSignatureRefusal, postJson } from './chunk-PAGH2XKJ.js';
|
|
9
9
|
import { signerFor } from './chunk-XU5BNWX7.js';
|
|
10
10
|
import { pidFilePath } from './chunk-YQHUCOUL.js';
|
|
11
11
|
import { readFileSync } from 'fs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { WorkCommandError, postJson } from './chunk-
|
|
3
|
+
import { WorkCommandError, postJson } from './chunk-PAGH2XKJ.js';
|
|
4
4
|
import { defaultGitRunner, materializeContext, fetchControlPlaneCommit, lookupGoverningSource } from './chunk-EK7MQ56V.js';
|
|
5
5
|
import { signingFetchFor } from './chunk-GBMTKV5B.js';
|
|
6
6
|
import { signerFor } from './chunk-XU5BNWX7.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { keyRunnerFactory, RunnerConfigError } from './chunk-
|
|
3
|
+
import { keyRunnerFactory, RunnerConfigError } from './chunk-MYD23JQX.js';
|
|
4
4
|
import { orgHomeDir } from './chunk-YQHUCOUL.js';
|
|
5
5
|
|
|
6
6
|
createRequire(import.meta.url);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { checkStarterFiles, contextIsGoverned } from './chunk-Q7ZHL6FY.js';
|
|
4
|
-
import { resolveCredentials, getJson, WorkCommandError } from './chunk-
|
|
4
|
+
import { resolveCredentials, getJson, WorkCommandError } from './chunk-PAGH2XKJ.js';
|
|
5
5
|
import { isLinkedRepository } from './chunk-TYRKGKMX.js';
|
|
6
6
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
7
7
|
import { fleetCheck, checkBuildSkill, checkMachineSkills, checkCommittedMaintainedSkills, checkMaintainedReferences, checkIgnoredSkillFolders } from './chunk-POZ65DAI.js';
|
|
@@ -1196,7 +1196,7 @@ function doctorExitCode(checks) {
|
|
|
1196
1196
|
// src/doctor-report.ts
|
|
1197
1197
|
async function gatherDoctorChecks() {
|
|
1198
1198
|
const { DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK } = await import('./build-disk-UGIMTVLM.js');
|
|
1199
|
-
const { defaultRunnerConfigPath, hasRunnerBlock, keyRunnerFactory, loadRunnerConfig, runnerVmOf } = await import('./config-
|
|
1199
|
+
const { defaultRunnerConfigPath, hasRunnerBlock, keyRunnerFactory, loadRunnerConfig, runnerVmOf } = await import('./config-ODVINAUA.js');
|
|
1200
1200
|
const configPath = defaultRunnerConfigPath();
|
|
1201
1201
|
const runnerHost = hasRunnerBlock(configPath);
|
|
1202
1202
|
const hooks = (() => {
|
|
@@ -1224,7 +1224,7 @@ async function gatherDoctorChecks() {
|
|
|
1224
1224
|
const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
|
|
1225
1225
|
checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
|
|
1226
1226
|
} else if (hasRunnerBlock(configPath)) {
|
|
1227
|
-
const { runnerHostChecks } = await import('./doctor-
|
|
1227
|
+
const { runnerHostChecks } = await import('./doctor-OD76KMBS.js');
|
|
1228
1228
|
const gateway = (() => {
|
|
1229
1229
|
try {
|
|
1230
1230
|
const loaded = loadRunnerConfig(configPath);
|
|
@@ -1252,7 +1252,7 @@ async function gatherDoctorChecks() {
|
|
|
1252
1252
|
const service = await (async () => {
|
|
1253
1253
|
const { existsSync: existsSync3 } = await import('fs');
|
|
1254
1254
|
if (process.platform !== "linux" || !existsSync3("/run/systemd/system")) return void 0;
|
|
1255
|
-
const { inspectRunnerService } = await import('./find-unit-
|
|
1255
|
+
const { inspectRunnerService } = await import('./find-unit-JC7VVTGL.js');
|
|
1256
1256
|
return inspectRunnerService(configPath);
|
|
1257
1257
|
})();
|
|
1258
1258
|
checks.push(...await runnerHostChecks({ configPath, hooks, gateway, repos, runner, service }));
|