@outerlayer/cli 0.33.0-next.20261022195547 → 0.33.0-next.20261023002325
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 +5 -0
- package/dist/{agent-setup-RJOVRRHK.js → agent-setup-55ZDEXCS.js} +6 -6
- package/dist/{bridge-BCG2EB7F.js → bridge-NBCXFTT4.js} +2 -2
- package/dist/{build-GKCVFHF4.js → build-G4GUF6LT.js} +4 -4
- package/dist/{build-disk-6QAXMA2J.js → build-disk-3GL3KKEB.js} +5 -5
- package/dist/build-info.json +1 -1
- package/dist/{builder-DPNHJXG3.js → builder-3CUKTVSY.js} +4 -4
- package/dist/{check-64UX323V.js → check-64FD5G3X.js} +35 -37
- package/dist/{chunk-3MXPS7ED.js → chunk-2N67C6IV.js} +5 -4
- package/dist/{chunk-ZQOSIMKU.js → chunk-2WMZPJVE.js} +6 -3
- package/dist/{chunk-5BNWAIHN.js → chunk-3DCB3GOV.js} +41 -3
- package/dist/{chunk-UOFBHIOZ.js → chunk-57L2YAJA.js} +1 -1
- package/dist/{chunk-6NWS455T.js → chunk-5THSC6BD.js} +1 -1
- package/dist/{chunk-QL3LPZ67.js → chunk-6LBSAW6I.js} +1 -1
- package/dist/{chunk-WPGBDY73.js → chunk-6RKD7YZ6.js} +1 -1
- package/dist/{chunk-77B36F5K.js → chunk-6Z4SZHV2.js} +4 -3
- package/dist/{chunk-DETKDTNL.js → chunk-AU346ENF.js} +3 -2
- package/dist/chunk-B2JURP6A.js +41 -0
- package/dist/{chunk-BCCI32ME.js → chunk-BALIE3BA.js} +36 -7
- package/dist/{chunk-BY36DVJV.js → chunk-BKADJZ7F.js} +3 -2
- package/dist/{chunk-H7A3IQH5.js → chunk-CANYZTD5.js} +39 -22
- package/dist/{chunk-L6JFFP3Q.js → chunk-DGI66PGY.js} +32 -20
- package/dist/{chunk-GN2R5Z7G.js → chunk-DXJTBU7A.js} +3 -3
- package/dist/{chunk-WCELNMXT.js → chunk-EUVE2EAE.js} +2 -2
- package/dist/{chunk-DDS2ISML.js → chunk-F5UL23I2.js} +1 -1
- package/dist/{chunk-43PV5KDB.js → chunk-GFVDC5S3.js} +3 -3
- package/dist/{chunk-JEKENLLA.js → chunk-GH246BGV.js} +1 -1
- package/dist/{chunk-W5DOK7BL.js → chunk-HVRQQOMH.js} +3 -3
- package/dist/{chunk-6IKSUAIA.js → chunk-HXA5GIHK.js} +61 -3
- package/dist/{chunk-2QT4JUW3.js → chunk-IP7BIBXJ.js} +1 -35
- package/dist/{chunk-KLXWS5Z7.js → chunk-JPG43G6Y.js} +3 -3
- package/dist/{chunk-D3HRAPNF.js → chunk-JRZCRIEO.js} +1044 -640
- package/dist/{chunk-LWTBE5J6.js → chunk-L26V6ILJ.js} +1 -1
- package/dist/{chunk-ZXBQ6E72.js → chunk-LJUIG5K4.js} +14 -9
- package/dist/{chunk-ZRRUWNJS.js → chunk-LYE3KB6L.js} +3 -3
- package/dist/{chunk-SK4TWCN3.js → chunk-MZBQTVFG.js} +1 -1
- package/dist/{chunk-YKYCE4HY.js → chunk-MZYOUIY5.js} +1 -1
- package/dist/{chunk-OWDSO3PE.js → chunk-NBZ7XBT6.js} +1 -1
- package/dist/{chunk-6C2YWM6N.js → chunk-OOCAF3ID.js} +1 -1
- package/dist/{chunk-AGZNCIIJ.js → chunk-PA6CK6WQ.js} +1 -1
- package/dist/{chunk-QDMMW5PC.js → chunk-Q2CMEQV7.js} +2 -2
- package/dist/{chunk-DNKUSXQU.js → chunk-QFQC5K4J.js} +6 -113
- package/dist/{chunk-DJWKUQLO.js → chunk-QPWFVE3X.js} +1 -1
- package/dist/{chunk-AA6LYZC4.js → chunk-SOI6K5DY.js} +1 -1
- package/dist/{chunk-35IY5HQY.js → chunk-SVDOA4W2.js} +1 -1
- package/dist/{chunk-RBJG5MM4.js → chunk-T5REPMNL.js} +5 -5
- package/dist/{chunk-6KLPC4U7.js → chunk-ULBNTSAD.js} +3 -2
- package/dist/{chunk-CMKY36NV.js → chunk-VT4TTJPG.js} +6 -5
- package/dist/{chunk-FAZDYI2D.js → chunk-XL2XWWU7.js} +3 -2
- package/dist/{chunk-P5FC7VUO.js → chunk-XWFSAOC7.js} +2 -2
- package/dist/{chunk-CUBIZBMF.js → chunk-YERR22SY.js} +3 -3
- package/dist/{chunk-GWDS42JC.js → chunk-Z5IW4DHH.js} +1 -1
- package/dist/{claude-launcher-66GKNIRZ.js → claude-launcher-NTYHJUJM.js} +1 -1
- package/dist/{cli-WICFAKFW.js → cli-WKRURGHC.js} +126 -102
- package/dist/{command-VGR24IPI.js → command-WG54AUHK.js} +23 -23
- package/dist/{config-DUY2PT7K.js → config-LZSFW2O3.js} +2 -3
- package/dist/{connect-cmd-ADRPR6ES.js → connect-cmd-P5GASVAF.js} +5 -5
- package/dist/{container-start-QX53HKXW.js → container-start-DQKFQ3CL.js} +21 -23
- package/dist/context-show-cmd-3EPJ7CJC.js +115 -0
- package/dist/{control-plane-launch-SMHL6MWW.js → control-plane-launch-A3YCHQNQ.js} +5 -5
- package/dist/{docker-GGRJHHBP.js → docker-4ERXWTRW.js} +4 -4
- package/dist/{doctor-N3CDJ66I.js → doctor-GRCEYJXA.js} +24 -26
- package/dist/{emit-artifact-cmd-73OWUBH6.js → emit-artifact-cmd-FDPJKGOO.js} +11 -10
- package/dist/{emit-criteria-cmd-D7OR356Y.js → emit-criteria-cmd-3SVGCMJN.js} +8 -7
- package/dist/{emit-demo-cmd-4AV74GMZ.js → emit-demo-cmd-JSVI56WY.js} +11 -10
- package/dist/{emit-finding-cmd-GEPRJ6KO.js → emit-finding-cmd-TLJWBGQE.js} +8 -7
- package/dist/{emit-result-cmd-N52IABK6.js → emit-result-cmd-CJNVDV5V.js} +10 -9
- package/dist/{emit-step-cmd-CC6MUJ2S.js → emit-step-cmd-347CZO7Y.js} +8 -7
- package/dist/{exec-client-KLI262IX.js → exec-client-7PT4W7JR.js} +3 -3
- package/dist/{findings-cmd-7I72XX2H.js → findings-cmd-LHTYEHYB.js} +8 -7
- package/dist/{fleet-readiness-EZAGL32M.js → fleet-readiness-KGR5AC2J.js} +5 -5
- package/dist/{governing-source-M7ZRJCGY.js → governing-source-JZQZUTMA.js} +10 -9
- package/dist/{guest-init-ZJIE6MU3.js → guest-init-J3F3AEEY.js} +4 -4
- package/dist/{hook-fast-WNKICZ6E.js → hook-fast-6WDMNZG5.js} +1 -1
- package/dist/{pending-I5TY6SQH.js → host-key-UERIQRE6.js} +3 -3
- package/dist/{image-tag-MORUQ4LF.js → image-tag-ADSLWXBA.js} +3 -3
- package/dist/index.js +4 -4
- package/dist/{init-XG4NRZX4.js → init-OKJAI77M.js} +20 -22
- package/dist/{init-VCWDBOT4.js → init-WNO4NAO7.js} +20 -22
- package/dist/{init-cmd-2CAMWMRP.js → init-cmd-PFW4XTG7.js} +11 -10
- package/dist/{init-update-NCM4GA3S.js → init-update-X7YLZL6H.js} +8 -8
- package/dist/{install-NLVYISAV.js → install-GQUCHIGE.js} +4 -5
- package/dist/{install-cmd-HFGINYEE.js → install-cmd-FV7IZ7XF.js} +5 -5
- package/dist/{logs-QSKJ4G6M.js → logs-HI46FO6Z.js} +2 -2
- package/dist/{loop-PXALY3VY.js → loop-2SITCQ6H.js} +35 -37
- package/dist/{machine-AZRL432D.js → machine-YHBCNRUO.js} +20 -18
- package/dist/{mcp-serve-cmd-DQSO6MOL.js → mcp-serve-cmd-7ABBV2QE.js} +4 -4
- package/dist/{paths-KHDFSBEI.js → paths-7HVTDE6J.js} +2 -2
- package/dist/{host-key-REZADWAM.js → pending-5HZACM2V.js} +3 -3
- package/dist/{pidfile-BSY63HIC.js → pidfile-5UDLYPMC.js} +3 -3
- package/dist/{record-7CNTGRLD.js → record-PPZEXAVA.js} +3 -3
- package/dist/{runner-env-26NLQI35.js → runner-env-QYE7KZFP.js} +5 -6
- package/dist/{runner-identity-WGH73DTV.js → runner-identity-FIHOECSH.js} +4 -4
- package/dist/{runner-key-6BIULOR4.js → runner-key-YUKU2MWK.js} +20 -22
- package/dist/{session-sender-MSHKJSBG.js → session-sender-7B3ZDWMC.js} +11 -10
- package/dist/{spec-cmd-AWIMO32E.js → spec-cmd-Q26NE22H.js} +9 -8
- package/dist/{status-BILERIXB.js → status-VBQJMFEX.js} +27 -25
- package/dist/{sync-cmd-BSUZ65CU.js → sync-cmd-SSUYTMLJ.js} +10 -9
- package/dist/{watch-UF6XCGSI.js → watch-L5NCO46E.js} +10 -9
- package/dist/{work-claim-cmd-4FXVAZWF.js → work-claim-cmd-MFND6Z4S.js} +12 -12
- package/dist/{work-cmd-NCP4637R.js → work-cmd-W7WEHMQJ.js} +8 -7
- package/dist/{work-comment-cmd-YNQYVHYS.js → work-comment-cmd-SSUOGVDD.js} +8 -7
- package/dist/{work-logs-cmd-HHWVYQBG.js → work-logs-cmd-WPMWMDX6.js} +8 -7
- package/dist/{work-open-pr-cmd-ALVD7KLY.js → work-open-pr-cmd-NO5YLOXD.js} +9 -8
- package/dist/{work-pr-cmd-KBNFVRB4.js → work-pr-cmd-37B5KECR.js} +8 -7
- package/dist/{work-stop-cmd-DBWNHZJO.js → work-stop-cmd-3BJLXUJ3.js} +8 -7
- package/package.json +1 -1
- package/skill-pack/maintained/outerlayer-build/SKILL.md +4 -2
- package/dist/chunk-I5LGKZ4M.js +0 -107
- package/dist/chunk-UXYLWVTQ.js +0 -43
- package/dist/chunk-WBZJWVT2.js +0 -146
package/README.md
CHANGED
|
@@ -404,6 +404,10 @@ content:
|
|
|
404
404
|
The item is `--item`, or the item the recorded session was launched for.
|
|
405
405
|
`findings result` sends the problem id, `fixed` or `not_fixed`, your note and
|
|
406
406
|
the session id. Nothing from the session itself is sent.
|
|
407
|
+
- **`outerlayer context show`** reads which instruction files and skills a
|
|
408
|
+
repository's builds receive (`GET /v1/context/delivery?repo=<owner>/<name>`).
|
|
409
|
+
It sends the repository name with your login or factory key. The answer holds
|
|
410
|
+
paths and skill names, never file contents.
|
|
407
411
|
- **`outerlayer emit criteria <file>`** sends the acceptance criteria of a work
|
|
408
412
|
item as one list (`POST /v1/criteria`): each criterion's id, text and
|
|
409
413
|
declared proof kind, from the JSON file you name. The anchoring is the same
|
|
@@ -474,6 +478,7 @@ before it gives up.
|
|
|
474
478
|
| `outerlayer init` | Connect this repository (`outerlayer connect`), install the capture hooks and the status-line segment, and run `doctor`. It never signs in: without a login it skips the connect step and says to run `outerlayer login`. `--local` installs the hooks only, with no network call. `--json` prints one document naming each step's outcome. Run through `npx`, it copies the CLI to `~/.outerlayer/cli` and points the hooks at that copy, so they survive npm clearing its cache; `npx @outerlayer/cli@latest init --local` upgrades it. From any other install, the hooks run that install. Claude Code deletes transcripts after ~30 days; run `outerlayer daemon` separately to mirror them first — `init` does not start it for you. |
|
|
475
479
|
| `outerlayer daemon` | Run the copy-out daemon in the foreground (`--once` for a single sweep, which uploads nothing). Once cloud credentials exist, it also streams a launched session's new turns as they land — see Privacy, above. `outerlayer watch` is the former name and still works, with a warning. |
|
|
476
480
|
| `outerlayer doctor` | Check the installation: hooks, status-line freshness, sync health and, with a factory key, the GitHub App access builds need. `--json` prints the checks and a summary for scripts. |
|
|
481
|
+
| `outerlayer context show [--repo <owner/name>] [--json]` | Print what a repository's builds receive: the repository that governs it (or that it governs itself), the commit a build gets, the instruction files and the skill names. It warns when the skills include no `build`. `--repo` defaults to the checkout's own repository. It needs only the context-read permission. |
|
|
477
482
|
| `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. |
|
|
478
483
|
| `outerlayer hooks wrap` / `outerlayer hooks unwrap` | Auto-wrap (or undo wrapping) `PreToolUse`/`PostToolUse` hooks for execution evidence — one spawn per firing. |
|
|
479
484
|
| `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. |
|
|
@@ -1,18 +1,18 @@
|
|
|
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-SVDOA4W2.js';
|
|
4
4
|
import './chunk-JHTJPQSL.js';
|
|
5
5
|
import './chunk-KT4CN6OU.js';
|
|
6
6
|
import './chunk-DY7Y7UT4.js';
|
|
7
7
|
import './chunk-HJYBWJAS.js';
|
|
8
8
|
import './chunk-ANPNT6PM.js';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-EUVE2EAE.js';
|
|
10
10
|
import './chunk-UIUGTW5C.js';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-6RKD7YZ6.js';
|
|
12
12
|
import './chunk-PJDQPF5N.js';
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
13
|
+
import './chunk-SOI6K5DY.js';
|
|
14
|
+
import './chunk-PA6CK6WQ.js';
|
|
15
|
+
import './chunk-BALIE3BA.js';
|
|
16
16
|
import './chunk-ZJSNLVCE.js';
|
|
17
17
|
import './chunk-BJ3KTMDH.js';
|
|
18
18
|
import './chunk-G63KT5I5.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { BRIDGE_ADDRESS, BRIDGE_CIDR, CONTAINER_NO_PROXY, CONTAINER_PROXY, TUNNEL_PORT, dockerClientConfig, startBridgeForward, writeDockerClientConfig } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
export { BRIDGE_ADDRESS, BRIDGE_CIDR, CONTAINER_NO_PROXY, CONTAINER_PROXY, TUNNEL_PORT, dockerClientConfig, startBridgeForward, writeDockerClientConfig } from './chunk-6LBSAW6I.js';
|
|
4
|
+
import './chunk-BALIE3BA.js';
|
|
5
5
|
import './chunk-HACGUL52.js';
|
|
6
6
|
import './chunk-MESOOLF4.js';
|
|
7
7
|
import './chunk-Z5GEFMRW.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { KEY_PREFIX, TAG_HOST, buildRepositoryImage, metadataFromLabels, prepareImageBuild, writeRecord } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
export { KEY_PREFIX, TAG_HOST, buildRepositoryImage, metadataFromLabels, prepareImageBuild, writeRecord } from './chunk-JPG43G6Y.js';
|
|
4
|
+
import './chunk-F5UL23I2.js';
|
|
5
5
|
import './chunk-JBJTC3UU.js';
|
|
6
6
|
export { RecipeError } from './chunk-3Z3MPR55.js';
|
|
7
7
|
import './chunk-TGHBOXKJ.js';
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
8
|
+
import './chunk-PA6CK6WQ.js';
|
|
9
|
+
import './chunk-BALIE3BA.js';
|
|
10
10
|
import './chunk-HACGUL52.js';
|
|
11
11
|
import './chunk-MESOOLF4.js';
|
|
12
12
|
import './chunk-Z5GEFMRW.js';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { DEFAULT_BUILD_DISK, DOCKER_CACHE_MS, checkDiskFit, realBuildDiskProbe, runDocker, volumeBytes } from './chunk-
|
|
3
|
+
export { DEFAULT_BUILD_DISK, DOCKER_CACHE_MS, checkDiskFit, realBuildDiskProbe, runDocker, volumeBytes } from './chunk-XWFSAOC7.js';
|
|
4
4
|
import './chunk-YYYRBYWG.js';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-GFVDC5S3.js';
|
|
6
6
|
import './chunk-3Z3MPR55.js';
|
|
7
7
|
import './chunk-TGHBOXKJ.js';
|
|
8
8
|
import './chunk-YJLHUKYS.js';
|
|
9
9
|
import './chunk-5DNCFOXA.js';
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
10
|
+
import './chunk-SOI6K5DY.js';
|
|
11
|
+
import './chunk-PA6CK6WQ.js';
|
|
12
|
+
import './chunk-BALIE3BA.js';
|
|
13
13
|
import './chunk-E6CO3MJE.js';
|
|
14
14
|
import './chunk-HACGUL52.js';
|
|
15
15
|
import './chunk-MESOOLF4.js';
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"2026-10-
|
|
1
|
+
{"id":"2026-10-23T00:24:49.363Z+beeb073","root":"/home/runner/_work/outerlayer/outerlayer","pkg":"outerlayer"}
|
|
@@ -1,13 +1,13 @@
|
|
|
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-GFVDC5S3.js';
|
|
4
4
|
import './chunk-3Z3MPR55.js';
|
|
5
5
|
import './chunk-TGHBOXKJ.js';
|
|
6
6
|
import './chunk-YJLHUKYS.js';
|
|
7
7
|
import './chunk-5DNCFOXA.js';
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
8
|
+
import './chunk-SOI6K5DY.js';
|
|
9
|
+
import './chunk-PA6CK6WQ.js';
|
|
10
|
+
import './chunk-BALIE3BA.js';
|
|
11
11
|
import './chunk-E6CO3MJE.js';
|
|
12
12
|
import './chunk-HACGUL52.js';
|
|
13
13
|
import './chunk-MESOOLF4.js';
|
|
@@ -1,64 +1,62 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { probeCredentials } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import { probeCredentials } from './chunk-CANYZTD5.js';
|
|
4
|
+
import './chunk-DGI66PGY.js';
|
|
5
5
|
import './chunk-ZVB57WI6.js';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-57L2YAJA.js';
|
|
7
7
|
import './chunk-3JVYMD4G.js';
|
|
8
8
|
import './chunk-E7R2GIAW.js';
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
13
|
-
import './chunk-
|
|
9
|
+
import './chunk-OOCAF3ID.js';
|
|
10
|
+
import './chunk-MZYOUIY5.js';
|
|
11
|
+
import './chunk-GH246BGV.js';
|
|
12
|
+
import './chunk-HVRQQOMH.js';
|
|
13
|
+
import './chunk-6LBSAW6I.js';
|
|
14
14
|
import './chunk-I3LTIAOR.js';
|
|
15
|
-
import './chunk-
|
|
16
|
-
import './chunk-
|
|
17
|
-
import './chunk-
|
|
15
|
+
import './chunk-Q2CMEQV7.js';
|
|
16
|
+
import './chunk-2N67C6IV.js';
|
|
17
|
+
import './chunk-AU346ENF.js';
|
|
18
18
|
import './chunk-ESVW4MJY.js';
|
|
19
|
-
import {
|
|
20
|
-
import './chunk-
|
|
19
|
+
import { managedProblems, managedFactsOf } from './chunk-QFQC5K4J.js';
|
|
20
|
+
import './chunk-NBZ7XBT6.js';
|
|
21
21
|
import './chunk-TBT347UY.js';
|
|
22
|
-
import './chunk-
|
|
23
|
-
import './chunk-CUBIZBMF.js';
|
|
24
|
-
import './chunk-I5LGKZ4M.js';
|
|
25
|
-
import { probeHelper, HELPER_ENV, helperSocketPath } from './chunk-D3HRAPNF.js';
|
|
22
|
+
import { placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, probeHelper, HELPER_ENV, helperSocketPath, needsClaudeCredential, claudeCredentialCheck, claimPermissionProblem, formerSkillQueues, formerSkillProblem } from './chunk-JRZCRIEO.js';
|
|
26
23
|
import './chunk-2PGI6RDE.js';
|
|
27
|
-
import './chunk-
|
|
28
|
-
import './chunk-
|
|
24
|
+
import './chunk-YERR22SY.js';
|
|
25
|
+
import './chunk-JPG43G6Y.js';
|
|
26
|
+
import './chunk-F5UL23I2.js';
|
|
29
27
|
import './chunk-JBJTC3UU.js';
|
|
30
28
|
import './chunk-OGFGZQA3.js';
|
|
31
|
-
import './chunk-
|
|
32
|
-
import './chunk-
|
|
33
|
-
import './chunk-
|
|
34
|
-
import './chunk-
|
|
29
|
+
import './chunk-5THSC6BD.js';
|
|
30
|
+
import './chunk-L26V6ILJ.js';
|
|
31
|
+
import './chunk-T5REPMNL.js';
|
|
32
|
+
import './chunk-MZBQTVFG.js';
|
|
35
33
|
import './chunk-TQMI335S.js';
|
|
36
|
-
import { DEFAULT_UNIT_NAME } from './chunk-
|
|
37
|
-
import './chunk-
|
|
34
|
+
import { DEFAULT_UNIT_NAME } from './chunk-LYE3KB6L.js';
|
|
35
|
+
import './chunk-XWFSAOC7.js';
|
|
38
36
|
import './chunk-YYYRBYWG.js';
|
|
39
|
-
import './chunk-
|
|
37
|
+
import './chunk-GFVDC5S3.js';
|
|
40
38
|
import './chunk-3Z3MPR55.js';
|
|
41
39
|
import './chunk-TGHBOXKJ.js';
|
|
42
|
-
import { loadRunnerConfig, RunnerConfigError, checkHooks } from './chunk-
|
|
43
|
-
import './chunk-UXYLWVTQ.js';
|
|
40
|
+
import { loadRunnerConfig, RunnerConfigError, checkHooks } from './chunk-3DCB3GOV.js';
|
|
44
41
|
import './chunk-YJLHUKYS.js';
|
|
45
|
-
import './chunk-
|
|
46
|
-
import './chunk-
|
|
47
|
-
import './chunk-
|
|
42
|
+
import './chunk-VT4TTJPG.js';
|
|
43
|
+
import './chunk-IP7BIBXJ.js';
|
|
44
|
+
import './chunk-B2JURP6A.js';
|
|
45
|
+
import './chunk-2WMZPJVE.js';
|
|
48
46
|
import './chunk-EWVYQLD3.js';
|
|
49
47
|
import './chunk-5DNCFOXA.js';
|
|
50
48
|
import './chunk-HJYBWJAS.js';
|
|
51
49
|
import './chunk-NSPRS7WK.js';
|
|
52
50
|
import './chunk-G2JWZDFA.js';
|
|
53
51
|
import './chunk-ANPNT6PM.js';
|
|
54
|
-
import './chunk-
|
|
52
|
+
import './chunk-EUVE2EAE.js';
|
|
55
53
|
import './chunk-UIUGTW5C.js';
|
|
56
|
-
import './chunk-
|
|
54
|
+
import './chunk-6RKD7YZ6.js';
|
|
57
55
|
import './chunk-PJDQPF5N.js';
|
|
58
|
-
import './chunk-
|
|
59
|
-
import './chunk-
|
|
60
|
-
import { claudeEnvPath } from './chunk-
|
|
61
|
-
import './chunk-
|
|
56
|
+
import './chunk-SOI6K5DY.js';
|
|
57
|
+
import './chunk-PA6CK6WQ.js';
|
|
58
|
+
import { claudeEnvPath } from './chunk-BALIE3BA.js';
|
|
59
|
+
import './chunk-QPWFVE3X.js';
|
|
62
60
|
import './chunk-ZJSNLVCE.js';
|
|
63
61
|
import './chunk-2O5KA67H.js';
|
|
64
62
|
import './chunk-BKO6JEZI.js';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { uploadSpooledSteps } from './chunk-
|
|
3
|
+
import { uploadSpooledSteps } from './chunk-AU346ENF.js';
|
|
4
4
|
import { LaunchFilter } from './chunk-ESVW4MJY.js';
|
|
5
5
|
import { RepoFilter } from './chunk-TBT347UY.js';
|
|
6
6
|
import { migrateLegacyArtifactSidecars, planArtifactUpload, artifactsStatePath, sanitizeTerminal, acquireArtifactSpoolLock, artifactBlobsDir, resolveArtifactTurnIndex, isArtifactTombstoned, ARTIFACT_RETRY_MAX_AGE_MS, writeArtifactSpoolState, reclaimUnneededArtifactBlobs, neededArtifactShas } from './chunk-EWVYQLD3.js';
|
|
7
7
|
import { setCustomScrubbers, setLocalIdentity, tailTranscript, enrichSessionRepo, scanAll, setRepoRoot, resolveRepoIdentity, sessionIdFromPath, scrubDeep, SOURCE_ADAPTERS } from './chunk-5DNCFOXA.js';
|
|
8
8
|
import { C } from './chunk-ANPNT6PM.js';
|
|
9
|
-
import { cliFetch, resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-
|
|
9
|
+
import { cliFetch, resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-6RKD7YZ6.js';
|
|
10
10
|
import { readCloudConfig, cloudConfigPath, writeCloudConfig } from './chunk-PJDQPF5N.js';
|
|
11
|
-
import { signerFor, signRunnerRequest } from './chunk-
|
|
12
|
-
import { writeSyncStatus, spoolDir } from './chunk-
|
|
11
|
+
import { signerFor, signRunnerRequest } from './chunk-SOI6K5DY.js';
|
|
12
|
+
import { writeSyncStatus, spoolDir } from './chunk-QPWFVE3X.js';
|
|
13
13
|
import { readLatestProvenanceForSession, readContextProvenance } from './chunk-ZJSNLVCE.js';
|
|
14
14
|
import { hookExecSpoolPath } from './chunk-2O5KA67H.js';
|
|
15
15
|
import { applyReportedCost } from './chunk-BKO6JEZI.js';
|
|
@@ -686,6 +686,7 @@ var LiveUploader = class {
|
|
|
686
686
|
enrichSessionRepo(session);
|
|
687
687
|
destination ??= resolveGatewayCredentials({ home: this.home, env: {}, cwd: session.env.cwd ?? "/" });
|
|
688
688
|
if (!destination.ok) return false;
|
|
689
|
+
if (destination.kind === "login" && readRepoConnection(session.env.cwd ?? "/") === void 0) return false;
|
|
689
690
|
if (this.build === void 0 && !new RepoFilter(cloudConfig.repos).allows(session.env.gitRepo)) return false;
|
|
690
691
|
const launchSpool = readLaunchSpoolState(this.home);
|
|
691
692
|
if (!launchStatusIsDecisive(launchSpool)) return false;
|
|
@@ -4,7 +4,7 @@ import { sanitizeTerminal } from './chunk-EWVYQLD3.js';
|
|
|
4
4
|
import { remoteLookupFailed } from './chunk-5DNCFOXA.js';
|
|
5
5
|
import { isAgentsMdLayout } from './chunk-HJYBWJAS.js';
|
|
6
6
|
import { DEFAULT_DASHBOARD } from './chunk-NSPRS7WK.js';
|
|
7
|
-
import { cliFetch, resolveGatewayCredentials } from './chunk-
|
|
7
|
+
import { cliFetch, resolveGatewayCredentials } from './chunk-6RKD7YZ6.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';
|
|
@@ -150,6 +150,7 @@ var REASON_TEXT = {
|
|
|
150
150
|
flag: "you passed --factory",
|
|
151
151
|
saved: "already connected",
|
|
152
152
|
linked: "the repository is linked to it",
|
|
153
|
+
configured: "your config file names it",
|
|
153
154
|
owner: "it owns this repository",
|
|
154
155
|
only: "the only factory you can use",
|
|
155
156
|
prompt: "you chose it"
|
|
@@ -237,11 +238,13 @@ async function fetchFactories(fetchImpl, url, token, repository) {
|
|
|
237
238
|
}
|
|
238
239
|
return { ok: true, factories };
|
|
239
240
|
}
|
|
240
|
-
function selectFactory(factories, saved, repository) {
|
|
241
|
+
function selectFactory(factories, saved, repository, configured) {
|
|
241
242
|
const remembered = saved && factories.find((f) => f.id === saved.appId);
|
|
242
243
|
if (remembered) return { factory: remembered, reason: "saved" };
|
|
243
244
|
const linked = factories.filter((f) => f.linked === true);
|
|
244
245
|
if (linked.length === 1) return { factory: linked[0], reason: "linked" };
|
|
246
|
+
const named = (linked.length > 0 ? linked : factories).find((f) => f.id === configured);
|
|
247
|
+
if (named) return { factory: named, reason: "configured" };
|
|
245
248
|
const owners = factories.filter((f) => f.owner);
|
|
246
249
|
if (owners.length === 1) return { factory: owners[0], reason: "owner" };
|
|
247
250
|
if (factories.length === 1) return { factory: factories[0], reason: "only" };
|
|
@@ -271,7 +274,7 @@ async function choose(flags, deps, factories, saved, repository) {
|
|
|
271
274
|
${listText(factories, repository)}`;
|
|
272
275
|
return result(1, "failed", `--factory ${flags.factory} names no factory you can use`, message);
|
|
273
276
|
}
|
|
274
|
-
const decided = selectFactory(factories, saved, repository);
|
|
277
|
+
const decided = selectFactory(factories, saved, repository, readCloudConfig(deps.home).appId);
|
|
275
278
|
if (decided.factory) return { factory: decided.factory, reason: decided.reason };
|
|
276
279
|
const linked = factories.filter((f) => f.linked === true);
|
|
277
280
|
if (!deps.isTerminal) {
|
|
@@ -1,14 +1,52 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { MAX_ALLOW_HOSTS, allowHostProblem } from './chunk-UXYLWVTQ.js';
|
|
4
3
|
import { parseSize } from './chunk-YJLHUKYS.js';
|
|
5
|
-
import { isRefusedInConfig, resolveDestinations, isReservedVariable } from './chunk-
|
|
4
|
+
import { isRefusedInConfig, resolveDestinations, isReservedVariable } from './chunk-BALIE3BA.js';
|
|
6
5
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
7
6
|
import { existsSync, statSync, accessSync, constants, readFileSync } from 'fs';
|
|
8
7
|
import { hostname } from 'os';
|
|
9
8
|
import { join } from 'path';
|
|
10
9
|
|
|
11
10
|
createRequire(import.meta.url);
|
|
11
|
+
|
|
12
|
+
// src/runner/allow-hosts.ts
|
|
13
|
+
var MAX_ALLOW_HOSTS = 500;
|
|
14
|
+
var LABEL = /^(?!-)[a-z0-9-]{1,63}(?<!-)$/;
|
|
15
|
+
var IPV4 = /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;
|
|
16
|
+
function isAddress(text) {
|
|
17
|
+
if (IPV4.test(text)) return true;
|
|
18
|
+
try {
|
|
19
|
+
new URL(`http://[${text}]/`);
|
|
20
|
+
return true;
|
|
21
|
+
} catch {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function isHostName(text) {
|
|
26
|
+
const labels = text.split(".");
|
|
27
|
+
return text.length <= 253 && labels.every((label) => LABEL.test(label)) && !/^\d+$/.test(labels.at(-1));
|
|
28
|
+
}
|
|
29
|
+
function allowHostProblem(entry) {
|
|
30
|
+
if (typeof entry !== "string") return "is not a string";
|
|
31
|
+
const text = entry.toLowerCase();
|
|
32
|
+
if (isAddress(text)) return void 0;
|
|
33
|
+
if (text.startsWith("*.")) {
|
|
34
|
+
const domain = text.slice(2);
|
|
35
|
+
if (!isHostName(domain)) return "is not a host name after *.";
|
|
36
|
+
if (!domain.includes(".")) return "is too broad: a pattern needs a domain with at least two labels after *.";
|
|
37
|
+
return void 0;
|
|
38
|
+
}
|
|
39
|
+
return isHostName(text) ? void 0 : "is not a host name, a *. pattern or an IP address";
|
|
40
|
+
}
|
|
41
|
+
function hostAllowed(host, allowHosts) {
|
|
42
|
+
const name = host.toLowerCase().replace(/\.$/, "");
|
|
43
|
+
return allowHosts.some((entry) => {
|
|
44
|
+
const pattern = entry.toLowerCase();
|
|
45
|
+
return pattern.startsWith("*.") ? name.endsWith(pattern.slice(1)) : name === pattern;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// src/runner/config.ts
|
|
12
50
|
var BUILTIN_CONTAINER = "builtin:container";
|
|
13
51
|
var BUILTIN_PROCESS = "builtin:process";
|
|
14
52
|
var BUILTIN_VM = "builtin:vm";
|
|
@@ -415,4 +453,4 @@ function resolveBuild(configPath, block) {
|
|
|
415
453
|
};
|
|
416
454
|
}
|
|
417
455
|
|
|
418
|
-
export { DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_UPDATE_MAX_WAIT_HOURS, RunnerConfigError, builtinKind, checkHooks, defaultRunnerConfigPath, hasRunnerBlock, imageBuildOf, isBuiltinContainer, isBuiltinProcess, isBuiltinVm, loadRunnerConfig, resolveBuild, resolveHousekeeping, runnerCredentialProblem, runnerVmOf };
|
|
456
|
+
export { DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_UPDATE_MAX_WAIT_HOURS, MAX_ALLOW_HOSTS, RunnerConfigError, allowHostProblem, builtinKind, checkHooks, defaultRunnerConfigPath, hasRunnerBlock, hostAllowed, imageBuildOf, isBuiltinContainer, isBuiltinProcess, isBuiltinVm, loadRunnerConfig, resolveBuild, resolveHousekeeping, runnerCredentialProblem, runnerVmOf };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
3
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-PA6CK6WQ.js';
|
|
4
4
|
import { readFileSync, mkdirSync, writeFileSync, renameSync } from 'fs';
|
|
5
5
|
import { join } from 'path';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RELAY_PORT, BUILD_HOME } from './chunk-
|
|
3
|
+
import { RELAY_PORT, BUILD_HOME } from './chunk-BALIE3BA.js';
|
|
4
4
|
import { createServer, connect } from 'net';
|
|
5
5
|
|
|
6
6
|
createRequire(import.meta.url);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { readCloudConfigStrict, readCloudConfig, cloudConfigPath } from './chunk-PJDQPF5N.js';
|
|
4
|
-
import { signRunnerRequest, signerFor } from './chunk-
|
|
4
|
+
import { signRunnerRequest, signerFor } from './chunk-SOI6K5DY.js';
|
|
5
5
|
import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
6
6
|
import { PLAIN_VERSION, recordCliVersion, removeRecordedVersion } from './chunk-5BHIBJDA.js';
|
|
7
7
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
@@ -1,12 +1,13 @@
|
|
|
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-2N67C6IV.js';
|
|
4
4
|
import { launchRefusalForSession } from './chunk-ESVW4MJY.js';
|
|
5
|
-
import { detectActiveSession
|
|
5
|
+
import { detectActiveSession } from './chunk-IP7BIBXJ.js';
|
|
6
|
+
import { autoConnect } from './chunk-B2JURP6A.js';
|
|
6
7
|
import { readEffectiveArtifactSpoolState, localArtifactIds, isArtifactTombstoned, artifactBlobsDir, appendArtifactRecord, artifactsSpoolPath, findPendingArtifactRecord, sanitizeTerminal, appendArtifactTombstone } from './chunk-EWVYQLD3.js';
|
|
7
8
|
import { resolveRepoIdentity } from './chunk-5DNCFOXA.js';
|
|
8
9
|
import { C } from './chunk-ANPNT6PM.js';
|
|
9
|
-
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-
|
|
10
|
+
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-6RKD7YZ6.js';
|
|
10
11
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
11
12
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
12
13
|
import { ARTIFACT_MAX_CAPTION_LENGTH, ArtifactCriterionIdSchema, ARTIFACT_MAX_BYTES, ARTIFACT_MAX_FILENAME_LENGTH, mediaTypeForArtifactPath, inferArtifactKind, ARTIFACT_MAX_REPLACES_TARGETS, parseTestSelector, parseJunit, bindTests } from './chunk-E6CO3MJE.js';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { launchRefusalForSession } from './chunk-ESVW4MJY.js';
|
|
4
|
-
import {
|
|
4
|
+
import { detectActiveSession } from './chunk-IP7BIBXJ.js';
|
|
5
|
+
import { autoConnect } from './chunk-B2JURP6A.js';
|
|
5
6
|
import { acquireSpoolLockAt } from './chunk-EWVYQLD3.js';
|
|
6
7
|
import { resolveRepoIdentity } from './chunk-5DNCFOXA.js';
|
|
7
8
|
import { C } from './chunk-ANPNT6PM.js';
|
|
8
|
-
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-
|
|
9
|
+
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-6RKD7YZ6.js';
|
|
9
10
|
import { launchedItemForSession } from './chunk-T2Q7ISPE.js';
|
|
10
11
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
11
12
|
import { StepNameSchema, StepBodySchema } from './chunk-E6CO3MJE.js';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { fetchFactories, selectFactory, saveFactoryConnection, autoConnectedLine } from './chunk-2WMZPJVE.js';
|
|
4
|
+
import { resolveRepoIdentity } from './chunk-5DNCFOXA.js';
|
|
5
|
+
import { resolveGatewayCredentials } from './chunk-6RKD7YZ6.js';
|
|
6
|
+
import { readCloudConfig } from './chunk-PJDQPF5N.js';
|
|
7
|
+
import { findGitDirs, readRepoConnection } from './chunk-BJ3KTMDH.js';
|
|
8
|
+
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
9
|
+
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
10
|
+
|
|
11
|
+
createRequire(import.meta.url);
|
|
12
|
+
|
|
13
|
+
// src/auto-connect.ts
|
|
14
|
+
async function autoConnect(opts) {
|
|
15
|
+
const env = opts.env ?? process.env;
|
|
16
|
+
const home = opts.home ?? homeFromEnv(env);
|
|
17
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
18
|
+
const resolved = resolveGatewayCredentials({ url: opts.url, apiKey: opts.apiKey, appId: opts.appId, home, env, cwd });
|
|
19
|
+
if (resolved.ok || resolved.kind !== "login" || !resolved.credential || !resolved.url) return void 0;
|
|
20
|
+
const dirs = findGitDirs(cwd);
|
|
21
|
+
const repository = opts.repository ?? resolveRepoIdentity(cwd).gitRepo;
|
|
22
|
+
if (dirs === void 0 || repository === void 0) return void 0;
|
|
23
|
+
const listed = await fetchFactories(opts.fetchImpl ?? fetch, resolved.url, resolved.credential, repository);
|
|
24
|
+
if (!listed.ok || listed.factories.length === 0) return void 0;
|
|
25
|
+
const chosen = selectFactory(listed.factories, readRepoConnection(cwd), repository, readCloudConfig(home).appId);
|
|
26
|
+
if (chosen.factory === void 0) {
|
|
27
|
+
return `you are logged in, but no factory is chosen for this repository, and more than one fits. Run \`${cliInvocation()} connect --factory <org>/<factory>\` with one of:
|
|
28
|
+
${chosen.text}
|
|
29
|
+
Or pass --app-id / set OUTERLAYER_APP_ID.`;
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
saveFactoryConnection(dirs.gitCommonDir, void 0, chosen.factory, /* @__PURE__ */ new Date());
|
|
33
|
+
} catch {
|
|
34
|
+
return void 0;
|
|
35
|
+
}
|
|
36
|
+
process.stderr.write(`${autoConnectedLine(repository, chosen.factory, chosen.reason)}
|
|
37
|
+
`);
|
|
38
|
+
return void 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { autoConnect };
|
|
@@ -318,14 +318,26 @@ async function startDestination(input) {
|
|
|
318
318
|
const headerName = destination.header.name.toLowerCase();
|
|
319
319
|
const dropped = /* @__PURE__ */ new Set(["host", "authorization", "proxy-authorization", "cookie", "connection", "proxy-connection", "keep-alive", "transfer-encoding", "upgrade", ...input.drop ?? []]);
|
|
320
320
|
const handle = (req, res) => {
|
|
321
|
+
let finished = false;
|
|
322
|
+
const finish = (ok) => {
|
|
323
|
+
if (finished) return;
|
|
324
|
+
finished = true;
|
|
325
|
+
input.onFinished?.(destination.name, ok);
|
|
326
|
+
};
|
|
327
|
+
res.on("finish", () => finish(true));
|
|
328
|
+
res.on("close", () => finish(false));
|
|
329
|
+
const fail = (status, body) => {
|
|
330
|
+
finish(false);
|
|
331
|
+
respond(res, status, body);
|
|
332
|
+
};
|
|
321
333
|
const target = req.url ?? "";
|
|
322
334
|
if (!target.startsWith("/")) {
|
|
323
|
-
|
|
335
|
+
fail(400, "send an origin-form request path\n");
|
|
324
336
|
return;
|
|
325
337
|
}
|
|
326
338
|
const expanded = expandHeader(destination.header, hostEnv);
|
|
327
339
|
if ("missing" in expanded) {
|
|
328
|
-
|
|
340
|
+
fail(502, `the destination ${destination.name} cannot be reached: ${expanded.missing} is not set in the runner's environment
|
|
329
341
|
`);
|
|
330
342
|
return;
|
|
331
343
|
}
|
|
@@ -351,20 +363,23 @@ async function startDestination(input) {
|
|
|
351
363
|
res.writeHead(answer.statusCode ?? 502, answer.headers);
|
|
352
364
|
answer.on("error", () => res.destroy());
|
|
353
365
|
answer.on("close", () => {
|
|
354
|
-
if (!answer.complete)
|
|
366
|
+
if (!answer.complete) {
|
|
367
|
+
finish(false);
|
|
368
|
+
res.destroy();
|
|
369
|
+
}
|
|
355
370
|
});
|
|
356
371
|
answer.pipe(res);
|
|
357
372
|
}
|
|
358
373
|
);
|
|
359
374
|
} catch {
|
|
360
|
-
|
|
375
|
+
fail(502, `the destination ${destination.name} cannot be reached: its header value was refused
|
|
361
376
|
`);
|
|
362
377
|
return;
|
|
363
378
|
}
|
|
364
379
|
input.onUsed?.(destination.name);
|
|
365
380
|
forwarded.setTimeout(UPSTREAM_IDLE_MS, () => forwarded.destroy());
|
|
366
381
|
res.on("close", () => forwarded.destroy());
|
|
367
|
-
forwarded.on("error", () =>
|
|
382
|
+
forwarded.on("error", () => fail(502, `the upstream of the destination ${destination.name} could not be reached
|
|
368
383
|
`));
|
|
369
384
|
req.pipe(forwarded);
|
|
370
385
|
};
|
|
@@ -445,9 +460,12 @@ async function startBuildServices(input) {
|
|
|
445
460
|
...input.serve === "socket" || streamed ? {} : { port: input.ports?.destinations?.[index] ?? 0 },
|
|
446
461
|
hostEnv: input.hostEnv,
|
|
447
462
|
onUsed: (name) => tunnel.destinationUsed(name),
|
|
463
|
+
onFinished: (name, ok) => tunnel.routeFinished(name, ok),
|
|
448
464
|
...input.destinationOptions
|
|
449
465
|
});
|
|
450
466
|
servers.push(server);
|
|
467
|
+
tunnel.routeServed(destination.name);
|
|
468
|
+
input.log?.(`route ${destination.name} served to the build`);
|
|
451
469
|
const listener = server.listener?.();
|
|
452
470
|
if (listener !== void 0) listeners[`dest-${index}.sock`] = listener;
|
|
453
471
|
targets.set(destinationTarget(index), (stream) => server.acceptStream(stream));
|
|
@@ -463,9 +481,12 @@ async function startBuildServices(input) {
|
|
|
463
481
|
hostEnv: builtIn.hostEnv,
|
|
464
482
|
drop: builtIn.drop,
|
|
465
483
|
onUsed: (name) => tunnel.destinationUsed(name),
|
|
484
|
+
onFinished: (name, ok) => tunnel.routeFinished(name, ok),
|
|
466
485
|
...input.destinationOptions
|
|
467
486
|
});
|
|
468
487
|
servers.push(server);
|
|
488
|
+
tunnel.routeServed(builtIn.destination.name);
|
|
489
|
+
input.log?.(`route ${builtIn.destination.name} served to the build`);
|
|
469
490
|
const listener = server.listener?.();
|
|
470
491
|
if (listener !== void 0) listeners[builtIn.socket] = listener;
|
|
471
492
|
targets.set(builtIn.destination.name, (stream) => server.acceptStream(stream));
|
|
@@ -828,14 +849,22 @@ function withTunnelRecord(environment, record, onlyWhenUsed = false) {
|
|
|
828
849
|
const base = ignoredProperties === void 0 ? environment : { ...environment, ignoredProperties };
|
|
829
850
|
if (record === void 0) return base;
|
|
830
851
|
const used = record.hosts.length + record.hostsMore + record.refusals.length + record.refusalsMore + (record.destinations?.length ?? 0) > 0;
|
|
831
|
-
|
|
852
|
+
const routed = Object.values(record.routes ?? {}).some((counts) => counts.requests > 0);
|
|
853
|
+
if (onlyWhenUsed && !used && !routed) return base;
|
|
832
854
|
return {
|
|
833
855
|
...base,
|
|
834
856
|
...capHosts(record.hosts, record.hostsMore),
|
|
835
857
|
refusals: record.refusals.slice(0, MAX_HOSTS),
|
|
836
858
|
refusalsMore: Math.max(0, record.refusals.length - MAX_HOSTS) + record.refusalsMore,
|
|
837
|
-
...record.destinations === void 0 || record.destinations.length === 0 ? {} : { destinations: record.destinations }
|
|
859
|
+
...record.destinations === void 0 || record.destinations.length === 0 ? {} : { destinations: record.destinations },
|
|
860
|
+
...routesOf(record.routes)
|
|
838
861
|
};
|
|
839
862
|
}
|
|
863
|
+
var MAX_ROUTES = 32;
|
|
864
|
+
function routesOf(counts) {
|
|
865
|
+
if (counts === void 0) return {};
|
|
866
|
+
const routes = Object.entries(counts).sort(([a], [b]) => a < b ? -1 : 1).slice(0, MAX_ROUTES).map(([name, { requests, failures }]) => ({ name, requests, failures: Math.min(failures, requests) }));
|
|
867
|
+
return routes.length === 0 ? {} : { routes };
|
|
868
|
+
}
|
|
840
869
|
|
|
841
870
|
export { AGENT_CREDENTIAL_MISSING, BUILD_HOME, BUILT_IN_NAMES, CHECKOUT_DIR, CHECK_ITEMS_FILE, CLAUDE_CREDENTIAL_ID, CLAUDE_CREDENTIAL_VARIABLES, CLAUDE_ENV_FILE, CLAUDE_PORT, CLAUDE_SOCKET, DESTINATION_BASE_PORT, EVAL_INPUT_DIR, FORWARDED_CLAUDE_CREDENTIAL_VARIABLES, GATEWAY_PORT, GATEWAY_SOCKET, JOB_MOUNT, MAVEN_NO_PROXY_NOTE, MAVEN_SETTINGS_FILE, MAVEN_SPACE_NOTE, PROXY_WARNING_FLAG, RELAY_PORT, authorEnvironment, buildEnvironment, buildMavenSettingsXml, builtInEnvironment, checkEnvironment, checkoutPath, claudeCredential, claudeCredentialVariablesSet, claudeEnvPath, commitIdentityRecord, containerLocalAddress, credentialLineIn, currentClaudeCredential, destinationEnvironment, headerVariables, heldClaudeCredential, isRefusedInConfig, isReservedVariable, lifecycleWorkdir, mavenArgs, mavenSettingsXml, namesGlobalSettings, parseClaimIdentity, parseClaimedRepositories, parseIsolation, parseUnreachable, primaryOf, proxyEnvironment, readClaudeCredential, removedClaudeCredentialValues, repositoriesOf, repositoryPath, resolveDestinations, sharedUserEnvironment, startBuildServices, takeClaudeCredential, tokenHeader, withGitConfig, withHooksPath, withProxyWarningHidden, withTokenHeader, withTunnelRecord, withoutCredentialLines, writeBuildMavenSettings, writeMavenSettings };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { launchRefusalForSession } from './chunk-ESVW4MJY.js';
|
|
4
|
-
import { detectActiveSession,
|
|
4
|
+
import { detectActiveSession, transcriptPathForSession } from './chunk-IP7BIBXJ.js';
|
|
5
|
+
import { autoConnect } from './chunk-B2JURP6A.js';
|
|
5
6
|
import { resolveRepoIdentity, defaultProjectsDir, findTranscripts, sessionIdFromPath, scrubText } from './chunk-5DNCFOXA.js';
|
|
6
7
|
import { C } from './chunk-ANPNT6PM.js';
|
|
7
|
-
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-
|
|
8
|
+
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-6RKD7YZ6.js';
|
|
8
9
|
import { readLatestProvenanceForSession } from './chunk-ZJSNLVCE.js';
|
|
9
10
|
import { launchedItemForSession } from './chunk-T2Q7ISPE.js';
|
|
10
11
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|