@outerlayer/cli 0.26.1 → 0.26.3
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 +14 -0
- package/README.md +3 -1
- package/dist/{build-JK2DLT6X.js → build-EBQYXL7Y.js} +2 -2
- package/dist/build-info.json +1 -1
- package/dist/{builder-TMA25KRR.js → builder-WEGLC2F2.js} +2 -2
- package/dist/{check-3CBJVXZD.js → check-WJJ325EQ.js} +19 -19
- package/dist/{chunk-PNHNKMA3.js → chunk-2AKDF6C2.js} +2 -2
- package/dist/{chunk-DYEFPYME.js → chunk-2O5KA67H.js} +1 -1
- package/dist/{chunk-7NKVMAP6.js → chunk-364XDGOK.js} +2 -2
- package/dist/{chunk-AINUN2TT.js → chunk-7LVF4E5V.js} +1 -1
- package/dist/{chunk-QIIMZC7W.js → chunk-FO7F6QSV.js} +40 -3
- package/dist/{chunk-DXDF43YG.js → chunk-I7RZHMXW.js} +1 -1
- package/dist/{chunk-D7V33CAH.js → chunk-J7BXZLSO.js} +1 -1
- package/dist/{chunk-GQOT37HL.js → chunk-K7FCZCLQ.js} +5 -5
- package/dist/{chunk-2N72GPS2.js → chunk-MWPBF2XG.js} +1 -1
- package/dist/{chunk-HPOEVC2V.js → chunk-MXTN35XN.js} +3 -3
- package/dist/{chunk-GAWZ7ATV.js → chunk-SKZG7SAN.js} +61 -16
- package/dist/{chunk-4R24DSL2.js → chunk-TSW4DGV2.js} +5 -5
- package/dist/{chunk-XPKI5OMT.js → chunk-UKCNOAO6.js} +1 -1
- package/dist/{chunk-GNPTU4BM.js → chunk-URIZRCRY.js} +2 -1
- package/dist/{chunk-ILL2CWOU.js → chunk-VHVFU6QU.js} +16 -12
- package/dist/{chunk-JUTN2HUP.js → chunk-W7LGHNXT.js} +2 -2
- package/dist/{chunk-IIFMFX6J.js → chunk-XDHYZWEK.js} +2 -2
- package/dist/{chunk-TBJ7KO2A.js → chunk-XF77SNB4.js} +15 -10
- package/dist/{chunk-XGJUNNXL.js → chunk-XLC7KEUV.js} +3 -1
- package/dist/{chunk-7I6GZSN3.js → chunk-ZLEXMZFW.js} +1 -1
- package/dist/{chunk-BMWIUSTZ.js → chunk-ZPXI7LMG.js} +3 -3
- package/dist/{cli-7HVTFJZO.js → cli-2UUJM3AE.js} +63 -61
- package/dist/{command-2Q5UDZUO.js → command-GQBHC53U.js} +9 -9
- package/dist/{container-start-SCCR2PRD.js → container-start-AUJHF2BC.js} +10 -10
- package/dist/{docker-4X2A5HDY.js → docker-NYAIIX2F.js} +2 -2
- package/dist/{doctor-3QA5Y5HG.js → doctor-NV2PUERZ.js} +11 -11
- package/dist/{emit-artifact-cmd-SFUSDWZM.js → emit-artifact-cmd-XXTCHP6V.js} +4 -4
- package/dist/{emit-result-cmd-NEICBIDU.js → emit-result-cmd-HRTXGZLK.js} +4 -4
- package/dist/{exec-client-KH33DICR.js → exec-client-J6L5FDRR.js} +2 -2
- package/dist/{governing-source-J5DF65X5.js → governing-source-PTJ6EAA3.js} +2 -2
- package/dist/{guest-init-TOSKPGPF.js → guest-init-CXIHA5VI.js} +2 -2
- package/dist/hook-fast-SDFXJEAW.js +12 -0
- package/dist/{hook-wrap-fast-NOOGDNSW.js → hook-wrap-fast-7VYYAAH4.js} +2 -2
- package/dist/index.js +5 -5
- package/dist/{init-UMON3HZK.js → init-KIGYMLDM.js} +10 -10
- package/dist/{init-NEUTUGEQ.js → init-UZWRJMPZ.js} +10 -10
- package/dist/{init-cmd-54DMRBNO.js → init-cmd-SQKWPACS.js} +5 -5
- package/dist/{loop-6JKW5QR5.js → loop-OE32U2IZ.js} +19 -19
- package/dist/{machine-XF55O56X.js → machine-L7INJ4JN.js} +9 -9
- package/dist/{runner-identity-NH6RLVMI.js → runner-identity-YYENYKDH.js} +2 -2
- package/dist/{runner-key-FUNSJ564.js → runner-key-AZVXBQIB.js} +10 -10
- package/dist/{session-sender-P5GVOIUY.js → session-sender-VH2EKAT5.js} +5 -5
- package/dist/settings-3DBYKYQD.js +7 -0
- package/dist/{spec-cmd-HMFW552G.js → spec-cmd-BOUPLX7X.js} +1 -1
- package/dist/{status-ULZVKQ7G.js → status-3WC2IGVI.js} +15 -15
- package/dist/{statusline-fast-GVRSBHAF.js → statusline-fast-YVHG6ZLX.js} +2 -2
- package/dist/{sync-cmd-VCLCOME6.js → sync-cmd-GT2WTQRA.js} +4 -4
- package/dist/{watch-SVGL24OX.js → watch-JED7SYAA.js} +4 -4
- package/dist/{work-claim-cmd-WQF5RTCT.js → work-claim-cmd-MY4N74HA.js} +3 -3
- package/dist/{work-cmd-TGSNYPSG.js → work-cmd-UQ45HDM4.js} +1 -1
- package/dist/{work-comment-cmd-O3FVX6M4.js → work-comment-cmd-I7NNSNDP.js} +1 -1
- package/dist/{work-logs-cmd-2RMJFVNZ.js → work-logs-cmd-YIQJVENH.js} +1 -1
- package/dist/{work-open-pr-cmd-5EP7BKRE.js → work-open-pr-cmd-VP5NNTCW.js} +1 -1
- package/dist/{work-stop-cmd-TNJYBLMN.js → work-stop-cmd-GN2WX73C.js} +1 -1
- package/package.json +1 -1
- package/dist/hook-fast-REXH5P6R.js +0 -12
- package/dist/settings-AKYEOCC2.js +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @outerlayer/cli
|
|
2
2
|
|
|
3
|
+
## 0.26.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- bdf88b4: MicroVM builds boot a Linux 6.18 guest kernel, the newer of the two guest kernels Firecracker 1.17 supports.
|
|
8
|
+
- bdfdf7b: A machine with OuterLayer's hooks in both managed settings and user settings records each hook event once. Claude Code starts both copies of the hook; the second one does nothing, so the session's warnings appear once and Work is called once.
|
|
9
|
+
|
|
10
|
+
## 0.26.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 7c8012c: The hooks that `outerlayer init --org` prints, and the hooks and status line that `outerlayer init --project` and `outerlayer hooks wrap --project` write, run `outerlayer` from the PATH. They work on every machine, instead of naming the install path of the machine that wrote them. The `--org` snippet also names the Windows registry value, `Settings`, and says to install the CLI on each machine.
|
|
15
|
+
- 3c1d9ee: A microVM build powers off when its lease runs out with no runner renewing it. A build started through the root helper ends at `runner.timeLimitMinutes` plus 10 minutes, even when no runner stops it.
|
|
16
|
+
|
|
3
17
|
## 0.26.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -234,7 +234,9 @@ content:
|
|
|
234
234
|
With the root helper installed, the runner asks it over a Unix socket that only
|
|
235
235
|
the runner's account can open to start each microVM build under Firecracker's
|
|
236
236
|
jailer. That socket is local, and nothing about the host leaves the machine
|
|
237
|
-
through it.
|
|
237
|
+
through it. The runner also serves a lease socket in each build's directory,
|
|
238
|
+
which the guest reaches over vsock. The runner writes only the time left on
|
|
239
|
+
the build's lease to it, and the guest powers off when that time runs out.
|
|
238
240
|
- **`outerlayer runner install --service` with `builtin:vm` hooks** downloads the
|
|
239
241
|
root helper from github.com on each install, from the same public guest assets
|
|
240
242
|
repository, and checks it against a sha256 pinned in the CLI. The request
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { buildRepositoryImage } from './chunk-
|
|
3
|
+
export { buildRepositoryImage } from './chunk-7LVF4E5V.js';
|
|
4
4
|
import './chunk-PYSKSROG.js';
|
|
5
5
|
import './chunk-JBJTC3UU.js';
|
|
6
|
-
export { RecipeError } from './chunk-
|
|
6
|
+
export { RecipeError } from './chunk-TSW4DGV2.js';
|
|
7
7
|
import './chunk-L4CW6LZQ.js';
|
|
8
8
|
import './chunk-2K3TCQHW.js';
|
|
9
9
|
import './chunk-JGD5TWQ2.js';
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"2026-10-
|
|
1
|
+
{"id":"2026-10-16T19:10:06.995Z+98c3824","root":"/home/runner/_work/outerlayer/outerlayer","pkg":"outerlayer"}
|
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
4
|
-
import './chunk-
|
|
3
|
+
export { MIN_BUILDX_VERSION, builderName, builderSpec, buildxState, ensureBuilder, ensureFailureCount, isOutOfMemory, proxyEnvironment, trackImageBuild } from './chunk-ZLEXMZFW.js';
|
|
4
|
+
import './chunk-TSW4DGV2.js';
|
|
5
5
|
import './chunk-7RQ73DLO.js';
|
|
6
6
|
import './chunk-QE3UQAHK.js';
|
|
7
7
|
import './chunk-QZBXLLTV.js';
|
|
@@ -1,41 +1,41 @@
|
|
|
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-XF77SNB4.js';
|
|
4
|
+
import './chunk-SKZG7SAN.js';
|
|
5
5
|
import './chunk-TKL74NLB.js';
|
|
6
6
|
import './chunk-ZVB57WI6.js';
|
|
7
7
|
import './chunk-6FAP657M.js';
|
|
8
8
|
import './chunk-3JVYMD4G.js';
|
|
9
9
|
import './chunk-YETTWTAY.js';
|
|
10
10
|
import './chunk-TPKYTORP.js';
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
11
|
+
import './chunk-XDHYZWEK.js';
|
|
12
|
+
import './chunk-MWPBF2XG.js';
|
|
13
13
|
import './chunk-UNF7MWEL.js';
|
|
14
|
-
import './chunk-
|
|
14
|
+
import './chunk-2AKDF6C2.js';
|
|
15
15
|
import './chunk-EORWWFPA.js';
|
|
16
16
|
import './chunk-ESVW4MJY.js';
|
|
17
|
-
import { placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, needsClaudeCredential, claudeCredentialCheck, claimPermissionProblem, formerSkillQueues, formerSkillProblem } from './chunk-
|
|
17
|
+
import { placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, needsClaudeCredential, claudeCredentialCheck, claimPermissionProblem, formerSkillQueues, formerSkillProblem } from './chunk-ZPXI7LMG.js';
|
|
18
18
|
import './chunk-4IFKLYMM.js';
|
|
19
19
|
import './chunk-YYYRBYWG.js';
|
|
20
20
|
import './chunk-TBT347UY.js';
|
|
21
|
-
import './chunk-
|
|
22
|
-
import './chunk-
|
|
23
|
-
import './chunk-
|
|
21
|
+
import './chunk-W7LGHNXT.js';
|
|
22
|
+
import './chunk-364XDGOK.js';
|
|
23
|
+
import './chunk-VHVFU6QU.js';
|
|
24
24
|
import './chunk-665QWBNW.js';
|
|
25
25
|
import './chunk-TQMI335S.js';
|
|
26
26
|
import './chunk-5PMQDQFV.js';
|
|
27
27
|
import './chunk-MLD2NA7N.js';
|
|
28
28
|
import { parseRunnerEnv } from './chunk-6MZSX4M7.js';
|
|
29
|
-
import './chunk-
|
|
29
|
+
import './chunk-7LVF4E5V.js';
|
|
30
30
|
import './chunk-PYSKSROG.js';
|
|
31
31
|
import './chunk-JBJTC3UU.js';
|
|
32
32
|
import './chunk-OGFGZQA3.js';
|
|
33
|
-
import './chunk-
|
|
34
|
-
import './chunk-
|
|
35
|
-
import './chunk-
|
|
36
|
-
import './chunk-
|
|
37
|
-
import './chunk-
|
|
38
|
-
import './chunk-
|
|
33
|
+
import './chunk-ZLEXMZFW.js';
|
|
34
|
+
import './chunk-TSW4DGV2.js';
|
|
35
|
+
import './chunk-MXTN35XN.js';
|
|
36
|
+
import './chunk-XLC7KEUV.js';
|
|
37
|
+
import './chunk-J7BXZLSO.js';
|
|
38
|
+
import './chunk-UKCNOAO6.js';
|
|
39
39
|
import './chunk-HXFRJKMU.js';
|
|
40
40
|
import './chunk-TEVO3RUV.js';
|
|
41
41
|
import './chunk-BUP5N3X6.js';
|
|
@@ -47,9 +47,9 @@ import './chunk-7RQ73DLO.js';
|
|
|
47
47
|
import './chunk-W3NVHOCS.js';
|
|
48
48
|
import './chunk-MQ743JX3.js';
|
|
49
49
|
import './chunk-QRZLUUNN.js';
|
|
50
|
-
import './chunk-
|
|
50
|
+
import './chunk-FO7F6QSV.js';
|
|
51
51
|
import './chunk-ZJSNLVCE.js';
|
|
52
|
-
import './chunk-
|
|
52
|
+
import './chunk-2O5KA67H.js';
|
|
53
53
|
import './chunk-BKO6JEZI.js';
|
|
54
54
|
import './chunk-VPEGE3QZ.js';
|
|
55
55
|
import './chunk-HCVLP7XA.js';
|
|
@@ -62,7 +62,7 @@ import './chunk-HBISTTG3.js';
|
|
|
62
62
|
import './chunk-T2Q7ISPE.js';
|
|
63
63
|
import './chunk-WZBHBH3J.js';
|
|
64
64
|
import './chunk-CRB3POP4.js';
|
|
65
|
-
import './chunk-
|
|
65
|
+
import './chunk-URIZRCRY.js';
|
|
66
66
|
import './chunk-YQR6E6OV.js';
|
|
67
67
|
import './chunk-TUSYOL2O.js';
|
|
68
68
|
import './chunk-RKOTJQVG.js';
|
|
@@ -5,9 +5,9 @@ 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-BUP5N3X6.js';
|
|
7
7
|
import { cliFetch, resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-QRZLUUNN.js';
|
|
8
|
-
import { writeSyncStatus, spoolDir } from './chunk-
|
|
8
|
+
import { writeSyncStatus, spoolDir } from './chunk-FO7F6QSV.js';
|
|
9
9
|
import { readLatestProvenanceForSession, readContextProvenance } from './chunk-ZJSNLVCE.js';
|
|
10
|
-
import { hookExecSpoolPath } from './chunk-
|
|
10
|
+
import { hookExecSpoolPath } from './chunk-2O5KA67H.js';
|
|
11
11
|
import { applyReportedCost } from './chunk-BKO6JEZI.js';
|
|
12
12
|
import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
13
13
|
import { setCustomScrubbers, setLocalIdentity, tailTranscript, enrichSessionRepo, scanAll, setRepoRoot, resolveRepoIdentity, sessionIdFromPath, scrubDeep, SOURCE_ADAPTERS } from './chunk-QE3UQAHK.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { decodeWrappedCommand } from './chunk-
|
|
3
|
+
import { decodeWrappedCommand } from './chunk-URIZRCRY.js';
|
|
4
4
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
5
5
|
import { readFileSync, mkdirSync, appendFileSync, writeFileSync } from 'fs';
|
|
6
6
|
import { spawn } from 'child_process';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { MIN_ENGINE_MAJOR } from './chunk-
|
|
3
|
+
import { MIN_ENGINE_MAJOR } from './chunk-VHVFU6QU.js';
|
|
4
4
|
import { runnerImageVersion } from './chunk-665QWBNW.js';
|
|
5
|
-
import { firecrackerArch, MICROVM_ARCHES, guestAssetsPinned } from './chunk-
|
|
5
|
+
import { firecrackerArch, MICROVM_ARCHES, guestAssetsPinned } from './chunk-TSW4DGV2.js';
|
|
6
6
|
import { spawnSync } from 'child_process';
|
|
7
7
|
import { existsSync, accessSync, constants, statSync, readFileSync } from 'fs';
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { claimPidFile, RunnerAlreadyRunningError, releasePidFile } from './chunk-PYSKSROG.js';
|
|
4
4
|
import { startTimeOf } from './chunk-JBJTC3UU.js';
|
|
5
|
-
import { CLAUDE_CODE_VERSION, NODE_IMAGE, DEFAULT_BASE_IMAGE, RecipeError, locateRecipe, readRecipe, assertBuildable, TINI_VERSION, GH_VERSION, writeSanitizedRecipe, classifyProperties, GH_SHA256, TINI_SHA256, SANITIZED_NAME } from './chunk-
|
|
5
|
+
import { CLAUDE_CODE_VERSION, NODE_IMAGE, DEFAULT_BASE_IMAGE, RecipeError, locateRecipe, readRecipe, assertBuildable, TINI_VERSION, GH_VERSION, writeSanitizedRecipe, classifyProperties, GH_SHA256, TINI_SHA256, SANITIZED_NAME } from './chunk-TSW4DGV2.js';
|
|
6
6
|
import { RUNNER_DIR_MODE, repoCacheDir, imagesDir, attemptStamp, runnerDir, rootfsPathFor, RUNNER_FILE_MODE } from './chunk-L4CW6LZQ.js';
|
|
7
7
|
import { withGitConfig, tokenHeader, PROXY_WARNING_FLAG } from './chunk-2K3TCQHW.js';
|
|
8
8
|
import { RELAY_ID, RELAY_USER } from './chunk-JGD5TWQ2.js';
|
|
@@ -6,7 +6,7 @@ import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
|
6
6
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
7
7
|
import { deadHooksState, huskyPrepareScript, preparePackageManagerCommand } from './chunk-TUSYOL2O.js';
|
|
8
8
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
9
|
-
import { readFileSync, mkdirSync, writeFileSync, renameSync, existsSync, statSync, appendFileSync, opendirSync
|
|
9
|
+
import { readFileSync, mkdirSync, writeFileSync, renameSync, existsSync, readdirSync, unlinkSync, statSync, appendFileSync, opendirSync } from 'fs';
|
|
10
10
|
import { spawn, execFileSync } from 'child_process';
|
|
11
11
|
import { createHash } from 'crypto';
|
|
12
12
|
import { join, dirname, resolve } from 'path';
|
|
@@ -308,6 +308,42 @@ function refreshCommand(workspaceDistDir, trusted) {
|
|
|
308
308
|
function spoolDir(home = homeFromEnv()) {
|
|
309
309
|
return join(home, ".outerlayer", "spool");
|
|
310
310
|
}
|
|
311
|
+
var DUPLICATE_RUN_WINDOW_MS = 2e3;
|
|
312
|
+
var DUPLICATE_RUN_CLAIM_TTL_MS = 6e4;
|
|
313
|
+
function isDuplicateRun(dir, event, input, now = Date.now(), claim = claimRun) {
|
|
314
|
+
try {
|
|
315
|
+
const claims = join(dir, "hook-runs");
|
|
316
|
+
mkdirSync(claims, { recursive: true });
|
|
317
|
+
const key = createHash("sha256").update(`${event}
|
|
318
|
+
${input}`).digest("hex");
|
|
319
|
+
const bucket = Math.floor(now / DUPLICATE_RUN_WINDOW_MS);
|
|
320
|
+
try {
|
|
321
|
+
claim(join(claims, `${key}-${bucket}`), now);
|
|
322
|
+
} catch (err) {
|
|
323
|
+
return err.code === "EEXIST";
|
|
324
|
+
}
|
|
325
|
+
if (claimedWithinWindow(join(claims, `${key}-${bucket - 1}`), now)) return true;
|
|
326
|
+
for (const name of readdirSync(claims)) {
|
|
327
|
+
const claimed = Number(name.slice(name.lastIndexOf("-") + 1)) * DUPLICATE_RUN_WINDOW_MS;
|
|
328
|
+
if (!(now - claimed <= DUPLICATE_RUN_CLAIM_TTL_MS)) unlinkSync(join(claims, name));
|
|
329
|
+
}
|
|
330
|
+
return false;
|
|
331
|
+
} catch {
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
function claimRun(path, now) {
|
|
336
|
+
writeFileSync(path, String(now), { flag: "wx" });
|
|
337
|
+
}
|
|
338
|
+
function claimedWithinWindow(path, now) {
|
|
339
|
+
let text;
|
|
340
|
+
try {
|
|
341
|
+
text = readFileSync(path, "utf8");
|
|
342
|
+
} catch {
|
|
343
|
+
return false;
|
|
344
|
+
}
|
|
345
|
+
return text === "" || now - Number(text) < DUPLICATE_RUN_WINDOW_MS;
|
|
346
|
+
}
|
|
311
347
|
function hookFiredMarkerPath(event, home = homeFromEnv()) {
|
|
312
348
|
const safe = event.replace(/[^A-Za-z0-9_-]/g, "").slice(0, 64) || "unknown";
|
|
313
349
|
return join(spoolDir(home), `last-fired-${safe}`);
|
|
@@ -429,7 +465,7 @@ async function handleWorkLaunch(sessionId, home, env, spawnImpl = spawnDetached,
|
|
|
429
465
|
}
|
|
430
466
|
async function missingRenewalHookContext(home, cwd) {
|
|
431
467
|
try {
|
|
432
|
-
const { settingsPath, readSettings, isOurHookCommand } = await import('./settings-
|
|
468
|
+
const { settingsPath, readSettings, isOurHookCommand } = await import('./settings-3DBYKYQD.js');
|
|
433
469
|
const userSettings = readSettings(settingsPath("user", { home }));
|
|
434
470
|
const projectSettings = readSettings(settingsPath("project", { cwd }));
|
|
435
471
|
if (userSettings === null && projectSettings === null) return void 0;
|
|
@@ -679,6 +715,7 @@ async function runHookFast(event, home = homeFromEnv(), read = readStdin, env =
|
|
|
679
715
|
}
|
|
680
716
|
const dir = spoolDir(home);
|
|
681
717
|
mkdirSync(dir, { recursive: true });
|
|
718
|
+
if (isDuplicateRun(dir, resolvedEvent, stdin)) return;
|
|
682
719
|
const record = {
|
|
683
720
|
t: (/* @__PURE__ */ new Date()).toISOString(),
|
|
684
721
|
event: resolvedEvent,
|
|
@@ -773,4 +810,4 @@ function recordLinkExitFailure(argv, home = homeFromEnv(), target = process) {
|
|
|
773
810
|
});
|
|
774
811
|
}
|
|
775
812
|
|
|
776
|
-
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 };
|
|
813
|
+
export { AUTO_SYNC_DEBOUNCE_MS, DUPLICATE_RUN_WINDOW_MS, SYNC_STALE_AFTER_MS, WORK_LEASE_RENEW_DEBOUNCE_MS, WORK_LINK_RETRIES, assessSyncHealth, checkInstalledCliStaleness, contextPossiblyGoverned, formatAgo, handleWorkLaunch, handleWorkSessionEnd, hookFiredMarkerPath, installedCliDistDir, isDuplicateRun, logHookError, markWorkLeaseRenewed, maybeAutoSync, maybeRenewWorkLease, readSyncStatus, recordLinkExitFailure, refreshCommand, runHookFast, sanitizeForContext, spoolDir, workspaceRootOf, writeSyncStatus };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { recordReportedCost } from './chunk-BKO6JEZI.js';
|
|
4
4
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
5
|
-
import { decodeWrappedCommand } from './chunk-
|
|
5
|
+
import { decodeWrappedCommand } from './chunk-URIZRCRY.js';
|
|
6
6
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
7
7
|
import { readFileSync } from 'fs';
|
|
8
8
|
import { spawn } from 'child_process';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { WorkCommandError, postJson } from './chunk-
|
|
3
|
+
import { WorkCommandError, postJson } from './chunk-UKCNOAO6.js';
|
|
4
4
|
import { defaultGitRunner, materializeContext, isStagingWriteFault, lookupGoverningSource } from './chunk-W3NVHOCS.js';
|
|
5
5
|
import { signingFetchFor } from './chunk-QRZLUUNN.js';
|
|
6
6
|
import { unsupportedLayout, layoutRefusalReason, composeDelivery } from './chunk-VPEGE3QZ.js';
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { checkStarterFiles, contextIsGoverned, checkBuildSkill } from './chunk-XFGL53GU.js';
|
|
4
|
-
import { resolveCredentials, getJson, WorkCommandError } from './chunk-
|
|
4
|
+
import { resolveCredentials, getJson, WorkCommandError } from './chunk-UKCNOAO6.js';
|
|
5
5
|
import { isLinkedRepository } from './chunk-TEVO3RUV.js';
|
|
6
6
|
import { sanitizeTerminal } from './chunk-BUP5N3X6.js';
|
|
7
7
|
import { checkFormerSkillNames } from './chunk-MQ743JX3.js';
|
|
8
8
|
import { resolveGatewayCredentials, defaultFetch } from './chunk-QRZLUUNN.js';
|
|
9
|
-
import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-
|
|
10
|
-
import { readStatuslineState, STATE_FRESH_MS } from './chunk-
|
|
9
|
+
import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-FO7F6QSV.js';
|
|
10
|
+
import { readStatuslineState, STATE_FRESH_MS } from './chunk-I7RZHMXW.js';
|
|
11
11
|
import { hookCommandEscapesControlPlane, CONTROL_PLANE_DIR_VARIABLE } from './chunk-HCVLP7XA.js';
|
|
12
12
|
import { findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
13
13
|
import { resolveRepoIdentity, compareVersions, SUPPORTED_VERSIONS } from './chunk-QE3UQAHK.js';
|
|
14
14
|
import { C } from './chunk-ANPNT6PM.js';
|
|
15
15
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
16
|
-
import { readSettings, settingsPath, isOurStatuslineSlot, statuslineWrappedOriginal, REGISTERED_EVENTS, isOurHookCommand, ourCommandBins, cliBinResolvable, ourDirectScriptBins, wrappedOriginalCommand } from './chunk-
|
|
16
|
+
import { readSettings, settingsPath, isOurStatuslineSlot, statuslineWrappedOriginal, REGISTERED_EVENTS, isOurHookCommand, ourCommandBins, cliBinResolvable, ourDirectScriptBins, wrappedOriginalCommand } from './chunk-URIZRCRY.js';
|
|
17
17
|
import { readDeliveryRecord, readDegraded, readSourceCache } from './chunk-YQR6E6OV.js';
|
|
18
18
|
import { deadHooksState, preparePackageManagerCommand } from './chunk-TUSYOL2O.js';
|
|
19
19
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
@@ -1186,7 +1186,7 @@ async function gatherDoctorChecks() {
|
|
|
1186
1186
|
const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
|
|
1187
1187
|
checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
|
|
1188
1188
|
} else if (hasRunnerBlock(configPath)) {
|
|
1189
|
-
const { runnerHostChecks } = await import('./doctor-
|
|
1189
|
+
const { runnerHostChecks } = await import('./doctor-NV2PUERZ.js');
|
|
1190
1190
|
const hooks = (() => {
|
|
1191
1191
|
try {
|
|
1192
1192
|
return loadRunnerConfig(configPath).hooks;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { BRIDGE_ADDRESS, TUNNEL_PORT, BRIDGE_CIDR } from './chunk-UNF7MWEL.js';
|
|
4
4
|
import { startTimeOf } from './chunk-JBJTC3UU.js';
|
|
5
|
-
import { EXEC_PORT } from './chunk-
|
|
5
|
+
import { EXEC_PORT } from './chunk-XLC7KEUV.js';
|
|
6
6
|
import { RELAY_PORT } from './chunk-2K3TCQHW.js';
|
|
7
7
|
import { spawn, spawnSync } from 'child_process';
|
|
8
8
|
import { writeFileSync, chmodSync, mkdirSync } from 'fs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { EXEC_PORT } from './chunk-
|
|
3
|
+
import { EXEC_PORT } from './chunk-XLC7KEUV.js';
|
|
4
4
|
import { createConnection } from 'net';
|
|
5
5
|
|
|
6
6
|
createRequire(import.meta.url);
|
|
@@ -41,8 +41,8 @@ var FrameDecoder = class {
|
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
function encodeRequest(request) {
|
|
44
|
-
const { argv, user, cwd, env } = request;
|
|
45
|
-
return Buffer.from(JSON.stringify({ argv, user, cwd, env }), "utf8");
|
|
44
|
+
const { argv, user, cwd, env, detach } = request;
|
|
45
|
+
return Buffer.from(JSON.stringify({ argv, user, cwd, env, ...detach === void 0 ? {} : { detach } }), "utf8");
|
|
46
46
|
}
|
|
47
47
|
function decodeExit(payload) {
|
|
48
48
|
if (payload.length !== 4) throw new ProtocolError(`an exit frame holds ${payload.length} bytes, not 4`);
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { readsJobState, READ_JOB_STATE_FORMATS, jobStateFormatOf } from './chunk-ZVB57WI6.js';
|
|
4
|
-
import { senderPidfile } from './chunk-
|
|
5
|
-
import { DOCKERD_LOG, HELPER_PATH, HELPER_RECORD } from './chunk-
|
|
4
|
+
import { senderPidfile } from './chunk-XDHYZWEK.js';
|
|
5
|
+
import { DOCKERD_LOG, HELPER_PATH, HELPER_RECORD } from './chunk-MWPBF2XG.js';
|
|
6
6
|
import { writeDockerClientConfig } from './chunk-UNF7MWEL.js';
|
|
7
|
-
import { installScrubContext } from './chunk-
|
|
8
|
-
import { ADDED_USER, AssetError, obtainImage, ensureRootfs, gitRemoteFor, startServicesFor, createBuildDisk, machineConfig, resolveAgentUser, AgentUserError, runBuildSteps, shellQuote, LEASE_SECONDS, createContainerRuntime, stopContainer, cleanupContainer, outOfMemoryReason, containerSenderCommand, signalInContainer, syncInContainer, copyTranscriptsFromContainer, senderAliveScript, helperFirecrackerNote, HelperRefusal, GH_CONFIG_YML, ghHostsYml, isLiteralAddress, deleteBuildDisk, startCheckContainer, lifecycleSteps, lifecycleFailureReason, writeEvalInput, DeliveryFailure, EVAL_INPUT_NAME, copyTranscripts, senderSignalScript, containerJudgeEnvironment, copyJudgeTree } from './chunk-
|
|
9
|
-
import { readBranchHead, fetchCommit, diffBetween } from './chunk-
|
|
7
|
+
import { installScrubContext } from './chunk-2AKDF6C2.js';
|
|
8
|
+
import { ADDED_USER, AssetError, obtainImage, ensureRootfs, gitRemoteFor, startServicesFor, createLeaseChannel, createBuildDisk, machineConfig, resolveAgentUser, AgentUserError, runBuildSteps, shellQuote, LEASE_SECONDS, createContainerRuntime, stopContainer, cleanupContainer, outOfMemoryReason, containerSenderCommand, signalInContainer, syncInContainer, copyTranscriptsFromContainer, senderAliveScript, helperFirecrackerNote, HelperRefusal, GH_CONFIG_YML, ghHostsYml, isLiteralAddress, deleteBuildDisk, startCheckContainer, lifecycleSteps, lifecycleFailureReason, writeEvalInput, DeliveryFailure, EVAL_INPUT_NAME, copyTranscripts, senderSignalScript, containerJudgeEnvironment, copyJudgeTree } from './chunk-VHVFU6QU.js';
|
|
9
|
+
import { readBranchHead, fetchCommit, diffBetween } from './chunk-7LVF4E5V.js';
|
|
10
10
|
import { isSameProcess, startTimeOf } from './chunk-JBJTC3UU.js';
|
|
11
|
-
import { HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, writeJobFile, readJobFile, COMMAND_DIR, childEnvironment, judgeCommand, JUDGE_MAX_TURNS, MAX_REPORT_BYTES, JUDGE_DIR } from './chunk-
|
|
12
|
-
import { CLAUDE_CODE_VERSION, FIRECRACKER_VERSION } from './chunk-
|
|
13
|
-
import { waitForAgent, vmExecArgs } from './chunk-
|
|
14
|
-
import { socketPathProblem, vsockLinks, linkVsockSockets } from './chunk-
|
|
15
|
-
import { describeCallFailure, resolveGoverningSource, refusalCode, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, logStamp, createRunnerLog, formatDuration, retrySend, formatClock } from './chunk-
|
|
16
|
-
import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-
|
|
11
|
+
import { HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, writeJobFile, readJobFile, COMMAND_DIR, childEnvironment, judgeCommand, JUDGE_MAX_TURNS, MAX_REPORT_BYTES, JUDGE_DIR } from './chunk-ZLEXMZFW.js';
|
|
12
|
+
import { CLAUDE_CODE_VERSION, FIRECRACKER_VERSION } from './chunk-TSW4DGV2.js';
|
|
13
|
+
import { waitForAgent, vmExecArgs } from './chunk-MXTN35XN.js';
|
|
14
|
+
import { socketPathProblem, vsockLinks, LEASE_LINK, linkVsockSockets } from './chunk-XLC7KEUV.js';
|
|
15
|
+
import { describeCallFailure, resolveGoverningSource, refusalCode, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, logStamp, createRunnerLog, formatDuration, retrySend, formatClock } from './chunk-J7BXZLSO.js';
|
|
16
|
+
import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-UKCNOAO6.js';
|
|
17
17
|
import { planArtifactUpload } from './chunk-BUP5N3X6.js';
|
|
18
18
|
import { isBuiltinContainer, isBuiltinProcess, isBuiltinVm, DEFAULT_CHECK_TIME_LIMIT_MINUTES } from './chunk-JWRX5ZTT.js';
|
|
19
19
|
import { parseSize } from './chunk-7RQ73DLO.js';
|
|
@@ -31,6 +31,8 @@ import { existsSync, statSync, appendFileSync, mkdirSync, chmodSync, writeFileSy
|
|
|
31
31
|
import { join, isAbsolute, dirname, delimiter, sep } from 'path';
|
|
32
32
|
import { spawn, spawnSync } from 'child_process';
|
|
33
33
|
import { randomBytes, createHash } from 'crypto';
|
|
34
|
+
import { once } from 'events';
|
|
35
|
+
import { createServer } from 'net';
|
|
34
36
|
import { pathToFileURL } from 'url';
|
|
35
37
|
|
|
36
38
|
createRequire(import.meta.url);
|
|
@@ -95,6 +97,21 @@ function judgeProbe(probe, missedBefore) {
|
|
|
95
97
|
if (probe.alive) return { kind: "running" };
|
|
96
98
|
return missedBefore ? { kind: "lost" } : { kind: "recheck" };
|
|
97
99
|
}
|
|
100
|
+
async function serveLease(socketPath, channel, makeServer = createServer) {
|
|
101
|
+
const server = makeServer((socket) => channel.accept(socket));
|
|
102
|
+
rmSync(socketPath, { force: true });
|
|
103
|
+
server.listen(socketPath);
|
|
104
|
+
await once(server, "listening");
|
|
105
|
+
server.on("error", () => void 0);
|
|
106
|
+
return {
|
|
107
|
+
...channel,
|
|
108
|
+
close() {
|
|
109
|
+
channel.close();
|
|
110
|
+
server.close();
|
|
111
|
+
rmSync(socketPath, { force: true });
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}
|
|
98
115
|
function unitNameFor(buildId) {
|
|
99
116
|
return `outerlayer-build-${buildId}`;
|
|
100
117
|
}
|
|
@@ -121,7 +138,7 @@ async function startJailed(input) {
|
|
|
121
138
|
if (err.code !== "ENOENT") throw err;
|
|
122
139
|
}
|
|
123
140
|
}
|
|
124
|
-
return input.client.start({ build: input.buildId, kind: input.kind });
|
|
141
|
+
return input.client.start({ build: input.buildId, kind: input.kind, ...input.timeLimitMinutes === void 0 ? {} : { timeLimitMinutes: input.timeLimitMinutes } });
|
|
125
142
|
}
|
|
126
143
|
async function startJailedInto(state, input, save) {
|
|
127
144
|
state.jailed = { unit: unitNameFor(state.buildId), chroot: "" };
|
|
@@ -358,15 +375,33 @@ async function provisionMicroVm(input) {
|
|
|
358
375
|
diskBytes: parseSize(config.build?.disk ?? DEFAULT_DISK) ?? parseSize(DEFAULT_DISK)
|
|
359
376
|
};
|
|
360
377
|
const links = vsockLinks({ destinations: config.build?.destinations?.length ?? 0, builtIns: true });
|
|
378
|
+
const served = input.leaseTimeLeftMs === void 0 ? links : [...links, LEASE_LINK];
|
|
379
|
+
if (input.leaseTimeLeftMs !== void 0) {
|
|
380
|
+
try {
|
|
381
|
+
const channel = createLeaseChannel(input.leaseTimeLeftMs);
|
|
382
|
+
const served2 = await serveLease(join(buildDir2, LEASE_LINK.socket), { ...channel, accept: (stream) => runtime.leases.get(buildId)?.accept(stream) });
|
|
383
|
+
runtime.leases.set(buildId, { ...channel, close: served2.close });
|
|
384
|
+
} catch (err) {
|
|
385
|
+
return bail(`the lease stream could not start: ${describeCallFailure(err)}`);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
361
388
|
const configPath = join(buildDir2, "vm.json");
|
|
362
389
|
const helper = await helperFor(runtime, (line) => log.line(`${tag} ${line}`));
|
|
363
390
|
try {
|
|
364
|
-
if (helper === void 0) linkVsockSockets({ buildDir: buildDir2, vsockPath: state.vsockPath, links });
|
|
391
|
+
if (helper === void 0) linkVsockSockets({ buildDir: buildDir2, vsockPath: state.vsockPath, links: served });
|
|
365
392
|
await createBuildDisk({ host: vm.rootfs, runnerDir: runnerDirPath, bytes: limits.diskBytes, dest: state.buildDisk, memoryBytes: limits.memoryBytes });
|
|
366
393
|
writeFileSync(
|
|
367
394
|
configPath,
|
|
368
395
|
JSON.stringify(
|
|
369
|
-
machineConfig(limits, {
|
|
396
|
+
machineConfig(limits, {
|
|
397
|
+
kernel: assets.kernel,
|
|
398
|
+
rootfs: state.rootfs,
|
|
399
|
+
buildDisk: state.buildDisk,
|
|
400
|
+
vsock: state.vsockPath,
|
|
401
|
+
relayPorts: links.map((link) => link.port),
|
|
402
|
+
...input.leaseTimeLeftMs === void 0 ? {} : { leasePort: LEASE_LINK.port },
|
|
403
|
+
docker: report.docker
|
|
404
|
+
}),
|
|
370
405
|
null,
|
|
371
406
|
2
|
|
372
407
|
),
|
|
@@ -387,7 +422,11 @@ async function provisionMicroVm(input) {
|
|
|
387
422
|
const consolePath = join(jobDir, "vm-console.log");
|
|
388
423
|
if (helper !== void 0) {
|
|
389
424
|
try {
|
|
390
|
-
await startJailedInto(
|
|
425
|
+
await startJailedInto(
|
|
426
|
+
state,
|
|
427
|
+
{ client: helper, kind: "build", kernel: assets.kernel, rootfs: state.rootfs, sockets: served.map((link) => link.socket), timeLimitMinutes: config.timeLimitMinutes },
|
|
428
|
+
() => input.save(state, environment)
|
|
429
|
+
);
|
|
391
430
|
} catch (err) {
|
|
392
431
|
return bail(`the microVM did not start under the jailer: ${describeCallFailure(err)}`);
|
|
393
432
|
}
|
|
@@ -813,7 +852,11 @@ async function startCheckMicroVm(input) {
|
|
|
813
852
|
const boot = async () => {
|
|
814
853
|
if (helper !== void 0) {
|
|
815
854
|
try {
|
|
816
|
-
await startJailedInto(
|
|
855
|
+
await startJailedInto(
|
|
856
|
+
state,
|
|
857
|
+
{ client: helper, kind: "check", kernel: assets.kernel, rootfs: state.rootfs, sockets: links.map((link) => link.socket), timeLimitMinutes: config.timeLimitMinutes },
|
|
858
|
+
() => input.save(state)
|
|
859
|
+
);
|
|
817
860
|
} catch (err) {
|
|
818
861
|
return `the microVM did not start under the jailer: ${describeCallFailure(err)}`;
|
|
819
862
|
}
|
|
@@ -903,6 +946,8 @@ async function cleanupMicroVm(runtime, state, jobDir) {
|
|
|
903
946
|
}
|
|
904
947
|
}
|
|
905
948
|
if (state.buildDisk !== void 0) deleteBuildDisk(state.buildDisk);
|
|
949
|
+
runtime.leases.get(state.buildId)?.close();
|
|
950
|
+
runtime.leases.delete(state.buildId);
|
|
906
951
|
const tunnel = runtime.tunnels.get(state.buildId);
|
|
907
952
|
if (tunnel !== void 0) {
|
|
908
953
|
runtime.tunnels.delete(state.buildId);
|
|
@@ -249,13 +249,13 @@ var FIRECRACKER_SHA256 = {
|
|
|
249
249
|
var FIRECRACKER_BINARY_SHA256 = {
|
|
250
250
|
x86_64: "99ad0f5cd0514a88aad0e9ae8cfdb3cc3b4ab9d190e1194602406c786b5de7a5"
|
|
251
251
|
};
|
|
252
|
-
var GUEST_ASSETS_VERSION = "
|
|
252
|
+
var GUEST_ASSETS_VERSION = "7";
|
|
253
253
|
var GUEST_ASSETS_BASE_URL = `https://github.com/outerlayerai/guest-assets/releases/download/guest-${GUEST_ASSETS_VERSION}`;
|
|
254
254
|
var GUEST_KERNEL_SHA256 = {
|
|
255
|
-
x86_64: "
|
|
255
|
+
x86_64: "8552fad4bdea1d49f3e7d2aa500ce3f8918fcd2fc66779fd83235949688a39bb"
|
|
256
256
|
};
|
|
257
257
|
var GUEST_HELPER_SHA256 = {
|
|
258
|
-
x86_64: "
|
|
258
|
+
x86_64: "0ae934d3ad3f2a94abffcc3f044ba633b1a523dc17ff0c2bc322ed7d7fc505ea"
|
|
259
259
|
};
|
|
260
260
|
function guestAssetsPinned(arch) {
|
|
261
261
|
const zero = "0".repeat(64);
|
|
@@ -264,10 +264,10 @@ function guestAssetsPinned(arch) {
|
|
|
264
264
|
var JAILER_BINARY_SHA256 = {
|
|
265
265
|
x86_64: "65ef226e96f0ceda55ba643f445801ef2cc0ea667ef67cad8ac4f406c9c8434f"
|
|
266
266
|
};
|
|
267
|
-
var HOST_HELPER_ASSETS_VERSION = "
|
|
267
|
+
var HOST_HELPER_ASSETS_VERSION = "5";
|
|
268
268
|
var HOST_HELPER_BASE_URL = `https://github.com/outerlayerai/guest-assets/releases/download/guest-${HOST_HELPER_ASSETS_VERSION}`;
|
|
269
269
|
var HOST_HELPER_SHA256 = {
|
|
270
|
-
x86_64: "
|
|
270
|
+
x86_64: "f2ec1c6a7ff29353045fad617ac1a6bf0155d6f3eb6a6259272a15342feaf957"
|
|
271
271
|
};
|
|
272
272
|
function hostHelperPinned(arch = "x86_64", hashes = HOST_HELPER_SHA256) {
|
|
273
273
|
return hashes[arch] !== "0".repeat(64);
|
|
@@ -428,7 +428,7 @@ async function runWorkLinkSession(opts) {
|
|
|
428
428
|
return await linkSession(opts);
|
|
429
429
|
} catch (err) {
|
|
430
430
|
if (opts.logFailures) {
|
|
431
|
-
const { logHookError } = await import('./hook-fast-
|
|
431
|
+
const { logHookError } = await import('./hook-fast-SDFXJEAW.js');
|
|
432
432
|
const reason = err instanceof Error ? err.message : String(err);
|
|
433
433
|
logHookError(opts.home ?? homeFromEnv(opts.env ?? process.env), new Error(`work link-session #${opts.number} failed: ${reason}`));
|
|
434
434
|
}
|
|
@@ -49,6 +49,7 @@ function isScriptBin(bin) {
|
|
|
49
49
|
function cliCommand(cliBin) {
|
|
50
50
|
return isScriptBin(cliBin) ? `node ${quoteBin(cliBin)}` : quoteBin(cliBin);
|
|
51
51
|
}
|
|
52
|
+
var PORTABLE_BIN = "outerlayer";
|
|
52
53
|
function isOurBin(bin, cliBin) {
|
|
53
54
|
if (cliBin !== void 0 && normalizeBinPath(bin) === normalizeBinPath(cliBin)) return true;
|
|
54
55
|
const parts = bin.replace(/\\/g, "/").split("/");
|
|
@@ -398,4 +399,4 @@ function unwrapHooks(settings, cliBin) {
|
|
|
398
399
|
return { next, changed, unwrapped };
|
|
399
400
|
}
|
|
400
401
|
|
|
401
|
-
export { AUTO_WRAP_EVENTS, REGISTERED_EVENTS, SettingsParseError, cliBinResolvable, cliCommand, decodeWrappedCommand, encodeWrappedCommand, isOurHookCommand, isOurHookCommandFor, isOurStatuslineSlot, isWrapped, listHookCandidates, mergeHooks, mergeStatusline, ourCommandBins, ourDirectScriptBins, parseLifecycleHookCommand, readSettings, removeHooks, removeStatusline, repointWrappedHooks, settingsPath, statuslineCommand, statuslineWrappedOriginal, unwrapHooks, wrapHooks, wrappedOriginalCommand, writeSettings };
|
|
402
|
+
export { AUTO_WRAP_EVENTS, PORTABLE_BIN, REGISTERED_EVENTS, SettingsParseError, cliBinResolvable, cliCommand, decodeWrappedCommand, encodeWrappedCommand, isOurHookCommand, isOurHookCommandFor, isOurStatuslineSlot, isWrapped, listHookCandidates, mergeHooks, mergeStatusline, ourCommandBins, ourDirectScriptBins, parseLifecycleHookCommand, readSettings, removeHooks, removeStatusline, repointWrappedHooks, settingsPath, statuslineCommand, statuslineWrappedOriginal, unwrapHooks, wrapHooks, wrappedOriginalCommand, writeSettings };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { runnerImageVersion } from './chunk-665QWBNW.js';
|
|
4
|
-
import { readDefaultBranchHead, cloneRepository, buildRepositoryImage } from './chunk-
|
|
4
|
+
import { readDefaultBranchHead, cloneRepository, buildRepositoryImage } from './chunk-7LVF4E5V.js';
|
|
5
5
|
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
6
6
|
import { currentCliBuild } from './chunk-OGFGZQA3.js';
|
|
7
|
-
import { createDockerHost, builderSpec, runnerLabelValue, RUNNER_LABEL, BUILD_LABEL, prepareRunArgs, containerRunArgs, HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, containerExecArgs, childEnvironment, JUDGE_DIR, JUDGE_REPORT, MAX_REPORT_BYTES, spawnRun } from './chunk-
|
|
8
|
-
import { FIRECRACKER_VERSION, hostHelperPinned, firecrackerArch, MICROVM_ARCHES, RecipeError, DOCKER_FEATURE, CLAUDE_CODE_VERSION, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, JAILER_BINARY_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, GUEST_ASSETS_VERSION, DEFAULT_BASE_IMAGE } from './chunk-
|
|
9
|
-
import { execCapture } from './chunk-
|
|
10
|
-
import { GUEST_CID } from './chunk-
|
|
11
|
-
import { describeCallFailure, controlPlaneTokenFailure, refusalCode, resolveGoverningSource, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, shimScript } from './chunk-
|
|
12
|
-
import { WorkCommandError } from './chunk-
|
|
7
|
+
import { createDockerHost, builderSpec, runnerLabelValue, RUNNER_LABEL, BUILD_LABEL, prepareRunArgs, containerRunArgs, HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, containerExecArgs, childEnvironment, JUDGE_DIR, JUDGE_REPORT, MAX_REPORT_BYTES, spawnRun } from './chunk-ZLEXMZFW.js';
|
|
8
|
+
import { FIRECRACKER_VERSION, hostHelperPinned, firecrackerArch, MICROVM_ARCHES, RecipeError, DOCKER_FEATURE, CLAUDE_CODE_VERSION, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, JAILER_BINARY_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, GUEST_ASSETS_VERSION, DEFAULT_BASE_IMAGE } from './chunk-TSW4DGV2.js';
|
|
9
|
+
import { execCapture } from './chunk-MXTN35XN.js';
|
|
10
|
+
import { GUEST_CID } from './chunk-XLC7KEUV.js';
|
|
11
|
+
import { describeCallFailure, controlPlaneTokenFailure, refusalCode, resolveGoverningSource, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, shimScript } from './chunk-J7BXZLSO.js';
|
|
12
|
+
import { WorkCommandError } from './chunk-UKCNOAO6.js';
|
|
13
13
|
import { hostAllowed } from './chunk-UXYLWVTQ.js';
|
|
14
14
|
import { parseDuKilobytes } from './chunk-7RQ73DLO.js';
|
|
15
15
|
import { sharedSkillNames, skillConflictMessage } from './chunk-VPEGE3QZ.js';
|
|
@@ -196,8 +196,8 @@ function ask(socketPath, request, timeoutMs) {
|
|
|
196
196
|
function helperClient(socketPath, options = {}) {
|
|
197
197
|
const REQUEST_TIMEOUT_MS = options.requestTimeoutMs ?? DEFAULT_REQUEST_TIMEOUT_MS;
|
|
198
198
|
return {
|
|
199
|
-
async start({ build, kind }) {
|
|
200
|
-
const reply = await ask(socketPath, { v: 1, op: "start", build, kind }, START_TIMEOUT_MS);
|
|
199
|
+
async start({ build, kind, timeLimitMinutes }) {
|
|
200
|
+
const reply = await ask(socketPath, { v: 1, op: "start", build, kind, timeLimitMinutes }, START_TIMEOUT_MS);
|
|
201
201
|
return { unit: String(reply.unit), chroot: String(reply.chroot), vsock: String(reply.vsock) };
|
|
202
202
|
},
|
|
203
203
|
async stop(build) {
|
|
@@ -412,11 +412,14 @@ function leaseExpiresAtMs(job) {
|
|
|
412
412
|
const base = Date.parse(job.lastRenewAt ?? job.startedAt);
|
|
413
413
|
return (Number.isFinite(base) ? base : Date.now()) + LEASE_SECONDS * 1e3;
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function leaseTimeLeftMs(job, nowMs) {
|
|
416
|
+
return Math.max(0, leaseExpiresAtMs(job) - nowMs);
|
|
417
|
+
}
|
|
418
|
+
function createLeaseChannel(valueMs) {
|
|
416
419
|
const open = /* @__PURE__ */ new Set();
|
|
417
420
|
let stopped = false;
|
|
418
421
|
const write = (stream) => {
|
|
419
|
-
if (!stopped && !stream.destroyed && stream.writable) stream.write(`${Math.floor(
|
|
422
|
+
if (!stopped && !stream.destroyed && stream.writable) stream.write(`${Math.floor(valueMs())}
|
|
420
423
|
`);
|
|
421
424
|
};
|
|
422
425
|
return {
|
|
@@ -829,6 +832,7 @@ function machineConfig(limits2, paths) {
|
|
|
829
832
|
"rootfstype=ext4",
|
|
830
833
|
`init=${INIT}`,
|
|
831
834
|
...paths.relayPorts.length === 0 ? [] : [`outerlayer.relay=${paths.relayPorts.join(",")}`],
|
|
835
|
+
...paths.leasePort === void 0 ? [] : [`outerlayer.lease=${paths.leasePort}`],
|
|
832
836
|
...paths.docker === true ? ["outerlayer.docker=1"] : []
|
|
833
837
|
];
|
|
834
838
|
return {
|
|
@@ -3311,4 +3315,4 @@ async function startCheckContainer(input) {
|
|
|
3311
3315
|
};
|
|
3312
3316
|
}
|
|
3313
3317
|
|
|
3314
|
-
export { ADDED_USER, AgentUserError, AssetError, DeliveryFailure, EVAL_INPUT_NAME, GH_CONFIG_YML, HelperRefusal, LEASE_SECONDS, MIN_ENGINE_MAJOR, cleanupContainer, containerCommandExec, containerJudgeEnvironment, containerSenderCommand, copyJudgeTree, copyTranscripts, copyTranscriptsFromContainer, createBuildDisk, createContainerRuntime, deleteBuildDisk, deliverContainerHooks, ensureFirecrackerAndJailer, ensureRootfs, ensureTunnel, filesAreCopied, ghHostsYml, gitRemoteFor, helperFirecrackerNote, helperSocketPath, isLiteralAddress, keepGhConfigCurrent, leaseExpiresAtMs, lifecycleFailureReason, lifecycleSteps, machineConfig, measureDisk, obtainImage, outOfMemoryReason, parseCpuList, prepareBranch, probeHelper, provisionContainer, resolveAgentUser, runBuildSteps, senderAliveScript, senderSignalScript, setUpRunnerCgroup, shellQuote, signalInContainer, startCheckContainer, startServicesFor, stopContainer, syncInContainer, writeEvalInput };
|
|
3318
|
+
export { ADDED_USER, AgentUserError, AssetError, DeliveryFailure, EVAL_INPUT_NAME, GH_CONFIG_YML, HelperRefusal, LEASE_SECONDS, MIN_ENGINE_MAJOR, cleanupContainer, containerCommandExec, containerJudgeEnvironment, containerSenderCommand, copyJudgeTree, copyTranscripts, copyTranscriptsFromContainer, createBuildDisk, createContainerRuntime, createLeaseChannel, deleteBuildDisk, deliverContainerHooks, ensureFirecrackerAndJailer, ensureRootfs, ensureTunnel, filesAreCopied, ghHostsYml, gitRemoteFor, helperFirecrackerNote, helperSocketPath, isLiteralAddress, keepGhConfigCurrent, leaseExpiresAtMs, leaseTimeLeftMs, lifecycleFailureReason, lifecycleSteps, machineConfig, measureDisk, obtainImage, outOfMemoryReason, parseCpuList, prepareBranch, probeHelper, provisionContainer, resolveAgentUser, runBuildSteps, senderAliveScript, senderSignalScript, setUpRunnerCgroup, shellQuote, signalInContainer, startCheckContainer, startServicesFor, stopContainer, syncInContainer, writeEvalInput };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { detectMachine, supportsContainerBuilds, reachDockerStep, describeMachineDocker, supportsMicroVmBuilds } from './chunk-
|
|
4
|
-
import { MIN_ENGINE_MAJOR } from './chunk-
|
|
3
|
+
import { detectMachine, supportsContainerBuilds, reachDockerStep, describeMachineDocker, supportsMicroVmBuilds } from './chunk-364XDGOK.js';
|
|
4
|
+
import { MIN_ENGINE_MAJOR } from './chunk-VHVFU6QU.js';
|
|
5
5
|
import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-5PMQDQFV.js';
|
|
6
6
|
import { runnerCredentialProblem } from './chunk-JWRX5ZTT.js';
|
|
7
7
|
import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-L4CW6LZQ.js';
|