@unotest/protocol 0.48.0 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,54 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.49.0] - 2026-10-09
4
+
5
+ ### Minor Changes
6
+
7
+ - 3531ce6: A collection can set the browser window of its scenarios.
8
+
9
+ - `viewport:` in a collection's YAML: `null` for the real browser window, `{width, height}` for an emulated size. It replaces the project's `viewport` for every scenario the collection runs; the same scenario run on its own keeps the project's window. It works with a browser profile, where `setViewport(null)` is refused.
10
+ - A wrong value is refused with what to write instead. `viewport: null` over a project `device` is refused before the first scenario starts, as in the config.
11
+ - The `setViewport(null)` refusal on a browser profile now points at the collection field.
12
+ - The viewer's collection editor keeps a hand-written `viewport:` and `prepare:` when it saves a collection.
13
+
14
+ - 970813c: A scenario file can hold several `test_*` functions, and each one is a test of its own: its own run, browser context, retry and verdict, with its own failure bundle, screenshots and console. Functions of the file are shared between its tests; state is not. `npx @unotest/web e2e <file>` plays them in order and exits 1 when any of them failed. A file with one test runs exactly as before. `e2e <file> --test <name>` plays one test, named as the function is or without its `test_` prefix. A name the file does not have is refused with exit 2 and the list of its tests.
15
+
16
+ `// @expect-fail` can mark one test: put it in the `//` comments directly above that test's `function` line, with no blank line between. A marker in the file's leading comments, set apart from the first function by a blank line, still marks every test of the file.
17
+
18
+ The MCP tool `run_test` takes `test` too. A debug session follows one test, so for a file that holds several, `run_test` without `test` starts nothing and answers with the tests and the call to make:
19
+
20
+ ```json
21
+ {
22
+ "status": "test_required",
23
+ "reason": "auth/login holds 3 tests; run_test plays one — name it in `test`.",
24
+ "tests": ["test_login_ok", "test_login_locked", "test_logout"],
25
+ "next": "run_test {name: \"auth/login\", test: \"test_login_ok\"}"
26
+ }
27
+ ```
28
+
29
+ An unknown `test` answers `status: "test_not_found"` with the same list.
30
+
31
+ A collection counts tests, not files. A file of three tests is three verdicts: its line in the `collection` output says `✗ <file> — 1 of 3 failed` and lists each test under it, and the summary counts passed, failed and skipped tests. A file that never started (bailed or busy) is still counted as one file.
32
+
33
+ The viewer shows each test on its own. A file of several tests is a node in the scenarios tree with one row per test, and the chevron opens it from the keyboard too (ArrowRight / ArrowLeft). The file's tab shows the steps of every test under its name. The file's dot and status sum its tests up: failed when one failed, skipped only when all of them skipped, failed on purpose only when every test that ran was expected to fail, otherwise passed. History shows each test's run under the file's run, and can be filtered to one test. A test's run tab shows its own steps, screenshots, console and failure, titled `file › test`, and Run again runs that test only. Home and a collection run's summary count tests, and the Home card says "tests". A link to a test's run opens that test, with its name and status in the tab.
34
+
35
+ `lint:one-test-per-file` no longer reports anything: several `test_*` in one file is now the way to write a suite of related tests.
36
+
37
+ A test that skips itself (`skip(reason)`) now shows as **skipped**, not as passed. The run tree, the history strip, the run tab (its progress bar included) and the overview draw it grey with its reason, the overview gets a "skipped" card when any test's last run skipped and no longer calls such a field "Everything is green", and a collection row counts skipped tests apart from passed ones. A run still in progress that ends in a skip turns skipped at once, without a reload. `box run` prints `(skipped)` with the reason, and its `--json` answer carries `skipReason`. Like a local `e2e`, it exits 0 on a skip.
38
+
39
+ **Migration:** `RunStatus` has a new value, `"skipped"`, and `RunMeta` and the scenario index entry carry the reason (`skipReason`, `lastSkipReason`). Code that switches over `RunStatus` exhaustively must handle the new value. Code that treated `"passed"` as "finished without failing" should accept `"skipped"` as well. The run index schema version moves to 3: the viewer discards an older index on start and rebuilds it from the runs on disk. Past skipped runs then show as skipped too.
40
+
41
+ **Migration:** the run journal has two new event kinds, `file-run:test-started` and `file-run:test-finished`, written by the run of a file with several tests. Code that switches over journal events exhaustively must handle them. Runs, manifests and `run:started` carry `test` (the function name). Its tests point at the file's run through `parentRunId`, as a collection's scenarios point at the collection's.
42
+
43
+ **Migration:** `lint:one-test-per-file` is deprecated and does nothing. A config that sets it (`"lint:one-test-per-file": "error"`) still loads; remove the entry when convenient. The rule id goes away in the next major version.
44
+
45
+ ### Patch Changes
46
+
47
+ - aac77aa: A failed step now brings its notes and the whole diff along.
48
+
49
+ - A failed statement carries the `note(label, value)` calls of its `step(...)` block: printed under the error in the `e2e` output as `note label: value`, and returned as `lastFailure.notes` (the `error` of a `run_test` reply). Secrets are masked as in the run journal. A nested step reports its own notes; a step that noted nothing reports an empty list.
50
+ - `assertEqual` shows every line of its diff. The `… N unchanged …` folding is gone from its failure message.
51
+
3
52
  ## [0.48.0] - 2026-10-08
4
53
 
5
54
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -435,6 +435,10 @@ interface RunStartedEvent extends RunArtifactBase {
435
435
  runId: RunId;
436
436
  /** Scenario `name` (file stem relative to `e2e/`). */
437
437
  scenario: string;
438
+ /** The `test_*` function this run is, as written in the file. Absent on
439
+ * the run of a FILE that holds several tests (it groups them) and on
440
+ * runs written before 0.49.0. */
441
+ test?: string;
438
442
  }
439
443
  /** Every event of a step carries the browser context it was written in,
440
444
  * once the test has opened a second one (`newContext()`): 0 is the run's
@@ -822,7 +826,25 @@ interface ToolResultEvent extends RunArtifactBase {
822
826
  };
823
827
  }
824
828
  /** Discriminated union of every JSONL event the scenario runner emits. */
825
- type RunArtifact = RunStartedEvent | StepStartedEvent | StepOkEvent | StepFailEvent | StepBlockStartedEvent | StepBlockFinishedEvent | TeardownStartedEvent | TeardownFinishedEvent | TeardownSkippedEvent | NoteEvent | LogEvent | LoopIterationEvent | ScreenshotEvent | DownloadEvent | JudgeVerdictEvent | VisualAssertEvent | FailureBundleWrittenEvent | PausedEvent | ResumedEvent | LocatorPickedEvent | WheelChangedEvent | ProbeResultEvent | ToolCallEvent | ToolResultEvent | RunFinishedEvent;
829
+ type RunArtifact = RunStartedEvent | StepStartedEvent | StepOkEvent | StepFailEvent | StepBlockStartedEvent | StepBlockFinishedEvent | TeardownStartedEvent | TeardownFinishedEvent | TeardownSkippedEvent | NoteEvent | LogEvent | LoopIterationEvent | ScreenshotEvent | DownloadEvent | JudgeVerdictEvent | VisualAssertEvent | FailureBundleWrittenEvent | PausedEvent | ResumedEvent | LocatorPickedEvent | WheelChangedEvent | ProbeResultEvent | ToolCallEvent | ToolResultEvent | FileRunTestStartedEvent | FileRunTestFinishedEvent | RunFinishedEvent;
830
+ /** How one test of a group ended — the line a file run writes for it, and
831
+ * the entry a collection reports for each test of the file it ran. */
832
+ interface TestRunOutcome {
833
+ /** The `test_*` function, as written in the file. */
834
+ test: string;
835
+ testRunId: RunId;
836
+ outcome: RunOutcome;
837
+ /** Set when the test skipped itself; the outcome is then `completed`. */
838
+ skipReason?: string;
839
+ }
840
+ interface FileRunTestStartedEvent extends RunArtifactBase {
841
+ kind: "file-run:test-started";
842
+ test: string;
843
+ testRunId: RunId;
844
+ }
845
+ interface FileRunTestFinishedEvent extends RunArtifactBase, TestRunOutcome {
846
+ kind: "file-run:test-finished";
847
+ }
826
848
  interface CollectionRunStartedEvent extends RunArtifactBase {
827
849
  kind: "collection-run:started";
828
850
  runId: RunId;
@@ -842,6 +864,9 @@ interface CollectionScenarioFinishedEvent extends RunArtifactBase {
842
864
  scenarioRunId: RunId;
843
865
  scenario: string;
844
866
  outcome: RunOutcome;
867
+ /** One entry per test when the scenario file held several: the outcome
868
+ * above is the worst of them. Absent for a one-test file. Since 0.49.0. */
869
+ tests?: TestRunOutcome[];
845
870
  }
846
871
  interface CollectionRunFinishedEvent extends RunArtifactBase {
847
872
  kind: "collection-run:finished";
@@ -854,6 +879,9 @@ interface ScenarioRunRequest {
854
879
  kind: "scenario";
855
880
  /** Scenario `name` — file stem relative to `unotest/e2e/`. */
856
881
  scenario: string;
882
+ /** One `test_*` of the file instead of all of them, by function name.
883
+ * Since 0.49.0. */
884
+ test?: string;
857
885
  /** Run with browser visible (web) / device window visible (mobile).
858
886
  * Adapter maps this to the runner's preferred env / arg. */
859
887
  headed?: boolean;
@@ -905,9 +933,26 @@ type RunRequest = ScenarioRunRequest | CollectionRunRequest | AuthoringRunReques
905
933
  /** All `kind` literals — useful for switch-completeness checks and for
906
934
  * adapter `supportedKinds` lists. */
907
935
  type RunKind = RunRequest["kind"];
936
+ type TestSelection = {
937
+ tests: readonly string[];
938
+ } | {
939
+ refusal: string;
940
+ };
941
+ /** `requested` is the `--test` value: absent plays every entry, a name
942
+ * plays that test — written as the function is, or without `test_`. A
943
+ * name the file does not have is refused with the names it does, so the
944
+ * next try is a copy, not a guess. */
945
+ declare function selectTests(entries: readonly string[], requested: string | undefined, scenario: string): TestSelection;
946
+ /** A run asked for a test its file does not have. The message is the
947
+ * refusal {@link selectTests} words, the same on every surface. */
948
+ declare class UnknownTestError extends Error {
949
+ constructor(refusal: string);
950
+ }
908
951
 
909
- /** Lifecycle stage as inferred by the server when listing runs. */
910
- type RunStatus = "running" | "passed" | "failed" | "aborted" | "interrupted";
952
+ /** Lifecycle stage as inferred by the server when listing runs.
953
+ * `skipped` is a run that finished `completed` after the test skipped
954
+ * itself (`skip(reason)`): it proved nothing, so it is not `passed`. */
955
+ type RunStatus = "running" | "passed" | "skipped" | "failed" | "aborted" | "interrupted";
911
956
  interface RunMeta {
912
957
  runId: RunId;
913
958
  kind: RunKind;
@@ -925,11 +970,18 @@ interface RunMeta {
925
970
  status: RunStatus;
926
971
  /** Terminal outcome from `run:finished`, or null if still running. */
927
972
  outcome: RunOutcome | null;
928
- /** Run-id of the parent collection-run when this is a child scenario
929
- * spawned inside one. Absent for top-level scenarios and for
930
- * collection-runs themselves. Populated by the writer from the
931
- * child's `manifest.json`. */
973
+ /** Why the test skipped itself, from `run:finished`. Present exactly
974
+ * when `status` is `skipped`. */
975
+ skipReason?: string;
976
+ /** Run-id of the group this run belongs to: a collection-run, or the
977
+ * run of a file with several tests. Absent for top-level runs and for
978
+ * collection-runs themselves. Populated from the child's
979
+ * `manifest.json`. */
932
980
  parentRunId?: string;
981
+ /** The `test_*` function this run is, from its manifest. Absent on the
982
+ * run of a file with several tests (it groups them), on collection-runs
983
+ * and on runs written before 0.49.0. */
984
+ test?: string;
933
985
  /** Which test bundle produced this run, from its manifest. Absent for
934
986
  * every local run; on a box it is what tells two runs of the same
935
987
  * scenario apart when the environment moved to another bundle between
@@ -939,8 +991,8 @@ interface RunMeta {
939
991
 
940
992
  /** Bumped when a line's shape changes incompatibly. A file whose header
941
993
  * carries a different version is discarded and rebuilt rather than
942
- * half-parsed. */
943
- declare const RUN_INDEX_SCHEMA_VERSION = 2;
994
+ * half-parsed. 3: `skipped` status — a v2 line filed a skip as passed. */
995
+ declare const RUN_INDEX_SCHEMA_VERSION = 3;
944
996
  /** How many past outcomes a scenario's rolling window keeps. Twelve is
945
997
  * enough to see a flake and small enough that the whole field of them
946
998
  * fits one JSON file. Exported so the fold and everything that renders
@@ -964,6 +1016,9 @@ interface ScenarioLatestEntry {
964
1016
  lastAt: number;
965
1017
  /** Wall-clock of the last run, or null if it never finished. */
966
1018
  lastDurationMs: number | null;
1019
+ /** Why the last run skipped itself. Present exactly when `lastStatus`
1020
+ * is `skipped`, so a tile can say why it is grey without a run read. */
1021
+ lastSkipReason?: string;
967
1022
  /** Up to {@link SCENARIO_RECENT_WINDOW} past outcomes, OLDEST FIRST.
968
1023
  * Answers the one question a single last status cannot: does this
969
1024
  * test flake. Kept here rather than fetched per scenario because the
@@ -976,7 +1031,15 @@ interface ScenarioLatestEntry {
976
1031
  failStreak: number;
977
1032
  /** Start of the current failing streak, or null when not failing. */
978
1033
  failingSince: number | null;
979
- }
1034
+ /** The same state per test, for a file with several `test_*`: keyed by
1035
+ * function name, folded from the file runs' journals and from runs of a
1036
+ * single test (`--test`) once the file is known to hold several. The
1037
+ * fields above are then the FILE's — the last run of it. Absent for a
1038
+ * one-test file. Since 0.49.0. */
1039
+ tests?: Record<string, TestLatestEntry>;
1040
+ }
1041
+ /** A test's own rolling state inside its file's entry. */
1042
+ type TestLatestEntry = Omit<ScenarioLatestEntry, "tests">;
980
1043
  interface ScenariosLatest {
981
1044
  v: number;
982
1045
  scenarios: Record<string, ScenarioLatestEntry>;
@@ -984,69 +1047,61 @@ interface ScenariosLatest {
984
1047
  /** Status values that count as a failure for streak purposes. `aborted`
985
1048
  * is excluded: the user stopped it, the test did not fail. */
986
1049
  declare function isFailingStatus(status: RunStatus): boolean;
1050
+ /** The status a finished run is listed under: a `completed` run that
1051
+ * skipped itself proved nothing, so it is not `passed`. */
1052
+ declare function runStatusOf(outcome: RunOutcome, skipReason: string | undefined): RunStatus;
987
1053
  /** Fold one newer run into a scenario's rolling state. Pure so the live
988
- * path and the rebuild path cannot disagree about what a streak is. */
989
- declare function foldScenarioRun(prev: ScenarioLatestEntry | undefined, run: Pick<RunMeta, "runId" | "status" | "startedAt" | "durationMs">): ScenarioLatestEntry;
1054
+ * path and the rebuild path cannot disagree about what a streak is. A
1055
+ * file's per-test state rides along untouched: the file's own run says
1056
+ * nothing about any one test. */
1057
+ declare function foldScenarioRun(prev: ScenarioLatestEntry | undefined, run: Pick<RunMeta, "runId" | "status" | "startedAt" | "durationMs" | "skipReason">): ScenarioLatestEntry;
1058
+ /** Fold one newer run of `test` into its file's entry, under `tests`. */
1059
+ declare function foldTestRun(entry: ScenarioLatestEntry, test: string, run: Pick<RunMeta, "runId" | "status" | "startedAt" | "durationMs" | "skipReason">): ScenarioLatestEntry;
990
1060
  /** Filename for a scenario's index. `encodeURIComponent` because scenario
991
1061
  * refs carry `/` (`big-table/edit-dialog`) and must not become nested
992
1062
  * directories — and because it is reversible, so the ref can be read
993
1063
  * back off the filename without a side table. */
994
1064
  declare function scenarioIndexFileName(ref: string): string;
1065
+ /** Filename for the index of one test of a file with several: the runs
1066
+ * its file runs played. `@` never appears raw in an encoded ref, so the
1067
+ * name cannot collide with a scenario's own index. */
1068
+ declare function testIndexFileName(ref: string, test: string): string;
995
1069
  /** Inverse of `scenarioIndexFileName`. */
996
1070
  declare function scenarioRefFromFileName(fileName: string): string | null;
997
1071
 
998
- declare const BOX_RUNS_SEGMENT = "runs";
999
- /** Set by the guard, forwarded by the viewer verbatim, verified by the
1000
- * daemon: WHO clicked, in a form the thing in between cannot write.
1001
- * Named here because three packages have to spell it identically and
1002
- * this is the one they all already depend on — the signing and the
1003
- * verification live on the box side (`@unotest/box-kit`), which is
1004
- * where the secret is. */
1005
- declare const ACTOR_TICKET_HEADER = "x-unotest-actor-ticket";
1006
- /** Set by the guard on its own requests to the daemon. The daemon reads
1007
- * the actor label only next to a valid one. */
1008
- declare const GUARD_SECRET_HEADER = "x-unotest-guard-secret";
1009
- /** `/api/box/envs/<project>/<env>/runs`. */
1010
- declare function boxRunsPath(project: string, environment: string): string;
1011
- /** `/api/box/envs/<project>/<env>/runs/<runId>`. */
1012
- declare function boxRunPath(project: string, environment: string, runId: string): string;
1013
- /** What the viewer asks for. Deliberately not the viewer's own
1014
- * `RunRequest`: that one carries local concerns (worker counts, debug
1015
- * flags) the box decides for itself, and a box route that accepted them
1016
- * would be a second way to configure a run. */
1017
- interface BoxRunRequest {
1018
- kind: "collection" | "scenario";
1019
- /** Collection name, or a scenario ref (`folder/test`). */
1020
- ref: string;
1021
- }
1022
- /** The daemon accepted the ticket. The run has NOT started — on a busy
1023
- * box it may wait behind a suite for a while, which is the whole point
1024
- * of there being one queue.
1025
- *
1026
- * No ticket name: the queue's file names are the box's own business,
1027
- * and stopping a run goes back through `DELETE …/runs/<runId>` rather
1028
- * than through the queue directly. The run id is the only handle a
1029
- * caller needs, and the only one it is given. */
1030
- interface BoxRunAccepted {
1031
- runId: string;
1032
- acceptedAt: number;
1033
- }
1034
- type BoxRunState = "queued" | "running" | "finished";
1035
- interface BoxRunStatus {
1036
- runId: string;
1037
- state: BoxRunState;
1038
- /** Present once the run ended. `null` when it died on a signal. */
1039
- exitCode?: number | null;
1040
- startedAt?: number;
1041
- finishedAt?: number;
1042
- }
1043
- declare function parseBoxRunRequest(value: unknown): BoxRunRequest | null;
1044
- declare function parseBoxRunAccepted(value: unknown): BoxRunAccepted | null;
1045
- declare function parseBoxRunStatus(value: unknown): BoxRunStatus | null;
1046
-
1047
1072
  /** The variable a box injects an environment's target under — what the
1048
1073
  * suite's `baseUrl` auto-wires from. */
1049
1074
  declare const TARGET_ENV_VAR = "APP_BASE_URL";
1075
+ /** The run's id, set by a box on every run it starts. */
1076
+ declare const RUN_ID_ENV = "UNOTEST_RUN_ID";
1077
+ /** The environment a run belongs to: its runs suffix and the overlay the
1078
+ * suite loads. */
1079
+ declare const ENVIRONMENT_ENV = "UNOTEST_ENV";
1080
+ /** `0` tells the runner not to write editor typings. */
1081
+ declare const EDITOR_TYPES_ENV = "UNOTEST_EDITOR_TYPES";
1082
+ /** Set by a lease holder on every child it spawns. A process that sees
1083
+ * it is already covered by someone's slot and must not queue again —
1084
+ * this is the "top-level run" boundary (a collection's scenario
1085
+ * subprocesses). Value: the holder's runId, for diagnostics. */
1086
+ declare const QUEUE_LEASE_ENV = "UNOTEST_QUEUE_LEASE";
1087
+ /** What a box says about a run by setting it on the run's process: which
1088
+ * run, of which environment, from which bundle, who asked, under whose
1089
+ * queue slot, which of its values are secret. An environment's values
1090
+ * are refused under these names, and a run gets them written after the
1091
+ * values — a value spelled like one would otherwise speak for the box
1092
+ * (`UNOTEST_BUNDLE_ID=""` turns a box run into a local one).
1093
+ *
1094
+ * Not every `UNOTEST_*` ({@link isRunnerSetting}): an operator sets the
1095
+ * runner's own settings on an environment on purpose, and a box's browser
1096
+ * policy (`UNOTEST_BROWSER_CHANNEL`) is overridable there by design. */
1097
+ declare const RUN_IDENTITY_ENV_NAMES: readonly string[];
1098
+ declare function isRunIdentityEnvName(name: string): boolean;
1099
+ /** Why such a name is not a value, worded once for the box's refusal and
1100
+ * for the CLI that refuses it before asking. */
1101
+ declare function runIdentityRefusal(names: readonly string[]): string;
1102
+ /** The values an environment hands a run, less any spelled like the
1103
+ * run's identity — one stored before the box refused such names. */
1104
+ declare function withoutRunIdentity(values: Readonly<Record<string, string>>): Record<string, string>;
1050
1105
  /** Prefix of the runner's own settings (`UNOTEST_HEADED`,
1051
1106
  * `UNOTEST_LOG_LEVEL`, …). They configure the machine a run happens on,
1052
1107
  * never the suite, so an environment on a box neither receives them from
@@ -1160,6 +1215,9 @@ declare function reservedBoxValueNames(request: {
1160
1215
  variables: Record<string, unknown>;
1161
1216
  secrets: Record<string, unknown>;
1162
1217
  }): string[];
1218
+ /** The target ({@link TARGET_ENV_VAR}) and the run's identity
1219
+ * ({@link RUN_IDENTITY_ENV_NAMES}): the box sets them itself. */
1220
+ declare function isReservedBoxValueName(name: string): boolean;
1163
1221
  /** Names per layer; `target` says whether the override is among them. */
1164
1222
  interface BoxValueNames {
1165
1223
  target: boolean;
@@ -1293,6 +1351,58 @@ interface BoxEnvValuesView {
1293
1351
  secrets: string[];
1294
1352
  }
1295
1353
 
1354
+ declare const BOX_RUNS_SEGMENT = "runs";
1355
+ /** Set by the guard, forwarded by the viewer verbatim, verified by the
1356
+ * daemon: WHO clicked, in a form the thing in between cannot write.
1357
+ * Named here because three packages have to spell it identically and
1358
+ * this is the one they all already depend on — the signing and the
1359
+ * verification live on the box side (`@unotest/box-kit`), which is
1360
+ * where the secret is. */
1361
+ declare const ACTOR_TICKET_HEADER = "x-unotest-actor-ticket";
1362
+ /** Set by the guard on its own requests to the daemon. The daemon reads
1363
+ * the actor label only next to a valid one. */
1364
+ declare const GUARD_SECRET_HEADER = "x-unotest-guard-secret";
1365
+ /** `/api/box/envs/<project>/<env>/runs`. */
1366
+ declare function boxRunsPath(project: string, environment: string): string;
1367
+ /** `/api/box/envs/<project>/<env>/runs/<runId>`. */
1368
+ declare function boxRunPath(project: string, environment: string, runId: string): string;
1369
+ /** What the viewer asks for. Deliberately not the viewer's own
1370
+ * `RunRequest`: that one carries local concerns (worker counts, debug
1371
+ * flags) the box decides for itself, and a box route that accepted them
1372
+ * would be a second way to configure a run. */
1373
+ interface BoxRunRequest {
1374
+ kind: "collection" | "scenario";
1375
+ /** Collection name, or a scenario ref (`folder/test`). */
1376
+ ref: string;
1377
+ /** With `kind: "scenario"`: one `test_*` of the file, by function name.
1378
+ * Since 0.49.0. */
1379
+ test?: string;
1380
+ }
1381
+ /** The daemon accepted the ticket. The run has NOT started — on a busy
1382
+ * box it may wait behind a suite for a while, which is the whole point
1383
+ * of there being one queue.
1384
+ *
1385
+ * No ticket name: the queue's file names are the box's own business,
1386
+ * and stopping a run goes back through `DELETE …/runs/<runId>` rather
1387
+ * than through the queue directly. The run id is the only handle a
1388
+ * caller needs, and the only one it is given. */
1389
+ interface BoxRunAccepted {
1390
+ runId: string;
1391
+ acceptedAt: number;
1392
+ }
1393
+ type BoxRunState = "queued" | "running" | "finished";
1394
+ interface BoxRunStatus {
1395
+ runId: string;
1396
+ state: BoxRunState;
1397
+ /** Present once the run ended. `null` when it died on a signal. */
1398
+ exitCode?: number | null;
1399
+ startedAt?: number;
1400
+ finishedAt?: number;
1401
+ }
1402
+ declare function parseBoxRunRequest(value: unknown): BoxRunRequest | null;
1403
+ declare function parseBoxRunAccepted(value: unknown): BoxRunAccepted | null;
1404
+ declare function parseBoxRunStatus(value: unknown): BoxRunStatus | null;
1405
+
1296
1406
  /** Run endpoint, relative to the box origin:
1297
1407
  * `POST <origin>/api/box/ci/run` with `Authorization: Bearer <token>` —
1298
1408
  * the same project token that uploaded the bundle. */
@@ -1456,13 +1566,20 @@ declare const CI_RUN_LINES_MAX = 500;
1456
1566
  * masked before the line leaves the box. */
1457
1567
  interface CiRunLine {
1458
1568
  kind: "scenario-started" | "step-failed" | "log" | "note" | "scenario-finished";
1459
- /** The scenario the line belongs to. */
1569
+ /** Display label of what the line belongs to: the scenario file, or
1570
+ * `file › test` for one test of a file of several. Not a ref — nothing
1571
+ * is to be built from it. */
1460
1572
  scenario: string;
1461
1573
  /** `step-failed`: `file:line ErrorName: message`; `log` / `note`: the
1462
1574
  * text (a note as `label: text`); the scenario lines: empty. */
1463
1575
  text: string;
1464
1576
  /** `scenario-finished` only. */
1465
1577
  outcome?: RunOutcome;
1578
+ /** `scenario-finished` only: the test skipped itself (`skip(reason)`),
1579
+ * so the `completed` above proved nothing. A field beside the outcome,
1580
+ * not an outcome of its own: a client older than it rejects an answer
1581
+ * whose outcome it does not know, and drops a key it does not. */
1582
+ skipReason?: string;
1466
1583
  }
1467
1584
  interface CiRunLines {
1468
1585
  runId: string;
@@ -1498,11 +1615,7 @@ declare const QUEUE_SLOTS_DIR = "slots";
1498
1615
  /** Mutex file for the all-or-nothing weight claim in a global pool.
1499
1616
  * Short-lived by construction; a stale one is reaped like any lease. */
1500
1617
  declare const QUEUE_MUTEX_FILE = ".mutex";
1501
- /** Set by a lease holder on every child it spawns. A process that sees
1502
- * it is already covered by someone's slot and must not queue again —
1503
- * this is the "top-level run" boundary (a collection's scenario
1504
- * subprocesses). Value: the holder's runId, for diagnostics. */
1505
- declare const QUEUE_LEASE_ENV = "UNOTEST_QUEUE_LEASE";
1618
+
1506
1619
  /** Escape hatch: `1` runs without touching the queue at all. */
1507
1620
  declare const QUEUE_DISABLED_ENV = "UNOTEST_NO_QUEUE";
1508
1621
  /** Optional host-wide weight pool shared by every environment on the
@@ -2063,10 +2176,14 @@ interface RunManifest {
2063
2176
  * The `runId` directory uses a sanitized form; this carries the
2064
2177
  * human-readable original. */
2065
2178
  ref: string;
2066
- /** Run-id of the parent collection-run when this is a child scenario
2067
- * spawned inside a collection. Absent for top-level scenario-runs
2068
- * and for collection-runs themselves. */
2179
+ /** Run-id of the group this run belongs to: the collection-run that
2180
+ * spawned this scenario, or the file run when this is one test of a
2181
+ * file with several. Absent for top-level runs and for collection-runs
2182
+ * themselves. */
2069
2183
  parentRunId?: string;
2184
+ /** The `test_*` function this run is. Absent on the run of a file with
2185
+ * several tests, which groups them. Since 0.49.0. */
2186
+ test?: string;
2070
2187
  /** Adapter `name` that produced this run (`"@unotest/web"`,
2071
2188
  * `"@unotest/mobile"`). Lets the viewer pick rendering details for
2072
2189
  * runner-specific bundle contents without runner branches in core
@@ -2802,7 +2919,29 @@ interface CollectionMeta {
2802
2919
  * for the want of a table. A schedules entry may still name its own
2803
2920
  * `prepare` (it wins for that tick), and `--no-prepare` skips it. */
2804
2921
  prepare: string | null;
2805
- }
2922
+ /** Optional `viewport:` from the YAML — the browser window of every
2923
+ * scenario this collection runs, over the project's `viewport`.
2924
+ * `null` is the real window (no size emulation); `{width, height}` an
2925
+ * emulated size. Absent → the project's setting applies. A setting
2926
+ * of the collection, not of a scenario file: the same scenario run on
2927
+ * its own keeps the project's. Since 0.49.0. */
2928
+ viewport?: CollectionViewport;
2929
+ }
2930
+ /** `viewport:` of a collection: the real window, or an emulated size. */
2931
+ type CollectionViewport = {
2932
+ width: number;
2933
+ height: number;
2934
+ } | null;
2935
+ /** Read a collection's raw `viewport:` value. Shared by the parsers of
2936
+ * the runner and the viewer so both accept and refuse the same values;
2937
+ * each wraps `reason` in its own error with the file's path. */
2938
+ declare function parseCollectionViewport(raw: unknown): {
2939
+ ok: true;
2940
+ viewport: CollectionViewport;
2941
+ } | {
2942
+ ok: false;
2943
+ reason: string;
2944
+ };
2806
2945
 
2807
2946
  /** The collection `init` writes into a new project, and the one the box's
2808
2947
  * screen shows as an example. Named once so the two cannot disagree:
@@ -3016,6 +3155,34 @@ declare function isAnnotationLine(line: string): boolean;
3016
3155
  * comments and stops at the first line of code — an `// @expect-fail`
3017
3156
  * further down the file is a comment about a step, not about the test. */
3018
3157
  declare function parseScenarioAnnotations(source: string): ScenarioAnnotations;
3158
+ /** The markers of ONE `test_*` in a file that may hold several.
3159
+ *
3160
+ * Two places mark a test, and each says whom it is about by where it sits:
3161
+ *
3162
+ * - the `//` lines directly above its `function` line — consecutive,
3163
+ * no blank line between — belong to THAT test, the first one of the
3164
+ * file included;
3165
+ * - the file's leading comments, set apart from the first function by a
3166
+ * blank line, mark EVERY test in the file.
3167
+ *
3168
+ * // @expect-fail <- every test in the file
3169
+ *
3170
+ * // The badge must stay hidden.
3171
+ * // @expect-fail <- test_badge_hidden only
3172
+ * function test_badge_hidden() { ... }
3173
+ *
3174
+ * Adjacency is the rule a reader already applies: a comment touching a
3175
+ * function is about that function. Reading the block above the FIRST test
3176
+ * as the file's would put every test of the file under an expected
3177
+ * failure for a marker its author wrote above one, and a real red in its
3178
+ * neighbours would hide behind it. In a one-test file both readings
3179
+ * agree, which is why {@link parseScenarioAnnotations} keeps its own.
3180
+ *
3181
+ * `functionLine` is the 1-based line of the `function` keyword, as the
3182
+ * DSL parser reports it. Line-based like the rest of this module: only
3183
+ * `//` lines that stand alone count — `foo(); // @expect-fail` is a note
3184
+ * about `foo()`. */
3185
+ declare function parseTestAnnotations(source: string, functionLine: number): ScenarioAnnotations;
3019
3186
 
3020
3187
  /** Parsed scenario metadata from the mandatory header lines
3021
3188
  * (per design-v0/decisions.md, "Test source format"):
@@ -3045,6 +3212,18 @@ interface ScenarioMeta {
3045
3212
  * healthy state, and a green one is the alarm. See
3046
3213
  * {@link ./scenario-annotations.ts}. */
3047
3214
  expectFail: boolean;
3215
+ /** The `test_*` functions of a file that holds several, in file order —
3216
+ * each its own run, its own row under the file. Absent for a file with
3217
+ * one test, which stays a single row. Since 0.49.0. */
3218
+ tests?: ScenarioTest[];
3219
+ }
3220
+ /** One `test_*` of a scenario file with several. */
3221
+ interface ScenarioTest {
3222
+ /** The function name, as written: `test_badge_hidden`. */
3223
+ name: string;
3224
+ /** Marked `// @expect-fail` — by the file's leading block or by the
3225
+ * comments touching its own `function` line. */
3226
+ expectFail: boolean;
3048
3227
  }
3049
3228
 
3050
3229
  /** Response of `GET /api/scenarios`. Folders are listed independently of
@@ -3688,6 +3867,14 @@ interface RuntimeStateFile {
3688
3867
  /** True when the failure happened inside a `step.soft(...)` block —
3689
3868
  * the run went on past it. Since 0.31.0. */
3690
3869
  soft?: boolean;
3870
+ /** `note(label, value)` calls of the failing statement's `step(...)`
3871
+ * block (the innermost one), in call order, secrets masked. Empty
3872
+ * when the block noted nothing; absent from runners that do not
3873
+ * collect them. Since 0.49.0. */
3874
+ notes?: Array<{
3875
+ label: string;
3876
+ text: string;
3877
+ }>;
3691
3878
  } | null;
3692
3879
  /** Every `step.soft(...)` block that failed so far, in run order —
3693
3880
  * what the test's verdict lists. Absent on runs recorded before
@@ -3919,4 +4106,4 @@ interface CloudApiRouteMatch {
3919
4106
  */
3920
4107
  declare function matchCloudApiRoute(method: string, path: string): CloudApiRouteMatch | undefined;
3921
4108
 
3922
- export { ACTOR_TICKET_HEADER, ARTIFACTS_ROOT_ENV, type AddVariablePlan, type AddVariablePlanInput, type AppPathPickerSpec, type AppServerEvent, type ApprovalAction, type ApprovalPrice, type AuthoringRunRequest, BLOBS_DIR, BOX_DELETE_CONSEQUENCE, BOX_ENV_VALUES_SEGMENT, BOX_NOTIFY_CHANNEL_KINDS, BOX_NOTIFY_EVENTS, BOX_NOTIFY_PATH, BOX_NOTIFY_STATES, BOX_NOTIFY_TRIGGER_KINDS, BOX_PUSH_TOKEN_PREFIX, BOX_READ_ENVIRONMENTS_PATH, BOX_READ_ENVIRONMENT_HEADER, BOX_READ_TOKEN_ENV, BOX_READ_TOKEN_PREFIX, BOX_REVEAL_SEGMENT, BOX_REVOCATIONS_RETRY_AFTER_SECONDS, BOX_RUNS_SEGMENT, BOX_SECRET_NAMES_ENV, BOX_SIGNED_TOKEN, BOX_SIGNED_TOKEN_PREFIX, BOX_TOKEN_ENV, BOX_URL_ENV, BOX_VALUES_PATH, BOX_VARIABLE_NAMES_ENV, BROWSER_CHANNEL_ENV, BROWSER_ENV, BUNDLED_BROWSER_CHANNEL, BUNDLE_ID_ENV, BUNDLE_MANIFEST_FILE, BUNDLE_SCHEMA_VERSION, BUNDLE_UPLOAD_PATH, type BoxEnvValuesReplaceRequest, type BoxEnvValuesView, type BoxNotifyChanged, type BoxNotifyChannelKind, type BoxNotifyChannelView, type BoxNotifyChannelWrite, type BoxNotifyEnabledPatch, type BoxNotifyError, type BoxNotifyErrorCode, type BoxNotifyEvent, type BoxNotifyLastDelivery, type BoxNotifyMute, type BoxNotifyMuteScope, type BoxNotifyMuteWrite, type BoxNotifyPreview, type BoxNotifyProjectView, type BoxNotifyQuietHours, type BoxNotifyQuietHoursWrite, type BoxNotifyRule, type BoxNotifyRuleWrite, type BoxNotifySecret, type BoxNotifySeriesEntry, type BoxNotifySeriesView, type BoxNotifyState, type BoxNotifyTestResult, type BoxNotifyTriggerKind, type BoxNotifyView, type BoxReadEnvironment, type BoxReadErrorBody, type BoxReadErrorCode, type BoxReadInstall, type BoxRunAccepted, type BoxRunRequest, type BoxRunState, type BoxRunStatus, type BoxSecretRevealResponse, type BoxSecretsRevealResponse, type BoxValueChanged, type BoxValueKind, type BoxValueNames, type BoxValueSetRequest, type BoxValuesError, type BoxValuesErrorCode, type BoxValuesMergeRequest, type BoxValuesMerged, type BoxValuesReplaceRequest, type BoxValuesReplaced, type BoxValuesResponse, type BreakpointEntry, type BreakpointsFile, type BundleGitInfo, type BundleManifest, type BundleRemoveError, type BundleRemoveErrorCode, type BundleRemoveErrorDetail, type BundleRemoveOk, type BundleRemoveRequest, type BundleRemoveResponse, type BundleRemoved, type BundleScopeMismatch, type BundleSwitching, type BundleUnmappedRepo, type BundleUploadError, type BundleUploadErrorCode, type BundleUploadErrorDetail, type BundleUploadOk, type BundleUploadResponse, type BundleUploadStatus, type BundleUse, type BundleVariableGap, CI_RUNS_PATH, CI_RUN_LINES_AFTER, CI_RUN_LINES_MAX, CI_RUN_PATH, CLOUD_API_ROUTES, COLLECTIONS_SUBDIR, COLLECTION_NAME_FORBIDDEN_RE, COMMANDS_FILE, type CheckSeverity, type CiProviderId, type CiQueuedRun, type CiRunAccepted, type CiRunError, type CiRunErrorCode, type CiRunLine, type CiRunLines, type CiRunLinesResponse, type CiRunRequest, type CiRunResponse, type CiRunStatusError, type CiRunStatusErrorCode, type CiRunStatusResponse, type CloudApiRoute, type CloudApiRouteMatch, type CollectionMeta, type CollectionRunArtifact, type CollectionRunFinishedEvent, type CollectionRunRequest, type CollectionRunStartedEvent, type CollectionRunTab, type CollectionScenarioFinishedEvent, type CollectionScenarioStartedEvent, type CollectionScheduleEntry, type CollectionTab, type ContextTagged, DAY_INDEX_FILE, DAY_SHORT, DEFAULT_COLLECTION_NAME, type DbgCommand, type DbgCommandAbort, type DbgCommandClearBp, type DbgCommandContinue, type DbgCommandKind, type DbgCommandPause, type DbgCommandPickerStart, type DbgCommandPickerStop, type DbgCommandProbe, type DbgCommandRecord, type DbgCommandSetBp, type DbgCommandSnapshot, type DbgCommandStep, type DbgCommandWheel, type DebugCapabilities, type DoctorCheck, type DoctorContext, type DownloadEvent, type DslDiagnostic, type DslValidateContext, type DslVocabArg, type DslVocabCategory, type DslVocabEntry, E2E_SUBDIR, ENV_FILE, EXPECT_FAIL_ANNOTATION, type EnqueueRunInput, type EnvChangedMessage, type EnvFile, type EnvUpdate, type EnvVar, type ErrorMessage, FAILURES_DIR_SEGMENTS, FAILURES_ROOT_ENV, FREQ_FIELDS, type FailureBundleWrittenEvent, type FirstRunCommandInput, type FsBreakpointsChangedMessage, type FsCollectionRunStepMessage, type FsCollectionsChangedMessage, type FsHelpersChangedMessage, type FsRunFinishedMessage, type FsRunStartedMessage, type FsRunStepMessage, type FsScenariosChangedMessage, GUARD_SECRET_HEADER, HEARTBEAT_FILE, HELPERS_SUBDIR, type HelperMeta, type HelperTab, type HostRequirement, type IDslLanguageService, type ILaunchedProcess, type IProcessLauncher, type IRunQueue, type IRunnerAdapter, InvalidBlobHashError, JUDGE_ENV, JUDGE_ROUTES, type JudgeErrorResponse, type JudgeHealthResponse, type JudgeRequest, type JudgeVerdict, type JudgeVerdictEvent, LOCK_FILE, LOG_FILE, type LaunchSpec, type LocatorPickedEvent, type LockFile, type LogEvent, type LogLineMessage, type LoopIterationEvent, type Matcher, type NoteEvent, type OverviewTab, PICKER_INCLUDED_TEXT, PICKER_SNAPSHOT_FILE, type ParsedTicketName, type PausedEvent, type PickerMode, type ProbeMatch, type ProbePinned, type ProbeResult, type ProbeResultEvent, QUEUE_DISABLED_ENV, QUEUE_GLOBAL_DIR_ENV, QUEUE_GLOBAL_SLOTS_ENV, QUEUE_LEASE_ENV, QUEUE_MUTEX_FILE, QUEUE_PRIORITIES, QUEUE_RUNNING_DIR, QUEUE_SCHEMA_VERSION, QUEUE_SLOTS_DIR, QUEUE_SUBDIR, QUEUE_TICKETS_DIR, type QueueChangedMessage, type QueueEntry, type QueuePoolState, type QueuePriority, type QueueProducer, type QueueProducerKind, type QueueSnapshot, type QueueTicket, type QueueTicketCi, type QueueTicketKind, type QueueTicketSource, RUNNER_CONFIG_KEYS, RUNNER_SETTING_PREFIX, RUNS_SUBDIR, RUNTIME_FILE, RUN_ACTOR_ENV, RUN_INDEX_SCHEMA_VERSION, RUN_MANIFEST_FILE, RUN_SOURCES_FILE, RUN_TRIGGER_ENV, type RecordedActionKind, type RegexLiteral, type ResumedEvent, type RunArtifact, type RunFinishedEvent, type RunId, type RunIndexEntry, type RunIndexHeader, type RunKind, type RunManifest, type RunMeta, type RunOutcome, type RunQueueLease, type RunQueueTicketHandle, type RunRequest, type RunSources, type RunStartedEvent, type RunStatus, type RunTrigger, type RunTriggerKind, RunnerAdapterNotFoundError, RunnerNotConfiguredError, type RuntimeState, type RuntimeStateFile, SCENARIOS_INDEX_DIR, SCENARIOS_LATEST_FILE, SCENARIO_RECENT_WINDOW, SCHEDULES_FILE, SCHEDULES_FINGERPRINT_ENV, SECRETS_FILE, SEGMENT_NAME_FORBIDDEN_RE, SNAPSHOTS_SUBDIR, STDERR_FILE, STDOUT_FILE, STEPS_FILE, type ScenarioAnnotations, type ScenarioLatestEntry, type ScenarioMeta, type ScenarioRunRequest, type ScenarioRunTab, type ScenarioScheduleEntry, type ScenarioTab, type ScenariosLatest, type ScenariosPayload, type ScheduleEntry, type ScheduleFreq, type ScheduleSpec, type ScreenshotEvent, type SecretValue, type SnapshotTab, type SoftFailureRecord, type StepBlockFinishedEvent, type StepBlockStartedEvent, type StepFailEvent, type StepOkEvent, type StepPosition, type StepStartedEvent, TARGET_ENV_VAR, TERMINAL_RUNTIME_STATES, TERMINAL_WS_EVENT, type TabKind, type TabKindName, type TeardownFailureRecord, type TeardownFinishedEvent, type TeardownSkippedEvent, type TeardownStartedEvent, type TeardownStateRecord, type TerminalClientMessage, type TerminalCloseMessage, type TerminalDataMessage, type TerminalErrorMessage, type TerminalExitMessage, type TerminalKind, type TerminalOutputMessage, type TerminalResizeMessage, type TerminalServerMessage, type TerminalSpawnMessage, type ToolCallEvent, type ToolResultEvent, UNOTEST_DIR, type UnknownEnvironmentDetail, UnplaceableRunIdError, UnsupportedRunKindError, type VariableCategory, type VariableKind, type VariablePlanError, type Version, type VisualAssertEvent, type VisualFailureRecord, WEEK_CHIP_ORDER, WORKSPACE_FILE, WORKSPACE_SCHEMA_VERSION, type WheelChangedEvent, type WorkspaceBundle, type WorkspaceFile, type WorkspaceFollow, type WsMessage, type WsMessageKind, activeEnvName, approvalActionText, approvalConsequence, approvalPrice, approvalPriceLabel, artifactsRootFrom, blobPathFor, blobRelPathFor, blobRelSegmentsFor, blobsRootFor, boxEnvSecretRevealPath, boxEnvSecretsRevealPath, boxEnvValuePath, boxEnvValuesPath, boxNotifyChannelPath, boxNotifyMutePath, boxNotifyPreviewPath, boxNotifyPreviewTrigger, boxNotifyProjectPath, boxNotifyQuietHoursPath, boxNotifyRulePath, boxNotifySeriesPath, boxNotifySeriesResetPath, boxNotifyTestPath, boxRunPath, boxRunsPath, boxValueKindOfSegment, boxValuePath, boxValuesPath, canonicalScheduleSet, categorizeVariable, ciRunLinesPath, compareQueueTicketNames, compareVersions, cronFromSpec, debugDirFor, debuggerFileFor, declaredEnvKeys, decodeNameList, deleteShadowWarning, describeBundle, describeCron, describeSpec, describeTicketCi, encodeNameList, envFileFor, envKeys, envLayerFilesFor, envNamesFromDirListing, failuresRootFrom, failuresRootIn, failuresRootUnder, firstRunCommand, foldScenarioRun, formatNextTick, insertEnvVar, isAnnotationLine, isBelowMinimum, isBoxNotifyState, isEnvVarName, isExternalVarName, isFailingStatus, isQueueDirName, isRecord, isRegexLiteral, isRunId, isRunnerConfigKey, isRunnerSetting, isRunsDirName, isTerminalRuntimeState, lowestVersionOf, makeQueueTicketName, makeRunId, manifestTrigger, maskSecretValues, matchCloudApiRoute, mergeSchedules, nextTickFromSpec, orderSecretValues, parseAppServerEvent, parseBoxEnvValuesReplaceRequest, parseBoxNotifyChanged, parseBoxNotifyError, parseBoxNotifyMuteScope, parseBoxNotifyPreview, parseBoxNotifyProjectView, parseBoxNotifySeriesView, parseBoxNotifyTestResult, parseBoxNotifyView, parseBoxReadEnvironments, parseBoxReadError, parseBoxReadInstall, parseBoxRunAccepted, parseBoxRunRequest, parseBoxRunStatus, parseBoxSecretRevealResponse, parseBoxSecretsRevealResponse, parseBoxValueSetRequest, parseBoxValuesMergeRequest, parseBoxValuesReplaceRequest, parseBoxValuesResponse, parseBundleManifest, parseBundleRemoveRequest, parseBundleRemoveResponse, parseBundleUploadResponse, parseCiProvider, parseCiRunLinesResponse, parseCiRunRequest, parseCiRunResponse, parseCiRunStatusResponse, parseEnvContent, parseQueueTicket, parseQueueTicketName, parseScenarioAnnotations, parseScheduleEntry, parseSchedulesDoc, parseSchedulesJson, parseUnknownEnvironmentDetail, parseWorkspaceFile, planAddVariable, projectQueueRoot, projectRunDirFor, projectRunsRoot, queueDirFor, queuePriorityFromRank, queuePriorityRank, regexLiteral, removeEnvVar, replaceEnvVar, requireRunDirFor, reservedBoxValueNames, runDirFor, runIdStartedAt, runTriggerEnv, runTriggerFromEnv, runsDirFor, sanitizeRunIdSegment, scenarioIndexFileName, scenarioRefFromFileName, scheduleTarget, secretMark, secretsFileFor, secretsLayerFilesFor, serializeEnvValue, shardDaysDescending, shardDirFor, shardPathForRunId, shardPathForTimestamp, specFromCron, testDirFor, validateCollectionName, validateSegmentName };
4109
+ export { ACTOR_TICKET_HEADER, ARTIFACTS_ROOT_ENV, type AddVariablePlan, type AddVariablePlanInput, type AppPathPickerSpec, type AppServerEvent, type ApprovalAction, type ApprovalPrice, type AuthoringRunRequest, BLOBS_DIR, BOX_DELETE_CONSEQUENCE, BOX_ENV_VALUES_SEGMENT, BOX_NOTIFY_CHANNEL_KINDS, BOX_NOTIFY_EVENTS, BOX_NOTIFY_PATH, BOX_NOTIFY_STATES, BOX_NOTIFY_TRIGGER_KINDS, BOX_PUSH_TOKEN_PREFIX, BOX_READ_ENVIRONMENTS_PATH, BOX_READ_ENVIRONMENT_HEADER, BOX_READ_TOKEN_ENV, BOX_READ_TOKEN_PREFIX, BOX_REVEAL_SEGMENT, BOX_REVOCATIONS_RETRY_AFTER_SECONDS, BOX_RUNS_SEGMENT, BOX_SECRET_NAMES_ENV, BOX_SIGNED_TOKEN, BOX_SIGNED_TOKEN_PREFIX, BOX_TOKEN_ENV, BOX_URL_ENV, BOX_VALUES_PATH, BOX_VARIABLE_NAMES_ENV, BROWSER_CHANNEL_ENV, BROWSER_ENV, BUNDLED_BROWSER_CHANNEL, BUNDLE_ID_ENV, BUNDLE_MANIFEST_FILE, BUNDLE_SCHEMA_VERSION, BUNDLE_UPLOAD_PATH, type BoxEnvValuesReplaceRequest, type BoxEnvValuesView, type BoxNotifyChanged, type BoxNotifyChannelKind, type BoxNotifyChannelView, type BoxNotifyChannelWrite, type BoxNotifyEnabledPatch, type BoxNotifyError, type BoxNotifyErrorCode, type BoxNotifyEvent, type BoxNotifyLastDelivery, type BoxNotifyMute, type BoxNotifyMuteScope, type BoxNotifyMuteWrite, type BoxNotifyPreview, type BoxNotifyProjectView, type BoxNotifyQuietHours, type BoxNotifyQuietHoursWrite, type BoxNotifyRule, type BoxNotifyRuleWrite, type BoxNotifySecret, type BoxNotifySeriesEntry, type BoxNotifySeriesView, type BoxNotifyState, type BoxNotifyTestResult, type BoxNotifyTriggerKind, type BoxNotifyView, type BoxReadEnvironment, type BoxReadErrorBody, type BoxReadErrorCode, type BoxReadInstall, type BoxRunAccepted, type BoxRunRequest, type BoxRunState, type BoxRunStatus, type BoxSecretRevealResponse, type BoxSecretsRevealResponse, type BoxValueChanged, type BoxValueKind, type BoxValueNames, type BoxValueSetRequest, type BoxValuesError, type BoxValuesErrorCode, type BoxValuesMergeRequest, type BoxValuesMerged, type BoxValuesReplaceRequest, type BoxValuesReplaced, type BoxValuesResponse, type BreakpointEntry, type BreakpointsFile, type BundleGitInfo, type BundleManifest, type BundleRemoveError, type BundleRemoveErrorCode, type BundleRemoveErrorDetail, type BundleRemoveOk, type BundleRemoveRequest, type BundleRemoveResponse, type BundleRemoved, type BundleScopeMismatch, type BundleSwitching, type BundleUnmappedRepo, type BundleUploadError, type BundleUploadErrorCode, type BundleUploadErrorDetail, type BundleUploadOk, type BundleUploadResponse, type BundleUploadStatus, type BundleUse, type BundleVariableGap, CI_RUNS_PATH, CI_RUN_LINES_AFTER, CI_RUN_LINES_MAX, CI_RUN_PATH, CLOUD_API_ROUTES, COLLECTIONS_SUBDIR, COLLECTION_NAME_FORBIDDEN_RE, COMMANDS_FILE, type CheckSeverity, type CiProviderId, type CiQueuedRun, type CiRunAccepted, type CiRunError, type CiRunErrorCode, type CiRunLine, type CiRunLines, type CiRunLinesResponse, type CiRunRequest, type CiRunResponse, type CiRunStatusError, type CiRunStatusErrorCode, type CiRunStatusResponse, type CloudApiRoute, type CloudApiRouteMatch, type CollectionMeta, type CollectionRunArtifact, type CollectionRunFinishedEvent, type CollectionRunRequest, type CollectionRunStartedEvent, type CollectionRunTab, type CollectionScenarioFinishedEvent, type CollectionScenarioStartedEvent, type CollectionScheduleEntry, type CollectionTab, type CollectionViewport, type ContextTagged, DAY_INDEX_FILE, DAY_SHORT, DEFAULT_COLLECTION_NAME, type DbgCommand, type DbgCommandAbort, type DbgCommandClearBp, type DbgCommandContinue, type DbgCommandKind, type DbgCommandPause, type DbgCommandPickerStart, type DbgCommandPickerStop, type DbgCommandProbe, type DbgCommandRecord, type DbgCommandSetBp, type DbgCommandSnapshot, type DbgCommandStep, type DbgCommandWheel, type DebugCapabilities, type DoctorCheck, type DoctorContext, type DownloadEvent, type DslDiagnostic, type DslValidateContext, type DslVocabArg, type DslVocabCategory, type DslVocabEntry, E2E_SUBDIR, EDITOR_TYPES_ENV, ENVIRONMENT_ENV, ENV_FILE, EXPECT_FAIL_ANNOTATION, type EnqueueRunInput, type EnvChangedMessage, type EnvFile, type EnvUpdate, type EnvVar, type ErrorMessage, FAILURES_DIR_SEGMENTS, FAILURES_ROOT_ENV, FREQ_FIELDS, type FailureBundleWrittenEvent, type FileRunTestFinishedEvent, type FileRunTestStartedEvent, type FirstRunCommandInput, type FsBreakpointsChangedMessage, type FsCollectionRunStepMessage, type FsCollectionsChangedMessage, type FsHelpersChangedMessage, type FsRunFinishedMessage, type FsRunStartedMessage, type FsRunStepMessage, type FsScenariosChangedMessage, GUARD_SECRET_HEADER, HEARTBEAT_FILE, HELPERS_SUBDIR, type HelperMeta, type HelperTab, type HostRequirement, type IDslLanguageService, type ILaunchedProcess, type IProcessLauncher, type IRunQueue, type IRunnerAdapter, InvalidBlobHashError, JUDGE_ENV, JUDGE_ROUTES, type JudgeErrorResponse, type JudgeHealthResponse, type JudgeRequest, type JudgeVerdict, type JudgeVerdictEvent, LOCK_FILE, LOG_FILE, type LaunchSpec, type LocatorPickedEvent, type LockFile, type LogEvent, type LogLineMessage, type LoopIterationEvent, type Matcher, type NoteEvent, type OverviewTab, PICKER_INCLUDED_TEXT, PICKER_SNAPSHOT_FILE, type ParsedTicketName, type PausedEvent, type PickerMode, type ProbeMatch, type ProbePinned, type ProbeResult, type ProbeResultEvent, QUEUE_DISABLED_ENV, QUEUE_GLOBAL_DIR_ENV, QUEUE_GLOBAL_SLOTS_ENV, QUEUE_LEASE_ENV, QUEUE_MUTEX_FILE, QUEUE_PRIORITIES, QUEUE_RUNNING_DIR, QUEUE_SCHEMA_VERSION, QUEUE_SLOTS_DIR, QUEUE_SUBDIR, QUEUE_TICKETS_DIR, type QueueChangedMessage, type QueueEntry, type QueuePoolState, type QueuePriority, type QueueProducer, type QueueProducerKind, type QueueSnapshot, type QueueTicket, type QueueTicketCi, type QueueTicketKind, type QueueTicketSource, RUNNER_CONFIG_KEYS, RUNNER_SETTING_PREFIX, RUNS_SUBDIR, RUNTIME_FILE, RUN_ACTOR_ENV, RUN_IDENTITY_ENV_NAMES, RUN_ID_ENV, RUN_INDEX_SCHEMA_VERSION, RUN_MANIFEST_FILE, RUN_SOURCES_FILE, RUN_TRIGGER_ENV, type RecordedActionKind, type RegexLiteral, type ResumedEvent, type RunArtifact, type RunFinishedEvent, type RunId, type RunIndexEntry, type RunIndexHeader, type RunKind, type RunManifest, type RunMeta, type RunOutcome, type RunQueueLease, type RunQueueTicketHandle, type RunRequest, type RunSources, type RunStartedEvent, type RunStatus, type RunTrigger, type RunTriggerKind, RunnerAdapterNotFoundError, RunnerNotConfiguredError, type RuntimeState, type RuntimeStateFile, SCENARIOS_INDEX_DIR, SCENARIOS_LATEST_FILE, SCENARIO_RECENT_WINDOW, SCHEDULES_FILE, SCHEDULES_FINGERPRINT_ENV, SECRETS_FILE, SEGMENT_NAME_FORBIDDEN_RE, SNAPSHOTS_SUBDIR, STDERR_FILE, STDOUT_FILE, STEPS_FILE, type ScenarioAnnotations, type ScenarioLatestEntry, type ScenarioMeta, type ScenarioRunRequest, type ScenarioRunTab, type ScenarioScheduleEntry, type ScenarioTab, type ScenarioTest, type ScenariosLatest, type ScenariosPayload, type ScheduleEntry, type ScheduleFreq, type ScheduleSpec, type ScreenshotEvent, type SecretValue, type SnapshotTab, type SoftFailureRecord, type StepBlockFinishedEvent, type StepBlockStartedEvent, type StepFailEvent, type StepOkEvent, type StepPosition, type StepStartedEvent, TARGET_ENV_VAR, TERMINAL_RUNTIME_STATES, TERMINAL_WS_EVENT, type TabKind, type TabKindName, type TeardownFailureRecord, type TeardownFinishedEvent, type TeardownSkippedEvent, type TeardownStartedEvent, type TeardownStateRecord, type TerminalClientMessage, type TerminalCloseMessage, type TerminalDataMessage, type TerminalErrorMessage, type TerminalExitMessage, type TerminalKind, type TerminalOutputMessage, type TerminalResizeMessage, type TerminalServerMessage, type TerminalSpawnMessage, type TestLatestEntry, type TestRunOutcome, type TestSelection, type ToolCallEvent, type ToolResultEvent, UNOTEST_DIR, type UnknownEnvironmentDetail, UnknownTestError, UnplaceableRunIdError, UnsupportedRunKindError, type VariableCategory, type VariableKind, type VariablePlanError, type Version, type VisualAssertEvent, type VisualFailureRecord, WEEK_CHIP_ORDER, WORKSPACE_FILE, WORKSPACE_SCHEMA_VERSION, type WheelChangedEvent, type WorkspaceBundle, type WorkspaceFile, type WorkspaceFollow, type WsMessage, type WsMessageKind, activeEnvName, approvalActionText, approvalConsequence, approvalPrice, approvalPriceLabel, artifactsRootFrom, blobPathFor, blobRelPathFor, blobRelSegmentsFor, blobsRootFor, boxEnvSecretRevealPath, boxEnvSecretsRevealPath, boxEnvValuePath, boxEnvValuesPath, boxNotifyChannelPath, boxNotifyMutePath, boxNotifyPreviewPath, boxNotifyPreviewTrigger, boxNotifyProjectPath, boxNotifyQuietHoursPath, boxNotifyRulePath, boxNotifySeriesPath, boxNotifySeriesResetPath, boxNotifyTestPath, boxRunPath, boxRunsPath, boxValueKindOfSegment, boxValuePath, boxValuesPath, canonicalScheduleSet, categorizeVariable, ciRunLinesPath, compareQueueTicketNames, compareVersions, cronFromSpec, debugDirFor, debuggerFileFor, declaredEnvKeys, decodeNameList, deleteShadowWarning, describeBundle, describeCron, describeSpec, describeTicketCi, encodeNameList, envFileFor, envKeys, envLayerFilesFor, envNamesFromDirListing, failuresRootFrom, failuresRootIn, failuresRootUnder, firstRunCommand, foldScenarioRun, foldTestRun, formatNextTick, insertEnvVar, isAnnotationLine, isBelowMinimum, isBoxNotifyState, isEnvVarName, isExternalVarName, isFailingStatus, isQueueDirName, isRecord, isRegexLiteral, isReservedBoxValueName, isRunId, isRunIdentityEnvName, isRunnerConfigKey, isRunnerSetting, isRunsDirName, isTerminalRuntimeState, lowestVersionOf, makeQueueTicketName, makeRunId, manifestTrigger, maskSecretValues, matchCloudApiRoute, mergeSchedules, nextTickFromSpec, orderSecretValues, parseAppServerEvent, parseBoxEnvValuesReplaceRequest, parseBoxNotifyChanged, parseBoxNotifyError, parseBoxNotifyMuteScope, parseBoxNotifyPreview, parseBoxNotifyProjectView, parseBoxNotifySeriesView, parseBoxNotifyTestResult, parseBoxNotifyView, parseBoxReadEnvironments, parseBoxReadError, parseBoxReadInstall, parseBoxRunAccepted, parseBoxRunRequest, parseBoxRunStatus, parseBoxSecretRevealResponse, parseBoxSecretsRevealResponse, parseBoxValueSetRequest, parseBoxValuesMergeRequest, parseBoxValuesReplaceRequest, parseBoxValuesResponse, parseBundleManifest, parseBundleRemoveRequest, parseBundleRemoveResponse, parseBundleUploadResponse, parseCiProvider, parseCiRunLinesResponse, parseCiRunRequest, parseCiRunResponse, parseCiRunStatusResponse, parseCollectionViewport, parseEnvContent, parseQueueTicket, parseQueueTicketName, parseScenarioAnnotations, parseScheduleEntry, parseSchedulesDoc, parseSchedulesJson, parseTestAnnotations, parseUnknownEnvironmentDetail, parseWorkspaceFile, planAddVariable, projectQueueRoot, projectRunDirFor, projectRunsRoot, queueDirFor, queuePriorityFromRank, queuePriorityRank, regexLiteral, removeEnvVar, replaceEnvVar, requireRunDirFor, reservedBoxValueNames, runDirFor, runIdStartedAt, runIdentityRefusal, runStatusOf, runTriggerEnv, runTriggerFromEnv, runsDirFor, sanitizeRunIdSegment, scenarioIndexFileName, scenarioRefFromFileName, scheduleTarget, secretMark, secretsFileFor, secretsLayerFilesFor, selectTests, serializeEnvValue, shardDaysDescending, shardDirFor, shardPathForRunId, shardPathForTimestamp, specFromCron, testDirFor, testIndexFileName, validateCollectionName, validateSegmentName, withoutRunIdentity };