@unotest/protocol 0.48.0 → 0.49.1

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/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
@@ -463,6 +467,10 @@ interface StepOkEvent extends RunArtifactBase, ContextTagged {
463
467
  kind: "step:ok";
464
468
  /** Wall-clock duration of the step that just finished. */
465
469
  durationMs: number;
470
+ /** The test skipped itself in this step (`skip(reason)`). Still a
471
+ * `step:ok` — a skip is not a failure — so a reader older than the
472
+ * field shows it passed, as it always did. */
473
+ skipped?: true;
466
474
  }
467
475
  interface StepFailEvent extends RunArtifactBase, ContextTagged {
468
476
  kind: "step:fail";
@@ -511,6 +519,8 @@ interface StepBlockFinishedEvent extends RunArtifactBase, ContextTagged {
511
519
  tag?: string;
512
520
  soft: boolean;
513
521
  ok: boolean;
522
+ /** The test skipped itself inside this block; `ok` stays true. */
523
+ skipped?: true;
514
524
  /** The failure that closed the block, when `ok` is false. For a soft
515
525
  * block the run went on; for a plain block it ended. */
516
526
  error?: string;
@@ -713,6 +723,13 @@ interface RunFinishedEvent extends RunArtifactBase {
713
723
  * a viewer or box daemon older than it still reads a finished run
714
724
  * (shown as passed) instead of an outcome its switch does not know. */
715
725
  skipReason?: string;
726
+ /** Set when the run, read through its tests' `@expect-fail` markers,
727
+ * reads otherwise than its outcome. The outcome stays what happened;
728
+ * the marker says how to read it: `failed` is on purpose (every failure
729
+ * in it was marked — the healthy state of a control test), `completed`
730
+ * is a failure (a marked test passed — what it guarded is no longer
731
+ * broken). A reader older than the field sees the plain outcome. */
732
+ expectFail?: true;
716
733
  }
717
734
  /** Debugger pause. Reason discriminates:
718
735
  * - `breakpoint` — executor halted before a statement whose `line:col` is
@@ -822,7 +839,28 @@ interface ToolResultEvent extends RunArtifactBase {
822
839
  };
823
840
  }
824
841
  /** 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;
842
+ 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;
843
+ /** How one test of a group ended — the line a file run writes for it, and
844
+ * the entry a collection reports for each test of the file it ran. */
845
+ interface TestRunOutcome {
846
+ /** The `test_*` function, as written in the file. */
847
+ test: string;
848
+ testRunId: RunId;
849
+ outcome: RunOutcome;
850
+ /** Set when the test skipped itself; the outcome is then `completed`. */
851
+ skipReason?: string;
852
+ /** Set when the test was marked `@expect-fail`; read with the outcome
853
+ * as on `run:finished`. */
854
+ expectFail?: true;
855
+ }
856
+ interface FileRunTestStartedEvent extends RunArtifactBase {
857
+ kind: "file-run:test-started";
858
+ test: string;
859
+ testRunId: RunId;
860
+ }
861
+ interface FileRunTestFinishedEvent extends RunArtifactBase, TestRunOutcome {
862
+ kind: "file-run:test-finished";
863
+ }
826
864
  interface CollectionRunStartedEvent extends RunArtifactBase {
827
865
  kind: "collection-run:started";
828
866
  runId: RunId;
@@ -842,6 +880,9 @@ interface CollectionScenarioFinishedEvent extends RunArtifactBase {
842
880
  scenarioRunId: RunId;
843
881
  scenario: string;
844
882
  outcome: RunOutcome;
883
+ /** One entry per test when the scenario file held several: the outcome
884
+ * above is the worst of them. Absent for a one-test file. Since 0.49.0. */
885
+ tests?: TestRunOutcome[];
845
886
  }
846
887
  interface CollectionRunFinishedEvent extends RunArtifactBase {
847
888
  kind: "collection-run:finished";
@@ -854,6 +895,9 @@ interface ScenarioRunRequest {
854
895
  kind: "scenario";
855
896
  /** Scenario `name` — file stem relative to `unotest/e2e/`. */
856
897
  scenario: string;
898
+ /** One `test_*` of the file instead of all of them, by function name.
899
+ * Since 0.49.0. */
900
+ test?: string;
857
901
  /** Run with browser visible (web) / device window visible (mobile).
858
902
  * Adapter maps this to the runner's preferred env / arg. */
859
903
  headed?: boolean;
@@ -905,9 +949,26 @@ type RunRequest = ScenarioRunRequest | CollectionRunRequest | AuthoringRunReques
905
949
  /** All `kind` literals — useful for switch-completeness checks and for
906
950
  * adapter `supportedKinds` lists. */
907
951
  type RunKind = RunRequest["kind"];
952
+ type TestSelection = {
953
+ tests: readonly string[];
954
+ } | {
955
+ refusal: string;
956
+ };
957
+ /** `requested` is the `--test` value: absent plays every entry, a name
958
+ * plays that test — written as the function is, or without `test_`. A
959
+ * name the file does not have is refused with the names it does, so the
960
+ * next try is a copy, not a guess. */
961
+ declare function selectTests(entries: readonly string[], requested: string | undefined, scenario: string): TestSelection;
962
+ /** A run asked for a test its file does not have. The message is the
963
+ * refusal {@link selectTests} words, the same on every surface. */
964
+ declare class UnknownTestError extends Error {
965
+ constructor(refusal: string);
966
+ }
908
967
 
909
- /** Lifecycle stage as inferred by the server when listing runs. */
910
- type RunStatus = "running" | "passed" | "failed" | "aborted" | "interrupted";
968
+ /** Lifecycle stage as inferred by the server when listing runs.
969
+ * `skipped` is a run that finished `completed` after the test skipped
970
+ * itself (`skip(reason)`): it proved nothing, so it is not `passed`. */
971
+ type RunStatus = "running" | "passed" | "skipped" | "failed" | "aborted" | "interrupted";
911
972
  interface RunMeta {
912
973
  runId: RunId;
913
974
  kind: RunKind;
@@ -925,11 +986,23 @@ interface RunMeta {
925
986
  status: RunStatus;
926
987
  /** Terminal outcome from `run:finished`, or null if still running. */
927
988
  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`. */
989
+ /** Why the test skipped itself, from `run:finished`. Present exactly
990
+ * when `status` is `skipped`. */
991
+ skipReason?: string;
992
+ /** From `run:finished`: the run was marked `@expect-fail` when it ran —
993
+ * `failed` is then on purpose, `completed` a failure. The marker as it
994
+ * was at run time; a later edit of the source does not rewrite history.
995
+ * Absent on every other run. */
996
+ expectFail?: true;
997
+ /** Run-id of the group this run belongs to: a collection-run, or the
998
+ * run of a file with several tests. Absent for top-level runs and for
999
+ * collection-runs themselves. Populated from the child's
1000
+ * `manifest.json`. */
932
1001
  parentRunId?: string;
1002
+ /** The `test_*` function this run is, from its manifest. Absent on the
1003
+ * run of a file with several tests (it groups them), on collection-runs
1004
+ * and on runs written before 0.49.0. */
1005
+ test?: string;
933
1006
  /** Which test bundle produced this run, from its manifest. Absent for
934
1007
  * every local run; on a box it is what tells two runs of the same
935
1008
  * scenario apart when the environment moved to another bundle between
@@ -939,8 +1012,8 @@ interface RunMeta {
939
1012
 
940
1013
  /** Bumped when a line's shape changes incompatibly. A file whose header
941
1014
  * carries a different version is discarded and rebuilt rather than
942
- * half-parsed. */
943
- declare const RUN_INDEX_SCHEMA_VERSION = 2;
1015
+ * half-parsed. 3: `skipped` status — a v2 line filed a skip as passed. */
1016
+ declare const RUN_INDEX_SCHEMA_VERSION = 3;
944
1017
  /** How many past outcomes a scenario's rolling window keeps. Twelve is
945
1018
  * enough to see a flake and small enough that the whole field of them
946
1019
  * fits one JSON file. Exported so the fold and everything that renders
@@ -964,6 +1037,9 @@ interface ScenarioLatestEntry {
964
1037
  lastAt: number;
965
1038
  /** Wall-clock of the last run, or null if it never finished. */
966
1039
  lastDurationMs: number | null;
1040
+ /** Why the last run skipped itself. Present exactly when `lastStatus`
1041
+ * is `skipped`, so a tile can say why it is grey without a run read. */
1042
+ lastSkipReason?: string;
967
1043
  /** Up to {@link SCENARIO_RECENT_WINDOW} past outcomes, OLDEST FIRST.
968
1044
  * Answers the one question a single last status cannot: does this
969
1045
  * test flake. Kept here rather than fetched per scenario because the
@@ -976,7 +1052,15 @@ interface ScenarioLatestEntry {
976
1052
  failStreak: number;
977
1053
  /** Start of the current failing streak, or null when not failing. */
978
1054
  failingSince: number | null;
979
- }
1055
+ /** The same state per test, for a file with several `test_*`: keyed by
1056
+ * function name, folded from the file runs' journals and from runs of a
1057
+ * single test (`--test`) once the file is known to hold several. The
1058
+ * fields above are then the FILE's — the last run of it. Absent for a
1059
+ * one-test file. Since 0.49.0. */
1060
+ tests?: Record<string, TestLatestEntry>;
1061
+ }
1062
+ /** A test's own rolling state inside its file's entry. */
1063
+ type TestLatestEntry = Omit<ScenarioLatestEntry, "tests">;
980
1064
  interface ScenariosLatest {
981
1065
  v: number;
982
1066
  scenarios: Record<string, ScenarioLatestEntry>;
@@ -984,69 +1068,61 @@ interface ScenariosLatest {
984
1068
  /** Status values that count as a failure for streak purposes. `aborted`
985
1069
  * is excluded: the user stopped it, the test did not fail. */
986
1070
  declare function isFailingStatus(status: RunStatus): boolean;
1071
+ /** The status a finished run is listed under: a `completed` run that
1072
+ * skipped itself proved nothing, so it is not `passed`. */
1073
+ declare function runStatusOf(outcome: RunOutcome, skipReason: string | undefined): RunStatus;
987
1074
  /** 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;
1075
+ * path and the rebuild path cannot disagree about what a streak is. A
1076
+ * file's per-test state rides along untouched: the file's own run says
1077
+ * nothing about any one test. */
1078
+ declare function foldScenarioRun(prev: ScenarioLatestEntry | undefined, run: Pick<RunMeta, "runId" | "status" | "startedAt" | "durationMs" | "skipReason">): ScenarioLatestEntry;
1079
+ /** Fold one newer run of `test` into its file's entry, under `tests`. */
1080
+ declare function foldTestRun(entry: ScenarioLatestEntry, test: string, run: Pick<RunMeta, "runId" | "status" | "startedAt" | "durationMs" | "skipReason">): ScenarioLatestEntry;
990
1081
  /** Filename for a scenario's index. `encodeURIComponent` because scenario
991
1082
  * refs carry `/` (`big-table/edit-dialog`) and must not become nested
992
1083
  * directories — and because it is reversible, so the ref can be read
993
1084
  * back off the filename without a side table. */
994
1085
  declare function scenarioIndexFileName(ref: string): string;
1086
+ /** Filename for the index of one test of a file with several: the runs
1087
+ * its file runs played. `@` never appears raw in an encoded ref, so the
1088
+ * name cannot collide with a scenario's own index. */
1089
+ declare function testIndexFileName(ref: string, test: string): string;
995
1090
  /** Inverse of `scenarioIndexFileName`. */
996
1091
  declare function scenarioRefFromFileName(fileName: string): string | null;
997
1092
 
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
1093
  /** The variable a box injects an environment's target under — what the
1048
1094
  * suite's `baseUrl` auto-wires from. */
1049
1095
  declare const TARGET_ENV_VAR = "APP_BASE_URL";
1096
+ /** The run's id, set by a box on every run it starts. */
1097
+ declare const RUN_ID_ENV = "UNOTEST_RUN_ID";
1098
+ /** The environment a run belongs to: its runs suffix and the overlay the
1099
+ * suite loads. */
1100
+ declare const ENVIRONMENT_ENV = "UNOTEST_ENV";
1101
+ /** `0` tells the runner not to write editor typings. */
1102
+ declare const EDITOR_TYPES_ENV = "UNOTEST_EDITOR_TYPES";
1103
+ /** Set by a lease holder on every child it spawns. A process that sees
1104
+ * it is already covered by someone's slot and must not queue again —
1105
+ * this is the "top-level run" boundary (a collection's scenario
1106
+ * subprocesses). Value: the holder's runId, for diagnostics. */
1107
+ declare const QUEUE_LEASE_ENV = "UNOTEST_QUEUE_LEASE";
1108
+ /** What a box says about a run by setting it on the run's process: which
1109
+ * run, of which environment, from which bundle, who asked, under whose
1110
+ * queue slot, which of its values are secret. An environment's values
1111
+ * are refused under these names, and a run gets them written after the
1112
+ * values — a value spelled like one would otherwise speak for the box
1113
+ * (`UNOTEST_BUNDLE_ID=""` turns a box run into a local one).
1114
+ *
1115
+ * Not every `UNOTEST_*` ({@link isRunnerSetting}): an operator sets the
1116
+ * runner's own settings on an environment on purpose, and a box's browser
1117
+ * policy (`UNOTEST_BROWSER_CHANNEL`) is overridable there by design. */
1118
+ declare const RUN_IDENTITY_ENV_NAMES: readonly string[];
1119
+ declare function isRunIdentityEnvName(name: string): boolean;
1120
+ /** Why such a name is not a value, worded once for the box's refusal and
1121
+ * for the CLI that refuses it before asking. */
1122
+ declare function runIdentityRefusal(names: readonly string[]): string;
1123
+ /** The values an environment hands a run, less any spelled like the
1124
+ * run's identity — one stored before the box refused such names. */
1125
+ declare function withoutRunIdentity(values: Readonly<Record<string, string>>): Record<string, string>;
1050
1126
  /** Prefix of the runner's own settings (`UNOTEST_HEADED`,
1051
1127
  * `UNOTEST_LOG_LEVEL`, …). They configure the machine a run happens on,
1052
1128
  * never the suite, so an environment on a box neither receives them from
@@ -1160,6 +1236,9 @@ declare function reservedBoxValueNames(request: {
1160
1236
  variables: Record<string, unknown>;
1161
1237
  secrets: Record<string, unknown>;
1162
1238
  }): string[];
1239
+ /** The target ({@link TARGET_ENV_VAR}) and the run's identity
1240
+ * ({@link RUN_IDENTITY_ENV_NAMES}): the box sets them itself. */
1241
+ declare function isReservedBoxValueName(name: string): boolean;
1163
1242
  /** Names per layer; `target` says whether the override is among them. */
1164
1243
  interface BoxValueNames {
1165
1244
  target: boolean;
@@ -1217,8 +1296,11 @@ type BoxValuesErrorCode =
1217
1296
  /** A reveal, or a `null` in a session-door batch, named a secret the
1218
1297
  * environment does not hold. */
1219
1298
  | "unknown-secret"
1220
- /** A variable or secret named {@link TARGET_ENV_VAR} — send it as the
1221
- * target instead. */
1299
+ /** A variable or secret the box sets itself: {@link TARGET_ENV_VAR}
1300
+ * (send it as the target instead) or the run's identity
1301
+ * ({@link RUN_IDENTITY_ENV_NAMES}). {@link ReservedRefusalDetail} says
1302
+ * which. One code for both: a 0.48 CLI drops an answer with a code it
1303
+ * does not know, the box's words with it. */
1222
1304
  | "reserved"
1223
1305
  /** Not a readable request. */
1224
1306
  | "malformed"
@@ -1252,19 +1334,36 @@ interface UnknownEnvironmentDetail {
1252
1334
  project: string;
1253
1335
  environments: string[];
1254
1336
  }
1337
+ /** On a `reserved` refusal, from a box that says it: what the name is.
1338
+ * A box that does not say it is older, and reserved only the target. */
1339
+ interface ReservedRefusalDetail {
1340
+ subject: ReservedSubject;
1341
+ }
1342
+ type ReservedSubject = "target" | "run-identity";
1343
+ declare const unrecognized: unique symbol;
1344
+ /** A refusal code from a box newer than this client's vocabulary. Kept
1345
+ * apart from {@link BoxValuesErrorCode} so a switch over the known codes
1346
+ * stays exhaustive; the box's message still says what happened. */
1347
+ type UnrecognizedBoxValuesErrorCode = string & {
1348
+ readonly [unrecognized]: true;
1349
+ };
1350
+ type BoxValuesRefusalCode = BoxValuesErrorCode | UnrecognizedBoxValuesErrorCode;
1255
1351
  interface BoxValuesError {
1256
1352
  error: {
1257
- code: BoxValuesErrorCode;
1353
+ code: BoxValuesRefusalCode;
1258
1354
  message: string;
1259
- } & Partial<UnknownEnvironmentDetail>;
1355
+ } & Partial<UnknownEnvironmentDetail> & Partial<ReservedRefusalDetail>;
1260
1356
  }
1261
1357
  /** The detail of a refusal, when it is there and readable. Advisory: a
1262
1358
  * field of the wrong shape drops the detail, never the refusal. */
1263
1359
  declare function parseUnknownEnvironmentDetail(error: Record<string, unknown>): Partial<UnknownEnvironmentDetail>;
1264
1360
  type BoxValuesResponse = BoxValuesReplaced | BoxValuesMerged | BoxValueChanged | BoxValuesError;
1361
+ declare function isBoxValuesErrorCode(code: string): code is BoxValuesErrorCode;
1265
1362
  /** Parse a box's answer. Null when the body is not one of ours at all —
1266
1363
  * a proxy's HTML error page, a captive portal — which the caller reports
1267
- * as "that URL is not a box". */
1364
+ * as "that URL is not a box". A refusal with a code this client does not
1365
+ * know is still one of ours: dropping it would hide the box's own words
1366
+ * behind "not a box". */
1268
1367
  declare function parseBoxValuesResponse(value: unknown): BoxValuesResponse | null;
1269
1368
  /** One secret's value, from `GET …/secrets/<NAME>/reveal`. */
1270
1369
  interface BoxSecretRevealResponse {
@@ -1293,6 +1392,64 @@ interface BoxEnvValuesView {
1293
1392
  secrets: string[];
1294
1393
  }
1295
1394
 
1395
+ declare const BOX_RUNS_SEGMENT = "runs";
1396
+ /** Set by the guard, forwarded by the viewer verbatim, verified by the
1397
+ * daemon: WHO clicked, in a form the thing in between cannot write.
1398
+ * Named here because three packages have to spell it identically and
1399
+ * this is the one they all already depend on — the signing and the
1400
+ * verification live on the box side (`@unotest/box-kit`), which is
1401
+ * where the secret is. */
1402
+ declare const ACTOR_TICKET_HEADER = "x-unotest-actor-ticket";
1403
+ /** Set by the guard on its own requests to the daemon. The daemon reads
1404
+ * the actor label only next to a valid one. */
1405
+ declare const GUARD_SECRET_HEADER = "x-unotest-guard-secret";
1406
+ /** `/api/box/envs/<project>/<env>/runs`. */
1407
+ declare function boxRunsPath(project: string, environment: string): string;
1408
+ /** `/api/box/envs/<project>/<env>/runs/<runId>`. */
1409
+ declare function boxRunPath(project: string, environment: string, runId: string): string;
1410
+ /** What the viewer asks for. Deliberately not the viewer's own
1411
+ * `RunRequest`: that one carries local concerns (worker counts, debug
1412
+ * flags) the box decides for itself, and a box route that accepted them
1413
+ * would be a second way to configure a run. */
1414
+ interface BoxRunRequest {
1415
+ kind: "collection" | "scenario";
1416
+ /** Collection name, or a scenario ref (`folder/test`). */
1417
+ ref: string;
1418
+ /** With `kind: "scenario"`: one `test_*` of the file, by function name.
1419
+ * Since 0.49.0. */
1420
+ test?: string;
1421
+ }
1422
+ /** The daemon accepted the ticket. The run has NOT started — on a busy
1423
+ * box it may wait behind a suite for a while, which is the whole point
1424
+ * of there being one queue.
1425
+ *
1426
+ * No ticket name: the queue's file names are the box's own business,
1427
+ * and stopping a run goes back through `DELETE …/runs/<runId>` rather
1428
+ * than through the queue directly. The run id is the only handle a
1429
+ * caller needs, and the only one it is given. */
1430
+ interface BoxRunAccepted {
1431
+ runId: string;
1432
+ acceptedAt: number;
1433
+ }
1434
+ type BoxRunState = "queued" | "running" | "finished";
1435
+ interface BoxRunStatus {
1436
+ runId: string;
1437
+ state: BoxRunState;
1438
+ /** Present once the run ended. `null` when it died on a signal. */
1439
+ exitCode?: number | null;
1440
+ startedAt?: number;
1441
+ finishedAt?: number;
1442
+ }
1443
+ declare function parseBoxRunRequest(value: unknown): BoxRunRequest | null;
1444
+ /** A test is named as the DSL lexer reads a function name (`isWordStart` /
1445
+ * `isLetterInWord` in packages/dsl/src/parser/tools.ts): nothing else can
1446
+ * name a test in a file. One rule for the box that queues the run and the
1447
+ * sidecar that plays it — nothing else reaches a queue ticket, the
1448
+ * terminals that print it, or the suite's argv as a flag or a path. */
1449
+ declare function isTestName(value: string): boolean;
1450
+ declare function parseBoxRunAccepted(value: unknown): BoxRunAccepted | null;
1451
+ declare function parseBoxRunStatus(value: unknown): BoxRunStatus | null;
1452
+
1296
1453
  /** Run endpoint, relative to the box origin:
1297
1454
  * `POST <origin>/api/box/ci/run` with `Authorization: Bearer <token>` —
1298
1455
  * the same project token that uploaded the bundle. */
@@ -1456,13 +1613,24 @@ declare const CI_RUN_LINES_MAX = 500;
1456
1613
  * masked before the line leaves the box. */
1457
1614
  interface CiRunLine {
1458
1615
  kind: "scenario-started" | "step-failed" | "log" | "note" | "scenario-finished";
1459
- /** The scenario the line belongs to. */
1616
+ /** Display label of what the line belongs to: the scenario file, or
1617
+ * `file › test` for one test of a file of several. Not a ref — nothing
1618
+ * is to be built from it. */
1460
1619
  scenario: string;
1461
1620
  /** `step-failed`: `file:line ErrorName: message`; `log` / `note`: the
1462
1621
  * text (a note as `label: text`); the scenario lines: empty. */
1463
1622
  text: string;
1464
1623
  /** `scenario-finished` only. */
1465
1624
  outcome?: RunOutcome;
1625
+ /** `scenario-finished` only: the test skipped itself (`skip(reason)`),
1626
+ * so the `completed` above proved nothing. A field beside the outcome,
1627
+ * not an outcome of its own: a client older than it rejects an answer
1628
+ * whose outcome it does not know, and drops a key it does not. */
1629
+ skipReason?: string;
1630
+ /** `scenario-finished` only: the test was marked `@expect-fail`; read
1631
+ * with the outcome as on `run:finished`. A field beside the outcome for
1632
+ * the same reason as `skipReason`. */
1633
+ expectFail?: true;
1466
1634
  }
1467
1635
  interface CiRunLines {
1468
1636
  runId: string;
@@ -1498,11 +1666,7 @@ declare const QUEUE_SLOTS_DIR = "slots";
1498
1666
  /** Mutex file for the all-or-nothing weight claim in a global pool.
1499
1667
  * Short-lived by construction; a stale one is reaped like any lease. */
1500
1668
  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";
1669
+
1506
1670
  /** Escape hatch: `1` runs without touching the queue at all. */
1507
1671
  declare const QUEUE_DISABLED_ENV = "UNOTEST_NO_QUEUE";
1508
1672
  /** Optional host-wide weight pool shared by every environment on the
@@ -1598,6 +1762,10 @@ interface QueueTicket {
1598
1762
  * `RunRequest` — and the `ref` the produced run carries in `RunMeta`.
1599
1763
  * Not a git ref. */
1600
1764
  ref: string;
1765
+ /** The one `test_*` of `ref` this run plays; absent = the whole file.
1766
+ * A label only: what runs is the order's own test, never the ticket's,
1767
+ * so the queue can name the run the way `box runs` does. */
1768
+ test?: string;
1601
1769
  /** Environment name; absent = base. Redundant with the queue
1602
1770
  * directory, kept for readable diagnostics. */
1603
1771
  env?: string;
@@ -1651,6 +1819,7 @@ interface EnqueueRunInput {
1651
1819
  runId: string;
1652
1820
  kind: QueueTicketKind;
1653
1821
  ref: string;
1822
+ test?: string;
1654
1823
  env?: string;
1655
1824
  priority: QueuePriority;
1656
1825
  weight?: number;
@@ -1811,6 +1980,13 @@ interface BundleManifest {
1811
1980
  * here can supply LOGIN" at upload instead of an hour later. Optional:
1812
1981
  * a bundle packed by an older CLI carries none. */
1813
1982
  declaredVariables?: string[];
1983
+ /** The `test_*` functions of each scenario file, keyed by the name a
1984
+ * run orders it by (`cart`, `checkout/pay`). What lets a box refuse a
1985
+ * test the file does not have before the queue, in the words the CLI
1986
+ * uses — the box has no DSL parser of its own. Advisory, like the
1987
+ * names above: absent from a bundle packed by an older CLI, which the
1988
+ * box then does not check. */
1989
+ tests?: Record<string, string[]>;
1814
1990
  /** sha256 of `canonicalScheduleSet` over the EFFECTIVE schedules
1815
1991
  * (`schedules --json`) as the pusher's machine computed them. The
1816
1992
  * config is user JS: a box re-computes the set in its own
@@ -2063,10 +2239,14 @@ interface RunManifest {
2063
2239
  * The `runId` directory uses a sanitized form; this carries the
2064
2240
  * human-readable original. */
2065
2241
  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. */
2242
+ /** Run-id of the group this run belongs to: the collection-run that
2243
+ * spawned this scenario, or the file run when this is one test of a
2244
+ * file with several. Absent for top-level runs and for collection-runs
2245
+ * themselves. */
2069
2246
  parentRunId?: string;
2247
+ /** The `test_*` function this run is. Absent on the run of a file with
2248
+ * several tests, which groups them. Since 0.49.0. */
2249
+ test?: string;
2070
2250
  /** Adapter `name` that produced this run (`"@unotest/web"`,
2071
2251
  * `"@unotest/mobile"`). Lets the viewer pick rendering details for
2072
2252
  * runner-specific bundle contents without runner branches in core
@@ -2523,6 +2703,11 @@ declare function parseBoxReadError(value: unknown): BoxReadErrorBody | null;
2523
2703
  * not recognise is not a box answering. */
2524
2704
  declare function parseBoxReadEnvironments(value: unknown): BoxReadEnvironment[] | null;
2525
2705
 
2706
+ declare function testLabel(scenario: string, test: string): string;
2707
+ /** A run's name: its file, or `file › test` when it played exactly one
2708
+ * known test — a test picked out of a file, or a file that has one. */
2709
+ declare function runLabel(ref: string, test: string | undefined): string;
2710
+
2526
2711
  declare const WORKSPACE_SCHEMA_VERSION = 1;
2527
2712
  /** Written by the host beside the artifacts it manages:
2528
2713
  * `<artifactsRoot>/unotest/.workspace.json`. In the artifact tree and
@@ -2802,7 +2987,29 @@ interface CollectionMeta {
2802
2987
  * for the want of a table. A schedules entry may still name its own
2803
2988
  * `prepare` (it wins for that tick), and `--no-prepare` skips it. */
2804
2989
  prepare: string | null;
2805
- }
2990
+ /** Optional `viewport:` from the YAML — the browser window of every
2991
+ * scenario this collection runs, over the project's `viewport`.
2992
+ * `null` is the real window (no size emulation); `{width, height}` an
2993
+ * emulated size. Absent → the project's setting applies. A setting
2994
+ * of the collection, not of a scenario file: the same scenario run on
2995
+ * its own keeps the project's. Since 0.49.0. */
2996
+ viewport?: CollectionViewport;
2997
+ }
2998
+ /** `viewport:` of a collection: the real window, or an emulated size. */
2999
+ type CollectionViewport = {
3000
+ width: number;
3001
+ height: number;
3002
+ } | null;
3003
+ /** Read a collection's raw `viewport:` value. Shared by the parsers of
3004
+ * the runner and the viewer so both accept and refuse the same values;
3005
+ * each wraps `reason` in its own error with the file's path. */
3006
+ declare function parseCollectionViewport(raw: unknown): {
3007
+ ok: true;
3008
+ viewport: CollectionViewport;
3009
+ } | {
3010
+ ok: false;
3011
+ reason: string;
3012
+ };
2806
3013
 
2807
3014
  /** The collection `init` writes into a new project, and the one the box's
2808
3015
  * screen shows as an example. Named once so the two cannot disagree:
@@ -3016,6 +3223,34 @@ declare function isAnnotationLine(line: string): boolean;
3016
3223
  * comments and stops at the first line of code — an `// @expect-fail`
3017
3224
  * further down the file is a comment about a step, not about the test. */
3018
3225
  declare function parseScenarioAnnotations(source: string): ScenarioAnnotations;
3226
+ /** The markers of ONE `test_*` in a file that may hold several.
3227
+ *
3228
+ * Two places mark a test, and each says whom it is about by where it sits:
3229
+ *
3230
+ * - the `//` lines directly above its `function` line — consecutive,
3231
+ * no blank line between — belong to THAT test, the first one of the
3232
+ * file included;
3233
+ * - the file's leading comments, set apart from the first function by a
3234
+ * blank line, mark EVERY test in the file.
3235
+ *
3236
+ * // @expect-fail <- every test in the file
3237
+ *
3238
+ * // The badge must stay hidden.
3239
+ * // @expect-fail <- test_badge_hidden only
3240
+ * function test_badge_hidden() { ... }
3241
+ *
3242
+ * Adjacency is the rule a reader already applies: a comment touching a
3243
+ * function is about that function. Reading the block above the FIRST test
3244
+ * as the file's would put every test of the file under an expected
3245
+ * failure for a marker its author wrote above one, and a real red in its
3246
+ * neighbours would hide behind it. In a one-test file both readings
3247
+ * agree, which is why {@link parseScenarioAnnotations} keeps its own.
3248
+ *
3249
+ * `functionLine` is the 1-based line of the `function` keyword, as the
3250
+ * DSL parser reports it. Line-based like the rest of this module: only
3251
+ * `//` lines that stand alone count — `foo(); // @expect-fail` is a note
3252
+ * about `foo()`. */
3253
+ declare function parseTestAnnotations(source: string, functionLine: number): ScenarioAnnotations;
3019
3254
 
3020
3255
  /** Parsed scenario metadata from the mandatory header lines
3021
3256
  * (per design-v0/decisions.md, "Test source format"):
@@ -3045,6 +3280,18 @@ interface ScenarioMeta {
3045
3280
  * healthy state, and a green one is the alarm. See
3046
3281
  * {@link ./scenario-annotations.ts}. */
3047
3282
  expectFail: boolean;
3283
+ /** The `test_*` functions of a file that holds several, in file order —
3284
+ * each its own run, its own row under the file. Absent for a file with
3285
+ * one test, which stays a single row. Since 0.49.0. */
3286
+ tests?: ScenarioTest[];
3287
+ }
3288
+ /** One `test_*` of a scenario file with several. */
3289
+ interface ScenarioTest {
3290
+ /** The function name, as written: `test_badge_hidden`. */
3291
+ name: string;
3292
+ /** Marked `// @expect-fail` — by the file's leading block or by the
3293
+ * comments touching its own `function` line. */
3294
+ expectFail: boolean;
3048
3295
  }
3049
3296
 
3050
3297
  /** Response of `GET /api/scenarios`. Folders are listed independently of
@@ -3688,6 +3935,14 @@ interface RuntimeStateFile {
3688
3935
  /** True when the failure happened inside a `step.soft(...)` block —
3689
3936
  * the run went on past it. Since 0.31.0. */
3690
3937
  soft?: boolean;
3938
+ /** `note(label, value)` calls of the failing statement's `step(...)`
3939
+ * block (the innermost one), in call order, secrets masked. Empty
3940
+ * when the block noted nothing; absent from runners that do not
3941
+ * collect them. Since 0.49.0. */
3942
+ notes?: Array<{
3943
+ label: string;
3944
+ text: string;
3945
+ }>;
3691
3946
  } | null;
3692
3947
  /** Every `step.soft(...)` block that failed so far, in run order —
3693
3948
  * what the test's verdict lists. Absent on runs recorded before
@@ -3919,4 +4174,4 @@ interface CloudApiRouteMatch {
3919
4174
  */
3920
4175
  declare function matchCloudApiRoute(method: string, path: string): CloudApiRouteMatch | undefined;
3921
4176
 
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 };
4177
+ 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 BoxValuesRefusalCode, 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 ReservedRefusalDetail, type ReservedSubject, 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, type UnrecognizedBoxValuesErrorCode, 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, isBoxValuesErrorCode, isEnvVarName, isExternalVarName, isFailingStatus, isQueueDirName, isRecord, isRegexLiteral, isReservedBoxValueName, isRunId, isRunIdentityEnvName, isRunnerConfigKey, isRunnerSetting, isRunsDirName, isTerminalRuntimeState, isTestName, 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, runLabel, runStatusOf, runTriggerEnv, runTriggerFromEnv, runsDirFor, sanitizeRunIdSegment, scenarioIndexFileName, scenarioRefFromFileName, scheduleTarget, secretMark, secretsFileFor, secretsLayerFilesFor, selectTests, serializeEnvValue, shardDaysDescending, shardDirFor, shardPathForRunId, shardPathForTimestamp, specFromCron, testDirFor, testIndexFileName, testLabel, validateCollectionName, validateSegmentName, withoutRunIdentity };