@cnc-tools/storm 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/storm.js +1 -1
- package/dist/build-info.js +1 -1
- package/dist/chunks/{chunk-4XT5RC5T.js → chunk-2NZXL6OH.js} +6 -42
- package/dist/chunks/{chunk-ISGQJIQM.js → chunk-5UMJNVKT.js} +1 -1
- package/dist/chunks/{chunk-FSP3SJ35.js → chunk-6EQKA7LI.js} +16 -46
- package/dist/chunks/{chunk-Y3BUNNRG.js → chunk-AX4EQZUS.js} +4 -4
- package/dist/chunks/{chunk-RYRJNHL7.js → chunk-DOFB2ACU.js} +3 -9
- package/dist/chunks/{chunk-SXW6XN4R.js → chunk-EGNP3S6C.js} +3 -3
- package/dist/chunks/{chunk-FK4RLDEK.js → chunk-N7E6DAUE.js} +1 -1
- package/dist/chunks/{chunk-U7M3ZB3Z.js → chunk-Q4TKRILH.js} +33 -167
- package/dist/chunks/{chunk-TMQQYHUX.js → chunk-RTILVSYQ.js} +1 -1
- package/dist/chunks/{chunk-7D6LC5JY.js → chunk-X4WBJIOF.js} +7 -39
- package/dist/chunks/{chunk-TEEZL3GA.js → chunk-YGS5VRQT.js} +11 -68
- package/dist/chunks/{chunk-ODQHQJLE.js → chunk-ZDJLKF2G.js} +742 -1117
- package/dist/chunks/{live-app-AZ5N5HBD.js → live-app-QFHS54SX.js} +4 -4
- package/dist/commands/exec/command.d.ts +2 -90
- package/dist/commands/exec/command.js +10 -10
- package/dist/commands/exec/define-run-command.d.ts +2 -90
- package/dist/commands/exec/live-view.js +18 -22
- package/dist/commands/exec/outcomes.d.ts +2 -106
- package/dist/commands/exec/outcomes.js +4 -35
- package/dist/commands/exec/progress.d.ts +3 -19
- package/dist/commands/exec/progress.js +16 -60
- package/dist/commands/exec/run-command.d.ts +4 -23
- package/dist/commands/exec/run-command.js +5 -79
- package/dist/commands/exec/run-metadata.d.ts +0 -6
- package/dist/commands/exec/run-metadata.js +2 -8
- package/dist/commands/exec/snapshot-text.d.ts +7 -16
- package/dist/commands/exec/snapshot-text.js +9 -49
- package/dist/commands/exec/view.js +2 -12
- package/dist/commands/playwright/command.d.ts +2 -90
- package/dist/commands/playwright/command.js +11 -11
- package/dist/commands/runs/facts.d.ts +1 -37
- package/dist/commands/runs/facts.js +4 -36
- package/dist/commands/runs/list/command.d.ts +0 -72
- package/dist/commands/runs/list/command.js +5 -5
- package/dist/commands/runs/list/outcomes.d.ts +0 -36
- package/dist/commands/runs/logs/command.js +5 -5
- package/dist/commands/runs/show/command.d.ts +0 -72
- package/dist/commands/runs/show/command.js +13 -40
- package/dist/commands/runs/show/metadata.js +1 -1
- package/dist/commands/runs/show/outcomes.d.ts +0 -36
- package/dist/commands/runs/show/outcomes.js +8 -42
- package/dist/commands/snapshots/build/command.d.ts +14 -411
- package/dist/commands/snapshots/build/command.js +56 -231
- package/dist/commands/snapshots/build/metadata.js +10 -7
- package/dist/commands/snapshots/build/outcomes.d.ts +11 -241
- package/dist/commands/snapshots/build/outcomes.js +29 -196
- package/dist/commands/snapshots/list/command.d.ts +2 -36
- package/dist/commands/snapshots/list/command.js +17 -53
- package/dist/commands/snapshots/list/metadata.js +1 -1
- package/dist/commands/snapshots/list/outcomes.d.ts +2 -37
- package/dist/commands/snapshots/list/outcomes.js +13 -53
- package/dist/commands/vitest/command.d.ts +2 -90
- package/dist/commands/vitest/command.js +11 -11
- package/dist/core/events.d.ts +5 -6
- package/dist/core/run-state.d.ts +7 -29
- package/dist/core/run-state.js +3 -26
- package/dist/core/run.d.ts +6 -14
- package/dist/core/run.js +17 -28
- package/dist/extensions/testserver/commands/pool/create/command.js +1 -1
- package/dist/run-directory/index.d.ts +1 -1
- package/dist/run-directory/index.js +0 -1
- package/dist/run-directory/recording.js +2 -2
- package/dist/run-directory/run-record.d.ts +14 -132
- package/dist/run-directory/run-record.js +8 -68
- package/dist/runner/build-snapshots.d.ts +50 -114
- package/dist/runner/build-snapshots.js +70 -159
- package/dist/runner/events.d.ts +4 -88
- package/dist/runner/gateways.d.ts +5 -23
- package/dist/runner/index.d.ts +5 -6
- package/dist/runner/index.js +1 -1
- package/dist/runner/live/snapshot-records.js +7 -18
- package/dist/runner/prepare.d.ts +11 -22
- package/dist/runner/prepare.js +6 -17
- package/dist/runner/ready.d.ts +16 -45
- package/dist/runner/ready.js +34 -59
- package/dist/runner/recipe.d.ts +0 -44
- package/dist/runner/recipe.js +0 -41
- package/dist/runner/scope.d.ts +8 -25
- package/dist/runner/scope.js +4 -8
- package/dist/runner/session.d.ts +18 -65
- package/dist/runner/session.js +15 -83
- package/dist/runner/snapshot-build.d.ts +2 -2
- package/dist/runner/snapshot-cache.d.ts +22 -74
- package/dist/runner/snapshot-cache.js +15 -107
- package/dist/runner/snapshot-inspect.d.ts +9 -13
- package/dist/runner/snapshot-inspect.js +48 -57
- package/dist/runner/snapshot-key.d.ts +9 -14
- package/dist/runner/snapshot-key.js +15 -22
- package/package.json +1 -1
- package/skills/read-run-output.md +8 -9
- package/dist/runner/snapshot-save.d.ts +0 -70
- package/dist/runner/snapshot-save.js +0 -160
- package/dist/runner/snapshot-start.d.ts +0 -25
- package/dist/runner/snapshot-start.js +0 -16
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// What a run, `storm runs show` and `storm snapshots list` say about a runner snapshot: where it was built, in
|
|
2
|
-
// commits a person knows, why a run doesn't start from one,
|
|
3
|
-
//
|
|
2
|
+
// commits a person knows, why a run doesn't start from one, and what the cache read noticed. Each text says only what
|
|
3
|
+
// storm checked.
|
|
4
4
|
import { short } from "./text.js";
|
|
5
5
|
/** How many of the snapshots a run doesn't start from its build line lists, before it counts the rest. */
|
|
6
6
|
export const REJECTIONS_SHOWN = 5;
|
|
@@ -10,48 +10,32 @@ export function commitsText(count) {
|
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Where a runner snapshot was built, from the commits a run knows: at HEAD's commit, at the run's merge-base, or some
|
|
13
|
-
* commits before HEAD.
|
|
14
|
-
*
|
|
15
|
-
* still reads true; a count storm doesn't have is null.
|
|
13
|
+
* commits before HEAD. A snapshot is built at its `base`; `mergeBase` is the run's own, undefined when the run didn't
|
|
14
|
+
* say it; a count storm doesn't have is null.
|
|
16
15
|
*/
|
|
17
16
|
export function builtAtText(snapshot) {
|
|
18
|
-
const at = `(${short(snapshot.
|
|
17
|
+
const at = `(${short(snapshot.base)})`;
|
|
19
18
|
if (snapshot.builtBehind === 0)
|
|
20
19
|
return `built at this commit ${at}`;
|
|
21
|
-
if (snapshot.
|
|
20
|
+
if (snapshot.base === snapshot.mergeBase)
|
|
22
21
|
return `built at the merge-base ${at}`;
|
|
23
22
|
if (snapshot.builtBehind !== null)
|
|
24
23
|
return `built ${commitsText(snapshot.builtBehind)} before HEAD ${at}`;
|
|
25
|
-
return `built at commit ${short(snapshot.
|
|
24
|
+
return `built at commit ${short(snapshot.base)}`;
|
|
26
25
|
}
|
|
27
|
-
/**
|
|
28
|
-
* Why a run doesn't start from a cached snapshot, as a person reads it after the snapshot's id. It reads only the root
|
|
29
|
-
* of the checkout that saved the snapshot (`repoRoot`, null for a base snapshot), its built-at commit (`builtAt`) and
|
|
30
|
-
* its base (`base`).
|
|
31
|
-
*/
|
|
26
|
+
/** Why a run doesn't start from a cached snapshot, as a person reads it after the snapshot's id. */
|
|
32
27
|
export function rejectionText(reason, snapshot) {
|
|
33
28
|
switch (reason) {
|
|
34
29
|
case "expired":
|
|
35
30
|
return "expired";
|
|
36
31
|
case "expires-soon":
|
|
37
32
|
return "expires within the hour";
|
|
38
|
-
case "other-checkout":
|
|
39
|
-
return `saved by another checkout (${snapshot.repoRoot ?? "unknown"})`;
|
|
40
|
-
case "reuse-off":
|
|
41
|
-
return "reuse of dev snapshots is switched off";
|
|
42
|
-
case "not-trusted":
|
|
43
|
-
return "the runner recipe doesn't trust dev snapshots";
|
|
44
33
|
case "other-base":
|
|
45
34
|
return `its base ${short(snapshot.base)} is not the merge-base`;
|
|
46
35
|
case "steps-changed":
|
|
47
36
|
return "the recipe's snapshot steps changed since it was built";
|
|
48
|
-
case "not-in-history":
|
|
49
|
-
return `its commit ${short(snapshot.builtAt)} is not in HEAD's history`;
|
|
50
37
|
case "other-owner":
|
|
51
38
|
return "built for another team or project";
|
|
52
|
-
case "not-picked":
|
|
53
|
-
// Of two at one commit the pick prefers a dev snapshot, so the one passed over need not be farther from HEAD.
|
|
54
|
-
return "the pick preferred another snapshot";
|
|
55
39
|
}
|
|
56
40
|
}
|
|
57
41
|
/**
|
|
@@ -62,41 +46,17 @@ export function rejectionLines(rejected) {
|
|
|
62
46
|
const shown = rejected.slice(0, REJECTIONS_SHOWN);
|
|
63
47
|
const more = rejected.length - shown.length;
|
|
64
48
|
return [
|
|
65
|
-
...shown.map(({ entry, reason }) => ` ${entry.snapshotId}: ${rejectionText(reason,
|
|
49
|
+
...shown.map(({ entry, reason }) => ` ${entry.snapshotId}: ${rejectionText(reason, entry)}`),
|
|
66
50
|
...(more === 0 ? [] : [` and ${more} more: storm snapshots list shows them`]),
|
|
67
51
|
];
|
|
68
52
|
}
|
|
69
|
-
/** Why a run whose command ended on its own saved no dev snapshot, as its cleanup line says after the colon. */
|
|
70
|
-
export function noSaveText(reason) {
|
|
71
|
-
switch (reason) {
|
|
72
|
-
case "already-saved":
|
|
73
|
-
return "this commit already has one";
|
|
74
|
-
case "command-failed":
|
|
75
|
-
return "the command did not exit 0";
|
|
76
|
-
case "ci":
|
|
77
|
-
return "CI is set";
|
|
78
|
-
case "keep-sandbox":
|
|
79
|
-
return "--keep-sandbox keeps the runner sandbox instead";
|
|
80
|
-
case "no-save-flag":
|
|
81
|
-
return "--save-dev-snapshot=false";
|
|
82
|
-
case "recipe":
|
|
83
|
-
return "saveDevSnapshot is false in the runner recipe";
|
|
84
|
-
case "not-trusted":
|
|
85
|
-
return "the runner recipe doesn't trust dev snapshots (trustDevSnapshots)";
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
53
|
/** Every reason a run doesn't start from a cached snapshot, for a schema. */
|
|
89
54
|
export const REJECTION_REASONS = [
|
|
90
55
|
"expired",
|
|
91
56
|
"expires-soon",
|
|
92
|
-
"other-checkout",
|
|
93
|
-
"reuse-off",
|
|
94
|
-
"not-trusted",
|
|
95
57
|
"other-base",
|
|
96
58
|
"steps-changed",
|
|
97
|
-
"not-in-history",
|
|
98
59
|
"other-owner",
|
|
99
|
-
"not-picked",
|
|
100
60
|
];
|
|
101
61
|
/**
|
|
102
62
|
* What removing expired entries from the runner snapshot cache noticed, as a run's and `storm snapshots build`'s
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { EMPTY_RUN_STATE, } from "../../core/index.js";
|
|
5
5
|
import { DEFINITION_SET } from "../../extensions.js";
|
|
6
6
|
import { activePhase, headerLine, phaseFrame, phaseRecord } from "./live-view.js";
|
|
7
|
-
import {
|
|
7
|
+
import { snapshotBuildTexts, cacheWriteFailureText, lineProgress, preparedNoteTexts, progressLine, resourceWarningText, skippedText, } from "./progress.js";
|
|
8
8
|
import { paint } from "./text.js";
|
|
9
9
|
/** The plain summary's width when stderr reports none: 80 columns. */
|
|
10
10
|
const PLAIN_WIDTH = 80;
|
|
@@ -168,21 +168,12 @@ function noticeLines(timed, origin, verbose) {
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
/**
|
|
171
|
-
* The runner's notices: why the cached snapshots didn't fit a run that builds one, a cache entry not written
|
|
172
|
-
* `storm snapshots build --full` dropped, and how a save ended or why none started.
|
|
171
|
+
* The runner's notices: why the cached snapshots didn't fit a run that builds one, and a cache entry not written.
|
|
173
172
|
*/
|
|
174
173
|
function runnerNoticeLines(event, line) {
|
|
175
174
|
switch (event.kind) {
|
|
176
175
|
case "snapshot-entry-not-written":
|
|
177
176
|
return [line("runner", cacheWriteFailureText(event.failure))];
|
|
178
|
-
case "dev-snapshots-dropped":
|
|
179
|
-
case "dev-snapshots-not-dropped":
|
|
180
|
-
return [line("runner", devSnapshotsDropText(event))];
|
|
181
|
-
case "dev-snapshot-saved":
|
|
182
|
-
case "dev-snapshot-not-saved":
|
|
183
|
-
return [line("cleanup", devSnapshotSaveText(event))];
|
|
184
|
-
case "dev-snapshot-skipped":
|
|
185
|
-
return [line("cleanup", devSnapshotSkippedText(event))];
|
|
186
177
|
// The runner row shows the build; its reasons, when a cached snapshot didn't fit, are lines of their own.
|
|
187
178
|
case "snapshot-build-started":
|
|
188
179
|
return event.why.kind === "no-snapshot" && event.why.rejected.length > 0
|
|
@@ -206,7 +197,6 @@ function runnerNoticeLines(event, line) {
|
|
|
206
197
|
case "stopping":
|
|
207
198
|
case "waiting-for-snapshot":
|
|
208
199
|
case "sandbox-kept":
|
|
209
|
-
case "dev-snapshot-saving":
|
|
210
200
|
return [];
|
|
211
201
|
}
|
|
212
202
|
}
|
|
@@ -12,8 +12,6 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod")
|
|
|
12
12
|
mint: "mint";
|
|
13
13
|
}>>;
|
|
14
14
|
unsandboxed: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
15
|
-
saveDevSnapshot: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
16
|
-
noReuseDevSnapshot: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
17
15
|
showOutput: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
18
16
|
keepSandbox: import("zod").ZodOptional<import("zod").ZodString>;
|
|
19
17
|
verbose: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
@@ -32,48 +30,13 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod")
|
|
|
32
30
|
runner: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
33
31
|
snapshotId: import("zod").ZodString;
|
|
34
32
|
base: import("zod").ZodString;
|
|
35
|
-
|
|
36
|
-
snapshotHead: import("zod").ZodNullable<import("zod").ZodString>;
|
|
37
|
-
snapshotKind: import("zod").ZodEnum<{
|
|
38
|
-
base: "base";
|
|
39
|
-
dev: "dev";
|
|
40
|
-
}>;
|
|
41
|
-
snapshotBuiltAt: import("zod").ZodString;
|
|
42
|
-
builtBehind: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
33
|
+
builtBehind: import("zod").ZodNumber;
|
|
43
34
|
uploadBytes: import("zod").ZodNumber;
|
|
44
35
|
built: import("zod").ZodBoolean;
|
|
45
36
|
vcpus: import("zod").ZodNumber;
|
|
46
37
|
region: import("zod").ZodString;
|
|
47
38
|
runtime: import("zod").ZodString;
|
|
48
39
|
buildMs: import("zod").ZodNumber;
|
|
49
|
-
save: import("zod").ZodNullable<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
50
|
-
kind: import("zod").ZodLiteral<"saved">;
|
|
51
|
-
snapshotId: import("zod").ZodString;
|
|
52
|
-
base: import("zod").ZodString;
|
|
53
|
-
branch: import("zod").ZodNullable<import("zod").ZodString>;
|
|
54
|
-
head: import("zod").ZodString;
|
|
55
|
-
ms: import("zod").ZodNumber;
|
|
56
|
-
sizeBytes: import("zod").ZodNumber;
|
|
57
|
-
entryWritten: import("zod").ZodBoolean;
|
|
58
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
59
|
-
kind: import("zod").ZodLiteral<"failed">;
|
|
60
|
-
step: import("zod").ZodEnum<{
|
|
61
|
-
"save-snapshot": "save-snapshot";
|
|
62
|
-
scrub: "scrub";
|
|
63
|
-
}>;
|
|
64
|
-
message: import("zod").ZodString;
|
|
65
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
66
|
-
kind: import("zod").ZodLiteral<"stopped">;
|
|
67
|
-
}, import("zod/v4/core").$strip>], "kind">>;
|
|
68
|
-
noSaveReason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
69
|
-
"already-saved": "already-saved";
|
|
70
|
-
ci: "ci";
|
|
71
|
-
"command-failed": "command-failed";
|
|
72
|
-
"keep-sandbox": "keep-sandbox";
|
|
73
|
-
"no-save-flag": "no-save-flag";
|
|
74
|
-
"not-trusted": "not-trusted";
|
|
75
|
-
recipe: "recipe";
|
|
76
|
-
}>>;
|
|
77
40
|
}, import("zod/v4/core").$strip>>;
|
|
78
41
|
timeline: import("zod").ZodObject<{
|
|
79
42
|
startedAt: import("zod").ZodString;
|
|
@@ -139,10 +102,6 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod")
|
|
|
139
102
|
flags: string[];
|
|
140
103
|
configFile: string | null;
|
|
141
104
|
}]>;
|
|
142
|
-
devSnapshotsNotTrusted: import("@vercel/clinkr").SharedError<"dev_snapshots_not_trusted", [data: {
|
|
143
|
-
flag: string;
|
|
144
|
-
configFile: string | null;
|
|
145
|
-
}]>;
|
|
146
105
|
driverPlanFailed: import("@vercel/clinkr").SharedError<"driver_plan_failed", [data: {
|
|
147
106
|
driver: string;
|
|
148
107
|
kind: "exited" | "start-failed" | "timed-out" | "unreadable-output";
|
|
@@ -262,10 +221,6 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod")
|
|
|
262
221
|
flags: string[];
|
|
263
222
|
configFile: string | null;
|
|
264
223
|
}]>;
|
|
265
|
-
readonly devSnapshotsNotTrusted: import("@vercel/clinkr").SharedError<"dev_snapshots_not_trusted", [data: {
|
|
266
|
-
flag: string;
|
|
267
|
-
configFile: string | null;
|
|
268
|
-
}]>;
|
|
269
224
|
readonly driverPlanFailed: import("@vercel/clinkr").SharedError<"driver_plan_failed", [data: {
|
|
270
225
|
driver: string;
|
|
271
226
|
kind: "exited" | "start-failed" | "timed-out" | "unreadable-output";
|
|
@@ -394,48 +349,13 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod")
|
|
|
394
349
|
runner: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
395
350
|
snapshotId: import("zod").ZodString;
|
|
396
351
|
base: import("zod").ZodString;
|
|
397
|
-
|
|
398
|
-
snapshotHead: import("zod").ZodNullable<import("zod").ZodString>;
|
|
399
|
-
snapshotKind: import("zod").ZodEnum<{
|
|
400
|
-
base: "base";
|
|
401
|
-
dev: "dev";
|
|
402
|
-
}>;
|
|
403
|
-
snapshotBuiltAt: import("zod").ZodString;
|
|
404
|
-
builtBehind: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
352
|
+
builtBehind: import("zod").ZodNumber;
|
|
405
353
|
uploadBytes: import("zod").ZodNumber;
|
|
406
354
|
built: import("zod").ZodBoolean;
|
|
407
355
|
vcpus: import("zod").ZodNumber;
|
|
408
356
|
region: import("zod").ZodString;
|
|
409
357
|
runtime: import("zod").ZodString;
|
|
410
358
|
buildMs: import("zod").ZodNumber;
|
|
411
|
-
save: import("zod").ZodNullable<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
412
|
-
kind: import("zod").ZodLiteral<"saved">;
|
|
413
|
-
snapshotId: import("zod").ZodString;
|
|
414
|
-
base: import("zod").ZodString;
|
|
415
|
-
branch: import("zod").ZodNullable<import("zod").ZodString>;
|
|
416
|
-
head: import("zod").ZodString;
|
|
417
|
-
ms: import("zod").ZodNumber;
|
|
418
|
-
sizeBytes: import("zod").ZodNumber;
|
|
419
|
-
entryWritten: import("zod").ZodBoolean;
|
|
420
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
421
|
-
kind: import("zod").ZodLiteral<"failed">;
|
|
422
|
-
step: import("zod").ZodEnum<{
|
|
423
|
-
"save-snapshot": "save-snapshot";
|
|
424
|
-
scrub: "scrub";
|
|
425
|
-
}>;
|
|
426
|
-
message: import("zod").ZodString;
|
|
427
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
428
|
-
kind: import("zod").ZodLiteral<"stopped">;
|
|
429
|
-
}, import("zod/v4/core").$strip>], "kind">>;
|
|
430
|
-
noSaveReason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
431
|
-
"already-saved": "already-saved";
|
|
432
|
-
ci: "ci";
|
|
433
|
-
"command-failed": "command-failed";
|
|
434
|
-
"keep-sandbox": "keep-sandbox";
|
|
435
|
-
"no-save-flag": "no-save-flag";
|
|
436
|
-
"not-trusted": "not-trusted";
|
|
437
|
-
recipe: "recipe";
|
|
438
|
-
}>>;
|
|
439
359
|
}, import("zod/v4/core").$strip>>;
|
|
440
360
|
timeline: import("zod").ZodObject<{
|
|
441
361
|
startedAt: import("zod").ZodString;
|
|
@@ -501,10 +421,6 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod")
|
|
|
501
421
|
flags: string[];
|
|
502
422
|
configFile: string | null;
|
|
503
423
|
}]>;
|
|
504
|
-
devSnapshotsNotTrusted: import("@vercel/clinkr").SharedError<"dev_snapshots_not_trusted", [data: {
|
|
505
|
-
flag: string;
|
|
506
|
-
configFile: string | null;
|
|
507
|
-
}]>;
|
|
508
424
|
driverPlanFailed: import("@vercel/clinkr").SharedError<"driver_plan_failed", [data: {
|
|
509
425
|
driver: string;
|
|
510
426
|
kind: "exited" | "start-failed" | "timed-out" | "unreadable-output";
|
|
@@ -624,10 +540,6 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<import("zod")
|
|
|
624
540
|
flags: string[];
|
|
625
541
|
configFile: string | null;
|
|
626
542
|
}]>;
|
|
627
|
-
readonly devSnapshotsNotTrusted: import("@vercel/clinkr").SharedError<"dev_snapshots_not_trusted", [data: {
|
|
628
|
-
flag: string;
|
|
629
|
-
configFile: string | null;
|
|
630
|
-
}]>;
|
|
631
543
|
readonly driverPlanFailed: import("@vercel/clinkr").SharedError<"driver_plan_failed", [data: {
|
|
632
544
|
driver: string;
|
|
633
545
|
kind: "exited" | "start-failed" | "timed-out" | "unreadable-output";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defineRunCommand
|
|
3
|
-
} from "../../chunks/chunk-
|
|
4
|
-
import "../../chunks/chunk-
|
|
5
|
-
import "../../chunks/chunk-
|
|
3
|
+
} from "../../chunks/chunk-EGNP3S6C.js";
|
|
4
|
+
import "../../chunks/chunk-DOFB2ACU.js";
|
|
5
|
+
import "../../chunks/chunk-Q4TKRILH.js";
|
|
6
6
|
import "../../chunks/chunk-I5GZLOLQ.js";
|
|
7
|
-
import "../../chunks/chunk-
|
|
8
|
-
import "../../chunks/chunk-
|
|
9
|
-
import "../../chunks/chunk-
|
|
7
|
+
import "../../chunks/chunk-N7E6DAUE.js";
|
|
8
|
+
import "../../chunks/chunk-AX4EQZUS.js";
|
|
9
|
+
import "../../chunks/chunk-2NZXL6OH.js";
|
|
10
10
|
import {
|
|
11
11
|
driverNamed
|
|
12
|
-
} from "../../chunks/chunk-
|
|
12
|
+
} from "../../chunks/chunk-5UMJNVKT.js";
|
|
13
13
|
import "../../chunks/chunk-IYM44FUX.js";
|
|
14
14
|
import "../../chunks/chunk-LQKNI3EG.js";
|
|
15
15
|
import "../../chunks/chunk-NMVODY3P.js";
|
|
16
|
-
import "../../chunks/chunk-
|
|
17
|
-
import "../../chunks/chunk-
|
|
18
|
-
import "../../chunks/chunk-
|
|
19
|
-
import "../../chunks/chunk-
|
|
16
|
+
import "../../chunks/chunk-YGS5VRQT.js";
|
|
17
|
+
import "../../chunks/chunk-RTILVSYQ.js";
|
|
18
|
+
import "../../chunks/chunk-6EQKA7LI.js";
|
|
19
|
+
import "../../chunks/chunk-ZDJLKF2G.js";
|
|
20
20
|
import "../../chunks/chunk-YT5OROR7.js";
|
|
21
21
|
import "../../chunks/chunk-BW2ADH7U.js";
|
|
22
22
|
import "../../chunks/chunk-GQIL3AHY.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type StyledCell } from "@vercel/clinkr/vcli-kit";
|
|
2
2
|
import type { Intent } from "@vercel/clinkr/vcli-kit/theme";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import {
|
|
4
|
+
import type { ListedRun } from "../../run-directory/index.ts";
|
|
5
5
|
import type { RunScope } from "./past-run.ts";
|
|
6
6
|
/**
|
|
7
7
|
* The run logs `runs logs` prints and `runs show` names: the command log (`command`), then each step's, in the order a
|
|
@@ -47,46 +47,10 @@ export declare const runFactsSchema: z.ZodObject<{
|
|
|
47
47
|
id: z.ZodString;
|
|
48
48
|
base: z.ZodString;
|
|
49
49
|
built: z.ZodBoolean;
|
|
50
|
-
branch: z.ZodNullable<z.ZodString>;
|
|
51
|
-
head: z.ZodNullable<z.ZodString>;
|
|
52
|
-
kind: z.ZodNullable<z.ZodEnum<{
|
|
53
|
-
base: "base";
|
|
54
|
-
dev: "dev";
|
|
55
|
-
}>>;
|
|
56
|
-
builtAt: z.ZodNullable<z.ZodString>;
|
|
57
50
|
builtBehind: z.ZodNullable<z.ZodNumber>;
|
|
58
51
|
url: z.ZodString;
|
|
59
52
|
}, z.core.$strip>>;
|
|
60
53
|
uploadBytes: z.ZodNullable<z.ZodNumber>;
|
|
61
|
-
noSaveReason: z.ZodNullable<z.ZodEnum<{
|
|
62
|
-
"already-saved": "already-saved";
|
|
63
|
-
ci: "ci";
|
|
64
|
-
"command-failed": "command-failed";
|
|
65
|
-
"keep-sandbox": "keep-sandbox";
|
|
66
|
-
"no-save-flag": "no-save-flag";
|
|
67
|
-
"not-trusted": "not-trusted";
|
|
68
|
-
recipe: "recipe";
|
|
69
|
-
}>>;
|
|
70
|
-
save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
71
|
-
kind: z.ZodLiteral<"saved">;
|
|
72
|
-
snapshotId: z.ZodString;
|
|
73
|
-
base: z.ZodString;
|
|
74
|
-
branch: z.ZodNullable<z.ZodString>;
|
|
75
|
-
head: z.ZodString;
|
|
76
|
-
ms: z.ZodNumber;
|
|
77
|
-
sizeBytes: z.ZodNumber;
|
|
78
|
-
entryWritten: z.ZodBoolean;
|
|
79
|
-
url: z.ZodString;
|
|
80
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
-
kind: z.ZodLiteral<"failed">;
|
|
82
|
-
step: z.ZodEnum<{
|
|
83
|
-
"save-snapshot": "save-snapshot";
|
|
84
|
-
scrub: "scrub";
|
|
85
|
-
}>;
|
|
86
|
-
message: z.ZodString;
|
|
87
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
88
|
-
kind: z.ZodLiteral<"stopped">;
|
|
89
|
-
}, z.core.$strip>], "kind">>;
|
|
90
54
|
}, z.core.$strip>], "kind">>;
|
|
91
55
|
git: z.ZodNullable<z.ZodObject<{
|
|
92
56
|
branch: z.ZodNullable<z.ZodString>;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// share: shared schemas and the facts built from a past run, so the commands' JSON agree.
|
|
3
3
|
import { muted } from "@vercel/clinkr/vcli-kit";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
import { noSaveReasonSchema } from "../../run-directory/index.js";
|
|
6
5
|
import { sandboxPage, snapshotPage } from "../dashboard.js";
|
|
7
6
|
import { isoSecondsText, seconds, short } from "../exec/text.js";
|
|
8
7
|
/**
|
|
@@ -69,49 +68,19 @@ export const runFactsSchema = z.object({
|
|
|
69
68
|
keptUntil: z.string().nullable(),
|
|
70
69
|
/** How many whole minutes are left until keptUntil, as of reading the run, 0 once it has passed; null when keptUntil is. */
|
|
71
70
|
keptMinutesLeft: z.number().nullable(),
|
|
72
|
-
/** The runner snapshot it started from: its id, the base it is of, which the run's changes went on top of, whether this run built it or reused it,
|
|
71
|
+
/** The runner snapshot it started from: its id, the base it is of, which the run's changes went on top of, whether this run built it or reused it, and its page in the Vercel dashboard. Null until known. */
|
|
73
72
|
snapshot: z
|
|
74
73
|
.object({
|
|
75
74
|
id: z.string(),
|
|
76
75
|
base: z.string(),
|
|
77
76
|
built: z.boolean(),
|
|
78
|
-
|
|
79
|
-
head: z.string().nullable(),
|
|
80
|
-
/** Its kind, a base snapshot or a dev snapshot; null in a record written before storm recorded it. */
|
|
81
|
-
kind: z.enum(["base", "dev"]).nullable(),
|
|
82
|
-
/** The commit it was built at, a full SHA: a base snapshot's base, or the commit that saved a dev snapshot; null when unknown. */
|
|
83
|
-
builtAt: z.string().nullable(),
|
|
84
|
-
/** How many commits the run's HEAD had that its built-at commit lacks; null when unknown. */
|
|
77
|
+
/** How many commits the run's HEAD had that its base, the commit it was built at, lacks; null when the run state had no count. */
|
|
85
78
|
builtBehind: z.number().nullable(),
|
|
86
79
|
url: z.string(),
|
|
87
80
|
})
|
|
88
81
|
.nullable(),
|
|
89
|
-
/** How many bytes of changes the run uploaded to the runner sandbox; null when
|
|
82
|
+
/** How many bytes of changes the run uploaded to the runner sandbox; null when the run stopped before the upload. */
|
|
90
83
|
uploadBytes: z.number().nullable(),
|
|
91
|
-
/** Why the run, whose command ended on its own, started no save of a dev snapshot; null when it started one, or when unknown. */
|
|
92
|
-
noSaveReason: noSaveReasonSchema.nullable(),
|
|
93
|
-
/** How saving the runner sandbox as a dev snapshot ended, as the run's ran result's runner.save says, with the saved snapshot's page in the Vercel dashboard (`url`, null unless saved); null when the run started no save. */
|
|
94
|
-
save: z
|
|
95
|
-
.discriminatedUnion("kind", [
|
|
96
|
-
z.object({
|
|
97
|
-
kind: z.literal("saved"),
|
|
98
|
-
snapshotId: z.string(),
|
|
99
|
-
base: z.string(),
|
|
100
|
-
branch: z.string().nullable(),
|
|
101
|
-
head: z.string(),
|
|
102
|
-
ms: z.number(),
|
|
103
|
-
sizeBytes: z.number(),
|
|
104
|
-
entryWritten: z.boolean(),
|
|
105
|
-
url: z.string(),
|
|
106
|
-
}),
|
|
107
|
-
z.object({
|
|
108
|
-
kind: z.literal("failed"),
|
|
109
|
-
step: z.enum(["scrub", "save-snapshot"]),
|
|
110
|
-
message: z.string(),
|
|
111
|
-
}),
|
|
112
|
-
z.object({ kind: z.literal("stopped") }),
|
|
113
|
-
])
|
|
114
|
-
.nullable(),
|
|
115
84
|
}),
|
|
116
85
|
])
|
|
117
86
|
.nullable(),
|
|
@@ -178,13 +147,12 @@ export function runFacts(run, now) {
|
|
|
178
147
|
function whereFacts(where, now) {
|
|
179
148
|
if (where.kind === "unsandboxed")
|
|
180
149
|
return { kind: "unsandboxed" };
|
|
181
|
-
const { sandbox, snapshot, keptUntil
|
|
150
|
+
const { sandbox, snapshot, keptUntil } = where;
|
|
182
151
|
return {
|
|
183
152
|
...where,
|
|
184
153
|
keptMinutesLeft: keptUntil === null ? null : Math.max(0, Math.floor((Date.parse(keptUntil) - now.getTime()) / 60_000)),
|
|
185
154
|
sandboxUrl: sandbox === null ? null : sandboxPage(where, sandbox),
|
|
186
155
|
snapshot: snapshot === null ? null : { ...snapshot, url: snapshotPage(where, snapshot.id) },
|
|
187
|
-
save: save?.kind === "saved" ? { ...save, url: snapshotPage(where, save.snapshotId) } : save,
|
|
188
156
|
};
|
|
189
157
|
}
|
|
190
158
|
/** `scope` as the result reports it. */
|
|
@@ -51,46 +51,10 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
|
|
|
51
51
|
id: z.ZodString;
|
|
52
52
|
base: z.ZodString;
|
|
53
53
|
built: z.ZodBoolean;
|
|
54
|
-
branch: z.ZodNullable<z.ZodString>;
|
|
55
|
-
head: z.ZodNullable<z.ZodString>;
|
|
56
|
-
kind: z.ZodNullable<z.ZodEnum<{
|
|
57
|
-
base: "base";
|
|
58
|
-
dev: "dev";
|
|
59
|
-
}>>;
|
|
60
|
-
builtAt: z.ZodNullable<z.ZodString>;
|
|
61
54
|
builtBehind: z.ZodNullable<z.ZodNumber>;
|
|
62
55
|
url: z.ZodString;
|
|
63
56
|
}, z.core.$strip>>;
|
|
64
57
|
uploadBytes: z.ZodNullable<z.ZodNumber>;
|
|
65
|
-
noSaveReason: z.ZodNullable<z.ZodEnum<{
|
|
66
|
-
"already-saved": "already-saved";
|
|
67
|
-
ci: "ci";
|
|
68
|
-
"command-failed": "command-failed";
|
|
69
|
-
"keep-sandbox": "keep-sandbox";
|
|
70
|
-
"no-save-flag": "no-save-flag";
|
|
71
|
-
"not-trusted": "not-trusted";
|
|
72
|
-
recipe: "recipe";
|
|
73
|
-
}>>;
|
|
74
|
-
save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
75
|
-
kind: z.ZodLiteral<"saved">;
|
|
76
|
-
snapshotId: z.ZodString;
|
|
77
|
-
base: z.ZodString;
|
|
78
|
-
branch: z.ZodNullable<z.ZodString>;
|
|
79
|
-
head: z.ZodString;
|
|
80
|
-
ms: z.ZodNumber;
|
|
81
|
-
sizeBytes: z.ZodNumber;
|
|
82
|
-
entryWritten: z.ZodBoolean;
|
|
83
|
-
url: z.ZodString;
|
|
84
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
85
|
-
kind: z.ZodLiteral<"failed">;
|
|
86
|
-
step: z.ZodEnum<{
|
|
87
|
-
"save-snapshot": "save-snapshot";
|
|
88
|
-
scrub: "scrub";
|
|
89
|
-
}>;
|
|
90
|
-
message: z.ZodString;
|
|
91
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
92
|
-
kind: z.ZodLiteral<"stopped">;
|
|
93
|
-
}, z.core.$strip>], "kind">>;
|
|
94
58
|
}, z.core.$strip>], "kind">>;
|
|
95
59
|
git: z.ZodNullable<z.ZodObject<{
|
|
96
60
|
branch: z.ZodNullable<z.ZodString>;
|
|
@@ -180,46 +144,10 @@ declare const _default: import("@vercel/clinkr").CommandDefinition<z.ZodObject<{
|
|
|
180
144
|
id: z.ZodString;
|
|
181
145
|
base: z.ZodString;
|
|
182
146
|
built: z.ZodBoolean;
|
|
183
|
-
branch: z.ZodNullable<z.ZodString>;
|
|
184
|
-
head: z.ZodNullable<z.ZodString>;
|
|
185
|
-
kind: z.ZodNullable<z.ZodEnum<{
|
|
186
|
-
base: "base";
|
|
187
|
-
dev: "dev";
|
|
188
|
-
}>>;
|
|
189
|
-
builtAt: z.ZodNullable<z.ZodString>;
|
|
190
147
|
builtBehind: z.ZodNullable<z.ZodNumber>;
|
|
191
148
|
url: z.ZodString;
|
|
192
149
|
}, z.core.$strip>>;
|
|
193
150
|
uploadBytes: z.ZodNullable<z.ZodNumber>;
|
|
194
|
-
noSaveReason: z.ZodNullable<z.ZodEnum<{
|
|
195
|
-
"already-saved": "already-saved";
|
|
196
|
-
ci: "ci";
|
|
197
|
-
"command-failed": "command-failed";
|
|
198
|
-
"keep-sandbox": "keep-sandbox";
|
|
199
|
-
"no-save-flag": "no-save-flag";
|
|
200
|
-
"not-trusted": "not-trusted";
|
|
201
|
-
recipe: "recipe";
|
|
202
|
-
}>>;
|
|
203
|
-
save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
204
|
-
kind: z.ZodLiteral<"saved">;
|
|
205
|
-
snapshotId: z.ZodString;
|
|
206
|
-
base: z.ZodString;
|
|
207
|
-
branch: z.ZodNullable<z.ZodString>;
|
|
208
|
-
head: z.ZodString;
|
|
209
|
-
ms: z.ZodNumber;
|
|
210
|
-
sizeBytes: z.ZodNumber;
|
|
211
|
-
entryWritten: z.ZodBoolean;
|
|
212
|
-
url: z.ZodString;
|
|
213
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
214
|
-
kind: z.ZodLiteral<"failed">;
|
|
215
|
-
step: z.ZodEnum<{
|
|
216
|
-
"save-snapshot": "save-snapshot";
|
|
217
|
-
scrub: "scrub";
|
|
218
|
-
}>;
|
|
219
|
-
message: z.ZodString;
|
|
220
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
221
|
-
kind: z.ZodLiteral<"stopped">;
|
|
222
|
-
}, z.core.$strip>], "kind">>;
|
|
223
151
|
}, z.core.$strip>], "kind">>;
|
|
224
152
|
git: z.ZodNullable<z.ZodObject<{
|
|
225
153
|
branch: z.ZodNullable<z.ZodString>;
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
tookText,
|
|
18
18
|
totalsText,
|
|
19
19
|
totalsTone
|
|
20
|
-
} from "../../../chunks/chunk-
|
|
20
|
+
} from "../../../chunks/chunk-X4WBJIOF.js";
|
|
21
21
|
import {
|
|
22
22
|
muted,
|
|
23
23
|
path,
|
|
@@ -27,12 +27,12 @@ import {
|
|
|
27
27
|
import "../../../chunks/chunk-NMVODY3P.js";
|
|
28
28
|
import {
|
|
29
29
|
pastRuns
|
|
30
|
-
} from "../../../chunks/chunk-
|
|
31
|
-
import "../../../chunks/chunk-
|
|
32
|
-
import "../../../chunks/chunk-
|
|
30
|
+
} from "../../../chunks/chunk-YGS5VRQT.js";
|
|
31
|
+
import "../../../chunks/chunk-RTILVSYQ.js";
|
|
32
|
+
import "../../../chunks/chunk-6EQKA7LI.js";
|
|
33
33
|
import {
|
|
34
34
|
findConfigFile
|
|
35
|
-
} from "../../../chunks/chunk-
|
|
35
|
+
} from "../../../chunks/chunk-ZDJLKF2G.js";
|
|
36
36
|
import "../../../chunks/chunk-YT5OROR7.js";
|
|
37
37
|
import {
|
|
38
38
|
stormCommands
|
|
@@ -41,46 +41,10 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
|
|
|
41
41
|
id: z.ZodString;
|
|
42
42
|
base: z.ZodString;
|
|
43
43
|
built: z.ZodBoolean;
|
|
44
|
-
branch: z.ZodNullable<z.ZodString>;
|
|
45
|
-
head: z.ZodNullable<z.ZodString>;
|
|
46
|
-
kind: z.ZodNullable<z.ZodEnum<{
|
|
47
|
-
base: "base";
|
|
48
|
-
dev: "dev";
|
|
49
|
-
}>>;
|
|
50
|
-
builtAt: z.ZodNullable<z.ZodString>;
|
|
51
44
|
builtBehind: z.ZodNullable<z.ZodNumber>;
|
|
52
45
|
url: z.ZodString;
|
|
53
46
|
}, z.core.$strip>>;
|
|
54
47
|
uploadBytes: z.ZodNullable<z.ZodNumber>;
|
|
55
|
-
noSaveReason: z.ZodNullable<z.ZodEnum<{
|
|
56
|
-
"already-saved": "already-saved";
|
|
57
|
-
ci: "ci";
|
|
58
|
-
"command-failed": "command-failed";
|
|
59
|
-
"keep-sandbox": "keep-sandbox";
|
|
60
|
-
"no-save-flag": "no-save-flag";
|
|
61
|
-
"not-trusted": "not-trusted";
|
|
62
|
-
recipe: "recipe";
|
|
63
|
-
}>>;
|
|
64
|
-
save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
65
|
-
kind: z.ZodLiteral<"saved">;
|
|
66
|
-
snapshotId: z.ZodString;
|
|
67
|
-
base: z.ZodString;
|
|
68
|
-
branch: z.ZodNullable<z.ZodString>;
|
|
69
|
-
head: z.ZodString;
|
|
70
|
-
ms: z.ZodNumber;
|
|
71
|
-
sizeBytes: z.ZodNumber;
|
|
72
|
-
entryWritten: z.ZodBoolean;
|
|
73
|
-
url: z.ZodString;
|
|
74
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
75
|
-
kind: z.ZodLiteral<"failed">;
|
|
76
|
-
step: z.ZodEnum<{
|
|
77
|
-
"save-snapshot": "save-snapshot";
|
|
78
|
-
scrub: "scrub";
|
|
79
|
-
}>;
|
|
80
|
-
message: z.ZodString;
|
|
81
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
82
|
-
kind: z.ZodLiteral<"stopped">;
|
|
83
|
-
}, z.core.$strip>], "kind">>;
|
|
84
48
|
}, z.core.$strip>], "kind">>;
|
|
85
49
|
git: z.ZodNullable<z.ZodObject<{
|
|
86
50
|
branch: z.ZodNullable<z.ZodString>;
|