@outerlayer/cli 0.34.0-next.20261024231715 → 0.34.0-next.20261025133402
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 +6 -0
- package/dist/{agent-setup-HEJM3D3V.js → agent-setup-UXUWLV7O.js} +6 -6
- package/dist/{bridge-NBCXFTT4.js → bridge-OWCSVCXL.js} +2 -2
- package/dist/{build-LSU25G3M.js → build-4HFDZTUX.js} +4 -4
- package/dist/{build-disk-LEZ6LAM3.js → build-disk-5ZQHYBO3.js} +6 -6
- package/dist/build-info.json +1 -1
- package/dist/{builder-I32JOQII.js → builder-54GLXGFV.js} +5 -5
- package/dist/{check-OOUGS65D.js → check-4TQZZOIQ.js} +37 -37
- package/dist/{chunk-L26V6ILJ.js → chunk-2RBIW2PD.js} +1 -1
- package/dist/{chunk-MZBQTVFG.js → chunk-36T6W5RA.js} +1 -1
- package/dist/{chunk-6NUPXDAA.js → chunk-3M6UYJSR.js} +3 -3
- package/dist/{chunk-ZVLSYWDF.js → chunk-3NFZN7H6.js} +3 -3
- package/dist/{chunk-272AKVRP.js → chunk-3RAAYBSG.js} +1 -1
- package/dist/{chunk-3CKMB2UK.js → chunk-4XYC2663.js} +3 -3
- package/dist/{chunk-GH246BGV.js → chunk-56ZHWIR2.js} +1 -1
- package/dist/{chunk-6LBSAW6I.js → chunk-75KZUBHD.js} +1 -1
- package/dist/{chunk-AMEM2ZLL.js → chunk-AABYHGVO.js} +4 -4
- package/dist/{chunk-6ZFY2L2T.js → chunk-AJYZNISW.js} +416 -20
- package/dist/{chunk-62LXQM7U.js → chunk-AVLLJW5D.js} +5 -5
- package/dist/{chunk-FVKH3PMV.js → chunk-BTG5NZHN.js} +4 -4
- package/dist/{chunk-QDVGOMSC.js → chunk-BUF6DSSM.js} +3 -3
- package/dist/{chunk-ZW6L275N.js → chunk-CCISO7EQ.js} +10 -10
- package/dist/{chunk-65AKMFBH.js → chunk-CXQCBAKO.js} +1 -1
- package/dist/{chunk-NBZ7XBT6.js → chunk-DUPM5LVJ.js} +1 -1
- package/dist/{chunk-5HZGLLNW.js → chunk-E34FRRSW.js} +4 -4
- package/dist/{chunk-F5UL23I2.js → chunk-ENFBYN4A.js} +1 -1
- package/dist/{chunk-2JB4GD34.js → chunk-EZ7L5IZU.js} +3 -3
- package/dist/{chunk-HVRQQOMH.js → chunk-HAEDLXHA.js} +3 -3
- package/dist/{chunk-5THSC6BD.js → chunk-IHY457PB.js} +1 -1
- package/dist/{chunk-Z4KWHSO4.js → chunk-IW6Z337K.js} +6 -6
- package/dist/{chunk-Z5IW4DHH.js → chunk-J246WRLZ.js} +1 -1
- package/dist/{chunk-5QBUX5YZ.js → chunk-JEOPIRUR.js} +1 -1
- package/dist/{chunk-TDAQHYM4.js → chunk-JZD2NTRH.js} +3 -3
- package/dist/{chunk-XFFUXXI4.js → chunk-KDLQGTN6.js} +3 -3
- package/dist/{chunk-QMWUPRYQ.js → chunk-LMICI7AY.js} +3 -3
- package/dist/{chunk-43I7PXDP.js → chunk-MPDLZCXM.js} +4 -4
- package/dist/{chunk-PA6CK6WQ.js → chunk-N7LAEN3T.js} +1 -1
- package/dist/{chunk-57L2YAJA.js → chunk-NW5PDZYA.js} +1 -1
- package/dist/{chunk-3IH6K7KG.js → chunk-O5G6VQGZ.js} +4 -4
- package/dist/{chunk-DA3PLB5N.js → chunk-PAK5P2ND.js} +1 -1
- package/dist/{chunk-YEVPRO7L.js → chunk-POGPX7LI.js} +71 -36
- package/dist/{chunk-K5Q6T7SE.js → chunk-PSXVAOEB.js} +3 -3
- package/dist/{chunk-O6DYCIVW.js → chunk-QOUR4CQ7.js} +2 -2
- package/dist/{chunk-ACRRO3MB.js → chunk-RNVBSRZZ.js} +21 -20
- package/dist/{chunk-7WM7K2DY.js → chunk-SMMNU65K.js} +28 -15
- package/dist/{chunk-DXJTBU7A.js → chunk-T7N3BAOO.js} +3 -3
- package/dist/{chunk-6RKD7YZ6.js → chunk-TVGLNHEB.js} +1 -1
- package/dist/{chunk-EN3YWO7Q.js → chunk-TVOZOOIW.js} +3 -3
- package/dist/{chunk-ZYKFYNES.js → chunk-UC2DKBMS.js} +2 -2
- package/dist/{chunk-YGSY2NWU.js → chunk-WIK5KUGK.js} +5 -5
- package/dist/{chunk-EE2ZZGQV.js → chunk-XA6PGME5.js} +2 -2
- package/dist/{chunk-SOI6K5DY.js → chunk-XLJLR7EK.js} +1 -1
- package/dist/{chunk-BALIE3BA.js → chunk-YOBQIXX6.js} +10 -6
- package/dist/{chunk-E4ASIOVL.js → chunk-Z76GVJGQ.js} +3 -3
- package/dist/{chunk-YIBFGAYI.js → chunk-ZV2JJPDS.js} +6 -6
- package/dist/{chunk-4Y54SQXH.js → chunk-ZWLEUSJW.js} +70 -25
- package/dist/{claude-launcher-MORG66PJ.js → claude-launcher-JEB5BN7Q.js} +1 -1
- package/dist/{cli-XI7RUSC5.js → cli-DY3EGPUB.js} +109 -109
- package/dist/{command-BJSHY6OB.js → command-ZAXYAZCI.js} +24 -24
- package/dist/{config-WRHQDGVI.js → config-UN3X6AP2.js} +7 -7
- package/dist/{connect-cmd-YAUOCX4X.js → connect-cmd-TWM4FEKD.js} +6 -6
- package/dist/{container-start-QADK3YGL.js → container-start-JUNBJ7MU.js} +30 -30
- package/dist/{context-show-cmd-VHY3OBIA.js → context-show-cmd-K5LRMDEO.js} +7 -7
- package/dist/{control-plane-launch-QSBWTA2V.js → control-plane-launch-LHOV2FPA.js} +5 -5
- package/dist/{dist-ZAHCXYSG.js → dist-QGN5R4Y2.js} +1 -1
- package/dist/{docker-DJ73SZRC.js → docker-YZKRM7IP.js} +5 -5
- package/dist/{doctor-UR76MCGI.js → doctor-YOAF7QPL.js} +26 -26
- package/dist/{emit-artifact-cmd-DP2EQ54N.js → emit-artifact-cmd-SCF2FKKS.js} +11 -11
- package/dist/{emit-criteria-cmd-TTFBN6RK.js → emit-criteria-cmd-B6CKUWTW.js} +8 -8
- package/dist/{emit-demo-cmd-Z7YGLEBJ.js → emit-demo-cmd-BNWRETMJ.js} +12 -12
- package/dist/{emit-finding-cmd-IQRD3J2X.js → emit-finding-cmd-TPSHNZNE.js} +8 -8
- package/dist/{emit-result-cmd-GIWB6UHH.js → emit-result-cmd-J5DXIC2Q.js} +10 -10
- package/dist/{emit-step-cmd-PU5TTU6C.js → emit-step-cmd-NPH46KAO.js} +8 -8
- package/dist/{exec-client-7PT4W7JR.js → exec-client-ANW4KGMN.js} +3 -3
- package/dist/{findings-cmd-7J5SHCUO.js → findings-cmd-4FJDCFL3.js} +8 -8
- package/dist/{fleet-readiness-G63D76EX.js → fleet-readiness-OK6534T6.js} +5 -5
- package/dist/{governing-source-DLESDP6T.js → governing-source-GNKTNM32.js} +10 -10
- package/dist/{guest-init-J3F3AEEY.js → guest-init-C6M7YT3U.js} +4 -4
- package/dist/{hook-fast-VQXRDS6E.js → hook-fast-LVTJWAG3.js} +1 -1
- package/dist/{pending-5HZACM2V.js → host-key-DUGGHAGR.js} +3 -3
- package/dist/{image-tag-ADSLWXBA.js → image-tag-53DJPMSZ.js} +3 -3
- package/dist/index.js +4 -4
- package/dist/{init-67R7LO4C.js → init-JGYMAOD5.js} +21 -21
- package/dist/{init-KSXU4PA7.js → init-RAJKTSPJ.js} +21 -21
- package/dist/{init-cmd-MNOVMADM.js → init-cmd-IB3KTYCV.js} +11 -11
- package/dist/{init-update-6KEXRCJH.js → init-update-VPWSWDY7.js} +9 -9
- package/dist/{install-OCBERTPQ.js → install-QJWJFIWB.js} +8 -8
- package/dist/{install-cmd-FV7IZ7XF.js → install-cmd-NP7GULCD.js} +5 -5
- package/dist/{logs-HI46FO6Z.js → logs-V6AES5FE.js} +2 -2
- package/dist/{loop-KUEOPBKX.js → loop-ZGDZMVFN.js} +36 -36
- package/dist/{machine-EQEAPT76.js → machine-LJ3VMGS3.js} +21 -21
- package/dist/{mcp-serve-cmd-7ABBV2QE.js → mcp-serve-cmd-DHGCAMJS.js} +4 -4
- package/dist/{paths-7HVTDE6J.js → paths-DMKAJVA5.js} +2 -2
- package/dist/{host-key-UERIQRE6.js → pending-B55JZFOV.js} +3 -3
- package/dist/{pidfile-5UDLYPMC.js → pidfile-XCTXBGA3.js} +3 -3
- package/dist/{record-PPZEXAVA.js → record-RQLGRYWG.js} +3 -3
- package/dist/{runner-env-L7OPH3O3.js → runner-env-AUG2OIP4.js} +9 -9
- package/dist/{runner-identity-VASV2AEQ.js → runner-identity-BQA4SBU6.js} +5 -5
- package/dist/{runner-key-ML7R33HF.js → runner-key-ZIF7M7YN.js} +21 -21
- package/dist/{session-sender-A43GZQ7T.js → session-sender-VQ4LHJ5K.js} +11 -11
- package/dist/{spec-cmd-VVUJZSG2.js → spec-cmd-PXM4FJ2O.js} +9 -9
- package/dist/{status-4G6K7I2C.js → status-27EFD2WE.js} +28 -28
- package/dist/{sync-cmd-ZEC65ABJ.js → sync-cmd-VAV7TR2A.js} +10 -10
- package/dist/{update-steps-XLO7734I.js → update-steps-7YLAFW3E.js} +29 -29
- package/dist/{watch-QB4AMWR3.js → watch-42XJSTTB.js} +10 -10
- package/dist/{work-claim-cmd-6W3GBHRS.js → work-claim-cmd-HSG4OHFI.js} +14 -14
- package/dist/{work-cmd-LTZXOPPN.js → work-cmd-KCBU3RSD.js} +8 -8
- package/dist/{work-comment-cmd-LDZBUO6M.js → work-comment-cmd-QIP2OUJC.js} +9 -9
- package/dist/{work-demo-cmd-77LISWQ3.js → work-demo-cmd-6IKAG6ES.js} +8 -8
- package/dist/{work-logs-cmd-FK7HE7PC.js → work-logs-cmd-RMKJA4AI.js} +8 -8
- package/dist/{work-open-pr-cmd-WVONEHZL.js → work-open-pr-cmd-IAVLUUWW.js} +9 -9
- package/dist/{work-pr-cmd-6IPXWJEH.js → work-pr-cmd-3U7SVQII.js} +8 -8
- package/dist/{work-proofs-cmd-TGIAP5IO.js → work-proofs-cmd-6ZY6ZNNE.js} +9 -9
- package/dist/{work-proofs-record-XPAU7N57.js → work-proofs-record-54GBEUJP.js} +15 -15
- package/dist/{work-stop-cmd-UJ45EV3A.js → work-stop-cmd-LH5XY4YL.js} +8 -8
- package/package.json +1 -1
- package/skill-pack/maintained/outerlayer-build/SKILL.md +11 -8
- package/skill-pack/shipped.json +2 -0
- package/skill-pack/template/spec/SKILL.md +3 -1
- package/skill-pack/template/writing-specs/SKILL.md +4 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { readCloudConfigStrict, readCloudConfig, cloudConfigPath } from './chunk-PJDQPF5N.js';
|
|
4
|
-
import { signRunnerRequest, signerFor } from './chunk-
|
|
4
|
+
import { signRunnerRequest, signerFor } from './chunk-XLJLR7EK.js';
|
|
5
5
|
import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
6
6
|
import { PLAIN_VERSION, recordCliVersion, removeRecordedVersion } from './chunk-5BHIBJDA.js';
|
|
7
7
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { resolveCredentials, postJson, getJson } from './chunk-
|
|
3
|
+
import { resolveCredentials, postJson, getJson } from './chunk-IW6Z337K.js';
|
|
4
4
|
import { detectActiveSession } from './chunk-IP7BIBXJ.js';
|
|
5
5
|
import { sanitizeTerminal } from './chunk-MECW77XP.js';
|
|
6
|
-
import { resolveRepoIdentity } from './chunk-
|
|
6
|
+
import { resolveRepoIdentity } from './chunk-AJYZNISW.js';
|
|
7
7
|
import { C } from './chunk-ANPNT6PM.js';
|
|
8
|
-
import { defaultFetch } from './chunk-
|
|
8
|
+
import { defaultFetch } from './chunk-TVGLNHEB.js';
|
|
9
9
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
10
10
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
11
11
|
import { randomUUID } from 'crypto';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { parseSize, BUILD_LABEL, RUNNER_LABEL, runnerLabelValue } from './chunk-
|
|
4
|
-
import { buildsDir, rootfsDir, runnerDir, imagesDir, builderCacheDiskPath } from './chunk-
|
|
3
|
+
import { parseSize, BUILD_LABEL, RUNNER_LABEL, runnerLabelValue } from './chunk-MPDLZCXM.js';
|
|
4
|
+
import { buildsDir, rootfsDir, runnerDir, imagesDir, builderCacheDiskPath } from './chunk-N7LAEN3T.js';
|
|
5
5
|
import { spawnSync } from 'child_process';
|
|
6
6
|
import { statfsSync, statSync, existsSync, readdirSync } from 'fs';
|
|
7
7
|
import { dirname, join } from 'path';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { uploadSpooledSteps } from './chunk-
|
|
3
|
+
import { uploadSpooledSteps } from './chunk-LMICI7AY.js';
|
|
4
4
|
import { LaunchFilter } from './chunk-ESVW4MJY.js';
|
|
5
5
|
import { RepoFilter } from './chunk-TBT347UY.js';
|
|
6
6
|
import { migrateLegacyArtifactSidecars, planArtifactUpload, artifactsStatePath, sanitizeTerminal, acquireArtifactSpoolLock, artifactBlobsDir, resolveArtifactTurnIndex, isArtifactTombstoned, ARTIFACT_RETRY_MAX_AGE_MS, writeArtifactSpoolState, reclaimUnneededArtifactBlobs, neededArtifactShas } from './chunk-MECW77XP.js';
|
|
7
|
-
import { setCustomScrubbers, setLocalIdentity, tailTranscript, enrichSessionRepo, scanAll, setRepoRoot, resolveRepoIdentity, sessionIdFromPath, scrubDeep, SOURCE_ADAPTERS } from './chunk-
|
|
7
|
+
import { setCustomScrubbers, setLocalIdentity, tailTranscript, enrichSessionRepo, scanAll, setRepoRoot, resolveRepoIdentity, sessionIdFromPath, scrubDeep, SOURCE_ADAPTERS } from './chunk-AJYZNISW.js';
|
|
8
8
|
import { C } from './chunk-ANPNT6PM.js';
|
|
9
|
-
import { cliFetch, resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-
|
|
9
|
+
import { cliFetch, resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-TVGLNHEB.js';
|
|
10
10
|
import { readCloudConfig, cloudConfigPath, writeCloudConfig } from './chunk-PJDQPF5N.js';
|
|
11
|
-
import { signerFor, signRunnerRequest } from './chunk-
|
|
12
|
-
import { writeSyncStatus, spoolDir } from './chunk-
|
|
11
|
+
import { signerFor, signRunnerRequest } from './chunk-XLJLR7EK.js';
|
|
12
|
+
import { writeSyncStatus, spoolDir } from './chunk-CXQCBAKO.js';
|
|
13
13
|
import { readLatestProvenanceForSession, readContextProvenance } from './chunk-ZJSNLVCE.js';
|
|
14
14
|
import { hookExecSpoolPath } from './chunk-2O5KA67H.js';
|
|
15
15
|
import { applyReportedCost } from './chunk-BKO6JEZI.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { sanitizeTerminal } from './chunk-MECW77XP.js';
|
|
4
|
-
import { remoteLookupFailed } from './chunk-
|
|
4
|
+
import { remoteLookupFailed } from './chunk-AJYZNISW.js';
|
|
5
5
|
import { isAgentsMdLayout } from './chunk-NKOM4JKY.js';
|
|
6
6
|
import { DEFAULT_DASHBOARD } from './chunk-Y5YCX6AL.js';
|
|
7
|
-
import { cliFetch, resolveGatewayCredentials } from './chunk-
|
|
7
|
+
import { cliFetch, resolveGatewayCredentials } from './chunk-TVGLNHEB.js';
|
|
8
8
|
import { readCloudConfig } from './chunk-PJDQPF5N.js';
|
|
9
9
|
import { findGitDirs, writeRepoConnection, readRepoConnection } from './chunk-BJ3KTMDH.js';
|
|
10
10
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { hostKeyPath, runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
3
|
+
import { hostKeyPath, runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-N7LAEN3T.js';
|
|
4
4
|
import { generateKeyPairSync, createPrivateKey, createPublicKey, sign } from 'crypto';
|
|
5
5
|
import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
|
|
6
6
|
|
|
@@ -125,6 +125,9 @@ function claudeCredential(hostEnv, options = {}) {
|
|
|
125
125
|
if (credential === void 0) return void 0;
|
|
126
126
|
return { variable: credential.variable, placeholder: credential.variable === "CLAUDE_CODE_OAUTH_TOKEN" ? OAUTH_PLACEHOLDER : API_KEY_PLACEHOLDER };
|
|
127
127
|
}
|
|
128
|
+
function managedClaudeCredential() {
|
|
129
|
+
return { variable: "ANTHROPIC_API_KEY", placeholder: API_KEY_PLACEHOLDER };
|
|
130
|
+
}
|
|
128
131
|
function gatewayUpstream(gatewayUrl) {
|
|
129
132
|
return `${new URL(gatewayUrl).origin}/`;
|
|
130
133
|
}
|
|
@@ -142,8 +145,9 @@ function forwardedEnvironment(hostEnv) {
|
|
|
142
145
|
return env;
|
|
143
146
|
}
|
|
144
147
|
function builtInDestinations(input) {
|
|
145
|
-
const
|
|
146
|
-
const
|
|
148
|
+
const managedKey = input.claudeApiKey !== void 0 && input.claudeApiKey !== "";
|
|
149
|
+
const credential = managedKey ? void 0 : claudeCredential(input.hostEnv);
|
|
150
|
+
const apiKeyMode = managedKey || credential?.variable === "ANTHROPIC_API_KEY";
|
|
147
151
|
return [
|
|
148
152
|
{
|
|
149
153
|
destination: {
|
|
@@ -163,7 +167,7 @@ function builtInDestinations(input) {
|
|
|
163
167
|
header: apiKeyMode ? { name: "x-api-key", value: "${ANTHROPIC_API_KEY}", variables: ["ANTHROPIC_API_KEY"] } : { name: "Authorization", value: "Bearer ${CLAUDE_CODE_OAUTH_TOKEN}", variables: ["CLAUDE_CODE_OAUTH_TOKEN"] },
|
|
164
168
|
env: {}
|
|
165
169
|
},
|
|
166
|
-
hostEnv: forwardedEnvironment(input.hostEnv),
|
|
170
|
+
hostEnv: managedKey ? { ANTHROPIC_API_KEY: input.claudeApiKey } : forwardedEnvironment(input.hostEnv),
|
|
167
171
|
// A build's own key in either header would sit beside the runner's, and the upstream takes one of them.
|
|
168
172
|
drop: ["x-api-key", "authorization"],
|
|
169
173
|
socket: CLAUDE_SOCKET
|
|
@@ -471,7 +475,7 @@ async function startBuildServices(input) {
|
|
|
471
475
|
targets.set(destinationTarget(index), (stream) => server.acceptStream(stream));
|
|
472
476
|
if (server.port !== void 0) destinationPorts.push(server.port);
|
|
473
477
|
}
|
|
474
|
-
const builtIns = input.builtIns === void 0 ? [] : builtInDestinations({ gatewayUrl: input.builtIns.gatewayUrl, itemKey: input.builtIns.itemKey, hostEnv: input.hostEnv, claudeUpstream: input.builtIns.claudeUpstream });
|
|
478
|
+
const builtIns = input.builtIns === void 0 ? [] : builtInDestinations({ gatewayUrl: input.builtIns.gatewayUrl, itemKey: input.builtIns.itemKey, hostEnv: input.hostEnv, claudeUpstream: input.builtIns.claudeUpstream, claudeApiKey: input.builtIns.claudeApiKey });
|
|
475
479
|
for (const builtIn of builtIns) {
|
|
476
480
|
const server = await startDestination({
|
|
477
481
|
destination: builtIn.destination,
|
|
@@ -776,7 +780,7 @@ function buildEnvironment(input) {
|
|
|
776
780
|
if (skipped) notices.push(MAVEN_NO_PROXY_NOTE);
|
|
777
781
|
}
|
|
778
782
|
const destinations = destinationEnvironment(input.config.build?.destinations, containerLocalAddress);
|
|
779
|
-
const builtInLiterals = builtIns ? builtInEnvironment(containerBuiltInAddress, claudeCredential(input.hostEnv)) : {};
|
|
783
|
+
const builtInLiterals = builtIns ? builtInEnvironment(containerBuiltInAddress, input.config.managed === true ? managedClaudeCredential() : claudeCredential(input.hostEnv)) : {};
|
|
780
784
|
const hooksPath = input.identity?.hooksPath;
|
|
781
785
|
const hooks = {};
|
|
782
786
|
if (hooksPath !== void 0) {
|
|
@@ -867,4 +871,4 @@ function routesOf(counts) {
|
|
|
867
871
|
return routes.length === 0 ? {} : { routes };
|
|
868
872
|
}
|
|
869
873
|
|
|
870
|
-
export { AGENT_CREDENTIAL_MISSING, BUILD_HOME, BUILT_IN_NAMES, CHECKOUT_DIR, CHECK_ITEMS_FILE, CLAUDE_CREDENTIAL_ID, CLAUDE_CREDENTIAL_VARIABLES, CLAUDE_ENV_FILE, CLAUDE_PORT, CLAUDE_SOCKET, DESTINATION_BASE_PORT, EVAL_INPUT_DIR, FORWARDED_CLAUDE_CREDENTIAL_VARIABLES, GATEWAY_PORT, GATEWAY_SOCKET, JOB_MOUNT, MAVEN_NO_PROXY_NOTE, MAVEN_SETTINGS_FILE, MAVEN_SPACE_NOTE, PROXY_WARNING_FLAG, RELAY_PORT, authorEnvironment, buildEnvironment, buildMavenSettingsXml, builtInEnvironment, checkEnvironment, checkoutPath, claudeCredential, claudeCredentialVariablesSet, claudeEnvPath, commitIdentityRecord, containerLocalAddress, credentialLineIn, currentClaudeCredential, destinationEnvironment, headerVariables, heldClaudeCredential, isRefusedInConfig, isReservedVariable, lifecycleWorkdir, mavenArgs, mavenSettingsXml, namesGlobalSettings, parseClaimIdentity, parseClaimedRepositories, parseIsolation, parseUnreachable, primaryOf, proxyEnvironment, readClaudeCredential, removedClaudeCredentialValues, repositoriesOf, repositoryPath, resolveDestinations, sharedUserEnvironment, startBuildServices, takeClaudeCredential, tokenHeader, withGitConfig, withHooksPath, withProxyWarningHidden, withTokenHeader, withTunnelRecord, withoutCredentialLines, writeBuildMavenSettings, writeMavenSettings };
|
|
874
|
+
export { AGENT_CREDENTIAL_MISSING, BUILD_HOME, BUILT_IN_NAMES, CHECKOUT_DIR, CHECK_ITEMS_FILE, CLAUDE_CREDENTIAL_ID, CLAUDE_CREDENTIAL_VARIABLES, CLAUDE_ENV_FILE, CLAUDE_PORT, CLAUDE_SOCKET, DESTINATION_BASE_PORT, EVAL_INPUT_DIR, FORWARDED_CLAUDE_CREDENTIAL_VARIABLES, GATEWAY_PORT, GATEWAY_SOCKET, JOB_MOUNT, MAVEN_NO_PROXY_NOTE, MAVEN_SETTINGS_FILE, MAVEN_SPACE_NOTE, PROXY_WARNING_FLAG, RELAY_PORT, authorEnvironment, buildEnvironment, buildMavenSettingsXml, builtInEnvironment, checkEnvironment, checkoutPath, claudeCredential, claudeCredentialVariablesSet, claudeEnvPath, commitIdentityRecord, containerLocalAddress, credentialLineIn, currentClaudeCredential, destinationEnvironment, headerVariables, heldClaudeCredential, isRefusedInConfig, isReservedVariable, lifecycleWorkdir, managedClaudeCredential, mavenArgs, mavenSettingsXml, namesGlobalSettings, parseClaimIdentity, parseClaimedRepositories, parseIsolation, parseUnreachable, primaryOf, proxyEnvironment, readClaudeCredential, removedClaudeCredentialValues, repositoriesOf, repositoryPath, resolveDestinations, sharedUserEnvironment, startBuildServices, takeClaudeCredential, tokenHeader, withGitConfig, withHooksPath, withProxyWarningHidden, withTokenHeader, withTunnelRecord, withoutCredentialLines, writeBuildMavenSettings, writeMavenSettings };
|
|
@@ -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-RNVBSRZZ.js';
|
|
4
|
+
import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-36T6W5RA.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-YZKRM7IP.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,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { scrubReason, stripTerminalControls } from './chunk-
|
|
4
|
-
import { RunnerAlreadyRunningError, readPidFile } from './chunk-
|
|
3
|
+
import { scrubReason, stripTerminalControls } from './chunk-RNVBSRZZ.js';
|
|
4
|
+
import { RunnerAlreadyRunningError, readPidFile } from './chunk-ENFBYN4A.js';
|
|
5
5
|
import { isSameProcess } from './chunk-JBJTC3UU.js';
|
|
6
|
-
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-
|
|
7
|
-
import { isSignatureRefusal, postJson } from './chunk-
|
|
8
|
-
import { signerFor } from './chunk-
|
|
9
|
-
import { pidFilePath } from './chunk-
|
|
6
|
+
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-AABYHGVO.js';
|
|
7
|
+
import { isSignatureRefusal, postJson } from './chunk-IW6Z337K.js';
|
|
8
|
+
import { signerFor } from './chunk-XLJLR7EK.js';
|
|
9
|
+
import { pidFilePath } from './chunk-N7LAEN3T.js';
|
|
10
10
|
import { readFileSync } from 'fs';
|
|
11
11
|
|
|
12
12
|
createRequire(import.meta.url);
|
|
@@ -1,30 +1,30 @@
|
|
|
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-ZV2JJPDS.js';
|
|
5
5
|
import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-E7R2GIAW.js';
|
|
6
|
-
import { writePendingUpdate } from './chunk-
|
|
7
|
-
import { renderUpdateSteps } from './chunk-
|
|
8
|
-
import { releaseLease, isUnfinished, setStage, jobEnv, runHook, describeHookEnd, provisionMicroVm, deliverCommitHooks, provisionProcess, readProvisionOut, workdirProblem, MICROVM_COMMAND_DIR, commandLogOffset, startMicroVmCommand, microVmCommandLine, runCommand, startSender, finishJob, sampleGuest, foldSample, isContainerTracked, isMicroVmTracked, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, stopOrphanedMicroVms, unfinishedJobs, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, listTrackedJobs, restartSender, serveLease, vmAlive, writeGuestGhConfig, ALREADY_RELEASED, inTeardown } from './chunk-
|
|
6
|
+
import { writePendingUpdate } from './chunk-56ZHWIR2.js';
|
|
7
|
+
import { renderUpdateSteps } from './chunk-Z76GVJGQ.js';
|
|
8
|
+
import { releaseLease, isUnfinished, setStage, jobEnv, runHook, describeHookEnd, provisionMicroVm, deliverCommitHooks, provisionProcess, readProvisionOut, workdirProblem, MICROVM_COMMAND_DIR, commandLogOffset, startMicroVmCommand, microVmCommandLine, runCommand, startSender, finishJob, sampleGuest, foldSample, isContainerTracked, isMicroVmTracked, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, stopOrphanedMicroVms, unfinishedJobs, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, listTrackedJobs, restartSender, serveLease, vmAlive, writeGuestGhConfig, ALREADY_RELEASED, inTeardown } from './chunk-RNVBSRZZ.js';
|
|
9
9
|
import { JOB_STATE_FORMAT, readsJobState, jobStateFormatOf } from './chunk-ZVB57WI6.js';
|
|
10
|
-
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-
|
|
11
|
-
import { RUNNER_PROTOCOL } from './chunk-
|
|
12
|
-
import { realBlockedProbes, checkBlockedWithSlots, keepsHostBuilder } from './chunk-
|
|
13
|
-
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-
|
|
10
|
+
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-NW5PDZYA.js';
|
|
11
|
+
import { RUNNER_PROTOCOL } from './chunk-PAK5P2ND.js';
|
|
12
|
+
import { realBlockedProbes, checkBlockedWithSlots, keepsHostBuilder } from './chunk-SMMNU65K.js';
|
|
13
|
+
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-DUPM5LVJ.js';
|
|
14
14
|
import { RepoFilter } from './chunk-TBT347UY.js';
|
|
15
|
-
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, LEASE_SECONDS, attemptNote, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionEnvironment, resolveHostBuild, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, currentSkillCommand, formerSkillProblem, containerCommandExec, execCommandLine, startHostServices, setUpRunnerCgroup, sweepImageBuilders, measureDisk, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied, gitRemoteFor, startServicesFor, createLeaseChannel } from './chunk-
|
|
16
|
-
import { claimPidFile, writePidFile, readPidFile, releasePidFile } from './chunk-
|
|
15
|
+
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, LEASE_SECONDS, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionEnvironment, resolveHostBuild, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, currentSkillCommand, formerSkillProblem, containerCommandExec, execCommandLine, startHostServices, setUpRunnerCgroup, sweepImageBuilders, measureDisk, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, createLeaseChannel } from './chunk-POGPX7LI.js';
|
|
16
|
+
import { claimPidFile, writePidFile, readPidFile, releasePidFile } from './chunk-ENFBYN4A.js';
|
|
17
17
|
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
18
|
-
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-
|
|
19
|
-
import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-
|
|
18
|
+
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-AVLLJW5D.js';
|
|
19
|
+
import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-36T6W5RA.js';
|
|
20
20
|
import { isVersion, compareVersions, satisfiesRange } from './chunk-TQMI335S.js';
|
|
21
|
-
import { isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-
|
|
22
|
-
import { freeBytes, formatBytes, volumeBytes } from './chunk-
|
|
23
|
-
import { writeJobFile, ensureRunnerIdentity, readJobFile, exceedsDisk, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun, BUILD_LABEL, RUNNER_LABEL, readJobFileChecked } from './chunk-
|
|
24
|
-
import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-
|
|
25
|
-
import { loadHostKey, ensureHostKey, signerFor } from './chunk-
|
|
26
|
-
import { RUNNER_DIR_MODE, runnerDir, buildDir, attemptStamp, jobDir, RUNNER_FILE_MODE, jobsDir, pidFilePath, spoolDir, imagesDir, rootfsDir, builderCacheDiskPath } from './chunk-
|
|
27
|
-
import { parseClaimIdentity, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, sharedUserEnvironment, JOB_MOUNT, takeClaudeCredential, heldClaudeCredential, currentClaudeCredential } from './chunk-
|
|
21
|
+
import { isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-4XYC2663.js';
|
|
22
|
+
import { freeBytes, formatBytes, volumeBytes } from './chunk-UC2DKBMS.js';
|
|
23
|
+
import { writeJobFile, ensureRunnerIdentity, readJobFile, exceedsDisk, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun, BUILD_LABEL, RUNNER_LABEL, readJobFileChecked } from './chunk-MPDLZCXM.js';
|
|
24
|
+
import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-IW6Z337K.js';
|
|
25
|
+
import { loadHostKey, ensureHostKey, signerFor } from './chunk-XLJLR7EK.js';
|
|
26
|
+
import { RUNNER_DIR_MODE, runnerDir, buildDir, attemptStamp, jobDir, RUNNER_FILE_MODE, jobsDir, pidFilePath, spoolDir, imagesDir, rootfsDir, builderCacheDiskPath } from './chunk-N7LAEN3T.js';
|
|
27
|
+
import { parseClaimIdentity, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, sharedUserEnvironment, JOB_MOUNT, takeClaudeCredential, heldClaudeCredential, currentClaudeCredential } from './chunk-YOBQIXX6.js';
|
|
28
28
|
import { resolveVersion } from './chunk-RA3O54FC.js';
|
|
29
29
|
import { fdName } from './chunk-HACGUL52.js';
|
|
30
30
|
import { COMMAND_LOST_REASON, CONTAINER_STOPPED_REASON } from './chunk-MESOOLF4.js';
|
|
@@ -1881,7 +1881,7 @@ async function runTick(state) {
|
|
|
1881
1881
|
claimed = true;
|
|
1882
1882
|
break;
|
|
1883
1883
|
}
|
|
1884
|
-
if (attempt.kind === "outdated" || attempt.kind === "read_only" || attempt.kind === "signature" || attempt.kind === "no_item_key" || attempt.kind === "no_branch" || attempt.kind === "unreadable_repositories") {
|
|
1884
|
+
if (attempt.kind === "outdated" || attempt.kind === "read_only" || attempt.kind === "managed_refused" || attempt.kind === "signature" || attempt.kind === "no_item_key" || attempt.kind === "no_branch" || attempt.kind === "unreadable_repositories") {
|
|
1885
1885
|
return;
|
|
1886
1886
|
}
|
|
1887
1887
|
if (attempt.kind === "error") {
|
|
@@ -1905,7 +1905,7 @@ var CLAIM_REFUSAL_CODES = new Set(
|
|
|
1905
1905
|
"pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous pull_request_repository_not_connected repository_not_reachable branch_claimed_elsewhere".split(" ")
|
|
1906
1906
|
);
|
|
1907
1907
|
async function tryClaimAndStart(state, item, queue) {
|
|
1908
|
-
const { postJson: postJson2 } = await import('./work-cmd-
|
|
1908
|
+
const { postJson: postJson2 } = await import('./work-cmd-KCBU3RSD.js');
|
|
1909
1909
|
const log = logOf(state);
|
|
1910
1910
|
const hostKey = await loadHostKey(state.config.configPath);
|
|
1911
1911
|
const claim = await retrySend(
|
|
@@ -1942,6 +1942,10 @@ async function tryClaimAndStart(state, item, queue) {
|
|
|
1942
1942
|
reportRepeating(state, "the request signature", claim.message ?? claim.reason);
|
|
1943
1943
|
return { kind: "signature" };
|
|
1944
1944
|
}
|
|
1945
|
+
if (claim.code === "managed_credential_missing" || claim.code === "managed_builds_off") {
|
|
1946
|
+
reportRepeating(state, "the managed build", claim.message ?? claim.reason);
|
|
1947
|
+
return { kind: "managed_refused" };
|
|
1948
|
+
}
|
|
1945
1949
|
if (claim.code === "billing_read_only") {
|
|
1946
1950
|
reportRepeating(state, "the organization's billing", claim.message ?? claim.reason);
|
|
1947
1951
|
return { kind: "read_only" };
|
|
@@ -1970,6 +1974,7 @@ async function tryClaimAndStart(state, item, queue) {
|
|
|
1970
1974
|
return { kind: "error", reason: `${claim.reason} (${claim.attempts} attempt(s))` };
|
|
1971
1975
|
}
|
|
1972
1976
|
reportRepeating(state, "the organization's billing", void 0);
|
|
1977
|
+
reportRepeating(state, "the managed build", void 0);
|
|
1973
1978
|
reportRepeating(state, "the runner protocol", void 0);
|
|
1974
1979
|
state.upgradeRefused = false;
|
|
1975
1980
|
state.versionRefusalLogged = void 0;
|
|
@@ -2120,6 +2125,15 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
2120
2125
|
return;
|
|
2121
2126
|
}
|
|
2122
2127
|
if (active.ending) return;
|
|
2128
|
+
if (state.config.managed === true) {
|
|
2129
|
+
const fetched = await fetchManagedClaudeKey(state.config, item.number, { fetchImpl: state.deps.fetchImpl, now: state.deps.now, sleep: state.deps.sleep });
|
|
2130
|
+
if (active.ending) return;
|
|
2131
|
+
if (!fetched.ok) {
|
|
2132
|
+
await endOnManagedKeyRefusal(state, active, fetched);
|
|
2133
|
+
return;
|
|
2134
|
+
}
|
|
2135
|
+
holdManagedClaudeKey(dirPath, fetched.apiKey);
|
|
2136
|
+
}
|
|
2123
2137
|
}
|
|
2124
2138
|
if (state.config.hooks.report) {
|
|
2125
2139
|
setStage(job, dirPath, "report");
|
|
@@ -2532,6 +2546,21 @@ function buildTokensFor(state, active, item) {
|
|
|
2532
2546
|
}
|
|
2533
2547
|
});
|
|
2534
2548
|
}
|
|
2549
|
+
async function endOnManagedKeyRefusal(state, active, refused) {
|
|
2550
|
+
const log = logOf(state);
|
|
2551
|
+
const tag = `#${active.job.item}`;
|
|
2552
|
+
const code = refused.code ?? "unavailable";
|
|
2553
|
+
if (refused.code === "claim_expired" || refused.code === "claim_not_held") {
|
|
2554
|
+
log.error(`${tag} the build's Anthropic key was refused: ${code} \xB7 ending job as lease_lost`);
|
|
2555
|
+
await endJob(state, active, "lease_lost");
|
|
2556
|
+
} else if (refused.retryable || refused.code === "managed_credential_missing" || refused.code === "managed_builds_off") {
|
|
2557
|
+
log.error(`${tag} the build's Anthropic key could not be had (${code}) \xB7 releasing the claim to try again`);
|
|
2558
|
+
await endJob(state, active, void 0);
|
|
2559
|
+
} else {
|
|
2560
|
+
log.error(`${tag} the build's Anthropic key was refused: ${code} \xB7 ending job as failed`);
|
|
2561
|
+
await endJob(state, active, "failed", { stage: "provision", reason: code });
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2535
2564
|
async function endOnTokenRefusal(state, active, err, repository) {
|
|
2536
2565
|
const log = logOf(state);
|
|
2537
2566
|
const tag = `#${active.job.item}`;
|
|
@@ -2963,6 +2992,21 @@ async function rejoinMicroVmBuild(state, adopted) {
|
|
|
2963
2992
|
const fd = inherited.get(fdName(microvm.buildId, socket.replace(/\.sock$/, "")));
|
|
2964
2993
|
return fd === void 0 ? void 0 : (server) => runtime.vm.fdStore.listenOn(server, fd);
|
|
2965
2994
|
};
|
|
2995
|
+
if (config.managed === true) {
|
|
2996
|
+
const fetched = await fetchManagedClaudeKey(config, job.item, {
|
|
2997
|
+
fetchImpl: state.deps.fetchImpl,
|
|
2998
|
+
now: state.deps.now,
|
|
2999
|
+
sleep: state.deps.sleep,
|
|
3000
|
+
windowMs: ADOPTED_FETCH_RETRY_WINDOW_MS
|
|
3001
|
+
});
|
|
3002
|
+
if (!fetched.ok) {
|
|
3003
|
+
const code = fetched.code ?? "unavailable";
|
|
3004
|
+
log.error(`${tag} the adopted build's Anthropic key could not be had: ${code}`);
|
|
3005
|
+
const cause = fetched.retryable ? "the gateway could not be reached for it" : `the gateway refused it (${code})`;
|
|
3006
|
+
return { reason: `the adopted build's Anthropic key could not be had after the runner restarted: ${cause}`, why: "the gateway did not give its Anthropic key again" };
|
|
3007
|
+
}
|
|
3008
|
+
holdManagedClaudeKey(dirPath, fetched.apiKey);
|
|
3009
|
+
}
|
|
2966
3010
|
const tokens = buildTokensFor(state, adopted, job.item);
|
|
2967
3011
|
runtime.credentials.set(dirPath, tokens);
|
|
2968
3012
|
let servicesServed = false;
|
|
@@ -2995,7 +3039,7 @@ async function rejoinMicroVmBuild(state, adopted) {
|
|
|
2995
3039
|
}).catch((err) => log.error(`${tag} the read token could not be written for gh in the guest: ${describeCallFailure(err)}`));
|
|
2996
3040
|
});
|
|
2997
3041
|
await pushes;
|
|
2998
|
-
return servicesServed && leaseServed;
|
|
3042
|
+
return servicesServed && leaseServed ? true : { reason: MICROVM_SOCKETS_LOST_REASON, why: "the sockets it reaches the runner on could not be served again" };
|
|
2999
3043
|
}
|
|
3000
3044
|
async function adoptTrackedMicroVms(state, plan) {
|
|
3001
3045
|
const log = logOf(state);
|
|
@@ -3008,9 +3052,10 @@ async function adoptTrackedMicroVms(state, plan) {
|
|
|
3008
3052
|
const adopted = { job, dirPath, lastRenewAtMs: 0, cmd: null, cpuSample: null, ending: false };
|
|
3009
3053
|
state.jobs.set(dirPath, adopted);
|
|
3010
3054
|
attemptLogs.open(job.item, dirPath);
|
|
3011
|
-
|
|
3055
|
+
const rejoined = await rejoinMicroVmBuild(state, adopted);
|
|
3056
|
+
if (rejoined !== true) {
|
|
3012
3057
|
state.jobs.delete(dirPath);
|
|
3013
|
-
await finishMicroVmWhileAway(state, dirPath, job,
|
|
3058
|
+
await finishMicroVmWhileAway(state, dirPath, job, rejoined.reason, rejoined.why);
|
|
3014
3059
|
continue;
|
|
3015
3060
|
}
|
|
3016
3061
|
if (!await renewLeaseIfDue(state, adopted, nowOf(state).getTime())) continue;
|
|
@@ -3150,7 +3195,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
3150
3195
|
check: update.check ? () => update.check(configPath) : async () => {
|
|
3151
3196
|
const held = heldClaudeCredential();
|
|
3152
3197
|
const env = held === void 0 ? process.env : { ...process.env, [held.variable]: held.value };
|
|
3153
|
-
return (await import('./check-
|
|
3198
|
+
return (await import('./check-4TQZZOIQ.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
|
|
3154
3199
|
},
|
|
3155
3200
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
3156
3201
|
log
|
|
@@ -252,7 +252,7 @@ async function runClaudeLauncher(args, deps = {}) {
|
|
|
252
252
|
return 1;
|
|
253
253
|
}
|
|
254
254
|
} else {
|
|
255
|
-
const { resolveLaunchPlane } = await import('./control-plane-launch-
|
|
255
|
+
const { resolveLaunchPlane } = await import('./control-plane-launch-LHOV2FPA.js');
|
|
256
256
|
const plane = env[GOVERNANCE_VARIABLE] === "self" ? { kind: "none" } : await resolveLaunchPlane({ cwd, env, home, fetchImpl: deps.fetchImpl, stderr });
|
|
257
257
|
if (plane.kind === "none") {
|
|
258
258
|
const own2 = ownSkillsDirFor(cwd, home, [], stderr);
|