@outerlayer/cli 0.38.0-next.20261106012958 → 0.38.0-next.20261106190200
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/dist/{agent-setup-CBEPGNFY.js → agent-setup-RO2DJUF3.js} +18 -18
- package/dist/{agent-subcommand-UNSXJUHA.js → agent-subcommand-PSI3BAXM.js} +3 -3
- package/dist/{bridge-JI4IO7JN.js → bridge-3WAVT5SX.js} +6 -6
- package/dist/{build-2L3L2OJO.js → build-4KG7H2XK.js} +12 -12
- package/dist/{build-disk-CKBEEF4N.js → build-disk-GGGJ237B.js} +10 -10
- package/dist/build-info.json +1 -1
- package/dist/{builder-PKDA7X2H.js → builder-HV7PUSZZ.js} +9 -9
- package/dist/caller-3P3AEY7W.js +23 -0
- package/dist/{check-FG32SYJF.js → check-LENGOFUF.js} +68 -52
- package/dist/{chunk-DXBYNJRM.js → chunk-27P5FSZT.js} +5 -5
- package/dist/{chunk-T524XQKI.js → chunk-2MA2KWHN.js} +1 -1
- package/dist/{chunk-FGVVBYCT.js → chunk-2VN36ZPA.js} +1 -1
- package/dist/{chunk-ZCEM4GJ5.js → chunk-3E65OLJ4.js} +3 -3
- package/dist/{chunk-EXIZ3G6I.js → chunk-3KVYSJAL.js} +4 -4
- package/dist/{chunk-EHJYXABQ.js → chunk-4PH3KXDP.js} +1 -1
- package/dist/{chunk-WF2NXBOM.js → chunk-5BDYRHZZ.js} +7 -7
- package/dist/{chunk-ZTJTAKVW.js → chunk-5MWE5IOO.js} +1 -1
- package/dist/{chunk-ERQLHUWU.js → chunk-5QBTW367.js} +5 -5
- package/dist/{chunk-4MSEUIMK.js → chunk-6744TXEY.js} +5 -5
- package/dist/{chunk-MDKLSY43.js → chunk-677TCNML.js} +1 -1
- package/dist/{chunk-3FAJMXBA.js → chunk-6BPCEGJL.js} +8 -8
- package/dist/{chunk-S7CE7QCF.js → chunk-6ZSUJ3ES.js} +3 -3
- package/dist/{chunk-TAEDH2SU.js → chunk-76Y35TWH.js} +1 -1
- package/dist/{chunk-HG2ZG6ZU.js → chunk-7ATHSAAT.js} +1 -1
- package/dist/{chunk-KLQLQQGG.js → chunk-7B4A6PBC.js} +3 -3
- package/dist/{chunk-PARDL7HH.js → chunk-7KF36CVC.js} +1 -1
- package/dist/{chunk-ZO3RUMUR.js → chunk-A24MNKYN.js} +4 -4
- package/dist/{chunk-O4Z2YVC3.js → chunk-ANFGBAWY.js} +4 -4
- package/dist/{chunk-L4ACBB5R.js → chunk-BEKYNGLH.js} +1 -1
- package/dist/{chunk-YWWW47OY.js → chunk-CFTSVW7W.js} +1 -1
- package/dist/{chunk-RSRNZB4T.js → chunk-DF6ZHOIA.js} +6 -6
- package/dist/{chunk-U5EE7PGC.js → chunk-E2ZWGLNZ.js} +3 -3
- package/dist/{chunk-K6JOU4CT.js → chunk-F2PTLH3J.js} +152 -48
- package/dist/{chunk-ZLJXMXZP.js → chunk-FBBI6K7D.js} +2 -2
- package/dist/{chunk-OUHM6U6Z.js → chunk-FCU7WSCV.js} +144 -5
- package/dist/{chunk-MPE4NOKD.js → chunk-G2EWER4K.js} +2 -2
- package/dist/{chunk-ONOINHY4.js → chunk-G2ITKUX4.js} +1 -1
- package/dist/{chunk-QWDGHEQL.js → chunk-GM3H4ZHG.js} +1 -1
- package/dist/{chunk-AVEF3T6Y.js → chunk-GM4TY5H2.js} +1 -1
- package/dist/{chunk-DL5N6V3D.js → chunk-GQEVQIS6.js} +1 -1
- package/dist/{chunk-5R5FEPLH.js → chunk-H2L5NB5U.js} +98 -17
- package/dist/{chunk-CGXYPLK3.js → chunk-HTQFAHXD.js} +2 -2
- package/dist/{chunk-QONY6C2B.js → chunk-IOURL3LH.js} +15 -9
- package/dist/{chunk-XE2PXGZT.js → chunk-JKQAOSSX.js} +3 -3
- package/dist/{chunk-3XWZKL2P.js → chunk-JKYCEXZX.js} +7 -7
- package/dist/{chunk-45TFVWNT.js → chunk-JW25JVK4.js} +5 -5
- package/dist/{chunk-VWNQRD4I.js → chunk-KMUERD5F.js} +4 -4
- package/dist/{chunk-AJC5Q2NY.js → chunk-LFBQL4AP.js} +5 -5
- package/dist/{chunk-3DVCPRKE.js → chunk-LRE4QIMD.js} +7 -7
- package/dist/{chunk-GMRVWRHD.js → chunk-M4JFGNG7.js} +2 -2
- package/dist/{chunk-X2DX3A7H.js → chunk-MCLSXTLY.js} +1 -1
- package/dist/{chunk-BO3NOGKE.js → chunk-ML3O3A3Q.js} +1 -1
- package/dist/{chunk-ABN4UBR5.js → chunk-NMCRJ7NZ.js} +2 -2
- package/dist/{chunk-CCMKLF7K.js → chunk-NTRXOTO7.js} +4 -4
- package/dist/{chunk-256R6O56.js → chunk-OMCDOJO2.js} +8 -5
- package/dist/{chunk-OGQW7A4G.js → chunk-QHOC32DP.js} +8 -8
- package/dist/{chunk-SMFWLPXC.js → chunk-RDPLNQFI.js} +18 -17
- package/dist/{chunk-JTDMSQMI.js → chunk-RFBJKK2L.js} +7 -7
- package/dist/{chunk-BL6CCU26.js → chunk-SUMXGPSG.js} +5 -5
- package/dist/{chunk-XDRZ3BNA.js → chunk-T7KETYNW.js} +1 -1
- package/dist/{chunk-PMJ6IEUM.js → chunk-TDBP62O2.js} +7 -7
- package/dist/{chunk-RZ6WJTUP.js → chunk-TDUBZ4FR.js} +1 -1
- package/dist/{chunk-AMG5ICDO.js → chunk-TFBNHDPT.js} +4 -4
- package/dist/{chunk-DVFGCVTV.js → chunk-TMYBADTM.js} +5 -5
- package/dist/{chunk-EFAOERZH.js → chunk-TOVSIUEJ.js} +1 -1
- package/dist/{chunk-EERD7VI3.js → chunk-U4ZHNHCF.js} +1 -1
- package/dist/{chunk-VNT2IRLM.js → chunk-UF3YTRGU.js} +70 -11
- package/dist/{chunk-U7L4GBGS.js → chunk-USJVENIV.js} +1 -1
- package/dist/{chunk-2MQQASWB.js → chunk-VOSC32UF.js} +6 -6
- package/dist/{chunk-FOUG2R4Q.js → chunk-VRSUCU2N.js} +1 -1
- package/dist/{chunk-YZRDJOOR.js → chunk-XDVLF6OT.js} +3 -3
- package/dist/{chunk-DK5YFDYI.js → chunk-YL6GWLK5.js} +8 -8
- package/dist/{chunk-YKWOVYVN.js → chunk-YSIVKYLW.js} +9 -6
- package/dist/{chunk-5VAXNAOD.js → chunk-YZ5M7S7U.js} +1 -1
- package/dist/{chunk-RUJR3SDB.js → chunk-ZGN3NOVS.js} +1 -1
- package/dist/{chunk-OFWNBTLU.js → chunk-ZOWUJUSF.js} +1 -1
- package/dist/{chunk-FER7JJ3S.js → chunk-ZPCUXCQX.js} +1 -1
- package/dist/{chunk-Z4R36YDJ.js → chunk-ZYQT6Q5R.js} +1379 -628
- package/dist/{claude-launcher-FHQTSQOM.js → claude-launcher-G73I5AGW.js} +6 -6
- package/dist/{cli-GNC4MFMP.js → cli-5SILU2LX.js} +154 -147
- package/dist/{command-47EYM2FJ.js → command-DBBEP7VM.js} +56 -49
- package/dist/{config-EA6WVKAS.js → config-KOSTQZXG.js} +11 -11
- package/dist/{connect-cmd-4JO2LBUT.js → connect-cmd-UNBJYFYM.js} +10 -10
- package/dist/{container-start-XR7KANS6.js → container-start-AAOLPVAH.js} +45 -45
- package/dist/{context-cleanup-6CTKLEUT.js → context-cleanup-MKVMFRNR.js} +3 -3
- package/dist/{context-show-cmd-Z7NQAKNE.js → context-show-cmd-P3LBILMP.js} +11 -11
- package/dist/{control-plane-launch-4PLBJKBS.js → control-plane-launch-2GOJKA53.js} +13 -13
- package/dist/{demo-record-cmd-3B2ME2ZI.js → demo-record-cmd-BPINCNYS.js} +7 -7
- package/dist/{demo-voice-cmd-LIXAA3OS.js → demo-voice-cmd-HBK3TWM5.js} +17 -17
- package/dist/{dist-3TV6G4YF.js → dist-MUOHO52Q.js} +1 -1
- package/dist/{docker-FPEQS6HK.js → docker-NUPVSMVQ.js} +9 -9
- package/dist/{doctor-AFH6UUX6.js → doctor-GHRSOZLB.js} +53 -47
- package/dist/{emit-artifact-cmd-5XIEUWFX.js → emit-artifact-cmd-CULA5AM4.js} +16 -16
- package/dist/{emit-cmd-IKYF27IK.js → emit-cmd-746N7PYR.js} +6 -6
- package/dist/{emit-criteria-cmd-YS5ZSLCN.js → emit-criteria-cmd-NY4RPUPD.js} +13 -13
- package/dist/{emit-demo-cmd-IDC2JC46.js → emit-demo-cmd-MYXTGMJI.js} +17 -17
- package/dist/{emit-finding-cmd-C4NRTIZO.js → emit-finding-cmd-ZGGMPQFT.js} +13 -13
- package/dist/{emit-result-cmd-GC2I7JQU.js → emit-result-cmd-GNEQHIIZ.js} +15 -15
- package/dist/{emit-step-cmd-TTH4FYFW.js → emit-step-cmd-NYCJ3XFQ.js} +13 -13
- package/dist/{exec-client-DT5EWVQL.js → exec-client-QHB62OZ6.js} +7 -7
- package/dist/find-unit-UVS2FM7E.js +24 -0
- package/dist/{findings-cmd-MSV52ODM.js → findings-cmd-ZINCPCAB.js} +13 -13
- package/dist/{fleet-readiness-O76CSI7M.js → fleet-readiness-FZCSJ7FY.js} +12 -12
- package/dist/{governing-source-QEFYVBQF.js → governing-source-CQML5N2D.js} +18 -18
- package/dist/{guest-init-X7M5AIOI.js → guest-init-C6FWJVAQ.js} +8 -8
- package/dist/{hook-fast-T6FOTZHA.js → hook-fast-6IOLZ45F.js} +1 -1
- package/dist/{hook-install-OUSUHQ6C.js → hook-install-VL4CEO4S.js} +3 -3
- package/dist/host-checks-HPCMZ7XT.js +79 -0
- package/dist/{host-key-UFUIBFBF.js → host-key-5APXLMY2.js} +7 -7
- package/dist/{image-tag-AE6EKDPV.js → image-tag-IBAYH5XH.js} +7 -7
- package/dist/index.js +4 -4
- package/dist/{init-PUN3PKOT.js → init-EIQFBAZI.js} +43 -43
- package/dist/init-YD4MNH5U.js +79 -0
- package/dist/{init-agent-D3KK24QX.js → init-agent-7UQZFG5E.js} +43 -43
- package/dist/{init-cmd-LGRN3U7K.js → init-cmd-TNJXWFQU.js} +24 -24
- package/dist/{init-update-ZL2J7EQI.js → init-update-KJWMEKR3.js} +21 -21
- package/dist/{install-cmd-4ID4VBH2.js → install-cmd-UXH2LGVA.js} +9 -9
- package/dist/{layout-G6K72TXK.js → layout-YVTZDKVU.js} +3 -3
- package/dist/{logs-DIA3NWC2.js → logs-22Y7QG42.js} +6 -6
- package/dist/loop-SVE6TL6G.js +90 -0
- package/dist/machine-RQIO5VRG.js +79 -0
- package/dist/{machine-skills-JLJJDXBS.js → machine-skills-6PJOJU5J.js} +3 -3
- package/dist/{mcp-install-cmd-OTAX7QP2.js → mcp-install-cmd-LJ7AYDDT.js} +3 -3
- package/dist/{mcp-serve-cmd-63KQEQYS.js → mcp-serve-cmd-34LDKQSR.js} +8 -8
- package/dist/{paths-KVMMJQ7T.js → paths-2KOZGV5U.js} +6 -6
- package/dist/{pending-2IE3VBAN.js → pending-RYWBDJCE.js} +7 -7
- package/dist/{pidfile-NCBBWZNH.js → pidfile-FQBXIHX7.js} +7 -7
- package/dist/{record-PQDJVKYV.js → record-7ENQ7Y5M.js} +7 -7
- package/dist/relay-JLU7RTFS.js +474 -0
- package/dist/{relay-protocol-PJ2HOP6B.js → relay-protocol-AEIZCA3K.js} +4 -4
- package/dist/{runner-agents-CEW4Z3FR.js → runner-agents-I5YLJY7G.js} +3 -3
- package/dist/{runner-env-23OLQBQZ.js → runner-env-GXY2VMNH.js} +13 -13
- package/dist/{runner-identity-IJKE4SRJ.js → runner-identity-MW53HCYG.js} +9 -9
- package/dist/{runner-key-4J4MHN3S.js → runner-key-GERK5EV3.js} +43 -43
- package/dist/{session-sender-HKNACIH5.js → session-sender-65X5PR7Q.js} +16 -16
- package/dist/{spec-cmd-4R7AYTBU.js → spec-cmd-3TNVJBN7.js} +14 -14
- package/dist/{starter-pack-6C7HPT4O.js → starter-pack-PLSMFXBU.js} +4 -4
- package/dist/{state-DPEWDXQN.js → state-EKXXOPA5.js} +7 -7
- package/dist/{status-GMVC666R.js → status-KGSQF55G.js} +43 -43
- package/dist/{sync-cmd-UMAENSGZ.js → sync-cmd-FNATZ5VL.js} +15 -15
- package/dist/update-steps-3LOJ377U.js +80 -0
- package/dist/{watch-RAUF223H.js → watch-FEBBRV22.js} +15 -15
- package/dist/{work-claim-cmd-A3ISXUFA.js → work-claim-cmd-2EPUH3KT.js} +19 -19
- package/dist/{work-cmd-U7YLMDZ7.js → work-cmd-V5A3MDXV.js} +13 -13
- package/dist/{work-comment-cmd-CMWMOWVG.js → work-comment-cmd-PUE47SUV.js} +15 -15
- package/dist/{work-demo-cmd-EKTJHIVM.js → work-demo-cmd-7Q3KW2OO.js} +13 -13
- package/dist/{work-logs-cmd-Z3QOFYTJ.js → work-logs-cmd-SQBJX6MC.js} +13 -13
- package/dist/{work-open-pr-cmd-NJXIX3QZ.js → work-open-pr-cmd-PNDF2CR5.js} +14 -14
- package/dist/{work-pr-cmd-JUV3SN7I.js → work-pr-cmd-U7WL7KYE.js} +13 -13
- package/dist/{work-proofs-cmd-MIDPIFTH.js → work-proofs-cmd-YHOM2NIH.js} +15 -15
- package/dist/{work-proofs-record-6FTMJDQG.js → work-proofs-record-CYIZ2RDH.js} +21 -21
- package/dist/{work-stop-cmd-Z7MYNR7R.js → work-stop-cmd-ENRSBWFT.js} +13 -13
- package/package.json +1 -1
- package/skill-pack/maintained/outerlayer-build/SKILL.md +3 -1
- package/dist/caller-XETCC46J.js +0 -23
- package/dist/find-unit-337Y4QAC.js +0 -24
- package/dist/host-checks-OXB5J3KR.js +0 -79
- package/dist/init-V7X3KA7B.js +0 -79
- package/dist/loop-AWBFKDV7.js +0 -90
- package/dist/machine-BZPKYURG.js +0 -79
- package/dist/relay-QDB526DJ.js +0 -223
- package/dist/update-steps-GTXNCG3Z.js +0 -80
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { resolveDevcontainerCli, devcontainerBuildInvocation, universalImagePending, RecipeError } from './chunk-
|
|
4
|
-
import { ensureHostKey } from './chunk-
|
|
5
|
-
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, jobsDir } from './chunk-
|
|
6
|
-
import { BUILD_HOME, JOB_MOUNT, RELAY_PORT, DESTINATION_BASE_PORT } from './chunk-
|
|
7
|
-
import { primaryDestination, JOIN_DIR, RELAY_ID, JOIN_SOCKET, GATEWAY_PORT, TARGET_GATEWAY, GATEWAY_SOCKET, destinationTarget, providerDestinations, RELAY_USER } from './chunk-
|
|
8
|
-
import { judgeAgent, universalImagePinned, UNIVERSAL_IMAGE, BUILDKIT_IMAGE } from './chunk-
|
|
9
|
-
import { defaultAgents } from './chunk-
|
|
3
|
+
import { resolveDevcontainerCli, devcontainerBuildInvocation, universalImagePending, RecipeError } from './chunk-ZPCUXCQX.js';
|
|
4
|
+
import { ensureHostKey } from './chunk-TOVSIUEJ.js';
|
|
5
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, jobsDir } from './chunk-YZ5M7S7U.js';
|
|
6
|
+
import { BUILD_HOME, JOB_MOUNT, RELAY_PORT, DESTINATION_BASE_PORT } from './chunk-FCU7WSCV.js';
|
|
7
|
+
import { primaryDestination, JOIN_DIR, RELAY_ID, JOIN_SOCKET, GATEWAY_PORT, TARGET_GATEWAY, GATEWAY_SOCKET, destinationTarget, providerDestinations, RELAY_USER } from './chunk-HTQFAHXD.js';
|
|
8
|
+
import { judgeAgent, universalImagePinned, UNIVERSAL_IMAGE, BUILDKIT_IMAGE } from './chunk-TDUBZ4FR.js';
|
|
9
|
+
import { defaultAgents } from './chunk-GM4TY5H2.js';
|
|
10
10
|
import { PROVIDERS } from './chunk-7PZDPISM.js';
|
|
11
|
-
import { compareVersions } from './chunk-
|
|
11
|
+
import { compareVersions } from './chunk-H2L5NB5U.js';
|
|
12
12
|
import { createHash } from 'crypto';
|
|
13
13
|
import { mkdirSync, createWriteStream, rmSync, existsSync, readFileSync, chmodSync, writeFileSync, realpathSync, readdirSync, renameSync } from 'fs';
|
|
14
14
|
import { dirname, join, posix, resolve } from 'path';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { stripTerminalControls } from './chunk-
|
|
4
|
-
import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-
|
|
3
|
+
import { stripTerminalControls } from './chunk-ZYQT6Q5R.js';
|
|
4
|
+
import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-76Y35TWH.js';
|
|
5
5
|
import { readFileSync } from 'fs';
|
|
6
6
|
|
|
7
7
|
createRequire(import.meta.url);
|
|
@@ -55,7 +55,7 @@ function envNamesOf(row, imageEnv) {
|
|
|
55
55
|
return [...new Set(names)].sort();
|
|
56
56
|
}
|
|
57
57
|
async function readOwnContainer(deps = {}) {
|
|
58
|
-
const run = deps.run ?? (await import('./docker-
|
|
58
|
+
const run = deps.run ?? (await import('./docker-NUPVSMVQ.js')).spawnRun;
|
|
59
59
|
const ids = candidateIds(deps.env ?? process.env, deps.readFile ?? ((path) => readFileSync(path, "utf8")));
|
|
60
60
|
if (ids.length === 0) return { ok: false, reason: "the runner cannot tell which container it runs in: HOSTNAME is empty and /proc/self/mountinfo names none" };
|
|
61
61
|
let problem = "";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { isVersion, compareVersions } from './chunk-TQMI335S.js';
|
|
4
|
-
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
4
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-YZ5M7S7U.js';
|
|
5
5
|
import { readFileSync, mkdirSync, writeFileSync, renameSync } from 'fs';
|
|
6
6
|
import { join } from 'path';
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { helperSocketPath } from './chunk-
|
|
4
|
-
import { UNIT_MARKER } from './chunk-
|
|
5
|
-
import { runnerDir } from './chunk-
|
|
3
|
+
import { helperSocketPath } from './chunk-ZYQT6Q5R.js';
|
|
4
|
+
import { UNIT_MARKER } from './chunk-VOSC32UF.js';
|
|
5
|
+
import { runnerDir } from './chunk-YZ5M7S7U.js';
|
|
6
6
|
import { createHash } from 'crypto';
|
|
7
7
|
import { join } from 'path';
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { isSameProcess } from './chunk-JBJTC3UU.js';
|
|
4
|
-
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
4
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-YZ5M7S7U.js';
|
|
5
5
|
import { existsSync, readFileSync, mkdirSync, writeFileSync, rmSync } from 'fs';
|
|
6
6
|
import { dirname } from 'path';
|
|
7
7
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { isAgentsMdLayout, discoverOuterlayerPaths, isForeignTree, toRepoRelative } from './chunk-
|
|
3
|
+
import { isAgentsMdLayout, discoverOuterlayerPaths, isForeignTree, toRepoRelative } from './chunk-CFTSVW7W.js';
|
|
4
4
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
5
|
-
import { invalidConfigMessage } from './chunk-
|
|
6
|
-
import { retiredSkillPaths, removeRetiredSkills } from './chunk-
|
|
5
|
+
import { invalidConfigMessage } from './chunk-MCLSXTLY.js';
|
|
6
|
+
import { retiredSkillPaths, removeRetiredSkills } from './chunk-2MA2KWHN.js';
|
|
7
7
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
8
|
-
import { maintainedFilesForExistingSkills, loadMaintainedFiles, emitTree, emitBuilders, defaultAgents, targetIds, generatedHeaderSource, parseOuterlayerConfig, classifyTree, writeMaintainedFiles, agentById } from './chunk-
|
|
8
|
+
import { maintainedFilesForExistingSkills, loadMaintainedFiles, emitTree, emitBuilders, defaultAgents, targetIds, generatedHeaderSource, parseOuterlayerConfig, classifyTree, writeMaintainedFiles, agentById } from './chunk-GM4TY5H2.js';
|
|
9
9
|
import { LEGACY_AGENT } from './chunk-7PZDPISM.js';
|
|
10
10
|
import { existsSync, readFileSync, mkdirSync, writeFileSync, copyFileSync, unlinkSync, rmdirSync, readdirSync } from 'fs';
|
|
11
11
|
import { join, dirname } from 'path';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { launchRefusalForSession } from './chunk-WGC7UFRM.js';
|
|
4
|
-
import { detectActiveSession } from './chunk-
|
|
5
|
-
import { autoConnect } from './chunk-
|
|
4
|
+
import { detectActiveSession } from './chunk-GQEVQIS6.js';
|
|
5
|
+
import { autoConnect } from './chunk-JKQAOSSX.js';
|
|
6
6
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
7
|
-
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-
|
|
7
|
+
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-T7KETYNW.js';
|
|
8
8
|
import { launchedItemForSession } from './chunk-4OD45RBP.js';
|
|
9
9
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
10
10
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
11
|
-
import { resolveRepoIdentity } from './chunk-
|
|
11
|
+
import { resolveRepoIdentity } from './chunk-H2L5NB5U.js';
|
|
12
12
|
import { CriteriaListSchema } from './chunk-YXXJBHHF.js';
|
|
13
13
|
import { readFileSync } from 'fs';
|
|
14
14
|
|
|
@@ -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-YZ5M7S7U.js';
|
|
4
4
|
import { readFileSync, mkdirSync, writeFileSync, renameSync } from 'fs';
|
|
5
5
|
import { join } from 'path';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { normalizePath, CONTEXT_PIN_FILENAME, laptopAgents, defaultAgents, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, contextAgents, legacyAgent, legacySubcommand } from './chunk-
|
|
3
|
+
import { normalizePath, CONTEXT_PIN_FILENAME, laptopAgents, defaultAgents, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, contextAgents, legacyAgent, legacySubcommand } from './chunk-GM4TY5H2.js';
|
|
4
4
|
import { LEGACY_AGENT } from './chunk-7PZDPISM.js';
|
|
5
5
|
import { existsSync, readdirSync, readFileSync, mkdirSync, writeFileSync, lstatSync, readlinkSync, symlinkSync, rmdirSync } from 'fs';
|
|
6
6
|
import { relative, sep, join, posix } from 'path';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { readNewestDemo } from './chunk-ER6KQCVJ.js';
|
|
4
|
-
import { runEmitArtifact } from './chunk-
|
|
4
|
+
import { runEmitArtifact } from './chunk-6744TXEY.js';
|
|
5
5
|
import { VoiceDownloadError, downloadPinned, sha256OfFile } from './chunk-2PGI6RDE.js';
|
|
6
|
-
import { detectActiveSession } from './chunk-
|
|
7
|
-
import { autoConnect } from './chunk-
|
|
6
|
+
import { detectActiveSession } from './chunk-GQEVQIS6.js';
|
|
7
|
+
import { autoConnect } from './chunk-JKQAOSSX.js';
|
|
8
8
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
9
|
-
import { defaultFetch, resolveGatewayCredentials } from './chunk-
|
|
9
|
+
import { defaultFetch, resolveGatewayCredentials } from './chunk-T7KETYNW.js';
|
|
10
10
|
import { launchedItemForSession } from './chunk-4OD45RBP.js';
|
|
11
|
-
import { VOICE_PACK_FILES, VOICE_PACK_VERSION } from './chunk-
|
|
11
|
+
import { VOICE_PACK_FILES, VOICE_PACK_VERSION } from './chunk-TDUBZ4FR.js';
|
|
12
12
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
13
|
-
import { resolveRepoIdentity } from './chunk-
|
|
13
|
+
import { resolveRepoIdentity } from './chunk-H2L5NB5U.js';
|
|
14
14
|
import { ARTIFACT_MAX_BYTES, ARTIFACT_MAX_CAPTION_LENGTH, DEMO_RECORD_MEDIA_TYPE, ARTIFACT_MAX_REPLACES_TARGETS, DEMO_MANIFEST_LATEST_VERSION, DemoManifestSchema, ARTIFACT_KINDS } from './chunk-YXXJBHHF.js';
|
|
15
15
|
import { __commonJS, __require, __toESM } from './chunk-Z5GEFMRW.js';
|
|
16
16
|
import { createHash } from 'crypto';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RELAY_PORT, DESTINATION_BASE_PORT } from './chunk-
|
|
4
|
-
import { GATEWAY_SOCKET, GATEWAY_PORT, providerDestinations } from './chunk-
|
|
5
|
-
import { defaultAgents } from './chunk-
|
|
3
|
+
import { RELAY_PORT, DESTINATION_BASE_PORT } from './chunk-FCU7WSCV.js';
|
|
4
|
+
import { GATEWAY_SOCKET, GATEWAY_PORT, providerDestinations } from './chunk-HTQFAHXD.js';
|
|
5
|
+
import { defaultAgents } from './chunk-GM4TY5H2.js';
|
|
6
6
|
import { PROVIDERS } from './chunk-7PZDPISM.js';
|
|
7
7
|
import { symlinkSync, unlinkSync } from 'fs';
|
|
8
8
|
import { join } from 'path';
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { writeFleetState } from './chunk-
|
|
4
|
-
import { writePendingUpdate } from './chunk-
|
|
5
|
-
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-
|
|
3
|
+
import { writeFleetState } from './chunk-677TCNML.js';
|
|
4
|
+
import { writePendingUpdate } from './chunk-USJVENIV.js';
|
|
5
|
+
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-BEKYNGLH.js';
|
|
6
6
|
import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
|
|
7
7
|
import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-E7R2GIAW.js';
|
|
8
|
-
import { reportFailedStart, fitImageBuildMemory } from './chunk-
|
|
9
|
-
import { renderUpdateSteps } from './chunk-
|
|
8
|
+
import { reportFailedStart, fitImageBuildMemory } from './chunk-TDBP62O2.js';
|
|
9
|
+
import { renderUpdateSteps } from './chunk-6ZSUJ3ES.js';
|
|
10
10
|
import { RUNNER_PROTOCOL } from './chunk-OVHBDADU.js';
|
|
11
|
-
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-
|
|
12
|
-
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-
|
|
13
|
-
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, releaseLease, LEASE_SECONDS, itemTag, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, setStage, jobEnv, runHook, describeHookEnd, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionMicroVm, deliverCommitHooks, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, currentSkillCommand, formerSkillProblem,
|
|
14
|
-
import { RUNNER_RESERVE_BYTES } from './chunk-
|
|
15
|
-
import { RepoFilter } from './chunk-
|
|
11
|
+
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-IOURL3LH.js';
|
|
12
|
+
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-5MWE5IOO.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, provisionSandbox, deliverSandboxHooks, provisionMicroVm, deliverCommitHooks, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, keptCommitsLine, currentSkillCommand, formerSkillProblem, commandLogOffset, startSandboxCommand, MICROVM_COMMAND_DIR, startMicroVmCommand, microVmCommandLine, runCommand, containerCommandExec, execCommandLine, startSender, startHostServices, finishJob, sampleGuest, foldSample, isSandboxTracked, isContainerTracked, isMicroVmTracked, probeSandboxCommand, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, SandboxGoneError, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isIsolatedJob, isTimedOut, readCpuUsec, isIdle, HELPER_ENV, setUpRunnerCgroup, stopOrphanedMicroVms, unfinishedJobs, sweepImageBuilders, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, listItemDisks, usableCpus, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, sweepSandboxes, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied, restartSender, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, vmAlive, writeGuestGhConfig, shellQuote, deliverJobFiles, inTeardown } from './chunk-ZYQT6Q5R.js';
|
|
14
|
+
import { RUNNER_RESERVE_BYTES } from './chunk-VOSC32UF.js';
|
|
15
|
+
import { RepoFilter } from './chunk-LRE4QIMD.js';
|
|
16
16
|
import { JOB_STATE_FORMAT, readsJobState, jobStateFormatOf } from './chunk-ZVB57WI6.js';
|
|
17
|
-
import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-
|
|
17
|
+
import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-76Y35TWH.js';
|
|
18
18
|
import { isVersion, compareVersions, satisfiesRange } from './chunk-TQMI335S.js';
|
|
19
|
-
import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls } from './chunk-
|
|
20
|
-
import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-
|
|
19
|
+
import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls } from './chunk-FBBI6K7D.js';
|
|
20
|
+
import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-7KF36CVC.js';
|
|
21
21
|
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
22
|
-
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-
|
|
23
|
-
import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-
|
|
24
|
-
import { keyRunnerFactory, isBuiltinContainer, isBuiltinVm, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, runnerDeliversComments, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-
|
|
25
|
-
import { allocatedBytes, freeBytes, formatBytes } from './chunk-
|
|
26
|
-
import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, exceedsDisk,
|
|
27
|
-
import { loadHostKey, ensureHostKey, signerFor } from './chunk-
|
|
28
|
-
import { RUNNER_DIR_MODE, runnerDir, buildDir, attemptStamp, jobDir,
|
|
29
|
-
import { parseClaimIdentity, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, JOB_MOUNT } from './chunk-
|
|
30
|
-
import { jobCredentialProblem, COMMAND_LOST_REASON, takeAgentCredentials, heldAgentCredential, CONTAINER_STOPPED_REASON, currentAgentCredential, fdName } from './chunk-
|
|
31
|
-
import { jobAgent, jobCommandEnv, runnerAgents } from './chunk-
|
|
22
|
+
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-JKYCEXZX.js';
|
|
23
|
+
import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-RFBJKK2L.js';
|
|
24
|
+
import { keyRunnerFactory, isBuiltinContainer, isBuiltinVm, isBuiltinSandbox, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, runnerDeliversComments, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-UF3YTRGU.js';
|
|
25
|
+
import { allocatedBytes, freeBytes, formatBytes } from './chunk-G2EWER4K.js';
|
|
26
|
+
import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, exceedsDisk, runnerLabelValue, builderName, ensureFailureCount, builderSpec, ensureBuilder, spawnRun } from './chunk-6BPCEGJL.js';
|
|
27
|
+
import { loadHostKey, ensureHostKey, signerFor } from './chunk-TOVSIUEJ.js';
|
|
28
|
+
import { RUNNER_DIR_MODE, runnerDir, RUNNER_FILE_MODE, buildDir, attemptStamp, jobDir, jobsDir, pidFilePath, storeScopes, imagesDir } from './chunk-YZ5M7S7U.js';
|
|
29
|
+
import { parseClaimIdentity, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, JOB_MOUNT } from './chunk-FCU7WSCV.js';
|
|
30
|
+
import { jobCredentialProblem, COMMAND_LOST_REASON, takeAgentCredentials, heldAgentCredential, CONTAINER_STOPPED_REASON, currentAgentCredential, fdName } from './chunk-HTQFAHXD.js';
|
|
31
|
+
import { jobAgent, jobCommandEnv, runnerAgents } from './chunk-TDUBZ4FR.js';
|
|
32
32
|
import { resolveVersion } from './chunk-RA3O54FC.js';
|
|
33
|
-
import { mkdirSync, existsSync,
|
|
33
|
+
import { mkdirSync, existsSync, writeFileSync, chmodSync, renameSync, statSync, readdirSync, readFileSync, rmSync, closeSync } from 'fs';
|
|
34
34
|
import { join, dirname } from 'path';
|
|
35
35
|
import { randomBytes, createHash } from 'crypto';
|
|
36
36
|
import { totalmem, userInfo, constants } from 'os';
|
|
@@ -627,7 +627,9 @@ function stageReason(job) {
|
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
629
|
function ownReason({ job, ending }) {
|
|
630
|
-
if (job.
|
|
630
|
+
if (job.sandbox !== void 0) {
|
|
631
|
+
return "is a sandbox build that a restarted runner cannot adopt";
|
|
632
|
+
} else if (job.microvm !== void 0) {
|
|
631
633
|
if (!isMicroVmTracked(job)) return "is a microVM build that a restarted runner cannot adopt";
|
|
632
634
|
} else if (!isContainerTracked(job)) {
|
|
633
635
|
return "is not a container build tracked inside its container";
|
|
@@ -993,6 +995,19 @@ var HOOKS = [
|
|
|
993
995
|
"post-index-change"
|
|
994
996
|
];
|
|
995
997
|
var READS_STDIN = /* @__PURE__ */ new Set(["pre-push", "pre-receive", "post-receive", "reference-transaction", "post-rewrite"]);
|
|
998
|
+
function noticesWhenMissing(name) {
|
|
999
|
+
return name === "pre-commit" || name === "pre-push";
|
|
1000
|
+
}
|
|
1001
|
+
var DECLARES_HOOKS = `{ [ -f "$top/lefthook.yml" ] || [ -f "$top/lefthook.yaml" ] || [ -f "$top/.lefthook.yml" ] || [ -f "$top/.lefthook.yaml" ] || [ -d "$top/.husky" ] ||
|
|
1002
|
+
grep -Eq '"(prepare|postinstall)"[[:space:]]*:[[:space:]]*"[^"]*(husky|lefthook)' "$top/package.json" 2>/dev/null; }`;
|
|
1003
|
+
var HAS_INSTALLED_HOOK = `{ installed=false; for f in "$path"/*; do case $f in *.sample) ;; *) if [ -f "$f" ] && [ -x "$f" ]; then installed=true; break; fi ;; esac; done; $installed; }`;
|
|
1004
|
+
function missingHookNotice(name) {
|
|
1005
|
+
return ` top=$(git rev-parse --show-toplevel 2>/dev/null) || top=
|
|
1006
|
+
if [ -n "$top" ] && ! [ "$path" -ef "$here" ] && ! ${HAS_INSTALLED_HOOK} && ${DECLARES_HOOKS}; then
|
|
1007
|
+
echo "outerlayer: the repository declares git hooks, but none is installed in $path, so no ${name} hook ran. Install the repository's hooks in $path." >&2
|
|
1008
|
+
fi
|
|
1009
|
+
`;
|
|
1010
|
+
}
|
|
996
1011
|
var ADD_TRAILER = `
|
|
997
1012
|
# Every commit of the build names the requester once: a trailer already there is left alone.
|
|
998
1013
|
file=\${1-}
|
|
@@ -1032,7 +1047,7 @@ fi
|
|
|
1032
1047
|
hook=$path/${name}
|
|
1033
1048
|
status=0
|
|
1034
1049
|
if [ "$path" -ef "$here" ] || [ ! -f "$hook" ] || [ ! -x "$hook" ]; then
|
|
1035
|
-
${READS_STDIN.has(name) ? " cat >/dev/null\n" : ""} :
|
|
1050
|
+
${noticesWhenMissing(name) ? missingHookNotice(name) : ""}${READS_STDIN.has(name) ? " cat >/dev/null\n" : ""} :
|
|
1036
1051
|
else
|
|
1037
1052
|
${adds ? ` "$hook" "$@" || status=$?` : ` exec "$hook" "$@"`}
|
|
1038
1053
|
fi
|
|
@@ -1191,7 +1206,7 @@ function notEndedByRunnerReason(exit, isolated) {
|
|
|
1191
1206
|
return `the command exited ${exit.code}, the status of a process killed by ${name}; the runner did not end it`;
|
|
1192
1207
|
}
|
|
1193
1208
|
function jobNotEndedByRunnerReason(exit, job) {
|
|
1194
|
-
return notEndedByRunnerReason(exit, job.container !== void 0 || job.microvm !== void 0);
|
|
1209
|
+
return notEndedByRunnerReason(exit, job.container !== void 0 || job.microvm !== void 0 || job.sandbox !== void 0);
|
|
1195
1210
|
}
|
|
1196
1211
|
var HelperInUseError = class extends Error {
|
|
1197
1212
|
constructor(socketPath, holder) {
|
|
@@ -2179,6 +2194,25 @@ function recordHousekeeping(state, root, patch) {
|
|
|
2179
2194
|
logOf(state).error(`could not write housekeeping.json: ${describeCallFailure(err)}`);
|
|
2180
2195
|
}
|
|
2181
2196
|
}
|
|
2197
|
+
async function sweepOwnSandboxes(state) {
|
|
2198
|
+
const runtime = runtimeOf(state);
|
|
2199
|
+
const log = logOf(state);
|
|
2200
|
+
try {
|
|
2201
|
+
await sweepSandboxes({
|
|
2202
|
+
client: runtime.sandbox.client(),
|
|
2203
|
+
runnerId: runnerLabelValue(state.config.configPath),
|
|
2204
|
+
// Read after the list: a sandbox made while the list was read is held by the runtime, then by its job file.
|
|
2205
|
+
heldBuilds: () => /* @__PURE__ */ new Set([
|
|
2206
|
+
...unfinishedJobs(jobsDir(state.config.configPath)).flatMap(({ job }) => job.sandbox === void 0 ? [] : [job.sandbox.buildId]),
|
|
2207
|
+
...runtime.sandbox.sandboxes.keys(),
|
|
2208
|
+
...runtime.sandbox.creating
|
|
2209
|
+
]),
|
|
2210
|
+
log: (line) => log.line(line)
|
|
2211
|
+
});
|
|
2212
|
+
} catch (err) {
|
|
2213
|
+
log.error(`sandboxes could not be swept: ${describeCallFailure(err)}`);
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2182
2216
|
async function housekeepingPass(state) {
|
|
2183
2217
|
const config = state.config.housekeeping;
|
|
2184
2218
|
if (config === void 0 || state.housekeepingRunning) return;
|
|
@@ -2187,8 +2221,9 @@ async function housekeepingPass(state) {
|
|
|
2187
2221
|
state.deps.housekeeping ??= {};
|
|
2188
2222
|
const hostBuilder = keepsHostBuilder(state.config, state.deps.blocked?.builderDiskPinned);
|
|
2189
2223
|
const names2 = { run: state.deps.housekeeping.run, runnerId: runnerLabelValue(state.config.configPath), builder: builderName(state.config.configPath) };
|
|
2190
|
-
const
|
|
2191
|
-
|
|
2224
|
+
const own = isBuiltinSandbox(state.config.hooks.provision);
|
|
2225
|
+
const docker = own ? void 0 : state.deps.housekeeping.docker ?? (hostBuilder ? createHousekeepingDocker(names2) : await housekeepingDockerIfReachable(names2));
|
|
2226
|
+
if (hostBuilder && docker !== void 0) state.deps.housekeeping.docker ??= docker;
|
|
2192
2227
|
const result = await runHousekeeping({
|
|
2193
2228
|
configPath: state.config.configPath,
|
|
2194
2229
|
keepDays: config.jobsKeepDays,
|
|
@@ -2198,11 +2233,12 @@ async function housekeepingPass(state) {
|
|
|
2198
2233
|
workspaceOrgMax: config.workspaceOrgMax,
|
|
2199
2234
|
workspaceKeepDays: config.workspaceKeepDays,
|
|
2200
2235
|
itemStates: (ids) => askItemStates(state.config, state.deps.fetchImpl, ids),
|
|
2201
|
-
removeHostBuilder: !hostBuilder,
|
|
2236
|
+
removeHostBuilder: !own && !hostBuilder,
|
|
2202
2237
|
docker,
|
|
2203
2238
|
now: state.deps.now ?? (() => /* @__PURE__ */ new Date()),
|
|
2204
2239
|
log: logOf(state)
|
|
2205
2240
|
});
|
|
2241
|
+
if (isBuiltinSandbox(state.config.hooks.provision)) await sweepOwnSandboxes(state);
|
|
2206
2242
|
recordHousekeeping(state, runnerDir(state.config.configPath), { lastRunAt: nowOf(state).toISOString(), freedBytes: result.freedBytes });
|
|
2207
2243
|
} catch (err) {
|
|
2208
2244
|
logOf(state).error(`housekeeping failed: ${describeCallFailure(err)}`);
|
|
@@ -2287,7 +2323,7 @@ var CLAIM_REFUSAL_CODES = new Set(
|
|
|
2287
2323
|
"pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous pull_request_repository_not_connected repository_not_reachable branch_claimed_elsewhere".split(" ")
|
|
2288
2324
|
);
|
|
2289
2325
|
async function tryClaimAndStart(state, item, queue) {
|
|
2290
|
-
const { postJson: postJson2 } = await import('./work-cmd-
|
|
2326
|
+
const { postJson: postJson2 } = await import('./work-cmd-V5A3MDXV.js');
|
|
2291
2327
|
const log = logOf(state);
|
|
2292
2328
|
const hostKey = await loadHostKey(state.config.configPath);
|
|
2293
2329
|
const claim = await retrySend(
|
|
@@ -2529,9 +2565,10 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
2529
2565
|
const noteOnce = attemptNote(log, tag);
|
|
2530
2566
|
const containerMode = isBuiltinContainer(state.config.hooks.provision);
|
|
2531
2567
|
const vmMode = isBuiltinVm(state.config.hooks.provision);
|
|
2568
|
+
const sandboxMode = isBuiltinSandbox(state.config.hooks.provision);
|
|
2532
2569
|
let tokens;
|
|
2533
|
-
if (containerMode || vmMode) {
|
|
2534
|
-
active.job.environment = { isolation: vmMode ? "vm" : "container", cliVersion: state.deps.cliVersion ?? resolveVersion() };
|
|
2570
|
+
if (containerMode || vmMode || sandboxMode) {
|
|
2571
|
+
active.job.environment = { isolation: vmMode || sandboxMode ? "vm" : "container", cliVersion: state.deps.cliVersion ?? resolveVersion() };
|
|
2535
2572
|
writeJobFile(jobFilePath, active.job);
|
|
2536
2573
|
tokens = buildTokensFor(state, active);
|
|
2537
2574
|
runtimeOf(state).credentials.set(dirPath, tokens);
|
|
@@ -2651,6 +2688,49 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
2651
2688
|
await endOnProvisionFailure(state, active, tokens, provisionTook, hooksDelivered.reason);
|
|
2652
2689
|
return;
|
|
2653
2690
|
}
|
|
2691
|
+
} else if (sandboxMode) {
|
|
2692
|
+
const provisioned = await provisionSandbox({
|
|
2693
|
+
config: claimCalls(state.config, active.job),
|
|
2694
|
+
...active.job.organizationId === void 0 ? {} : { organizationId: active.job.organizationId, claimId: active.job.claimId },
|
|
2695
|
+
runtime: runtimeOf(state),
|
|
2696
|
+
queue,
|
|
2697
|
+
workItemId: item.id,
|
|
2698
|
+
item,
|
|
2699
|
+
itemKey,
|
|
2700
|
+
tokens,
|
|
2701
|
+
branch: primary?.branch ?? branch,
|
|
2702
|
+
repositories,
|
|
2703
|
+
jobDir: dirPath,
|
|
2704
|
+
cliVersion,
|
|
2705
|
+
log,
|
|
2706
|
+
save: (own, environment) => {
|
|
2707
|
+
active.job.sandbox = own;
|
|
2708
|
+
active.job.environment = environment;
|
|
2709
|
+
writeJobFile(jobFilePath, active.job);
|
|
2710
|
+
},
|
|
2711
|
+
aborted: () => active.ending,
|
|
2712
|
+
fetchImpl: state.deps.fetchImpl,
|
|
2713
|
+
now: state.deps.now,
|
|
2714
|
+
leaseExpiryMs: () => leaseExpiresAtMs(active.job),
|
|
2715
|
+
requireBuildSkill,
|
|
2716
|
+
job: active.job
|
|
2717
|
+
}).catch((err) => ({ ok: false, reason: `provision failed: ${describeCallFailure(err)}`, aborted: false }));
|
|
2718
|
+
const provisionTook = formatDuration(nowOf(state).getTime() - provisionStartedMs);
|
|
2719
|
+
if (active.ending) return;
|
|
2720
|
+
if (!provisioned.ok) {
|
|
2721
|
+
await endOnProvisionFailure(state, active, tokens, provisionTook, provisioned.reason);
|
|
2722
|
+
return;
|
|
2723
|
+
}
|
|
2724
|
+
log.line(`${tag} provision ok (${provisionTook}) \xB7 sandbox ${provisioned.state.sandboxId}`);
|
|
2725
|
+
workdir = provisioned.workdir;
|
|
2726
|
+
active.job.sandbox = provisioned.state;
|
|
2727
|
+
active.job.environment = provisioned.environment;
|
|
2728
|
+
installCommitHooks(active.job, log, tag);
|
|
2729
|
+
const hooksDelivered = await deliverSandboxHooks(runtimeOf(state), provisioned.state, dirPath);
|
|
2730
|
+
if (!hooksDelivered.ok) {
|
|
2731
|
+
await endOnProvisionFailure(state, active, tokens, provisionTook, hooksDelivered.reason);
|
|
2732
|
+
return;
|
|
2733
|
+
}
|
|
2654
2734
|
} else if (vmMode) {
|
|
2655
2735
|
const provisioned = await provisionMicroVm({
|
|
2656
2736
|
config: claimCalls(state.config, active.job),
|
|
@@ -2836,7 +2916,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
2836
2916
|
writeJobFile(jobFilePath, job);
|
|
2837
2917
|
const skillDecision = await decideHostBuildSkill({
|
|
2838
2918
|
requireBuildSkill,
|
|
2839
|
-
containerMode,
|
|
2919
|
+
containerMode: containerMode || sandboxMode,
|
|
2840
2920
|
vmMode,
|
|
2841
2921
|
workdir,
|
|
2842
2922
|
repository: primary?.repository,
|
|
@@ -2848,10 +2928,11 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
2848
2928
|
return;
|
|
2849
2929
|
}
|
|
2850
2930
|
if (skillDecision.kind === "warn") log.line(`${tag} warning: the clone has no \`build\` skill; the control plane's context may deliver one, so the command starts`);
|
|
2851
|
-
if (!containerMode && !vmMode) {
|
|
2931
|
+
if (!containerMode && !vmMode && !sandboxMode) {
|
|
2852
2932
|
if (existsSync(join(workdir, ".git"))) {
|
|
2853
2933
|
try {
|
|
2854
2934
|
const prepared = await prepareBranch({ workdir, branch });
|
|
2935
|
+
if (prepared.kept !== void 0) log.line(`${tag} ${keptCommitsLine(branch, prepared.kept)}`);
|
|
2855
2936
|
log.line(`${tag} on ${branch} at ${prepared.head.slice(0, 8)}`);
|
|
2856
2937
|
} catch (err) {
|
|
2857
2938
|
log.error(`${tag} could not put the workdir on ${branch}: ${describeCallFailure(err)} \xB7 ending job as failed`);
|
|
@@ -2874,7 +2955,13 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
2874
2955
|
job = active.job;
|
|
2875
2956
|
let running;
|
|
2876
2957
|
try {
|
|
2877
|
-
if (job.
|
|
2958
|
+
if (job.sandbox !== void 0) {
|
|
2959
|
+
job.sandbox.tracking = "sandbox";
|
|
2960
|
+
job.sandbox.commandLogBase = commandLogOffset(dirPath, 0);
|
|
2961
|
+
writeJobFile(jobFilePath, job);
|
|
2962
|
+
writeFileSync(join(dirPath, "command.log"), "", { flag: "a", mode: RUNNER_FILE_MODE });
|
|
2963
|
+
await startSandboxCommand({ job, cmdline, runtime: runtimeOf(state), config: state.config, extraEnv: commandEnv });
|
|
2964
|
+
} else if (job.microvm !== void 0) {
|
|
2878
2965
|
const runtime = runtimeOf(state);
|
|
2879
2966
|
if (job.microvm.jailed !== void 0 && (job.microvm.fdStore?.length ?? 0) > 0) {
|
|
2880
2967
|
job.microvm.tracking = "microvm";
|
|
@@ -2915,7 +3002,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
2915
3002
|
const commandStartedMs = nowOf(state).getTime();
|
|
2916
3003
|
active.commandStartedMs = commandStartedMs;
|
|
2917
3004
|
log.line(
|
|
2918
|
-
running !== void 0 ? `${tag} command started \xB7 pid ${running.pid}` : job.container !== void 0 ? `${tag} command started \xB7 in container ${job.container.container}` : `${tag} command started \xB7 in microVM build ${job.microvm.buildId}`
|
|
3005
|
+
running !== void 0 ? `${tag} command started \xB7 pid ${running.pid}` : job.sandbox !== void 0 ? `${tag} command started \xB7 in sandbox ${job.sandbox.sandboxId}` : job.container !== void 0 ? `${tag} command started \xB7 in container ${job.container.container}` : `${tag} command started \xB7 in microVM build ${job.microvm.buildId}`
|
|
2919
3006
|
);
|
|
2920
3007
|
const sender = await startSender({
|
|
2921
3008
|
config: state.config,
|
|
@@ -3017,14 +3104,14 @@ async function endOnProvisionFailure(state, active, tokens, took, reason) {
|
|
|
3017
3104
|
function installCommitHooks(job, log, tag) {
|
|
3018
3105
|
const identity = job.commitIdentity;
|
|
3019
3106
|
if (identity?.coAuthor === void 0) return;
|
|
3020
|
-
const buildDir2 = job.container?.buildDir ?? job.microvm?.buildDir ?? (job.build.exec === void 0 ? job.build.buildDir : void 0);
|
|
3107
|
+
const buildDir2 = job.container?.buildDir ?? job.sandbox?.container.buildDir ?? job.microvm?.buildDir ?? (job.build.exec === void 0 ? job.build.buildDir : void 0);
|
|
3021
3108
|
if (buildDir2 === void 0) {
|
|
3022
3109
|
log.line(`${tag} the build runs through an exec, so its commits are not given a co-author line`);
|
|
3023
3110
|
return;
|
|
3024
3111
|
}
|
|
3025
3112
|
try {
|
|
3026
3113
|
const dir = writeCommitHooks(buildDir2, identity.coAuthor);
|
|
3027
|
-
identity.hooksPath = job.container === void 0 && job.microvm === void 0 ? dir : `${JOB_MOUNT}/${HOOKS_DIR_NAME}`;
|
|
3114
|
+
identity.hooksPath = job.container === void 0 && job.microvm === void 0 && job.sandbox === void 0 ? dir : `${JOB_MOUNT}/${HOOKS_DIR_NAME}`;
|
|
3028
3115
|
} catch (err) {
|
|
3029
3116
|
log.error(`${tag} could not write the commit hooks: ${describeCallFailure(err)} \xB7 continuing without a co-author line`);
|
|
3030
3117
|
}
|
|
@@ -3097,6 +3184,7 @@ async function renewLeaseIfDue(state, active, nowMs) {
|
|
|
3097
3184
|
writeJobFile(join(active.dirPath, "job.json"), active.job);
|
|
3098
3185
|
log.line(`${tag} lease renewed \xB7 expires ${formatClock(new Date(nowMs + LEASE_SECONDS * 1e3), new Date(nowMs))}`);
|
|
3099
3186
|
if (active.job.container !== void 0) state.containerRuntime?.leases.get(active.job.container.buildId)?.publish();
|
|
3187
|
+
if (active.job.sandbox !== void 0) state.containerRuntime?.leases.get(active.job.sandbox.buildId)?.publish();
|
|
3100
3188
|
if (active.job.microvm !== void 0) state.containerRuntime?.leases.get(active.job.microvm.buildId)?.publish();
|
|
3101
3189
|
} else {
|
|
3102
3190
|
log.error(`${tag} renew did not land \xB7 retrying in ${RENEW_INTERVAL_SECONDS / 60}m`);
|
|
@@ -3192,7 +3280,8 @@ async function sampleUsage(state, active) {
|
|
|
3192
3280
|
}
|
|
3193
3281
|
async function probeBuild(state, active) {
|
|
3194
3282
|
const container = active.job.container;
|
|
3195
|
-
const
|
|
3283
|
+
const own = active.job.sandbox;
|
|
3284
|
+
const tracked = own !== void 0 && isSandboxTracked(active.job) ? own : container !== void 0 && isContainerTracked(active.job) ? container : isMicroVmTracked(active.job) ? active.job.microvm : void 0;
|
|
3196
3285
|
if (tracked === void 0 || active.ending || active.probing) return;
|
|
3197
3286
|
active.probing = true;
|
|
3198
3287
|
const log = logOf(state);
|
|
@@ -3201,9 +3290,16 @@ async function probeBuild(state, active) {
|
|
|
3201
3290
|
const runtime = runtimeOf(state);
|
|
3202
3291
|
for (; ; ) {
|
|
3203
3292
|
const offset = commandLogOffset(active.dirPath, tracked.commandLogBase);
|
|
3204
|
-
const probe = container === void 0 ? await probeMicroVmCommand(runtime, active.job.microvm, offset) : await probeCommand(runtime, container, offset);
|
|
3293
|
+
const probe = own !== void 0 ? await probeSandboxCommand(runtime, own, offset) : container === void 0 ? await probeMicroVmCommand(runtime, active.job.microvm, offset) : await probeCommand(runtime, container, offset);
|
|
3205
3294
|
if (active.ending) return;
|
|
3206
3295
|
if (probe === void 0) {
|
|
3296
|
+
if (own !== void 0) {
|
|
3297
|
+
if (active.probeFailing !== true) {
|
|
3298
|
+
active.probeFailing = true;
|
|
3299
|
+
log.error(`${tag} the build's command could not be read from its sandbox \xB7 trying again`);
|
|
3300
|
+
}
|
|
3301
|
+
return;
|
|
3302
|
+
}
|
|
3207
3303
|
if (container === void 0) {
|
|
3208
3304
|
await endOrWaitForMicroVm(state, active);
|
|
3209
3305
|
return;
|
|
@@ -3232,7 +3328,12 @@ async function probeBuild(state, active) {
|
|
|
3232
3328
|
return;
|
|
3233
3329
|
}
|
|
3234
3330
|
} catch (err) {
|
|
3235
|
-
|
|
3331
|
+
if (err instanceof SandboxGoneError) {
|
|
3332
|
+
log.error(`${tag} ${err.message} \xB7 ending job as interrupted`);
|
|
3333
|
+
void endJob(state, active, "interrupted", { stage: "command", reason: err.message });
|
|
3334
|
+
} else {
|
|
3335
|
+
log.error(`${tag} reading the build's command failed: ${describeCallFailure(err)}`);
|
|
3336
|
+
}
|
|
3236
3337
|
} finally {
|
|
3237
3338
|
active.probing = false;
|
|
3238
3339
|
}
|
|
@@ -3274,7 +3375,7 @@ async function watchTick(state, active, nowMs, logMtimeMs) {
|
|
|
3274
3375
|
return;
|
|
3275
3376
|
}
|
|
3276
3377
|
if (!await renewLeaseIfDue(state, active, nowMs)) return;
|
|
3277
|
-
const tokens = active.job
|
|
3378
|
+
const tokens = !isIsolatedJob(active.job) ? void 0 : runtimeOf(state).credentials.get(active.dirPath);
|
|
3278
3379
|
if (tokens !== void 0) {
|
|
3279
3380
|
await tokens.renewReadIfDue();
|
|
3280
3381
|
const refusal = tokens.refusal();
|
|
@@ -3289,7 +3390,8 @@ async function watchTick(state, active, nowMs, logMtimeMs) {
|
|
|
3289
3390
|
return;
|
|
3290
3391
|
}
|
|
3291
3392
|
}
|
|
3292
|
-
const
|
|
3393
|
+
const relayBuildId = active.job.container?.buildId ?? active.job.sandbox?.buildId;
|
|
3394
|
+
const unreachable = relayBuildId === void 0 ? void 0 : runtimeOf(state).relayFatal.get(relayBuildId);
|
|
3293
3395
|
if (unreachable !== void 0) {
|
|
3294
3396
|
log.error(`${tag} ${unreachable} \xB7 ending job as failed`);
|
|
3295
3397
|
await endJob(state, active, "failed", { stage: started ? "command" : "provision", reason: unreachable });
|
|
@@ -3663,7 +3765,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
3663
3765
|
check: update.check ? () => update.check(configPath) : async () => {
|
|
3664
3766
|
const held = runnerAgents(deps.agents).flatMap((agent) => heldAgentCredential(agent.descriptor.id) ?? []);
|
|
3665
3767
|
const env = { ...process.env, ...Object.fromEntries(held.map((credential) => [credential.variable, credential.value])) };
|
|
3666
|
-
return (await import('./check-
|
|
3768
|
+
return (await import('./check-LENGOFUF.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
|
|
3667
3769
|
},
|
|
3668
3770
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
3669
3771
|
log
|
|
@@ -3689,9 +3791,10 @@ async function startRunner(configPath, deps, startup) {
|
|
|
3689
3791
|
check = "host-key";
|
|
3690
3792
|
await ensureHostKey(configPath);
|
|
3691
3793
|
check = "identity";
|
|
3692
|
-
|
|
3794
|
+
const providerKind = builtinKind(config.hooks.provision);
|
|
3795
|
+
if (providerKind === "container" || providerKind === "vm" || providerKind === "sandbox") {
|
|
3693
3796
|
await ensureRunnerIdentity(configPath, {
|
|
3694
|
-
docker: deps.runnerIdentity ?? identityDockerFor({ keepsHostBuilder: keepsHostBuilder(config, deps.blocked?.builderDiskPinned) }) ?? (deps.container?.host === void 0 ? void 0 : { holdsObjects: async () => false }),
|
|
3797
|
+
docker: providerKind === "sandbox" ? { holdsObjects: async () => false } : deps.runnerIdentity ?? identityDockerFor({ keepsHostBuilder: keepsHostBuilder(config, deps.blocked?.builderDiskPinned) }) ?? (deps.container?.host === void 0 ? void 0 : { holdsObjects: async () => false }),
|
|
3695
3798
|
log: (line) => log.error(line)
|
|
3696
3799
|
}).catch((err) => log.error(`the runner's Docker identity could not be stored: ${describeCallFailure(err)} \xB7 using the names its folder's path gives`));
|
|
3697
3800
|
}
|
|
@@ -3765,6 +3868,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
3765
3868
|
return [];
|
|
3766
3869
|
});
|
|
3767
3870
|
for (const buildId of sweptBuilders) log.line(`removed builder microVM ${buildId}, left by an earlier runner`);
|
|
3871
|
+
if (isBuiltinSandbox(config.hooks.provision)) await sweepOwnSandboxes(state);
|
|
3768
3872
|
const attemptLogs = attemptLogsOf(state);
|
|
3769
3873
|
for (const { job, format } of listUnreadableJobs(jobsDir(configPath))) {
|
|
3770
3874
|
log.error(`leaving job ${job.queue} ${itemTag(job)} alone: its job-state format ${format} is not one this version reads`);
|
|
@@ -3814,7 +3918,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
3814
3918
|
let pollTimer = fleetPoller === void 0 ? setInterval(() => void tick(state), state.pollTimerSeconds * 1e3) : void 0;
|
|
3815
3919
|
fleetPoller?.start();
|
|
3816
3920
|
const hooksKind = builtinKind(config.hooks.provision);
|
|
3817
|
-
const housekeepingTimer = hooksKind === "container" || hooksKind === "vm" ? (() => {
|
|
3921
|
+
const housekeepingTimer = hooksKind === "container" || hooksKind === "vm" || hooksKind === "sandbox" ? (() => {
|
|
3818
3922
|
const everyMs = deps.housekeeping?.intervalMs ?? HOUSEKEEPING_INTERVAL_MS;
|
|
3819
3923
|
void housekeepingPass(state);
|
|
3820
3924
|
return setInterval(() => void housekeepingPass(state), everyMs);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { keyRunnerFactory, RunnerConfigError } from './chunk-
|
|
4
|
-
import { orgHomeDir } from './chunk-
|
|
3
|
+
import { keyRunnerFactory, RunnerConfigError } from './chunk-UF3YTRGU.js';
|
|
4
|
+
import { orgHomeDir } from './chunk-YZ5M7S7U.js';
|
|
5
5
|
|
|
6
6
|
createRequire(import.meta.url);
|
|
7
7
|
|