@outerlayer/cli 0.40.0-next.20261115191619 → 0.40.0-next.20261116010428
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 +8 -0
- package/dist/{agent-setup-URENTDUL.js → agent-setup-KUOWKHAG.js} +3 -3
- package/dist/{build-EORAZMYD.js → build-3BX3EJC3.js} +1 -1
- package/dist/build-info.json +1 -1
- package/dist/{check-BEXALLQK.js → check-CDO3XBCB.js} +17 -17
- package/dist/{chunk-3M2CYL3D.js → chunk-2HFE6POD.js} +1 -1
- package/dist/{chunk-UOP4OSVB.js → chunk-2YKSBXWU.js} +1 -1
- package/dist/{chunk-LHL666SD.js → chunk-4SAXGCD2.js} +2 -2
- package/dist/{chunk-B3GYDE4G.js → chunk-6PON5OB7.js} +16 -16
- package/dist/{chunk-F7AOOV5N.js → chunk-BAPRSDUR.js} +2 -2
- package/dist/{chunk-AFMLQMC3.js → chunk-CPE4SWRZ.js} +2 -2
- package/dist/{chunk-HJFTCOU5.js → chunk-DEPV3XZE.js} +3 -3
- package/dist/{chunk-4TVL4E53.js → chunk-DHB3M244.js} +88 -16
- package/dist/{chunk-VQ57S72O.js → chunk-EGYZGB2P.js} +1 -1
- package/dist/{chunk-XTUTQVBU.js → chunk-EVMSDUK7.js} +2 -2
- package/dist/{chunk-NFD6N7YJ.js → chunk-G5TK5XLA.js} +13 -11
- package/dist/{chunk-4KCQHUUH.js → chunk-GJCC6GXH.js} +1 -1
- package/dist/{chunk-L6B4O4UB.js → chunk-GODZ6QAN.js} +1 -1
- package/dist/{init-cmd-CKX3IZWR.js → chunk-HQIGQL6W.js} +2 -44
- package/dist/{chunk-5EU2V6W2.js → chunk-ICY3T4MI.js} +4 -4
- package/dist/{chunk-IGVOCKAC.js → chunk-IQWBUZ75.js} +23 -2
- package/dist/{chunk-R34OLRY7.js → chunk-LCZGMJXD.js} +1 -1
- package/dist/{chunk-5EQ2B6UE.js → chunk-QFAH525L.js} +1 -1
- package/dist/{chunk-IKJEN5R4.js → chunk-SDLWJF6H.js} +1 -1
- package/dist/{chunk-IXZG7OJ6.js → chunk-SEKJKOOB.js} +1 -1
- package/dist/chunk-SYFVCV2V.js +124 -0
- package/dist/{chunk-BAE5M4N3.js → chunk-TQ3PXYPJ.js} +1 -1
- package/dist/{chunk-AHDX5KXH.js → chunk-W2SZ5SLF.js} +2 -2
- package/dist/{chunk-ASHPKDV4.js → chunk-WKPOKOUQ.js} +1 -1
- package/dist/{chunk-VL3IS7S2.js → chunk-YDB72T5Z.js} +1 -1
- package/dist/{chunk-QW7T7OMV.js → chunk-YYSW7OKI.js} +1 -1
- package/dist/{cli-JOQ7XODJ.js → cli-BK35Y57F.js} +133 -92
- package/dist/{command-V5DNIID2.js → command-7U4LHEYA.js} +14 -14
- package/dist/{connect-cmd-QX7WJ65U.js → connect-cmd-UYJV435V.js} +2 -2
- package/dist/{container-start-OF6XTAQZ.js → container-start-UCKTFOIU.js} +14 -14
- package/dist/{context-show-cmd-2ABJ5B66.js → context-show-cmd-XIPY7JXC.js} +3 -3
- package/dist/{demo-voice-cmd-ZGT6ZKH4.js → demo-voice-cmd-ABTYSDTU.js} +7 -7
- package/dist/{doctor-7I2OAX3E.js → doctor-EPWDQQKT.js} +14 -14
- package/dist/{emit-artifact-cmd-2KQYKVRF.js → emit-artifact-cmd-R5BOINKV.js} +6 -6
- package/dist/{emit-criteria-cmd-JOYI5L6K.js → emit-criteria-cmd-VWCPZ3TV.js} +4 -4
- package/dist/{emit-demo-cmd-J4N2P7MS.js → emit-demo-cmd-QPF3MGY3.js} +7 -7
- package/dist/{emit-finding-cmd-QPSTTD7U.js → emit-finding-cmd-O2HNKNSU.js} +4 -4
- package/dist/{emit-result-cmd-KPAS6BS4.js → emit-result-cmd-CFS2YAS5.js} +5 -5
- package/dist/{emit-step-cmd-GQDRQ6JS.js → emit-step-cmd-Q43ESQ5J.js} +4 -4
- package/dist/{findings-cmd-57E6BXM2.js → findings-cmd-ZWNSAECA.js} +4 -4
- package/dist/{governing-source-O6VIHNZG.js → governing-source-MIRABOUE.js} +5 -5
- package/dist/{host-checks-TYNZW3BL.js → host-checks-NCV7XV2D.js} +12 -12
- package/dist/index.js +1 -1
- package/dist/{init-DZ6FIJ76.js → init-M3TDJHO7.js} +12 -12
- package/dist/{init-IJB3AHGA.js → init-Z7XXH24Q.js} +12 -12
- package/dist/{init-agent-OMJ24Z6I.js → init-agent-3IOE4J7S.js} +12 -12
- package/dist/init-cmd-HEFGRQBE.js +53 -0
- package/dist/{init-update-W3CNPIEJ.js → init-update-GHLRW7BP.js} +3 -3
- package/dist/{login-browser-KJPWH65X.js → login-browser-OA4R4PEQ.js} +1 -1
- package/dist/{loop-G3OTFQXF.js → loop-VJF7N3KN.js} +17 -17
- package/dist/{machine-SNJTMFTB.js → machine-FPD6GHWQ.js} +12 -12
- package/dist/{run-cmd-NEZVPFFG.js → run-cmd-W2XIBU2G.js} +4 -4
- package/dist/{runner-key-QOHUYHY3.js → runner-key-GYBBYSEX.js} +12 -12
- package/dist/{session-sender-6HKSOFQ2.js → session-sender-NDP6HVSG.js} +6 -6
- package/dist/setup-cmd-PQTTUAXH.js +214 -0
- package/dist/setup-wiring-K3MWFPIV.js +200 -0
- package/dist/{spec-cmd-53UFNXNH.js → spec-cmd-LEU2PGWP.js} +5 -5
- package/dist/{status-WBMU7ZGL.js → status-HN2P42KT.js} +12 -12
- package/dist/{sync-cmd-5FAB4CAX.js → sync-cmd-Q3FERZNI.js} +5 -5
- package/dist/{update-steps-UZWYIHPS.js → update-steps-PUM35QNI.js} +13 -13
- package/dist/{watch-GKQOIY7F.js → watch-2Z2HFUIL.js} +5 -5
- package/dist/{work-claim-cmd-PZFPD3NS.js → work-claim-cmd-D35DOCE6.js} +5 -5
- package/dist/{work-cmd-JANDUCNE.js → work-cmd-JNSI6X5D.js} +4 -4
- package/dist/{work-comment-cmd-ZIDXYWNH.js → work-comment-cmd-4AD66BWL.js} +5 -5
- package/dist/{work-demo-cmd-7OKBQG37.js → work-demo-cmd-BBNNMB4P.js} +4 -4
- package/dist/{work-logs-cmd-2XDRIBM2.js → work-logs-cmd-EU2Z2P2F.js} +4 -4
- package/dist/{work-mock-cmd-RFBGDQST.js → work-mock-cmd-5W52S7J5.js} +4 -4
- package/dist/{work-needs-attention-cmd-EY5FLR35.js → work-needs-attention-cmd-6X3DMFB3.js} +4 -4
- package/dist/{work-no-change-cmd-UOLGPCI2.js → work-no-change-cmd-JS5GWIV5.js} +4 -4
- package/dist/{work-open-pr-cmd-WBWODWGY.js → work-open-pr-cmd-3KHOY5KT.js} +5 -5
- package/dist/{work-pr-cmd-6733KSPR.js → work-pr-cmd-LJDDDQS4.js} +4 -4
- package/dist/{work-proofs-cmd-6SAG6KV5.js → work-proofs-cmd-GB5D3YAW.js} +5 -5
- package/dist/{work-proofs-record-TGTMNKBG.js → work-proofs-record-JMWVM7FR.js} +10 -10
- package/dist/{work-stop-cmd-A32J3PL7.js → work-stop-cmd-WTKUFCEF.js} +4 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -269,6 +269,14 @@ content:
|
|
|
269
269
|
Nothing else leaves the machine. The choice is saved in the repository's git directory, at
|
|
270
270
|
`outerlayer/connection.json`, which git never tracks. With a factory key it
|
|
271
271
|
makes no network call. `outerlayer init --local` makes none either.
|
|
272
|
+
- **`outerlayer setup`** does what `login`, `init` and `connect` do, as
|
|
273
|
+
above, and then checks how far setup has come. It runs `git fetch` of the
|
|
274
|
+
base branch from `origin`, and `git ls-remote` for the `outerlayer-setup`
|
|
275
|
+
branch. It sends `GET /v1/apps/<factory id>/git/links` to read the base
|
|
276
|
+
branch, and `GET /v1/hosts` to ask whether a runner has checked in, with
|
|
277
|
+
your login's token. With `--open-pr` it runs `git push` of the
|
|
278
|
+
`outerlayer-setup` branch, and `gh pr create` where `gh` is signed in. It
|
|
279
|
+
sends nothing else, and never sends a key or a token in a URL.
|
|
272
280
|
- **`outerlayer logout`** sends the saved token to your dashboard
|
|
273
281
|
(`POST /api/cli/logout`) so it is revoked, then deletes it from the config
|
|
274
282
|
file. It sends nothing else.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { keepHandWritten, runAgentSetup } from './chunk-
|
|
3
|
+
export { keepHandWritten, runAgentSetup } from './chunk-WKPOKOUQ.js';
|
|
4
4
|
import './chunk-BFZDVD7T.js';
|
|
5
5
|
import './chunk-7PFRNOSF.js';
|
|
6
6
|
import './chunk-TQPFWWND.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-IQWBUZ75.js';
|
|
8
8
|
import './chunk-DV44KCM6.js';
|
|
9
9
|
import './chunk-XDBHRWPQ.js';
|
|
10
|
-
import './chunk-
|
|
10
|
+
import './chunk-DHB3M244.js';
|
|
11
11
|
import './chunk-A2LHHKTT.js';
|
|
12
12
|
import './chunk-2AM6Z5BP.js';
|
|
13
13
|
import './chunk-ISRMDI2H.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { KEY_PREFIX, SHARED_NAME, SHARED_OWNER, SHARED_REPOSITORY, TAG_HOST, UNIVERSAL_SOURCE_LABEL, baseLines, buildRepositoryImage, metadataFromLabels, prepareImageBuild, readRepositoryRecipe, universalBase, writeRecord } from './chunk-
|
|
3
|
+
export { KEY_PREFIX, SHARED_NAME, SHARED_OWNER, SHARED_REPOSITORY, TAG_HOST, UNIVERSAL_SOURCE_LABEL, baseLines, buildRepositoryImage, metadataFromLabels, prepareImageBuild, readRepositoryRecipe, universalBase, writeRecord } from './chunk-SDLWJF6H.js';
|
|
4
4
|
import './chunk-YN6EKURT.js';
|
|
5
5
|
import './chunk-MGN525G6.js';
|
|
6
6
|
import './chunk-JBJTC3UU.js';
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"2026-11-
|
|
1
|
+
{"id":"2026-11-16T01:11:54.811Z","root":"/home/runner/work/outerlayer/outerlayer","pkg":"outerlayer"}
|
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { probeCredentials } from './chunk-
|
|
3
|
+
import { probeCredentials } from './chunk-6PON5OB7.js';
|
|
4
|
+
import './chunk-UTSBE4MP.js';
|
|
4
5
|
import './chunk-E7R2GIAW.js';
|
|
5
|
-
import './chunk-
|
|
6
|
+
import './chunk-CPE4SWRZ.js';
|
|
7
|
+
import './chunk-GJCC6GXH.js';
|
|
6
8
|
import './chunk-TXKHD4Q6.js';
|
|
7
9
|
import './chunk-Y6FI3HCQ.js';
|
|
8
10
|
import './chunk-XOKGCNSG.js';
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-UTSBE4MP.js';
|
|
11
|
-
import { fleetConfigProblem, managedProblems, managedFactsOf, askFleetMachine } from './chunk-AHDX5KXH.js';
|
|
11
|
+
import { fleetConfigProblem, managedProblems, managedFactsOf, askFleetMachine } from './chunk-W2SZ5SLF.js';
|
|
12
12
|
import './chunk-PT3DOY6P.js';
|
|
13
13
|
import { findServiceUnit } from './chunk-HEJ4UYSX.js';
|
|
14
|
-
import { createGatewaySandboxClient, gatewayRefusalReason, placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, HELPER_ENV, helperSocketPath, probeHelper, needsAgentCredential, agentCredentialCheck, claimPermissionProblem, formerSkillQueues, modellessQueues, formerSkillProblem, modellessProblem } from './chunk-
|
|
15
|
-
import './chunk-PG4UW6QW.js';
|
|
14
|
+
import { createGatewaySandboxClient, gatewayRefusalReason, placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, HELPER_ENV, helperSocketPath, probeHelper, needsAgentCredential, agentCredentialCheck, claimPermissionProblem, formerSkillQueues, modellessQueues, formerSkillProblem, modellessProblem } from './chunk-G5TK5XLA.js';
|
|
16
15
|
import './chunk-JXZ3LIHN.js';
|
|
17
|
-
import './chunk-
|
|
16
|
+
import './chunk-PG4UW6QW.js';
|
|
18
17
|
import './chunk-I3LTIAOR.js';
|
|
18
|
+
import './chunk-2PGI6RDE.js';
|
|
19
19
|
import './chunk-AEAKGO6N.js';
|
|
20
20
|
import './chunk-4L3WCEOI.js';
|
|
21
21
|
import './chunk-R3RALX7H.js';
|
|
22
22
|
import './chunk-2PRLSABK.js';
|
|
23
23
|
import './chunk-55GT5FLR.js';
|
|
24
|
-
import './chunk-
|
|
25
|
-
import './chunk-
|
|
26
|
-
import './chunk-
|
|
24
|
+
import './chunk-LCZGMJXD.js';
|
|
25
|
+
import './chunk-TQ3PXYPJ.js';
|
|
26
|
+
import './chunk-EGYZGB2P.js';
|
|
27
27
|
import './chunk-C2PZOLN7.js';
|
|
28
28
|
import './chunk-B4XB5QFD.js';
|
|
29
29
|
import './chunk-RIITHK4F.js';
|
|
30
30
|
import './chunk-TQMI335S.js';
|
|
31
31
|
import './chunk-F4HSDGFO.js';
|
|
32
32
|
import './chunk-NN33FYXG.js';
|
|
33
|
-
import './chunk-
|
|
33
|
+
import './chunk-SDLWJF6H.js';
|
|
34
34
|
import './chunk-YN6EKURT.js';
|
|
35
35
|
import './chunk-MGN525G6.js';
|
|
36
36
|
import './chunk-JBJTC3UU.js';
|
|
37
37
|
import './chunk-OGFGZQA3.js';
|
|
38
38
|
import './chunk-6FHMWJHK.js';
|
|
39
39
|
import './chunk-OUL5E5UC.js';
|
|
40
|
-
import { describeCallFailure } from './chunk-
|
|
40
|
+
import { describeCallFailure } from './chunk-YDB72T5Z.js';
|
|
41
41
|
import './chunk-FJGYU2EK.js';
|
|
42
|
-
import './chunk-
|
|
42
|
+
import './chunk-BAPRSDUR.js';
|
|
43
43
|
import './chunk-IKGAVS5X.js';
|
|
44
|
-
import './chunk-
|
|
44
|
+
import './chunk-QFAH525L.js';
|
|
45
45
|
import { keyRunnerFactory, loadRunnerConfig, RunnerConfigError, checkHooks } from './chunk-V2O6KLTQ.js';
|
|
46
46
|
import './chunk-OC3BSNNE.js';
|
|
47
47
|
import './chunk-TCPWJBH5.js';
|
|
48
48
|
import './chunk-ZBD2YOGH.js';
|
|
49
49
|
import './chunk-7PFRNOSF.js';
|
|
50
50
|
import './chunk-TQPFWWND.js';
|
|
51
|
-
import './chunk-
|
|
51
|
+
import './chunk-IQWBUZ75.js';
|
|
52
52
|
import './chunk-DV44KCM6.js';
|
|
53
53
|
import './chunk-XDBHRWPQ.js';
|
|
54
|
-
import './chunk-
|
|
54
|
+
import './chunk-DHB3M244.js';
|
|
55
55
|
import './chunk-A2LHHKTT.js';
|
|
56
56
|
import './chunk-2AM6Z5BP.js';
|
|
57
57
|
import './chunk-ISRMDI2H.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { helperSocketPath } from './chunk-
|
|
3
|
+
import { helperSocketPath } from './chunk-G5TK5XLA.js';
|
|
4
4
|
import { UNIT_MARKER } from './chunk-4L3WCEOI.js';
|
|
5
5
|
import { runnerDir } from './chunk-DYV2OC4S.js';
|
|
6
6
|
import { createHash } from 'crypto';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { launchRefusalForSession } from './chunk-C2PZOLN7.js';
|
|
4
4
|
import { detectActiveSession, transcriptPathForSession } from './chunk-IKGAVS5X.js';
|
|
5
|
-
import { autoConnect } from './chunk-
|
|
5
|
+
import { autoConnect } from './chunk-QFAH525L.js';
|
|
6
6
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
7
7
|
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-N7PG5JAD.js';
|
|
8
8
|
import { readLatestProvenanceForSession } from './chunk-545P7JY7.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
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-EVMSDUK7.js';
|
|
5
5
|
import { VoiceDownloadError, downloadPinned, sha256OfFile } from './chunk-2PGI6RDE.js';
|
|
6
6
|
import { detectActiveSession } from './chunk-IKGAVS5X.js';
|
|
7
|
-
import { autoConnect } from './chunk-
|
|
7
|
+
import { autoConnect } from './chunk-QFAH525L.js';
|
|
8
8
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
9
9
|
import { defaultFetch, resolveGatewayCredentials } from './chunk-N7PG5JAD.js';
|
|
10
10
|
import { launchedItemForSession } from './chunk-LGJ56FCM.js';
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
+
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-UTSBE4MP.js';
|
|
3
4
|
import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-E7R2GIAW.js';
|
|
4
|
-
import { reportFailedStart, fitImageBuildMemory } from './chunk-
|
|
5
|
+
import { reportFailedStart, fitImageBuildMemory } from './chunk-CPE4SWRZ.js';
|
|
6
|
+
import { renderUpdateSteps } from './chunk-GJCC6GXH.js';
|
|
5
7
|
import { decideInstalledSwitch } from './chunk-TXKHD4Q6.js';
|
|
6
8
|
import { writeFleetState } from './chunk-Y6FI3HCQ.js';
|
|
7
9
|
import { writePendingUpdate } from './chunk-XOKGCNSG.js';
|
|
8
|
-
import {
|
|
9
|
-
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-UTSBE4MP.js';
|
|
10
|
-
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-AHDX5KXH.js';
|
|
10
|
+
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-W2SZ5SLF.js';
|
|
11
11
|
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-PT3DOY6P.js';
|
|
12
|
-
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, itemTag, releaseLease, runDecision, claimRun, LEASE_SECONDS, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, restoreSessionIntoSandbox, restoreWork, keptSessionDir, workRestoredEnv, sessionGuestOfMicroVm, sessionGuestOfContainer, sessionGuestOfSandbox, 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, runCommandOf, AttemptLogBook, environmentFor, builtOf, judgeCredential, readWorkItem, makeRecorder, microVmOomKills, needsRenew, renewRun, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, sweepSandboxes, keptSandboxIds, parseCpuList, ensureTunnel, keepGhConfigCurrent, restartSender, rejoinSandboxBuild, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, shellQuote, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, treeFileText, timeoutAfter, scrubReason, ensureNetworkReady, ADOPTED_FETCH_RETRY_WINDOW_MS, managedBuildSettingsFor, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, writeGuestGhConfig, deliverJobFiles, inTeardown } from './chunk-
|
|
13
|
-
import { criteriaOf, loadCitationFinder, wholeItems, itemsSentence, oneLineReason, wholeEntries, parseJudgeAnswer } from './chunk-PG4UW6QW.js';
|
|
12
|
+
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, itemTag, releaseLease, runDecision, claimRun, LEASE_SECONDS, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, restoreSessionIntoSandbox, restoreWork, keptSessionDir, workRestoredEnv, sessionGuestOfMicroVm, sessionGuestOfContainer, sessionGuestOfSandbox, 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, runCommandOf, AttemptLogBook, environmentFor, builtOf, judgeCredential, readWorkItem, makeRecorder, microVmOomKills, needsRenew, renewRun, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, sweepSandboxes, keptSandboxIds, parseCpuList, ensureTunnel, keepGhConfigCurrent, restartSender, rejoinSandboxBuild, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, shellQuote, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, treeFileText, timeoutAfter, scrubReason, ensureNetworkReady, ADOPTED_FETCH_RETRY_WINDOW_MS, managedBuildSettingsFor, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, writeGuestGhConfig, deliverJobFiles, inTeardown } from './chunk-G5TK5XLA.js';
|
|
14
13
|
import { RUNNER_PROTOCOL } from './chunk-JXZ3LIHN.js';
|
|
14
|
+
import { criteriaOf, loadCitationFinder, wholeItems, itemsSentence, oneLineReason, wholeEntries, parseJudgeAnswer } from './chunk-PG4UW6QW.js';
|
|
15
15
|
import { RUNNER_RESERVE_BYTES } from './chunk-4L3WCEOI.js';
|
|
16
|
-
import { RepoFilter } from './chunk-
|
|
16
|
+
import { RepoFilter } from './chunk-TQ3PXYPJ.js';
|
|
17
17
|
import { JOB_STATE_FORMAT, readsJobState, jobStateFormatOf } from './chunk-B4XB5QFD.js';
|
|
18
18
|
import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-RIITHK4F.js';
|
|
19
19
|
import { isVersion, compareVersions, satisfiesRange } from './chunk-TQMI335S.js';
|
|
20
20
|
import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls, itemCalls, configForJob } from './chunk-F4HSDGFO.js';
|
|
21
|
-
import { fetchCommit, readBranchHead, diffBetween } from './chunk-
|
|
21
|
+
import { fetchCommit, readBranchHead, diffBetween } from './chunk-SDLWJF6H.js';
|
|
22
22
|
import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-MGN525G6.js';
|
|
23
23
|
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
24
|
-
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-
|
|
25
|
-
import { WorkCommandError, isSignatureRefusal, getJson, postJson, getBytes } from './chunk-
|
|
24
|
+
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-YDB72T5Z.js';
|
|
25
|
+
import { WorkCommandError, isSignatureRefusal, getJson, postJson, getBytes } from './chunk-BAPRSDUR.js';
|
|
26
26
|
import { keyRunnerFactory, readsOnly, isBuiltinSandbox, isBuiltinContainer, isBuiltinVm, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, runnerDeliversComments, DEFAULT_CHECK_TIME_LIMIT_MINUTES, readOnlyRemoteOf, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS, readOnlyOption } from './chunk-V2O6KLTQ.js';
|
|
27
27
|
import { allocatedBytes, freeBytes, formatBytes } from './chunk-OC3BSNNE.js';
|
|
28
28
|
import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, JUDGE_TREE, exceedsDisk, runnerLabelValue, builderName, ensureFailureCount, builderSpec, ensureBuilder, spawnRun, judgeCommand, JUDGE_DIR, JUDGE_MAX_TURNS } from './chunk-TCPWJBH5.js';
|
|
@@ -1588,7 +1588,7 @@ function readReviewInstructions(root = resolvePackRoot()) {
|
|
|
1588
1588
|
}
|
|
1589
1589
|
function reviewIsolation(config) {
|
|
1590
1590
|
const kind = builtinKind(config.hooks.provision);
|
|
1591
|
-
return kind === "
|
|
1591
|
+
return kind === "own" ? void 0 : kind === "container" ? "container" : "vm";
|
|
1592
1592
|
}
|
|
1593
1593
|
function takesReview(config, agents = defaultAgents()) {
|
|
1594
1594
|
if (reviewIsolation(config) === void 0) return false;
|
|
@@ -1661,7 +1661,7 @@ async function runReviewJob(input) {
|
|
|
1661
1661
|
const agent = judgeAgent(runtime.agents);
|
|
1662
1662
|
if (agent?.adapter.headless === void 0) return await notRun(`${agent?.descriptor.label ?? "the agent list"} has no headless part, so it cannot run the review`);
|
|
1663
1663
|
const environment = environmentFor({ config, job, jobDir: jobDir2, deps });
|
|
1664
|
-
if (environment === void 0) return await notRun("the review job has no container or
|
|
1664
|
+
if (environment === void 0) return await notRun("the review job has no container, microVM or sandbox to run in");
|
|
1665
1665
|
const expected = builtOf(job)?.judgeProgram;
|
|
1666
1666
|
if (expected === void 0) return await notRun(`the image has no ${agent.descriptor.label} for the review`);
|
|
1667
1667
|
const credential = judgeCredential(config, jobDir2, runtime);
|
|
@@ -3199,7 +3199,7 @@ var CLAIM_REFUSAL_CODES = new Set(
|
|
|
3199
3199
|
"pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous pull_request_repository_not_connected repository_not_reachable branch_claimed_elsewhere".split(" ")
|
|
3200
3200
|
);
|
|
3201
3201
|
async function tryClaimAndStart(state, item, queue) {
|
|
3202
|
-
const { postJson: postJson2 } = await import('./work-cmd-
|
|
3202
|
+
const { postJson: postJson2 } = await import('./work-cmd-JNSI6X5D.js');
|
|
3203
3203
|
const log = logOf(state);
|
|
3204
3204
|
const hostKey = await loadHostKey(state.config.configPath);
|
|
3205
3205
|
const claim = await retrySend(
|
|
@@ -3567,8 +3567,8 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
3567
3567
|
}
|
|
3568
3568
|
}
|
|
3569
3569
|
if (queue === "review" && reviewIsolation(state.config) === void 0) {
|
|
3570
|
-
log.error(`${tag} the runner's hooks no longer name a container or
|
|
3571
|
-
await endJob(state, active, "failed", { stage: "provision", reason: "a code review goes only to a build in a container or a
|
|
3570
|
+
log.error(`${tag} the runner's hooks no longer name a container, microVM or sandbox build, and a code review takes none other \xB7 ending job as failed`);
|
|
3571
|
+
await endJob(state, active, "failed", { stage: "provision", reason: "a code review goes only to a build in a container, a microVM or a sandbox" });
|
|
3572
3572
|
return;
|
|
3573
3573
|
}
|
|
3574
3574
|
setStage(job, dirPath, "provision");
|
|
@@ -4824,7 +4824,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
4824
4824
|
check: update.check ? () => update.check(configPath) : async () => {
|
|
4825
4825
|
const held = runnerAgents(deps.agents).flatMap((agent) => heldAgentCredential(agent.descriptor.id) ?? []);
|
|
4826
4826
|
const env = { ...process.env, ...Object.fromEntries(held.map((credential) => [credential.variable, credential.value])) };
|
|
4827
|
-
return (await import('./check-
|
|
4827
|
+
return (await import('./check-CDO3XBCB.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
|
|
4828
4828
|
},
|
|
4829
4829
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
4830
4830
|
log
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { detectActiveSession } from './chunk-IKGAVS5X.js';
|
|
4
|
-
import { autoConnect } from './chunk-
|
|
5
|
-
import { workPageUrl } from './chunk-
|
|
4
|
+
import { autoConnect } from './chunk-QFAH525L.js';
|
|
5
|
+
import { workPageUrl } from './chunk-IQWBUZ75.js';
|
|
6
6
|
import { sanitizeTerminal } from './chunk-DV44KCM6.js';
|
|
7
7
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
8
8
|
import { resolveGatewayCredentials, unauthorizedMessage, defaultFetch } from './chunk-N7PG5JAD.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { scrubReason, stripTerminalControls } from './chunk-
|
|
3
|
+
import { scrubReason, stripTerminalControls } from './chunk-G5TK5XLA.js';
|
|
4
4
|
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-4L3WCEOI.js';
|
|
5
5
|
import { RunnerAlreadyRunningError, readPidFile } from './chunk-MGN525G6.js';
|
|
6
6
|
import { isSameProcess } from './chunk-JBJTC3UU.js';
|
|
7
|
-
import { isSignatureRefusal, postJson } from './chunk-
|
|
7
|
+
import { isSignatureRefusal, postJson } from './chunk-BAPRSDUR.js';
|
|
8
8
|
import { keyRunnerFactory } from './chunk-V2O6KLTQ.js';
|
|
9
9
|
import { signerFor } from './chunk-NDDXBJMX.js';
|
|
10
10
|
import { pidFilePath } from './chunk-DYV2OC4S.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { checkStarterFiles, contextIsGoverned } from './chunk-R3RALX7H.js';
|
|
4
|
-
import { resolveCredentials, getJson, WorkCommandError } from './chunk-
|
|
4
|
+
import { resolveCredentials, getJson, WorkCommandError } from './chunk-BAPRSDUR.js';
|
|
5
5
|
import { fleetCheck, checkBuildSkill, checkSpecSkill, checkMachineSkills, checkCommittedMaintainedSkills, checkMaintainedReferences, checkIgnoredSkillFolders } from './chunk-ZDXEZPRM.js';
|
|
6
6
|
import { withInjectedPrograms } from './chunk-5SKYWQ64.js';
|
|
7
|
-
import { isLinkedRepository } from './chunk-
|
|
7
|
+
import { isLinkedRepository } from './chunk-IQWBUZ75.js';
|
|
8
8
|
import { sanitizeTerminal } from './chunk-DV44KCM6.js';
|
|
9
9
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
10
10
|
import { checkFormerSkillNames } from './chunk-7GJGSADZ.js';
|
|
@@ -1122,7 +1122,7 @@ async function gatherDoctorChecks(options = {}) {
|
|
|
1122
1122
|
const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
|
|
1123
1123
|
checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
|
|
1124
1124
|
} else if (hasRunnerBlock(configPath)) {
|
|
1125
|
-
const { runnerHostChecks } = await import('./doctor-
|
|
1125
|
+
const { runnerHostChecks } = await import('./doctor-EPWDQQKT.js');
|
|
1126
1126
|
const gateway = (() => {
|
|
1127
1127
|
try {
|
|
1128
1128
|
const loaded = loadRunnerConfig(configPath);
|
|
@@ -6,7 +6,7 @@ import { readCloudConfigStrict, CloudConfigError, readCloudConfig, writeCloudCon
|
|
|
6
6
|
import { findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
7
7
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
8
8
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
9
|
-
import { CLI_LOGIN_MACHINE_NAME_MAX,
|
|
9
|
+
import { CLI_LOGIN_MACHINE_NAME_MAX, CLI_LOGIN_KIND, CliLoginRefusalSchema, CliLoginStartedSchema, CliLoginPollResponseSchema } from './chunk-MCUI6RHU.js';
|
|
10
10
|
import { generateKeyPairSync, privateDecrypt, constants, createPrivateKey } from 'crypto';
|
|
11
11
|
import { spawn } from 'child_process';
|
|
12
12
|
import { fstatSync, existsSync, readdirSync, readFileSync, rmSync, mkdirSync, chmodSync, writeFileSync } from 'fs';
|
|
@@ -252,20 +252,9 @@ function waitingDocument(link, code, id) {
|
|
|
252
252
|
return JSON.stringify({ status: "waiting", url: link, code, check: `${cliInvocation()} login --check ${id}` }) + "\n";
|
|
253
253
|
}
|
|
254
254
|
async function finishApproved(flags, deps, home, dashboard, approved, privateKeyPem) {
|
|
255
|
-
const
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
writeCloudConfig({ accountToken, url: approved.gatewayUrl, dashboard }, home);
|
|
259
|
-
} catch (err) {
|
|
260
|
-
const revoked = await revokeTokenOnDashboard(deps.fetchImpl, dashboard, accountToken);
|
|
261
|
-
return fail(
|
|
262
|
-
deps,
|
|
263
|
-
`could not save the login: ${err instanceof Error ? err.message : String(err)}. ` + (revoked === "revoked" ? `The token was revoked; run ${cliInvocation()} login again.` : "The token could not be revoked; revoke it on the CLI logins list at /profile/security.")
|
|
264
|
-
);
|
|
265
|
-
}
|
|
266
|
-
if (before.accountToken && before.accountToken !== accountToken) {
|
|
267
|
-
await revokeTokenOnDashboard(deps.fetchImpl, before.dashboard ?? dashboard, before.accountToken);
|
|
268
|
-
}
|
|
255
|
+
const saved = await saveApproved(deps, home, dashboard, approved, privateKeyPem);
|
|
256
|
+
if (!saved.ok) return fail(deps, saved.message);
|
|
257
|
+
const { before } = saved;
|
|
269
258
|
const path = cloudConfigPath(home);
|
|
270
259
|
if (flags.json) {
|
|
271
260
|
deps.stdout.write(JSON.stringify({ path, url: approved.gatewayUrl, email: approved.email }) + "\n");
|
|
@@ -280,6 +269,89 @@ async function finishApproved(flags, deps, home, dashboard, approved, privateKey
|
|
|
280
269
|
}
|
|
281
270
|
return 0;
|
|
282
271
|
}
|
|
272
|
+
async function saveApproved(deps, home, dashboard, approved, privateKeyPem) {
|
|
273
|
+
const accountToken = decryptToken(privateKeyPem, approved.encryptedToken);
|
|
274
|
+
const before = readCloudConfig(home);
|
|
275
|
+
try {
|
|
276
|
+
writeCloudConfig({ accountToken, url: approved.gatewayUrl, dashboard }, home);
|
|
277
|
+
} catch (err) {
|
|
278
|
+
const revoked = await revokeTokenOnDashboard(deps.fetchImpl, dashboard, accountToken);
|
|
279
|
+
return {
|
|
280
|
+
ok: false,
|
|
281
|
+
message: `could not save the login: ${err instanceof Error ? err.message : String(err)}. ` + (revoked === "revoked" ? `The token was revoked; run ${cliInvocation()} login again.` : "The token could not be revoked; revoke it on the CLI logins list at /profile/security.")
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
if (before.accountToken && before.accountToken !== accountToken) {
|
|
285
|
+
await revokeTokenOnDashboard(deps.fetchImpl, before.dashboard ?? dashboard, before.accountToken);
|
|
286
|
+
}
|
|
287
|
+
return { ok: true, before };
|
|
288
|
+
}
|
|
289
|
+
function newestPending(home, dashboard, now) {
|
|
290
|
+
const dir = pendingDir(home);
|
|
291
|
+
if (!existsSync(dir)) return void 0;
|
|
292
|
+
let newest;
|
|
293
|
+
for (const name of readdirSync(dir)) {
|
|
294
|
+
if (!name.endsWith(".json")) continue;
|
|
295
|
+
const pending = readPending(home, name.slice(0, -".json".length));
|
|
296
|
+
if (pending === null || pending.dashboard !== dashboard || Date.parse(pending.expires_at) <= now.getTime()) continue;
|
|
297
|
+
if (newest === void 0 || Date.parse(pending.expires_at) > Date.parse(newest.expires_at)) newest = pending;
|
|
298
|
+
}
|
|
299
|
+
return newest;
|
|
300
|
+
}
|
|
301
|
+
async function setupSignIn(deps, opts) {
|
|
302
|
+
const home = deps.home ?? homeFromEnv();
|
|
303
|
+
try {
|
|
304
|
+
const config = readCloudConfigStrict(home);
|
|
305
|
+
if (config.accountToken || config.apiKey) return { kind: "signed-in" };
|
|
306
|
+
const dashboard = normalizeDashboard(opts.dashboard);
|
|
307
|
+
purgeExpiredPending(home, deps.now());
|
|
308
|
+
const pending = newestPending(home, dashboard, deps.now());
|
|
309
|
+
if (pending === void 0) {
|
|
310
|
+
const { publicKey, privateKey } = generateKeyPairSync("rsa", {
|
|
311
|
+
modulusLength: 2048,
|
|
312
|
+
publicKeyEncoding: { type: "spki", format: "der" },
|
|
313
|
+
privateKeyEncoding: { type: "pkcs8", format: "pem" }
|
|
314
|
+
});
|
|
315
|
+
const started = await startLogin(deps, dashboard, publicKey.toString("base64"), sanitizeMachineName(deps.hostname()));
|
|
316
|
+
const url = approveLink(dashboard, started.code);
|
|
317
|
+
writePending(home, { id: started.id, dashboard, url, code: started.code, expires_at: started.expiresAt, private_key: privateKey });
|
|
318
|
+
if (opts.openBrowser) await deps.openBrowser(url);
|
|
319
|
+
return { kind: "waiting", url, code: started.code };
|
|
320
|
+
}
|
|
321
|
+
const deadline = deps.now().getTime() + opts.waitMs;
|
|
322
|
+
for (; ; ) {
|
|
323
|
+
const result = await pollLogin(deps, pending.dashboard, pending.id);
|
|
324
|
+
switch (result.kind) {
|
|
325
|
+
case "approved": {
|
|
326
|
+
try {
|
|
327
|
+
const saved = await saveApproved(deps, home, pending.dashboard, result, pending.private_key);
|
|
328
|
+
return saved.ok ? { kind: "signed-in", email: result.email } : { kind: "failed", message: saved.message };
|
|
329
|
+
} finally {
|
|
330
|
+
deletePending(home, pending.id);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
case "denied":
|
|
334
|
+
deletePending(home, pending.id);
|
|
335
|
+
return { kind: "failed", message: `the sign-in was denied. Run ${cliInvocation()} setup again to start a new one.` };
|
|
336
|
+
case "expired":
|
|
337
|
+
deletePending(home, pending.id);
|
|
338
|
+
return { kind: "failed", message: `the sign-in link expired. Run ${cliInvocation()} setup again to start a new one.` };
|
|
339
|
+
case "error":
|
|
340
|
+
return { kind: "failed", message: `could not check the sign-in: ${result.message}` };
|
|
341
|
+
case "pending":
|
|
342
|
+
case "slow":
|
|
343
|
+
case "unavailable":
|
|
344
|
+
break;
|
|
345
|
+
}
|
|
346
|
+
const left = deadline - deps.now().getTime();
|
|
347
|
+
if (left <= 0) return { kind: "waiting", url: pending.url, code: pending.code };
|
|
348
|
+
await deps.sleep(Math.min(DEFAULT_POLL_INTERVAL_S * 1e3, left));
|
|
349
|
+
}
|
|
350
|
+
} catch (err) {
|
|
351
|
+
if (err instanceof LoginError || err instanceof CloudConfigError) return { kind: "failed", message: err.message };
|
|
352
|
+
throw err;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
283
355
|
function nextAfterLogin(cwd) {
|
|
284
356
|
const dirs = findGitDirs(cwd);
|
|
285
357
|
if (dirs === void 0) return `Next: in your repository, run \`${cliInvocation()} init --factory <org>/<factory>\`.
|
|
@@ -431,4 +503,4 @@ async function runLoginCommand(flags, deps) {
|
|
|
431
503
|
}
|
|
432
504
|
}
|
|
433
505
|
|
|
434
|
-
export { DEFAULT_DASHBOARD, readPipedKey, realLoginDeps, runLoginCommand, sanitizeMachineName, stdinKind };
|
|
506
|
+
export { DEFAULT_DASHBOARD, readPipedKey, realLoginDeps, runLoginCommand, sanitizeMachineName, setupSignIn, stdinKind };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { launchRefusalForSession } from './chunk-C2PZOLN7.js';
|
|
4
4
|
import { detectActiveSession } from './chunk-IKGAVS5X.js';
|
|
5
|
-
import { autoConnect } from './chunk-
|
|
5
|
+
import { autoConnect } from './chunk-QFAH525L.js';
|
|
6
6
|
import { acquireSpoolLockAt } from './chunk-DV44KCM6.js';
|
|
7
7
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
8
8
|
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-N7PG5JAD.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { staleBuildRefusal, staleBuildWarning, detectCi } from './chunk-
|
|
3
|
+
import { staleBuildRefusal, staleBuildWarning, detectCi } from './chunk-TQ3PXYPJ.js';
|
|
4
4
|
import { launchRefusalForSession } from './chunk-C2PZOLN7.js';
|
|
5
5
|
import { detectActiveSession } from './chunk-IKGAVS5X.js';
|
|
6
|
-
import { autoConnect } from './chunk-
|
|
6
|
+
import { autoConnect } from './chunk-QFAH525L.js';
|
|
7
7
|
import { readEffectiveArtifactSpoolState, localArtifactIds, isArtifactTombstoned, artifactBlobsDir, appendArtifactRecord, artifactsSpoolPath, findPendingArtifactRecord, sanitizeTerminal, appendArtifactTombstone } from './chunk-DV44KCM6.js';
|
|
8
8
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
9
9
|
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-N7PG5JAD.js';
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { MAX_TEST_FILE_BYTES, itemsSentence, criteriaOf, hostItemsOf, loadCitationFinder, testFileMatcher, planCriteria, wholeItems, judgeGroups, failedItems, inCriteriaOrder, testsByCriterion, oneLineReason, criterionInputs, parseJudgeAnswer, judgedItems } from './chunk-PG4UW6QW.js';
|
|
4
3
|
import { RUNNER_PROTOCOL } from './chunk-JXZ3LIHN.js';
|
|
5
|
-
import {
|
|
4
|
+
import { MAX_TEST_FILE_BYTES, itemsSentence, criteriaOf, hostItemsOf, loadCitationFinder, testFileMatcher, planCriteria, wholeItems, judgeGroups, failedItems, inCriteriaOrder, testsByCriterion, oneLineReason, criterionInputs, parseJudgeAnswer, judgedItems } from './chunk-PG4UW6QW.js';
|
|
6
5
|
import { zodProblem } from './chunk-I3LTIAOR.js';
|
|
6
|
+
import { sha256OfFile, downloadPinned, VoiceDownloadError } from './chunk-2PGI6RDE.js';
|
|
7
7
|
import { hasStoredCredential, storedCredentialVariables, storeAgentCredential, isAgentName, credentialFromStdin } from './chunk-AEAKGO6N.js';
|
|
8
8
|
import { upgradedStarterText } from './chunk-R3RALX7H.js';
|
|
9
9
|
import { HELPER_PATH, HELPER_RECORD, DOCKERD_LOG } from './chunk-2PRLSABK.js';
|
|
10
10
|
import { writeDockerClientConfig } from './chunk-55GT5FLR.js';
|
|
11
|
-
import { senderPidfile } from './chunk-
|
|
12
|
-
import { installScrubContext } from './chunk-
|
|
11
|
+
import { senderPidfile } from './chunk-LCZGMJXD.js';
|
|
12
|
+
import { installScrubContext } from './chunk-TQ3PXYPJ.js';
|
|
13
13
|
import { readsJobState, READ_JOB_STATE_FORMATS, jobStateFormatOf } from './chunk-B4XB5QFD.js';
|
|
14
14
|
import { runnerImageVersion } from './chunk-RIITHK4F.js';
|
|
15
15
|
import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey, configForJob } from './chunk-F4HSDGFO.js';
|
|
16
16
|
import { receiveFiles } from './chunk-NN33FYXG.js';
|
|
17
|
-
import { readDefaultBranchFiles, readDefaultBranchHead, buildRepositoryImage, readRepositoryRecipe, fetchCommit, readBranchHead, diffBetween, prepareImageBuild, KEY_PREFIX, TAG_HOST, SHARED_OWNER, SHARED_NAME, universalBase, metadataFromLabels, writeRecord } from './chunk-
|
|
17
|
+
import { readDefaultBranchFiles, readDefaultBranchHead, buildRepositoryImage, readRepositoryRecipe, fetchCommit, readBranchHead, diffBetween, prepareImageBuild, KEY_PREFIX, TAG_HOST, SHARED_OWNER, SHARED_NAME, universalBase, metadataFromLabels, writeRecord } from './chunk-SDLWJF6H.js';
|
|
18
18
|
import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-YN6EKURT.js';
|
|
19
19
|
import { isSameProcess, startTimeOf } from './chunk-JBJTC3UU.js';
|
|
20
20
|
import { currentCliBuild } from './chunk-OGFGZQA3.js';
|
|
21
21
|
import { vmExecArgs, runExec, execCapture, waitForAgent } from './chunk-6FHMWJHK.js';
|
|
22
22
|
import { socketPathProblem, vsockLinks, linkVsockSockets, GUEST_CID, LEASE_LINK } from './chunk-OUL5E5UC.js';
|
|
23
|
-
import { describeCallFailure, shortClaim, retrySend, commandWithShim, logStamp, createRunnerLog, formatDuration, removeKeptContext, formatClock, stageGovernedContext, keptContextTree, removeStagedContext, WORKFLOW_PERMISSION_REASON, refusalCode, SELF_GOVERNED, resolveGoverningSource, prefetchGovernedContext, controlPlaneTokenFailure, keepStagedContext, pinnedSourceOf, shimScript } from './chunk-
|
|
24
|
-
import { postJson, getJson, WorkCommandError, isSignatureRefusal } from './chunk-
|
|
23
|
+
import { describeCallFailure, shortClaim, retrySend, commandWithShim, logStamp, createRunnerLog, formatDuration, removeKeptContext, formatClock, stageGovernedContext, keptContextTree, removeStagedContext, WORKFLOW_PERMISSION_REASON, refusalCode, SELF_GOVERNED, resolveGoverningSource, prefetchGovernedContext, controlPlaneTokenFailure, keepStagedContext, pinnedSourceOf, shimScript } from './chunk-YDB72T5Z.js';
|
|
24
|
+
import { postJson, getJson, WorkCommandError, isSignatureRefusal } from './chunk-BAPRSDUR.js';
|
|
25
25
|
import { keyRunnerFactory, runnerCredentialProblem, builtinKind, readOnlyOption, optionalEgress, readsOnly, isBuiltinContainer, isBuiltinVm, isBuiltinSandbox, egressSummary, DEFAULT_WORKSPACE_KEEP_DAYS, readOnlyRemoteOf, DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_SETUP_MINUTES, allowHostProblem, systemClock, emptyEgressCounts, hostAllowed, sandboxTimeLimitMinutes, networkOf, imageBuildOf, machineSizeOf, sandboxSizeOf, DEFAULT_SAVED_STATE_MAX_BYTES } from './chunk-V2O6KLTQ.js';
|
|
26
26
|
import { formatBytes, volumeBytes, allocatedBytes, DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK, freeBytes } from './chunk-OC3BSNNE.js';
|
|
27
27
|
import { said, NETWORK_HELPER_MEMORY, firstLine, writeJobFile, readJobFile, spawnRun, RUNNER_LABEL, BUILD_LABEL, createDockerHost, builderSpec, childEnvironment, containerExecArgs, readDu, JUDGE_DIR, JUDGE_ITEMS, answerFileName, hashJudgeProgram, NETWORK_READY_FILE, MAX_ITEMS_BYTES, MAX_REPORT_BYTES, JUDGE_REPORT, withAnswerProtocol, JUDGE_TREE, runnerLabelValue, parseSize, readJobFileChecked, networkHelperName, prepareRunArgs, containerRunArgs, judgeCommand, WORKSPACE_LABEL, homeCopyRunArgs, networkHelperRunArgs, JUDGE_MAX_TURNS, identityScript, identityArgs, parseIdentity, mountableHome, homeCopyScript, homeCopyArgs, COMMAND_DIR, judgeProgramRecord, identityRunArgs, SAVED_STATE_LABEL } from './chunk-TCPWJBH5.js';
|
|
@@ -4759,7 +4759,8 @@ async function readSandboxRecipe(input) {
|
|
|
4759
4759
|
configPath: input.config.configPath,
|
|
4760
4760
|
...input.organizationId === void 0 ? {} : { organizationId: input.organizationId },
|
|
4761
4761
|
readToken,
|
|
4762
|
-
...governed === void 0 ? {} : { pinned: { commit: governed.sha, ref: governed.ref } }
|
|
4762
|
+
...governed === void 0 ? {} : { pinned: { commit: governed.sha, ref: governed.ref } },
|
|
4763
|
+
...input.universal === true ? { universal: true } : {}
|
|
4763
4764
|
});
|
|
4764
4765
|
return { ok: true, recipe, repository: recipeRepository };
|
|
4765
4766
|
} catch (err) {
|
|
@@ -4794,7 +4795,7 @@ async function provisionSandboxOnce(input, itemDiskFailed) {
|
|
|
4794
4795
|
} catch (err) {
|
|
4795
4796
|
return fail(err instanceof SandboxError ? describeSandboxError(err) : describeCallFailure(err));
|
|
4796
4797
|
}
|
|
4797
|
-
const governing = input.queue === "run" ? SELF_GOVERNED : await resolveGoverningSource({ config, repository, fetchImpl: input.fetchImpl });
|
|
4798
|
+
const governing = input.queue === "run" || input.queue === "review" ? SELF_GOVERNED : await resolveGoverningSource({ config, repository, fetchImpl: input.fetchImpl });
|
|
4798
4799
|
if (!governing.ok) return fail(governing.reason);
|
|
4799
4800
|
const governingSource = governing.source;
|
|
4800
4801
|
const controlPlaneUrl = (controlPlane) => runtime.remoteFor?.(controlPlane) ?? `${runtime.github.gitUrl}/${controlPlane}.git`;
|
|
@@ -4812,7 +4813,7 @@ async function provisionSandboxOnce(input, itemDiskFailed) {
|
|
|
4812
4813
|
});
|
|
4813
4814
|
if (unfetched !== void 0) return fail(unfetched.reason, unfetched.transient);
|
|
4814
4815
|
}
|
|
4815
|
-
const read = await readSandboxRecipe({ runtime, config, tokens, repository, governingSource, organizationId: input.organizationId });
|
|
4816
|
+
const read = await readSandboxRecipe({ runtime, config, tokens, repository, governingSource, organizationId: input.organizationId, ...input.queue === "review" ? { universal: true } : {} });
|
|
4816
4817
|
if (!read.ok) return fail(read.reason, read.transient);
|
|
4817
4818
|
const recipe = read.recipe;
|
|
4818
4819
|
const recipeRepository = read.repository;
|
|
@@ -4822,7 +4823,7 @@ async function provisionSandboxOnce(input, itemDiskFailed) {
|
|
|
4822
4823
|
log.line(`${tag} not applied from ${recipe.path} of ${recipeRepository}: ${ignoredProperties.map(({ property }) => property).join(", ")} \xB7 a sandbox build runs the image runner.sandbox.image names`);
|
|
4823
4824
|
}
|
|
4824
4825
|
const diskKey = { imageId: diskImageOf(own, sized.size), diskBytes: sized.size.diskGib * GIB2 };
|
|
4825
|
-
const itemDisk = input.workItemId === void 0 ? { state: void 0 } : itemDiskFailed !== void 0 ? { state: { restored: false, reason: itemDiskFailed } } : itemDiskDecision({ fresh: input.fresh, heldElsewhere: input.diskHeldElsewhere, builtin: true, backend: "sandbox", configPath: config.configPath, organizationId: input.organizationId, workItemId: input.workItemId, repository, ...diskKey });
|
|
4826
|
+
const itemDisk = input.workItemId === void 0 || input.queue === "review" ? { state: void 0 } : itemDiskFailed !== void 0 ? { state: { restored: false, reason: itemDiskFailed } } : itemDiskDecision({ fresh: input.fresh, heldElsewhere: input.diskHeldElsewhere, builtin: true, backend: "sandbox", configPath: config.configPath, organizationId: input.organizationId, workItemId: input.workItemId, repository, ...diskKey });
|
|
4826
4827
|
const keptDisk = itemDisk.kept;
|
|
4827
4828
|
if (itemDisk.state?.restored === false) log.line(`${tag} this job starts without a kept disk: ${DISK_REASON_TEXT[itemDisk.state.reason]}`);
|
|
4828
4829
|
const buildId = randomBytes(6).toString("hex");
|
|
@@ -5081,6 +5082,7 @@ async function provisionSandboxOnce(input, itemDiskFailed) {
|
|
|
5081
5082
|
const judgeProgram = await judgeProgramRecord((argv) => host.exec({ container, user: ADDED_USER, env: NO_ENV, argv }), runtime.agents);
|
|
5082
5083
|
if (judgeProgram !== void 0) containerState.judgeProgram = judgeProgram;
|
|
5083
5084
|
input.save(state, environment);
|
|
5085
|
+
if (input.queue === "review") return { ok: true, workdir: CHECKOUT_DIR, state, environment };
|
|
5084
5086
|
const stepExec = async (argv, workdir, opts) => {
|
|
5085
5087
|
const ran = await host.exec({ container, user: agentUser, workdir, env: withMiseVariables(env, opts?.variables), argv }, { ...opts?.quiet === true ? {} : { logPath }, ...opts?.timeoutMs === void 0 ? {} : { timeoutMs: opts.timeoutMs } });
|
|
5086
5088
|
return endedAtLimit(ran) ? { ...ran, timedOut: true } : ran;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { stripTerminalControls } from './chunk-
|
|
3
|
+
import { stripTerminalControls } from './chunk-G5TK5XLA.js';
|
|
4
4
|
import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-RIITHK4F.js';
|
|
5
5
|
import { readFileSync } from 'fs';
|
|
6
6
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { launchRefusalForSession } from './chunk-C2PZOLN7.js';
|
|
4
4
|
import { detectActiveSession } from './chunk-IKGAVS5X.js';
|
|
5
|
-
import { autoConnect } from './chunk-
|
|
5
|
+
import { autoConnect } from './chunk-QFAH525L.js';
|
|
6
6
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
7
7
|
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-N7PG5JAD.js';
|
|
8
8
|
import { launchedItemForSession } from './chunk-LGJ56FCM.js';
|
|
@@ -1,53 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { summarizeChecks, summaryText, renderDoctorText } from './chunk-
|
|
3
|
+
import { summarizeChecks, summaryText, renderDoctorText } from './chunk-DEPV3XZE.js';
|
|
4
4
|
import { shellFunctionInstalled, removeShellFunction, installShellFunction, SHELL_FUNCTION_LINE } from './chunk-IRFN2ZHJ.js';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-F7AOOV5N.js';
|
|
7
|
-
import './chunk-IKGAVS5X.js';
|
|
8
|
-
import './chunk-5EQ2B6UE.js';
|
|
9
|
-
import './chunk-ZDXEZPRM.js';
|
|
10
|
-
import './chunk-5SKYWQ64.js';
|
|
11
|
-
import './chunk-7PFRNOSF.js';
|
|
12
|
-
import './chunk-TQPFWWND.js';
|
|
13
|
-
import { runConnect, hasUncommittedPolicy, commitCommandsFor } from './chunk-IGVOCKAC.js';
|
|
14
|
-
import './chunk-DV44KCM6.js';
|
|
15
|
-
import './chunk-XDBHRWPQ.js';
|
|
16
|
-
import './chunk-4TVL4E53.js';
|
|
17
|
-
import './chunk-A2LHHKTT.js';
|
|
5
|
+
import { runConnect, hasUncommittedPolicy, commitCommandsFor } from './chunk-IQWBUZ75.js';
|
|
18
6
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
19
|
-
import './chunk-7GJGSADZ.js';
|
|
20
|
-
import './chunk-N7PG5JAD.js';
|
|
21
|
-
import './chunk-HWVMRETT.js';
|
|
22
|
-
import './chunk-NDDXBJMX.js';
|
|
23
|
-
import './chunk-DYV2OC4S.js';
|
|
24
|
-
import './chunk-VXU5IAEQ.js';
|
|
25
|
-
import './chunk-XOJRFV3U.js';
|
|
26
|
-
import './chunk-E5PWV6H2.js';
|
|
27
|
-
import './chunk-545P7JY7.js';
|
|
28
|
-
import './chunk-SF2TBJBP.js';
|
|
29
|
-
import './chunk-BJ3KTMDH.js';
|
|
30
|
-
import './chunk-M53UNEO6.js';
|
|
31
|
-
import './chunk-BKO6JEZI.js';
|
|
32
|
-
import './chunk-T5MBLAIO.js';
|
|
33
|
-
import './chunk-Z7J7JWGF.js';
|
|
34
|
-
import './chunk-WZBHBH3J.js';
|
|
35
7
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
36
|
-
import './chunk-BD254PYH.js';
|
|
37
|
-
import './chunk-ZHQC43NH.js';
|
|
38
|
-
import './chunk-TZZU6IAM.js';
|
|
39
|
-
import './chunk-YQR6E6OV.js';
|
|
40
|
-
import './chunk-CJPTUU2E.js';
|
|
41
|
-
import './chunk-BFKSIA3V.js';
|
|
42
|
-
import './chunk-LPQJ5LXP.js';
|
|
43
|
-
import './chunk-PLVHIQJN.js';
|
|
44
8
|
import { NATIVE_AGENTS, LEGACY_AGENT } from './chunk-7PZDPISM.js';
|
|
45
|
-
import './chunk-VSBG7MMU.js';
|
|
46
|
-
import './chunk-RA3O54FC.js';
|
|
47
|
-
import './chunk-352DHUTP.js';
|
|
48
|
-
import './chunk-Y55ARAPE.js';
|
|
49
|
-
import './chunk-MCUI6RHU.js';
|
|
50
|
-
import './chunk-Z5GEFMRW.js';
|
|
51
9
|
|
|
52
10
|
createRequire(import.meta.url);
|
|
53
11
|
|