@outerlayer/cli 0.36.0-next.20261102124202 → 0.36.0-next.20261102195652
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-5UWZZMZM.js +39 -0
- package/dist/agent-subcommand-4TEUJJNL.js +25 -0
- package/dist/{bridge-DFG2GTXQ.js → bridge-4KPODDN7.js} +6 -4
- package/dist/{build-THAD3B4Q.js → build-3CEFKWGY.js} +13 -11
- package/dist/{build-disk-HO2VPIBJ.js → build-disk-DLW3WKC5.js} +11 -9
- package/dist/build-info.json +1 -1
- package/dist/{builder-AXJNIF4S.js → builder-ALMQ5AWP.js} +10 -8
- package/dist/caller-XNBGW4SP.js +22 -0
- package/dist/{check-SF2OVZXB.js → check-AEDFTYH6.js} +61 -59
- package/dist/{chunk-772ILTCK.js → chunk-2XN34EKQ.js} +3 -3
- package/dist/{chunk-KN4VIK53.js → chunk-2YC3TXWX.js} +1 -1
- package/dist/{chunk-6JJITHBI.js → chunk-42DBDDHP.js} +1 -1
- package/dist/chunk-4DLJ343I.js +38 -0
- package/dist/{chunk-5WYT3PPE.js → chunk-4OD45RBP.js} +4 -1
- package/dist/{chunk-PTPF36Q7.js → chunk-4UUKUOS7.js} +3 -3
- package/dist/{chunk-RK4JQRVT.js → chunk-5XX75FJ6.js} +9 -9
- package/dist/{chunk-TWYHSMHM.js → chunk-6JLYU322.js} +3 -2
- package/dist/{chunk-5GHJFETA.js → chunk-6KH3NMIT.js} +3010 -1196
- package/dist/{chunk-GSXGA6KF.js → chunk-6QSIK5VA.js} +1 -1
- package/dist/{chunk-5FIOUQGC.js → chunk-6Z7R24XA.js} +8 -8
- package/dist/{chunk-LVXR37OG.js → chunk-73E33ZA2.js} +9 -8
- package/dist/{chunk-4TNUQLXH.js → chunk-7UGMB5VS.js} +12 -11
- package/dist/{chunk-J7TCTARR.js → chunk-7XTLS5PG.js} +5 -5
- package/dist/{chunk-K3X3L5YW.js → chunk-A24PDRNU.js} +6 -6
- package/dist/{chunk-GDZTL6BI.js → chunk-A2U7T4ZH.js} +123 -277
- package/dist/{chunk-GZ75FRLB.js → chunk-B36NSEUM.js} +1 -1
- package/dist/{chunk-XHFSBSIA.js → chunk-B5SWBFVE.js} +3 -2
- package/dist/{chunk-NTMRMBLM.js → chunk-BACWWK3E.js} +22 -7
- package/dist/{chunk-RSRZDF3K.js → chunk-BN5U4RJU.js} +11 -9
- package/dist/{chunk-NC3QAHOS.js → chunk-BSPJI5T7.js} +4 -2
- package/dist/{chunk-A5Y2HBVU.js → chunk-BZSJ77MO.js} +1 -1
- package/dist/{chunk-L3JXQDVH.js → chunk-CA4OE2QT.js} +4 -4
- package/dist/{chunk-ESSJPSJ2.js → chunk-CI5LFLKH.js} +2 -2
- package/dist/{chunk-M2NIHHQI.js → chunk-CXJC3JLN.js} +3 -2
- package/dist/{chunk-WDQPBAFV.js → chunk-D6EXW4EB.js} +2 -1
- package/dist/{chunk-PQDFW422.js → chunk-D74RGORK.js} +1 -1
- package/dist/{chunk-NWBB2SQ4.js → chunk-DL2RYNXQ.js} +66 -25
- package/dist/{chunk-J7Y3PCO2.js → chunk-DTQPDMHG.js} +2 -1
- package/dist/{chunk-6LO62EQ5.js → chunk-F36EKGMP.js} +712 -249
- package/dist/{chunk-HIN4BMRW.js → chunk-FIUUESD4.js} +5 -5
- package/dist/{chunk-XLOM2BNL.js → chunk-FOSYM7TQ.js} +1 -1
- package/dist/{chunk-LCOQN6NR.js → chunk-FWKQHKCR.js} +4 -4
- package/dist/{chunk-IP7BIBXJ.js → chunk-FWSVWPMS.js} +16 -7
- package/dist/{chunk-GD6KIHOS.js → chunk-G35Y4LN5.js} +5 -2
- package/dist/{chunk-LSXHTBAM.js → chunk-GBGJGYEE.js} +7 -7
- package/dist/{chunk-Q42K6XZ6.js → chunk-H23JP73I.js} +1 -1
- package/dist/{chunk-WLMAGMTU.js → chunk-H2NJG3TE.js} +4 -3
- package/dist/{chunk-4CTVN3C5.js → chunk-HRBSEXYC.js} +5 -5
- package/dist/{chunk-T5Z22NA6.js → chunk-HRHWA6TZ.js} +1 -1
- package/dist/chunk-HTRDL42C.js +45 -0
- package/dist/{chunk-WNYH42PF.js → chunk-HZVS4MGL.js} +7 -7
- package/dist/{chunk-YBAVN6WS.js → chunk-I4DM7SNX.js} +7 -7
- package/dist/{chunk-CKPQOQFC.js → chunk-I6U6QPN6.js} +769 -101
- package/dist/{chunk-QJDX6VJS.js → chunk-IX6CFXSW.js} +10 -9
- package/dist/{chunk-FIO6PIZ6.js → chunk-J2OMKFYB.js} +3 -3
- package/dist/{chunk-C3JWWPLC.js → chunk-J6HWRVN2.js} +10 -8
- package/dist/{chunk-PT34C6SU.js → chunk-J6VC3JCG.js} +1 -1
- package/dist/{chunk-I6FRCBMU.js → chunk-JBPVEXHQ.js} +8 -8
- package/dist/{chunk-EBIYRRJW.js → chunk-JVHWWJ2J.js} +80 -94
- package/dist/{chunk-LYFLUNWK.js → chunk-KN3TDNF7.js} +7 -7
- package/dist/{chunk-RPZIHELI.js → chunk-LHHDX7FB.js} +5 -5
- package/dist/{chunk-FUJUFLDC.js → chunk-LO4CK734.js} +8 -14
- package/dist/chunk-LSLK4RS4.js +82 -0
- package/dist/{chunk-I626B72C.js → chunk-LSZUTI6O.js} +1 -1
- package/dist/{chunk-JVCQZDQ6.js → chunk-LZS5EYZ6.js} +1 -1
- package/dist/{chunk-OYKAOHX5.js → chunk-M4HH2F64.js} +6 -6
- package/dist/{chunk-CVGQ3BNF.js → chunk-ML5YKV3B.js} +1 -1
- package/dist/{chunk-H2FFONRY.js → chunk-MVPOYQQY.js} +1 -1
- package/dist/{chunk-JXXHLQQR.js → chunk-NMBXA3AT.js} +3 -3
- package/dist/{chunk-VRQM4A64.js → chunk-PBGNX3PS.js} +1 -1
- package/dist/{chunk-CJJDJ7AT.js → chunk-PIZA7OG2.js} +5 -3
- package/dist/{chunk-L2BA2HXM.js → chunk-PN4LWT5F.js} +1 -1
- package/dist/{chunk-TYCZVJTB.js → chunk-PSQEGJPN.js} +5 -5
- package/dist/{chunk-EUDG754F.js → chunk-SBZ545DH.js} +2 -2
- package/dist/{chunk-5FND4PIU.js → chunk-T2KBHW6P.js} +3 -3
- package/dist/chunk-T5QBWM6M.js +113 -0
- package/dist/{chunk-XABJMU5A.js → chunk-UCMIS74X.js} +2 -2
- package/dist/{chunk-564Q2STF.js → chunk-VKKKVYA4.js} +1 -1
- package/dist/{chunk-AAGU5FJF.js → chunk-WGC7UFRM.js} +1 -1
- package/dist/{chunk-XAOIHYPS.js → chunk-WVAXJOWG.js} +5 -4
- package/dist/{chunk-AYLYAOHH.js → chunk-XIDDJSQU.js} +3 -2
- package/dist/{chunk-OZOATEK3.js → chunk-Y2P3HWUG.js} +6 -6
- package/dist/{chunk-PKO5IDW4.js → chunk-Y5S2G2EZ.js} +7 -7
- package/dist/{chunk-WQB3XOEP.js → chunk-Z3MB7SV7.js} +6 -6
- package/dist/{chunk-XE3DIJJT.js → chunk-Z66CKWOM.js} +1 -1
- package/dist/chunk-ZHQC43NH.js +130 -0
- package/dist/{chunk-3FSKTGM6.js → chunk-ZSRMJOAK.js} +3 -3
- package/dist/{claude-launcher-LXZPTDNC.js → claude-launcher-NJGZUB3P.js} +82 -108
- package/dist/{cli-QFUT3UQS.js → cli-POIDBCZA.js} +323 -293
- package/dist/{command-45RZT4CK.js → command-ZLBFX553.js} +55 -53
- package/dist/config-GKSSGMXD.js +21 -0
- package/dist/{connect-cmd-LUCQ7FSV.js → connect-cmd-6YKNFJJR.js} +12 -10
- package/dist/{container-start-T776VI3M.js → container-start-55QELXPJ.js} +53 -51
- package/dist/{context-cleanup-QE2MIO2Q.js → context-cleanup-3K2AOECJ.js} +4 -2
- package/dist/{context-show-cmd-7QEHUOEL.js → context-show-cmd-FGMRJ7IG.js} +13 -11
- package/dist/{control-plane-launch-THUH6YU5.js → control-plane-launch-DGPA3ONU.js} +25 -21
- package/dist/{demo-record-cmd-SBERRQNW.js → demo-record-cmd-2OKCGST7.js} +7 -5
- package/dist/{demo-voice-cmd-VM3FITZU.js → demo-voice-cmd-BPTSL7JA.js} +24 -22
- package/dist/{dist-6KGTCWKR.js → dist-VVZIGSAF.js} +1 -1
- package/dist/{docker-MQNLK4OO.js → docker-GFEEV42Z.js} +10 -8
- package/dist/{doctor-NQOSPJGS.js → doctor-ZOQSI3HL.js} +55 -53
- package/dist/emit-artifact-cmd-3LDJ4VRW.js +43 -0
- package/dist/{emit-cmd-ZPFCPVSR.js → emit-cmd-RO4L4PFZ.js} +7 -5
- package/dist/emit-criteria-cmd-V3ERJXHB.js +34 -0
- package/dist/{emit-demo-cmd-PMQGNNVX.js → emit-demo-cmd-5KL64L74.js} +24 -22
- package/dist/{emit-finding-cmd-MYWQN5WW.js → emit-finding-cmd-R4OEWQQR.js} +17 -15
- package/dist/{emit-result-cmd-GXK3KMAP.js → emit-result-cmd-5YNQDTYG.js} +22 -20
- package/dist/{emit-step-cmd-ZV2XTUVT.js → emit-step-cmd-Z5WC7UEQ.js} +17 -15
- package/dist/{exec-client-P7RFRUCK.js → exec-client-54XKNPTI.js} +7 -5
- package/dist/find-unit-OI56YEX5.js +23 -0
- package/dist/{findings-cmd-OGMBVVSM.js → findings-cmd-J5ZCY2AT.js} +17 -15
- package/dist/{fleet-readiness-4RBKLXBQ.js → fleet-readiness-DKCFOUYP.js} +13 -11
- package/dist/{governing-source-XJMXFSAR.js → governing-source-7PD4ISRN.js} +21 -19
- package/dist/{guest-init-XZHRPIMG.js → guest-init-5QZRGP62.js} +8 -6
- package/dist/{hook-fast-ZOWGWCPO.js → hook-fast-ICT2PRQX.js} +4 -2
- package/dist/{pending-YU2GE2UV.js → hook-install-GDNRMML4.js} +5 -5
- package/dist/{hook-wrap-fast-545QJSBJ.js → hook-wrap-fast-LWWKKPGK.js} +4 -2
- package/dist/host-checks-GADKYJFN.js +78 -0
- package/dist/host-key-FI6KWMJC.js +16 -0
- package/dist/{image-tag-E4JK2APF.js → image-tag-RX4WTHJH.js} +7 -5
- package/dist/index.js +8 -9
- package/dist/{init-LO6U7YTW.js → init-BZXVQO22.js} +51 -49
- package/dist/init-EKF4ILHF.js +78 -0
- package/dist/{init-cmd-2JANO5EN.js → init-cmd-3LWFEKHD.js} +35 -29
- package/dist/{init-update-D6PRTGNE.js → init-update-THEHC25C.js} +24 -22
- package/dist/{install-cmd-SJMBNQEH.js → install-cmd-WBVTTE5Z.js} +9 -7
- package/dist/{layout-AQHIMJMO.js → layout-7XMC7S6K.js} +4 -2
- package/dist/{logs-NE55HOET.js → logs-7YIXBO2K.js} +6 -4
- package/dist/loop-RUQQ4L5A.js +89 -0
- package/dist/machine-IGHZW3IO.js +78 -0
- package/dist/{machine-skills-KK2HXYMR.js → machine-skills-HR4RNRNR.js} +4 -2
- package/dist/{mcp-install-cmd-2QAS3AQZ.js → mcp-install-cmd-SMPLT43Q.js} +4 -2
- package/dist/{mcp-serve-cmd-U6USKHYR.js → mcp-serve-cmd-HLS24XCG.js} +8 -6
- package/dist/{paths-O7LCWY33.js → paths-2YTU4QIO.js} +6 -4
- package/dist/pending-S2SKIBCB.js +16 -0
- package/dist/{pidfile-5GDCQ5HA.js → pidfile-SPBTMTCJ.js} +7 -5
- package/dist/{record-NETSDAO6.js → record-3KXRFK5C.js} +7 -5
- package/dist/{relay-VZ733BVJ.js → relay-I2T43PPB.js} +4 -2
- package/dist/{relay-protocol-24GEUGCO.js → relay-protocol-GI2GC2AM.js} +4 -2
- package/dist/runner-env-HOWRS6I6.js +23 -0
- package/dist/{runner-identity-PSCZBILD.js → runner-identity-32MTGA2F.js} +10 -8
- package/dist/{runner-key-VM2LYVRK.js → runner-key-FXYWHMMO.js} +51 -49
- package/dist/{session-sender-P2RHDM6U.js → session-sender-B6INUY7G.js} +23 -21
- package/dist/{shell-function-NRD4KVUK.js → shell-function-GYD2ZQQG.js} +2 -1
- package/dist/{spec-cmd-LGKP6MT7.js → spec-cmd-ZEZFMC4A.js} +18 -16
- package/dist/{starter-pack-SMK6UPRL.js → starter-pack-IMKIUA56.js} +5 -3
- package/dist/state-DVKFUWB3.js +16 -0
- package/dist/{status-HEHCNIDS.js → status-VPFIIHOZ.js} +51 -49
- package/dist/{statusline-fast-E7RWVREA.js → statusline-fast-NUVHCNRX.js} +4 -2
- package/dist/{sync-cmd-HKN45HXL.js → sync-cmd-W756BQWX.js} +22 -20
- package/dist/update-steps-D6L6AG6E.js +79 -0
- package/dist/{watch-RGZCUCR3.js → watch-6EDRJZMG.js} +22 -20
- package/dist/{work-claim-cmd-6DSPGCZE.js → work-claim-cmd-7HR4AVCT.js} +22 -20
- package/dist/{work-cmd-GPLYLWY7.js → work-cmd-ZP4UIHBT.js} +15 -13
- package/dist/{work-comment-cmd-V5WM7LAW.js → work-comment-cmd-CYDOEMW3.js} +18 -16
- package/dist/{work-demo-cmd-SWWI6AGD.js → work-demo-cmd-3A7Z3VVS.js} +15 -13
- package/dist/{work-launch-TTGSHLY4.js → work-launch-LWDQXLGI.js} +1 -1
- package/dist/{work-logs-cmd-CTFBOPCI.js → work-logs-cmd-NDPSRSCM.js} +15 -13
- package/dist/{work-open-pr-cmd-HX2U3YBR.js → work-open-pr-cmd-Z5B3ERAU.js} +17 -15
- package/dist/{work-pr-cmd-EI2R4FQG.js → work-pr-cmd-ZVPGCDWD.js} +16 -14
- package/dist/{work-proofs-cmd-QXNPHLYC.js → work-proofs-cmd-VAXJ5UBF.js} +18 -16
- package/dist/{work-proofs-record-72OKWEES.js → work-proofs-record-K467JH24.js} +28 -26
- package/dist/{work-stop-cmd-7M7ZYUN2.js → work-stop-cmd-J45Q2QT7.js} +15 -13
- package/package.json +3 -3
- package/dist/agent-setup-AOB76EDJ.js +0 -37
- package/dist/caller-GOY2X6QT.js +0 -20
- package/dist/chunk-KYDEBGJG.js +0 -402
- package/dist/config-WYQPXLOP.js +0 -19
- package/dist/emit-artifact-cmd-6E365VBQ.js +0 -41
- package/dist/emit-criteria-cmd-HWQOYZZ4.js +0 -32
- package/dist/find-unit-63SXQ7IM.js +0 -21
- package/dist/host-checks-WHW24PJR.js +0 -76
- package/dist/host-key-MWLXB5U5.js +0 -14
- package/dist/init-EZIAHBMH.js +0 -76
- package/dist/loop-2E34CGCX.js +0 -87
- package/dist/machine-6ALGG4IO.js +0 -76
- package/dist/runner-env-KHCONH2R.js +0 -21
- package/dist/settings-XB2HYBKO.js +0 -7
- package/dist/state-RJR4PMMX.js +0 -14
- package/dist/update-steps-7E4RD47J.js +0 -77
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
4
4
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
5
|
-
import { linkedAgentsPath } from './chunk-
|
|
6
|
-
import { resolvePackRoot, OUTERLAYER_SKILLS_BASE, loadTemplateFiles, AGENTS_SKILLS_BASE, loadMaintainedFiles, rewriteSkillPaths, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles,
|
|
5
|
+
import { linkedAgentsPath } from './chunk-PBGNX3PS.js';
|
|
6
|
+
import { resolvePackRoot, OUTERLAYER_SKILLS_BASE, loadTemplateFiles, AGENTS_SKILLS_BASE, loadMaintainedFiles, rewriteSkillPaths, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MACHINE_SKILL_PATH } from './chunk-I6U6QPN6.js';
|
|
7
|
+
import { LEGACY_AGENT } from './chunk-LSLK4RS4.js';
|
|
7
8
|
import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
|
|
8
9
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
9
10
|
import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'fs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-
|
|
4
|
-
import { parseSize } from './chunk-
|
|
5
|
-
import { isRefusedInConfig, resolveDestinations, isReservedVariable } from './chunk-
|
|
6
|
-
import { builderDiskPinned } from './chunk-
|
|
3
|
+
import { DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-CI5LFLKH.js';
|
|
4
|
+
import { parseSize } from './chunk-J6HWRVN2.js';
|
|
5
|
+
import { isRefusedInConfig, resolveDestinations, isReservedVariable } from './chunk-CXJC3JLN.js';
|
|
6
|
+
import { builderDiskPinned } from './chunk-DTQPDMHG.js';
|
|
7
7
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
8
8
|
import { existsSync, statSync, accessSync, constants, readFileSync } from 'fs';
|
|
9
9
|
import { hostname } from 'os';
|
|
@@ -144,10 +144,13 @@ function keepsHostBuilder(config, builderDiskIsPinned) {
|
|
|
144
144
|
}
|
|
145
145
|
var BUILD_KEYS = ["memory", "cpus", "pids", "disk", "setupMinutes", "cacheDisk", "variables", "destinations", "allowHosts", "imageBuild", "egress"];
|
|
146
146
|
var EGRESS_KEYS = ["connectionsPerSecond", "connectionBurst", "openConnections", "sendBytesPerSecond", "flagHosts"];
|
|
147
|
-
var HOUSEKEEPING_KEYS = ["jobsKeepDays", "buildCacheMax", "minFreeDisk", "savedStateMax"];
|
|
147
|
+
var HOUSEKEEPING_KEYS = ["jobsKeepDays", "buildCacheMax", "minFreeDisk", "savedStateMax", "workspaceMax", "workspaceOrgMax", "workspaceKeepDays"];
|
|
148
148
|
var DEFAULT_JOBS_KEEP_DAYS = 30;
|
|
149
149
|
var DEFAULT_BUILD_CACHE_MAX = "20g";
|
|
150
150
|
var DEFAULT_SAVED_STATE_MAX = "20g";
|
|
151
|
+
var DEFAULT_WORKSPACE_MAX = "40g";
|
|
152
|
+
var DEFAULT_WORKSPACE_ORG_MAX = "20g";
|
|
153
|
+
var DEFAULT_WORKSPACE_KEEP_DAYS = 7;
|
|
151
154
|
var DEFAULT_SAVED_STATE_MAX_BYTES = 20 * 1024 ** 3;
|
|
152
155
|
var VARIABLE_NAME = /^[A-Za-z_][A-Za-z0-9_]{0,254}$/;
|
|
153
156
|
var MAX_VARIABLES = 100;
|
|
@@ -460,10 +463,22 @@ function resolveHousekeeping(configPath, block, buildDisk) {
|
|
|
460
463
|
if (bytes === void 0) fail(configPath, "runner.housekeeping.savedStateMax", 'must be a size such as "20g", or "off"');
|
|
461
464
|
savedStateMax = bytes;
|
|
462
465
|
}
|
|
466
|
+
const sizeKey = (key, fallback) => {
|
|
467
|
+
const text = keys[key] ?? fallback;
|
|
468
|
+
const bytes = typeof text === "string" ? wholeBytes(parseSize(text)) : void 0;
|
|
469
|
+
if (bytes === void 0) fail(configPath, `runner.housekeeping.${key}`, `must be a size such as "${fallback}"`);
|
|
470
|
+
return bytes;
|
|
471
|
+
};
|
|
472
|
+
const workspaceMax = sizeKey("workspaceMax", DEFAULT_WORKSPACE_MAX);
|
|
473
|
+
const workspaceOrgMax = sizeKey("workspaceOrgMax", DEFAULT_WORKSPACE_ORG_MAX);
|
|
474
|
+
if (keys.workspaceKeepDays !== void 0 && (!Number.isInteger(keys.workspaceKeepDays) || keys.workspaceKeepDays < 1)) {
|
|
475
|
+
fail(configPath, "runner.housekeeping.workspaceKeepDays", "must be a whole number of at least 1");
|
|
476
|
+
}
|
|
477
|
+
const workspaceKeepDays = keys.workspaceKeepDays ?? DEFAULT_WORKSPACE_KEEP_DAYS;
|
|
463
478
|
const minText = keys.minFreeDisk ?? buildDisk;
|
|
464
479
|
const minFreeDisk = typeof minText === "string" ? wholeBytes(parseSize(minText)) : void 0;
|
|
465
480
|
if (minFreeDisk === void 0) fail(configPath, "runner.housekeeping.minFreeDisk", 'must be a size such as "40g"');
|
|
466
|
-
return { jobsKeepDays: keys.jobsKeepDays ?? DEFAULT_JOBS_KEEP_DAYS, buildCacheMax, minFreeDisk, savedStateMax };
|
|
481
|
+
return { jobsKeepDays: keys.jobsKeepDays ?? DEFAULT_JOBS_KEEP_DAYS, buildCacheMax, minFreeDisk, savedStateMax, workspaceMax, workspaceOrgMax, workspaceKeepDays };
|
|
467
482
|
}
|
|
468
483
|
function resolveChecks(configPath, block) {
|
|
469
484
|
const given = block ?? {};
|
|
@@ -593,4 +608,4 @@ function egressLimitsOf(config) {
|
|
|
593
608
|
return resolveEgress(config.build?.egress, config.managed === true);
|
|
594
609
|
}
|
|
595
610
|
|
|
596
|
-
export { DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_SETUP_MINUTES, DEFAULT_UPDATE_MAX_WAIT_HOURS, EGRESS_SWITCHABLE_KEYS, MAX_ALLOW_HOSTS, RunnerConfigError, allowHostProblem, builtinKind, checkHooks, defaultRunnerConfigPath, egressSummary, emptyEgressCounts, hasRunnerBlock, hostAllowed, imageBuildOf, isBuiltinContainer, isBuiltinProcess, isBuiltinVm, keepsHostBuilder, keyRunnerFactory, loadRunnerConfig, optionalEgress, resolveBuild, resolveHousekeeping, runnerCredentialProblem, runnerDeliversComments, runnerVmOf, systemClock };
|
|
611
|
+
export { DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_SETUP_MINUTES, DEFAULT_UPDATE_MAX_WAIT_HOURS, DEFAULT_WORKSPACE_KEEP_DAYS, EGRESS_SWITCHABLE_KEYS, MAX_ALLOW_HOSTS, RunnerConfigError, allowHostProblem, builtinKind, checkHooks, defaultRunnerConfigPath, egressSummary, emptyEgressCounts, hasRunnerBlock, hostAllowed, imageBuildOf, isBuiltinContainer, isBuiltinProcess, isBuiltinVm, keepsHostBuilder, keyRunnerFactory, loadRunnerConfig, optionalEgress, resolveBuild, resolveHousekeeping, runnerCredentialProblem, runnerDeliversComments, runnerVmOf, systemClock };
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { staleBuildRefusal, staleBuildWarning, detectCi } from './chunk-
|
|
4
|
-
import { launchRefusalForSession } from './chunk-
|
|
5
|
-
import { detectActiveSession } from './chunk-
|
|
6
|
-
import { autoConnect } from './chunk-
|
|
7
|
-
import { C } from './chunk-2AM6Z5BP.js';
|
|
3
|
+
import { staleBuildRefusal, staleBuildWarning, detectCi } from './chunk-7UGMB5VS.js';
|
|
4
|
+
import { launchRefusalForSession } from './chunk-WGC7UFRM.js';
|
|
5
|
+
import { detectActiveSession } from './chunk-FWSVWPMS.js';
|
|
6
|
+
import { autoConnect } from './chunk-T2KBHW6P.js';
|
|
8
7
|
import { readEffectiveArtifactSpoolState, localArtifactIds, isArtifactTombstoned, artifactBlobsDir, appendArtifactRecord, artifactsSpoolPath, findPendingArtifactRecord, sanitizeTerminal, appendArtifactTombstone } from './chunk-P6PHY33P.js';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { resolveRepoIdentity } from './chunk-6KH3NMIT.js';
|
|
9
|
+
import { C } from './chunk-2AM6Z5BP.js';
|
|
10
|
+
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-LZS5EYZ6.js';
|
|
11
11
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
12
12
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
13
13
|
import { ARTIFACT_MAX_CAPTION_LENGTH, ArtifactCriterionIdSchema, ARTIFACT_MAX_BYTES, ARTIFACT_MAX_FILENAME_LENGTH, mediaTypeForArtifactPath, inferArtifactKind, ARTIFACT_MAX_REPLACES_TARGETS, parseTestSelector, parseJunit, bindTests } from './chunk-WUKLQWGY.js';
|
|
14
|
+
import { NATIVE_AGENTS, LEGACY_AGENT } from './chunk-LSLK4RS4.js';
|
|
14
15
|
import { homeFromEnv, spoolHomeFromEnv } from './chunk-352DHUTP.js';
|
|
15
16
|
import { createHash, randomUUID } from 'crypto';
|
|
16
17
|
import { statSync, readFileSync, mkdirSync, existsSync, writeFileSync, renameSync, unlinkSync } from 'fs';
|
|
17
18
|
import { resolve, basename, join } from 'path';
|
|
18
19
|
|
|
19
20
|
createRequire(import.meta.url);
|
|
21
|
+
var AGENT = NATIVE_AGENTS[LEGACY_AGENT];
|
|
20
22
|
var EmitArtifactError = class extends Error {
|
|
21
23
|
};
|
|
22
24
|
var ARTIFACT_ID_PATTERN = /^[A-Za-z0-9_.:-]{1,64}$/;
|
|
@@ -310,11 +312,11 @@ async function runEmitArtifact(opts) {
|
|
|
310
312
|
if (prNumber === void 0 && identity.gitRepo === void 0) {
|
|
311
313
|
if (identity.repoRoot !== void 0) {
|
|
312
314
|
throw new EmitArtifactError(
|
|
313
|
-
|
|
315
|
+
`nothing to attach this to \u2014 this checkout has no git remote to identify the repo (and no recorded session or PR). Add a remote (git remote add origin <url>), pass --pr <number>, or run inside a recorded ${AGENT.label} session.`
|
|
314
316
|
);
|
|
315
317
|
}
|
|
316
318
|
throw new EmitArtifactError(
|
|
317
|
-
|
|
319
|
+
`nothing to attach this to \u2014 no recorded session, no PR, and no git repo. Run inside a recorded ${AGENT.label} session, from a git checkout, in CI with PR context, or pass --pr <number>.`
|
|
318
320
|
);
|
|
319
321
|
}
|
|
320
322
|
const noFactory = await autoConnect({ ...opts, home, env });
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
+
import { NATIVE_AGENTS, LEGACY_AGENT } from './chunk-LSLK4RS4.js';
|
|
3
4
|
|
|
4
5
|
createRequire(import.meta.url);
|
|
5
6
|
|
|
6
7
|
// src/control-plane-paths.ts
|
|
8
|
+
var LEGACY = NATIVE_AGENTS[LEGACY_AGENT];
|
|
7
9
|
var CONTROL_PLANE_DIR_VARIABLE = "OUTERLAYER_CONTROL_PLANE_DIR";
|
|
8
10
|
var GOVERNANCE_VARIABLE = "OUTERLAYER_GOVERNANCE";
|
|
9
11
|
var SUPPORTED_CONTROL_PLANE_LAYOUT = 2;
|
|
10
|
-
var MINIMUM_CLAUDE_VERSION =
|
|
12
|
+
var MINIMUM_CLAUDE_VERSION = LEGACY.versions.minimum;
|
|
11
13
|
function versionParts(text) {
|
|
12
14
|
const found = /(\d+)\.(\d+)\.(\d+)/.exec(text);
|
|
13
15
|
return found === null ? void 0 : [Number(found[1]), Number(found[2]), Number(found[3])];
|
|
@@ -20,7 +22,7 @@ function versionAtLeast(text, minimum = MINIMUM_CLAUDE_VERSION) {
|
|
|
20
22
|
return (difference ?? 0) >= 0;
|
|
21
23
|
}
|
|
22
24
|
var SHIM_SCRIPT = `#!/bin/sh
|
|
23
|
-
exec outerlayer
|
|
25
|
+
exec outerlayer ${LEGACY.legacy.subcommand} "$@"
|
|
24
26
|
`;
|
|
25
27
|
|
|
26
28
|
export { CONTROL_PLANE_DIR_VARIABLE, GOVERNANCE_VARIABLE, MINIMUM_CLAUDE_VERSION, SHIM_SCRIPT, SUPPORTED_CONTROL_PLANE_LAYOUT, versionAtLeast };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { UNIVERSAL_IMAGE_REPOSITORY, UNIVERSAL_IMAGE_DIGEST } from './chunk-
|
|
3
|
+
import { UNIVERSAL_IMAGE_REPOSITORY, UNIVERSAL_IMAGE_DIGEST } from './chunk-DTQPDMHG.js';
|
|
4
4
|
import { existsSync, readdirSync, readFileSync, lstatSync, realpathSync, writeFileSync } from 'fs';
|
|
5
5
|
import { join, resolve, relative, dirname, sep, basename } from 'path';
|
|
6
6
|
import { createRequire as createRequire$1 } from 'module';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { DEFAULT_UNIT_NAME } from './chunk-
|
|
4
|
-
import { RUNNER_FILE_MODE } from './chunk-
|
|
5
|
-
import { runnerAgents, credentialAgent, credentialForms, orList, credentialShapes, credentialEnvPath, withoutCredentialLines, parseRunnerEnv, forwardedVariables } from './chunk-
|
|
6
|
-
import { defaultAgents } from './chunk-
|
|
3
|
+
import { DEFAULT_UNIT_NAME } from './chunk-PSQEGJPN.js';
|
|
4
|
+
import { RUNNER_FILE_MODE } from './chunk-G35Y4LN5.js';
|
|
5
|
+
import { runnerAgents, credentialAgent, credentialForms, orList, credentialShapes, credentialEnvPath, withoutCredentialLines, parseRunnerEnv, forwardedVariables } from './chunk-DTQPDMHG.js';
|
|
6
|
+
import { defaultAgents } from './chunk-I6U6QPN6.js';
|
|
7
7
|
import { existsSync, readFileSync, writeFileSync, renameSync, rmSync } from 'fs';
|
|
8
8
|
import { join, dirname } from 'path';
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { parseSize, BUILD_LABEL, RUNNER_LABEL, runnerLabelValue } from './chunk-
|
|
4
|
-
import { buildsDir, storeScopes, rootfsDir, orgStoreIn, runnerDir, imagesDir, builderCacheDiskPath } from './chunk-
|
|
3
|
+
import { parseSize, BUILD_LABEL, RUNNER_LABEL, runnerLabelValue } from './chunk-J6HWRVN2.js';
|
|
4
|
+
import { buildsDir, storeScopes, rootfsDir, orgStoreIn, runnerDir, imagesDir, builderCacheDiskPath } from './chunk-G35Y4LN5.js';
|
|
5
5
|
import { spawnSync } from 'child_process';
|
|
6
6
|
import { statfsSync, statSync, existsSync, readdirSync } from 'fs';
|
|
7
7
|
import { dirname, join } from 'path';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { builtInNames, TARGET_TUNNEL, TARGET_LEASE, destinationTarget, builtInDestinations, strippedVariables, builtInEnvironment, managedAgentCredential, agentCredential, destinationPort } from './chunk-
|
|
4
|
-
import {
|
|
3
|
+
import { builtInNames, TARGET_TUNNEL, TARGET_LEASE, destinationTarget, builtInDestinations, strippedVariables, builtInEnvironment, managedAgentCredential, agentCredential, destinationPort } from './chunk-DTQPDMHG.js';
|
|
4
|
+
import { defaultAgents } from './chunk-I6U6QPN6.js';
|
|
5
|
+
import { PROVIDERS } from './chunk-LSLK4RS4.js';
|
|
5
6
|
import { existsSync, unlinkSync, chmodSync } from 'fs';
|
|
6
7
|
import { request as request$1, createServer } from 'http';
|
|
7
8
|
import { request } from 'https';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { normalizePath, CONTEXT_PIN_FILENAME, contextAgents, defaultAgents, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE,
|
|
3
|
+
import { normalizePath, CONTEXT_PIN_FILENAME, contextAgents, defaultAgents, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, legacyAgent, legacySubcommand } from './chunk-I6U6QPN6.js';
|
|
4
|
+
import { LEGACY_AGENT } from './chunk-LSLK4RS4.js';
|
|
4
5
|
import { existsSync, readdirSync, readFileSync, mkdirSync, writeFileSync, lstatSync, readlinkSync, symlinkSync, rmdirSync } from 'fs';
|
|
5
6
|
import { relative, sep, join, posix } from 'path';
|
|
6
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { currentLink } from './chunk-
|
|
3
|
+
import { currentLink } from './chunk-6QSIK5VA.js';
|
|
4
4
|
import { readFileSync, statSync, chmodSync, mkdirSync, writeFileSync, renameSync, rmSync, existsSync, lstatSync, accessSync, constants, realpathSync } from 'fs';
|
|
5
5
|
import { randomBytes } from 'crypto';
|
|
6
6
|
import { join, dirname, delimiter, resolve } from 'path';
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import {
|
|
3
|
+
import { writePendingUpdate } from './chunk-J6VC3JCG.js';
|
|
4
|
+
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-H23JP73I.js';
|
|
4
5
|
import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
|
|
5
6
|
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 { RUNNER_PROTOCOL } from './chunk-
|
|
9
|
-
import { writeFleetState } from './chunk-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { RepoFilter } from './chunk-
|
|
7
|
+
import { reportFailedStart, fitImageBuildMemory } from './chunk-Y5S2G2EZ.js';
|
|
8
|
+
import { renderUpdateSteps } from './chunk-NMBXA3AT.js';
|
|
9
|
+
import { RUNNER_PROTOCOL } from './chunk-PN4LWT5F.js';
|
|
10
|
+
import { writeFleetState } from './chunk-VKKKVYA4.js';
|
|
11
|
+
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-JBPVEXHQ.js';
|
|
12
|
+
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-6QSIK5VA.js';
|
|
13
|
+
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, releaseLease, LEASE_SECONDS, itemTag, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, setStage, jobEnv, runHook, describeHookEnd, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionMicroVm, deliverCommitHooks, provisionProcess, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, currentSkillCommand, formerSkillProblem, MICROVM_COMMAND_DIR, commandLogOffset, startMicroVmCommand, microVmCommandLine, runCommand, containerCommandExec, execCommandLine, startSender, startHostServices, finishJob, sampleGuest, foldSample, isContainerTracked, isMicroVmTracked, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, HELPER_ENV, setUpRunnerCgroup, stopOrphanedMicroVms, unfinishedJobs, sweepImageBuilders, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, usableCpus, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied, restartSender, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, createLeaseChannel, serveLease, vmAlive, writeGuestGhConfig, shellQuote, deliverJobFiles, inTeardown } from './chunk-F36EKGMP.js';
|
|
14
|
+
import { RUNNER_RESERVE_BYTES } from './chunk-PSQEGJPN.js';
|
|
15
|
+
import { RepoFilter } from './chunk-7UGMB5VS.js';
|
|
15
16
|
import { JOB_STATE_FORMAT, readsJobState, jobStateFormatOf } from './chunk-ZVB57WI6.js';
|
|
16
|
-
import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-
|
|
17
|
+
import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-ML5YKV3B.js';
|
|
17
18
|
import { isVersion, compareVersions, satisfiesRange } from './chunk-TQMI335S.js';
|
|
18
|
-
import {
|
|
19
|
-
import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-
|
|
20
|
-
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-5FIOUQGC.js';
|
|
19
|
+
import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls } from './chunk-SBZ545DH.js';
|
|
20
|
+
import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-Z66CKWOM.js';
|
|
21
21
|
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
22
|
-
import {
|
|
23
|
-
import { keyRunnerFactory, isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, runnerDeliversComments, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-
|
|
24
|
-
import { allocatedBytes, freeBytes, formatBytes } from './chunk-
|
|
25
|
-
import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, exceedsDisk, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun } from './chunk-
|
|
26
|
-
import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-
|
|
27
|
-
import { loadHostKey, ensureHostKey, signerFor } from './chunk-
|
|
28
|
-
import { RUNNER_DIR_MODE, runnerDir, buildDir, attemptStamp, jobDir, RUNNER_FILE_MODE, jobsDir, pidFilePath, storeScopes, imagesDir } from './chunk-
|
|
29
|
-
import { parseClaimIdentity, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, sharedUserEnvironment, JOB_MOUNT } from './chunk-
|
|
30
|
-
import { COMMAND_LOST_REASON, takeAgentCredentials, runnerAgents, heldAgentCredential, CONTAINER_STOPPED_REASON, currentAgentCredential, fdName } from './chunk-
|
|
22
|
+
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-6Z7R24XA.js';
|
|
23
|
+
import { keyRunnerFactory, isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, runnerDeliversComments, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-BACWWK3E.js';
|
|
24
|
+
import { allocatedBytes, freeBytes, formatBytes } from './chunk-CI5LFLKH.js';
|
|
25
|
+
import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, exceedsDisk, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun } from './chunk-J6HWRVN2.js';
|
|
26
|
+
import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-IX6CFXSW.js';
|
|
27
|
+
import { loadHostKey, ensureHostKey, signerFor } from './chunk-42DBDDHP.js';
|
|
28
|
+
import { RUNNER_DIR_MODE, runnerDir, buildDir, attemptStamp, jobDir, RUNNER_FILE_MODE, jobsDir, pidFilePath, storeScopes, imagesDir } from './chunk-G35Y4LN5.js';
|
|
29
|
+
import { parseClaimIdentity, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, sharedUserEnvironment, JOB_MOUNT } from './chunk-CXJC3JLN.js';
|
|
30
|
+
import { COMMAND_LOST_REASON, takeAgentCredentials, runnerAgents, heldAgentCredential, CONTAINER_STOPPED_REASON, currentAgentCredential, fdName } from './chunk-DTQPDMHG.js';
|
|
31
31
|
import { resolveVersion } from './chunk-RA3O54FC.js';
|
|
32
32
|
import { mkdirSync, existsSync, chmodSync, writeFileSync, renameSync, statSync, readdirSync, readFileSync, rmSync, closeSync } from 'fs';
|
|
33
33
|
import { join, dirname } from 'path';
|
|
@@ -1581,6 +1581,33 @@ function holdWithoutRoomForLarge(state) {
|
|
|
1581
1581
|
}
|
|
1582
1582
|
return false;
|
|
1583
1583
|
}
|
|
1584
|
+
async function housekeepingDockerOf(state) {
|
|
1585
|
+
const injected = state.deps.housekeeping ?? {};
|
|
1586
|
+
const names2 = { run: injected.run, runnerId: runnerLabelValue(state.config.configPath), builder: builderName(state.config.configPath) };
|
|
1587
|
+
const hostBuilder = keepsHostBuilder(state.config, state.deps.blocked?.builderDiskPinned);
|
|
1588
|
+
return injected.docker ?? (hostBuilder ? createHousekeepingDocker(names2) : await housekeepingDockerIfReachable(names2));
|
|
1589
|
+
}
|
|
1590
|
+
async function freeDiskFromItemDisks(state, readFree) {
|
|
1591
|
+
const minimum = state.config.housekeeping?.minFreeDisk ?? 0;
|
|
1592
|
+
const log = logOf(state);
|
|
1593
|
+
try {
|
|
1594
|
+
let docker;
|
|
1595
|
+
await freeItemDisksUntil({
|
|
1596
|
+
configPath: state.config.configPath,
|
|
1597
|
+
// Docker is asked for only when a kept disk is a volume.
|
|
1598
|
+
removeVolume: async (name) => {
|
|
1599
|
+
docker ??= await housekeepingDockerOf(state);
|
|
1600
|
+
if (docker === void 0) throw new Error("Docker is not available");
|
|
1601
|
+
await docker.removeVolume(name);
|
|
1602
|
+
},
|
|
1603
|
+
enough: () => readFree() >= minimum,
|
|
1604
|
+
log: (line) => log.line(`freeing disk: ${line}`)
|
|
1605
|
+
});
|
|
1606
|
+
} catch (err) {
|
|
1607
|
+
log.error(`kept disks could not be removed to free disk: ${describeCallFailure(err)}`);
|
|
1608
|
+
}
|
|
1609
|
+
return readFree();
|
|
1610
|
+
}
|
|
1584
1611
|
async function freeDiskFromSavedStates(state, root, readFree) {
|
|
1585
1612
|
const dir = savedStatesDir(root);
|
|
1586
1613
|
const records = readRecords(dir).filter((record2) => record2.complete);
|
|
@@ -2041,6 +2068,7 @@ async function holdOffForDisk(state) {
|
|
|
2041
2068
|
const readFree = () => minimum === 0 ? Number.POSITIVE_INFINITY : (state.deps.freeBytes ?? freeBytes)(root) ?? Number.POSITIVE_INFINITY;
|
|
2042
2069
|
let free = readFree();
|
|
2043
2070
|
const log = logOf(state);
|
|
2071
|
+
if (free < minimum) free = await freeDiskFromItemDisks(state, readFree);
|
|
2044
2072
|
if (free < minimum) free = await freeDiskFromSavedStates(state, root, readFree);
|
|
2045
2073
|
if (free < minimum) {
|
|
2046
2074
|
if (state.lowDisk === void 0) {
|
|
@@ -2084,6 +2112,9 @@ async function housekeepingPass(state) {
|
|
|
2084
2112
|
keepDays: config.jobsKeepDays,
|
|
2085
2113
|
buildCacheMax: config.buildCacheMax,
|
|
2086
2114
|
savedStateMax: config.savedStateMax ?? DEFAULT_SAVED_STATE_MAX_BYTES,
|
|
2115
|
+
workspaceMax: config.workspaceMax,
|
|
2116
|
+
workspaceOrgMax: config.workspaceOrgMax,
|
|
2117
|
+
workspaceKeepDays: config.workspaceKeepDays,
|
|
2087
2118
|
removeHostBuilder: !hostBuilder,
|
|
2088
2119
|
docker,
|
|
2089
2120
|
now: state.deps.now ?? (() => /* @__PURE__ */ new Date()),
|
|
@@ -2173,7 +2204,7 @@ var CLAIM_REFUSAL_CODES = new Set(
|
|
|
2173
2204
|
"pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous pull_request_repository_not_connected repository_not_reachable branch_claimed_elsewhere".split(" ")
|
|
2174
2205
|
);
|
|
2175
2206
|
async function tryClaimAndStart(state, item, queue) {
|
|
2176
|
-
const { postJson: postJson2 } = await import('./work-cmd-
|
|
2207
|
+
const { postJson: postJson2 } = await import('./work-cmd-ZP4UIHBT.js');
|
|
2177
2208
|
const log = logOf(state);
|
|
2178
2209
|
const hostKey = await loadHostKey(state.config.configPath);
|
|
2179
2210
|
const claim = await retrySend(
|
|
@@ -2342,6 +2373,10 @@ async function prepareSession(state, active, item, queue, tag) {
|
|
|
2342
2373
|
const job = active.job;
|
|
2343
2374
|
const builtin = job.microvm !== void 0 || job.container !== void 0;
|
|
2344
2375
|
const log = logOf(state);
|
|
2376
|
+
if (queue === "amend" && !builtin) {
|
|
2377
|
+
job.disk = { restored: false, reason: "build_type_cannot_restore" };
|
|
2378
|
+
writeJobFile(join(active.dirPath, "job.json"), job);
|
|
2379
|
+
}
|
|
2345
2380
|
try {
|
|
2346
2381
|
const prepared = await prepareResume({
|
|
2347
2382
|
configPath: state.config.configPath,
|
|
@@ -2481,6 +2516,8 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
2481
2516
|
config: claimCalls(state.config, active.job),
|
|
2482
2517
|
...active.job.organizationId === void 0 ? {} : { organizationId: active.job.organizationId, claimId: active.job.claimId },
|
|
2483
2518
|
runtime: runtimeOf(state),
|
|
2519
|
+
queue,
|
|
2520
|
+
workItemId: item.id,
|
|
2484
2521
|
item,
|
|
2485
2522
|
itemKey,
|
|
2486
2523
|
tokens,
|
|
@@ -2511,6 +2548,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
2511
2548
|
workdir = provisioned.workdir;
|
|
2512
2549
|
active.job.container = provisioned.state;
|
|
2513
2550
|
active.job.environment = provisioned.environment;
|
|
2551
|
+
active.job.disk = provisioned.disk;
|
|
2514
2552
|
installCommitHooks(active.job, log, tag);
|
|
2515
2553
|
const hooksDelivered = await deliverContainerHooks(runtimeOf(state), provisioned.state, dirPath);
|
|
2516
2554
|
if (!hooksDelivered.ok) {
|
|
@@ -2522,6 +2560,8 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
2522
2560
|
config: claimCalls(state.config, active.job),
|
|
2523
2561
|
...active.job.organizationId === void 0 ? {} : { organizationId: active.job.organizationId, claimId: active.job.claimId },
|
|
2524
2562
|
runtime: runtimeOf(state),
|
|
2563
|
+
queue,
|
|
2564
|
+
workItemId: item.id,
|
|
2525
2565
|
item,
|
|
2526
2566
|
itemKey,
|
|
2527
2567
|
tokens,
|
|
@@ -2552,6 +2592,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
2552
2592
|
workdir = provisioned.workdir;
|
|
2553
2593
|
active.job.microvm = provisioned.state;
|
|
2554
2594
|
active.job.environment = provisioned.environment;
|
|
2595
|
+
active.job.disk = provisioned.disk;
|
|
2555
2596
|
installCommitHooks(active.job, log, tag);
|
|
2556
2597
|
const identity2 = active.job.commitIdentity;
|
|
2557
2598
|
if (identity2?.hooksPath !== void 0) {
|
|
@@ -3545,7 +3586,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
3545
3586
|
check: update.check ? () => update.check(configPath) : async () => {
|
|
3546
3587
|
const held = runnerAgents(deps.agents).flatMap((agent) => heldAgentCredential(agent.descriptor.id) ?? []);
|
|
3547
3588
|
const env = { ...process.env, ...Object.fromEntries(held.map((credential) => [credential.variable, credential.value])) };
|
|
3548
|
-
return (await import('./check-
|
|
3589
|
+
return (await import('./check-AEDFTYH6.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
|
|
3549
3590
|
},
|
|
3550
3591
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
3551
3592
|
log
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import {
|
|
3
|
+
import { defaultAgents, agentById } from './chunk-I6U6QPN6.js';
|
|
4
|
+
import { PROVIDERS, LEGACY_AGENT } from './chunk-LSLK4RS4.js';
|
|
4
5
|
import { statSync, readFileSync } from 'fs';
|
|
5
6
|
import { join, dirname } from 'path';
|
|
6
7
|
import { spawn, spawnSync } from 'child_process';
|