@outerlayer/cli 0.33.0-next.20261023002325 → 0.33.0-next.20261023030517
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 +9 -3
- package/dist/{agent-setup-55ZDEXCS.js → agent-setup-APFM4MZ4.js} +10 -10
- package/dist/{artifact-link-cmd-6FF2Y6QI.js → artifact-link-cmd-IHHMU4EA.js} +2 -2
- package/dist/{build-G4GUF6LT.js → build-SEAQVLD5.js} +2 -2
- package/dist/build-disk-55M4ZMDX.js +16 -0
- package/dist/build-info.json +1 -1
- package/dist/{builder-3CUKTVSY.js → builder-DQZCPB7J.js} +4 -5
- package/dist/{check-64FD5G3X.js → check-AEMFDR55.js} +30 -32
- package/dist/{chunk-EUVE2EAE.js → chunk-2WZ66FXA.js} +3 -3
- package/dist/{chunk-BJQ25STI.js → chunk-35DSTT37.js} +4 -4
- package/dist/{chunk-Q2CMEQV7.js → chunk-4NKHOCTF.js} +3 -3
- package/dist/{chunk-VT4TTJPG.js → chunk-5FSVA3CO.js} +5 -5
- package/dist/{chunk-CANYZTD5.js → chunk-67KCGRKA.js} +44 -17
- package/dist/{chunk-HXA5GIHK.js → chunk-6ANIBEQ6.js} +6 -6
- package/dist/{chunk-AVTI3FL5.js → chunk-6ZLI652Y.js} +1 -1
- package/dist/{chunk-LYE3KB6L.js → chunk-7HZH5D7H.js} +2 -2
- package/dist/{chunk-6Z4SZHV2.js → chunk-A5FFANL7.js} +5 -5
- package/dist/{chunk-DGI66PGY.js → chunk-AXIK6F52.js} +39 -279
- package/dist/{chunk-QFQC5K4J.js → chunk-B6WW6AKO.js} +33 -21
- package/dist/{chunk-ULBNTSAD.js → chunk-C66Q2CLW.js} +2 -2
- package/dist/{chunk-UIUGTW5C.js → chunk-C7WGCI77.js} +2 -2
- package/dist/{chunk-B2JURP6A.js → chunk-CCOU4NXE.js} +2 -2
- package/dist/{chunk-SVDOA4W2.js → chunk-DHUHQPRQ.js} +7 -7
- package/dist/{chunk-EWVYQLD3.js → chunk-E4F7YE7P.js} +1 -1
- package/dist/chunk-ER6KQCVJ.js +18 -0
- package/dist/{chunk-JRZCRIEO.js → chunk-GFTWZSOW.js} +2887 -2567
- package/dist/{chunk-AU346ENF.js → chunk-HUBRTT2C.js} +4 -4
- package/dist/{chunk-QPWFVE3X.js → chunk-JB4R5IFJ.js} +2 -2
- package/dist/chunk-LHKWWEQZ.js +179 -0
- package/dist/{chunk-G63KT5I5.js → chunk-M24H6JQW.js} +1 -1
- package/dist/{chunk-XL2XWWU7.js → chunk-M3RYZRMH.js} +3 -3
- package/dist/{chunk-TGHBOXKJ.js → chunk-NE63JADS.js} +2 -2
- package/dist/{chunk-3DCB3GOV.js → chunk-ONUACB5C.js} +6 -4
- package/dist/{chunk-JHTJPQSL.js → chunk-PILHDNHX.js} +4 -4
- package/dist/{chunk-HJYBWJAS.js → chunk-PJI5D2XT.js} +2 -2
- package/dist/{chunk-LJG6EMLJ.js → chunk-PNIFQX73.js} +1 -1
- package/dist/{chunk-GFVDC5S3.js → chunk-QKEOAQ2W.js} +35 -4
- package/dist/{chunk-5DNCFOXA.js → chunk-QQXNS4G2.js} +1 -1
- package/dist/{chunk-OOCAF3ID.js → chunk-RLAKWXDK.js} +1 -1
- package/dist/{chunk-2N67C6IV.js → chunk-T4S2DVOA.js} +5 -5
- package/dist/{chunk-GFYEMCPP.js → chunk-T4TT76GG.js} +1 -1
- package/dist/{chunk-BKADJZ7F.js → chunk-UAJYWZ2F.js} +3 -3
- package/dist/{chunk-YERR22SY.js → chunk-UHFU3CBN.js} +1 -1
- package/dist/{chunk-E6CO3MJE.js → chunk-V7Q5OKN7.js} +12 -1
- package/dist/{chunk-2WMZPJVE.js → chunk-VJGQEASF.js} +4 -4
- package/dist/{chunk-NSPRS7WK.js → chunk-X37GC7DM.js} +1 -1
- package/dist/{chunk-LJUIG5K4.js → chunk-X62C7V4B.js} +13 -13
- package/dist/{chunk-DY7Y7UT4.js → chunk-XMPE5TT4.js} +2 -2
- package/dist/{chunk-JPG43G6Y.js → chunk-YXHKCHWG.js} +1 -1
- package/dist/{chunk-T5REPMNL.js → chunk-Z4GLZTDF.js} +2 -2
- package/dist/{claude-launcher-NTYHJUJM.js → claude-launcher-B55NWRH5.js} +5 -5
- package/dist/{cli-WKRURGHC.js → cli-5YT5EL2R.js} +147 -104
- package/dist/{command-WG54AUHK.js → command-DYLRDCGC.js} +21 -22
- package/dist/{config-LZSFW2O3.js → config-RRY7DIJG.js} +9 -2
- package/dist/{connect-cmd-P5GASVAF.js → connect-cmd-7C6W2SEP.js} +8 -8
- package/dist/{container-start-DQKFQ3CL.js → container-start-F7PBMTAL.js} +22 -23
- package/dist/{context-cleanup-BX5Y3AFL.js → context-cleanup-EKTPKJJT.js} +3 -3
- package/dist/{context-show-cmd-3EPJ7CJC.js → context-show-cmd-I5JC7EFH.js} +9 -9
- package/dist/{control-plane-launch-A3YCHQNQ.js → control-plane-launch-NOKM6CBH.js} +6 -6
- package/dist/{dist-ACTRIBVW.js → dist-LLYL5UCV.js} +2 -2
- package/dist/{docker-4ERXWTRW.js → docker-W7WWFZ3Q.js} +4 -5
- package/dist/{doctor-GRCEYJXA.js → doctor-LYOFFCQS.js} +29 -34
- package/dist/{emit-artifact-cmd-FDPJKGOO.js → emit-artifact-cmd-RO34UG7A.js} +13 -13
- package/dist/{emit-cmd-OX6LYS6I.js → emit-cmd-GY7Z26DY.js} +6 -6
- package/dist/{emit-criteria-cmd-3SVGCMJN.js → emit-criteria-cmd-Y36QCPAM.js} +10 -10
- package/dist/{emit-demo-cmd-JSVI56WY.js → emit-demo-cmd-YMWVF5U4.js} +105 -35
- package/dist/{emit-finding-cmd-TLJWBGQE.js → emit-finding-cmd-MH3ZWUNV.js} +10 -10
- package/dist/{emit-result-cmd-CJNVDV5V.js → emit-result-cmd-ZARZZZ3Y.js} +12 -12
- package/dist/{emit-step-cmd-347CZO7Y.js → emit-step-cmd-A6HQJDBY.js} +10 -10
- package/dist/{findings-cmd-LHTYEHYB.js → findings-cmd-OLLBWJXJ.js} +10 -10
- package/dist/{fleet-readiness-KGR5AC2J.js → fleet-readiness-VB5QSFSY.js} +8 -8
- package/dist/{governing-source-JZQZUTMA.js → governing-source-ZX7VXTOA.js} +13 -13
- package/dist/{hook-fast-6WDMNZG5.js → hook-fast-4RYMBFPO.js} +1 -1
- package/dist/index.js +4 -4
- package/dist/{init-OKJAI77M.js → init-BQCGL7UD.js} +21 -22
- package/dist/{init-WNO4NAO7.js → init-NCCMB2UE.js} +21 -22
- package/dist/{init-cmd-PFW4XTG7.js → init-cmd-OW2L5HTI.js} +18 -18
- package/dist/{init-update-X7YLZL6H.js → init-update-7LUMOECE.js} +17 -17
- package/dist/{install-GQUCHIGE.js → install-5BQ3TFBT.js} +9 -3
- package/dist/{layout-JGF7MJHG.js → layout-RGVPCX7Y.js} +4 -4
- package/dist/{login-browser-3RIZQJY2.js → login-browser-BC2Z5QKG.js} +2 -2
- package/dist/{loop-2SITCQ6H.js → loop-BU634Y6A.js} +30 -32
- package/dist/{machine-YHBCNRUO.js → machine-RI4KHRYP.js} +21 -22
- package/dist/{machine-skills-AGERT2HN.js → machine-skills-CS5HAQHF.js} +4 -4
- package/dist/{runner-env-QYE7KZFP.js → runner-env-QSLLOFNF.js} +10 -4
- package/dist/{runner-identity-FIHOECSH.js → runner-identity-DQAXW4DL.js} +4 -5
- package/dist/{runner-key-YUKU2MWK.js → runner-key-UWL475RU.js} +21 -22
- package/dist/{session-sender-7B3ZDWMC.js → session-sender-OGDUJ2KK.js} +13 -13
- package/dist/{spec-cmd-Q26NE22H.js → spec-cmd-WB4UOFPG.js} +11 -11
- package/dist/{starter-pack-UBEC5LTE.js → starter-pack-XHATFTO3.js} +5 -5
- package/dist/{status-VBQJMFEX.js → status-GFZFND6L.js} +26 -27
- package/dist/{sync-cmd-SSUYTMLJ.js → sync-cmd-GPZD2C45.js} +12 -12
- package/dist/{watch-L5NCO46E.js → watch-5I3GURXY.js} +12 -12
- package/dist/{work-claim-cmd-MFND6Z4S.js → work-claim-cmd-J52UVCAF.js} +17 -14
- package/dist/{work-cmd-W7WEHMQJ.js → work-cmd-PQZ5RYDB.js} +10 -10
- package/dist/{work-comment-cmd-SSUOGVDD.js → work-comment-cmd-WI6B3IOS.js} +10 -10
- package/dist/work-demo-cmd-3NDGSQKJ.js +62 -0
- package/dist/{work-logs-cmd-WPMWMDX6.js → work-logs-cmd-QCYZ5X5A.js} +10 -10
- package/dist/{work-open-pr-cmd-NO5YLOXD.js → work-open-pr-cmd-BRDF3ZKL.js} +11 -11
- package/dist/{work-pr-cmd-37B5KECR.js → work-pr-cmd-WY2TBAKW.js} +10 -10
- package/dist/work-proofs-cmd-R25HT6WP.js +111 -0
- package/dist/{work-stop-cmd-3BJLXUJ3.js → work-stop-cmd-C52JPZ4E.js} +10 -10
- package/package.json +1 -1
- package/skill-pack/maintained/outerlayer-amend/SKILL.md +36 -34
- package/skill-pack/maintained/outerlayer-amend/scripts/rerecord-demo.mjs +187 -0
- package/skill-pack/maintained/outerlayer-build/SKILL.md +7 -2
- package/skill-pack/maintained/outerlayer-build/references/agent-briefs.md +11 -2
- package/skill-pack/maintained/outerlayer-build/references/evidence.md +8 -0
- package/skill-pack/maintained/outerlayer-build/references/release.md +3 -2
- package/skill-pack/maintained/outerlayer-evidence/SKILL.md +6 -4
- package/dist/build-disk-3GL3KKEB.js +0 -18
- package/dist/chunk-XWFSAOC7.js +0 -111
- package/dist/chunk-YJLHUKYS.js +0 -38
- package/dist/chunk-YYYRBYWG.js +0 -32
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { launchRefusalForSession } from './chunk-ESVW4MJY.js';
|
|
4
4
|
import { detectActiveSession } from './chunk-IP7BIBXJ.js';
|
|
5
|
-
import { autoConnect } from './chunk-
|
|
6
|
-
import { acquireSpoolLockAt } from './chunk-
|
|
7
|
-
import { resolveRepoIdentity } from './chunk-
|
|
5
|
+
import { autoConnect } from './chunk-CCOU4NXE.js';
|
|
6
|
+
import { acquireSpoolLockAt } from './chunk-E4F7YE7P.js';
|
|
7
|
+
import { resolveRepoIdentity } from './chunk-QQXNS4G2.js';
|
|
8
8
|
import { C } from './chunk-ANPNT6PM.js';
|
|
9
9
|
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-6RKD7YZ6.js';
|
|
10
10
|
import { launchedItemForSession } from './chunk-T2Q7ISPE.js';
|
|
11
11
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
12
|
-
import { StepNameSchema, StepBodySchema } from './chunk-
|
|
12
|
+
import { StepNameSchema, StepBodySchema } from './chunk-V7Q5OKN7.js';
|
|
13
13
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
14
14
|
import { randomUUID } from 'crypto';
|
|
15
15
|
import { readFileSync, existsSync, mkdirSync, writeFileSync, renameSync, appendFileSync } from 'fs';
|
|
@@ -680,11 +680,11 @@ async function missingControlPlane(cwd, sessionId, home, env) {
|
|
|
680
680
|
const dirs = findGitDirs(cwd);
|
|
681
681
|
if (dirs === void 0) return void 0;
|
|
682
682
|
if (existsSync(join(dirs.gitCommonDir, "outerlayer", "materialized.json")) || hasExcludeBlock(dirs.gitCommonDir)) {
|
|
683
|
-
const { cleanupEarlierCopies } = await import('./context-cleanup-
|
|
683
|
+
const { cleanupEarlierCopies } = await import('./context-cleanup-EKTPKJJT.js');
|
|
684
684
|
cleanupEarlierCopies(dirs);
|
|
685
685
|
}
|
|
686
686
|
if (!contextPossiblyGoverned(cwd, home)) return void 0;
|
|
687
|
-
const { governanceOf } = await import('./control-plane-launch-
|
|
687
|
+
const { governanceOf } = await import('./control-plane-launch-NOKM6CBH.js');
|
|
688
688
|
if (await governanceOf({ cwd, env, home }) !== "governed") return void 0;
|
|
689
689
|
recordMissingContext(dirs, sessionId, home);
|
|
690
690
|
const launcher = `${cliInvocation()} claude`;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { parseSize, BUILD_LABEL, RUNNER_LABEL, runnerLabelValue } from './chunk-QKEOAQ2W.js';
|
|
4
|
+
import { buildsDir, rootfsDir, runnerDir, imagesDir, builderCacheDiskPath } from './chunk-PA6CK6WQ.js';
|
|
5
|
+
import { spawnSync } from 'child_process';
|
|
6
|
+
import { statfsSync, statSync, existsSync, readdirSync } from 'fs';
|
|
7
|
+
import { dirname, join } from 'path';
|
|
8
|
+
|
|
9
|
+
createRequire(import.meta.url);
|
|
10
|
+
function freeBytes(path, statfs = statfsSync) {
|
|
11
|
+
let at = path;
|
|
12
|
+
for (; ; ) {
|
|
13
|
+
try {
|
|
14
|
+
const stats = statfs(at);
|
|
15
|
+
return Number(stats.bavail) * Number(stats.bsize);
|
|
16
|
+
} catch (err) {
|
|
17
|
+
if (err.code !== "ENOENT") return void 0;
|
|
18
|
+
const parent = dirname(at);
|
|
19
|
+
if (parent === at) return void 0;
|
|
20
|
+
at = parent;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
var UNITS = ["B", "KB", "MB", "GB", "TB"];
|
|
25
|
+
function formatBytes(bytes) {
|
|
26
|
+
let value = Math.max(0, bytes);
|
|
27
|
+
let unit = 0;
|
|
28
|
+
while (value >= 1024 && unit < UNITS.length - 1) {
|
|
29
|
+
value /= 1024;
|
|
30
|
+
unit++;
|
|
31
|
+
}
|
|
32
|
+
return unit === 0 ? `${Math.round(value)} B` : `${value.toFixed(1)} ${UNITS[unit]}`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// src/runner/build-disk.ts
|
|
36
|
+
var DEFAULT_CACHE_DISK = "40g";
|
|
37
|
+
function checkDiskFit(input) {
|
|
38
|
+
const limit = parseSize(input.buildDisk);
|
|
39
|
+
if (limit === void 0) return { slots: input.concurrency, fits: true, oneBuildBytes: 0, neededBytes: 0, availableBytes: 0, reservedBytes: 0, message: "" };
|
|
40
|
+
const cacheLimit = parseSize(input.cacheDisk ?? DEFAULT_CACHE_DISK) ?? parseSize(DEFAULT_CACHE_DISK);
|
|
41
|
+
const { freeBytes: free, heldBytes: held, rootDiskBytes: root } = input.facts;
|
|
42
|
+
const reservedBytes = (input.facts.cacheBytes ?? []).reduce((sum, bytes) => sum + Math.max(0, cacheLimit - bytes), 0);
|
|
43
|
+
const oneBuildBytes = limit + root;
|
|
44
|
+
const neededBytes = input.concurrency * oneBuildBytes;
|
|
45
|
+
const availableBytes = Math.max(0, free + held - reservedBytes);
|
|
46
|
+
const slots = Math.min(input.concurrency, Math.floor(availableBytes / oneBuildBytes));
|
|
47
|
+
const oneBuild = root > 0 ? `runner.build.disk ${input.buildDisk} plus a root disk of ${formatBytes(root)}` : `runner.build.disk ${input.buildDisk}`;
|
|
48
|
+
const caches = reservedBytes > 0 ? `, less ${formatBytes(reservedBytes)} that the image-build caches can still grow to (runner.build.cacheDisk ${input.cacheDisk ?? DEFAULT_CACHE_DISK})` : "";
|
|
49
|
+
return {
|
|
50
|
+
slots,
|
|
51
|
+
fits: slots >= input.concurrency,
|
|
52
|
+
oneBuildBytes,
|
|
53
|
+
neededBytes,
|
|
54
|
+
availableBytes,
|
|
55
|
+
reservedBytes,
|
|
56
|
+
message: `${slots} of ${input.concurrency} ${input.concurrency === 1 ? "build" : "builds"} fit: one build can hold ${formatBytes(oneBuildBytes)} (${oneBuild}), runner.concurrency ${input.concurrency} needs ${formatBytes(neededBytes)}, and ${formatBytes(availableBytes)} is counted (${formatBytes(free)} free plus ${formatBytes(held)} held by running builds${caches})`
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function allocatedBytes(path) {
|
|
60
|
+
try {
|
|
61
|
+
return statSync(path).blocks * 512;
|
|
62
|
+
} catch {
|
|
63
|
+
return 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function listDir(path) {
|
|
67
|
+
try {
|
|
68
|
+
return readdirSync(path);
|
|
69
|
+
} catch {
|
|
70
|
+
return void 0;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function logUnreadable(path) {
|
|
74
|
+
process.stderr.write(`outerlayer: cannot list ${path}, so the disk check does not count the image-build cache disks in it
|
|
75
|
+
`);
|
|
76
|
+
}
|
|
77
|
+
function isBuilderDir(dir) {
|
|
78
|
+
return existsSync(join(dir, "image-builder.json"));
|
|
79
|
+
}
|
|
80
|
+
function cacheDiskBytes(configPath, builds, buildEntries) {
|
|
81
|
+
const cache = [];
|
|
82
|
+
const images = imagesDir(configPath);
|
|
83
|
+
if (existsSync(images)) {
|
|
84
|
+
const owners = listDir(images);
|
|
85
|
+
if (owners === void 0) {
|
|
86
|
+
logUnreadable(images);
|
|
87
|
+
return void 0;
|
|
88
|
+
}
|
|
89
|
+
for (const owner of owners) {
|
|
90
|
+
const names = listDir(join(images, owner));
|
|
91
|
+
if (names === void 0) logUnreadable(join(images, owner));
|
|
92
|
+
for (const name of names ?? []) {
|
|
93
|
+
const path = builderCacheDiskPath(configPath, owner, name);
|
|
94
|
+
if (existsSync(path)) cache.push(allocatedBytes(path));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
for (const entry of buildEntries) {
|
|
99
|
+
if (isBuilderDir(join(builds, entry))) cache.push(allocatedBytes(join(builds, entry, "build.ext4")));
|
|
100
|
+
}
|
|
101
|
+
return cache;
|
|
102
|
+
}
|
|
103
|
+
function microVmFacts(configPath) {
|
|
104
|
+
const builds = buildsDir(configPath);
|
|
105
|
+
const free = freeBytes(builds);
|
|
106
|
+
if (free === void 0) return void 0;
|
|
107
|
+
let held = 0;
|
|
108
|
+
let entries = [];
|
|
109
|
+
if (existsSync(builds)) {
|
|
110
|
+
const listed = listDir(builds);
|
|
111
|
+
if (listed === void 0) return void 0;
|
|
112
|
+
entries = listed;
|
|
113
|
+
for (const entry of entries) {
|
|
114
|
+
if (!isBuilderDir(join(builds, entry))) held += allocatedBytes(join(builds, entry, "build.ext4"));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
const cacheBytes = cacheDiskBytes(configPath, builds, entries);
|
|
118
|
+
if (cacheBytes === void 0) return void 0;
|
|
119
|
+
let root = 0;
|
|
120
|
+
const roots = rootfsDir(runnerDir(configPath));
|
|
121
|
+
if (existsSync(roots)) {
|
|
122
|
+
const rootEntries = listDir(roots);
|
|
123
|
+
if (rootEntries === void 0) return void 0;
|
|
124
|
+
for (const entry of rootEntries) {
|
|
125
|
+
if (!entry.endsWith(".ext4")) continue;
|
|
126
|
+
try {
|
|
127
|
+
root = Math.max(root, statSync(join(roots, entry)).size);
|
|
128
|
+
} catch {
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return { freeBytes: free, heldBytes: held, rootDiskBytes: root, cacheBytes };
|
|
133
|
+
}
|
|
134
|
+
var DOCKER_TIMEOUT_MS = 1e4;
|
|
135
|
+
var DEFAULT_BUILD_DISK = "40g";
|
|
136
|
+
var DOCKER_CACHE_MS = 6e4;
|
|
137
|
+
var DEFAULT_VOLUMES_DIR = "/var/lib/docker/volumes";
|
|
138
|
+
function runDocker(args, spawn = spawnSync) {
|
|
139
|
+
const result = spawn("docker", args, { encoding: "utf8", timeout: DOCKER_TIMEOUT_MS });
|
|
140
|
+
return result.status === 0 ? result.stdout : void 0;
|
|
141
|
+
}
|
|
142
|
+
var SIZE_UNITS = { b: 1, kb: 1e3, mb: 1e6, gb: 1e9, tb: 1e12 };
|
|
143
|
+
function volumeBytes(dfOutput, names) {
|
|
144
|
+
let total = 0;
|
|
145
|
+
for (const line of dfOutput.split("\n")) {
|
|
146
|
+
const [name, , size] = line.trim().split(/\s+/);
|
|
147
|
+
if (name === void 0 || size === void 0 || !names.has(name)) continue;
|
|
148
|
+
const match = /^([\d.]+)([A-Za-z]+)$/.exec(size);
|
|
149
|
+
const unit = match === null ? void 0 : SIZE_UNITS[match[2].toLowerCase()];
|
|
150
|
+
if (match !== null && unit !== void 0) total += Number(match[1]) * unit;
|
|
151
|
+
}
|
|
152
|
+
return total;
|
|
153
|
+
}
|
|
154
|
+
function containerFacts(cache, configPath, docker, now) {
|
|
155
|
+
if (cache.reading === void 0 || cache.reading.configPath !== configPath || now - cache.reading.at > DOCKER_CACHE_MS) {
|
|
156
|
+
const root = docker(["info", "--format", "{{.DockerRootDir}}"])?.trim();
|
|
157
|
+
const listed = docker(["volume", "ls", "--quiet", "--filter", `label=${BUILD_LABEL}`, "--filter", `label=${RUNNER_LABEL}=${runnerLabelValue(configPath)}`]);
|
|
158
|
+
const names = new Set((listed ?? "").split("\n").map((n) => n.trim()).filter((n) => n !== ""));
|
|
159
|
+
const df = listed === void 0 || names.size === 0 ? void 0 : docker(["system", "df", "-v"]);
|
|
160
|
+
const held = listed === void 0 ? void 0 : names.size === 0 ? 0 : df === void 0 ? void 0 : volumeBytes(df, names);
|
|
161
|
+
cache.reading = {
|
|
162
|
+
at: now,
|
|
163
|
+
configPath,
|
|
164
|
+
held,
|
|
165
|
+
volumes: root === void 0 || root === "" ? DEFAULT_VOLUMES_DIR : join(root, "volumes")
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
if (cache.reading.held === void 0) return void 0;
|
|
169
|
+
const free = freeBytes(cache.reading.volumes);
|
|
170
|
+
return free === void 0 ? void 0 : { freeBytes: free, heldBytes: cache.reading.held, rootDiskBytes: 0 };
|
|
171
|
+
}
|
|
172
|
+
function realBuildDiskProbe(deps = {}) {
|
|
173
|
+
const cache = {};
|
|
174
|
+
const docker = deps.docker ?? ((args) => runDocker(args));
|
|
175
|
+
const now = deps.now ?? Date.now;
|
|
176
|
+
return (kind, configPath) => kind === "vm" ? microVmFacts(configPath) : containerFacts(cache, configPath, docker, now());
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export { DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK, DOCKER_CACHE_MS, allocatedBytes, checkDiskFit, formatBytes, freeBytes, realBuildDiskProbe, runDocker, volumeBytes };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
|
|
4
4
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
5
|
-
import { splitRawFile } from './chunk-
|
|
5
|
+
import { splitRawFile } from './chunk-PNIFQX73.js';
|
|
6
6
|
import { existsSync, readFileSync, mkdirSync, writeFileSync, readdirSync } from 'fs';
|
|
7
7
|
import { join, dirname } from 'path';
|
|
8
8
|
import { fileURLToPath } from 'url';
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { launchRefusalForSession } from './chunk-ESVW4MJY.js';
|
|
4
4
|
import { detectActiveSession } from './chunk-IP7BIBXJ.js';
|
|
5
|
-
import { autoConnect } from './chunk-
|
|
6
|
-
import { resolveRepoIdentity } from './chunk-
|
|
5
|
+
import { autoConnect } from './chunk-CCOU4NXE.js';
|
|
6
|
+
import { resolveRepoIdentity } from './chunk-QQXNS4G2.js';
|
|
7
7
|
import { C } from './chunk-ANPNT6PM.js';
|
|
8
8
|
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-6RKD7YZ6.js';
|
|
9
9
|
import { launchedItemForSession } from './chunk-T2Q7ISPE.js';
|
|
10
10
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
11
|
-
import { CriteriaListSchema } from './chunk-
|
|
11
|
+
import { CriteriaListSchema } from './chunk-V7Q5OKN7.js';
|
|
12
12
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
13
13
|
import { readFileSync } from 'fs';
|
|
14
14
|
|
|
@@ -44,10 +44,10 @@ function guestAssetsPinned(arch) {
|
|
|
44
44
|
var JAILER_BINARY_SHA256 = {
|
|
45
45
|
x86_64: "65ef226e96f0ceda55ba643f445801ef2cc0ea667ef67cad8ac4f406c9c8434f"
|
|
46
46
|
};
|
|
47
|
-
var HOST_HELPER_ASSETS_VERSION = "
|
|
47
|
+
var HOST_HELPER_ASSETS_VERSION = "13";
|
|
48
48
|
var HOST_HELPER_BASE_URL = `https://github.com/outerlayerai/guest-assets/releases/download/guest-${HOST_HELPER_ASSETS_VERSION}`;
|
|
49
49
|
var HOST_HELPER_SHA256 = {
|
|
50
|
-
x86_64: "
|
|
50
|
+
x86_64: "0d6cdbce1e5a5e084726b1d1b1cc0bc208f6662fe8d10a1d7a91e8573035505f"
|
|
51
51
|
};
|
|
52
52
|
function hostHelperPinned(arch = "x86_64", hashes = HOST_HELPER_SHA256) {
|
|
53
53
|
return hashes[arch] !== "0".repeat(64);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import {
|
|
3
|
+
import { DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-LHKWWEQZ.js';
|
|
4
|
+
import { parseSize } from './chunk-QKEOAQ2W.js';
|
|
4
5
|
import { isRefusedInConfig, resolveDestinations, isReservedVariable } from './chunk-BALIE3BA.js';
|
|
5
6
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
6
7
|
import { existsSync, statSync, accessSync, constants, readFileSync } from 'fs';
|
|
@@ -72,12 +73,12 @@ var DEFAULT_IDLE_LIMIT_MINUTES = 30;
|
|
|
72
73
|
var DEFAULT_CHECK_TIME_LIMIT_MINUTES = 10;
|
|
73
74
|
var CHECKS_KEYS = ["timeLimitMinutes"];
|
|
74
75
|
var MAX_CHECK_TIME_LIMIT_MINUTES = 240;
|
|
75
|
-
var DEFAULT_BUILD = { memory: "8g", cpus: 4, pids: 4096, disk:
|
|
76
|
+
var DEFAULT_BUILD = { memory: "8g", cpus: 4, pids: 4096, disk: DEFAULT_BUILD_DISK, cacheDisk: DEFAULT_CACHE_DISK, variables: [] };
|
|
76
77
|
function imageBuildOf(config) {
|
|
77
78
|
if (builtinKind(config.hooks.provision) !== "vm") return "host";
|
|
78
79
|
return config.build?.imageBuild ?? "vm";
|
|
79
80
|
}
|
|
80
|
-
var BUILD_KEYS = ["memory", "cpus", "pids", "disk", "variables", "destinations", "allowHosts", "imageBuild"];
|
|
81
|
+
var BUILD_KEYS = ["memory", "cpus", "pids", "disk", "cacheDisk", "variables", "destinations", "allowHosts", "imageBuild"];
|
|
81
82
|
var HOUSEKEEPING_KEYS = ["jobsKeepDays", "buildCacheMax", "minFreeDisk"];
|
|
82
83
|
var DEFAULT_JOBS_KEEP_DAYS = 30;
|
|
83
84
|
var DEFAULT_BUILD_CACHE_MAX = "20g";
|
|
@@ -404,7 +405,7 @@ function resolveBuild(configPath, block) {
|
|
|
404
405
|
const near = nearestKey(key, BUILD_KEYS);
|
|
405
406
|
fail(configPath, `runner.build.${key}`, near ? `is not a key this block accepts; did you mean ${near}?` : "is not a key this block accepts");
|
|
406
407
|
}
|
|
407
|
-
for (const key of ["memory", "disk"]) {
|
|
408
|
+
for (const key of ["memory", "disk", "cacheDisk"]) {
|
|
408
409
|
const value = given[key];
|
|
409
410
|
if (value === void 0) continue;
|
|
410
411
|
if (typeof value !== "string" || parseSize(value) === void 0) fail(configPath, `runner.build.${key}`, 'must be a size such as "8g" or "512m"');
|
|
@@ -446,6 +447,7 @@ function resolveBuild(configPath, block) {
|
|
|
446
447
|
cpus: given.cpus ?? DEFAULT_BUILD.cpus,
|
|
447
448
|
pids: given.pids ?? DEFAULT_BUILD.pids,
|
|
448
449
|
disk: given.disk ?? DEFAULT_BUILD.disk,
|
|
450
|
+
cacheDisk: given.cacheDisk ?? DEFAULT_BUILD.cacheDisk,
|
|
449
451
|
variables,
|
|
450
452
|
...destinations.length === 0 ? {} : { destinations },
|
|
451
453
|
...allowHosts === void 0 ? {} : { allowHosts },
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { isAgentsMdLayout, discoverOuterlayerPaths, isForeignTree, toRepoRelative } from './chunk-
|
|
3
|
+
import { isAgentsMdLayout, discoverOuterlayerPaths, isForeignTree, toRepoRelative } from './chunk-PJI5D2XT.js';
|
|
4
4
|
import { C } from './chunk-ANPNT6PM.js';
|
|
5
|
-
import { retiredSkillPaths, removeRetiredSkills } from './chunk-
|
|
6
|
-
import { maintainedFilesForExistingSkills, loadMaintainedFiles, writeMaintainedFiles } from './chunk-
|
|
5
|
+
import { retiredSkillPaths, removeRetiredSkills } from './chunk-C7WGCI77.js';
|
|
6
|
+
import { maintainedFilesForExistingSkills, loadMaintainedFiles, writeMaintainedFiles } from './chunk-M24H6JQW.js';
|
|
7
7
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
8
|
-
import { emitTree, generatedHeaderSource, parseOuterlayerConfig, classifyTree } from './chunk-
|
|
8
|
+
import { emitTree, generatedHeaderSource, parseOuterlayerConfig, classifyTree } from './chunk-PNIFQX73.js';
|
|
9
9
|
import { existsSync, readFileSync, mkdirSync, writeFileSync, copyFileSync, unlinkSync, rmdirSync, readdirSync } from 'fs';
|
|
10
10
|
import { join, dirname } from 'path';
|
|
11
11
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE } from './chunk-
|
|
4
|
-
import { normalizePath, CONTEXT_PIN_FILENAME } from './chunk-
|
|
3
|
+
import { AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE } from './chunk-M24H6JQW.js';
|
|
4
|
+
import { normalizePath, CONTEXT_PIN_FILENAME } from './chunk-PNIFQX73.js';
|
|
5
5
|
import { existsSync, readdirSync, readFileSync, mkdirSync, writeFileSync, lstatSync, readlinkSync, symlinkSync, rmdirSync } from 'fs';
|
|
6
6
|
import { relative, sep, join } from 'path';
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RESERVED_EMIT_NAMES, ARTIFACT_KINDS, ArtifactCriterionIdSchema } from './chunk-
|
|
3
|
+
import { RESERVED_EMIT_NAMES, ARTIFACT_KINDS, ArtifactCriterionIdSchema } from './chunk-V7Q5OKN7.js';
|
|
4
4
|
import { __commonJS, __require, __toESM } from './chunk-Z5GEFMRW.js';
|
|
5
5
|
|
|
6
6
|
createRequire(import.meta.url);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { RecipeError } from './chunk-3Z3MPR55.js';
|
|
4
|
-
import { BUILDKIT_IMAGE } from './chunk-
|
|
5
|
-
import {
|
|
6
|
-
import { compareVersions } from './chunk-5DNCFOXA.js';
|
|
4
|
+
import { BUILDKIT_IMAGE } from './chunk-NE63JADS.js';
|
|
5
|
+
import { compareVersions } from './chunk-QQXNS4G2.js';
|
|
7
6
|
import { ensureHostKey } from './chunk-SOI6K5DY.js';
|
|
8
7
|
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, jobsDir } from './chunk-PA6CK6WQ.js';
|
|
9
8
|
import { CLAUDE_PORT, JOB_MOUNT, GATEWAY_PORT, GATEWAY_SOCKET, CLAUDE_SOCKET, RELAY_PORT, DESTINATION_BASE_PORT } from './chunk-BALIE3BA.js';
|
|
@@ -17,6 +16,38 @@ import { createRequire as createRequire$1 } from 'module';
|
|
|
17
16
|
import { fileURLToPath } from 'url';
|
|
18
17
|
|
|
19
18
|
createRequire(import.meta.url);
|
|
19
|
+
|
|
20
|
+
// src/runner/container/disk.ts
|
|
21
|
+
var UNITS = { "": 1, k: 1024, m: 1024 ** 2, g: 1024 ** 3 };
|
|
22
|
+
function parseSize(text) {
|
|
23
|
+
const match = /^(\d+(?:\.\d+)?)([kKmMgG]?)$/.exec(text);
|
|
24
|
+
if (match === null) return void 0;
|
|
25
|
+
const bytes = Number(match[1]) * UNITS[match[2].toLowerCase()];
|
|
26
|
+
return bytes > 0 ? bytes : void 0;
|
|
27
|
+
}
|
|
28
|
+
function exceedsDisk(usedKilobytes, limit) {
|
|
29
|
+
const bytes = parseSize(limit);
|
|
30
|
+
return usedKilobytes * 1024 > (bytes ?? Number.POSITIVE_INFINITY);
|
|
31
|
+
}
|
|
32
|
+
var TOTAL = /^(\d+)\t\/build$/;
|
|
33
|
+
var GONE = /: No such file or directory$/;
|
|
34
|
+
var LINE_MAX = 200;
|
|
35
|
+
function readDu(result) {
|
|
36
|
+
const stdoutLines = result.stdout.split("\n");
|
|
37
|
+
const totalAt = stdoutLines.map((line) => TOTAL.test(line)).lastIndexOf(true);
|
|
38
|
+
const kib = totalAt === -1 ? void 0 : Number(TOTAL.exec(stdoutLines[totalAt])[1]);
|
|
39
|
+
const lines2 = [...result.stderr.split("\n"), ...stdoutLines.filter((_, index) => index !== totalAt)].map((line) => line.trim()).filter((line) => line !== "");
|
|
40
|
+
const other = lines2.find((line) => !GONE.test(line));
|
|
41
|
+
if (kib !== void 0 && result.status === 0) return { kib };
|
|
42
|
+
if (kib !== void 0 && other === void 0 && lines2.length > 0) return { kib };
|
|
43
|
+
const detail = other === void 0 ? "" : `: ${cut(other.replace(/[\u0000-\u001f\u007f]/g, " "))}`;
|
|
44
|
+
return { ...kib === void 0 ? {} : { kib }, failure: `docker exec exited ${result.status}${detail}` };
|
|
45
|
+
}
|
|
46
|
+
function cut(line) {
|
|
47
|
+
const head = line.slice(0, LINE_MAX);
|
|
48
|
+
const last = head.charCodeAt(head.length - 1);
|
|
49
|
+
return last >= 55296 && last <= 56319 ? head.slice(0, -1) : head;
|
|
50
|
+
}
|
|
20
51
|
var PACKAGE = "@devcontainers/cli";
|
|
21
52
|
function buildRootFromDist(moduleDir = dirname(fileURLToPath(import.meta.url))) {
|
|
22
53
|
try {
|
|
@@ -732,4 +763,4 @@ function ensureBuilder(rawRun, spec, options = {}) {
|
|
|
732
763
|
);
|
|
733
764
|
}
|
|
734
765
|
|
|
735
|
-
export { BUILD_LABEL, COMMAND_DIR, HASH_ARGV, JUDGE_DIR, JUDGE_ITEMS, JUDGE_MAX_TURNS, JUDGE_PROGRAM, JUDGE_REPORT, MAX_ITEMS_BYTES, MAX_REPORT_BYTES, MIN_BUILDX_VERSION, RUNNER_LABEL, builderName, builderNameFor, builderSpec, buildxState, childEnvironment, containerExecArgs, containerRunArgs, createDockerHost, dockerIdentity, ensureBuilder, ensureFailureCount, ensureRunnerIdentity, isOutOfMemory, judgeCommand, parseProgramHash, pathLabelValue, prepareRunArgs, proxyEnvironment, readJobFile, readJobFileChecked, readRunnerIdentity, resolveDevcontainerCli, runnerLabelValue, spawnRun, trackImageBuild, withAnswerProtocol, writeJobFile };
|
|
766
|
+
export { BUILD_LABEL, COMMAND_DIR, HASH_ARGV, JUDGE_DIR, JUDGE_ITEMS, JUDGE_MAX_TURNS, JUDGE_PROGRAM, JUDGE_REPORT, MAX_ITEMS_BYTES, MAX_REPORT_BYTES, MIN_BUILDX_VERSION, RUNNER_LABEL, builderName, builderNameFor, builderSpec, buildxState, childEnvironment, containerExecArgs, containerRunArgs, createDockerHost, dockerIdentity, ensureBuilder, ensureFailureCount, ensureRunnerIdentity, exceedsDisk, isOutOfMemory, judgeCommand, parseProgramHash, parseSize, pathLabelValue, prepareRunArgs, proxyEnvironment, readDu, readJobFile, readJobFileChecked, readRunnerIdentity, resolveDevcontainerCli, runnerLabelValue, spawnRun, trackImageBuild, withAnswerProtocol, writeJobFile };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { EVENT_TYPES, isHumanUserTurn, INPUT_BAND_BOUNDARIES, parseAgentSession, SCHEMA_VERSION, SPEED_MAX_LENGTH, inputBandOf, BUCKET_MODEL_MAX_LENGTH } from './chunk-
|
|
3
|
+
import { EVENT_TYPES, isHumanUserTurn, INPUT_BAND_BOUNDARIES, parseAgentSession, SCHEMA_VERSION, SPEED_MAX_LENGTH, inputBandOf, BUCKET_MODEL_MAX_LENGTH } from './chunk-V7Q5OKN7.js';
|
|
4
4
|
import { createHash } from 'crypto';
|
|
5
5
|
import { readFileSync, readdirSync, statSync, mkdirSync, copyFileSync, renameSync, unlinkSync, writeFileSync, stat as stat$1, unwatchFile, watchFile, watch as watch$1 } from 'fs';
|
|
6
6
|
import { type, homedir } from 'os';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-
|
|
3
|
+
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-7HZH5D7H.js';
|
|
4
4
|
import { readFileSync } from 'fs';
|
|
5
5
|
|
|
6
6
|
createRequire(import.meta.url);
|
|
@@ -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-HUBRTT2C.js';
|
|
4
4
|
import { LaunchFilter } from './chunk-ESVW4MJY.js';
|
|
5
5
|
import { RepoFilter } from './chunk-TBT347UY.js';
|
|
6
|
-
import { migrateLegacyArtifactSidecars, planArtifactUpload, artifactsStatePath, sanitizeTerminal, acquireArtifactSpoolLock, artifactBlobsDir, resolveArtifactTurnIndex, isArtifactTombstoned, ARTIFACT_RETRY_MAX_AGE_MS, writeArtifactSpoolState, reclaimUnneededArtifactBlobs, neededArtifactShas } from './chunk-
|
|
7
|
-
import { setCustomScrubbers, setLocalIdentity, tailTranscript, enrichSessionRepo, scanAll, setRepoRoot, resolveRepoIdentity, sessionIdFromPath, scrubDeep, SOURCE_ADAPTERS } from './chunk-
|
|
6
|
+
import { migrateLegacyArtifactSidecars, planArtifactUpload, artifactsStatePath, sanitizeTerminal, acquireArtifactSpoolLock, artifactBlobsDir, resolveArtifactTurnIndex, isArtifactTombstoned, ARTIFACT_RETRY_MAX_AGE_MS, writeArtifactSpoolState, reclaimUnneededArtifactBlobs, neededArtifactShas } from './chunk-E4F7YE7P.js';
|
|
7
|
+
import { setCustomScrubbers, setLocalIdentity, tailTranscript, enrichSessionRepo, scanAll, setRepoRoot, resolveRepoIdentity, sessionIdFromPath, scrubDeep, SOURCE_ADAPTERS } from './chunk-QQXNS4G2.js';
|
|
8
8
|
import { C } from './chunk-ANPNT6PM.js';
|
|
9
9
|
import { cliFetch, resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-6RKD7YZ6.js';
|
|
10
10
|
import { readCloudConfig, cloudConfigPath, writeCloudConfig } from './chunk-PJDQPF5N.js';
|
|
11
11
|
import { signerFor, signRunnerRequest } from './chunk-SOI6K5DY.js';
|
|
12
|
-
import { writeSyncStatus, spoolDir } from './chunk-
|
|
12
|
+
import { writeSyncStatus, spoolDir } from './chunk-JB4R5IFJ.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';
|
|
@@ -17,7 +17,7 @@ import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
|
17
17
|
import { readLaunchSpoolState, launchStatusIsDecisive, launchedItemsBySession, launchesPath } from './chunk-T2Q7ISPE.js';
|
|
18
18
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
19
19
|
import { removeJournalHooks } from './chunk-TUSYOL2O.js';
|
|
20
|
-
import { CAPTURE_TIERS, inferArtifactKind, bannedPathsForTier, downconvertSession, isHumanUserTurn, turnCountBound, EVENT_TYPES } from './chunk-
|
|
20
|
+
import { CAPTURE_TIERS, inferArtifactKind, bannedPathsForTier, downconvertSession, isHumanUserTurn, turnCountBound, EVENT_TYPES } from './chunk-V7Q5OKN7.js';
|
|
21
21
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
22
22
|
import { dirname, basename, join, sep } from 'path';
|
|
23
23
|
import { statSync, readFileSync, readdirSync, mkdirSync, writeFileSync, renameSync, existsSync, rmSync } from 'fs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { loadMachineSkillFiles, resolvePackRoot } from './chunk-
|
|
3
|
+
import { loadMachineSkillFiles, resolvePackRoot } from './chunk-M24H6JQW.js';
|
|
4
4
|
import { MAINTAINED_SKILLS, maintainedLineVersion } from './chunk-CDDED64E.js';
|
|
5
5
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
6
6
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { launchRefusalForSession } from './chunk-ESVW4MJY.js';
|
|
4
4
|
import { detectActiveSession, transcriptPathForSession } from './chunk-IP7BIBXJ.js';
|
|
5
|
-
import { autoConnect } from './chunk-
|
|
6
|
-
import { resolveRepoIdentity, defaultProjectsDir, findTranscripts, sessionIdFromPath, scrubText } from './chunk-
|
|
5
|
+
import { autoConnect } from './chunk-CCOU4NXE.js';
|
|
6
|
+
import { resolveRepoIdentity, defaultProjectsDir, findTranscripts, sessionIdFromPath, scrubText } from './chunk-QQXNS4G2.js';
|
|
7
7
|
import { C } from './chunk-ANPNT6PM.js';
|
|
8
8
|
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-6RKD7YZ6.js';
|
|
9
9
|
import { readLatestProvenanceForSession } from './chunk-ZJSNLVCE.js';
|
|
10
10
|
import { launchedItemForSession } from './chunk-T2Q7ISPE.js';
|
|
11
11
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
12
12
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
13
|
-
import { FindingBatchSchema, FindingsResponseSchema, SAME_PROBLEM_RULES } from './chunk-
|
|
13
|
+
import { FindingBatchSchema, FindingsResponseSchema, SAME_PROBLEM_RULES } from './chunk-V7Q5OKN7.js';
|
|
14
14
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
15
15
|
import { readFileSync, existsSync } from 'fs';
|
|
16
16
|
import { join, dirname, basename } from 'path';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { DEFAULT_UNIT_NAME } from './chunk-
|
|
3
|
+
import { DEFAULT_UNIT_NAME } from './chunk-7HZH5D7H.js';
|
|
4
4
|
import { RUNNER_FILE_MODE } from './chunk-PA6CK6WQ.js';
|
|
5
5
|
import { claudeEnvPath, withoutCredentialLines } from './chunk-BALIE3BA.js';
|
|
6
6
|
import { parseRunnerEnv } from './chunk-HACGUL52.js';
|
|
@@ -22710,7 +22710,16 @@ var DemoManifestV2Schema = external_exports.strictObject({
|
|
|
22710
22710
|
...manifestFields,
|
|
22711
22711
|
chapters: external_exports.array(DemoChapterV2Schema).min(1).max(DEMO_CHAPTERS_MAX)
|
|
22712
22712
|
});
|
|
22713
|
-
var
|
|
22713
|
+
var DemoTestPathSchema = external_exports.string().min(1).max(500).refine((path) => !path.startsWith("/") && !path.split("/").includes(".."), {
|
|
22714
|
+
message: "a test path must be relative to the repository's root and stay inside it"
|
|
22715
|
+
});
|
|
22716
|
+
var DemoManifestV3Schema = external_exports.strictObject({
|
|
22717
|
+
schemaVersion: external_exports.literal(3),
|
|
22718
|
+
test: DemoTestPathSchema,
|
|
22719
|
+
...manifestFields,
|
|
22720
|
+
chapters: external_exports.array(DemoChapterV2Schema).min(1).max(DEMO_CHAPTERS_MAX)
|
|
22721
|
+
});
|
|
22722
|
+
var DemoManifestSchema = external_exports.discriminatedUnion("schemaVersion", [DemoManifestV1Schema, DemoManifestV2Schema, DemoManifestV3Schema]);
|
|
22714
22723
|
var DemoRecordChapterSchema = external_exports.strictObject({
|
|
22715
22724
|
...chapterFields,
|
|
22716
22725
|
/** The `clientArtifactId` of the chapter's clip. */
|
|
@@ -22766,6 +22775,8 @@ var DemoRecordVideoSchema = external_exports.union([
|
|
|
22766
22775
|
]);
|
|
22767
22776
|
var DemoRecordV3Schema = external_exports.strictObject({
|
|
22768
22777
|
schemaVersion: external_exports.literal(3),
|
|
22778
|
+
/** The test that recorded the demo. Absent from a demo stored before the manifest named its test. */
|
|
22779
|
+
test: DemoTestPathSchema.optional(),
|
|
22769
22780
|
video: DemoRecordVideoSchema,
|
|
22770
22781
|
chapters: external_exports.array(DemoRecordChapterV3Schema).min(1).max(DEMO_CHAPTERS_MAX)
|
|
22771
22782
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { sanitizeTerminal } from './chunk-
|
|
4
|
-
import { remoteLookupFailed } from './chunk-
|
|
5
|
-
import { isAgentsMdLayout } from './chunk-
|
|
6
|
-
import { DEFAULT_DASHBOARD } from './chunk-
|
|
3
|
+
import { sanitizeTerminal } from './chunk-E4F7YE7P.js';
|
|
4
|
+
import { remoteLookupFailed } from './chunk-QQXNS4G2.js';
|
|
5
|
+
import { isAgentsMdLayout } from './chunk-PJI5D2XT.js';
|
|
6
|
+
import { DEFAULT_DASHBOARD } from './chunk-X37GC7DM.js';
|
|
7
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';
|
|
@@ -5,7 +5,7 @@ import { C } from './chunk-ANPNT6PM.js';
|
|
|
5
5
|
import { readCloudConfigStrict, CloudConfigError, readCloudConfig, writeCloudConfig, cloudConfigPath } from './chunk-PJDQPF5N.js';
|
|
6
6
|
import { findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
7
7
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
8
|
-
import { CLI_LOGIN_MACHINE_NAME_MAX, CliLoginPollResponseSchema, CLI_LOGIN_KIND, CliLoginRefusalSchema, CliLoginStartedSchema } from './chunk-
|
|
8
|
+
import { CLI_LOGIN_MACHINE_NAME_MAX, CliLoginPollResponseSchema, CLI_LOGIN_KIND, CliLoginRefusalSchema, CliLoginStartedSchema } from './chunk-V7Q5OKN7.js';
|
|
9
9
|
import { homeFromEnv } from './chunk-VNVZDWO3.js';
|
|
10
10
|
import { generateKeyPairSync, privateDecrypt, constants, createPrivateKey } from 'crypto';
|
|
11
11
|
import { spawn } from 'child_process';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { checkStarterFiles, contextIsGoverned } from './chunk-
|
|
4
|
-
import { fleetCheck, checkBuildSkill, checkMachineSkills, checkCommittedMaintainedSkills, checkMaintainedReferences, checkIgnoredSkillFolders } from './chunk-
|
|
5
|
-
import { resolveCredentials, getJson, WorkCommandError } from './chunk-
|
|
6
|
-
import { isLinkedRepository } from './chunk-
|
|
7
|
-
import { sanitizeTerminal } from './chunk-
|
|
8
|
-
import { resolveRepoIdentity, compareVersions, SUPPORTED_VERSIONS } from './chunk-
|
|
3
|
+
import { checkStarterFiles, contextIsGoverned } from './chunk-35DSTT37.js';
|
|
4
|
+
import { fleetCheck, checkBuildSkill, checkMachineSkills, checkCommittedMaintainedSkills, checkMaintainedReferences, checkIgnoredSkillFolders } from './chunk-6ANIBEQ6.js';
|
|
5
|
+
import { resolveCredentials, getJson, WorkCommandError } from './chunk-5FSVA3CO.js';
|
|
6
|
+
import { isLinkedRepository } from './chunk-VJGQEASF.js';
|
|
7
|
+
import { sanitizeTerminal } from './chunk-E4F7YE7P.js';
|
|
8
|
+
import { resolveRepoIdentity, compareVersions, SUPPORTED_VERSIONS } from './chunk-QQXNS4G2.js';
|
|
9
9
|
import { C } from './chunk-ANPNT6PM.js';
|
|
10
|
-
import { checkFormerSkillNames } from './chunk-
|
|
10
|
+
import { checkFormerSkillNames } from './chunk-C7WGCI77.js';
|
|
11
11
|
import { resolveGatewayCredentials, defaultFetch } from './chunk-6RKD7YZ6.js';
|
|
12
|
-
import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-
|
|
12
|
+
import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-JB4R5IFJ.js';
|
|
13
13
|
import { readStatuslineState, STATE_FRESH_MS } from './chunk-I7RZHMXW.js';
|
|
14
14
|
import { hookCommandEscapesControlPlane, CONTROL_PLANE_DIR_VARIABLE } from './chunk-HCVLP7XA.js';
|
|
15
15
|
import { findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
@@ -1195,8 +1195,8 @@ function doctorExitCode(checks) {
|
|
|
1195
1195
|
|
|
1196
1196
|
// src/doctor-report.ts
|
|
1197
1197
|
async function gatherDoctorChecks() {
|
|
1198
|
-
const { DEFAULT_BUILD_DISK } = await import('./build-disk-
|
|
1199
|
-
const { defaultRunnerConfigPath, hasRunnerBlock, loadRunnerConfig, runnerVmOf } = await import('./config-
|
|
1198
|
+
const { DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK } = await import('./build-disk-55M4ZMDX.js');
|
|
1199
|
+
const { defaultRunnerConfigPath, hasRunnerBlock, loadRunnerConfig, runnerVmOf } = await import('./config-RRY7DIJG.js');
|
|
1200
1200
|
const configPath = defaultRunnerConfigPath();
|
|
1201
1201
|
const runnerHost = hasRunnerBlock(configPath);
|
|
1202
1202
|
const hooks = (() => {
|
|
@@ -1217,7 +1217,7 @@ async function gatherDoctorChecks() {
|
|
|
1217
1217
|
const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
|
|
1218
1218
|
checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
|
|
1219
1219
|
} else if (hasRunnerBlock(configPath)) {
|
|
1220
|
-
const { runnerHostChecks } = await import('./doctor-
|
|
1220
|
+
const { runnerHostChecks } = await import('./doctor-LYOFFCQS.js');
|
|
1221
1221
|
const gateway = (() => {
|
|
1222
1222
|
try {
|
|
1223
1223
|
const { url, apiKey, appId } = loadRunnerConfig(configPath);
|
|
@@ -1236,7 +1236,7 @@ async function gatherDoctorChecks() {
|
|
|
1236
1236
|
const runner = (() => {
|
|
1237
1237
|
try {
|
|
1238
1238
|
const { concurrency, build, housekeeping, managed } = loadRunnerConfig(configPath);
|
|
1239
|
-
return { concurrency, buildMemory: build?.memory ?? "8g", buildDisk: build?.disk ?? DEFAULT_BUILD_DISK, minFreeDisk: housekeeping?.minFreeDisk, allowHosts: build?.allowHosts, ...build?.imageBuild === void 0 ? {} : { imageBuild: build.imageBuild }, ...managed === true ? { managed } : {} };
|
|
1239
|
+
return { concurrency, buildMemory: build?.memory ?? "8g", buildDisk: build?.disk ?? DEFAULT_BUILD_DISK, cacheDisk: build?.cacheDisk ?? DEFAULT_CACHE_DISK, minFreeDisk: housekeeping?.minFreeDisk, allowHosts: build?.allowHosts, ...build?.imageBuild === void 0 ? {} : { imageBuild: build.imageBuild }, ...managed === true ? { managed } : {} };
|
|
1240
1240
|
} catch {
|
|
1241
1241
|
return void 0;
|
|
1242
1242
|
}
|
|
@@ -1245,7 +1245,7 @@ async function gatherDoctorChecks() {
|
|
|
1245
1245
|
const { existsSync: existsSync3 } = await import('fs');
|
|
1246
1246
|
if (process.platform !== "linux" || !existsSync3("/run/systemd/system")) return void 0;
|
|
1247
1247
|
const { inspectService, realInspectProbes } = await import('./inspect-DNLXTXLA.js');
|
|
1248
|
-
const { DEFAULT_UNIT_NAME } = await import('./install-
|
|
1248
|
+
const { DEFAULT_UNIT_NAME } = await import('./install-5BQ3TFBT.js');
|
|
1249
1249
|
const { dirname: dirname2 } = await import('path');
|
|
1250
1250
|
return inspectService(DEFAULT_UNIT_NAME, dirname2(configPath), realInspectProbes());
|
|
1251
1251
|
})();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { C } from './chunk-ANPNT6PM.js';
|
|
4
|
-
import { resolvePackRoot, OUTERLAYER_SKILLS_BASE, loadTemplateFiles, AGENTS_SKILLS_BASE, loadMaintainedFiles, rewriteSkillPaths, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MACHINE_SKILL_PATH } from './chunk-
|
|
4
|
+
import { resolvePackRoot, OUTERLAYER_SKILLS_BASE, loadTemplateFiles, AGENTS_SKILLS_BASE, loadMaintainedFiles, rewriteSkillPaths, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MACHINE_SKILL_PATH } from './chunk-M24H6JQW.js';
|
|
5
5
|
import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
|
|
6
6
|
import { resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
7
7
|
import { cliInvocation } from './chunk-CRB3POP4.js';
|
|
8
|
-
import { linkedAgentsPath } from './chunk-
|
|
8
|
+
import { linkedAgentsPath } from './chunk-6ZLI652Y.js';
|
|
9
9
|
import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'fs';
|
|
10
10
|
import { join, dirname } from 'path';
|
|
11
11
|
|
|
@@ -3,7 +3,7 @@ import { createRequire } from 'node:module';
|
|
|
3
3
|
import { claimPidFile, RunnerAlreadyRunningError, releasePidFile } from './chunk-F5UL23I2.js';
|
|
4
4
|
import { startTimeOf } from './chunk-JBJTC3UU.js';
|
|
5
5
|
import { RecipeError, locateRecipe, readRecipe, assertBuildable, writeSanitizedRecipe, classifyProperties, SANITIZED_NAME } from './chunk-3Z3MPR55.js';
|
|
6
|
-
import { GH_VERSION, VOICE_PACK_FILES, VOICE_PACK_VERSION, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, TINI_SHA256, TINI_VERSION, CLAUDE_CODE_VERSION, NODE_IMAGE, DEFAULT_BASE_IMAGE, MEDIA_PINS, PLAYWRIGHT_VERSION } from './chunk-
|
|
6
|
+
import { GH_VERSION, VOICE_PACK_FILES, VOICE_PACK_VERSION, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, TINI_SHA256, TINI_VERSION, CLAUDE_CODE_VERSION, NODE_IMAGE, DEFAULT_BASE_IMAGE, MEDIA_PINS, PLAYWRIGHT_VERSION } from './chunk-NE63JADS.js';
|
|
7
7
|
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, repoCacheDir, imagesDir, imageBuildLogsDir, attemptStamp, runnerDir, rootfsPathFor } from './chunk-PA6CK6WQ.js';
|
|
8
8
|
import { PROXY_WARNING_FLAG, withGitConfig, tokenHeader } from './chunk-BALIE3BA.js';
|
|
9
9
|
import { RELAY_ID, RELAY_USER } from './chunk-MESOOLF4.js';
|