@outerlayer/cli 0.8.5 → 0.9.0
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/CHANGELOG.md +21 -0
- package/README.md +22 -14
- package/dist/{agent-setup-LEQF4V5F.js → agent-setup-ODTDC3US.js} +8 -7
- package/dist/{build-3FSJR5OO.js → build-LELVCWHV.js} +2 -2
- package/dist/build-info.json +1 -1
- package/dist/{builder-5UFAF5LW.js → builder-5DKTBWT3.js} +5 -5
- package/dist/{check-HWYLSMEL.js → check-VJRJ2KQ4.js} +69 -34
- package/dist/{chunk-Y7UQHKFY.js → chunk-3FMPZPJQ.js} +1 -4
- package/dist/chunk-3JVYMD4G.js +18 -0
- package/dist/{chunk-K4MGMSMN.js → chunk-4HMXH2OA.js} +8 -2
- package/dist/{chunk-H6IGIE3I.js → chunk-543OT6V5.js} +4 -4
- package/dist/{chunk-PVC36MFI.js → chunk-5MF73XCV.js} +2 -2
- package/dist/{chunk-HWMYGAKF.js → chunk-6CXYORUS.js} +1 -1
- package/dist/{inspect-XAUSB7L3.js → chunk-6MZSX4M7.js} +12 -6
- package/dist/{chunk-IS4DIGBQ.js → chunk-ABIWDUMS.js} +1 -13
- package/dist/{chunk-WLV4KCAW.js → chunk-BGWTYRSS.js} +1 -1
- package/dist/{chunk-2MFYKH3C.js → chunk-BMX3L7CR.js} +1 -1
- package/dist/{chunk-HKMPVPO7.js → chunk-BYT5O5RV.js} +7 -1
- package/dist/{chunk-WGLWDX5J.js → chunk-FKFGQJNN.js} +1 -1
- package/dist/{chunk-MSV44EB5.js → chunk-KPUJGBA4.js} +2 -2
- package/dist/{chunk-TY7EZC7U.js → chunk-KWCJLAHQ.js} +5 -5
- package/dist/{chunk-GJ3OWUFO.js → chunk-LBU4CLK5.js} +113 -24
- package/dist/{chunk-CDISNKM4.js → chunk-LTJPX7TX.js} +93 -13
- package/dist/{chunk-TFJGK4UB.js → chunk-LYESSQUA.js} +22 -4
- package/dist/{chunk-7KI224YS.js → chunk-M2PBLRB7.js} +1 -1
- package/dist/{chunk-2FWL7CE2.js → chunk-M6G7TJVF.js} +1 -1
- package/dist/{chunk-CRLAB4PM.js → chunk-NTLGWCWK.js} +1 -1
- package/dist/{chunk-4KPMIGBQ.js → chunk-OSKO3PAL.js} +25 -20
- package/dist/{chunk-AIW6GLET.js → chunk-PDTSUOVT.js} +1 -1
- package/dist/{chunk-LKUUQ3XV.js → chunk-QPPPUKQJ.js} +1 -1
- package/dist/{chunk-6AFQOYO3.js → chunk-RWQWPZB4.js} +10 -6
- package/dist/{chunk-2E2MG3KW.js → chunk-S6IUUNCD.js} +1 -1
- package/dist/{chunk-AGMIJ725.js → chunk-SUMWRA7K.js} +1 -1
- package/dist/{chunk-NKU5OPYP.js → chunk-TB7EP24C.js} +1 -1
- package/dist/{chunk-DE4GLH3P.js → chunk-TV36SKEN.js} +2 -2
- package/dist/{chunk-J5DPVNL3.js → chunk-V42JY4F6.js} +2 -2
- package/dist/{chunk-FCDET2U5.js → chunk-VMK7I3TB.js} +3 -3
- package/dist/{chunk-IOG6LPEI.js → chunk-WJBJY5DQ.js} +2 -2
- package/dist/{chunk-SWGQAURM.js → chunk-XGCJNSI7.js} +26 -7
- package/dist/{chunk-FTW6C2E7.js → chunk-XZNO4QED.js} +10 -10
- package/dist/{chunk-ZMKXBWIK.js → chunk-YCPV7FN6.js} +31 -19
- package/dist/{chunk-PK5NANMT.js → chunk-YT35WGIP.js} +5 -3
- package/dist/{chunk-DSPYQUH4.js → chunk-YU5GL7QS.js} +2 -2
- package/dist/{chunk-BL63NBJZ.js → chunk-ZEQMTBRD.js} +1 -1
- package/dist/{cli-5QAP7N4A.js → cli-7RQYILJT.js} +81 -81
- package/dist/{command-WKRTL3JQ.js → command-2LYWVGIK.js} +21 -21
- package/dist/{config-OOBPCY7Q.js → config-X45X7AS4.js} +3 -3
- package/dist/{connect-cmd-YEO7WRSL.js → connect-cmd-MPZWSEKY.js} +4 -4
- package/dist/{context-adopt-3REPEEQR.js → context-adopt-A77G67CP.js} +6 -5
- package/dist/{context-materialize-DU6B6RXF.js → context-materialize-KQZYATQZ.js} +6 -5
- package/dist/{dist-PKBWZAAL.js → dist-QY5CL5LB.js} +2 -2
- package/dist/{docker-5DUNHNOH.js → docker-V7B6UKPF.js} +6 -6
- package/dist/{doctor-FEIBPZL7.js → doctor-PUAL5LTL.js} +46 -35
- package/dist/{emit-artifact-cmd-S3CASUQK.js → emit-artifact-cmd-P3IWNSQY.js} +7 -7
- package/dist/{emit-cmd-ETI47BA6.js → emit-cmd-SU62J2PB.js} +4 -4
- package/dist/{emit-criteria-cmd-ZTUP7OGA.js → emit-criteria-cmd-GOSP6X74.js} +5 -5
- package/dist/{emit-finding-cmd-TTXBZ4B7.js → emit-finding-cmd-D554IQKU.js} +5 -5
- package/dist/{emit-result-cmd-34OC6TI5.js → emit-result-cmd-QACXTIBV.js} +7 -7
- package/dist/{exec-client-2UX6NHAO.js → exec-client-QTUO6TZT.js} +4 -4
- package/dist/{guest-init-VHQNFCFS.js → guest-init-4UW4HM6N.js} +4 -4
- package/dist/{hook-fast-CFLLVMSV.js → hook-fast-AQCAQIA6.js} +1 -1
- package/dist/{import-capture-cmd-Z3232HR4.js → import-capture-cmd-5NJVL2HN.js} +3 -3
- package/dist/{import-ruler-cmd-2PLXZXM7.js → import-ruler-cmd-TUK3MRPC.js} +2 -2
- package/dist/index.js +3 -3
- package/dist/{init-AHQHM56A.js → init-TMBE3BRN.js} +20 -20
- package/dist/{init-UZ5TXACM.js → init-WX5XE6L3.js} +47 -23
- package/dist/{init-cmd-F4FS5AVC.js → init-cmd-4FQKQLJ5.js} +14 -14
- package/dist/inspect-6UYAAXH7.js +6 -0
- package/dist/{install-C33LT5KQ.js → install-PYNCWSTV.js} +4 -4
- package/dist/{loop-FN67ZHLO.js → loop-QLL4DKRF.js} +31 -30
- package/dist/{machine-Y3TBDMXD.js → machine-7T7FBSUL.js} +19 -19
- package/dist/{real-deps-TK6JMQSW.js → real-deps-LS64D3M6.js} +4 -3
- package/dist/{session-sender-LKVVLAUP.js → session-sender-HVWTYG35.js} +6 -6
- package/dist/{starter-pack-L5WPXL4Q.js → starter-pack-I35VNYAR.js} +4 -4
- package/dist/{status-7RNWHYG6.js → status-SMF5JG2K.js} +24 -24
- package/dist/{sync-cmd-VH6HSMG5.js → sync-cmd-SLMPCUXO.js} +5 -5
- package/dist/{watch-HUKDEFUX.js → watch-TLM5QN5X.js} +5 -5
- package/dist/{work-claim-cmd-JLCU5SPP.js → work-claim-cmd-VSSZDFY5.js} +34 -12
- package/dist/{work-cmd-SBKQJBJ2.js → work-cmd-TK4VOOHL.js} +6 -6
- package/dist/{work-comment-cmd-TNUDUUAT.js → work-comment-cmd-VQCG72ZQ.js} +6 -6
- package/dist/{work-open-pr-cmd-IB57SMAD.js → work-open-pr-cmd-ZYOC5SPB.js} +7 -7
- package/dist/{work-pr-cmd-HDDNFSKA.js → work-pr-cmd-MX6UO5GO.js} +6 -6
- package/package.json +1 -1
- package/skill-pack/maintained/amend/SKILL.md +22 -12
- package/skill-pack/template/build/SKILL.md +13 -2
- package/skill-pack/template/build/references/evidence.md +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @outerlayer/cli
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a44097e: A runner now reads a governed repository's control plane with a read-only GitHub App token that the gateway issues for the build, so the host needs no git login for it. A gateway with no GitHub App still uses the host's git login. `outerlayer doctor` passes `Control plane access` through the App when the gateway has one. The runner protocol is now 15.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- accf74c: The amend skill now answers each criterion thread a reviewer sent a note on, replying on that thread and handing it back with `--ready`, instead of answering only the general thread.
|
|
12
|
+
- 680086e: `outerlayer init` now says to commit and push `.outerlayer/` whenever it left files there, even when a step failed or the repository is not linked yet. `outerlayer connect` says the same when it succeeds and `.outerlayer/` holds uncommitted files.
|
|
13
|
+
- 279f42a: `outerlayer runner init` on a Mac now creates a Linux VM, installs Node and the CLI in it, and sets up the runner there. It prints a progress line every 30 seconds while the image downloads.
|
|
14
|
+
- d399d98: Inside a runner build, sessions, artifacts, findings and results name the repository again, for example `github.com/acme/app`. Previously they named the runner's git relay, `127.0.0.1:<port>/github.com/acme/app`. With the relay address, `outerlayer emit artifact --pr <n>` was refused with `item_key_out_of_scope`, and a session-bound artifact never attached to its pull request. When a git `insteadOf` rule rewrites a remote onto a loopback address, the CLI now reads the remote's URL as configured. Every other rewrite, such as a shorthand alias, is still followed.
|
|
15
|
+
- dfb4b76: The runner no longer maps a `gitlab` tracker to a repository host, and `gitlab` is no longer an accepted work-item tracker. GitHub, Linear and Jira remain.
|
|
16
|
+
- 80174a6: `outerlayer work release --item <n>`, run inside a session with no `--host`, now releases that session's own lease on the item, so a person can review a finished local build without closing the session. It never releases another session's lease. `--session-id` names the session when it cannot be detected, and `--host` keeps the release to a host's claim. The `build` template skill runs it as its last step.
|
|
17
|
+
|
|
18
|
+
## 0.8.6
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 30ac1c5: A runner no longer reads a person's review as a check result. A build whose OuterLayer checks pass now finishes whether or not a person has reviewed it or marked a criterion as failed.
|
|
23
|
+
|
|
3
24
|
## 0.8.5
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -108,7 +108,8 @@ content:
|
|
|
108
108
|
evidence verdict, before releasing it: it sends nothing but the request.
|
|
109
109
|
Just before that read, the runner runs the repository's host checks. A host
|
|
110
110
|
check is a command the repository's `where: host` validators declare. The
|
|
111
|
-
runner reads the definitions
|
|
111
|
+
runner reads the definitions, through a control-plane token when the gateway
|
|
112
|
+
issues one and otherwise with the host's own git credentials, runs each
|
|
112
113
|
command in a new container, and sends one `POST /v1/emitted-results` for
|
|
113
114
|
each: the check's name, pass or fail, and for a fail the exit status and the
|
|
114
115
|
last line of its output, scrubbed.
|
|
@@ -220,12 +221,17 @@ content:
|
|
|
220
221
|
- **`outerlayer runner start` with `builtin:container` hooks** also asks your
|
|
221
222
|
gateway which repository governs the item's repository (`GET
|
|
222
223
|
/v1/context/source`, signed with the host key), after the recipe's
|
|
223
|
-
lifecycle commands. When one does, the runner
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
224
|
+
lifecycle commands. When one does, the runner asks your gateway for a
|
|
225
|
+
read-only token for that control plane (`POST /v1/work-items/{id}/claim/tokens`
|
|
226
|
+
with `target: control_plane`, signed with the host key), runs `git fetch`
|
|
227
|
+
against it on the host with that token, and copies its context into the
|
|
228
|
+
checkout through the build's directory. The token goes to git in its
|
|
229
|
+
environment for that one fetch, never to disk, a log or the build. The runner
|
|
230
|
+
revokes it when the attempt ends. A gateway with no GitHub App issues none,
|
|
231
|
+
and the fetch then uses the host's own git credentials. The build receives
|
|
232
|
+
files and no credential for the control plane. The runner deletes the staged
|
|
233
|
+
copy before the command starts. A host that cannot read the control plane
|
|
234
|
+
fails the build at provision.
|
|
229
235
|
- **`outerlayer runner start` with `builtin:process` hooks** runs each build
|
|
230
236
|
as a process under the runner's own user, with no isolation, and the
|
|
231
237
|
attempt records `shared-user`. The runner clones the item's repository
|
|
@@ -269,9 +275,11 @@ content:
|
|
|
269
275
|
say whether the version the runner's images pin is behind. The request
|
|
270
276
|
names the package and nothing about the host. On a host with
|
|
271
277
|
`builtin:container` hooks it also asks your gateway which repository governs
|
|
272
|
-
each repository in `repos.include` (`GET /v1/context/source`)
|
|
273
|
-
|
|
274
|
-
|
|
278
|
+
each repository in `repos.include` (`GET /v1/context/source`). When the
|
|
279
|
+
gateway has a GitHub App (`GET /v1/repositories/access` does not answer
|
|
280
|
+
`repository_tokens_unavailable`), builds read the control plane through it.
|
|
281
|
+
Otherwise doctor runs `git ls-remote` against the control plane with the
|
|
282
|
+
host's own git credentials, to say whether the host can read it.
|
|
275
283
|
- **`outerlayer emit artifact`** uploads the file you name — a screenshot, a
|
|
276
284
|
recording, a report, a log — along with its caption, its name, type, size
|
|
277
285
|
and sha256, and the repository, branch, commit, pull request and CI run it
|
|
@@ -371,7 +379,7 @@ before it gives up.
|
|
|
371
379
|
| `outerlayer work open-pr --title <text> --body-file <path> [--repo] [--session-id] [--json]` | Opens the pull request for the work item this session is on, or edits the one already open on its branch. A host build, which holds an item key, sends it to the gateway, which opens it as the factory's GitHub App from the branch the claim named; no `gh` command runs. Your own session runs `gh pr create` or `gh pr edit` under your login and then declares the pull request on the item. Run it again after changing the title or description. |
|
|
372
380
|
| `outerlayer work claim --item <n>\|--issue <n> --kind implement\|amend [--repo] [--host] [--seconds]` | Records a lease for this host (default: its own hostname), so two hosts never build the same item at once. The lease belongs to the runner key that claimed it: a live lease held by a different key is refused, even under the same host name, and claiming again with the same key extends it. The first claim creates the host key (`host-key.pem` beside the config file) and binds the runner key to it; from then on every request made with that key is signed. Lease length defaults to 900 seconds, the server's own cap. |
|
|
373
381
|
| `outerlayer work renew --item <n>\|--issue <n> [--repo] [--host] [--seconds]` | Extends this host's own live lease. Refused if the lease has expired, or if a different runner key holds it (403 `claim_not_held`). |
|
|
374
|
-
| `outerlayer work release --item <n>\|--issue <n> [--repo] [--host] [--outcome]` | Marks the lease this API key holds released, optionally recording how the attempt ended. Releasing an already-released lease is a no-op that returns the recorded release time and outcome. |
|
|
382
|
+
| `outerlayer work release --item <n>\|--issue <n> [--repo] [--host] [--session-id] [--outcome]` | Marks the lease this API key holds released, optionally recording how the attempt ended. Releasing an already-released lease is a no-op that returns the recorded release time and outcome. Run inside a session with no `--host`, it releases that session's own lease instead (`--session-id` names the session when it cannot be detected), so the item's review opens without ending the session. |
|
|
375
383
|
| `outerlayer runner init [--vm\|--no-vm] [--config <path>]` | Writes a `runner` block with defaults, keeping every key the config already had. It names `builtin:vm` on a Linux machine where the user can use `/dev/kvm` and Docker Engine can build images once the guest kernel and helper are published (not yet), `builtin:container` on that machine until then, `builtin:container` on any other machine with Docker Engine, and `builtin:process` on one without, and writes no hook script. Refuses rather than overwriting an existing block. On macOS it asks whether to create a Linux VM with Lima, installs Docker Engine and the runner in it, and starts both at login; `--vm` answers yes and `--no-vm` answers no, and a run with no terminal answers no. The runner key and the host key then live only in the VM: the Mac's config loses `apiKey` and `runner` and gains a `runnerVm` note, which `outerlayer doctor` reads. |
|
|
376
384
|
| `outerlayer runner check [--config <path>]` | Validates the config, the hooks and the key, prints the settings the runner would use, and exits non-zero on a problem. Takes no work and writes no pid file. |
|
|
377
385
|
| `outerlayer runner start [--config <path>]` | Runs the loop: claim work, run it, sync, clean up, report, release with an outcome. Repeat. Reads the `runner` block from the config file (default `~/.outerlayer/config.json`). Refuses to start on a bad config, an unrunnable hook, or a refused key. |
|
|
@@ -433,9 +441,9 @@ or whose evaluation is still waiting on a session link, with the code
|
|
|
433
441
|
commit of every pull request the item had at the time; once one of them
|
|
434
442
|
moves, that pass stops counting and a fresh review is needed. The base
|
|
435
443
|
branch's `review` policy key (default `required`, beside `merge_gate`)
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
444
|
+
changes only what the evidence check's title says. The check on GitHub never
|
|
445
|
+
waits for the review: it completes once OuterLayer's checks pass, and under
|
|
446
|
+
`merge_gate: on-flag` a person's request for changes fails it.
|
|
439
447
|
|
|
440
448
|
A criterion thread is scoped to one acceptance criterion rather than the
|
|
441
449
|
whole item: an agent attaches proof with `outerlayer work comment
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { addStdioMcpEntryIfAbsent } from './chunk-47RS42OZ.js';
|
|
4
|
-
import { installStarterPack } from './chunk-
|
|
5
|
-
import { runEmit } from './chunk-
|
|
4
|
+
import { installStarterPack } from './chunk-SUMWRA7K.js';
|
|
5
|
+
import { runEmit } from './chunk-YU5GL7QS.js';
|
|
6
6
|
import { C } from './chunk-YRYMNBGQ.js';
|
|
7
|
-
import { resolveGitCommonDir, defaultGitRunner } from './chunk-
|
|
7
|
+
import { resolveGitCommonDir, defaultGitRunner } from './chunk-RWQWPZB4.js';
|
|
8
8
|
import './chunk-ZJSNLVCE.js';
|
|
9
|
-
import { pinExists, readContextManifest } from './chunk-
|
|
10
|
-
import { loadTemplateFiles, loadMaintainedFiles, skillDir } from './chunk-
|
|
11
|
-
import { generatedHeaderSource } from './chunk-
|
|
9
|
+
import { pinExists, readContextManifest } from './chunk-BMX3L7CR.js';
|
|
10
|
+
import { loadTemplateFiles, loadMaintainedFiles, skillDir } from './chunk-BGWTYRSS.js';
|
|
11
|
+
import { generatedHeaderSource } from './chunk-TB7EP24C.js';
|
|
12
12
|
import './chunk-YO4PSLVB.js';
|
|
13
13
|
import './chunk-PLMTLGYH.js';
|
|
14
|
-
import './chunk-
|
|
14
|
+
import './chunk-YT35WGIP.js';
|
|
15
15
|
import './chunk-EABW6AJQ.js';
|
|
16
|
+
import './chunk-BYT5O5RV.js';
|
|
16
17
|
import './chunk-RA3O54FC.js';
|
|
17
18
|
import './chunk-V7NIVOFD.js';
|
|
18
19
|
import './chunk-ZM2IMMYN.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { buildRepositoryImage } from './chunk-
|
|
3
|
+
export { buildRepositoryImage } from './chunk-3FMPZPJQ.js';
|
|
4
4
|
import './chunk-N5FOE5PS.js';
|
|
5
5
|
export { RecipeError } from './chunk-QOZKPLVJ.js';
|
|
6
6
|
import './chunk-CX22S5BA.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-BYT5O5RV.js';
|
|
8
8
|
import './chunk-ZM2IMMYN.js';
|
|
9
9
|
import './chunk-Z5GEFMRW.js';
|
|
10
10
|
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"2026-10-
|
|
1
|
+
{"id":"2026-10-07T00:34:36.863Z+f427d9c","root":"/home/runner/_work/outerlayer/outerlayer","pkg":"outerlayer"}
|
|
@@ -1,12 +1,12 @@
|
|
|
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-TV36SKEN.js';
|
|
4
4
|
import './chunk-CX22S5BA.js';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-LTJPX7TX.js';
|
|
6
6
|
import './chunk-7RQ73DLO.js';
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
7
|
+
import './chunk-M6G7TJVF.js';
|
|
8
|
+
import './chunk-YT35WGIP.js';
|
|
9
|
+
import './chunk-BYT5O5RV.js';
|
|
10
10
|
import './chunk-ZM2IMMYN.js';
|
|
11
11
|
import './chunk-Z5GEFMRW.js';
|
|
12
12
|
|
|
@@ -1,73 +1,83 @@
|
|
|
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-YCPV7FN6.js';
|
|
4
|
+
import './chunk-3JVYMD4G.js';
|
|
5
5
|
import './chunk-I2UOAV7X.js';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-ABIWDUMS.js';
|
|
7
|
+
import './chunk-OSKO3PAL.js';
|
|
7
8
|
import './chunk-T6OIJQRT.js';
|
|
8
|
-
import './chunk-
|
|
9
|
+
import './chunk-PDTSUOVT.js';
|
|
9
10
|
import './chunk-UGP76IZ5.js';
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
11
|
+
import './chunk-VMK7I3TB.js';
|
|
12
|
+
import './chunk-V42JY4F6.js';
|
|
13
|
+
import './chunk-543OT6V5.js';
|
|
13
14
|
import './chunk-HHJDN6AU.js';
|
|
14
|
-
import { placeholderQueues, placeholderProblem, needsClaudeCredential, claudeCredentialCheck, claimPermissionProblem } from './chunk-
|
|
15
|
+
import { placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, needsClaudeCredential, claudeCredentialCheck, claimPermissionProblem } from './chunk-XGCJNSI7.js';
|
|
15
16
|
import './chunk-TI7B7UEO.js';
|
|
16
17
|
import './chunk-YYYRBYWG.js';
|
|
17
18
|
import './chunk-TBT347UY.js';
|
|
18
|
-
import './chunk-
|
|
19
|
-
import './chunk-
|
|
20
|
-
import './chunk-
|
|
19
|
+
import './chunk-WJBJY5DQ.js';
|
|
20
|
+
import './chunk-QPPPUKQJ.js';
|
|
21
|
+
import './chunk-LBU4CLK5.js';
|
|
22
|
+
import { parseRunnerEnv } from './chunk-6MZSX4M7.js';
|
|
21
23
|
import './chunk-JKIWMRFH.js';
|
|
22
|
-
import './chunk-
|
|
24
|
+
import './chunk-3FMPZPJQ.js';
|
|
23
25
|
import './chunk-N5FOE5PS.js';
|
|
24
26
|
import './chunk-OGFGZQA3.js';
|
|
25
|
-
import './chunk-
|
|
27
|
+
import './chunk-FKFGQJNN.js';
|
|
26
28
|
import './chunk-QOZKPLVJ.js';
|
|
27
|
-
import './chunk-
|
|
29
|
+
import './chunk-TV36SKEN.js';
|
|
28
30
|
import './chunk-CX22S5BA.js';
|
|
29
|
-
import './chunk-
|
|
30
|
-
import './chunk-
|
|
31
|
+
import './chunk-6CXYORUS.js';
|
|
32
|
+
import './chunk-S6IUUNCD.js';
|
|
31
33
|
import './chunk-F7CU5ABH.js';
|
|
32
34
|
import './chunk-BKO6JEZI.js';
|
|
33
|
-
import './chunk-
|
|
34
|
-
import './chunk-
|
|
35
|
+
import './chunk-KWCJLAHQ.js';
|
|
36
|
+
import './chunk-KPUJGBA4.js';
|
|
35
37
|
import './chunk-BFESLKPP.js';
|
|
36
|
-
import './chunk-
|
|
37
|
-
import './chunk-
|
|
38
|
-
import './chunk-
|
|
38
|
+
import './chunk-LYESSQUA.js';
|
|
39
|
+
import './chunk-ZEQMTBRD.js';
|
|
40
|
+
import './chunk-LTJPX7TX.js';
|
|
39
41
|
import './chunk-USO2DKBD.js';
|
|
40
42
|
import './chunk-N6LURUEF.js';
|
|
41
43
|
import './chunk-YRYMNBGQ.js';
|
|
42
|
-
import { loadRunnerConfig, RunnerConfigError, checkHooks } from './chunk-
|
|
44
|
+
import { loadRunnerConfig, RunnerConfigError, checkHooks } from './chunk-M2PBLRB7.js';
|
|
43
45
|
import './chunk-UXYLWVTQ.js';
|
|
44
46
|
import './chunk-7RQ73DLO.js';
|
|
45
|
-
import './chunk-
|
|
46
|
-
import './chunk-HKMPVPO7.js';
|
|
47
|
+
import './chunk-M6G7TJVF.js';
|
|
47
48
|
import './chunk-GQD22KKN.js';
|
|
48
49
|
import './chunk-WZBHBH3J.js';
|
|
49
50
|
import './chunk-5QRP3MVS.js';
|
|
50
|
-
import './chunk-
|
|
51
|
+
import './chunk-RWQWPZB4.js';
|
|
51
52
|
import './chunk-ZJSNLVCE.js';
|
|
52
|
-
import './chunk-
|
|
53
|
-
import './chunk-
|
|
54
|
-
import './chunk-
|
|
53
|
+
import './chunk-BMX3L7CR.js';
|
|
54
|
+
import './chunk-BGWTYRSS.js';
|
|
55
|
+
import './chunk-TB7EP24C.js';
|
|
55
56
|
import './chunk-YO4PSLVB.js';
|
|
56
57
|
import './chunk-PLMTLGYH.js';
|
|
57
|
-
import './chunk-
|
|
58
|
+
import './chunk-YT35WGIP.js';
|
|
58
59
|
import './chunk-EABW6AJQ.js';
|
|
60
|
+
import './chunk-BYT5O5RV.js';
|
|
59
61
|
import './chunk-RA3O54FC.js';
|
|
60
62
|
import './chunk-V7NIVOFD.js';
|
|
61
63
|
import './chunk-ZM2IMMYN.js';
|
|
62
|
-
import './chunk-
|
|
64
|
+
import './chunk-4HMXH2OA.js';
|
|
63
65
|
import './chunk-XCCLFVXM.js';
|
|
64
66
|
import './chunk-BJ3KTMDH.js';
|
|
65
67
|
import './chunk-VNVZDWO3.js';
|
|
66
68
|
import './chunk-Z5GEFMRW.js';
|
|
69
|
+
import { readFileSync } from 'fs';
|
|
70
|
+
import { join, dirname } from 'path';
|
|
67
71
|
|
|
68
72
|
createRequire(import.meta.url);
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
function readRunnerEnv(path) {
|
|
74
|
+
try {
|
|
75
|
+
return { env: parseRunnerEnv(readFileSync(path, "utf8")) };
|
|
76
|
+
} catch (err) {
|
|
77
|
+
if (err.code === "ENOENT") return { env: {} };
|
|
78
|
+
return { error: err instanceof Error ? err.message : String(err) };
|
|
79
|
+
}
|
|
80
|
+
}
|
|
71
81
|
async function runRunnerCheck(configPath, deps = {}) {
|
|
72
82
|
let config;
|
|
73
83
|
try {
|
|
@@ -81,11 +91,35 @@ async function runRunnerCheck(configPath, deps = {}) {
|
|
|
81
91
|
if (placeholders.length > 0) {
|
|
82
92
|
return { ok: false, check: "placeholders", message: `${configPath}: ${placeholderProblem(placeholders)}` };
|
|
83
93
|
}
|
|
94
|
+
const modeProblems = permissionModeProblems(config);
|
|
95
|
+
if (modeProblems.length > 0) {
|
|
96
|
+
return { ok: false, check: "permission mode", message: `${configPath}: ${permissionModeProblem(modeProblems)}` };
|
|
97
|
+
}
|
|
98
|
+
let credentialLine;
|
|
84
99
|
if (needsClaudeCredential(config.hooks)) {
|
|
85
|
-
const
|
|
100
|
+
const env = deps.env ?? process.env;
|
|
101
|
+
const runnerEnvPath = join(dirname(configPath), "runner.env");
|
|
102
|
+
const inShell = claudeCredentialCheck(env);
|
|
103
|
+
let credential = inShell;
|
|
104
|
+
if (inShell.status !== "pass") {
|
|
105
|
+
const fromFile = readRunnerEnv(runnerEnvPath);
|
|
106
|
+
if ("error" in fromFile) {
|
|
107
|
+
return {
|
|
108
|
+
ok: false,
|
|
109
|
+
check: "claude credential",
|
|
110
|
+
message: `the Claude credential is not in this shell, and ${runnerEnvPath} could not be read to look for it: ${fromFile.error}`
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
credential = claudeCredentialCheck(fromFile.env);
|
|
114
|
+
}
|
|
86
115
|
if (credential.status === "fail") {
|
|
87
|
-
return {
|
|
116
|
+
return {
|
|
117
|
+
ok: false,
|
|
118
|
+
check: "claude credential",
|
|
119
|
+
message: `${credential.detail}, in this shell or in ${runnerEnvPath}. ${credential.fix}`
|
|
120
|
+
};
|
|
88
121
|
}
|
|
122
|
+
credentialLine = `claude credential ${credential.detail}${inShell.status === "pass" ? "" : ` (read from ${runnerEnvPath})`}`;
|
|
89
123
|
}
|
|
90
124
|
const probe = await probeCredentials(config, deps.fetchImpl);
|
|
91
125
|
if (!probe.ok && probe.fatal) return { ok: false, check: "credentials", message: probe.reason };
|
|
@@ -103,6 +137,7 @@ async function runRunnerCheck(configPath, deps = {}) {
|
|
|
103
137
|
`time limit ${config.timeLimitMinutes}m`,
|
|
104
138
|
`idle limit ${config.idleLimitMinutes}m`,
|
|
105
139
|
`auto update ${config.autoUpdate ? "on" : "off"}`,
|
|
140
|
+
...credentialLine === void 0 ? [] : [credentialLine],
|
|
106
141
|
...config.queues.map((queue) => `command ${queue.padEnd(11)} ${config.commands[queue] ?? "(none)"}`),
|
|
107
142
|
`hook provision ${config.hooks.provision}`,
|
|
108
143
|
`hook cleanup ${config.hooks.cleanup}`,
|
|
@@ -3,7 +3,7 @@ import { createRequire } from 'node:module';
|
|
|
3
3
|
import { startTimeOf, claimPidFile, RunnerAlreadyRunningError, releasePidFile } from './chunk-N5FOE5PS.js';
|
|
4
4
|
import { RecipeError, locateRecipe, readRecipe, assertBuildable, writeSanitizedRecipe, classifyProperties, SANITIZED_NAME } from './chunk-QOZKPLVJ.js';
|
|
5
5
|
import { CLAUDE_CODE_VERSION, NODE_IMAGE, DEFAULT_BASE_IMAGE, TINI_VERSION, GH_VERSION, GH_SHA256, TINI_SHA256 } from './chunk-CX22S5BA.js';
|
|
6
|
-
import { withGitConfig } from './chunk-
|
|
6
|
+
import { withGitConfig, tokenHeader } from './chunk-BYT5O5RV.js';
|
|
7
7
|
import { RUNNER_DIR_MODE, repoCacheDir, imagesDir, attemptStamp, runnerDir, rootfsPathFor, RUNNER_FILE_MODE } from './chunk-ZM2IMMYN.js';
|
|
8
8
|
import { mkdirSync, rmSync, existsSync, mkdtempSync, cpSync, readFileSync, writeFileSync, readdirSync, lstatSync, readlinkSync } from 'fs';
|
|
9
9
|
import { tmpdir } from 'os';
|
|
@@ -18,9 +18,6 @@ function gitEnvironment(base) {
|
|
|
18
18
|
for (const name of INHERITED_REPOSITORY_VARIABLES) delete env[name];
|
|
19
19
|
return env;
|
|
20
20
|
}
|
|
21
|
-
function tokenHeader(token) {
|
|
22
|
-
return `Authorization: Basic ${Buffer.from(`x-access-token:${token}`).toString("base64")}`;
|
|
23
|
-
}
|
|
24
21
|
function tokenSettings(remote, token) {
|
|
25
22
|
return (env) => withGitConfig(env, `http.${remote}.extraHeader`, tokenHeader(token));
|
|
26
23
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
|
|
4
|
+
createRequire(import.meta.url);
|
|
5
|
+
|
|
6
|
+
// src/runner/update/installed-switch.ts
|
|
7
|
+
function decideInstalledSwitch(input) {
|
|
8
|
+
const to = input.current;
|
|
9
|
+
if (to === void 0 || to === input.own || !input.fromCurrent) return { kind: "none" };
|
|
10
|
+
if (!input.installed) return { kind: "missing", to };
|
|
11
|
+
if (!input.underService) return { kind: "foreground", to };
|
|
12
|
+
return { kind: "restart", to };
|
|
13
|
+
}
|
|
14
|
+
function startedByService(env, parentPid) {
|
|
15
|
+
return (env.INVOCATION_ID ?? "") !== "" && parentPid === 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { decideInstalledSwitch, startedByService };
|
|
@@ -439,6 +439,12 @@ async function missingRenewalHookContext(home, cwd) {
|
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
var WORK_LEASE_RENEW_DEBOUNCE_MS = 5 * 60 * 1e3;
|
|
442
|
+
function markWorkLeaseRenewed(sessionId, home = homeFromEnv(), now = Date.now()) {
|
|
443
|
+
try {
|
|
444
|
+
writeFileSync(join(spoolDir(home), `work-lease-renew-${sessionId}`), String(now));
|
|
445
|
+
} catch {
|
|
446
|
+
}
|
|
447
|
+
}
|
|
442
448
|
async function maybeRenewWorkLease(event, sessionId, home = homeFromEnv(), env = process.env, spawnImpl = spawnDetached, now = Date.now(), cwd = process.cwd()) {
|
|
443
449
|
try {
|
|
444
450
|
if (event !== "PostToolUse") return;
|
|
@@ -628,7 +634,7 @@ async function runHookFast(event, home = homeFromEnv(), read = readStdin, env =
|
|
|
628
634
|
recordHookErrorsSeen(home, hookErrorsBytes);
|
|
629
635
|
if (contextPossiblyGoverned(sessionCwd, home)) {
|
|
630
636
|
try {
|
|
631
|
-
const { materializeContext: materialize } = await import('./context-materialize-
|
|
637
|
+
const { materializeContext: materialize } = await import('./context-materialize-KQZYATQZ.js');
|
|
632
638
|
const sessionId = typeof payload.session_id === "string" ? payload.session_id : "unknown";
|
|
633
639
|
const result = await materialize({ cwd: sessionCwd, sessionId, home });
|
|
634
640
|
materializeMessage = result.message;
|
|
@@ -693,4 +699,4 @@ function recordLinkExitFailure(argv, home = homeFromEnv(), target = process) {
|
|
|
693
699
|
});
|
|
694
700
|
}
|
|
695
701
|
|
|
696
|
-
export { AUTO_SYNC_DEBOUNCE_MS, SYNC_STALE_AFTER_MS, WORK_LEASE_RENEW_DEBOUNCE_MS, WORK_LINK_RETRIES, assessSyncHealth, checkInstalledCliStaleness, contextPossiblyGoverned, formatAgo, handleWorkLaunch, handleWorkSessionEnd, hookFiredMarkerPath, installedCliDistDir, logHookError, maybeAutoSync, maybeRenewWorkLease, readSyncStatus, recordLinkExitFailure, refreshCommand, runHookFast, sanitizeForContext, spoolDir, workspaceRootOf, writeSyncStatus };
|
|
702
|
+
export { AUTO_SYNC_DEBOUNCE_MS, SYNC_STALE_AFTER_MS, WORK_LEASE_RENEW_DEBOUNCE_MS, WORK_LINK_RETRIES, assessSyncHealth, checkInstalledCliStaleness, contextPossiblyGoverned, formatAgo, handleWorkLaunch, handleWorkSessionEnd, hookFiredMarkerPath, installedCliDistDir, logHookError, markWorkLeaseRenewed, maybeAutoSync, maybeRenewWorkLease, readSyncStatus, recordLinkExitFailure, refreshCommand, runHookFast, sanitizeForContext, spoolDir, workspaceRootOf, writeSyncStatus };
|
|
@@ -4,17 +4,17 @@ import { LaunchFilter } from './chunk-HHJDN6AU.js';
|
|
|
4
4
|
import { RepoFilter } from './chunk-TBT347UY.js';
|
|
5
5
|
import { hookExecSpoolPath } from './chunk-F7CU5ABH.js';
|
|
6
6
|
import { applyReportedCost } from './chunk-BKO6JEZI.js';
|
|
7
|
-
import { migrateLegacyArtifactSidecars, planArtifactUpload, artifactsStatePath, sanitizeTerminal, artifactBlobsDir, resolveArtifactTurnIndex, isArtifactTombstoned, ARTIFACT_RETRY_MAX_AGE_MS, writeArtifactSpoolState, reclaimUnneededArtifactBlobs, neededArtifactShas } from './chunk-
|
|
8
|
-
import { setCustomScrubbers, setLocalIdentity, tailTranscript, enrichSessionRepo, scanAll, setRepoRoot, resolveRepoIdentity, sessionIdFromPath, scrubDeep, SOURCE_ADAPTERS } from './chunk-
|
|
7
|
+
import { migrateLegacyArtifactSidecars, planArtifactUpload, artifactsStatePath, sanitizeTerminal, artifactBlobsDir, resolveArtifactTurnIndex, isArtifactTombstoned, ARTIFACT_RETRY_MAX_AGE_MS, writeArtifactSpoolState, reclaimUnneededArtifactBlobs, neededArtifactShas } from './chunk-ZEQMTBRD.js';
|
|
8
|
+
import { setCustomScrubbers, setLocalIdentity, tailTranscript, enrichSessionRepo, scanAll, setRepoRoot, resolveRepoIdentity, sessionIdFromPath, scrubDeep, SOURCE_ADAPTERS } from './chunk-LTJPX7TX.js';
|
|
9
9
|
import { C } from './chunk-YRYMNBGQ.js';
|
|
10
10
|
import { readLaunchSpoolState, launchStatusIsDecisive, launchedItemsBySession, launchesPath } from './chunk-GQD22KKN.js';
|
|
11
11
|
import { readLatestProvenanceForSession, readContextProvenance } from './chunk-ZJSNLVCE.js';
|
|
12
12
|
import { defaultFetch } from './chunk-YO4PSLVB.js';
|
|
13
13
|
import { resolveGatewayCredentials, unauthorizedMessage } from './chunk-PLMTLGYH.js';
|
|
14
|
-
import { CAPTURE_TIERS, inferArtifactKind, bannedPathsForTier, downconvertSession, isHumanUserTurn, turnCountBound, EVENT_TYPES } from './chunk-
|
|
14
|
+
import { CAPTURE_TIERS, inferArtifactKind, bannedPathsForTier, downconvertSession, isHumanUserTurn, turnCountBound, EVENT_TYPES } from './chunk-YT35WGIP.js';
|
|
15
15
|
import { readCloudConfig, cloudConfigPath, writeCloudConfig } from './chunk-EABW6AJQ.js';
|
|
16
16
|
import { signerFor, signRunnerRequest } from './chunk-V7NIVOFD.js';
|
|
17
|
-
import { writeSyncStatus, spoolDir } from './chunk-
|
|
17
|
+
import { writeSyncStatus, spoolDir } from './chunk-4HMXH2OA.js';
|
|
18
18
|
import { removeJournalHooks } from './chunk-XCCLFVXM.js';
|
|
19
19
|
import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
20
20
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { autoConnect } from './chunk-
|
|
3
|
+
import { autoConnect } from './chunk-KPUJGBA4.js';
|
|
4
4
|
import { detectActiveSession } from './chunk-BFESLKPP.js';
|
|
5
|
-
import { resolveRepoIdentity } from './chunk-
|
|
5
|
+
import { resolveRepoIdentity } from './chunk-LTJPX7TX.js';
|
|
6
6
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
7
7
|
import { defaultFetch } from './chunk-YO4PSLVB.js';
|
|
8
8
|
import { unauthorizedMessage, resolveGatewayCredentials } from './chunk-PLMTLGYH.js';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import './chunk-Z5GEFMRW.js';
|
|
4
3
|
import { spawnSync } from 'child_process';
|
|
5
4
|
import { statSync, readFileSync } from 'fs';
|
|
6
5
|
import { join } from 'path';
|
|
@@ -15,11 +14,18 @@ function holdsGroup(status, gid) {
|
|
|
15
14
|
const supplementary = /^Groups:[ \t]*(.*)$/m.exec(status)?.[1]?.trim().split(/\s+/).filter((g) => g !== "") ?? [];
|
|
16
15
|
return [primary, ...supplementary].some((g) => g !== void 0 && Number(g) === gid);
|
|
17
16
|
}
|
|
17
|
+
function parseRunnerEnv(text) {
|
|
18
|
+
const env = {};
|
|
19
|
+
for (const line of text.split("\n")) {
|
|
20
|
+
const match = /^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)=(.*)$/.exec(line);
|
|
21
|
+
if (match === null) continue;
|
|
22
|
+
env[match[1]] = match[2].trim().replace(/^(["'])(.*)\1$/, "$2");
|
|
23
|
+
}
|
|
24
|
+
return env;
|
|
25
|
+
}
|
|
18
26
|
function credentialNames(env) {
|
|
19
|
-
const set =
|
|
20
|
-
|
|
21
|
-
);
|
|
22
|
-
return CREDENTIAL_VARIABLES.filter((name) => set.has(name));
|
|
27
|
+
const set = parseRunnerEnv(env ?? "");
|
|
28
|
+
return CREDENTIAL_VARIABLES.filter((name) => (set[name] ?? "").trim() !== "");
|
|
23
29
|
}
|
|
24
30
|
function inspectService(unit, configDir, probes) {
|
|
25
31
|
const shown = probes.show(unit);
|
|
@@ -60,4 +66,4 @@ function realInspectProbes() {
|
|
|
60
66
|
};
|
|
61
67
|
}
|
|
62
68
|
|
|
63
|
-
export { inspectService, realInspectProbes };
|
|
69
|
+
export { inspectService, parseRunnerEnv, realInspectProbes };
|
|
@@ -6,18 +6,6 @@ import { join, dirname } from 'path';
|
|
|
6
6
|
import { createHash } from 'crypto';
|
|
7
7
|
|
|
8
8
|
createRequire(import.meta.url);
|
|
9
|
-
|
|
10
|
-
// src/runner/update/installed-switch.ts
|
|
11
|
-
function decideInstalledSwitch(input) {
|
|
12
|
-
const to = input.current;
|
|
13
|
-
if (to === void 0 || to === input.own || !input.fromCurrent) return { kind: "none" };
|
|
14
|
-
if (!input.installed) return { kind: "missing", to };
|
|
15
|
-
if (!input.underService) return { kind: "foreground", to };
|
|
16
|
-
return { kind: "restart", to };
|
|
17
|
-
}
|
|
18
|
-
function startedByService(env, parentPid) {
|
|
19
|
-
return (env.INVOCATION_ID ?? "") !== "" && parentPid === 1;
|
|
20
|
-
}
|
|
21
9
|
var REGISTRY_URL = "https://registry.npmjs.org";
|
|
22
10
|
var PACKAGE_NAME = "@outerlayer/cli";
|
|
23
11
|
var PACKAGE_PATH = "@outerlayer%2fcli";
|
|
@@ -113,4 +101,4 @@ async function auditSignatures(runNpm, dir) {
|
|
|
113
101
|
return { ok: true };
|
|
114
102
|
}
|
|
115
103
|
|
|
116
|
-
export { auditSignatures,
|
|
104
|
+
export { auditSignatures, fetchProvenance, fetchTarballDigest, fetchVersionMeta, installVersion, npmSupportsProvenance, npmVersion, realRunNode, realRunNpm };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { splitRawFile } from './chunk-
|
|
3
|
+
import { splitRawFile } from './chunk-TB7EP24C.js';
|
|
4
4
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
5
5
|
import { existsSync, readFileSync, mkdirSync, writeFileSync, readdirSync } from 'fs';
|
|
6
6
|
import { join, dirname } from 'path';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { CONTEXT_PIN_SCHEMA_VERSION, CONTEXT_PIN_FILENAME } from './chunk-
|
|
3
|
+
import { CONTEXT_PIN_SCHEMA_VERSION, CONTEXT_PIN_FILENAME } from './chunk-TB7EP24C.js';
|
|
4
4
|
import { readFileSync, existsSync, writeFileSync, mkdirSync, utimesSync, statSync, unlinkSync } from 'fs';
|
|
5
5
|
import { join, dirname } from 'path';
|
|
6
6
|
|
|
@@ -42,6 +42,12 @@ function withGitConfig(env, key, value) {
|
|
|
42
42
|
[`GIT_CONFIG_VALUE_${at}`]: value
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
+
function tokenHeader(token) {
|
|
46
|
+
return `Authorization: Basic ${Buffer.from(`x-access-token:${token}`).toString("base64")}`;
|
|
47
|
+
}
|
|
48
|
+
function withTokenHeader(env, url, token) {
|
|
49
|
+
return withGitConfig(env, `http.${url}.extraHeader`, tokenHeader(token));
|
|
50
|
+
}
|
|
45
51
|
function withHooksPath(env, dir) {
|
|
46
52
|
return withGitConfig(env, "core.hooksPath", dir);
|
|
47
53
|
}
|
|
@@ -52,4 +58,4 @@ function commitIdentityRecord(identity) {
|
|
|
52
58
|
};
|
|
53
59
|
}
|
|
54
60
|
|
|
55
|
-
export { authorEnvironment, commitIdentityRecord, parseClaimIdentity, withGitConfig, withHooksPath };
|
|
61
|
+
export { authorEnvironment, commitIdentityRecord, parseClaimIdentity, tokenHeader, withGitConfig, withHooksPath, withTokenHeader };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { RecipeError } from './chunk-QOZKPLVJ.js';
|
|
4
|
-
import { trackImageBuild, isOutOfMemory, ensureBuilder } from './chunk-
|
|
4
|
+
import { trackImageBuild, isOutOfMemory, ensureBuilder } from './chunk-TV36SKEN.js';
|
|
5
5
|
import { spawn } from 'child_process';
|
|
6
6
|
import { existsSync, mkdirSync, createWriteStream, rmSync, readFileSync } from 'fs';
|
|
7
7
|
import { join, dirname } from 'path';
|
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
3
|
+
import { fetchFactories, selectFactory, saveFactoryConnection, autoConnectedLine } from './chunk-LYESSQUA.js';
|
|
4
|
+
import { resolveRepoIdentity } from './chunk-LTJPX7TX.js';
|
|
5
5
|
import { resolveGatewayCredentials } from './chunk-PLMTLGYH.js';
|
|
6
6
|
import { findGitDirs, readRepoConnection } from './chunk-BJ3KTMDH.js';
|
|
7
7
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { autoConnect } from './chunk-
|
|
3
|
+
import { autoConnect } from './chunk-KPUJGBA4.js';
|
|
4
4
|
import { detectActiveSession } from './chunk-BFESLKPP.js';
|
|
5
|
-
import { sanitizeTerminal } from './chunk-
|
|
6
|
-
import { resolveRepoIdentity } from './chunk-
|
|
5
|
+
import { sanitizeTerminal } from './chunk-ZEQMTBRD.js';
|
|
6
|
+
import { resolveRepoIdentity } from './chunk-LTJPX7TX.js';
|
|
7
7
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
8
8
|
import { defaultFetch } from './chunk-YO4PSLVB.js';
|
|
9
9
|
import { resolveGatewayCredentials, unauthorizedMessage } from './chunk-PLMTLGYH.js';
|
|
@@ -347,7 +347,7 @@ async function runWorkLinkSession(opts) {
|
|
|
347
347
|
return await linkSession(opts);
|
|
348
348
|
} catch (err) {
|
|
349
349
|
if (opts.logFailures) {
|
|
350
|
-
const { logHookError } = await import('./hook-fast-
|
|
350
|
+
const { logHookError } = await import('./hook-fast-AQCAQIA6.js');
|
|
351
351
|
const reason = err instanceof Error ? err.message : String(err);
|
|
352
352
|
logHookError(opts.home ?? homeFromEnv(opts.env ?? process.env), new Error(`work link-session #${opts.number} failed: ${reason}`));
|
|
353
353
|
}
|
|
@@ -505,4 +505,4 @@ async function runWorkList(opts) {
|
|
|
505
505
|
return { data, output };
|
|
506
506
|
}
|
|
507
507
|
|
|
508
|
-
export { WorkCommandError, findLiveItem, getJson, isSignatureRefusal, parsePositiveInt, postJson, resolveCredentials, resolveRepository, runWorkBuild, runWorkLinkSession, runWorkList, runWorkRemove, runWorkStatus, signatureRefusalMessage };
|
|
508
|
+
export { WorkCommandError, environmentFacts, findLiveItem, getJson, isSignatureRefusal, parsePositiveInt, postJson, resolveCredentials, resolveRepository, runWorkBuild, runWorkLinkSession, runWorkList, runWorkRemove, runWorkStatus, signatureRefusalMessage };
|