@outerlayer/cli 0.34.0-next.20261025133402 → 0.34.0-next.20261025180645
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-setup-UXUWLV7O.js → agent-setup-FNDKCPUP.js} +8 -9
- package/dist/{bridge-OWCSVCXL.js → bridge-YJBB4YA3.js} +2 -3
- package/dist/build-B4OKU4MV.js +16 -0
- package/dist/{build-disk-5ZQHYBO3.js → build-disk-ZL46AEN3.js} +6 -8
- package/dist/build-info.json +1 -1
- package/dist/{builder-54GLXGFV.js → builder-XFPWE74N.js} +5 -7
- package/dist/{check-4TQZZOIQ.js → check-QULEN437.js} +43 -43
- package/dist/{chunk-CXQCBAKO.js → chunk-25GRRBTH.js} +1 -1
- package/dist/{chunk-4XYC2663.js → chunk-2D6CKNR7.js} +8 -4
- package/dist/{chunk-IHY457PB.js → chunk-2ILU7UAU.js} +1 -1
- package/dist/{chunk-JEOPIRUR.js → chunk-3EJBI5JW.js} +3 -3
- package/dist/{chunk-TVGLNHEB.js → chunk-3N77LUQI.js} +1 -1
- package/dist/{chunk-ES4ULBAL.js → chunk-4UPET3R7.js} +7 -3
- package/dist/{chunk-MPDLZCXM.js → chunk-5AFPP3GZ.js} +238 -14
- package/dist/{chunk-HAEDLXHA.js → chunk-63IVRRIO.js} +3 -3
- package/dist/{chunk-BTG5NZHN.js → chunk-6OLVVAOK.js} +4 -4
- package/dist/{chunk-3M6UYJSR.js → chunk-AVPLEFQR.js} +3 -3
- package/dist/{chunk-TVOZOOIW.js → chunk-BHSSGVOY.js} +3 -3
- package/dist/{chunk-QOUR4CQ7.js → chunk-CAQCDYKF.js} +2 -2
- package/dist/{chunk-SMMNU65K.js → chunk-DNZYXEMY.js} +13 -12
- package/dist/{chunk-LMICI7AY.js → chunk-EGVHFHY4.js} +3 -3
- package/dist/{chunk-RNVBSRZZ.js → chunk-FD5ASWTG.js} +18 -19
- package/dist/{chunk-NW5PDZYA.js → chunk-FDJPDZSR.js} +1 -1
- package/dist/{chunk-XA6PGME5.js → chunk-FVCHHSHB.js} +3 -3
- package/dist/{chunk-YOBQIXX6.js → chunk-G4W4B33M.js} +182 -3
- package/dist/{chunk-CCISO7EQ.js → chunk-HHFZXOBC.js} +12 -14
- package/dist/{chunk-AABYHGVO.js → chunk-INOUUSYI.js} +29 -9
- package/dist/{chunk-KDLQGTN6.js → chunk-JBCOUY4M.js} +2 -2
- package/dist/{chunk-POGPX7LI.js → chunk-JQSZTQSK.js} +24 -30
- package/dist/{chunk-JZD2NTRH.js → chunk-K2UAQWYO.js} +3 -3
- package/dist/{chunk-UC2DKBMS.js → chunk-KM2HLQE3.js} +2 -2
- package/dist/{chunk-T7N3BAOO.js → chunk-LUHIN4UZ.js} +3 -3
- package/dist/{chunk-XLJLR7EK.js → chunk-MOI2KDLH.js} +1 -1
- package/dist/{chunk-BUF6DSSM.js → chunk-NW26E4YU.js} +3 -3
- package/dist/{chunk-ZV2JJPDS.js → chunk-O4Z2MNNL.js} +6 -6
- package/dist/{chunk-2RBIW2PD.js → chunk-OGPEHSNW.js} +1 -1
- package/dist/{chunk-EZ7L5IZU.js → chunk-OQLF3MQQ.js} +3 -4
- package/dist/{chunk-J246WRLZ.js → chunk-OS7DJOQJ.js} +1 -1
- package/dist/{chunk-O5G6VQGZ.js → chunk-PFHTT4PP.js} +5 -5
- package/dist/{chunk-N7LAEN3T.js → chunk-PXGU3GKY.js} +1 -1
- package/dist/{chunk-WIK5KUGK.js → chunk-QANM5COC.js} +6 -6
- package/dist/{chunk-PSXVAOEB.js → chunk-QQP3S5FU.js} +3 -3
- package/dist/{chunk-AVLLJW5D.js → chunk-RFVIQLNB.js} +5 -5
- package/dist/{chunk-Z76GVJGQ.js → chunk-RHV5SRI2.js} +3 -3
- package/dist/{chunk-75KZUBHD.js → chunk-SI6WDF3U.js} +1 -1
- package/dist/chunk-SUOZYOWO.js +51 -0
- package/dist/{chunk-36T6W5RA.js → chunk-SYVRBBLW.js} +1 -1
- package/dist/{chunk-E34FRRSW.js → chunk-TBKV4L2W.js} +4 -4
- package/dist/{chunk-56ZHWIR2.js → chunk-TFPNPS4Q.js} +1 -1
- package/dist/{chunk-DUPM5LVJ.js → chunk-UMYYYF7B.js} +1 -1
- package/dist/{chunk-IW6Z337K.js → chunk-UN3SQTVL.js} +7 -7
- package/dist/{chunk-3NFZN7H6.js → chunk-UO4FQAOX.js} +16 -12
- package/dist/{chunk-ZWLEUSJW.js → chunk-VJ34F55N.js} +55 -39
- package/dist/{chunk-3RAAYBSG.js → chunk-YHKU2NOZ.js} +1 -1
- package/dist/{chunk-ENFBYN4A.js → chunk-YNMVVQOQ.js} +1 -1
- package/dist/{claude-launcher-JEB5BN7Q.js → claude-launcher-OQZNW7XJ.js} +1 -1
- package/dist/{cli-DY3EGPUB.js → cli-G3P2B2XE.js} +123 -117
- package/dist/{command-ZAXYAZCI.js → command-4XOXVWFW.js} +169 -48
- package/dist/{config-UN3X6AP2.js → config-QASNKYM6.js} +7 -9
- package/dist/{connect-cmd-TWM4FEKD.js → connect-cmd-MEDWMW3L.js} +8 -9
- package/dist/{container-start-JUNBJ7MU.js → container-start-2DHCWV73.js} +34 -36
- package/dist/{context-show-cmd-K5LRMDEO.js → context-show-cmd-VSFCG663.js} +9 -10
- package/dist/{control-plane-launch-LHOV2FPA.js → control-plane-launch-XBGHM7DB.js} +5 -6
- package/dist/{docker-YZKRM7IP.js → docker-TAC6G4VU.js} +5 -7
- package/dist/{doctor-YOAF7QPL.js → doctor-LK6E3XOW.js} +66 -41
- package/dist/{emit-artifact-cmd-SCF2FKKS.js → emit-artifact-cmd-L4REOPWX.js} +13 -14
- package/dist/{emit-cmd-7NMNKDK7.js → emit-cmd-7TU3JBJ2.js} +2 -2
- package/dist/{emit-criteria-cmd-B6CKUWTW.js → emit-criteria-cmd-QVFOQARC.js} +10 -11
- package/dist/{emit-demo-cmd-BNWRETMJ.js → emit-demo-cmd-L4B6OOTV.js} +15 -16
- package/dist/{emit-finding-cmd-TPSHNZNE.js → emit-finding-cmd-YXFCIWMU.js} +10 -11
- package/dist/{emit-result-cmd-J5DXIC2Q.js → emit-result-cmd-NI4LCTUM.js} +12 -13
- package/dist/{emit-step-cmd-NPH46KAO.js → emit-step-cmd-HWAUCZZB.js} +10 -11
- package/dist/{exec-client-ANW4KGMN.js → exec-client-QB4OZRGM.js} +3 -4
- package/dist/find-unit-4UR647S4.js +18 -0
- package/dist/{findings-cmd-4FJDCFL3.js → findings-cmd-O2IBO25E.js} +10 -11
- package/dist/{fleet-readiness-OK6534T6.js → fleet-readiness-NJYTQYTA.js} +5 -6
- package/dist/{governing-source-GNKTNM32.js → governing-source-JCI7VDQ6.js} +12 -13
- package/dist/{guest-init-C6M7YT3U.js → guest-init-IF5LXGUL.js} +4 -5
- package/dist/{hook-fast-LVTJWAG3.js → hook-fast-GPUL7T77.js} +1 -1
- package/dist/host-key-5RU322O3.js +9 -0
- package/dist/{image-tag-53DJPMSZ.js → image-tag-SEMBVB5D.js} +3 -4
- package/dist/index.js +4 -4
- package/dist/{init-RAJKTSPJ.js → init-2CEULE3F.js} +25 -27
- package/dist/{init-JGYMAOD5.js → init-FAIF7KOK.js} +25 -27
- package/dist/{init-cmd-IB3KTYCV.js → init-cmd-HZUUMO45.js} +13 -14
- package/dist/{init-update-VPWSWDY7.js → init-update-TTMFFNMB.js} +12 -13
- package/dist/{install-cmd-NP7GULCD.js → install-cmd-TWGRGEVL.js} +5 -6
- package/dist/{logs-V6AES5FE.js → logs-6CMB3DO6.js} +2 -3
- package/dist/{loop-ZGDZMVFN.js → loop-7U7MVICV.js} +40 -42
- package/dist/{machine-LJ3VMGS3.js → machine-S3JHOX4V.js} +25 -27
- package/dist/{mcp-serve-cmd-DHGCAMJS.js → mcp-serve-cmd-MWGIN6YL.js} +4 -5
- package/dist/{paths-DMKAJVA5.js → paths-T2DEBI62.js} +2 -3
- package/dist/pending-ERXWVLLG.js +9 -0
- package/dist/{pidfile-XCTXBGA3.js → pidfile-EAD2OEM7.js} +3 -4
- package/dist/{record-RQLGRYWG.js → record-IMXQNHPB.js} +3 -4
- package/dist/{runner-env-AUG2OIP4.js → runner-env-BJPUHAKZ.js} +9 -11
- package/dist/{runner-identity-BQA4SBU6.js → runner-identity-ZCPPC2BJ.js} +5 -7
- package/dist/{runner-key-ZIF7M7YN.js → runner-key-CYSUYKSX.js} +25 -27
- package/dist/{session-sender-VQ4LHJ5K.js → session-sender-5T7BXPKC.js} +13 -14
- package/dist/{spec-cmd-PXM4FJ2O.js → spec-cmd-4ABYAFNZ.js} +11 -12
- package/dist/{status-27EFD2WE.js → status-2AP7J2L7.js} +32 -34
- package/dist/{sync-cmd-VAV7TR2A.js → sync-cmd-34CGNA6T.js} +12 -13
- package/dist/{update-steps-7YLAFW3E.js → update-steps-JQOCCDWO.js} +33 -35
- package/dist/{watch-42XJSTTB.js → watch-6HU7LCUY.js} +12 -13
- package/dist/{work-claim-cmd-HSG4OHFI.js → work-claim-cmd-5QKLHSCR.js} +16 -18
- package/dist/{work-cmd-KCBU3RSD.js → work-cmd-3MKUIE2C.js} +10 -11
- package/dist/{work-comment-cmd-QIP2OUJC.js → work-comment-cmd-ESC3DSHI.js} +11 -12
- package/dist/{work-demo-cmd-6IKAG6ES.js → work-demo-cmd-7S23DGYO.js} +10 -11
- package/dist/{work-logs-cmd-RMKJA4AI.js → work-logs-cmd-46UPNN7Q.js} +10 -11
- package/dist/{work-open-pr-cmd-IAVLUUWW.js → work-open-pr-cmd-JNGTGLIP.js} +11 -12
- package/dist/{work-pr-cmd-3U7SVQII.js → work-pr-cmd-2J2LKETD.js} +10 -11
- package/dist/{work-proofs-cmd-6ZY6ZNNE.js → work-proofs-cmd-HRWTHYSS.js} +11 -12
- package/dist/{work-proofs-record-54GBEUJP.js → work-proofs-record-6OKAT3IC.js} +18 -19
- package/dist/{work-stop-cmd-LH5XY4YL.js → work-stop-cmd-Y22XIVQ6.js} +10 -11
- package/package.json +1 -1
- package/dist/build-4HFDZTUX.js +0 -14
- package/dist/chunk-3Z3MPR55.js +0 -226
- package/dist/chunk-HACGUL52.js +0 -183
- package/dist/host-key-DUGGHAGR.js +0 -10
- package/dist/inspect-DNLXTXLA.js +0 -6
- package/dist/install-QJWJFIWB.js +0 -19
- package/dist/pending-B55JZFOV.js +0 -10
- package/dist/{chunk-2AIOOU3A.js → chunk-KPHRRCUY.js} +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { TUNNEL_PORT, BRIDGE_ADDRESS, BRIDGE_CIDR } from './chunk-
|
|
3
|
+
import { TUNNEL_PORT, BRIDGE_ADDRESS, BRIDGE_CIDR } from './chunk-SI6WDF3U.js';
|
|
4
|
+
import { EXEC_PORT } from './chunk-OGPEHSNW.js';
|
|
4
5
|
import { startTimeOf } from './chunk-JBJTC3UU.js';
|
|
5
|
-
import {
|
|
6
|
-
import { RELAY_PORT } from './chunk-YOBQIXX6.js';
|
|
6
|
+
import { RELAY_PORT } from './chunk-G4W4B33M.js';
|
|
7
7
|
import { spawn, spawnSync } from 'child_process';
|
|
8
8
|
import { symlinkSync, lstatSync, writeFileSync, chmodSync, mkdirSync, existsSync } from 'fs';
|
|
9
9
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { WorkCommandError, resolveCredentials, getJson } from './chunk-
|
|
3
|
+
import { WorkCommandError, resolveCredentials, getJson } from './chunk-UN3SQTVL.js';
|
|
4
|
+
import { C } from './chunk-ANPNT6PM.js';
|
|
4
5
|
import { sanitizeTerminal } from './chunk-MECW77XP.js';
|
|
6
|
+
import { defaultFetch } from './chunk-3N77LUQI.js';
|
|
5
7
|
import { resolveRepoIdentity } from './chunk-AJYZNISW.js';
|
|
6
|
-
import { C } from './chunk-ANPNT6PM.js';
|
|
7
|
-
import { defaultFetch } from './chunk-TVGLNHEB.js';
|
|
8
8
|
import { parseWorkItemEnv } from './chunk-T2Q7ISPE.js';
|
|
9
9
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
10
10
|
import { inferArtifactKind, mediaTypeForArtifactPath, WORK_ITEM_COMMENT_MAX_BODY_LENGTH } from './chunk-EOTMDIYC.js';
|
|
@@ -130,7 +130,7 @@ async function runWorkProofs(opts) {
|
|
|
130
130
|
async function runWorkProofsCommand(opts) {
|
|
131
131
|
try {
|
|
132
132
|
if (opts.record) {
|
|
133
|
-
const { runWorkProofsRecord } = await import('./work-proofs-record-
|
|
133
|
+
const { runWorkProofsRecord } = await import('./work-proofs-record-6OKAT3IC.js');
|
|
134
134
|
const result2 = await runWorkProofsRecord(opts);
|
|
135
135
|
process.exitCode = result2.exitCode;
|
|
136
136
|
return;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { fetchFactories, selectFactory, saveFactoryConnection, autoConnectedLine } from './chunk-
|
|
4
|
-
import {
|
|
5
|
-
import { resolveGatewayCredentials } from './chunk-TVGLNHEB.js';
|
|
3
|
+
import { fetchFactories, selectFactory, saveFactoryConnection, autoConnectedLine } from './chunk-FVCHHSHB.js';
|
|
4
|
+
import { resolveGatewayCredentials } from './chunk-3N77LUQI.js';
|
|
6
5
|
import { readCloudConfig } from './chunk-PJDQPF5N.js';
|
|
7
6
|
import { findGitDirs, readRepoConnection } from './chunk-BJ3KTMDH.js';
|
|
7
|
+
import { resolveRepoIdentity } from './chunk-AJYZNISW.js';
|
|
8
8
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
9
9
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
10
10
|
|
|
@@ -1,11 +1,11 @@
|
|
|
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-UN3SQTVL.js';
|
|
4
4
|
import { detectActiveSession } from './chunk-IP7BIBXJ.js';
|
|
5
|
+
import { C } from './chunk-ANPNT6PM.js';
|
|
5
6
|
import { sanitizeTerminal } from './chunk-MECW77XP.js';
|
|
7
|
+
import { defaultFetch } from './chunk-3N77LUQI.js';
|
|
6
8
|
import { resolveRepoIdentity } from './chunk-AJYZNISW.js';
|
|
7
|
-
import { C } from './chunk-ANPNT6PM.js';
|
|
8
|
-
import { defaultFetch } from './chunk-TVGLNHEB.js';
|
|
9
9
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
10
10
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
11
11
|
import { randomUUID } from 'crypto';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { removeRetiredSkills } from './chunk-JWNH4ZTF.js';
|
|
4
|
-
import { defaultFetch, resolveGatewayCredentials } from './chunk-
|
|
5
|
-
import { withTokenHeader } from './chunk-YOBQIXX6.js';
|
|
4
|
+
import { defaultFetch, resolveGatewayCredentials } from './chunk-3N77LUQI.js';
|
|
6
5
|
import { appendContextProvenance } from './chunk-ZJSNLVCE.js';
|
|
7
6
|
import { loadMaintainedFiles, writeMaintainedFiles } from './chunk-ZQSANKS4.js';
|
|
8
7
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
9
8
|
import { writeDegraded, writeSourceCache, SOURCE_CACHE_TTL_RETRY_MS, writeContextManifest, SOURCE_CACHE_TTL_SUCCESS_MS, readSourceCache, isSourceCacheFresh, clearDegraded } from './chunk-YQR6E6OV.js';
|
|
10
9
|
import { normalizeRepoName, parseOuterlayerConfig, classifyTree, emitTree } from './chunk-FGXT5OXS.js';
|
|
11
10
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
11
|
+
import { withTokenHeader } from './chunk-G4W4B33M.js';
|
|
12
12
|
import { execFileSync } from 'child_process';
|
|
13
13
|
import { existsSync, mkdirSync, writeFileSync, chmodSync, lstatSync, readFileSync, copyFileSync } from 'fs';
|
|
14
14
|
import { isAbsolute, join, dirname } from 'path';
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { placeholderQueues, placeholderProblem } from './chunk-
|
|
4
|
-
import { checkFit } from './chunk-
|
|
5
|
-
import { builtinKind, imageBuildOf } from './chunk-
|
|
6
|
-
import { realBuildDiskProbe, checkDiskFit, DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-
|
|
7
|
-
import { builderDiskPinned } from './chunk-
|
|
8
|
-
import { FORWARDED_CLAUDE_CREDENTIAL_VARIABLES, claudeCredentialVariablesSet, claudeCredential, claudeEnvPath } from './chunk-
|
|
9
|
-
import { parseRunnerEnv } from './chunk-HACGUL52.js';
|
|
3
|
+
import { placeholderQueues, placeholderProblem } from './chunk-JQSZTQSK.js';
|
|
4
|
+
import { checkFit } from './chunk-INOUUSYI.js';
|
|
5
|
+
import { builtinKind, imageBuildOf, keepsHostBuilder } from './chunk-2D6CKNR7.js';
|
|
6
|
+
import { realBuildDiskProbe, checkDiskFit, DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-KM2HLQE3.js';
|
|
7
|
+
import { builderDiskPinned } from './chunk-4UPET3R7.js';
|
|
8
|
+
import { FORWARDED_CLAUDE_CREDENTIAL_VARIABLES, claudeCredentialVariablesSet, claudeCredential, claudeEnvPath, parseRunnerEnv, BUILD_SLICE_MEMORY_ENV } from './chunk-G4W4B33M.js';
|
|
10
9
|
import { closeSync, openSync, constants, readFileSync } from 'fs';
|
|
11
10
|
import { join, dirname } from 'path';
|
|
12
11
|
import { totalmem } from 'os';
|
|
@@ -26,6 +25,10 @@ function realBlockedProbes() {
|
|
|
26
25
|
return { env: process.env, kvm: openKvm, totalMemoryBytes: totalmem, imageBuilder: "unknown", buildDisk: sharedBuildDisk };
|
|
27
26
|
}
|
|
28
27
|
var DEFAULT_BUILD_MEMORY = "8g";
|
|
28
|
+
function sliceMemoryOf(env) {
|
|
29
|
+
const bytes = Number(env[BUILD_SLICE_MEMORY_ENV]);
|
|
30
|
+
return Number.isSafeInteger(bytes) && bytes > 0 ? bytes : void 0;
|
|
31
|
+
}
|
|
29
32
|
function managedProblems(facts) {
|
|
30
33
|
const problems = [];
|
|
31
34
|
if (builtinKind(facts.provision) !== "vm") {
|
|
@@ -93,9 +96,6 @@ function managedFactsOf(config, probes) {
|
|
|
93
96
|
builderDiskPinned: probes.builderDiskPinned ?? builderDiskPinned()
|
|
94
97
|
};
|
|
95
98
|
}
|
|
96
|
-
function keepsHostBuilder(config, builderDiskIsPinned) {
|
|
97
|
-
return !(builtinKind(config.hooks.provision) === "vm" && imageBuildOf(config) === "vm" && (builderDiskIsPinned ?? builderDiskPinned()));
|
|
98
|
-
}
|
|
99
99
|
function checkBlockedWithSlots(config, probes) {
|
|
100
100
|
const blocked = (reason) => ({ blocked: { reason } });
|
|
101
101
|
let slots;
|
|
@@ -110,7 +110,8 @@ function checkBlockedWithSlots(config, probes) {
|
|
|
110
110
|
const fit = checkFit({
|
|
111
111
|
concurrency: config.concurrency,
|
|
112
112
|
buildMemory: config.build?.memory ?? DEFAULT_BUILD_MEMORY,
|
|
113
|
-
usableBytes: probes.totalMemoryBytes()
|
|
113
|
+
usableBytes: probes.totalMemoryBytes(),
|
|
114
|
+
sliceBytes: sliceMemoryOf(probes.env)
|
|
114
115
|
});
|
|
115
116
|
if (!fit.fits) {
|
|
116
117
|
const advice = probes.inImage === true ? "Set OUTERLAYER_BUILD_MEMORY or OUTERLAYER_CONCURRENCY in the env file and recreate the container, or give the machine more memory" : `Lower runner.concurrency or runner.build.memory in ${config.configPath}`;
|
|
@@ -156,4 +157,4 @@ function checkBlockedWithSlots(config, probes) {
|
|
|
156
157
|
return { slots };
|
|
157
158
|
}
|
|
158
159
|
|
|
159
|
-
export { checkBlockedWithSlots,
|
|
160
|
+
export { checkBlockedWithSlots, managedFactsOf, managedProblems, realBlockedProbes };
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { launchRefusalForSession } from './chunk-ESVW4MJY.js';
|
|
4
4
|
import { detectActiveSession } from './chunk-IP7BIBXJ.js';
|
|
5
|
-
import { autoConnect } from './chunk-
|
|
5
|
+
import { autoConnect } from './chunk-AVPLEFQR.js';
|
|
6
|
+
import { C } from './chunk-ANPNT6PM.js';
|
|
6
7
|
import { acquireSpoolLockAt } from './chunk-MECW77XP.js';
|
|
8
|
+
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-3N77LUQI.js';
|
|
7
9
|
import { resolveRepoIdentity } from './chunk-AJYZNISW.js';
|
|
8
|
-
import { C } from './chunk-ANPNT6PM.js';
|
|
9
|
-
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-TVGLNHEB.js';
|
|
10
10
|
import { launchedItemForSession } from './chunk-T2Q7ISPE.js';
|
|
11
11
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
12
12
|
import { StepNameSchema, StepBodySchema } from './chunk-EOTMDIYC.js';
|
|
@@ -1,35 +1,34 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { readsJobState, READ_JOB_STATE_FORMATS, jobStateFormatOf } from './chunk-ZVB57WI6.js';
|
|
4
|
-
import { DOCKERD_LOG, HELPER_PATH, HELPER_RECORD } from './chunk-
|
|
5
|
-
import { writeDockerClientConfig } from './chunk-75KZUBHD.js';
|
|
4
|
+
import { DOCKERD_LOG, HELPER_PATH, HELPER_RECORD } from './chunk-63IVRRIO.js';
|
|
6
5
|
import { zodProblem } from './chunk-I3LTIAOR.js';
|
|
7
|
-
import { senderPidfile } from './chunk-
|
|
8
|
-
import { installScrubContext } from './chunk-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
6
|
+
import { senderPidfile } from './chunk-JBCOUY4M.js';
|
|
7
|
+
import { installScrubContext } from './chunk-QANM5COC.js';
|
|
8
|
+
import { writeDockerClientConfig } from './chunk-SI6WDF3U.js';
|
|
9
|
+
import { ADDED_USER, shellQuote, GH_CONFIG_YML, ghHostsYml, hasClaudeCredential, AssetError, obtainImage, ensureRootfs, makeBuildsDirPrivate, gitRemoteFor, startServicesFor, createLeaseChannel, createBuildDisk, machineConfig, startJailedInto, resolveAgentUser, AgentUserError, runBuildSteps, startHostServices, LEASE_SECONDS, createContainerRuntime, stopContainer, cleanupContainer, outOfMemoryReason, closeHostBuild, dropManagedClaudeKey, containerSenderCommand, hostCommandEnvironment, execArgv, signalInContainer, syncInContainer, copyTranscriptsFromContainer, MANAGED_UNJAILED_REASON, senderAliveScript, helperFirecrackerNote, managedClaudeKeyValues, stopJailed, deleteBuildDisk, managedClaudeKeyFor, startCheckContainer, lifecycleSteps, lifecycleFailureReason, writeEvalInput, DeliveryFailure, EVAL_INPUT_NAME, copyTranscripts, senderSignalScript, containerJudgeEnvironment, ROOT_DISK_ID_PREFIX, copyJudgeTree } from './chunk-JQSZTQSK.js';
|
|
10
|
+
import { readBranchHead, fetchCommit, diffBetween } from './chunk-UO4FQAOX.js';
|
|
11
|
+
import { waitForAgent, vmExecArgs } from './chunk-2ILU7UAU.js';
|
|
12
|
+
import { socketPathProblem, vsockLinks, LEASE_LINK, linkVsockSockets } from './chunk-OGPEHSNW.js';
|
|
13
|
+
import { describeCallFailure, resolveGoverningSource, prefetchGovernedContext, refusalCode, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, logStamp, createRunnerLog, removeKeptContext, formatDuration, retrySend, formatClock, WORKFLOW_PERMISSION_REASON, keptContextTree } from './chunk-RFVIQLNB.js';
|
|
14
|
+
import { imageBuildOf, isBuiltinContainer, isBuiltinProcess, isBuiltinVm, DEFAULT_CHECK_TIME_LIMIT_MINUTES } from './chunk-2D6CKNR7.js';
|
|
15
|
+
import { DEFAULT_CACHE_DISK, formatBytes, allocatedBytes } from './chunk-KM2HLQE3.js';
|
|
16
|
+
import { parseSize, HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, writeJobFile, readJobFile, childEnvironment, withAnswerProtocol, judgeCommand, MAX_REPORT_BYTES, JUDGE_MAX_TURNS, JUDGE_DIR, COMMAND_DIR, MAX_ITEMS_BYTES } from './chunk-5AFPP3GZ.js';
|
|
17
|
+
import { CLAUDE_CODE_VERSION, FIRECRACKER_VERSION } from './chunk-4UPET3R7.js';
|
|
11
18
|
import { isSameProcess, startTimeOf } from './chunk-JBJTC3UU.js';
|
|
12
|
-
import {
|
|
13
|
-
import { socketPathProblem, vsockLinks, LEASE_LINK, linkVsockSockets } from './chunk-2RBIW2PD.js';
|
|
14
|
-
import { describeCallFailure, resolveGoverningSource, prefetchGovernedContext, refusalCode, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, logStamp, createRunnerLog, removeKeptContext, formatDuration, retrySend, formatClock, WORKFLOW_PERMISSION_REASON, keptContextTree } from './chunk-AVLLJW5D.js';
|
|
15
|
-
import { imageBuildOf, isBuiltinContainer, isBuiltinProcess, isBuiltinVm, DEFAULT_CHECK_TIME_LIMIT_MINUTES } from './chunk-4XYC2663.js';
|
|
16
|
-
import { DEFAULT_CACHE_DISK, formatBytes, allocatedBytes } from './chunk-UC2DKBMS.js';
|
|
17
|
-
import { parseSize, HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, writeJobFile, readJobFile, childEnvironment, withAnswerProtocol, judgeCommand, MAX_REPORT_BYTES, JUDGE_MAX_TURNS, JUDGE_DIR, COMMAND_DIR, MAX_ITEMS_BYTES } from './chunk-MPDLZCXM.js';
|
|
18
|
-
import { CLAUDE_CODE_VERSION, FIRECRACKER_VERSION } from './chunk-ES4ULBAL.js';
|
|
19
|
-
import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-IW6Z337K.js';
|
|
19
|
+
import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-UN3SQTVL.js';
|
|
20
20
|
import { planArtifactUpload } from './chunk-MECW77XP.js';
|
|
21
|
-
import { scrubText } from './chunk-AJYZNISW.js';
|
|
22
21
|
import { readCloudConfig } from './chunk-PJDQPF5N.js';
|
|
23
|
-
import { signerFor } from './chunk-
|
|
24
|
-
import { RUNNER_FILE_MODE, runnerDir, buildDir, vsockPath, jobConsolePath } from './chunk-N7LAEN3T.js';
|
|
25
|
-
import { JOB_MOUNT, repositoriesOf, primaryOf, buildEnvironment, CHECKOUT_DIR, claudeCredential, AGENT_CREDENTIAL_MISSING, sharedUserEnvironment, headerVariables, authorEnvironment, withTunnelRecord, commitIdentityRecord, buildMavenSettingsXml, CLAUDE_CREDENTIAL_VARIABLES, currentClaudeCredential, removedClaudeCredentialValues, managedClaudeCredential, RELAY_PORT, repositoryPath, lifecycleWorkdir, CHECK_ITEMS_FILE, MAVEN_SETTINGS_FILE, checkEnvironment, EVAL_INPUT_DIR } from './chunk-YOBQIXX6.js';
|
|
22
|
+
import { signerFor } from './chunk-MOI2KDLH.js';
|
|
26
23
|
import { resolvePackRoot } from './chunk-ZQSANKS4.js';
|
|
24
|
+
import { scrubText } from './chunk-AJYZNISW.js';
|
|
27
25
|
import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
|
|
28
26
|
import { resolveVersion } from './chunk-RA3O54FC.js';
|
|
29
27
|
import { parsePolicy } from './chunk-FGXT5OXS.js';
|
|
30
28
|
import { CheckItemsSchema, CHECK_ITEM_REASON_MAX_LENGTH } from './chunk-EOTMDIYC.js';
|
|
31
29
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
32
|
-
import {
|
|
30
|
+
import { RUNNER_FILE_MODE, runnerDir, buildDir, vsockPath, jobConsolePath } from './chunk-PXGU3GKY.js';
|
|
31
|
+
import { JOB_MOUNT, repositoriesOf, primaryOf, buildEnvironment, CHECKOUT_DIR, claudeCredential, AGENT_CREDENTIAL_MISSING, sharedUserEnvironment, headerVariables, authorEnvironment, withTunnelRecord, commitIdentityRecord, fdName, buildMavenSettingsXml, CLAUDE_CREDENTIAL_VARIABLES, currentClaudeCredential, removedClaudeCredentialValues, managedClaudeCredential, RELAY_PORT, repositoryPath, lifecycleWorkdir, CHECK_ITEMS_FILE, MAVEN_SETTINGS_FILE, checkEnvironment, EVAL_INPUT_DIR } from './chunk-G4W4B33M.js';
|
|
33
32
|
import { RUNNER_WORDED_REASONS, UNKNOWN_TRACKING_REASON } from './chunk-MESOOLF4.js';
|
|
34
33
|
import { existsSync, statSync, appendFileSync, rmSync, mkdirSync, chmodSync, writeFileSync, openSync, readFileSync, closeSync, readdirSync, lstatSync, fstatSync, readSync, realpathSync } from 'fs';
|
|
35
34
|
import { join, dirname, delimiter, sep } from 'path';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
3
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-PXGU3GKY.js';
|
|
4
4
|
import { readFileSync, mkdirSync, writeFileSync, renameSync } from 'fs';
|
|
5
5
|
import { join } from 'path';
|
|
6
6
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
+
import { DEFAULT_DASHBOARD } from './chunk-Y5YCX6AL.js';
|
|
3
4
|
import { sanitizeTerminal } from './chunk-MECW77XP.js';
|
|
4
|
-
import { remoteLookupFailed } from './chunk-AJYZNISW.js';
|
|
5
5
|
import { isAgentsMdLayout } from './chunk-NKOM4JKY.js';
|
|
6
|
-
import {
|
|
7
|
-
import { cliFetch, resolveGatewayCredentials } from './chunk-TVGLNHEB.js';
|
|
6
|
+
import { cliFetch, resolveGatewayCredentials } from './chunk-3N77LUQI.js';
|
|
8
7
|
import { readCloudConfig } from './chunk-PJDQPF5N.js';
|
|
9
8
|
import { findGitDirs, writeRepoConnection, readRepoConnection } from './chunk-BJ3KTMDH.js';
|
|
9
|
+
import { remoteLookupFailed } from './chunk-AJYZNISW.js';
|
|
10
10
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
11
11
|
import { execFileSync } from 'child_process';
|
|
12
12
|
import { lstatSync } from 'fs';
|
|
@@ -1,14 +1,193 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { parseRunnerEnv } from './chunk-HACGUL52.js';
|
|
4
3
|
import { TARGET_TUNNEL, TARGET_LEASE, destinationTarget } from './chunk-MESOOLF4.js';
|
|
5
|
-
import {
|
|
4
|
+
import { spawn, spawnSync } from 'child_process';
|
|
5
|
+
import { statSync, readFileSync, mkdirSync, writeFileSync, existsSync, unlinkSync, chmodSync } from 'fs';
|
|
6
6
|
import { join, dirname } from 'path';
|
|
7
7
|
import { request as request$1, createServer } from 'http';
|
|
8
8
|
import { request } from 'https';
|
|
9
9
|
import { createServer as createServer$1 } from 'net';
|
|
10
10
|
|
|
11
11
|
createRequire(import.meta.url);
|
|
12
|
+
var FD_STORE_ENV = "OUTERLAYER_FD_STORE";
|
|
13
|
+
var MIN_SYSTEMD = 254;
|
|
14
|
+
var LISTEN_FDS_START = 3;
|
|
15
|
+
var FD_SLOTS_PER_BUILD = 64;
|
|
16
|
+
function fdName(buildId, socket) {
|
|
17
|
+
return `ol-${buildId}-${socket}`;
|
|
18
|
+
}
|
|
19
|
+
function listenFdOf(server) {
|
|
20
|
+
const handle = server._handle;
|
|
21
|
+
return typeof handle?.fd === "number" && handle.fd >= 0 ? handle.fd : void 0;
|
|
22
|
+
}
|
|
23
|
+
function parseListenFds(env, pid) {
|
|
24
|
+
const found = /* @__PURE__ */ new Map();
|
|
25
|
+
if (env.LISTEN_PID !== String(pid)) return found;
|
|
26
|
+
const count = Number(env.LISTEN_FDS);
|
|
27
|
+
if (!Number.isInteger(count) || count <= 0) return found;
|
|
28
|
+
const names = (env.LISTEN_FDNAMES ?? "").split(":");
|
|
29
|
+
for (let index = 0; index < count; index++) {
|
|
30
|
+
const name = names[index];
|
|
31
|
+
if (name !== void 0 && name !== "" && name !== "stored") found.set(name, LISTEN_FDS_START + index);
|
|
32
|
+
}
|
|
33
|
+
return found;
|
|
34
|
+
}
|
|
35
|
+
function listenOnFd(server, fd) {
|
|
36
|
+
return new Promise((resolve, reject) => {
|
|
37
|
+
server.once("error", reject);
|
|
38
|
+
server.listen({ fd }, () => {
|
|
39
|
+
server.off("error", reject);
|
|
40
|
+
resolve();
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function run(spawnFn, command, args, fd) {
|
|
45
|
+
return new Promise((resolve) => {
|
|
46
|
+
let stdout = "";
|
|
47
|
+
let stderr = "";
|
|
48
|
+
let child;
|
|
49
|
+
try {
|
|
50
|
+
child = spawnFn(command, args, { stdio: ["ignore", "pipe", "pipe", ...fd === void 0 ? [] : [fd]] });
|
|
51
|
+
} catch (err) {
|
|
52
|
+
resolve({ status: null, stdout, stderr: err instanceof Error ? err.message : String(err) });
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
child.stdout?.on("data", (chunk) => stdout += chunk.toString("utf8"));
|
|
56
|
+
child.stderr?.on("data", (chunk) => stderr += chunk.toString("utf8"));
|
|
57
|
+
child.on("error", (err) => resolve({ status: null, stdout, stderr: err.message }));
|
|
58
|
+
child.on("close", (status) => resolve({ status, stdout, stderr }));
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function systemdVersion(ran) {
|
|
62
|
+
const match = /^systemd (\d+)/.exec(ran.stdout);
|
|
63
|
+
return ran.status === 0 && match !== null ? Number(match[1]) : void 0;
|
|
64
|
+
}
|
|
65
|
+
function realFdStorePort(options = {}) {
|
|
66
|
+
const env = options.env ?? process.env;
|
|
67
|
+
const pid = options.pid ?? process.pid;
|
|
68
|
+
const command = options.command ?? "systemd-notify";
|
|
69
|
+
const spawnFn = options.spawn ?? spawn;
|
|
70
|
+
let inherited;
|
|
71
|
+
let held2;
|
|
72
|
+
let version;
|
|
73
|
+
const inheritedNames = () => inherited ??= parseListenFds(env, pid);
|
|
74
|
+
const heldNames = () => held2 ??= new Set(inheritedNames().keys());
|
|
75
|
+
return {
|
|
76
|
+
async status() {
|
|
77
|
+
if (env.NOTIFY_SOCKET === void 0 || env.NOTIFY_SOCKET === "") return { ok: false, reason: "NOTIFY_SOCKET is not set, so this runner was not started by a service that accepts descriptors" };
|
|
78
|
+
const size = Number(env[FD_STORE_ENV]);
|
|
79
|
+
if (!Number.isInteger(size) || size <= 0) return { ok: false, reason: `${FD_STORE_ENV} is not set, so the service's unit keeps no descriptor store` };
|
|
80
|
+
version ??= run(spawnFn, command, ["--version"]).then(systemdVersion);
|
|
81
|
+
const found = await version;
|
|
82
|
+
if (found === void 0) return { ok: false, reason: `${command} could not be run, so no descriptor can be stored` };
|
|
83
|
+
if (found < MIN_SYSTEMD) return { ok: false, reason: `systemd ${found} cannot store a descriptor sent from a child process: it needs systemd ${MIN_SYSTEMD} or later` };
|
|
84
|
+
return { ok: true };
|
|
85
|
+
},
|
|
86
|
+
async push(name, server) {
|
|
87
|
+
const fd = listenFdOf(server);
|
|
88
|
+
if (fd === void 0) throw new Error(`${name} has no descriptor to store`);
|
|
89
|
+
const size = Number(env[FD_STORE_ENV]);
|
|
90
|
+
const names = heldNames();
|
|
91
|
+
if (Number.isInteger(size) && names.size >= size) {
|
|
92
|
+
throw new Error(`the descriptor store is full: it holds ${names.size} descriptors, the size the service's unit sets (FileDescriptorStoreMax=${size})`);
|
|
93
|
+
}
|
|
94
|
+
const ran = await run(spawnFn, command, [`--fd=${LISTEN_FDS_START}`, `--fdname=${name}`, "FDSTORE=1"], fd);
|
|
95
|
+
if (ran.status !== 0) throw new Error(`storing ${name} failed${ran.status === null ? "" : ` (exit ${ran.status})`}: ${ran.stderr.trim().split("\n")[0] ?? ""}`);
|
|
96
|
+
names.add(name);
|
|
97
|
+
},
|
|
98
|
+
async remove(name) {
|
|
99
|
+
const ran = await run(spawnFn, command, ["FDSTOREREMOVE=1", `FDNAME=${name}`]);
|
|
100
|
+
if (ran.status !== 0) throw new Error(`removing ${name} from the store failed${ran.status === null ? "" : ` (exit ${ran.status})`}: ${ran.stderr.trim().split("\n")[0] ?? ""}`);
|
|
101
|
+
heldNames().delete(name);
|
|
102
|
+
},
|
|
103
|
+
inherited() {
|
|
104
|
+
return inheritedNames();
|
|
105
|
+
},
|
|
106
|
+
listenOn: listenOnFd
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// src/runner/service/slice.ts
|
|
111
|
+
var BUILD_SLICE_MEMORY_ENV = "OUTERLAYER_BUILD_SLICE_MEMORY";
|
|
112
|
+
|
|
113
|
+
// src/runner/service/inspect.ts
|
|
114
|
+
var CREDENTIAL_VARIABLES = ["CLAUDE_CODE_OAUTH_TOKEN", "ANTHROPIC_API_KEY"];
|
|
115
|
+
function property(shown, name) {
|
|
116
|
+
return new RegExp(`^${name}=(.*)$`, "m").exec(shown)?.[1]?.trim();
|
|
117
|
+
}
|
|
118
|
+
function holdsGroup(status, gid) {
|
|
119
|
+
const primary = /^Gid:\s+(\d+)/m.exec(status)?.[1];
|
|
120
|
+
const supplementary = /^Groups:[ \t]*(.*)$/m.exec(status)?.[1]?.trim().split(/\s+/).filter((g) => g !== "") ?? [];
|
|
121
|
+
return [primary, ...supplementary].some((g) => g !== void 0 && Number(g) === gid);
|
|
122
|
+
}
|
|
123
|
+
function parseRunnerEnv(text) {
|
|
124
|
+
const env = {};
|
|
125
|
+
for (const line of text.split("\n")) {
|
|
126
|
+
const match = /^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)=(.*)$/.exec(line);
|
|
127
|
+
if (match === null) continue;
|
|
128
|
+
env[match[1]] = match[2].trim().replace(/^(["'])(.*)\1$/, "$2");
|
|
129
|
+
}
|
|
130
|
+
return env;
|
|
131
|
+
}
|
|
132
|
+
function credentialNames(env) {
|
|
133
|
+
const set = parseRunnerEnv(env ?? "");
|
|
134
|
+
return CREDENTIAL_VARIABLES.filter((name) => (set[name] ?? "").trim() !== "");
|
|
135
|
+
}
|
|
136
|
+
function startedWithStore(environ) {
|
|
137
|
+
const vars = new Map(environ.split("\0").map((entry) => [entry.slice(0, entry.indexOf("=")), entry.slice(entry.indexOf("=") + 1)]));
|
|
138
|
+
return (vars.get("NOTIFY_SOCKET") ?? "") !== "" && Number(vars.get(FD_STORE_ENV)) > 0;
|
|
139
|
+
}
|
|
140
|
+
function inspectService(unit, configDir, probes) {
|
|
141
|
+
const shown = probes.show(unit);
|
|
142
|
+
if (shown === void 0 || property(shown, "LoadState") !== "loaded") return void 0;
|
|
143
|
+
const pid = Number(property(shown, "MainPID") ?? "0");
|
|
144
|
+
const mainPid = Number.isInteger(pid) && pid > 0 ? pid : void 0;
|
|
145
|
+
const delegate = property(shown, "Delegate");
|
|
146
|
+
const storeMax = Number(property(shown, "FileDescriptorStoreMax"));
|
|
147
|
+
const status = mainPid === void 0 ? void 0 : probes.readFile(`/proc/${mainPid}/status`);
|
|
148
|
+
const environ = mainPid === void 0 ? void 0 : probes.readFile(`/proc/${mainPid}/environ`);
|
|
149
|
+
const systemd = Number(/^systemd (\d+)/.exec(probes.systemctlVersion?.() ?? "")?.[1]);
|
|
150
|
+
const kvm = probes.kvmGid();
|
|
151
|
+
const sliceMemory = Number(new RegExp(`(?:^|\\s)${BUILD_SLICE_MEMORY_ENV}=(\\d+)(?:\\s|$)`).exec(property(shown, "Environment") ?? "")?.[1]);
|
|
152
|
+
return {
|
|
153
|
+
unit,
|
|
154
|
+
...Number.isSafeInteger(sliceMemory) && sliceMemory > 0 ? { buildSliceMemory: sliceMemory } : {},
|
|
155
|
+
mainPid,
|
|
156
|
+
delegate: delegate === void 0 ? void 0 : delegate !== "no",
|
|
157
|
+
...Number.isInteger(storeMax) && property(shown, "FileDescriptorStoreMax") !== void 0 ? { fdStoreMax: storeMax } : {},
|
|
158
|
+
hasKvmGroup: status === void 0 || kvm === void 0 ? void 0 : holdsGroup(status, kvm),
|
|
159
|
+
...environ === void 0 ? {} : { startedWithStore: startedWithStore(environ) },
|
|
160
|
+
...systemd > 0 ? { systemdVersion: systemd } : {},
|
|
161
|
+
// `claude.env` first, where the service loads the credential from; `runner.env` holds one that was never moved.
|
|
162
|
+
credentialVariables: [.../* @__PURE__ */ new Set([...credentialNames(probes.readFile(join(configDir, "claude.env"))), ...credentialNames(probes.readFile(join(configDir, "runner.env")))])]
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
function realInspectProbes() {
|
|
166
|
+
return {
|
|
167
|
+
show: (unit) => {
|
|
168
|
+
const result = spawnSync("systemctl", ["show", "--property=LoadState,MainPID,Delegate,FileDescriptorStoreMax,Environment", unit], { encoding: "utf8", timeout: 1e4 });
|
|
169
|
+
return result.status === 0 ? result.stdout : void 0;
|
|
170
|
+
},
|
|
171
|
+
readFile: (path) => {
|
|
172
|
+
try {
|
|
173
|
+
return readFileSync(path, "utf8");
|
|
174
|
+
} catch {
|
|
175
|
+
return void 0;
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
systemctlVersion: () => {
|
|
179
|
+
const result = spawnSync("systemctl", ["--version"], { encoding: "utf8", timeout: 1e4 });
|
|
180
|
+
return result.status === 0 ? result.stdout : void 0;
|
|
181
|
+
},
|
|
182
|
+
kvmGid: () => {
|
|
183
|
+
try {
|
|
184
|
+
return statSync("/dev/kvm").gid;
|
|
185
|
+
} catch {
|
|
186
|
+
return void 0;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
}
|
|
12
191
|
var CLAUDE_CREDENTIAL_ID = "claude";
|
|
13
192
|
var CLAUDE_ENV_FILE = "claude.env";
|
|
14
193
|
function claudeEnvPath(configPath) {
|
|
@@ -871,4 +1050,4 @@ function routesOf(counts) {
|
|
|
871
1050
|
return routes.length === 0 ? {} : { routes };
|
|
872
1051
|
}
|
|
873
1052
|
|
|
874
|
-
export { AGENT_CREDENTIAL_MISSING, BUILD_HOME, BUILT_IN_NAMES, CHECKOUT_DIR, CHECK_ITEMS_FILE, CLAUDE_CREDENTIAL_ID, CLAUDE_CREDENTIAL_VARIABLES, CLAUDE_ENV_FILE, CLAUDE_PORT, CLAUDE_SOCKET, DESTINATION_BASE_PORT, EVAL_INPUT_DIR, FORWARDED_CLAUDE_CREDENTIAL_VARIABLES, GATEWAY_PORT, GATEWAY_SOCKET, JOB_MOUNT, MAVEN_NO_PROXY_NOTE, MAVEN_SETTINGS_FILE, MAVEN_SPACE_NOTE, PROXY_WARNING_FLAG, RELAY_PORT, authorEnvironment, buildEnvironment, buildMavenSettingsXml, builtInEnvironment, checkEnvironment, checkoutPath, claudeCredential, claudeCredentialVariablesSet, claudeEnvPath, commitIdentityRecord, containerLocalAddress, credentialLineIn, currentClaudeCredential, destinationEnvironment, headerVariables, heldClaudeCredential, isRefusedInConfig, isReservedVariable, lifecycleWorkdir, managedClaudeCredential, mavenArgs, mavenSettingsXml, namesGlobalSettings, parseClaimIdentity, parseClaimedRepositories, parseIsolation, parseUnreachable, primaryOf, proxyEnvironment, readClaudeCredential, removedClaudeCredentialValues, repositoriesOf, repositoryPath, resolveDestinations, sharedUserEnvironment, startBuildServices, takeClaudeCredential, tokenHeader, withGitConfig, withHooksPath, withProxyWarningHidden, withTokenHeader, withTunnelRecord, withoutCredentialLines, writeBuildMavenSettings, writeMavenSettings };
|
|
1053
|
+
export { AGENT_CREDENTIAL_MISSING, BUILD_HOME, BUILD_SLICE_MEMORY_ENV, BUILT_IN_NAMES, CHECKOUT_DIR, CHECK_ITEMS_FILE, CLAUDE_CREDENTIAL_ID, CLAUDE_CREDENTIAL_VARIABLES, CLAUDE_ENV_FILE, CLAUDE_PORT, CLAUDE_SOCKET, DESTINATION_BASE_PORT, EVAL_INPUT_DIR, FD_SLOTS_PER_BUILD, FD_STORE_ENV, FORWARDED_CLAUDE_CREDENTIAL_VARIABLES, GATEWAY_PORT, GATEWAY_SOCKET, JOB_MOUNT, MAVEN_NO_PROXY_NOTE, MAVEN_SETTINGS_FILE, MAVEN_SPACE_NOTE, MIN_SYSTEMD, PROXY_WARNING_FLAG, RELAY_PORT, authorEnvironment, buildEnvironment, buildMavenSettingsXml, builtInEnvironment, checkEnvironment, checkoutPath, claudeCredential, claudeCredentialVariablesSet, claudeEnvPath, commitIdentityRecord, containerLocalAddress, credentialLineIn, currentClaudeCredential, destinationEnvironment, fdName, headerVariables, heldClaudeCredential, inspectService, isRefusedInConfig, isReservedVariable, lifecycleWorkdir, managedClaudeCredential, mavenArgs, mavenSettingsXml, namesGlobalSettings, parseClaimIdentity, parseClaimedRepositories, parseIsolation, parseRunnerEnv, parseUnreachable, primaryOf, proxyEnvironment, readClaudeCredential, realFdStorePort, realInspectProbes, removedClaudeCredentialValues, repositoriesOf, repositoryPath, resolveDestinations, sharedUserEnvironment, startBuildServices, takeClaudeCredential, tokenHeader, withGitConfig, withHooksPath, withProxyWarningHidden, withTokenHeader, withTunnelRecord, withoutCredentialLines, writeBuildMavenSettings, writeMavenSettings };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { checkStarterFiles, contextIsGoverned } from './chunk-AP2K4LPI.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { isLinkedRepository } from './chunk-XA6PGME5.js';
|
|
7
|
-
import { sanitizeTerminal } from './chunk-MECW77XP.js';
|
|
8
|
-
import { resolveRepoIdentity, compareVersions, SUPPORTED_VERSIONS } from './chunk-AJYZNISW.js';
|
|
4
|
+
import { resolveCredentials, getJson, WorkCommandError } from './chunk-UN3SQTVL.js';
|
|
5
|
+
import { isLinkedRepository } from './chunk-FVCHHSHB.js';
|
|
9
6
|
import { C } from './chunk-ANPNT6PM.js';
|
|
7
|
+
import { fleetCheck, checkBuildSkill, checkMachineSkills, checkCommittedMaintainedSkills, checkMaintainedReferences, checkIgnoredSkillFolders } from './chunk-YHKU2NOZ.js';
|
|
8
|
+
import { sanitizeTerminal } from './chunk-MECW77XP.js';
|
|
10
9
|
import { checkFormerSkillNames } from './chunk-JWNH4ZTF.js';
|
|
11
|
-
import { resolveGatewayCredentials, defaultFetch } from './chunk-
|
|
12
|
-
import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-
|
|
10
|
+
import { resolveGatewayCredentials, defaultFetch } from './chunk-3N77LUQI.js';
|
|
11
|
+
import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-25GRRBTH.js';
|
|
13
12
|
import { readStatuslineState, STATE_FRESH_MS } from './chunk-I7RZHMXW.js';
|
|
14
13
|
import { hookCommandEscapesControlPlane, CONTROL_PLANE_DIR_VARIABLE } from './chunk-HCVLP7XA.js';
|
|
15
14
|
import { findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
15
|
+
import { resolveRepoIdentity, compareVersions, SUPPORTED_VERSIONS } from './chunk-AJYZNISW.js';
|
|
16
16
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
17
17
|
import { readSettings, settingsPath, isOurStatuslineSlot, statuslineWrappedOriginal, REGISTERED_EVENTS, isOurHookCommand, ourCommandBins, cliBinResolvable, ourDirectScriptBins, wrappedOriginalCommand } from './chunk-URIZRCRY.js';
|
|
18
18
|
import { readDeliveryRecord, readDegraded, readSourceCache } from './chunk-YQR6E6OV.js';
|
|
@@ -1195,8 +1195,8 @@ function doctorExitCode(checks) {
|
|
|
1195
1195
|
|
|
1196
1196
|
// src/doctor-report.ts
|
|
1197
1197
|
async function gatherDoctorChecks() {
|
|
1198
|
-
const { DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK } = await import('./build-disk-
|
|
1199
|
-
const { defaultRunnerConfigPath, hasRunnerBlock, loadRunnerConfig, runnerVmOf } = await import('./config-
|
|
1198
|
+
const { DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK } = await import('./build-disk-ZL46AEN3.js');
|
|
1199
|
+
const { defaultRunnerConfigPath, hasRunnerBlock, loadRunnerConfig, runnerVmOf } = await import('./config-QASNKYM6.js');
|
|
1200
1200
|
const configPath = defaultRunnerConfigPath();
|
|
1201
1201
|
const runnerHost = hasRunnerBlock(configPath);
|
|
1202
1202
|
const hooks = (() => {
|
|
@@ -1217,7 +1217,7 @@ async function gatherDoctorChecks() {
|
|
|
1217
1217
|
const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
|
|
1218
1218
|
checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
|
|
1219
1219
|
} else if (hasRunnerBlock(configPath)) {
|
|
1220
|
-
const { runnerHostChecks } = await import('./doctor-
|
|
1220
|
+
const { runnerHostChecks } = await import('./doctor-LK6E3XOW.js');
|
|
1221
1221
|
const gateway = (() => {
|
|
1222
1222
|
try {
|
|
1223
1223
|
const { url, apiKey, appId } = loadRunnerConfig(configPath);
|
|
@@ -1244,10 +1244,8 @@ async function gatherDoctorChecks() {
|
|
|
1244
1244
|
const service = await (async () => {
|
|
1245
1245
|
const { existsSync: existsSync3 } = await import('fs');
|
|
1246
1246
|
if (process.platform !== "linux" || !existsSync3("/run/systemd/system")) return void 0;
|
|
1247
|
-
const {
|
|
1248
|
-
|
|
1249
|
-
const { dirname: dirname2 } = await import('path');
|
|
1250
|
-
return inspectService(DEFAULT_UNIT_NAME, dirname2(configPath), realInspectProbes());
|
|
1247
|
+
const { inspectRunnerService } = await import('./find-unit-4UR647S4.js');
|
|
1248
|
+
return inspectRunnerService(configPath);
|
|
1251
1249
|
})();
|
|
1252
1250
|
checks.push(...await runnerHostChecks({ configPath, hooks, gateway, repos, runner, service }));
|
|
1253
1251
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { builtinKind } from './chunk-
|
|
4
|
-
import { parseSize } from './chunk-
|
|
5
|
-
import { runnerDir } from './chunk-
|
|
6
|
-
import { CLAUDE_CREDENTIAL_ID, CLAUDE_ENV_FILE, credentialLineIn, withoutCredentialLines } from './chunk-
|
|
7
|
-
import { FD_SLOTS_PER_BUILD, FD_STORE_ENV } from './chunk-HACGUL52.js';
|
|
3
|
+
import { builtinKind, keepsHostBuilder } from './chunk-2D6CKNR7.js';
|
|
4
|
+
import { parseSize } from './chunk-5AFPP3GZ.js';
|
|
5
|
+
import { runnerDir } from './chunk-PXGU3GKY.js';
|
|
6
|
+
import { FD_SLOTS_PER_BUILD, FD_STORE_ENV, BUILD_SLICE_MEMORY_ENV, CLAUDE_CREDENTIAL_ID, CLAUDE_ENV_FILE, credentialLineIn, withoutCredentialLines } from './chunk-G4W4B33M.js';
|
|
8
7
|
import { existsSync, readFileSync, writeFileSync, chmodSync, renameSync } from 'fs';
|
|
9
8
|
import { dirname, join } from 'path';
|
|
10
9
|
import { spawnSync } from 'child_process';
|
|
@@ -35,6 +34,7 @@ User=${unit.user}
|
|
|
35
34
|
ExecStart=${unit.execStart}
|
|
36
35
|
${unit.helper === void 0 ? "" : `Environment=OUTERLAYER_HELPER_SOCKET=${unit.helper.socket}
|
|
37
36
|
`}${unit.fdStore === void 0 ? "" : `Environment=${FD_STORE_ENV}=${unit.fdStore}
|
|
37
|
+
`}${unit.sliceMemoryBytes === void 0 ? "" : `Environment=${BUILD_SLICE_MEMORY_ENV}=${unit.sliceMemoryBytes}
|
|
38
38
|
`}EnvironmentFile=-${escapeUnitPath(`${unit.configDir}/runner.env`)}
|
|
39
39
|
${unit.credential === "load" ? `LoadCredential=${CLAUDE_CREDENTIAL_ID}:${credentialPath(`${unit.configDir}/${CLAUDE_ENV_FILE}`)}` : `EnvironmentFile=-${escapeUnitPath(`${unit.configDir}/${CLAUDE_ENV_FILE}`)}`}
|
|
40
40
|
Restart=on-failure
|
|
@@ -64,6 +64,15 @@ function checkFit(input) {
|
|
|
64
64
|
const perBuild = parseSize(input.buildMemory);
|
|
65
65
|
if (perBuild === void 0) return { fits: true };
|
|
66
66
|
const neededBytes = input.concurrency * perBuild;
|
|
67
|
+
if (input.sliceBytes !== void 0) {
|
|
68
|
+
if (neededBytes <= input.sliceBytes) return { fits: true };
|
|
69
|
+
return {
|
|
70
|
+
fits: false,
|
|
71
|
+
neededBytes,
|
|
72
|
+
availableBytes: input.sliceBytes,
|
|
73
|
+
message: `runner.concurrency ${input.concurrency} times runner.build.memory ${input.buildMemory} needs ${gib(neededBytes)}, and the memory limit of the runner's build slice is ${gib(input.sliceBytes)}`
|
|
74
|
+
};
|
|
75
|
+
}
|
|
67
76
|
const availableBytes = Math.max(0, input.usableBytes - RUNNER_RESERVE_BYTES);
|
|
68
77
|
if (neededBytes <= availableBytes) return { fits: true };
|
|
69
78
|
return {
|
|
@@ -173,6 +182,10 @@ function defaultRun(args) {
|
|
|
173
182
|
|
|
174
183
|
// src/runner/service/install.ts
|
|
175
184
|
var DEFAULT_UNIT_NAME = "outerlayer-runner";
|
|
185
|
+
function unitNameProblem(name) {
|
|
186
|
+
if (/^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$/.test(name) && !name.includes("..")) return void 0;
|
|
187
|
+
return `\u2717 --unit-name ${JSON.stringify(name)} is not a unit name. Use up to 64 letters, digits, "_", "-" and ".", with no "..", starting with a letter or digit. Nothing is set up`;
|
|
188
|
+
}
|
|
176
189
|
var LOAD_CREDENTIAL_SINCE = 247;
|
|
177
190
|
var CREDENTIAL_FILE_MODE = 384;
|
|
178
191
|
function prepareCredentialFile(configDir, lines) {
|
|
@@ -235,6 +248,12 @@ function attempt(lines, step) {
|
|
|
235
248
|
}
|
|
236
249
|
}
|
|
237
250
|
var OWN_HOOKS = "the hooks are the host's own executables, so the runner does not write a service for them: run `outerlayer runner install --service --print` to print the unit, and edit it for your hooks";
|
|
251
|
+
function needsHostDocker(request) {
|
|
252
|
+
const provision = builtinKind(request.hooks.provision);
|
|
253
|
+
const cleanup = builtinKind(request.hooks.cleanup);
|
|
254
|
+
if (cleanup === "vm" && !keepsHostBuilder({ hooks: request.hooks, build: { imageBuild: request.imageBuild } }, request.builderDiskPinned)) return false;
|
|
255
|
+
return provision === "container" || provision === "vm" || cleanup === "container" || cleanup === "vm";
|
|
256
|
+
}
|
|
238
257
|
function installService(request, deps) {
|
|
239
258
|
const unitName = request.unitName ?? DEFAULT_UNIT_NAME;
|
|
240
259
|
const unitPath = unitPathFor(unitName);
|
|
@@ -251,10 +270,11 @@ function installService(request, deps) {
|
|
|
251
270
|
credential,
|
|
252
271
|
execStart: request.execStart,
|
|
253
272
|
timeLimitMinutes: request.timeLimitMinutes,
|
|
254
|
-
docker:
|
|
273
|
+
docker: needsHostDocker(request),
|
|
255
274
|
...request.helperSocket !== void 0 && request.helperUnit !== void 0 ? { helper: { unit: request.helperUnit, socket: request.helperSocket } } : {},
|
|
256
275
|
// A microVM build under the helper keeps its sockets in the descriptor store, so the runner can restart and the build goes on.
|
|
257
|
-
...kind === "vm" && request.helperSocket !== void 0 && request.helperUnit !== void 0 ? { fdStore: Math.max(1, request.concurrency) * FD_SLOTS_PER_BUILD } : {}
|
|
276
|
+
...kind === "vm" && request.helperSocket !== void 0 && request.helperUnit !== void 0 ? { fdStore: Math.max(1, request.concurrency) * FD_SLOTS_PER_BUILD } : {},
|
|
277
|
+
sliceMemoryBytes: request.buildSliceMemoryBytes
|
|
258
278
|
});
|
|
259
279
|
if (request.print === true) return outcome(true, "printed", [], unit);
|
|
260
280
|
if (own) return outcome(false, "refused", [OWN_HOOKS]);
|
|
@@ -281,7 +301,7 @@ function installService(request, deps) {
|
|
|
281
301
|
return outcome(false, "refused", ["systemd was not found (/run/systemd/system is missing), so no service is set up. `--print` prints the unit for another service manager"]);
|
|
282
302
|
}
|
|
283
303
|
if (kind === "container" || kind === "vm") {
|
|
284
|
-
const fit = checkFit({ concurrency: request.concurrency, buildMemory: request.buildMemory, usableBytes: deps.usableMemoryBytes });
|
|
304
|
+
const fit = checkFit({ concurrency: request.concurrency, buildMemory: request.buildMemory, usableBytes: deps.usableMemoryBytes, sliceBytes: request.buildSliceMemoryBytes });
|
|
285
305
|
if (!fit.fits) return outcome(false, "refused", [`${fit.message}. Nothing is set up: lower runner.concurrency or runner.build.memory, then run this again`]);
|
|
286
306
|
}
|
|
287
307
|
const existing = deps.systemd.read(unitPath);
|
|
@@ -441,4 +461,4 @@ function uninstallService(request, deps) {
|
|
|
441
461
|
return outcome(true, "removed", lines);
|
|
442
462
|
}
|
|
443
463
|
|
|
444
|
-
export { DEFAULT_UNIT_NAME, RUNNER_RESERVE_BYTES, UNIT_MARKER, VM_SERVICE_NAME, checkFit, installService, realTaskScheduler, uninstallService,
|
|
464
|
+
export { DEFAULT_UNIT_NAME, RUNNER_RESERVE_BYTES, UNIT_MARKER, VM_SERVICE_NAME, checkFit, escapeUnitPath, installService, realTaskScheduler, uninstallService, unitNameProblem };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { LiveUploader } from './chunk-
|
|
3
|
+
import { LiveUploader } from './chunk-QANM5COC.js';
|
|
4
|
+
import { spoolDir } from './chunk-25GRRBTH.js';
|
|
4
5
|
import { CaptureDaemon } from './chunk-AJYZNISW.js';
|
|
5
|
-
import { spoolDir } from './chunk-CXQCBAKO.js';
|
|
6
6
|
import { parseWorkItemEnv } from './chunk-T2Q7ISPE.js';
|
|
7
7
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
8
8
|
import { mkdirSync, writeFileSync, rmSync } from 'fs';
|