@outerlayer/cli 0.38.0-next.20261111182110 → 0.38.0-next.20261111231234
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 +4 -0
- package/dist/agent-setup-3GY4FFSC.js +40 -0
- package/dist/{agent-subcommand-NZFPV3MV.js → agent-subcommand-VDN4AFAJ.js} +5 -5
- package/dist/{artifact-link-cmd-L4BXSQQP.js → artifact-link-cmd-A7SROEQS.js} +2 -2
- package/dist/{bridge-OBIGQXDH.js → bridge-QUQYCBQN.js} +8 -8
- package/dist/{build-4IYEB6OE.js → build-SD44TP2B.js} +14 -14
- package/dist/{build-disk-2MOEPIZF.js → build-disk-4PCVGMAT.js} +12 -12
- package/dist/build-info.json +1 -1
- package/dist/{builder-SVI2D35R.js → builder-JG2DHKSN.js} +11 -11
- package/dist/caller-A2K7SLSL.js +23 -0
- package/dist/{check-XIJ2MOWV.js → check-JNQVYVHI.js} +58 -58
- package/dist/{chunk-QHYCF36K.js → chunk-26BFN6DH.js} +1 -1
- package/dist/{chunk-3YJJ2JDV.js → chunk-2UCTMANO.js} +1 -1
- package/dist/{chunk-MOA4PGYL.js → chunk-2VJVPP5Y.js} +1 -1
- package/dist/{chunk-KA4BMGBR.js → chunk-3C23ZPWR.js} +2 -2
- package/dist/{chunk-TH3K67SR.js → chunk-3T7PXUHN.js} +9 -9
- package/dist/{chunk-ZC2BXXKB.js → chunk-3VWX5BYV.js} +17 -16
- package/dist/{chunk-36XB56GG.js → chunk-43R7JHQI.js} +5 -5
- package/dist/{chunk-SIGBRVEF.js → chunk-4FHDVWKO.js} +18 -5
- package/dist/{chunk-MOFT7QCR.js → chunk-4T2NBVC4.js} +5 -5
- package/dist/{chunk-6FQSV7ZK.js → chunk-5NK2KKG6.js} +3 -3
- package/dist/{chunk-NEXKR5RR.js → chunk-5NVF5TAL.js} +6 -1
- package/dist/{chunk-6GZL5RIV.js → chunk-5OSY3LK3.js} +30 -13
- package/dist/{chunk-OKAAVLLW.js → chunk-5TMM2K23.js} +4 -4
- package/dist/{chunk-PBHAM73F.js → chunk-5UFAWMET.js} +3 -3
- package/dist/{chunk-KR34GXEH.js → chunk-6FB7NTJK.js} +1 -1
- package/dist/{chunk-VNHCN75M.js → chunk-6X2BSMRM.js} +1 -1
- package/dist/{chunk-JDOEEKPN.js → chunk-722KABMV.js} +25 -9
- package/dist/{chunk-IN7QCBO5.js → chunk-7DIYEB3X.js} +6 -6
- package/dist/{chunk-6XORUAR7.js → chunk-7GJEQXOH.js} +1 -1
- package/dist/{chunk-J345NEVJ.js → chunk-A4NWDCWS.js} +5 -5
- package/dist/{chunk-LW5RIKAV.js → chunk-B2SHUO6J.js} +1 -1
- package/dist/{chunk-UWLCJZ45.js → chunk-BBRXFXBB.js} +1 -1
- package/dist/{chunk-3SHX2D37.js → chunk-BJIJYPGC.js} +5 -5
- package/dist/{chunk-N3KGXHV4.js → chunk-BUT777XB.js} +1 -1
- package/dist/{chunk-XAVR7JHO.js → chunk-C4R6LMPQ.js} +10 -10
- package/dist/{chunk-BECC4325.js → chunk-DLUBSTLW.js} +8 -8
- package/dist/{chunk-DKRZZBKI.js → chunk-DZFIRKDZ.js} +3 -3
- package/dist/{chunk-TMROYEP4.js → chunk-ECNWHXIO.js} +4 -4
- package/dist/{chunk-NFPJ2XC2.js → chunk-EJ7ZXBXS.js} +3 -3
- package/dist/{chunk-ATEMEVFF.js → chunk-ELPP5OHC.js} +1 -1
- package/dist/{chunk-6BXJESQF.js → chunk-ERG3WCEC.js} +9 -9
- package/dist/{chunk-QBJ7MMOT.js → chunk-EUHUIIGT.js} +16 -5
- package/dist/{chunk-FQPGZOH3.js → chunk-FUZEOWF4.js} +1 -1
- package/dist/{chunk-ZQII2ZRP.js → chunk-I5U6CFH4.js} +1 -1
- package/dist/{chunk-WV4T6ZOQ.js → chunk-I62FX622.js} +2 -2
- package/dist/{chunk-ORLJK7UT.js → chunk-IGBPPM7F.js} +7 -7
- package/dist/{chunk-36M66QKN.js → chunk-J6KKJGR7.js} +2 -1
- package/dist/{chunk-DULO2L5B.js → chunk-JIANCWJ3.js} +1 -1
- package/dist/{chunk-6XMC6R4W.js → chunk-KVWFAAAQ.js} +1 -1
- package/dist/{chunk-USINHGZI.js → chunk-KZU5WQK5.js} +3 -3
- package/dist/{chunk-I45HTSSA.js → chunk-LVELQ635.js} +1 -1
- package/dist/{chunk-RHPEAVKR.js → chunk-MVERFCX4.js} +1 -1
- package/dist/{chunk-BIMHESZG.js → chunk-N6BNN6ZD.js} +1 -1
- package/dist/{chunk-AJ3YUM23.js → chunk-NDQC2WUJ.js} +1 -1
- package/dist/{chunk-ABRGN5OA.js → chunk-NO4N4D32.js} +4 -4
- package/dist/{chunk-33XLQIV4.js → chunk-NRDFBOKE.js} +3 -3
- package/dist/{chunk-LVNMKOWI.js → chunk-OAPWDSBW.js} +2 -2
- package/dist/{chunk-CT4PKI24.js → chunk-OTWTUHWY.js} +339 -113
- package/dist/{chunk-UPUHL3KC.js → chunk-OYRAQXRQ.js} +7 -7
- package/dist/{chunk-DKTXQ7XQ.js → chunk-PCGU6T7J.js} +2 -2
- package/dist/{chunk-OPCFOIZJ.js → chunk-POBH5YCG.js} +1 -1
- package/dist/{chunk-LKLP5YMH.js → chunk-Q7J4T2VP.js} +7 -7
- package/dist/{chunk-PDPBWX67.js → chunk-QYLBGMTA.js} +17 -6
- package/dist/{chunk-3Z5KBFBB.js → chunk-RCK2MJRG.js} +2 -2
- package/dist/{chunk-F3RBGMHL.js → chunk-RUX4M4AX.js} +1 -1
- package/dist/{chunk-QENFVQ7O.js → chunk-SFSE6YDX.js} +56 -16
- package/dist/{chunk-NJ6IJFKR.js → chunk-SLORYOL4.js} +1 -1
- package/dist/{chunk-QH5NV7EQ.js → chunk-T4FSZ7LA.js} +7 -7
- package/dist/{chunk-4G5SYPK2.js → chunk-UXARYJQ4.js} +1 -1
- package/dist/{chunk-CZDYUKA6.js → chunk-VBSKVGWP.js} +7 -7
- package/dist/{chunk-D5GR3U2O.js → chunk-VRDHLSR2.js} +10 -10
- package/dist/{chunk-AMFCM4H7.js → chunk-VV445Q2R.js} +3 -3
- package/dist/{chunk-UKEJBA5Y.js → chunk-W7BF2RXV.js} +4 -4
- package/dist/{chunk-7GUD2FIF.js → chunk-WFYKTAXZ.js} +1 -1
- package/dist/{chunk-4AEOP5PD.js → chunk-WG5OBUIZ.js} +6 -6
- package/dist/{chunk-IHM7K6RS.js → chunk-Y25ONBS6.js} +4 -4
- package/dist/{chunk-BATSP67Z.js → chunk-Y5S6EUGK.js} +6 -6
- package/dist/{chunk-6YOXYZC2.js → chunk-YZVNZWKD.js} +7 -7
- package/dist/{chunk-CAQSGGPJ.js → chunk-Z42UKOZ6.js} +6 -6
- package/dist/{chunk-SASWFX22.js → chunk-Z7XFVFW2.js} +1 -1
- package/dist/{chunk-3BEMKOFH.js → chunk-ZCX43KZ5.js} +1 -1
- package/dist/{chunk-VQ6ZKSNL.js → chunk-ZH5YLKO6.js} +1 -1
- package/dist/{chunk-QMCWSBQO.js → chunk-ZJHWXRT4.js} +2 -2
- package/dist/{chunk-DE3NQAR7.js → chunk-ZU6LNR3G.js} +3 -3
- package/dist/{chunk-R3S2A7YF.js → chunk-ZUUA6ZGD.js} +97 -49
- package/dist/{claude-launcher-GIT7VNYK.js → claude-launcher-5ALZD5WD.js} +8 -8
- package/dist/{cli-Y5CRBNQQ.js → cli-OUL7NQWX.js} +172 -162
- package/dist/{cli-update-notice-OC4SOSZE.js → cli-update-notice-XZ7I7OWP.js} +2 -2
- package/dist/{command-2RX7FULE.js → command-ASXZLHXU.js} +53 -53
- package/dist/config-5KMNGNK5.js +22 -0
- package/dist/{connect-cmd-DSP6HJRP.js → connect-cmd-XR7XPGQ6.js} +15 -15
- package/dist/{container-start-DFFZVSGX.js → container-start-6FHPPHMU.js} +51 -51
- package/dist/{context-cleanup-FIQMPC6F.js → context-cleanup-HHMQV7KH.js} +5 -5
- package/dist/{context-show-cmd-BPZX3OUE.js → context-show-cmd-4EKSCIF4.js} +16 -16
- package/dist/{control-plane-launch-IIHRG233.js → control-plane-launch-AJPCKLBL.js} +16 -16
- package/dist/{demo-record-cmd-PI7QDFRP.js → demo-record-cmd-LVZOYPR7.js} +9 -9
- package/dist/{demo-voice-cmd-CMCPERTJ.js → demo-voice-cmd-DT6VFD2U.js} +22 -22
- package/dist/{dist-JSSJSW2B.js → dist-7JDEWP5U.js} +2 -2
- package/dist/docker-T7A6GZDD.js +20 -0
- package/dist/{doctor-ZVHGEA3C.js → doctor-FATFZWEA.js} +53 -53
- package/dist/emit-artifact-cmd-B5ZYJKFM.js +44 -0
- package/dist/{emit-cmd-QGVMVSLS.js → emit-cmd-P2XWWVFP.js} +8 -8
- package/dist/emit-criteria-cmd-RHFJYNSU.js +35 -0
- package/dist/{emit-demo-cmd-KLYEKCB3.js → emit-demo-cmd-WELKVLD4.js} +22 -22
- package/dist/{emit-finding-cmd-FZWK3Y4Q.js → emit-finding-cmd-KRNEWZQP.js} +18 -18
- package/dist/{emit-result-cmd-TODAXDFJ.js → emit-result-cmd-NQ6LAE4Z.js} +20 -20
- package/dist/{emit-step-cmd-QI52ZB57.js → emit-step-cmd-HKOYFSYL.js} +18 -18
- package/dist/{exec-client-YQCKCZGW.js → exec-client-2JSXFMEW.js} +9 -9
- package/dist/find-unit-3QYPTK6A.js +24 -0
- package/dist/{findings-cmd-O7I2GKRO.js → findings-cmd-EF4QXYRT.js} +18 -18
- package/dist/{fleet-readiness-BY7PY5FF.js → fleet-readiness-NBYN45IT.js} +16 -16
- package/dist/governing-source-C7MY7KB2.js +41 -0
- package/dist/guest-init-FX2NUAW6.js +20 -0
- package/dist/{hook-fast-3BGU6BF2.js → hook-fast-JZKCKSXB.js} +3 -3
- package/dist/{hook-install-6H6W4UM2.js → hook-install-R66RP7ME.js} +5 -5
- package/dist/host-checks-CZGNR4VC.js +80 -0
- package/dist/host-key-ACYKDZ4X.js +18 -0
- package/dist/{image-tag-IJKYPT6D.js → image-tag-H5CZTC42.js} +9 -9
- package/dist/index.js +4 -4
- package/dist/{init-65RN5X55.js → init-5S6A2SYN.js} +49 -49
- package/dist/init-WDYDTJW2.js +80 -0
- package/dist/{init-agent-R4ZOEFI3.js → init-agent-PJFH7OFD.js} +49 -49
- package/dist/{init-cmd-L4EFMAQ4.js → init-cmd-5SCU7AVL.js} +29 -29
- package/dist/{init-update-ACLVXFS7.js → init-update-NXDPWHK6.js} +26 -26
- package/dist/install-cmd-TMUNQF7U.js +21 -0
- package/dist/{layout-MBCG2IHB.js → layout-LTYJDJ5J.js} +5 -5
- package/dist/{login-browser-COSWHZEC.js → login-browser-LSZKECIB.js} +2 -2
- package/dist/{logs-VX2SXLJH.js → logs-ZEXFSBVF.js} +8 -8
- package/dist/loop-Q76PDO7L.js +90 -0
- package/dist/machine-GI6SZMEK.js +80 -0
- package/dist/{machine-skills-RPKQK52T.js → machine-skills-CYCZGBAM.js} +5 -5
- package/dist/{mcp-install-cmd-GN2K2JM3.js → mcp-install-cmd-TVIOPOIO.js} +5 -5
- package/dist/{mcp-serve-cmd-P34CQIBX.js → mcp-serve-cmd-OCQLRUAK.js} +11 -11
- package/dist/{paths-HV3G2EHE.js → paths-IB5XFML7.js} +8 -8
- package/dist/pending-TX4VIF6P.js +18 -0
- package/dist/{pidfile-4ZG5I7ZR.js → pidfile-VET4I455.js} +9 -9
- package/dist/{record-3XWPD2UP.js → record-3V3HQRGY.js} +9 -9
- package/dist/{relay-ZOWT4YLQ.js → relay-V7LX2WR6.js} +6 -6
- package/dist/{relay-protocol-FDFEVLQT.js → relay-protocol-QGEWESBF.js} +6 -6
- package/dist/{run-cmd-ZVNOKJB3.js → run-cmd-M5THCWDD.js} +18 -18
- package/dist/{runner-agents-3NUGNJD6.js → runner-agents-OTYZ73WU.js} +5 -5
- package/dist/runner-env-3QPJQ2H2.js +24 -0
- package/dist/{runner-identity-F2Z3TXJ7.js → runner-identity-GTWFQEIN.js} +11 -11
- package/dist/{runner-key-AOK7W733.js → runner-key-ZXNXWBSP.js} +49 -49
- package/dist/{session-sender-V3INPB34.js → session-sender-AEUNLU5R.js} +21 -21
- package/dist/{spec-cmd-LYGXRFVY.js → spec-cmd-4EB45ELL.js} +109 -22
- package/dist/{starter-pack-7QA7J5FT.js → starter-pack-HMJWEIVX.js} +6 -6
- package/dist/state-O3A3CIDQ.js +18 -0
- package/dist/{status-SPPT7WU5.js → status-R4JD34DO.js} +49 -49
- package/dist/{sync-cmd-EDSOKOXS.js → sync-cmd-2HOFZYI6.js} +20 -20
- package/dist/update-steps-CGWJJ2IA.js +81 -0
- package/dist/{watch-GBDNXFAK.js → watch-ZY62C5WB.js} +20 -20
- package/dist/{work-claim-cmd-SHKDYS7J.js → work-claim-cmd-4KQYRNRC.js} +27 -27
- package/dist/work-cmd-GNYWSA2O.js +33 -0
- package/dist/work-comment-cmd-7D3DHQ3O.js +39 -0
- package/dist/{work-demo-cmd-YJ654BQP.js → work-demo-cmd-PDILNMRF.js} +18 -18
- package/dist/{work-logs-cmd-RUNYYALP.js → work-logs-cmd-ER3AYV62.js} +18 -18
- package/dist/{work-needs-attention-cmd-NRDFGJPP.js → work-needs-attention-cmd-MAFPEANV.js} +18 -18
- package/dist/{work-no-change-cmd-FDA7PYB7.js → work-no-change-cmd-GDN5EE6N.js} +18 -18
- package/dist/{work-open-pr-cmd-LEWPNTW5.js → work-open-pr-cmd-56TRIE5I.js} +19 -19
- package/dist/work-pr-cmd-W3T6ELML.js +34 -0
- package/dist/{work-proofs-cmd-QKIEJJRF.js → work-proofs-cmd-Y2OMM37N.js} +20 -20
- package/dist/{work-proofs-record-2M4A5OIF.js → work-proofs-record-I2VLOMRD.js} +26 -26
- package/dist/{work-stop-cmd-HH2SSJIO.js → work-stop-cmd-PREZOSNY.js} +18 -18
- package/package.json +3 -3
- package/skill-pack/maintained/outerlayer-amend/references/threads.md +10 -4
- package/skill-pack/maintained/outerlayer-build/SKILL.md +8 -0
- package/skill-pack/maintained/outerlayer-build/references/agent-briefs.md +1 -1
- package/skill-pack/maintained/outerlayer-build/references/code-review-judge.md +15 -5
- package/skill-pack/maintained/outerlayer-revise/SKILL.md +68 -0
- package/skill-pack/maintained/outerlayer-spec/SKILL.md +149 -0
- package/skill-pack/maintained/outerlayer-spec/references/revise-an-issue.md +14 -0
- package/skill-pack/shipped.json +1 -0
- package/skill-pack/template/spec/SKILL.md +5 -120
- package/dist/agent-setup-U4XTZO56.js +0 -40
- package/dist/caller-PW7R46M7.js +0 -23
- package/dist/config-AOOR5BPQ.js +0 -22
- package/dist/docker-6MPPSTR4.js +0 -20
- package/dist/emit-artifact-cmd-VJ3C36RU.js +0 -44
- package/dist/emit-criteria-cmd-UOHOOSVV.js +0 -35
- package/dist/find-unit-YT25OH3F.js +0 -24
- package/dist/governing-source-XRLJFSPE.js +0 -41
- package/dist/guest-init-X2HLNETS.js +0 -20
- package/dist/host-checks-U5JKQQMM.js +0 -80
- package/dist/host-key-KQ6JWRB4.js +0 -18
- package/dist/init-CYTHJSTQ.js +0 -80
- package/dist/install-cmd-DHIVJEBO.js +0 -21
- package/dist/loop-4ATDJGQV.js +0 -90
- package/dist/machine-UIA7MN3U.js +0 -80
- package/dist/pending-I2EJ7TMY.js +0 -18
- package/dist/runner-env-JS2WDB5L.js +0 -24
- package/dist/state-64OMLIN4.js +0 -18
- package/dist/update-steps-XPEATLFQ.js +0 -81
- package/dist/work-cmd-QR62TX6Q.js +0 -33
- package/dist/work-comment-cmd-DUDVMT6U.js +0 -39
- package/dist/work-pr-cmd-Y4O34WDA.js +0 -34
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
|
|
4
|
-
import { reportFailedStart, fitImageBuildMemory } from './chunk-
|
|
4
|
+
import { reportFailedStart, fitImageBuildMemory } from './chunk-T4FSZ7LA.js';
|
|
5
5
|
import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-E7R2GIAW.js';
|
|
6
|
-
import { writeFleetState } from './chunk-
|
|
7
|
-
import { writePendingUpdate } from './chunk-
|
|
8
|
-
import { renderUpdateSteps } from './chunk-
|
|
9
|
-
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-
|
|
10
|
-
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-
|
|
11
|
-
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-
|
|
12
|
-
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, itemTag, releaseLease, runIsolation, runCommandOf, claimRun, LEASE_SECONDS, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, recordsProofsOnly, 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, vmAlive, filesAreCopied, inSandbox, listItemDisks, usableCpus, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewRun, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, sweepSandboxes, keptSandboxIds, parseCpuList, ensureTunnel, keepGhConfigCurrent, restartSender, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, shellQuote, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, writeGuestGhConfig, deliverJobFiles, inTeardown } from './chunk-
|
|
13
|
-
import { RUNNER_PROTOCOL } from './chunk-
|
|
14
|
-
import { RUNNER_RESERVE_BYTES } from './chunk-
|
|
15
|
-
import { RepoFilter } from './chunk-
|
|
6
|
+
import { writeFleetState } from './chunk-6X2BSMRM.js';
|
|
7
|
+
import { writePendingUpdate } from './chunk-WFYKTAXZ.js';
|
|
8
|
+
import { renderUpdateSteps } from './chunk-VV445Q2R.js';
|
|
9
|
+
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-2UCTMANO.js';
|
|
10
|
+
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-C4R6LMPQ.js';
|
|
11
|
+
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-POBH5YCG.js';
|
|
12
|
+
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, itemTag, releaseLease, runIsolation, runCommandOf, claimRun, LEASE_SECONDS, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, restoreSessionIntoSandbox, recordsProofsOnly, 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, vmAlive, filesAreCopied, inSandbox, listItemDisks, usableCpus, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewRun, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, sweepSandboxes, keptSandboxIds, parseCpuList, ensureTunnel, keepGhConfigCurrent, restartSender, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, shellQuote, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, writeGuestGhConfig, deliverJobFiles, inTeardown } from './chunk-OTWTUHWY.js';
|
|
13
|
+
import { RUNNER_PROTOCOL } from './chunk-KVWFAAAQ.js';
|
|
14
|
+
import { RUNNER_RESERVE_BYTES } from './chunk-WG5OBUIZ.js';
|
|
15
|
+
import { RepoFilter } from './chunk-3T7PXUHN.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-UXARYJQ4.js';
|
|
18
18
|
import { isVersion, compareVersions, satisfiesRange } from './chunk-TQMI335S.js';
|
|
19
|
-
import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls, configForJob } from './chunk-
|
|
20
|
-
import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-
|
|
19
|
+
import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls, configForJob } from './chunk-RCK2MJRG.js';
|
|
20
|
+
import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-NDQC2WUJ.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 {
|
|
24
|
-
import { keyRunnerFactory, isBuiltinSandbox, 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, runnerLabelValue, builderName, ensureFailureCount, builderSpec, ensureBuilder, spawnRun } from './chunk-
|
|
27
|
-
import { loadHostKey, ensureHostKey, signerFor } from './chunk-
|
|
28
|
-
import { RUNNER_DIR_MODE, runnerDir, RUNNER_FILE_MODE, buildDir, attemptStamp, jobDir, jobsDir, pidFilePath, storeScopes, imagesDir } from './chunk-
|
|
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 { cleanAttachmentName } from './chunk-
|
|
32
|
-
import { jobAgent, jobCommandEnv, runnerAgents } from './chunk-
|
|
22
|
+
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-VBSKVGWP.js';
|
|
23
|
+
import { WorkCommandError, isSignatureRefusal, getJson, postJson, getBytes } from './chunk-5OSY3LK3.js';
|
|
24
|
+
import { keyRunnerFactory, isBuiltinSandbox, isBuiltinContainer, isBuiltinVm, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, runnerDeliversComments, readOnlyRemoteOf, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS, readOnlyOption } from './chunk-EUHUIIGT.js';
|
|
25
|
+
import { allocatedBytes, freeBytes, formatBytes } from './chunk-3C23ZPWR.js';
|
|
26
|
+
import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, exceedsDisk, runnerLabelValue, builderName, ensureFailureCount, builderSpec, ensureBuilder, spawnRun } from './chunk-ERG3WCEC.js';
|
|
27
|
+
import { loadHostKey, ensureHostKey, signerFor } from './chunk-I5U6CFH4.js';
|
|
28
|
+
import { RUNNER_DIR_MODE, runnerDir, RUNNER_FILE_MODE, buildDir, attemptStamp, jobDir, jobsDir, pidFilePath, storeScopes, imagesDir } from './chunk-JIANCWJ3.js';
|
|
29
|
+
import { parseClaimIdentity, parseBranchlessRepositories, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, JOB_MOUNT } from './chunk-4FHDVWKO.js';
|
|
30
|
+
import { jobCredentialProblem, COMMAND_LOST_REASON, takeAgentCredentials, heldAgentCredential, CONTAINER_STOPPED_REASON, currentAgentCredential, fdName } from './chunk-EJ7ZXBXS.js';
|
|
31
|
+
import { cleanAttachmentName } from './chunk-W7BF2RXV.js';
|
|
32
|
+
import { jobAgent, jobCommandEnv, runnerAgents } from './chunk-J6KKJGR7.js';
|
|
33
|
+
import { defaultAgents } from './chunk-QYLBGMTA.js';
|
|
33
34
|
import { resolveVersion } from './chunk-RA3O54FC.js';
|
|
34
35
|
import { mkdirSync, existsSync, writeFileSync, chmodSync, renameSync, statSync, readdirSync, readFileSync, rmSync, closeSync } from 'fs';
|
|
35
36
|
import { join, dirname } from 'path';
|
|
@@ -159,7 +160,7 @@ function parseClaim(value) {
|
|
|
159
160
|
if (typeof value !== "object" || Array.isArray(value)) return { malformed: true };
|
|
160
161
|
const data = value;
|
|
161
162
|
const { id, kind, workItemId, number, appId, organizationId, size } = data;
|
|
162
|
-
if (typeof id !== "string" || id === "" || kind !== "implement" && kind !== "amend" || typeof workItemId !== "string" || workItemId === "" || typeof number !== "number" || !Number.isInteger(number) || typeof appId !== "string" || appId === "" || typeof organizationId !== "string" || organizationId === "" || size !== "small" && size !== "large") {
|
|
163
|
+
if (typeof id !== "string" || id === "" || kind !== "implement" && kind !== "amend" && kind !== "revise" || typeof workItemId !== "string" || workItemId === "" || typeof number !== "number" || !Number.isInteger(number) || typeof appId !== "string" || appId === "" || typeof organizationId !== "string" || organizationId === "" || size !== "small" && size !== "large") {
|
|
163
164
|
return {
|
|
164
165
|
malformed: true,
|
|
165
166
|
...typeof workItemId === "string" && workItemId !== "" ? { workItemId } : {},
|
|
@@ -1211,6 +1212,25 @@ async function judgeMicroVmAdoption(input) {
|
|
|
1211
1212
|
return names2.length > 0 && names2.every((name) => inherited.has(name)) ? "adopt" : "unservable";
|
|
1212
1213
|
}
|
|
1213
1214
|
|
|
1215
|
+
// src/runner/revise-job.ts
|
|
1216
|
+
var REVISE_PROMPT = "/outerlayer-revise";
|
|
1217
|
+
function reviseCommandOf(config, agents = defaultAgents()) {
|
|
1218
|
+
if (config.commands.revise !== void 0) return config.commands.revise;
|
|
1219
|
+
const command = config.commands.implement ?? config.commands.amend;
|
|
1220
|
+
if (command === void 0) return void 0;
|
|
1221
|
+
return jobAgent({ command }, agents)?.adapter.headless?.commandLine(REVISE_PROMPT, "revise");
|
|
1222
|
+
}
|
|
1223
|
+
function reviseIsolation(config) {
|
|
1224
|
+
const kind = builtinKind(config.hooks.provision);
|
|
1225
|
+
return kind === "own" ? void 0 : kind === "container" ? "container" : "vm";
|
|
1226
|
+
}
|
|
1227
|
+
function takesRevise(config, agents = defaultAgents()) {
|
|
1228
|
+
if (builtinKind(config.hooks.provision) === "own") return false;
|
|
1229
|
+
if ((config.repos?.include?.length ?? 0) > 0 || (config.repos?.exclude?.length ?? 0) > 0) return false;
|
|
1230
|
+
if (config.queues.length === 0) return false;
|
|
1231
|
+
return reviseCommandOf(config, agents) !== void 0;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1214
1234
|
// src/runner/wait.ts
|
|
1215
1235
|
var WAIT_REQUEST_TIMEOUT_MS = 7e4;
|
|
1216
1236
|
var FIRST_RETRY_MS = 1e3;
|
|
@@ -1365,7 +1385,19 @@ function releaseHelper(socketPath, self, options = {}) {
|
|
|
1365
1385
|
}
|
|
1366
1386
|
|
|
1367
1387
|
// src/runner/loop.ts
|
|
1368
|
-
var QUEUE_ORDER = ["amend", "implement"];
|
|
1388
|
+
var QUEUE_ORDER = ["revise", "amend", "implement"];
|
|
1389
|
+
var REVISE_LIST_RETRY_MS = 10 * 6e4;
|
|
1390
|
+
function takesQueue(state, queue) {
|
|
1391
|
+
return queue === "revise" ? takesRevise(state.config, state.deps.agents) : state.config.queues.includes(queue);
|
|
1392
|
+
}
|
|
1393
|
+
function queueCommand(state, queue) {
|
|
1394
|
+
if (queue === "run") return runCommandOf(state.config, state.deps.agents);
|
|
1395
|
+
if (queue === "revise") return reviseCommandOf(state.config, state.deps.agents);
|
|
1396
|
+
return state.config.commands[queue];
|
|
1397
|
+
}
|
|
1398
|
+
function takenQueues(state) {
|
|
1399
|
+
return [...state.config.queues, ...takesRevise(state.config, state.deps.agents) ? ["revise"] : []];
|
|
1400
|
+
}
|
|
1369
1401
|
var TRACKER_REPOSITORY_HOSTS = {
|
|
1370
1402
|
github: "github.com"
|
|
1371
1403
|
};
|
|
@@ -1437,7 +1469,8 @@ function deriveRepo(item) {
|
|
|
1437
1469
|
return repoPart === "" ? void 0 : `${host}/${repoPart}`;
|
|
1438
1470
|
}
|
|
1439
1471
|
async function listStartable(config, queue, fetchImpl, cursor = null) {
|
|
1440
|
-
const
|
|
1472
|
+
const isolation = queue === "revise" ? reviseIsolation(config) : void 0;
|
|
1473
|
+
const query = queue === "amend" ? "needs=amend&startable=true" : queue === "revise" ? `needs=revise&startable=true${isolation === void 0 ? "" : `&isolation=${isolation}`}` : "startable=true";
|
|
1441
1474
|
const page = await getJson(
|
|
1442
1475
|
config.url,
|
|
1443
1476
|
`/v1/work-items?${query}${cursor === null ? "" : `&cursor=${encodeURIComponent(cursor)}`}`,
|
|
@@ -1469,6 +1502,7 @@ function reloadConfig(state) {
|
|
|
1469
1502
|
return;
|
|
1470
1503
|
}
|
|
1471
1504
|
state.config = fitForImage(state.deps, reloaded).config;
|
|
1505
|
+
delete state.reviseListRefusedAtMs;
|
|
1472
1506
|
const timerNote = state.pollTimerSeconds !== void 0 && state.pollTimerSeconds !== reloaded.pollSeconds ? ` \xB7 still polling every ${state.pollTimerSeconds}s until the runner restarts` : "";
|
|
1473
1507
|
logOf(state).line(`config re-read \xB7 ${describeConfig(reloaded)}${timerNote}`);
|
|
1474
1508
|
} catch (err) {
|
|
@@ -1524,7 +1558,7 @@ async function sendTickHeartbeat(state, workRequest, wake2 = false) {
|
|
|
1524
1558
|
}),
|
|
1525
1559
|
// Left out unless a draining runner has builds to wait on, so the gateway stores null.
|
|
1526
1560
|
waitingItems: waitingItems.length > 0 ? waitingItems : void 0,
|
|
1527
|
-
takes: { queues: state
|
|
1561
|
+
takes: { queues: takenQueues(state), repos: { include: state.config.repos?.include, exclude: state.config.repos?.exclude } },
|
|
1528
1562
|
selfUpdate: selfUpdateReport(state),
|
|
1529
1563
|
deliversComments: runnerDeliversComments(state.config)
|
|
1530
1564
|
},
|
|
@@ -1563,7 +1597,7 @@ function applyStops(state, stops) {
|
|
|
1563
1597
|
}
|
|
1564
1598
|
const who = `stopped by ${stop.requestedByName === "" ? "someone" : stop.requestedByName} through OuterLayer`;
|
|
1565
1599
|
const reason = stop.note === null ? who : `${who}: ${stop.note}`;
|
|
1566
|
-
logOf(state).line(`${itemTag(active.job)} ${reason} \xB7 ending the build`);
|
|
1600
|
+
logOf(state).line(`${itemTag(active.job)} ${reason} \xB7 ending the ${active.job.queue === "revise" ? "job" : "build"}`);
|
|
1567
1601
|
void endJob(state, active, "stopped", { reason }).catch((err) => {
|
|
1568
1602
|
logOf(state).error(`${itemTag(active.job)} could not be stopped: ${describeCallFailure(err)}`);
|
|
1569
1603
|
});
|
|
@@ -2406,7 +2440,11 @@ async function runTick(state) {
|
|
|
2406
2440
|
attempts++;
|
|
2407
2441
|
let claimed = false;
|
|
2408
2442
|
for (const queue of QUEUE_ORDER) {
|
|
2409
|
-
if (!state
|
|
2443
|
+
if (!takesQueue(state, queue)) continue;
|
|
2444
|
+
if (queue === "revise" && state.reviseListRefusedAtMs !== void 0) {
|
|
2445
|
+
if (nowOf(state).getTime() - state.reviseListRefusedAtMs < REVISE_LIST_RETRY_MS) continue;
|
|
2446
|
+
delete state.reviseListRefusedAtMs;
|
|
2447
|
+
}
|
|
2410
2448
|
let cursor = null;
|
|
2411
2449
|
do {
|
|
2412
2450
|
let page;
|
|
@@ -2415,6 +2453,11 @@ async function runTick(state) {
|
|
|
2415
2453
|
reportRepeating(state, "the work item list", void 0);
|
|
2416
2454
|
state.lastWorkRequest = { ok: true };
|
|
2417
2455
|
} catch (err) {
|
|
2456
|
+
if (queue === "revise" && cursor === null && err instanceof WorkCommandError && err.status === 400) {
|
|
2457
|
+
state.reviseListRefusedAtMs = nowOf(state).getTime();
|
|
2458
|
+
log.line("the gateway does not list drafts to revise; asking again in 10 minutes");
|
|
2459
|
+
break;
|
|
2460
|
+
}
|
|
2418
2461
|
state.lastWorkRequest = workRequestFromFailure(err);
|
|
2419
2462
|
reportRepeating(state, "the work item list", `list failed: ${describeCallFailure(err)} \xB7 retrying next tick`);
|
|
2420
2463
|
return;
|
|
@@ -2530,7 +2573,7 @@ var CLAIM_REFUSAL_CODES = new Set(
|
|
|
2530
2573
|
"pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous pull_request_repository_not_connected repository_not_reachable branch_claimed_elsewhere".split(" ")
|
|
2531
2574
|
);
|
|
2532
2575
|
async function tryClaimAndStart(state, item, queue) {
|
|
2533
|
-
const { postJson: postJson2 } = await import('./work-cmd-
|
|
2576
|
+
const { postJson: postJson2 } = await import('./work-cmd-GNYWSA2O.js');
|
|
2534
2577
|
const log = logOf(state);
|
|
2535
2578
|
const hostKey = await loadHostKey(state.config.configPath);
|
|
2536
2579
|
const claim = await retrySend(
|
|
@@ -2545,6 +2588,7 @@ async function tryClaimAndStart(state, item, queue) {
|
|
|
2545
2588
|
seconds: LEASE_SECONDS,
|
|
2546
2589
|
runnerProtocol: RUNNER_PROTOCOL,
|
|
2547
2590
|
cliVersion: state.deps.cliVersion ?? resolveVersion(),
|
|
2591
|
+
...queue === "revise" && reviseIsolation(state.config) !== void 0 ? { isolation: reviseIsolation(state.config) } : {},
|
|
2548
2592
|
...hostKey === void 0 ? {} : { hostKey: hostKey.hostKey }
|
|
2549
2593
|
},
|
|
2550
2594
|
state.deps.fetchImpl,
|
|
@@ -2642,7 +2686,7 @@ async function startClaimedBuild(state, item, queue, data, fleet) {
|
|
|
2642
2686
|
}
|
|
2643
2687
|
reportRepeating(state, "the item key", void 0);
|
|
2644
2688
|
const branch = typeof data.branch === "string" && data.branch !== "" ? data.branch : void 0;
|
|
2645
|
-
if (branch === void 0) {
|
|
2689
|
+
if (branch === void 0 && queue !== "revise") {
|
|
2646
2690
|
const released = await releaseUntried(state, item, fleet);
|
|
2647
2691
|
reportRepeating(
|
|
2648
2692
|
state,
|
|
@@ -2653,13 +2697,13 @@ async function startClaimedBuild(state, item, queue, data, fleet) {
|
|
|
2653
2697
|
}
|
|
2654
2698
|
reportRepeating(state, "the branch", void 0);
|
|
2655
2699
|
const identity = parseClaimIdentity(data);
|
|
2656
|
-
const repositories = parseClaimedRepositories(data.repositories);
|
|
2657
|
-
if (repositories === null) {
|
|
2700
|
+
const repositories = queue === "revise" ? parseBranchlessRepositories(data.repositories) : parseClaimedRepositories(data.repositories);
|
|
2701
|
+
if (repositories === null || queue === "revise" && repositories === void 0) {
|
|
2658
2702
|
const released = await releaseUntried(state, item, fleet);
|
|
2659
2703
|
reportRepeating(
|
|
2660
2704
|
state,
|
|
2661
2705
|
"the repositories",
|
|
2662
|
-
`the gateway named repositories for ${tag} that this runner cannot read; upgrade the runner or the gateway. ` + (released.ok ? "The claim was released and no build started" : `No build started, but releasing the claim failed (${released.reason}), so it stays held until its lease lapses`)
|
|
2706
|
+
(repositories === null ? `the gateway named repositories for ${tag} that this runner cannot read; upgrade the runner or the gateway. ` : `the gateway named no repository for ${tag}, so there is nothing to read. `) + (released.ok ? "The claim was released and no build started" : `No build started, but releasing the claim failed (${released.reason}), so it stays held until its lease lapses`)
|
|
2663
2707
|
);
|
|
2664
2708
|
return { kind: "unreadable_repositories" };
|
|
2665
2709
|
}
|
|
@@ -2667,7 +2711,7 @@ async function startClaimedBuild(state, item, queue, data, fleet) {
|
|
|
2667
2711
|
for (const entry of parseUnreachable(data.unreachable)) {
|
|
2668
2712
|
log.line(`${tag}: ${entry.repository} is left out of this build because its GitHub App installation is suspended`);
|
|
2669
2713
|
}
|
|
2670
|
-
const starting = startJob(state, item, queue, claimId, itemKey, branch, identity, repositories, fleet, data.freshDisk === true, data.diskHeldElsewhere === true, data.codeReview === true);
|
|
2714
|
+
const starting = startJob(state, item, queue, claimId, itemKey, branch, identity, repositories, fleet, data.freshDisk === true, data.diskHeldElsewhere === true, data.codeReview === true, void 0, data.continueSession === true);
|
|
2671
2715
|
const endStranded = async (err) => {
|
|
2672
2716
|
const stranded = [...state.jobs.values()].find((active) => active.job.claimId === claimId);
|
|
2673
2717
|
if (stranded === void 0) return false;
|
|
@@ -2718,9 +2762,9 @@ function wasExtended(claim) {
|
|
|
2718
2762
|
}
|
|
2719
2763
|
async function prepareSession(state, active, item, queue, tag) {
|
|
2720
2764
|
const job = active.job;
|
|
2721
|
-
const builtin = job.microvm !== void 0 || job.container !== void 0;
|
|
2765
|
+
const builtin = job.microvm !== void 0 || job.container !== void 0 || job.sandbox !== void 0;
|
|
2722
2766
|
const log = logOf(state);
|
|
2723
|
-
if (queue === "amend" && !builtin
|
|
2767
|
+
if (queue === "amend" && !builtin) {
|
|
2724
2768
|
job.disk = { restored: false, reason: "build_type_cannot_restore" };
|
|
2725
2769
|
writeJobFile(join(active.dirPath, "job.json"), job);
|
|
2726
2770
|
}
|
|
@@ -2730,12 +2774,14 @@ async function prepareSession(state, active, item, queue, tag) {
|
|
|
2730
2774
|
organizationId: job.organizationId,
|
|
2731
2775
|
workItemId: item.id,
|
|
2732
2776
|
queue,
|
|
2777
|
+
continueSession: job.continueSession === true,
|
|
2733
2778
|
builtin,
|
|
2734
2779
|
job,
|
|
2735
2780
|
requireScrubNote: state.config.managed === true,
|
|
2736
2781
|
restore: async ({ dir, meta }) => {
|
|
2737
2782
|
if (job.microvm !== void 0) await restoreSessionIntoMicroVm(runtimeOf(state), job.microvm, dir, meta, job);
|
|
2738
2783
|
else if (job.container !== void 0) await restoreSessionIntoContainer(runtimeOf(state), job.container, dir, meta, job);
|
|
2784
|
+
else if (job.sandbox !== void 0) await restoreSessionIntoSandbox(runtimeOf(state), job.sandbox, dir, meta, job);
|
|
2739
2785
|
},
|
|
2740
2786
|
log: (line) => log.line(`${tag} ${line}`)
|
|
2741
2787
|
}, state.deps.agents);
|
|
@@ -2747,7 +2793,7 @@ async function prepareSession(state, active, item, queue, tag) {
|
|
|
2747
2793
|
return void 0;
|
|
2748
2794
|
}
|
|
2749
2795
|
}
|
|
2750
|
-
async function startJob(state, item, queue, claimId, itemKey, branch, identity, claimed, fleet, freshDisk, diskHeldElsewhere, codeReview, run) {
|
|
2796
|
+
async function startJob(state, item, queue, claimId, itemKey, branch, identity, claimed, fleet, freshDisk, diskHeldElsewhere, codeReview, run, continueSession) {
|
|
2751
2797
|
const log = logOf(state);
|
|
2752
2798
|
const startedAt = nowOf(state);
|
|
2753
2799
|
const repositories = repositoriesOf({ repositories: claimed, repository: item.specRepository, branch });
|
|
@@ -2756,7 +2802,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
2756
2802
|
mkdirSync(dirPath, { recursive: true, mode: RUNNER_DIR_MODE });
|
|
2757
2803
|
const runnerRoot = runnerDir(state.config.configPath);
|
|
2758
2804
|
const jobFilePath = join(dirPath, "job.json");
|
|
2759
|
-
const configuredCommand =
|
|
2805
|
+
const configuredCommand = queueCommand(state, queue);
|
|
2760
2806
|
const jobAgentId = jobAgent({ command: queue === "run" ? state.config.commands.implement : configuredCommand }, state.deps.agents)?.descriptor.id;
|
|
2761
2807
|
let job = {
|
|
2762
2808
|
stateFormat: state.deps.jobStateFormat ?? JOB_STATE_FORMAT,
|
|
@@ -2770,6 +2816,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
2770
2816
|
...queue === "run" ? {} : { workItemId: item.id },
|
|
2771
2817
|
...run === void 0 ? {} : { run },
|
|
2772
2818
|
...freshDisk ? { freshDisk: true } : {},
|
|
2819
|
+
...continueSession ? { continueSession: true } : {},
|
|
2773
2820
|
...diskHeldElsewhere ? { diskHeldElsewhere: true } : {},
|
|
2774
2821
|
...codeReview === true ? { codeReview: true } : {},
|
|
2775
2822
|
...queue === "amend" && recordsProofsOnly(item) ? { proofsOnly: true } : {},
|
|
@@ -3018,9 +3065,10 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
3018
3065
|
}
|
|
3019
3066
|
}
|
|
3020
3067
|
} else {
|
|
3021
|
-
if (queue === "run") {
|
|
3022
|
-
|
|
3023
|
-
|
|
3068
|
+
if (queue === "run" || queue === "revise") {
|
|
3069
|
+
const what = queue === "run" ? "a run" : "a revision";
|
|
3070
|
+
log.error(`${tag} the runner's hooks no longer name a container, microVM or sandbox build, and ${what} takes none other \xB7 ending job as failed`);
|
|
3071
|
+
await endJob(state, active, "failed", { stage: "provision", reason: `${what} goes only to a build in a container or a microVM` });
|
|
3024
3072
|
return;
|
|
3025
3073
|
}
|
|
3026
3074
|
const runtime = runtimeOf(state);
|
|
@@ -3168,7 +3216,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
3168
3216
|
return;
|
|
3169
3217
|
}
|
|
3170
3218
|
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`);
|
|
3171
|
-
if (!containerMode && !vmMode && !sandboxMode) {
|
|
3219
|
+
if (!containerMode && !vmMode && !sandboxMode && branch !== void 0) {
|
|
3172
3220
|
if (existsSync(join(workdir, ".git"))) {
|
|
3173
3221
|
try {
|
|
3174
3222
|
const prepared = await prepareBranch({ workdir, branch });
|
|
@@ -3188,7 +3236,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
3188
3236
|
await endJob(state, active, "ok", { stage: "command" });
|
|
3189
3237
|
return;
|
|
3190
3238
|
}
|
|
3191
|
-
const configured =
|
|
3239
|
+
const configured = queueCommand(state, queue);
|
|
3192
3240
|
const cmdline = configured === void 0 ? void 0 : currentSkillCommand(configured);
|
|
3193
3241
|
if (cmdline !== configured) log.line(`${tag} ${formerSkillProblem([queue])}`);
|
|
3194
3242
|
if (!cmdline) {
|
|
@@ -3716,7 +3764,7 @@ async function rejoinContainerBuild(state, adopted) {
|
|
|
3716
3764
|
if (cores !== void 0) runtimeOf(state).cpus.hold(container.buildId, cores);
|
|
3717
3765
|
const tokens = buildTokensFor(state, adopted);
|
|
3718
3766
|
runtimeOf(state).credentials.set(dirPath, tokens);
|
|
3719
|
-
await ensureTunnel(runtimeOf(state), container, dirPath, configForJob(config, job), job.itemKey, job.branch, job.repositories, (line) => logOf(state).line(`${itemTag(job)} ${line}`), () => leaseExpiresAtMs(adopted.job), job.queue
|
|
3767
|
+
await ensureTunnel(runtimeOf(state), container, dirPath, configForJob(config, job), job.itemKey, job.branch, job.repositories, (line) => logOf(state).line(`${itemTag(job)} ${line}`), () => leaseExpiresAtMs(adopted.job), readOnlyRemoteOf(job.queue));
|
|
3720
3768
|
try {
|
|
3721
3769
|
await tokens.token("read");
|
|
3722
3770
|
keepGhConfigCurrent(
|
|
@@ -3819,7 +3867,7 @@ async function rejoinMicroVmBuild(state, adopted) {
|
|
|
3819
3867
|
let leaseServed = false;
|
|
3820
3868
|
try {
|
|
3821
3869
|
const repositories = repositoriesOf({ repositories: job.repositories, repository: microvm.repository, branch: job.branch });
|
|
3822
|
-
const gitRemote = repositories.length === 0 ? void 0 : gitRemoteFor(runtime, { repositories, tokens, buildDir: microvm.buildDir, organizationId: job.organizationId, log: (line) => log.line(`${tag} ${line}`), ...job.queue
|
|
3870
|
+
const gitRemote = repositories.length === 0 ? void 0 : gitRemoteFor(runtime, { repositories, tokens, buildDir: microvm.buildDir, organizationId: job.organizationId, log: (line) => log.line(`${tag} ${line}`), ...readOnlyOption(job.queue) });
|
|
3823
3871
|
runtime.tunnels.set(microvm.buildId, await startServicesFor(runtime, configForJob(config, job), microvm.buildDir, dirPath, job.itemKey, microvm.builtIns === true, gitRemote, "socket", void 0, inherit));
|
|
3824
3872
|
servicesServed = true;
|
|
3825
3873
|
} catch (err) {
|
|
@@ -4016,7 +4064,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
4016
4064
|
check: update.check ? () => update.check(configPath) : async () => {
|
|
4017
4065
|
const held = runnerAgents(deps.agents).flatMap((agent) => heldAgentCredential(agent.descriptor.id) ?? []);
|
|
4018
4066
|
const env = { ...process.env, ...Object.fromEntries(held.map((credential) => [credential.variable, credential.value])) };
|
|
4019
|
-
return (await import('./check-
|
|
4067
|
+
return (await import('./check-JNQVYVHI.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
|
|
4020
4068
|
},
|
|
4021
4069
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
4022
4070
|
log
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { withInjectedPrograms } from './chunk-
|
|
4
|
-
import { sharedSkillNames } from './chunk-
|
|
3
|
+
import { withInjectedPrograms } from './chunk-RUX4M4AX.js';
|
|
4
|
+
import { sharedSkillNames } from './chunk-I62FX622.js';
|
|
5
5
|
import { GOVERNANCE_VARIABLE, versionAtLeast, CONTROL_PLANE_DIR_VARIABLE } from './chunk-SF2TBJBP.js';
|
|
6
6
|
import { findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
7
|
-
import { setupMachineSkills } from './chunk-
|
|
8
|
-
import { defaultAgents, agentById, legacyAgent } from './chunk-
|
|
7
|
+
import { setupMachineSkills } from './chunk-ZJHWXRT4.js';
|
|
8
|
+
import { defaultAgents, agentById, legacyAgent } from './chunk-QYLBGMTA.js';
|
|
9
9
|
import './chunk-PLVHIQJN.js';
|
|
10
10
|
import { LEGACY_AGENT } from './chunk-7PZDPISM.js';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-ELPP5OHC.js';
|
|
12
12
|
import './chunk-RA3O54FC.js';
|
|
13
13
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
14
|
+
import './chunk-7GJEQXOH.js';
|
|
15
|
+
import './chunk-5NVF5TAL.js';
|
|
16
16
|
import './chunk-Z5GEFMRW.js';
|
|
17
17
|
import { spawn, execFileSync } from 'child_process';
|
|
18
18
|
import { existsSync, readdirSync, lstatSync, readFileSync, writeFileSync, rmSync, mkdirSync, realpathSync, symlinkSync, renameSync, readlinkSync, statSync } from 'fs';
|
|
@@ -325,7 +325,7 @@ async function runAgentLauncher(agentId, args, deps = {}) {
|
|
|
325
325
|
return 1;
|
|
326
326
|
}
|
|
327
327
|
} else {
|
|
328
|
-
const { resolveLaunchPlane } = await import('./control-plane-launch-
|
|
328
|
+
const { resolveLaunchPlane } = await import('./control-plane-launch-AJPCKLBL.js');
|
|
329
329
|
const plane = env[GOVERNANCE_VARIABLE] === "self" ? { kind: "none" } : await resolveLaunchPlane({ cwd, env, home, fetchImpl: deps.fetchImpl, stderr });
|
|
330
330
|
if (plane.kind === "none") {
|
|
331
331
|
const own2 = ownSkillsDirFor(prefix, cwd, home, /* @__PURE__ */ new Set(), stderr);
|