@outerlayer/cli 0.33.0-next.20261021171625 → 0.33.0-next.20261021223634
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 -2
- package/dist/{agent-setup-NSUX64RU.js → agent-setup-UY5NBT7C.js} +13 -13
- package/dist/{artifact-link-cmd-IGVFGHC2.js → artifact-link-cmd-2MBHG3PO.js} +2 -2
- package/dist/{build-HU24C46Z.js → build-SK5BYBER.js} +4 -4
- package/dist/build-info.json +1 -1
- package/dist/{builder-QECLC243.js → builder-K2XIVSSZ.js} +6 -6
- package/dist/{check-4BL6XRWJ.js → check-AXDPZJU4.js} +39 -39
- package/dist/chunk-2PGI6RDE.js +90 -0
- package/dist/{chunk-ZZSQYOY5.js → chunk-3VGDZ23W.js} +1 -1
- package/dist/{chunk-ZAJKEHIE.js → chunk-4IG6EZHU.js} +2 -2
- package/dist/{chunk-NJS7JJYN.js → chunk-52C3SSNF.js} +2 -2
- package/dist/{chunk-IWYS4ERC.js → chunk-533QGXGZ.js} +1 -1
- package/dist/{chunk-LESWVXRE.js → chunk-5RUH3PCG.js} +5 -5
- package/dist/{chunk-X2Y3B4JH.js → chunk-6TFTRVOA.js} +3 -3
- package/dist/{chunk-YGXKXL4Q.js → chunk-72YES3RL.js} +61 -93
- package/dist/{chunk-ZBN4JGTJ.js → chunk-A3H27SYX.js} +1 -1
- package/dist/{chunk-3WW2TL7V.js → chunk-AKHGQKNR.js} +64 -4
- package/dist/{chunk-XT5SOJRC.js → chunk-AKR32WHV.js} +1 -1
- package/dist/{chunk-P7BEZAEU.js → chunk-ALSE7YKX.js} +11 -3
- package/dist/{chunk-5T2VOSIL.js → chunk-CHXYLCMA.js} +4 -4
- package/dist/{chunk-GXKWPOK6.js → chunk-CMU6QJHE.js} +3 -3
- package/dist/{chunk-TZQIEUDE.js → chunk-CNRMP6EN.js} +1 -1
- package/dist/{chunk-UJIG5BU7.js → chunk-CV2S5L4J.js} +42 -18
- package/dist/{chunk-OF4TFWKR.js → chunk-DE7YSNDX.js} +3 -3
- package/dist/{chunk-3H7NZPYG.js → chunk-DM4EGXDO.js} +1 -1
- package/dist/{chunk-H6Y5D6J7.js → chunk-EG7KPSSP.js} +7 -7
- package/dist/{chunk-KP6R7CV3.js → chunk-ESP5VZBD.js} +4 -1
- package/dist/{chunk-RQGHHEM7.js → chunk-HBBCQ5NE.js} +2 -2
- package/dist/{chunk-NHXJU7CM.js → chunk-HT7LVCTX.js} +2 -2
- package/dist/{chunk-T5TBGOT6.js → chunk-IPJ6HR7E.js} +1 -1
- package/dist/{chunk-APSYTJ6I.js → chunk-JT3YO5MH.js} +1 -1
- package/dist/{chunk-QNVIGO5X.js → chunk-KDM77TVX.js} +5 -5
- package/dist/{chunk-YW4PEGLN.js → chunk-KUTZ6XLS.js} +1 -1
- package/dist/{chunk-RHBFNZ7J.js → chunk-LBPK2TPR.js} +24 -8
- package/dist/{chunk-X7UUIHGH.js → chunk-LH3KULPL.js} +1 -1
- package/dist/{chunk-LK2S5XZH.js → chunk-LHYO4RDP.js} +9 -1
- package/dist/{chunk-WXEPMPHK.js → chunk-LN4WDONI.js} +1 -1
- package/dist/{chunk-FE3RTGJN.js → chunk-M5OBRUQE.js} +2 -2
- package/dist/{chunk-WHSYPR3U.js → chunk-M5ZXOQYS.js} +1 -1
- package/dist/{chunk-OX7CHZTJ.js → chunk-N3KK5BKF.js} +7 -7
- package/dist/{chunk-4LU7MFJO.js → chunk-NOXK3QW6.js} +4 -4
- package/dist/{chunk-2FPEB36J.js → chunk-O6NG67Y7.js} +5 -5
- package/dist/{chunk-JUXATN46.js → chunk-OGCG5LOX.js} +1 -1
- package/dist/{chunk-XRQ7DABQ.js → chunk-Q2D4M3GC.js} +1 -1
- package/dist/{chunk-3RS3RNGH.js → chunk-Q4YVHYHT.js} +3 -3
- package/dist/{chunk-INCKTGMM.js → chunk-RQKQTRXM.js} +5 -5
- package/dist/{chunk-D73OLAYE.js → chunk-RVWADVBN.js} +4 -4
- package/dist/{chunk-6C3ZVE62.js → chunk-RW52CUFX.js} +1 -1
- package/dist/{chunk-XFS2TMOB.js → chunk-SFJD4MRY.js} +7 -7
- package/dist/{chunk-77F7NGAZ.js → chunk-TA6TFYAN.js} +3 -3
- package/dist/{chunk-GI6LOIHS.js → chunk-TNJXCNQ6.js} +4 -4
- package/dist/{chunk-BSHUTMXV.js → chunk-TPGHCH2H.js} +45 -19
- package/dist/{chunk-X7ML37UF.js → chunk-UIBTEDLA.js} +7 -7
- package/dist/{chunk-QCDVKCHA.js → chunk-UWEJ6HGB.js} +2 -2
- package/dist/{chunk-F3EF56LQ.js → chunk-VQ2JGZSC.js} +1 -1
- package/dist/{chunk-MV52FCSG.js → chunk-X5LFLYSD.js} +1258 -591
- package/dist/{chunk-KURUM765.js → chunk-Y3LIJIRH.js} +4 -4
- package/dist/{chunk-LRBOBYQI.js → chunk-YH2632RT.js} +6 -6
- package/dist/{chunk-JJ4W5LVF.js → chunk-ZRTMS4C7.js} +13 -13
- package/dist/{claude-launcher-RNMUZZ3Y.js → claude-launcher-STSKZNW3.js} +5 -5
- package/dist/{cli-PNQX4HRX.js → cli-LYJEJTQG.js} +124 -119
- package/dist/{command-LA7T5YFX.js → command-2JEY6X6U.js} +29 -28
- package/dist/{config-3JRFDYZL.js → config-CUJ3Q4L2.js} +1 -1
- package/dist/{connect-cmd-2AXEPDT2.js → connect-cmd-WFHAPGCZ.js} +11 -11
- package/dist/{container-start-4LIRN2LX.js → container-start-TTEHOSJK.js} +29 -28
- package/dist/{context-cleanup-VSDT77BZ.js → context-cleanup-UBOJHGQM.js} +3 -3
- package/dist/{control-plane-launch-DHMD5WBU.js → control-plane-launch-R4X63DYW.js} +9 -9
- package/dist/{dist-DY2ZNEBS.js → dist-ADFLG3AY.js} +2 -2
- package/dist/{docker-EOP32YLH.js → docker-UYS5N5B7.js} +6 -6
- package/dist/{doctor-FDXHHPDJ.js → doctor-3XPT5F2Y.js} +38 -35
- package/dist/{emit-artifact-cmd-JY5V6WQI.js → emit-artifact-cmd-FR5PUUJR.js} +16 -16
- package/dist/{emit-cmd-T7NIBSF3.js → emit-cmd-JOO6ZTEI.js} +6 -6
- package/dist/{emit-criteria-cmd-XRFBNFN7.js → emit-criteria-cmd-DKPZJTIN.js} +12 -12
- package/dist/emit-demo-cmd-IVLL6OWZ.js +3027 -0
- package/dist/{emit-finding-cmd-5RHKQHE6.js → emit-finding-cmd-VM4KIVEM.js} +13 -13
- package/dist/{emit-result-cmd-65KJQ2UM.js → emit-result-cmd-SEKL6HUU.js} +15 -15
- package/dist/{emit-step-cmd-YZIN6B6P.js → emit-step-cmd-4YAWK4VE.js} +13 -13
- package/dist/{findings-cmd-Z6CKWAG4.js → findings-cmd-RXYIWXY4.js} +13 -13
- package/dist/{fleet-readiness-7ROJ54ZF.js → fleet-readiness-VIX76RNL.js} +11 -11
- package/dist/{governing-source-NMGGSA6Q.js → governing-source-APGCKDTS.js} +16 -16
- package/dist/{hook-fast-WQQYEXO5.js → hook-fast-NVBMSE3N.js} +1 -1
- package/dist/{host-key-KAYMYRO3.js → host-key-UEWE4PXB.js} +2 -2
- package/dist/{image-tag-NM2YT2J2.js → image-tag-V2LXTKK7.js} +2 -2
- package/dist/index.js +4 -4
- package/dist/{init-UBDZRWNE.js → init-BR4Z4T2Q.js} +28 -27
- package/dist/{init-OV6IOD2G.js → init-XWQJEW6H.js} +28 -27
- package/dist/{init-cmd-YP4TVN2S.js → init-cmd-IEMYX6KA.js} +21 -21
- package/dist/{init-update-24K7ZZWX.js → init-update-HOTJISWA.js} +20 -20
- package/dist/{install-OIRIEOS7.js → install-3DBYJITP.js} +3 -3
- package/dist/{install-cmd-IYWVR6WX.js → install-cmd-EELSKBSZ.js} +4 -4
- package/dist/{layout-OQ7EJUMH.js → layout-ZI4RJ6MT.js} +4 -4
- package/dist/{login-browser-KP7YVYTN.js → login-browser-WUSIVD5E.js} +2 -2
- package/dist/{logs-C3RJ3ZTC.js → logs-ET75ZUCN.js} +1 -1
- package/dist/{loop-4FEA6E2S.js → loop-3NRAMJA4.js} +39 -39
- package/dist/{machine-3BMBF33L.js → machine-LUXL7SFT.js} +24 -23
- package/dist/{machine-skills-XWWYFNOZ.js → machine-skills-REHDWINX.js} +4 -4
- package/dist/{mcp-serve-cmd-PB4UOTGL.js → mcp-serve-cmd-WYUP263T.js} +3 -3
- package/dist/paths-BN7X2YPM.js +9 -0
- package/dist/{pending-RKVRYOTF.js → pending-ROAIK5WO.js} +2 -2
- package/dist/{pidfile-BMFAUQAI.js → pidfile-52TGLGQH.js} +2 -2
- package/dist/{record-26AH6WDB.js → record-BSY4BKJ5.js} +2 -2
- package/dist/{runner-env-66RAFIDJ.js → runner-env-H6XLACTG.js} +4 -4
- package/dist/{runner-identity-HTQNM5AG.js → runner-identity-DR5I3NBT.js} +6 -6
- package/dist/{runner-key-7I5FDQKR.js → runner-key-OLMCAOTD.js} +28 -27
- package/dist/{session-sender-MKDKMZJD.js → session-sender-PLQ5NOEW.js} +16 -16
- package/dist/{spec-cmd-V7W3UV6X.js → spec-cmd-NIAQWMLE.js} +13 -13
- package/dist/{starter-pack-6O7F6P7C.js → starter-pack-OESK7UX2.js} +5 -5
- package/dist/{status-TJDVDR4H.js → status-4HNX45UZ.js} +29 -29
- package/dist/{sync-cmd-AI4KTJ56.js → sync-cmd-UTESQMDU.js} +15 -15
- package/dist/{watch-C7IS6VNS.js → watch-4UC4FGI5.js} +15 -15
- package/dist/{work-claim-cmd-GFXIZWMU.js → work-claim-cmd-ODYRE44S.js} +16 -16
- package/dist/{work-cmd-UTD4Y7W3.js → work-cmd-QQDUI3YX.js} +13 -13
- package/dist/{work-comment-cmd-J3SRBK6A.js → work-comment-cmd-FIOMDPIZ.js} +13 -13
- package/dist/{work-logs-cmd-SH7MQPA3.js → work-logs-cmd-DA6MPQ6O.js} +13 -13
- package/dist/{work-open-pr-cmd-FIX5QLK7.js → work-open-pr-cmd-QG2FT7OW.js} +14 -14
- package/dist/{work-pr-cmd-S4IBR7DE.js → work-pr-cmd-XNXWWLS5.js} +13 -13
- package/dist/{work-stop-cmd-NECXJEJN.js → work-stop-cmd-2KLZ2UH2.js} +13 -13
- package/package.json +3 -1
- package/dist/chunk-YYYRBYWG.js +0 -32
- package/dist/emit-demo-cmd-JOVCVXIS.js +0 -888
- package/dist/paths-OK2EZS7W.js +0 -9
package/README.md
CHANGED
|
@@ -228,7 +228,11 @@ content:
|
|
|
228
228
|
downloads a guest kernel and a guest helper from the releases of the public
|
|
229
229
|
repository `outerlayerai/guest-assets` on github.com. The runner checks each
|
|
230
230
|
file against a sha256 pinned in the CLI, and the requests send nothing about
|
|
231
|
-
the host.
|
|
231
|
+
the host. An image build in a builder microVM also needs the files of the
|
|
232
|
+
runner's tools layer, which the runner downloads on the host. It gets `gh`,
|
|
233
|
+
`tini` and FFmpeg from github.com. It gets the narration voice pack from
|
|
234
|
+
huggingface.co and registry.npmjs.org. Each file is checked against a sha256
|
|
235
|
+
pinned in the CLI. The microVM reaches the network only
|
|
232
236
|
through the same tunnel a container build uses, which the runner serves on
|
|
233
237
|
Unix sockets and the guest reaches over vsock. In a build with Docker, the
|
|
234
238
|
guest forwards the proxy connections of containers and `docker build` steps
|
|
@@ -469,7 +473,7 @@ before it gives up.
|
|
|
469
473
|
| `outerlayer context emit [--check]` | Compile `.outerlayer/` into each configured target tool's native files (targets come from `.outerlayer/config.json`). `--check` computes outputs and diffs against disk without writing (CI mode). Bare `outerlayer emit` with no name still compiles, with a deprecation warning. |
|
|
470
474
|
| `outerlayer hooks wrap` / `outerlayer hooks unwrap` | Auto-wrap (or undo wrapping) `PreToolUse`/`PostToolUse` hooks for execution evidence — one spawn per firing. |
|
|
471
475
|
| `outerlayer emit artifact <file> --caption <text> [--for <criterion-id>] [--pr <n>]` | Upload a proof artifact — screenshot, recording, report, or log — with its caption. Inside a recorded session it spools locally and ships on the next `sync`; otherwise it uploads immediately, anchored to a pull request or the current checkout. `--replaces` retires artifacts an earlier run uploaded. A JUnit XML file bound with `--for` proves a criterion that declares `test` proof; `--test <name[=path:line]>` binds only the named tests. |
|
|
472
|
-
| `outerlayer emit demo <manifest> [--no-narration] [--item <n>] [--pr <n>]` | Turn a recorded video and its manifest (written by `@outerlayer/playwright`) into a narrated demo: one WebM clip for each chapter, emitted as a video artifact. A chapter whose checks all passed is bound to its criterion. The manifest is emitted as the demo record. Needs `ffmpeg` and `ffprobe`, and `espeak-ng` unless `--no-narration`. Exit 1 means a chapter had a failed check. |
|
|
476
|
+
| `outerlayer emit demo <manifest> [--compare <manifest>] [--no-narration] [--item <n>] [--pr <n>]` | Turn a recorded video and its manifest (written by `@outerlayer/playwright`) into a narrated demo: one WebM clip for each chapter, emitted as a video artifact. A chapter whose checks all passed is bound to its criterion. The manifest is emitted as the demo record. With `--compare`, a second run's stills are compared with the first run's, and each chapter reads `yes`, `no` or `not checked`. Needs `ffmpeg` and `ffprobe`, and `espeak-ng` unless `--no-narration`. Exit 1 means a chapter had a failed check. |
|
|
473
477
|
| `outerlayer emit <name> --result <pass\|fail> [--link <url>] [--body <text>\|--body-file <path>] --item <number>` | Record one named check's outcome on a work item. A check that ran carries the run URL as its proof (`--link`); a judgment you are making yourself carries one sentence (`--body`, or `--body-file` to read it from a file — `-` reads standard input). A `fail` needs at least one of the two; a `pass` needs neither. `--item` names the work item by the number printed when the item was created — always required, in or out of a recorded session; a session records checks on its own item like any other, stored as the session's, but cannot clear a person's fail. Prints the recorded check's id. Who recorded it comes from your API key, never from what you send. |
|
|
474
478
|
| `outerlayer work comment --item <n> [--criterion <id>] --body <text> [--artifact <id>] [--pass\|--fail\|--attach\|--ready]` | Post one comment on a work item's general thread, or on one acceptance criterion's own thread with `--criterion`. `--pass`/`--fail` need a person's own credential and apply to the whole item, so they work on the general thread only and the gateway refuses them with `--criterion`; `--attach` makes the named artifact that criterion's current proof; `--ready` hands a thread back to a person. The detected session id rides along automatically, only ever narrowing what the comment may do. |
|
|
475
479
|
| `outerlayer work stop --item <n> [--note <text>]` | Ask the host that holds the item's build to end it. The host reads the request at its next heartbeat and ends the build with outcome `stopped`, so the build may run a little longer. The item is not built again until a new build request. Needs `work.update`. Exits 1 when no host build is running for the item. |
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { keepHandWritten, runAgentSetup } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
export { keepHandWritten, runAgentSetup } from './chunk-N3KK5BKF.js';
|
|
4
|
+
import './chunk-TNJXCNQ6.js';
|
|
5
5
|
import './chunk-KT4CN6OU.js';
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
6
|
+
import './chunk-UWEJ6HGB.js';
|
|
7
|
+
import './chunk-4IG6EZHU.js';
|
|
8
8
|
import './chunk-ANPNT6PM.js';
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
9
|
+
import './chunk-RVWADVBN.js';
|
|
10
|
+
import './chunk-M5OBRUQE.js';
|
|
11
|
+
import './chunk-VQ2JGZSC.js';
|
|
12
12
|
import './chunk-PJDQPF5N.js';
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
13
|
+
import './chunk-JT3YO5MH.js';
|
|
14
|
+
import './chunk-ESP5VZBD.js';
|
|
15
15
|
import './chunk-HDSDUTX4.js';
|
|
16
16
|
import './chunk-ZJSNLVCE.js';
|
|
17
17
|
import './chunk-BJ3KTMDH.js';
|
|
18
|
-
import './chunk-
|
|
18
|
+
import './chunk-KUTZ6XLS.js';
|
|
19
19
|
import './chunk-5BHIBJDA.js';
|
|
20
20
|
import './chunk-CDDED64E.js';
|
|
21
21
|
import './chunk-RA3O54FC.js';
|
|
22
22
|
import './chunk-CRB3POP4.js';
|
|
23
|
-
import './chunk-
|
|
23
|
+
import './chunk-LN4WDONI.js';
|
|
24
24
|
import './chunk-YQR6E6OV.js';
|
|
25
25
|
import './chunk-TUSYOL2O.js';
|
|
26
|
-
import './chunk-
|
|
27
|
-
import './chunk-
|
|
26
|
+
import './chunk-OGCG5LOX.js';
|
|
27
|
+
import './chunk-AKHGQKNR.js';
|
|
28
28
|
import './chunk-VNVZDWO3.js';
|
|
29
29
|
import './chunk-XD4ZCMA4.js';
|
|
30
30
|
import './chunk-MESOOLF4.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { sanitizeTerminal, readEffectiveArtifactSpoolState } from './chunk-
|
|
3
|
+
import { sanitizeTerminal, readEffectiveArtifactSpoolState } from './chunk-DM4EGXDO.js';
|
|
4
4
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-AKHGQKNR.js';
|
|
6
6
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
7
7
|
import './chunk-Z5GEFMRW.js';
|
|
8
8
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { buildRepositoryImage } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
export { KEY_PREFIX, TAG_HOST, buildRepositoryImage, metadataFromLabels, prepareImageBuild, writeRecord } from './chunk-TPGHCH2H.js';
|
|
4
|
+
import './chunk-IPJ6HR7E.js';
|
|
5
5
|
import './chunk-JBJTC3UU.js';
|
|
6
6
|
export { RecipeError } from './chunk-3Z3MPR55.js';
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
7
|
+
import './chunk-LHYO4RDP.js';
|
|
8
|
+
import './chunk-ESP5VZBD.js';
|
|
9
9
|
import './chunk-HDSDUTX4.js';
|
|
10
10
|
import './chunk-XD4ZCMA4.js';
|
|
11
11
|
import './chunk-MESOOLF4.js';
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"2026-10-
|
|
1
|
+
{"id":"2026-10-21T22:39:20.164Z+ff838ea","root":"/home/runner/_work/outerlayer/outerlayer","pkg":"outerlayer"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { MIN_BUILDX_VERSION, builderName, builderSpec, buildxState, ensureBuilder, ensureFailureCount, isOutOfMemory, proxyEnvironment, trackImageBuild } from './chunk-
|
|
3
|
+
export { MIN_BUILDX_VERSION, builderName, builderSpec, buildxState, ensureBuilder, ensureFailureCount, isOutOfMemory, proxyEnvironment, trackImageBuild } from './chunk-CHXYLCMA.js';
|
|
4
4
|
import './chunk-YJLHUKYS.js';
|
|
5
5
|
import './chunk-3Z3MPR55.js';
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
6
|
+
import './chunk-LHYO4RDP.js';
|
|
7
|
+
import './chunk-AKR32WHV.js';
|
|
8
|
+
import './chunk-JT3YO5MH.js';
|
|
9
|
+
import './chunk-ESP5VZBD.js';
|
|
10
10
|
import './chunk-HDSDUTX4.js';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-AKHGQKNR.js';
|
|
12
12
|
import './chunk-XD4ZCMA4.js';
|
|
13
13
|
import './chunk-MESOOLF4.js';
|
|
14
14
|
import './chunk-Z5GEFMRW.js';
|
|
@@ -1,69 +1,69 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { probeCredentials } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
3
|
+
import { probeCredentials } from './chunk-CV2S5L4J.js';
|
|
4
|
+
import './chunk-72YES3RL.js';
|
|
5
|
+
import './chunk-LH3KULPL.js';
|
|
6
6
|
import './chunk-3JVYMD4G.js';
|
|
7
7
|
import './chunk-E7R2GIAW.js';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-M5ZXOQYS.js';
|
|
9
9
|
import './chunk-YKYCE4HY.js';
|
|
10
|
-
import './chunk-
|
|
10
|
+
import './chunk-CNRMP6EN.js';
|
|
11
11
|
import './chunk-ZVB57WI6.js';
|
|
12
12
|
import './chunk-RJYKTWUP.js';
|
|
13
13
|
import './chunk-I3LTIAOR.js';
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
16
|
-
import './chunk-
|
|
14
|
+
import './chunk-Q4YVHYHT.js';
|
|
15
|
+
import './chunk-SFJD4MRY.js';
|
|
16
|
+
import './chunk-RQKQTRXM.js';
|
|
17
17
|
import './chunk-ESVW4MJY.js';
|
|
18
18
|
import './chunk-XTNMIV77.js';
|
|
19
|
-
import { placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, managedProblems, managedFactsOf, needsClaudeCredential, claudeCredentialCheck, claimPermissionProblem, formerSkillQueues, formerSkillProblem } from './chunk-
|
|
20
|
-
import './chunk-
|
|
21
|
-
import './chunk-ZZSQYOY5.js';
|
|
19
|
+
import { placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, managedProblems, managedFactsOf, needsClaudeCredential, claudeCredentialCheck, claimPermissionProblem, formerSkillQueues, formerSkillProblem } from './chunk-LBPK2TPR.js';
|
|
20
|
+
import './chunk-3VGDZ23W.js';
|
|
22
21
|
import './chunk-TBT347UY.js';
|
|
23
|
-
import './chunk-
|
|
24
|
-
import './chunk-
|
|
25
|
-
import { probeHelper, HELPER_ENV, helperSocketPath } from './chunk-
|
|
22
|
+
import './chunk-O6NG67Y7.js';
|
|
23
|
+
import './chunk-CMU6QJHE.js';
|
|
24
|
+
import { probeHelper, HELPER_ENV, helperSocketPath } from './chunk-X5LFLYSD.js';
|
|
25
|
+
import './chunk-2PGI6RDE.js';
|
|
26
26
|
import './chunk-QQGZ5THT.js';
|
|
27
27
|
import './chunk-HIGJTX5U.js';
|
|
28
|
-
import './chunk-
|
|
29
|
-
import './chunk-
|
|
28
|
+
import './chunk-KDM77TVX.js';
|
|
29
|
+
import './chunk-533QGXGZ.js';
|
|
30
30
|
import './chunk-TQMI335S.js';
|
|
31
|
-
import './chunk-
|
|
32
|
-
import { DEFAULT_UNIT_NAME } from './chunk-
|
|
33
|
-
import { loadRunnerConfig, RunnerConfigError, checkHooks } from './chunk-
|
|
31
|
+
import './chunk-52C3SSNF.js';
|
|
32
|
+
import { DEFAULT_UNIT_NAME } from './chunk-HBBCQ5NE.js';
|
|
33
|
+
import { loadRunnerConfig, RunnerConfigError, checkHooks } from './chunk-ALSE7YKX.js';
|
|
34
34
|
import './chunk-UXYLWVTQ.js';
|
|
35
|
-
import './chunk-
|
|
36
|
-
import './chunk-
|
|
35
|
+
import './chunk-TPGHCH2H.js';
|
|
36
|
+
import './chunk-IPJ6HR7E.js';
|
|
37
37
|
import './chunk-JBJTC3UU.js';
|
|
38
38
|
import './chunk-OGFGZQA3.js';
|
|
39
|
-
import './chunk-
|
|
39
|
+
import './chunk-CHXYLCMA.js';
|
|
40
40
|
import './chunk-YJLHUKYS.js';
|
|
41
41
|
import './chunk-3Z3MPR55.js';
|
|
42
|
-
import './chunk-
|
|
43
|
-
import './chunk-
|
|
44
|
-
import './chunk-
|
|
45
|
-
import './chunk-
|
|
46
|
-
import './chunk-
|
|
47
|
-
import './chunk-
|
|
48
|
-
import './chunk-
|
|
49
|
-
import './chunk-
|
|
42
|
+
import './chunk-LHYO4RDP.js';
|
|
43
|
+
import './chunk-UIBTEDLA.js';
|
|
44
|
+
import './chunk-6TFTRVOA.js';
|
|
45
|
+
import './chunk-5RUH3PCG.js';
|
|
46
|
+
import './chunk-DM4EGXDO.js';
|
|
47
|
+
import './chunk-AKR32WHV.js';
|
|
48
|
+
import './chunk-4IG6EZHU.js';
|
|
49
|
+
import './chunk-RW52CUFX.js';
|
|
50
50
|
import './chunk-G2JWZDFA.js';
|
|
51
51
|
import './chunk-ANPNT6PM.js';
|
|
52
|
-
import './chunk-
|
|
53
|
-
import './chunk-
|
|
54
|
-
import './chunk-
|
|
52
|
+
import './chunk-RVWADVBN.js';
|
|
53
|
+
import './chunk-M5OBRUQE.js';
|
|
54
|
+
import './chunk-VQ2JGZSC.js';
|
|
55
55
|
import './chunk-PJDQPF5N.js';
|
|
56
|
-
import './chunk-
|
|
57
|
-
import './chunk-
|
|
56
|
+
import './chunk-JT3YO5MH.js';
|
|
57
|
+
import './chunk-ESP5VZBD.js';
|
|
58
58
|
import { claudeEnvPath } from './chunk-HDSDUTX4.js';
|
|
59
|
-
import './chunk-
|
|
59
|
+
import './chunk-HT7LVCTX.js';
|
|
60
60
|
import './chunk-ZJSNLVCE.js';
|
|
61
61
|
import './chunk-2O5KA67H.js';
|
|
62
62
|
import './chunk-BKO6JEZI.js';
|
|
63
63
|
import './chunk-FGF52V4V.js';
|
|
64
64
|
import './chunk-HCVLP7XA.js';
|
|
65
65
|
import './chunk-BJ3KTMDH.js';
|
|
66
|
-
import './chunk-
|
|
66
|
+
import './chunk-KUTZ6XLS.js';
|
|
67
67
|
import './chunk-5BHIBJDA.js';
|
|
68
68
|
import './chunk-CDDED64E.js';
|
|
69
69
|
import './chunk-RA3O54FC.js';
|
|
@@ -73,8 +73,8 @@ import './chunk-CRB3POP4.js';
|
|
|
73
73
|
import './chunk-URIZRCRY.js';
|
|
74
74
|
import './chunk-YQR6E6OV.js';
|
|
75
75
|
import './chunk-TUSYOL2O.js';
|
|
76
|
-
import './chunk-
|
|
77
|
-
import './chunk-
|
|
76
|
+
import './chunk-OGCG5LOX.js';
|
|
77
|
+
import './chunk-AKHGQKNR.js';
|
|
78
78
|
import './chunk-VNVZDWO3.js';
|
|
79
79
|
import { parseRunnerEnv } from './chunk-XD4ZCMA4.js';
|
|
80
80
|
import './chunk-MESOOLF4.js';
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { createHash } from 'crypto';
|
|
4
|
+
import { createReadStream, mkdirSync, rmSync, renameSync, existsSync, statSync, createWriteStream } from 'fs';
|
|
5
|
+
import { dirname } from 'path';
|
|
6
|
+
import { once } from 'events';
|
|
7
|
+
|
|
8
|
+
createRequire(import.meta.url);
|
|
9
|
+
var VoiceDownloadError = class extends Error {
|
|
10
|
+
constructor(message, retryable = false) {
|
|
11
|
+
super(message);
|
|
12
|
+
this.retryable = retryable;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
async function sha256OfFile(path) {
|
|
16
|
+
const hash = createHash("sha256");
|
|
17
|
+
for await (const chunk of createReadStream(path)) hash.update(chunk);
|
|
18
|
+
return hash.digest("hex");
|
|
19
|
+
}
|
|
20
|
+
function withoutCredentials(url) {
|
|
21
|
+
try {
|
|
22
|
+
const parsed = new URL(url);
|
|
23
|
+
parsed.username = "";
|
|
24
|
+
parsed.password = "";
|
|
25
|
+
return parsed.toString();
|
|
26
|
+
} catch {
|
|
27
|
+
return "(an invalid URL)";
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
var ATTEMPTS = 3;
|
|
31
|
+
async function requestRest(params) {
|
|
32
|
+
const { url, part, name, fetchImpl, progress } = params;
|
|
33
|
+
const offset = existsSync(part) ? statSync(part).size : 0;
|
|
34
|
+
const response = await fetchImpl(url, offset > 0 ? { headers: { range: `bytes=${offset}-` } } : {});
|
|
35
|
+
if (response.status === 416 && offset > 0) {
|
|
36
|
+
await response.body?.cancel();
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (!response.ok || response.body === null) {
|
|
40
|
+
await response.body?.cancel();
|
|
41
|
+
throw new VoiceDownloadError(`cannot download ${name} from ${withoutCredentials(url)}: the server answered ${response.status}`, response.status >= 500);
|
|
42
|
+
}
|
|
43
|
+
const resumed = response.status === 206;
|
|
44
|
+
const start = resumed ? offset : 0;
|
|
45
|
+
const total = Number(response.headers.get("content-length") ?? 0) + start;
|
|
46
|
+
const out = createWriteStream(part, { flags: resumed ? "a" : "w" });
|
|
47
|
+
let written = start;
|
|
48
|
+
let lastReport = 0;
|
|
49
|
+
try {
|
|
50
|
+
for await (const chunk of response.body) {
|
|
51
|
+
if (!out.write(chunk)) await once(out, "drain");
|
|
52
|
+
written += chunk.length;
|
|
53
|
+
const now = Date.now();
|
|
54
|
+
if (progress !== void 0 && now - lastReport >= 1e3) {
|
|
55
|
+
lastReport = now;
|
|
56
|
+
progress(` downloading ${name}: ${(written / 1048576).toFixed(0)}${total > start ? ` of ${(total / 1048576).toFixed(0)}` : ""} MiB`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
} finally {
|
|
60
|
+
out.end();
|
|
61
|
+
await once(out, "close");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async function downloadPinned(params) {
|
|
65
|
+
const { url, dest, sha256, name } = params;
|
|
66
|
+
mkdirSync(dirname(dest), { recursive: true });
|
|
67
|
+
const part = `${dest}.part`;
|
|
68
|
+
for (let attempt = 1; ; attempt += 1) {
|
|
69
|
+
try {
|
|
70
|
+
await requestRest({ ...params, part });
|
|
71
|
+
break;
|
|
72
|
+
} catch (err) {
|
|
73
|
+
const refused = err instanceof VoiceDownloadError && !err.retryable;
|
|
74
|
+
if (refused || attempt === ATTEMPTS) {
|
|
75
|
+
throw err instanceof VoiceDownloadError ? err : new VoiceDownloadError(`cannot download ${name} from ${withoutCredentials(url)}: ${String(err)}`);
|
|
76
|
+
}
|
|
77
|
+
await new Promise((resolve) => setTimeout(resolve, params.retryDelayMs ?? 500));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
const digest = await sha256OfFile(part);
|
|
81
|
+
if (digest !== sha256) {
|
|
82
|
+
rmSync(part, { force: true });
|
|
83
|
+
throw new VoiceDownloadError(
|
|
84
|
+
`the downloaded ${name} has sha256 ${digest}, not the pinned ${sha256} \u2014 it was discarded and ${params.stopped ?? "nothing was spoken"}`
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
renameSync(part, dest);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export { VoiceDownloadError, downloadPinned, sha256OfFile };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
3
|
+
import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-ESP5VZBD.js';
|
|
4
4
|
import { readlinkSync, realpathSync, mkdirSync, unlinkSync, symlinkSync, renameSync, readFileSync, writeFileSync, rmSync, existsSync, readdirSync } from 'fs';
|
|
5
5
|
import { join, basename, sep, resolve } from 'path';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE } from './chunk-
|
|
4
|
-
import { normalizePath, CONTEXT_PIN_FILENAME } from './chunk-
|
|
3
|
+
import { AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE } from './chunk-KUTZ6XLS.js';
|
|
4
|
+
import { normalizePath, CONTEXT_PIN_FILENAME } from './chunk-OGCG5LOX.js';
|
|
5
5
|
import { existsSync, readdirSync, readFileSync, mkdirSync, writeFileSync, lstatSync, readlinkSync, symlinkSync, rmdirSync } from 'fs';
|
|
6
6
|
import { relative, sep, join } from 'path';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { DEFAULT_UNIT_NAME } from './chunk-
|
|
4
|
-
import { RUNNER_FILE_MODE } from './chunk-
|
|
3
|
+
import { DEFAULT_UNIT_NAME } from './chunk-HBBCQ5NE.js';
|
|
4
|
+
import { RUNNER_FILE_MODE } from './chunk-ESP5VZBD.js';
|
|
5
5
|
import { claudeEnvPath, withoutCredentialLines } from './chunk-HDSDUTX4.js';
|
|
6
6
|
import { parseRunnerEnv } from './chunk-XD4ZCMA4.js';
|
|
7
7
|
import { existsSync, readFileSync, writeFileSync, renameSync, rmSync } from 'fs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { isVersion, compareVersions } from './chunk-TQMI335S.js';
|
|
4
|
-
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
4
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-ESP5VZBD.js';
|
|
5
5
|
import { readFileSync, mkdirSync, writeFileSync, renameSync } from 'fs';
|
|
6
6
|
import { join } from 'path';
|
|
7
7
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { sanitizeTerminal } from './chunk-
|
|
4
|
-
import { remoteLookupFailed } from './chunk-
|
|
5
|
-
import { isAgentsMdLayout } from './chunk-
|
|
6
|
-
import { DEFAULT_DASHBOARD } from './chunk-
|
|
7
|
-
import { cliFetch, resolveGatewayCredentials } from './chunk-
|
|
3
|
+
import { sanitizeTerminal } from './chunk-DM4EGXDO.js';
|
|
4
|
+
import { remoteLookupFailed } from './chunk-AKR32WHV.js';
|
|
5
|
+
import { isAgentsMdLayout } from './chunk-4IG6EZHU.js';
|
|
6
|
+
import { DEFAULT_DASHBOARD } from './chunk-RW52CUFX.js';
|
|
7
|
+
import { cliFetch, resolveGatewayCredentials } from './chunk-VQ2JGZSC.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,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { fetchFactories, selectFactory, saveFactoryConnection, autoConnectedLine } from './chunk-
|
|
4
|
-
import { resolveRepoIdentity } from './chunk-
|
|
5
|
-
import { resolveGatewayCredentials } from './chunk-
|
|
3
|
+
import { fetchFactories, selectFactory, saveFactoryConnection, autoConnectedLine } from './chunk-5RUH3PCG.js';
|
|
4
|
+
import { resolveRepoIdentity } from './chunk-AKR32WHV.js';
|
|
5
|
+
import { resolveGatewayCredentials } from './chunk-VQ2JGZSC.js';
|
|
6
6
|
import { findGitDirs, readRepoConnection } from './chunk-BJ3KTMDH.js';
|
|
7
7
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
8
8
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
@@ -3,35 +3,35 @@ import { createRequire } from 'node:module';
|
|
|
3
3
|
import { readsJobState, READ_JOB_STATE_FORMATS, jobStateFormatOf } from './chunk-ZVB57WI6.js';
|
|
4
4
|
import { DOCKERD_LOG, HELPER_PATH, HELPER_RECORD } from './chunk-RJYKTWUP.js';
|
|
5
5
|
import { zodProblem } from './chunk-I3LTIAOR.js';
|
|
6
|
-
import { senderPidfile } from './chunk-
|
|
7
|
-
import { installScrubContext } from './chunk-
|
|
6
|
+
import { senderPidfile } from './chunk-Q4YVHYHT.js';
|
|
7
|
+
import { installScrubContext } from './chunk-SFJD4MRY.js';
|
|
8
8
|
import { writeDockerClientConfig } from './chunk-XTNMIV77.js';
|
|
9
|
-
import { ADDED_USER, shellQuote, GH_CONFIG_YML, ghHostsYml, AssetError, obtainImage, ensureRootfs, gitRemoteFor, startServicesFor, createLeaseChannel, createBuildDisk, machineConfig, resolveAgentUser, AgentUserError, runBuildSteps, LEASE_SECONDS, createContainerRuntime, stopContainer, cleanupContainer, outOfMemoryReason, containerSenderCommand, signalInContainer, syncInContainer, copyTranscriptsFromContainer, senderAliveScript, helperFirecrackerNote,
|
|
9
|
+
import { ADDED_USER, shellQuote, GH_CONFIG_YML, ghHostsYml, AssetError, obtainImage, ensureRootfs, makeBuildsDirPrivate, gitRemoteFor, startServicesFor, createLeaseChannel, createBuildDisk, machineConfig, startJailedInto, resolveAgentUser, AgentUserError, runBuildSteps, LEASE_SECONDS, createContainerRuntime, stopContainer, cleanupContainer, outOfMemoryReason, containerSenderCommand, signalInContainer, syncInContainer, copyTranscriptsFromContainer, MANAGED_UNJAILED_REASON, senderAliveScript, helperFirecrackerNote, isLiteralAddress, stopJailed, deleteBuildDisk, startCheckContainer, lifecycleSteps, lifecycleFailureReason, writeEvalInput, DeliveryFailure, EVAL_INPUT_NAME, copyTranscripts, senderSignalScript, containerJudgeEnvironment, ROOT_DISK_ID_PREFIX, copyJudgeTree } from './chunk-X5LFLYSD.js';
|
|
10
10
|
import { waitForAgent, vmExecArgs } from './chunk-QQGZ5THT.js';
|
|
11
11
|
import { socketPathProblem, vsockLinks, LEASE_LINK, linkVsockSockets } from './chunk-HIGJTX5U.js';
|
|
12
|
-
import { describeCallFailure, resolveGoverningSource, refusalCode, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, logStamp, createRunnerLog, removeKeptContext, formatDuration, retrySend, formatClock, WORKFLOW_PERMISSION_REASON, keptContextTree } from './chunk-
|
|
13
|
-
import { isBuiltinContainer, isBuiltinProcess, isBuiltinVm, DEFAULT_CHECK_TIME_LIMIT_MINUTES } from './chunk-
|
|
14
|
-
import { readBranchHead, fetchCommit, diffBetween } from './chunk-
|
|
12
|
+
import { describeCallFailure, resolveGoverningSource, refusalCode, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, logStamp, createRunnerLog, removeKeptContext, formatDuration, retrySend, formatClock, WORKFLOW_PERMISSION_REASON, keptContextTree } from './chunk-KDM77TVX.js';
|
|
13
|
+
import { imageBuildOf, isBuiltinContainer, isBuiltinProcess, isBuiltinVm, DEFAULT_CHECK_TIME_LIMIT_MINUTES } from './chunk-ALSE7YKX.js';
|
|
14
|
+
import { readBranchHead, fetchCommit, diffBetween } from './chunk-TPGHCH2H.js';
|
|
15
15
|
import { isSameProcess, startTimeOf } from './chunk-JBJTC3UU.js';
|
|
16
|
-
import { HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, writeJobFile, readJobFile, childEnvironment, withAnswerProtocol, judgeCommand, MAX_REPORT_BYTES, JUDGE_MAX_TURNS, JUDGE_DIR, COMMAND_DIR, MAX_ITEMS_BYTES } from './chunk-
|
|
16
|
+
import { HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, writeJobFile, readJobFile, childEnvironment, withAnswerProtocol, judgeCommand, MAX_REPORT_BYTES, JUDGE_MAX_TURNS, JUDGE_DIR, COMMAND_DIR, MAX_ITEMS_BYTES } from './chunk-CHXYLCMA.js';
|
|
17
17
|
import { parseSize } from './chunk-YJLHUKYS.js';
|
|
18
|
-
import { CLAUDE_CODE_VERSION, FIRECRACKER_VERSION } from './chunk-
|
|
19
|
-
import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-
|
|
20
|
-
import { planArtifactUpload } from './chunk-
|
|
21
|
-
import { scrubText } from './chunk-
|
|
18
|
+
import { CLAUDE_CODE_VERSION, FIRECRACKER_VERSION } from './chunk-LHYO4RDP.js';
|
|
19
|
+
import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-UIBTEDLA.js';
|
|
20
|
+
import { planArtifactUpload } from './chunk-DM4EGXDO.js';
|
|
21
|
+
import { scrubText } from './chunk-AKR32WHV.js';
|
|
22
22
|
import { readCloudConfig } from './chunk-PJDQPF5N.js';
|
|
23
|
-
import { signerFor } from './chunk-
|
|
24
|
-
import { RUNNER_FILE_MODE, runnerDir, buildDir, vsockPath } from './chunk-
|
|
23
|
+
import { signerFor } from './chunk-JT3YO5MH.js';
|
|
24
|
+
import { RUNNER_FILE_MODE, runnerDir, buildDir, vsockPath } from './chunk-ESP5VZBD.js';
|
|
25
25
|
import { JOB_MOUNT, claudeCredential, repositoriesOf, primaryOf, buildEnvironment, CHECKOUT_DIR, parseIsolation, proxyEnvironment, withProxyWarningHidden, containerLocalAddress, destinationEnvironment, CLAUDE_CREDENTIAL_VARIABLES, builtInEnvironment, withHooksPath, startBuildServices, BUILT_IN_NAMES, AGENT_CREDENTIAL_MISSING, sharedUserEnvironment, headerVariables, authorEnvironment, withTunnelRecord, commitIdentityRecord, RELAY_PORT, repositoryPath, lifecycleWorkdir, CHECK_ITEMS_FILE, currentClaudeCredential, removedClaudeCredentialValues, checkEnvironment, EVAL_INPUT_DIR } from './chunk-HDSDUTX4.js';
|
|
26
|
-
import { resolvePackRoot } from './chunk-
|
|
26
|
+
import { resolvePackRoot } from './chunk-KUTZ6XLS.js';
|
|
27
27
|
import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
|
|
28
28
|
import { resolveVersion } from './chunk-RA3O54FC.js';
|
|
29
|
-
import { parsePolicy } from './chunk-
|
|
30
|
-
import { CheckItemsSchema, CHECK_ITEM_REASON_MAX_LENGTH } from './chunk-
|
|
29
|
+
import { parsePolicy } from './chunk-OGCG5LOX.js';
|
|
30
|
+
import { CheckItemsSchema, CHECK_ITEM_REASON_MAX_LENGTH } from './chunk-AKHGQKNR.js';
|
|
31
31
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
32
32
|
import { fdName } from './chunk-XD4ZCMA4.js';
|
|
33
33
|
import { RUNNER_WORDED_REASONS, UNKNOWN_TRACKING_REASON } from './chunk-MESOOLF4.js';
|
|
34
|
-
import { existsSync, statSync, appendFileSync, rmSync, mkdirSync, chmodSync, writeFileSync, accessSync, constants, openSync, readFileSync, closeSync, readdirSync,
|
|
34
|
+
import { existsSync, statSync, appendFileSync, rmSync, mkdirSync, chmodSync, writeFileSync, accessSync, constants, openSync, readFileSync, closeSync, readdirSync, lstatSync, fstatSync, readSync, realpathSync } from 'fs';
|
|
35
35
|
import { join, isAbsolute, dirname, delimiter, sep } from 'path';
|
|
36
36
|
import { once } from 'events';
|
|
37
37
|
import { createServer } from 'net';
|
|
@@ -175,61 +175,7 @@ async function stopMicroVmCommand(runtime, state) {
|
|
|
175
175
|
(signal) => runtime.vm.exec(state.vsockPath, { argv: ["/bin/sh", "-c", STOP_COMMAND_SCRIPT], user: "root", cwd: "/", env: { PATH: GUEST_PATH } }, { signal })
|
|
176
176
|
);
|
|
177
177
|
}
|
|
178
|
-
|
|
179
|
-
return `outerlayer-build-${buildId}`;
|
|
180
|
-
}
|
|
181
|
-
function linkIn(buildDir2, name, source) {
|
|
182
|
-
const target = join(buildDir2, name);
|
|
183
|
-
rmSync(target, { force: true });
|
|
184
|
-
try {
|
|
185
|
-
linkSync(source, target);
|
|
186
|
-
} catch (err) {
|
|
187
|
-
if (err.code === "EXDEV") {
|
|
188
|
-
throw new Error(`${source} and ${buildDir2} are on different file systems, so the build's files cannot be linked into its jail`);
|
|
189
|
-
}
|
|
190
|
-
throw err;
|
|
191
|
-
}
|
|
192
|
-
chmodSync(source, 292);
|
|
193
|
-
}
|
|
194
|
-
async function startJailed(input) {
|
|
195
|
-
linkIn(input.buildDir, "kernel", input.kernel);
|
|
196
|
-
linkIn(input.buildDir, "rootfs.ext4", input.rootfs);
|
|
197
|
-
for (const name of input.sockets) {
|
|
198
|
-
try {
|
|
199
|
-
chmodSync(join(input.buildDir, name), 438);
|
|
200
|
-
} catch (err) {
|
|
201
|
-
if (err.code !== "ENOENT") throw err;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
return input.client.start({ build: input.buildId, kind: input.kind, ...input.timeLimitMinutes === void 0 ? {} : { timeLimitMinutes: input.timeLimitMinutes } });
|
|
205
|
-
}
|
|
206
|
-
async function startJailedInto(state, input, save) {
|
|
207
|
-
state.jailed = { unit: unitNameFor(state.buildId), chroot: "" };
|
|
208
|
-
save();
|
|
209
|
-
try {
|
|
210
|
-
const started = await startJailed({ ...input, buildId: state.buildId, buildDir: state.buildDir });
|
|
211
|
-
state.jailed = { unit: started.unit, chroot: started.chroot };
|
|
212
|
-
state.vsockPath = started.vsock;
|
|
213
|
-
} catch (err) {
|
|
214
|
-
if (err instanceof HelperRefusal) {
|
|
215
|
-
delete state.jailed;
|
|
216
|
-
save();
|
|
217
|
-
}
|
|
218
|
-
throw err;
|
|
219
|
-
}
|
|
220
|
-
save();
|
|
221
|
-
}
|
|
222
|
-
async function stopJailed(helper, state) {
|
|
223
|
-
const probe = await helper.probe();
|
|
224
|
-
if (!probe.ok) throw new Error(`the build's unit ${state.jailed?.unit ?? unitNameFor(state.buildId)} could not be stopped, because there is no helper to ask: ${probe.detail}`);
|
|
225
|
-
try {
|
|
226
|
-
await probe.client.stop(state.buildId);
|
|
227
|
-
} catch (err) {
|
|
228
|
-
throw new Error(`the build's unit ${state.jailed?.unit ?? unitNameFor(state.buildId)} was not stopped: ${describeCallFailure(err)}`);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
// src/runner/microvm/hooks.ts
|
|
178
|
+
var MANAGED_NO_BUILDER_DISK_REASON = "this release of the CLI pins no builder root disk, and a managed runner builds its images in a builder microVM, never on the host. The build did not start; update the CLI";
|
|
233
179
|
var DEFAULT_MEMORY = "8g";
|
|
234
180
|
var DEFAULT_DISK = "40g";
|
|
235
181
|
var DEFAULT_CPUS = 4;
|
|
@@ -287,12 +233,6 @@ function vmAlive(runtime, state) {
|
|
|
287
233
|
if (state.jailed !== void 0) return runtime.vm.helper.alive(state.jailed.unit);
|
|
288
234
|
return state.firecracker !== void 0 && runtime.vm.firecracker.alive(state.firecracker);
|
|
289
235
|
}
|
|
290
|
-
function makeBuildsDirPrivate(buildDir2) {
|
|
291
|
-
const builds = dirname(buildDir2);
|
|
292
|
-
const stat = statSync(builds);
|
|
293
|
-
if (stat.uid === process.getuid?.() && (stat.mode & 18) !== 0) chmodSync(builds, 448);
|
|
294
|
-
}
|
|
295
|
-
var MANAGED_UNJAILED_REASON = "the root helper does not answer, and a managed runner starts no build without the jailer. The build did not start; restore the helper with `outerlayer runner install --service --replace`";
|
|
296
236
|
async function helperFor(runtime, log, managed) {
|
|
297
237
|
const probe = await runtime.vm.helper.probe();
|
|
298
238
|
if (probe.ok) {
|
|
@@ -368,6 +308,17 @@ async function provisionMicroVm(input) {
|
|
|
368
308
|
const governing = await resolveGoverningSource({ config, repository, fetchImpl: input.fetchImpl });
|
|
369
309
|
if (!governing.ok) return fail(governing.reason);
|
|
370
310
|
const governingSource = governing.source;
|
|
311
|
+
const limits = {
|
|
312
|
+
cpus: config.build?.cpus ?? DEFAULT_CPUS,
|
|
313
|
+
memoryBytes: buildMemoryBytes(config),
|
|
314
|
+
diskBytes: parseSize(config.build?.disk ?? DEFAULT_DISK) ?? parseSize(DEFAULT_DISK)
|
|
315
|
+
};
|
|
316
|
+
let buildsInBuilder = imageBuildOf(config) === "vm";
|
|
317
|
+
if (buildsInBuilder && !vm.builderDiskPinned()) {
|
|
318
|
+
if (config.managed === true) return fail(MANAGED_NO_BUILDER_DISK_REASON);
|
|
319
|
+
log.line(`${tag} this release of the CLI pins no builder root disk, so the image builds on the host, as it does with runner.build.imageBuild set to host`);
|
|
320
|
+
buildsInBuilder = false;
|
|
321
|
+
}
|
|
371
322
|
const obtained = await obtainImage({
|
|
372
323
|
config,
|
|
373
324
|
runtime,
|
|
@@ -380,10 +331,22 @@ async function provisionMicroVm(input) {
|
|
|
380
331
|
aborted: input.aborted,
|
|
381
332
|
deadlineMs: input.deadlineMs,
|
|
382
333
|
now: input.now,
|
|
383
|
-
guestHelper: { path: assets.helper, sha256: assets.helperSha256 }
|
|
334
|
+
guestHelper: { path: assets.helper, sha256: assets.helperSha256 },
|
|
335
|
+
...buildsInBuilder ? {
|
|
336
|
+
inBuilder: {
|
|
337
|
+
kernel: assets.kernel,
|
|
338
|
+
firecracker: assets.firecracker,
|
|
339
|
+
limits,
|
|
340
|
+
memory: config.build?.memory,
|
|
341
|
+
allowHosts: config.build?.allowHosts,
|
|
342
|
+
managed: config.managed === true,
|
|
343
|
+
timeLimitMinutes: config.timeLimitMinutes
|
|
344
|
+
}
|
|
345
|
+
} : {}
|
|
384
346
|
});
|
|
385
347
|
if (!obtained.ok) return obtained.aborted === true ? { ok: false, reason: obtained.reason, aborted: true } : fail(obtained.reason);
|
|
386
348
|
const { report } = obtained.built;
|
|
349
|
+
const madeInBuilder = "rootfs" in obtained.built ? obtained.built.rootfs : void 0;
|
|
387
350
|
const buildId = randomBytes(6).toString("hex");
|
|
388
351
|
const buildDir2 = buildDir(config.configPath, buildId);
|
|
389
352
|
const state = {
|
|
@@ -438,11 +401,16 @@ async function provisionMicroVm(input) {
|
|
|
438
401
|
};
|
|
439
402
|
if (input.aborted()) return bail("", true);
|
|
440
403
|
let imageConfig;
|
|
441
|
-
|
|
442
|
-
state.rootfs =
|
|
443
|
-
imageConfig =
|
|
444
|
-
}
|
|
445
|
-
|
|
404
|
+
if (madeInBuilder !== void 0) {
|
|
405
|
+
state.rootfs = madeInBuilder.path;
|
|
406
|
+
imageConfig = { env: madeInBuilder.env, user: madeInBuilder.user };
|
|
407
|
+
} else {
|
|
408
|
+
try {
|
|
409
|
+
state.rootfs = await ensureRootfs({ host: vm.rootfs, runnerDir: runnerDirPath, imageId: report.imageId, memoryBytes: buildMemoryBytes(config) });
|
|
410
|
+
imageConfig = await vm.rootfs.imageConfig(report.imageId);
|
|
411
|
+
} catch (err) {
|
|
412
|
+
return bail(`the image could not be converted to a root disk: ${describeCallFailure(err)}`);
|
|
413
|
+
}
|
|
446
414
|
}
|
|
447
415
|
state.imageEnv = imageConfig.env;
|
|
448
416
|
state.buildDisk = join(buildDir2, "build.ext4");
|
|
@@ -460,11 +428,6 @@ async function provisionMicroVm(input) {
|
|
|
460
428
|
} catch (err) {
|
|
461
429
|
return bail(`the tunnel could not start: ${describeCallFailure(err)}`);
|
|
462
430
|
}
|
|
463
|
-
const limits = {
|
|
464
|
-
cpus: config.build?.cpus ?? DEFAULT_CPUS,
|
|
465
|
-
memoryBytes: buildMemoryBytes(config),
|
|
466
|
-
diskBytes: parseSize(config.build?.disk ?? DEFAULT_DISK) ?? parseSize(DEFAULT_DISK)
|
|
467
|
-
};
|
|
468
431
|
const links = vsockLinks({ destinations: config.build?.destinations?.length ?? 0, builtIns: true });
|
|
469
432
|
const served = input.leaseTimeLeftMs === void 0 ? links : [...links, LEASE_LINK];
|
|
470
433
|
let leaseServer;
|
|
@@ -928,10 +891,15 @@ async function startCheckMicroVm(input) {
|
|
|
928
891
|
return fail(err instanceof AssetError ? err.message : `the microVM's assets could not be had: ${describeCallFailure(err)}`);
|
|
929
892
|
}
|
|
930
893
|
if (abandoned()) return fail(ABANDONED);
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
894
|
+
if (built.imageId.startsWith(ROOT_DISK_ID_PREFIX)) {
|
|
895
|
+
if (built.rootfs === void 0 || !existsSync(built.rootfs)) return fail("the build's root disk is no longer stored, so the check environment cannot start from it");
|
|
896
|
+
state.rootfs = built.rootfs;
|
|
897
|
+
} else {
|
|
898
|
+
try {
|
|
899
|
+
state.rootfs = await ensureRootfs({ host: vm.rootfs, runnerDir: runnerDirPath, imageId: built.imageId, memoryBytes: buildMemoryBytes(config) });
|
|
900
|
+
} catch (err) {
|
|
901
|
+
return fail(`the image could not be converted to a root disk: ${describeCallFailure(err)}`);
|
|
902
|
+
}
|
|
935
903
|
}
|
|
936
904
|
if (abandoned()) return fail(ABANDONED);
|
|
937
905
|
state.buildDisk = join(buildDir2, "build.ext4");
|