@unotest/protocol 0.19.0 → 0.21.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,98 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.21.0] - 2026-08-25
4
+
5
+ ### Minor Changes
6
+
7
+ - 174d27e: feat: environments are first-class in the viewer — a switcher, per-env run history
8
+
9
+ **Run artifacts are laid out per environment, as folders.** Each
10
+ environment's history lives in its own root, mirroring the env-file
11
+ scheme: `unotest/.runs` (base), `unotest/.runs.<env>` (e.g.
12
+ `.runs.staging` for `--env staging` / `UNOTEST_ENV=staging`); the axes
13
+ compose — `.runs-mobile.staging`. Indexes (`_day.jsonl`, `_latest.json`)
14
+ are per-env automatically: switching environments is a change of root,
15
+ not a filter and not a rebuild. Old runs stay in `.runs` (= base), no
16
+ migration needed. `runsDirFor` / `projectRunsRoot` / `projectRunDirFor`
17
+ gained an optional `envName` parameter; the run manifest carries `env`
18
+ for self-description. Make sure your `.gitignore` uses the wildcard
19
+ form — `unotest/.runs*/` (`init` already writes it that way for new
20
+ projects).
21
+
22
+ **The viewer knows about environments.** A new switcher sits at the top
23
+ of the Variables panel and in the status bar: base plus every
24
+ environment discovered from `unotest/.env.<name>` / `.secrets.<name>`
25
+ (`.env.example` and other templates do not count). The active
26
+ environment is server-side (`GET/POST /api/environments`), and all tabs
27
+ converge via the `env:changed` WS message:
28
+
29
+ - the Variables panel shows layers WITH the active environment's
30
+ overlay (previously base only); values coming from `.env.<name>`
31
+ carry a badge; an edit goes to the file where the key is defined; new
32
+ variables go to base;
33
+ - Overview and the Runs list show only the active environment — tiles
34
+ are colored by the latest run in that environment;
35
+ - a run started from the viewer gets the active environment's
36
+ `UNOTEST_ENV` (`RunRequest.env` is a per-request override);
37
+ - a run opened from another environment still resolves by runId across
38
+ all `.runs*` roots.
39
+
40
+ MCP: `run_test {env}` already switched the child process's environment;
41
+ its artifacts are now correctly found by the server in `.runs.<env>`
42
+ (inspect/step/attach/list_runtimes scan all roots).
43
+
44
+ Four fixes uncovered while shaking this down:
45
+
46
+ - **The `--env` overlay actually reaches the run.** Long-lived hosts
47
+ (viewer, MCP server) flattened the base `.env` into their own
48
+ `process.env` on `loadConfig`; children inherited it as ambient
49
+ (ambient beats files) — the overlay's `APP_BASE_URL` was silently
50
+ clobbered by the base value. The viewer now rolls its env back after
51
+ loading the config; MCP spawns children from a clean pre-flatten
52
+ snapshot.
53
+ - **Pause/Abort from the viewer work again.** Debug commands were
54
+ written to the flat `<root>/<runId>/commands.jsonl`, while runs have
55
+ lived in date shards since 0.19 — the write 404'd and abort was
56
+ silently ignored. Order fixed too: SIGTERM to the own process first
57
+ (tests AND collections), then the command file.
58
+ - **A collection no longer "dies" in the UI after 30 seconds.** The
59
+ parent run wrote no heartbeat — the monitor declared it interrupted,
60
+ the row vanished from ACTIVE and the tail detached. The orchestrator
61
+ now maintains the heartbeat (shared machinery in `@unotest/core`),
62
+ and the viewer additionally treats a flowing steps.jsonl as a sign of
63
+ life (compatibility with older runners).
64
+ - **No phantom `failed` after a clean exit.** The "child exited without
65
+ artifacts" check looked at the flat path and fired bogus
66
+ `run-finished: failed` events plus an error toast on every exit.
67
+
68
+ ## [0.20.0] - 2026-08-24
69
+
70
+ ### Minor Changes
71
+
72
+ - 7957469: A status of its own for tests that are supposed to fail, and tiles that fade with age.
73
+
74
+ **`// @expect-fail`.** A scenario can declare that failing IS its assertion.
75
+ The marker lives in the comment block before the first code — with the
76
+ mandatory header (right after the colour line) or without one. The parser is
77
+ `parseScenarioAnnotations` in `@unotest/protocol`; `ScenarioMeta` gains an
78
+ `expectFail` field.
79
+
80
+ Such a scenario carries its own status in the viewer (`expected`, purple):
81
+ it stays out of the FAILED counter, out of the "failing now" badge and out
82
+ of the "Failing now" section. The inverse case — a marked test that
83
+ **passed** — turns red: whatever it was guarding stopped breaking and nobody
84
+ found out. One rule (`scenarioHealthStatus`) drives the dashboard, the
85
+ scenario tree and the badge, so the three cannot drift apart.
86
+
87
+ The runner does not interpret the marker: exit code and run status are
88
+ unchanged. The run really did fail — it is the test itself that is fine.
89
+
90
+ **Fading.** An overview tile dims as its last result ages: four steps (hour /
91
+ day / week / older) set the strength of the fill itself — 46 / 30 / 19 / 11%
92
+ of the status colour. The 11% floor keeps an old red still red. The time of
93
+ the last run is now part of the tile's accessible name — colour is the one
94
+ channel a screen reader does not have.
95
+
3
96
  ## [0.19.0] - 2026-08-23
4
97
 
5
98
  ### Minor Changes
@@ -106,14 +199,14 @@
106
199
 
107
200
  ### Patch Changes
108
201
 
109
- - 01fa3c7: Run-id: случайный суффикс расширен с 6 до 12 hex-символов.
202
+ - 01fa3c7: Run-id: the random suffix grew from 6 to 12 hex characters.
110
203
 
111
- 24 бита давали ~3% шанс коллизии на тысяче id в одной миллисекунде — это
112
- падало в тестах и означало бы два прогона в одном каталоге. С 48 битами
113
- тот же случай — порядка 1e-9.
204
+ 24 bits gave a ~3% collision chance across a thousand ids within one
205
+ millisecond — that failed in tests and would have meant two runs sharing
206
+ one directory. With 48 bits the same case is on the order of 1e-9.
114
207
 
115
- Формат остаётся `<name>-<base36-ts>-<hex>`, меняется только длина
116
- последнего сегмента; ничего его не разбирает.
208
+ The format stays `<name>-<base36-ts>-<hex>`; only the length of the last
209
+ segment changes, and nothing parses it.
117
210
 
118
211
  ## [0.16.0] - 2026-08-19
119
212
 
package/dist/index.d.ts CHANGED
@@ -45,8 +45,18 @@ declare const RUNS_SUBDIR = ".runs";
45
45
  declare const SNAPSHOTS_SUBDIR = ".snapshots";
46
46
  /** Scenario tree under `unotest/`: `e2e` / `e2e-mobile`. */
47
47
  declare function testDirFor(suffix: string): string;
48
- /** Run-artifact root under `unotest/`: `.runs` / `.runs-mobile`. */
49
- declare function runsDirFor(suffix: string): string;
48
+ /** Run-artifact root under `unotest/`. Two axes, mirroring the env-file
49
+ * naming below: TARGET (dash) and ENVIRONMENT (dot) — `.runs`,
50
+ * `.runs-mobile`, `.runs.staging`, `.runs-mobile.staging`. Splitting
51
+ * runs by directory (rather than tagging each record with an env field)
52
+ * keeps every derived index per-environment for free: switching the
53
+ * environment is a change of root, never a filter or a rebuild. */
54
+ declare function runsDirFor(suffix: string, envName?: string): string;
55
+ /** True for directory names under `unotest/` that hold run artifacts for
56
+ * ANY target/environment combination (`.runs`, `.runs-mobile`,
57
+ * `.runs.staging`, …). Lets a reader resolve a runId it did not place
58
+ * without knowing which axis values exist. */
59
+ declare function isRunsDirName(name: string): boolean;
50
60
  /** `UNOTEST_DEBUG` artifact root under `unotest/`: `.debug` /
51
61
  * `.debug-mobile`. */
52
62
  declare function debugDirFor(suffix: string): string;
@@ -129,6 +139,12 @@ declare function secretsLayerFilesFor(suffix: string, envName?: string): string[
129
139
  /** Read an environment name from a process-env-like record (`UNOTEST_ENV`),
130
140
  * normalising empty/blank to `undefined` (= base only). */
131
141
  declare function activeEnvName(env: Record<string, string | undefined>): string | undefined;
142
+ /** Environment names available to a target, derived from a directory
143
+ * listing of `unotest/` (fs stays with the caller — this module is
144
+ * bundled for the browser). A name counts when ANY overlay layer for the
145
+ * target exists: `.env.<name>`, `.env<suffix>.<name>`, or the `.secrets`
146
+ * equivalents. Sorted, deduped, template names excluded. */
147
+ declare function envNamesFromDirListing(fileNames: string[], suffix: string): string[];
132
148
 
133
149
  interface RegexLiteral {
134
150
  readonly kind: "regex";
@@ -183,12 +199,13 @@ declare class UnplaceableRunIdError extends Error {
183
199
  * Throws instead of returning null so a writer can never quietly invent
184
200
  * a location and split one run across two layouts. */
185
201
  declare function requireRunDirFor(runsRoot: string, runId: string): string;
186
- /** Project-relative runs root for a target: `unotest/.runs<suffix>`. */
187
- declare function projectRunsRoot(suffix?: string): string;
202
+ /** Project-relative runs root for a target + environment:
203
+ * `unotest/.runs<suffix>[.<env>]`. */
204
+ declare function projectRunsRoot(suffix?: string, envName?: string): string;
188
205
  /** Project-relative directory of one run, shard included. The single
189
206
  * place that knows how a run id becomes a path — every writer and reader
190
207
  * goes through here, so the layout cannot drift between them. */
191
- declare function projectRunDirFor(runId: string, suffix?: string): string;
208
+ declare function projectRunDirFor(runId: string, suffix?: string, envName?: string): string;
192
209
  /** Day directory: `<runsRoot>/YYYY/MM/DD`. */
193
210
  declare function shardDirFor(runsRoot: string, ms: number): string;
194
211
  /** Walk day-shard paths backwards from `fromMs`, newest first. Used by
@@ -575,6 +592,11 @@ interface ScenarioRunRequest {
575
592
  /** Inline breakpoint override as `"line:col"` strings. Only honored
576
593
  * when `debug=true`. */
577
594
  breakpoints?: string[];
595
+ /** Environment name (`.env.<name>` overlay + `.runs<suffix>.<name>`
596
+ * artifact root). Absent = base. The spawner sets `UNOTEST_ENV` from
597
+ * this EXPLICITLY (clearing it when absent) so the child never
598
+ * inherits a stray value from the viewer process. */
599
+ env?: string;
578
600
  }
579
601
  /** Run a collection — the runner's CLI orchestrates scenarios inside.
580
602
  * Viewer doesn't see the per-scenario subprocesses; it sees one direct
@@ -591,6 +613,8 @@ interface CollectionRunRequest {
591
613
  workers?: number;
592
614
  /** Stop on first failure. Default `false` (continue-on-fail). */
593
615
  bail?: boolean;
616
+ /** Environment name — see `ScenarioRunRequest.env`. */
617
+ env?: string;
594
618
  }
595
619
  /** Open a live AUTHORING-HOLD session (collaborative model, U1/U3): a
596
620
  * headed shared browser + draft stay open with NO running test; the human
@@ -602,6 +626,8 @@ interface AuthoringRunRequest {
602
626
  scenario: string;
603
627
  /** Authoring is visible by default — the human must see the live browser. */
604
628
  headed?: boolean;
629
+ /** Environment name — see `ScenarioRunRequest.env`. */
630
+ env?: string;
605
631
  }
606
632
  /** Discriminated union of every run-shape the viewer can request. */
607
633
  type RunRequest = ScenarioRunRequest | CollectionRunRequest | AuthoringRunRequest;
@@ -779,6 +805,10 @@ interface RunManifest {
779
805
  /** Wallclock at runner start. Distinct from the first event's `t`
780
806
  * (which may have leading delay for adapter setup). */
781
807
  startedAt: number;
808
+ /** Environment name the run resolved (`UNOTEST_ENV` / `--env`), absent
809
+ * for base. Self-description only — placement already encodes it (the
810
+ * run lives under `.runs<suffix>.<env>`), so nothing filters on this. */
811
+ env?: string;
782
812
  /** Opt-in artifact-capture flags as resolved from the runner's env at
783
813
  * start (`UNOTEST_CONSOLE` / `UNOTEST_NETWORK`). Recorded here so the
784
814
  * viewer can tell "capture was disabled" apart from "capture was on but
@@ -963,6 +993,23 @@ declare class RunnerNotConfiguredError extends Error {
963
993
  constructor(message: string);
964
994
  }
965
995
 
996
+ /** A test that is SUPPOSED to fail: the failure itself is the assertion.
997
+ * Its last run being red is the healthy state — and its last run being
998
+ * green is the broken one, because the thing it was guarding stopped
999
+ * being broken without anyone noticing. */
1000
+ declare const EXPECT_FAIL_ANNOTATION = "expect-fail";
1001
+ interface ScenarioAnnotations {
1002
+ expectFail: boolean;
1003
+ }
1004
+ /** True for a line that is an annotation rather than prose or code. Used
1005
+ * by the header parser to step over annotations while keeping the
1006
+ * header's "no loose comments" rule for everything else. */
1007
+ declare function isAnnotationLine(line: string): boolean;
1008
+ /** Read the markers out of a scenario's source. Scans the leading run of
1009
+ * comments and stops at the first line of code — an `// @expect-fail`
1010
+ * further down the file is a comment about a step, not about the test. */
1011
+ declare function parseScenarioAnnotations(source: string): ScenarioAnnotations;
1012
+
966
1013
  /** Parsed scenario metadata from the mandatory header lines
967
1014
  * (per design-v0/decisions.md, "Test source format"):
968
1015
  *
@@ -987,6 +1034,10 @@ interface ScenarioMeta {
987
1034
  name: string;
988
1035
  /** Project-relative path to the source file. */
989
1036
  path: string;
1037
+ /** The file carries `// @expect-fail` — a red run is this test's
1038
+ * healthy state, and a green one is the alarm. See
1039
+ * {@link ./scenario-annotations.ts}. */
1040
+ expectFail: boolean;
990
1041
  }
991
1042
 
992
1043
  /** Response of `GET /api/scenarios`. Folders are listed independently of
@@ -1371,6 +1422,14 @@ interface FsRunFinishedMessage {
1371
1422
  runId: RunId;
1372
1423
  outcome: RunOutcome;
1373
1424
  }
1425
+ /** Emitted when the server's ACTIVE ENVIRONMENT switches (or the set of
1426
+ * available environments changes on disk). Clients refetch
1427
+ * `/api/environments` plus everything env-scoped: variables, runs,
1428
+ * latest index. `env` is the new active name, absent for base. */
1429
+ interface EnvChangedMessage {
1430
+ kind: "env:changed";
1431
+ env?: string;
1432
+ }
1374
1433
  /** A single line of stdout or stderr captured from a runner child the
1375
1434
  * viewer-server spawned. Logs always carry a `runId` so the browser
1376
1435
  * attaches them to the right run-pane. */
@@ -1388,7 +1447,7 @@ interface ErrorMessage {
1388
1447
  message: string;
1389
1448
  }
1390
1449
  /** Discriminated union of every WS message the server emits to clients. */
1391
- type WsMessage = FsScenariosChangedMessage | FsHelpersChangedMessage | FsCollectionsChangedMessage | FsBreakpointsChangedMessage | FsRunStartedMessage | FsRunStepMessage | FsCollectionRunStepMessage | FsRunFinishedMessage | LogLineMessage | ErrorMessage;
1450
+ type WsMessage = FsScenariosChangedMessage | FsHelpersChangedMessage | FsCollectionsChangedMessage | FsBreakpointsChangedMessage | FsRunStartedMessage | FsRunStepMessage | FsCollectionRunStepMessage | FsRunFinishedMessage | EnvChangedMessage | LogLineMessage | ErrorMessage;
1392
1451
  /** All WS message `kind` literals as a union type — useful for handler
1393
1452
  * registries (`Record<WsMessageKind, Handler>`). */
1394
1453
  type WsMessageKind = WsMessage["kind"];
@@ -1532,4 +1591,4 @@ interface RuntimeStateFile {
1532
1591
  updatedAt: number;
1533
1592
  }
1534
1593
 
1535
- export { type AddVariablePlan, type AddVariablePlanInput, type AppPathPickerSpec, type AppServerEvent, type AuthoringRunRequest, BLOBS_DIR, type BreakpointEntry, type BreakpointsFile, COLLECTIONS_SUBDIR, COLLECTION_NAME_FORBIDDEN_RE, COMMANDS_FILE, type CheckSeverity, type CollectionMeta, type CollectionRunArtifact, type CollectionRunFinishedEvent, type CollectionRunRequest, type CollectionRunStartedEvent, type CollectionRunTab, type CollectionScenarioFinishedEvent, type CollectionScenarioStartedEvent, type CollectionTab, DAY_INDEX_FILE, 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 DslDiagnostic, type DslValidateContext, type DslVocabArg, type DslVocabCategory, type DslVocabEntry, E2E_SUBDIR, ENV_FILE, type EnvFile, type EnvUpdate, type EnvVar, type ErrorMessage, type FailureBundleWrittenEvent, type FsBreakpointsChangedMessage, type FsCollectionRunStepMessage, type FsCollectionsChangedMessage, type FsHelpersChangedMessage, type FsRunFinishedMessage, type FsRunStartedMessage, type FsRunStepMessage, type FsScenariosChangedMessage, HEARTBEAT_FILE, HELPERS_SUBDIR, type HelperMeta, type HelperTab, type HostRequirement, type IDslLanguageService, type ILaunchedProcess, type IProcessLauncher, type IRunnerAdapter, InvalidBlobHashError, LOCK_FILE, LOG_FILE, type LaunchSpec, type LocatorPickedEvent, type LockFile, type LogLineMessage, type Matcher, PICKER_SNAPSHOT_FILE, type PausedEvent, type PickerMode, type ProbeMatch, type ProbePinned, type ProbeResult, type ProbeResultEvent, RUNNER_CONFIG_KEYS, RUNS_SUBDIR, RUNTIME_FILE, RUN_INDEX_SCHEMA_VERSION, RUN_MANIFEST_FILE, RUN_SOURCES_FILE, 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 RunRequest, type RunSources, type RunStartedEvent, type RunStatus, RunnerAdapterNotFoundError, RunnerNotConfiguredError, type RuntimeState, type RuntimeStateFile, SCENARIOS_INDEX_DIR, SCENARIOS_LATEST_FILE, SCENARIO_RECENT_WINDOW, SECRETS_FILE, SEGMENT_NAME_FORBIDDEN_RE, SNAPSHOTS_SUBDIR, STDERR_FILE, STDOUT_FILE, STEPS_FILE, type ScenarioLatestEntry, type ScenarioMeta, type ScenarioRunRequest, type ScenarioRunTab, type ScenarioTab, type ScenariosLatest, type ScenariosPayload, type ScreenshotEvent, type SnapshotTab, type StepFailEvent, type StepOkEvent, type StepStartedEvent, TERMINAL_RUNTIME_STATES, TERMINAL_WS_EVENT, type TabKind, type TabKindName, 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, UnplaceableRunIdError, UnsupportedRunKindError, type VariableCategory, type VariableKind, type VariablePlanError, type WheelChangedEvent, type WsMessage, type WsMessageKind, activeEnvName, blobPathFor, blobRelPathFor, blobRelSegmentsFor, blobsRootFor, categorizeVariable, debugDirFor, debuggerFileFor, deleteShadowWarning, envFileFor, envKeys, envLayerFilesFor, foldScenarioRun, insertEnvVar, isExternalVarName, isFailingStatus, isRegexLiteral, isRunnerConfigKey, isTerminalRuntimeState, makeRunId, parseAppServerEvent, parseEnvContent, planAddVariable, projectRunDirFor, projectRunsRoot, regexLiteral, removeEnvVar, requireRunDirFor, runDirFor, runIdStartedAt, runsDirFor, sanitizeRunIdSegment, scenarioIndexFileName, scenarioRefFromFileName, secretsFileFor, secretsLayerFilesFor, serializeEnvValue, shardDaysDescending, shardDirFor, shardPathForRunId, shardPathForTimestamp, testDirFor, validateCollectionName, validateSegmentName };
1594
+ export { type AddVariablePlan, type AddVariablePlanInput, type AppPathPickerSpec, type AppServerEvent, type AuthoringRunRequest, BLOBS_DIR, type BreakpointEntry, type BreakpointsFile, COLLECTIONS_SUBDIR, COLLECTION_NAME_FORBIDDEN_RE, COMMANDS_FILE, type CheckSeverity, type CollectionMeta, type CollectionRunArtifact, type CollectionRunFinishedEvent, type CollectionRunRequest, type CollectionRunStartedEvent, type CollectionRunTab, type CollectionScenarioFinishedEvent, type CollectionScenarioStartedEvent, type CollectionTab, DAY_INDEX_FILE, 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 DslDiagnostic, type DslValidateContext, type DslVocabArg, type DslVocabCategory, type DslVocabEntry, E2E_SUBDIR, ENV_FILE, EXPECT_FAIL_ANNOTATION, type EnvChangedMessage, type EnvFile, type EnvUpdate, type EnvVar, type ErrorMessage, type FailureBundleWrittenEvent, type FsBreakpointsChangedMessage, type FsCollectionRunStepMessage, type FsCollectionsChangedMessage, type FsHelpersChangedMessage, type FsRunFinishedMessage, type FsRunStartedMessage, type FsRunStepMessage, type FsScenariosChangedMessage, HEARTBEAT_FILE, HELPERS_SUBDIR, type HelperMeta, type HelperTab, type HostRequirement, type IDslLanguageService, type ILaunchedProcess, type IProcessLauncher, type IRunnerAdapter, InvalidBlobHashError, LOCK_FILE, LOG_FILE, type LaunchSpec, type LocatorPickedEvent, type LockFile, type LogLineMessage, type Matcher, PICKER_SNAPSHOT_FILE, type PausedEvent, type PickerMode, type ProbeMatch, type ProbePinned, type ProbeResult, type ProbeResultEvent, RUNNER_CONFIG_KEYS, RUNS_SUBDIR, RUNTIME_FILE, RUN_INDEX_SCHEMA_VERSION, RUN_MANIFEST_FILE, RUN_SOURCES_FILE, 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 RunRequest, type RunSources, type RunStartedEvent, type RunStatus, RunnerAdapterNotFoundError, RunnerNotConfiguredError, type RuntimeState, type RuntimeStateFile, SCENARIOS_INDEX_DIR, SCENARIOS_LATEST_FILE, SCENARIO_RECENT_WINDOW, 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 ScenarioTab, type ScenariosLatest, type ScenariosPayload, type ScreenshotEvent, type SnapshotTab, type StepFailEvent, type StepOkEvent, type StepStartedEvent, TERMINAL_RUNTIME_STATES, TERMINAL_WS_EVENT, type TabKind, type TabKindName, 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, UnplaceableRunIdError, UnsupportedRunKindError, type VariableCategory, type VariableKind, type VariablePlanError, type WheelChangedEvent, type WsMessage, type WsMessageKind, activeEnvName, blobPathFor, blobRelPathFor, blobRelSegmentsFor, blobsRootFor, categorizeVariable, debugDirFor, debuggerFileFor, deleteShadowWarning, envFileFor, envKeys, envLayerFilesFor, envNamesFromDirListing, foldScenarioRun, insertEnvVar, isAnnotationLine, isExternalVarName, isFailingStatus, isRegexLiteral, isRunnerConfigKey, isRunsDirName, isTerminalRuntimeState, makeRunId, parseAppServerEvent, parseEnvContent, parseScenarioAnnotations, planAddVariable, projectRunDirFor, projectRunsRoot, regexLiteral, removeEnvVar, requireRunDirFor, runDirFor, runIdStartedAt, runsDirFor, sanitizeRunIdSegment, scenarioIndexFileName, scenarioRefFromFileName, secretsFileFor, secretsLayerFilesFor, serializeEnvValue, shardDaysDescending, shardDirFor, shardPathForRunId, shardPathForTimestamp, testDirFor, validateCollectionName, validateSegmentName };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- const _0x55dbd9=_0x56d7;(function(_0x474380,_0x28e0e0){const _0x561be6={_0x91014b:0xbc,_0x22ed73:0x9c,_0x46e3f8:0xba,_0x519ab2:0xda,_0x1dec2b:0xab},_0x2fe5e=_0x56d7,_0x8b1947=_0x474380();while(!![]){try{const _0x2206cd=parseInt(_0x2fe5e(0xc1))/0x1*(-parseInt(_0x2fe5e(_0x561be6._0x91014b))/0x2)+parseInt(_0x2fe5e(0xd1))/0x3*(-parseInt(_0x2fe5e(_0x561be6._0x22ed73))/0x4)+-parseInt(_0x2fe5e(_0x561be6._0x46e3f8))/0x5+-parseInt(_0x2fe5e(0xdb))/0x6+-parseInt(_0x2fe5e(0xb3))/0x7+parseInt(_0x2fe5e(_0x561be6._0x519ab2))/0x8+-parseInt(_0x2fe5e(_0x561be6._0x1dec2b))/0x9*(-parseInt(_0x2fe5e(0xf1))/0xa);if(_0x2206cd===_0x28e0e0)break;else _0x8b1947['push'](_0x8b1947['shift']());}catch(_0x28b1de){_0x8b1947['push'](_0x8b1947['shift']());}}}(_0x1172,0xad63e));var __defProp=Object[_0x55dbd9(0xdc)],__name=(_0x18b725,_0xf9d37b)=>__defProp(_0x18b725,_0x55dbd9(0xe5),{'value':_0xf9d37b,'configurable':!![]});function parseAppServerEvent(_0x5a02d5){const _0x428109={_0x4bd19e:0xe4,_0x597ccc:0x10d,_0x298a5f:0xee},_0xc31960=_0x55dbd9,_0xcdb79a=_0x5a02d5[_0xc31960(_0x428109._0x4bd19e)]();if(!_0xcdb79a['startsWith']('{'))return null;try{const _0x9c6880=JSON[_0xc31960(_0x428109._0x597ccc)](_0xcdb79a);if(_0x9c6880[_0xc31960(_0x428109._0x298a5f)]===_0xc31960(0xd4)||_0x9c6880[_0xc31960(0xee)]===_0xc31960(0xed)||_0x9c6880[_0xc31960(_0x428109._0x298a5f)]==='app-server:error')return _0x9c6880;return null;}catch{return null;}}__name(parseAppServerEvent,_0x55dbd9(0x121));var UNOTEST_DIR=_0x55dbd9(0xa9),E2E_SUBDIR=_0x55dbd9(0xfe),HELPERS_SUBDIR=_0x55dbd9(0xf7),COLLECTIONS_SUBDIR='_collections',RUNS_SUBDIR=_0x55dbd9(0xde),SNAPSHOTS_SUBDIR='.snapshots';function testDirFor(_0x53897b){return''+E2E_SUBDIR+_0x53897b;}__name(testDirFor,_0x55dbd9(0xb4));function runsDirFor(_0x2fefd8){return''+RUNS_SUBDIR+_0x2fefd8;}__name(runsDirFor,_0x55dbd9(0xd9));function debugDirFor(_0x37ad7a){const _0x189a2e={_0x23be89:0xb5},_0x44e82b=_0x55dbd9;return _0x44e82b(_0x189a2e._0x23be89)+_0x37ad7a;}__name(debugDirFor,_0x55dbd9(0x123));function debuggerFileFor(_0x19eeb8){const _0x2aba79={_0x3a4713:0xbe},_0x9b3a61=_0x55dbd9;return UNOTEST_DIR+_0x9b3a61(_0x2aba79._0x3a4713)+_0x19eeb8+_0x9b3a61(0xc0);}__name(debuggerFileFor,_0x55dbd9(0xcf));var LOCK_FILE=_0x55dbd9(0xc4),LOG_FILE='.viewer.log',STEPS_FILE=_0x55dbd9(0x9d),HEARTBEAT_FILE=_0x55dbd9(0x9a),DAY_INDEX_FILE=_0x55dbd9(0x117),SCENARIOS_INDEX_DIR=_0x55dbd9(0xb7),SCENARIOS_LATEST_FILE='_latest.json',STDOUT_FILE=_0x55dbd9(0xfa),STDERR_FILE='stderr.log',COMMANDS_FILE=_0x55dbd9(0xa6),RUNTIME_FILE=_0x55dbd9(0xd8),PICKER_SNAPSHOT_FILE=_0x55dbd9(0x11d),ENV_FILE=_0x55dbd9(0xcd),SECRETS_FILE=_0x55dbd9(0x101);function envFileFor(_0x16c70e,_0x518a4f){return''+ENV_FILE+_0x16c70e+(_0x518a4f?'.'+_0x518a4f:'');}__name(envFileFor,_0x55dbd9(0xf0));function secretsFileFor(_0x396655,_0x457bc9){return''+SECRETS_FILE+_0x396655+(_0x457bc9?'.'+_0x457bc9:'');}__name(secretsFileFor,_0x55dbd9(0x116));function envLayerFilesFor(_0xc196f7,_0x38954b){return layersFor(ENV_FILE,_0xc196f7,_0x38954b);}__name(envLayerFilesFor,'envLayerFilesFor');function secretsLayerFilesFor(_0x425561,_0x341176){return layersFor(SECRETS_FILE,_0x425561,_0x341176);}__name(secretsLayerFilesFor,_0x55dbd9(0xc9));function layersFor(_0x404762,_0x1cb01f,_0x2031d4){const _0x83d815={_0x380996:0x11e},_0x2ad1aa=_0x55dbd9,_0x3b0b75=[_0x404762];if(_0x1cb01f)_0x3b0b75['push'](''+_0x404762+_0x1cb01f);if(_0x2031d4){_0x3b0b75[_0x2ad1aa(_0x83d815._0x380996)](_0x404762+'.'+_0x2031d4);if(_0x1cb01f)_0x3b0b75[_0x2ad1aa(0x11e)](''+_0x404762+_0x1cb01f+'.'+_0x2031d4);}return _0x3b0b75;}__name(layersFor,_0x55dbd9(0xac));function activeEnvName(_0x2ac644){const _0x15d5c1=_0x55dbd9,_0x530e3=_0x2ac644['UNOTEST_ENV']?.[_0x15d5c1(0xe4)]();return _0x530e3?_0x530e3:void 0x0;}__name(activeEnvName,_0x55dbd9(0xae));function isRegexLiteral(_0x1c80a9){const _0x35877f={_0x52ac06:0xd2,_0x10252d:0xee,_0x485b54:0x96,_0x122b40:0x95,_0xd433f:0x127},_0x2ff2e4=_0x55dbd9;return typeof _0x1c80a9===_0x2ff2e4(_0x35877f._0x52ac06)&&_0x1c80a9!==null&&_0x1c80a9[_0x2ff2e4(_0x35877f._0x10252d)]==='regex'&&typeof _0x1c80a9[_0x2ff2e4(_0x35877f._0x485b54)]===_0x2ff2e4(_0x35877f._0x122b40)&&typeof _0x1c80a9[_0x2ff2e4(_0x35877f._0xd433f)]===_0x2ff2e4(0x95);}__name(isRegexLiteral,_0x55dbd9(0x92));function regexLiteral(_0x3eddb5,_0x2ae071=''){const _0x51f84d={_0x59a29e:0x8d},_0x5b8118=_0x55dbd9;return{'kind':_0x5b8118(_0x51f84d._0x59a29e),'source':_0x3eddb5,'flags':_0x2ae071};}__name(regexLiteral,'regexLiteral');var RAND_BYTES=0x6;function makeRunId(_0x3e5ac4){const _0x1f75d1=_0x55dbd9,_0x301109=sanitizeRunIdSegment(_0x3e5ac4),_0x1e7563=Date[_0x1f75d1(0xb6)]()[_0x1f75d1(0xff)](0x24),_0x1edb8a=new Uint8Array(RAND_BYTES);globalThis[_0x1f75d1(0xaa)]['getRandomValues'](_0x1edb8a);let _0x4c93f1='';for(let _0x23f78=0x0;_0x23f78<_0x1edb8a[_0x1f75d1(0x9b)];_0x23f78++){_0x4c93f1+=_0x1edb8a[_0x23f78][_0x1f75d1(0xff)](0x10)[_0x1f75d1(0x11c)](0x2,'0');}return _0x301109+'-'+_0x1e7563+'-'+_0x4c93f1;}function _0x56d7(_0x3f339c,_0x5e47f5){_0x3f339c=_0x3f339c-0x8c;const _0x11721e=_0x1172();let _0x56d7f3=_0x11721e[_0x3f339c];if(_0x56d7['bZwYBc']===undefined){var _0x4b4f4b=function(_0x6c7179){const _0x45d0ca='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x18b725='',_0xf9d37b='';for(let _0x5a02d5=0x0,_0xcdb79a,_0x9c6880,_0x53897b=0x0;_0x9c6880=_0x6c7179['charAt'](_0x53897b++);~_0x9c6880&&(_0xcdb79a=_0x5a02d5%0x4?_0xcdb79a*0x40+_0x9c6880:_0x9c6880,_0x5a02d5++%0x4)?_0x18b725+=String['fromCharCode'](0xff&_0xcdb79a>>(-0x2*_0x5a02d5&0x6)):0x0){_0x9c6880=_0x45d0ca['indexOf'](_0x9c6880);}for(let _0x2fefd8=0x0,_0x37ad7a=_0x18b725['length'];_0x2fefd8<_0x37ad7a;_0x2fefd8++){_0xf9d37b+='%'+('00'+_0x18b725['charCodeAt'](_0x2fefd8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xf9d37b);};_0x56d7['lNFvly']=_0x4b4f4b,_0x56d7['rdoynN']={},_0x56d7['bZwYBc']=!![];}const _0x31a493=_0x11721e[0x0],_0x2a0560=_0x3f339c+_0x31a493,_0x5153ef=_0x56d7['rdoynN'][_0x2a0560];return!_0x5153ef?(_0x56d7f3=_0x56d7['lNFvly'](_0x56d7f3),_0x56d7['rdoynN'][_0x2a0560]=_0x56d7f3):_0x56d7f3=_0x5153ef,_0x56d7f3;}__name(makeRunId,_0x55dbd9(0xce));function sanitizeRunIdSegment(_0x16d215){const _0x9c437d={_0x5ee68e:0x100},_0x500e2a=_0x55dbd9,_0x4cb1d6=_0x16d215[_0x500e2a(0x100)](/[^a-zA-Z0-9_-]+/g,'-')[_0x500e2a(0x100)](/-+/g,'-')[_0x500e2a(_0x9c437d._0x5ee68e)](/^-|-$/g,'');return _0x4cb1d6[_0x500e2a(0x9b)]>0x0?_0x4cb1d6:_0x500e2a(0xef);}__name(sanitizeRunIdSegment,_0x55dbd9(0xc6));var RANDOM_SUFFIX_RE=/^[0-9a-f]{6,}$/,MIN_PLAUSIBLE_MS=Date[_0x55dbd9(0xc8)](0x7e4,0x0,0x1),MAX_PLAUSIBLE_MS=Date[_0x55dbd9(0xc8)](0x834,0x0,0x1);function runIdStartedAt(_0x10b1b5){const _0x1717d1={_0x2e834a:0x9b,_0x1eb978:0x91},_0x51db59=_0x55dbd9,_0x3cfab1=_0x10b1b5[_0x51db59(0xd6)]('-');if(_0x3cfab1[_0x51db59(0x9b)]<0x3)return null;const _0xf70617=_0x3cfab1[_0x3cfab1[_0x51db59(_0x1717d1._0x2e834a)]-0x1];if(!RANDOM_SUFFIX_RE[_0x51db59(0x91)](_0xf70617))return null;const _0x34a3e0=_0x3cfab1[_0x3cfab1[_0x51db59(0x9b)]-0x2];if(!/^[0-9a-z]+$/[_0x51db59(_0x1717d1._0x1eb978)](_0x34a3e0))return null;const _0x180414=parseInt(_0x34a3e0,0x24);if(!Number['isFinite'](_0x180414))return null;if(_0x180414<MIN_PLAUSIBLE_MS||_0x180414>=MAX_PLAUSIBLE_MS)return null;return _0x180414;}__name(runIdStartedAt,_0x55dbd9(0xe8));function shardPathForTimestamp(_0x4893b4){const _0x170557={_0x4a14b6:0x11c},_0x2463fb=_0x55dbd9,_0x47f6a5=new Date(_0x4893b4),_0x4acd1b=String(_0x47f6a5['getUTCFullYear']())[_0x2463fb(_0x170557._0x4a14b6)](0x4,'0'),_0x4a8085=String(_0x47f6a5[_0x2463fb(0x115)]()+0x1)['padStart'](0x2,'0'),_0x3ac2b6=String(_0x47f6a5[_0x2463fb(0x110)]())[_0x2463fb(0x11c)](0x2,'0');return _0x4acd1b+'/'+_0x4a8085+'/'+_0x3ac2b6;}__name(shardPathForTimestamp,_0x55dbd9(0x10a));function shardPathForRunId(_0x41970a){const _0x5a932e=runIdStartedAt(_0x41970a);return _0x5a932e===null?null:shardPathForTimestamp(_0x5a932e);}__name(shardPathForRunId,_0x55dbd9(0xec));function runDirFor(_0x2f6587,_0x4b882b){const _0x264ce1=shardPathForRunId(_0x4b882b);return _0x264ce1===null?null:_0x2f6587+'/'+_0x264ce1+'/'+_0x4b882b;}__name(runDirFor,_0x55dbd9(0xe9));var UnplaceableRunIdError=class extends Error{static{__name(this,'UnplaceableRunIdError');}constructor(_0x2e071d){const _0x50d998={_0x20ad3c:0xe5,_0x439e2f:0x10c},_0x523b6f=_0x55dbd9;super('runId\x20carries\x20no\x20timestamp,\x20cannot\x20place\x20it\x20in\x20a\x20shard:\x20'+_0x2e071d),this[_0x523b6f(_0x50d998._0x20ad3c)]=_0x523b6f(_0x50d998._0x439e2f);}};function requireRunDirFor(_0x34e9a9,_0x43f555){const _0x4f4afb=runDirFor(_0x34e9a9,_0x43f555);if(_0x4f4afb===null)throw new UnplaceableRunIdError(_0x43f555);return _0x4f4afb;}__name(requireRunDirFor,_0x55dbd9(0x128));function projectRunsRoot(_0x10ad64=''){return UNOTEST_DIR+'/'+runsDirFor(_0x10ad64);}__name(projectRunsRoot,_0x55dbd9(0x102));function projectRunDirFor(_0x3224c4,_0x1dc1b4=''){return requireRunDirFor(projectRunsRoot(_0x1dc1b4),_0x3224c4);}__name(projectRunDirFor,_0x55dbd9(0xad));function shardDirFor(_0x79da13,_0x5860f9){return _0x79da13+'/'+shardPathForTimestamp(_0x5860f9);}__name(shardDirFor,_0x55dbd9(0xe2));function*shardDaysDescending(_0x72f4c5,_0x12084a,_0x3ce67a){const _0x31e307={_0x15ff35:0xa1},_0x5b2cd1=_0x55dbd9,_0x561bf0=0x5265c00;let _0x2fb737=Math[_0x5b2cd1(_0x31e307._0x15ff35)](_0x12084a/_0x561bf0)*_0x561bf0;for(let _0x48f683=0x0;_0x48f683<_0x3ce67a;_0x48f683++){yield shardDirFor(_0x72f4c5,_0x2fb737),_0x2fb737-=_0x561bf0;}}__name(shardDaysDescending,_0x55dbd9(0xeb));var RUN_INDEX_SCHEMA_VERSION=0x2,SCENARIO_RECENT_WINDOW=0xc;function isFailingStatus(_0x3353e2){return _0x3353e2==='failed'||_0x3353e2==='interrupted';}__name(isFailingStatus,'isFailingStatus');function foldScenarioRun(_0x33ff12,_0x2eb00f){const _0x5b7917={_0xc83263:0x11a,_0x318ec0:0xca,_0x254eac:0xb2},_0x3a4876=_0x55dbd9,_0x1fa5c3={'lastRunId':_0x2eb00f['runId'],'lastStatus':_0x2eb00f[_0x3a4876(0x118)],'lastAt':_0x2eb00f[_0x3a4876(0xb2)],'lastDurationMs':_0x2eb00f[_0x3a4876(0xf5)],'recent':[..._0x33ff12?.[_0x3a4876(_0x5b7917._0xc83263)]??[],_0x2eb00f[_0x3a4876(0x118)]][_0x3a4876(_0x5b7917._0x318ec0)](-SCENARIO_RECENT_WINDOW)};if(!isFailingStatus(_0x2eb00f['status']))return{..._0x1fa5c3,'failStreak':0x0,'failingSince':null};const _0x310545=(_0x33ff12?.['failStreak']??0x0)+0x1;return{..._0x1fa5c3,'failStreak':_0x310545,'failingSince':_0x310545===0x1?_0x2eb00f[_0x3a4876(_0x5b7917._0x254eac)]:_0x33ff12?.[_0x3a4876(0xea)]??_0x2eb00f[_0x3a4876(_0x5b7917._0x254eac)]};}__name(foldScenarioRun,_0x55dbd9(0x9e));function scenarioIndexFileName(_0x59aefd){const _0x4d483a=_0x55dbd9;return encodeURIComponent(_0x59aefd)+_0x4d483a(0x114);}__name(scenarioIndexFileName,'scenarioIndexFileName');function scenarioRefFromFileName(_0x431542){const _0x12364a={_0x42e9b2:0x114},_0x292349=_0x55dbd9;if(!_0x431542[_0x292349(0xa8)]('.jsonl'))return null;try{return decodeURIComponent(_0x431542['slice'](0x0,-_0x292349(_0x12364a._0x42e9b2)['length']));}catch{return null;}}__name(scenarioRefFromFileName,_0x55dbd9(0x98));var BLOBS_DIR=_0x55dbd9(0xb9),GENERATION_SEP='~',HASH_RE=/^[0-9a-f]{8,}$/,InvalidBlobHashError=class extends Error{static{__name(this,_0x55dbd9(0x10b));}constructor(_0x213362){const _0x47e6c4={_0xfde91f:0xe5},_0x52eab2=_0x55dbd9;super(_0x52eab2(0xfd)+_0x213362),this[_0x52eab2(_0x47e6c4._0xfde91f)]='InvalidBlobHashError';}};function blobPathFor(_0x1503c0,_0x3c4df1,_0x3d5ae4,_0xee2a32=0x0){return _0x1503c0+'/'+blobRelPathFor(_0x3c4df1,_0x3d5ae4,_0xee2a32);}__name(blobPathFor,_0x55dbd9(0xbd));function blobRelSegmentsFor(_0x2f6364,_0x4bc9ac,_0x37685e=0x0){const _0x47536a={_0x274b82:0xca},_0xa10f51=_0x55dbd9;if(!HASH_RE[_0xa10f51(0x91)](_0x2f6364))throw new InvalidBlobHashError(_0x2f6364);const _0x553568=_0x37685e>0x0?''+GENERATION_SEP+_0x37685e:'';return[BLOBS_DIR,_0x2f6364[_0xa10f51(0xca)](0x0,0x2),_0x2f6364[_0xa10f51(_0x47536a._0x274b82)](0x2,0x4),''+_0x2f6364+_0x553568+'.'+_0x4bc9ac];}__name(blobRelSegmentsFor,_0x55dbd9(0x129));function blobRelPathFor(_0x4a4670,_0x5f41d8,_0x7eb0f8=0x0){return blobRelSegmentsFor(_0x4a4670,_0x5f41d8,_0x7eb0f8)['join']('/');}__name(blobRelPathFor,'blobRelPathFor');function blobsRootFor(_0x458c2a){return _0x458c2a+'/'+BLOBS_DIR;}__name(blobsRootFor,_0x55dbd9(0x112));var FS_UNSAFE_NAME_RE=/[\\/:*?"<>|\x00-\x1f]/;function validateFsSafeName(_0x3d3171,_0x3be28a){const _0x18e1c5={_0x3fdf0a:0x94,_0x37e545:0xe4,_0xca4452:0x9b,_0x5e98d2:0x90},_0x4b1130=_0x55dbd9;if(typeof _0x3d3171!==_0x4b1130(0x95))return _0x4b1130(_0x18e1c5._0x3fdf0a);const _0x3cc7fb=_0x3d3171[_0x4b1130(_0x18e1c5._0x37e545)]();if(_0x3cc7fb[_0x4b1130(_0x18e1c5._0xca4452)]===0x0)return _0x4b1130(0xe3);if(_0x3cc7fb==='.'||_0x3cc7fb==='..')return'must\x20not\x20be\x20\x22.\x22\x20or\x20\x22..\x22';if(_0x3cc7fb[_0x4b1130(_0x18e1c5._0x5e98d2)]('.'))return'must\x20not\x20start\x20with\x20\x27.\x27';if(_0x3be28a?.['reservedUnderscore']&&_0x3cc7fb[_0x4b1130(0x90)]('_'))return'must\x20not\x20start\x20with\x20\x27_\x27\x20(reserved)';if(FS_UNSAFE_NAME_RE['test'](_0x3cc7fb))return'must\x20not\x20contain\x20\x5c\x20/\x20:\x20*\x20?\x20\x22\x20<\x20>\x20|\x20or\x20control\x20characters';return null;}__name(validateFsSafeName,_0x55dbd9(0x106));var COLLECTION_NAME_FORBIDDEN_RE=FS_UNSAFE_NAME_RE;function validateCollectionName(_0x376832){return validateFsSafeName(_0x376832);}__name(validateCollectionName,_0x55dbd9(0xd0));var RUN_MANIFEST_FILE=_0x55dbd9(0xa3),RUN_SOURCES_FILE=_0x55dbd9(0xa2),UnsupportedRunKindError=class extends Error{static{__name(this,_0x55dbd9(0xf4));}constructor(_0xc9554f,_0x3f9102){super('runner\x20\x22'+_0x3f9102+'\x22\x20does\x20not\x20support\x20run\x20kind\x20\x22'+_0xc9554f+'\x22'),this['name']='UnsupportedRunKindError';}},RunnerAdapterNotFoundError=class extends Error{static{__name(this,_0x55dbd9(0xd7));}constructor(_0x2816aa,_0x5be907){const _0x52c42e=_0x55dbd9;super('cannot\x20load\x20runner\x20adapter\x20\x22'+_0x2816aa+_0x52c42e(0xa4)+_0x5be907),this[_0x52c42e(0xe5)]=_0x52c42e(0xd7);}},RunnerNotConfiguredError=class extends Error{static{__name(this,_0x55dbd9(0x108));}constructor(_0xfee877){const _0x34abb2=_0x55dbd9;super(_0xfee877),this[_0x34abb2(0xe5)]='RunnerNotConfiguredError';}},SEGMENT_NAME_FORBIDDEN_RE=FS_UNSAFE_NAME_RE;function validateSegmentName(_0x30ae07){return validateFsSafeName(_0x30ae07,{'reservedUnderscore':!![]});}__name(validateSegmentName,_0x55dbd9(0xf2));var TERMINAL_WS_EVENT=_0x55dbd9(0x119),RUNNER_CONFIG_KEYS=new Set([_0x55dbd9(0xe6),_0x55dbd9(0xb8),_0x55dbd9(0xdd),_0x55dbd9(0xa7),'UNOTEST_DEFAULT_NAVIGATION_TIMEOUT_MS',_0x55dbd9(0xe1),'UNOTEST_LOCALE',_0x55dbd9(0x10f),_0x55dbd9(0x124),_0x55dbd9(0xa0),_0x55dbd9(0x105),_0x55dbd9(0x8f),'UNOTEST_DEBUG_PREVIEW_BYTES','UNOTEST_DEBUG_HTML_MAX_BYTES',_0x55dbd9(0xd5),_0x55dbd9(0xcb),_0x55dbd9(0xf9),_0x55dbd9(0x9f),_0x55dbd9(0x113),'FORCE_COLOR','DATABASE_URL']);function isRunnerConfigKey(_0x6204a0){const _0xc0c24c=_0x55dbd9;return RUNNER_CONFIG_KEYS[_0xc0c24c(0xd3)](_0x6204a0);}__name(isRunnerConfigKey,'isRunnerConfigKey');function categorizeVariable(_0x5a9adc){const _0x6eebe9={_0x206e1f:0x96,_0x128abd:0x10e,_0x3c70d1:0xe5},_0x51efe5=_0x55dbd9;if(_0x5a9adc[_0x51efe5(_0x6eebe9._0x206e1f)]==='secrets')return _0x51efe5(_0x6eebe9._0x128abd);return isRunnerConfigKey(_0x5a9adc[_0x51efe5(_0x6eebe9._0x3c70d1)])?_0x51efe5(0x93):'app';}__name(categorizeVariable,_0x55dbd9(0x126));function isExternalVarName(_0x1094af){const _0x4ad769=_0x55dbd9;return/^[A-Z][A-Z0-9_]*$/[_0x4ad769(0x91)](_0x1094af);}__name(isExternalVarName,_0x55dbd9(0xc3));var ENV_KEY_RE=/^[A-Za-z_][A-Za-z0-9_]*$/;function*assignmentEntries(_0x3c5279){const _0x54ebf3={_0x2b46e0:0x103,_0x2db8e9:0xca,_0x59b402:0xe4},_0x413b00=_0x55dbd9;for(const _0x55ec85 of _0x3c5279[_0x413b00(0xd6)](/\r?\n/)){const _0x23b22a=_0x55ec85[_0x413b00(0xe4)]();if(_0x23b22a===''||_0x23b22a[_0x413b00(0x90)]('#'))continue;const _0x456341=_0x23b22a[_0x413b00(_0x54ebf3._0x2b46e0)]('=');if(_0x456341<=0x0)continue;const _0x173a01=_0x23b22a[_0x413b00(_0x54ebf3._0x2db8e9)](0x0,_0x456341)['trim']();if(!ENV_KEY_RE['test'](_0x173a01))continue;yield[_0x173a01,_0x23b22a[_0x413b00(_0x54ebf3._0x2db8e9)](_0x456341+0x1)[_0x413b00(_0x54ebf3._0x59b402)]()];}}__name(assignmentEntries,_0x55dbd9(0xfb));function parseEnvContent(_0x24c862){const _0x2c4b35={_0x5a2542:0x9b,_0x16b2c8:0xca},_0x52c8f1=_0x55dbd9,_0x13586a={};for(const [_0x3303e2,_0x308fe5]of assignmentEntries(_0x24c862)){let _0x225f74=_0x308fe5;if(_0x225f74[_0x52c8f1(_0x2c4b35._0x5a2542)]>=0x2){const _0x2f907a=_0x225f74[0x0],_0x5b7a0b=_0x225f74[_0x225f74['length']-0x1];(_0x2f907a==='\x22'||_0x2f907a==='\x27')&&_0x2f907a===_0x5b7a0b&&(_0x225f74=_0x225f74[_0x52c8f1(_0x2c4b35._0x16b2c8)](0x1,-0x1));}_0x13586a[_0x3303e2]=_0x225f74;}return _0x13586a;}__name(parseEnvContent,_0x55dbd9(0x111));function serializeEnvValue(_0x3b8f3e){const _0x4d0b71={_0x371817:0x91,_0x637b23:0x100},_0x5d8247=_0x55dbd9;if(_0x3b8f3e==='')return'';if(/[\s#"'=\\]|^[`]/[_0x5d8247(_0x4d0b71._0x371817)](_0x3b8f3e)||/[\n\r]/['test'](_0x3b8f3e)){const _0x17a0ac=_0x3b8f3e[_0x5d8247(0x100)](/\\/g,'\x5c\x5c')[_0x5d8247(0x100)](/"/g,'\x5c\x22')[_0x5d8247(_0x4d0b71._0x637b23)](/\n/g,'\x5cn')[_0x5d8247(0x100)](/\r/g,'\x5cr');return'\x22'+_0x17a0ac+'\x22';}return _0x3b8f3e;}__name(serializeEnvValue,'serializeEnvValue');function envKeys(_0x5ac57c){const _0x1ac3fa={_0x98c127:0xf3},_0x2cbcbe=_0x55dbd9,_0x4a15d6=new Set();for(const [_0x594175]of assignmentEntries(_0x5ac57c))_0x4a15d6[_0x2cbcbe(_0x1ac3fa._0x98c127)](_0x594175);return _0x4a15d6;}__name(envKeys,'envKeys');function isSectionDivider(_0x30db12){const _0x23cd01={_0x430abf:0xe4},_0x6676ee=_0x55dbd9,_0x2fe0fe=_0x30db12[_0x6676ee(_0x23cd01._0x430abf)]();return _0x2fe0fe['startsWith']('#')&&/---/[_0x6676ee(0x91)](_0x2fe0fe);}__name(isSectionDivider,_0x55dbd9(0xf8));function isAssignmentLine(_0x1dd9e1){const _0xf1369e={_0x31db1a:0x90,_0xf031fd:0x91},_0x2bc3ec=_0x55dbd9,_0x3034b5=_0x1dd9e1['trim']();if(_0x3034b5===''||_0x3034b5[_0x2bc3ec(_0xf1369e._0x31db1a)]('#'))return![];const _0x4490cb=_0x3034b5[_0x2bc3ec(0x103)]('=');return _0x4490cb>0x0&&ENV_KEY_RE[_0x2bc3ec(_0xf1369e._0xf031fd)](_0x3034b5[_0x2bc3ec(0xca)](0x0,_0x4490cb)['trim']());}__name(isAssignmentLine,_0x55dbd9(0xc7));function isAssignmentOf(_0x47f13c,_0x57695f){const _0x3bb042={_0x2b58df:0x103,_0x237bb3:0xe4},_0x3e1b25=_0x55dbd9,_0x140a2c=_0x47f13c[_0x3e1b25(0xe4)]();if(_0x140a2c===''||_0x140a2c['startsWith']('#'))return![];const _0x4d219f=_0x140a2c[_0x3e1b25(_0x3bb042._0x2b58df)]('=');if(_0x4d219f<=0x0)return![];return _0x140a2c[_0x3e1b25(0xca)](0x0,_0x4d219f)[_0x3e1b25(_0x3bb042._0x237bb3)]()===_0x57695f;}__name(isAssignmentOf,'isAssignmentOf');function splitLines(_0x33b3f2){const _0x2d343d={_0x231ab7:0xd6},_0xb9be53=_0x55dbd9,_0xdcef18=_0x33b3f2['endsWith']('\x0a'),_0x50523f=_0xdcef18?_0x33b3f2['slice'](0x0,-0x1):_0x33b3f2;return{'lines':_0x50523f===''?[]:_0x50523f[_0xb9be53(_0x2d343d._0x231ab7)]('\x0a'),'trailingNewline':_0xdcef18};}__name(splitLines,_0x55dbd9(0x125));function joinLines(_0x1a752f,_0x1ed786){const _0xac8e05={_0x559c77:0xfc},_0x20cfc3=_0x55dbd9,_0x3ae247=_0x1a752f[_0x20cfc3(_0xac8e05._0x559c77)]('\x0a');return _0x1ed786||_0x3ae247===''?_0x3ae247+'\x0a':_0x3ae247;}__name(joinLines,'joinLines');function insertEnvVar(_0x664ff8,_0x38ff09,_0x379ccf,_0x4510eb){const _0x2e6247={_0x51ec9a:0x9b,_0x28a038:0xe4,_0x1037f7:0xcc,_0x382c06:0x11e},_0x4cb59d=_0x55dbd9,_0x48fb66=_0x38ff09+'='+serializeEnvValue(_0x379ccf),{lines:_0xee65f0,trailingNewline:_0x36c5bc}=splitLines(_0x664ff8);if(_0x4510eb){const _0x323e82=new RegExp('\x5cb'+_0x4510eb[_0x4cb59d(0x8e)]()+'\x5cb'),_0x21f405=_0xee65f0[_0x4cb59d(0x97)](_0x37b8a4=>isSectionDivider(_0x37b8a4)&&_0x323e82['test'](_0x37b8a4[_0x4cb59d(0x8e)]()));if(_0x21f405!==-0x1){let _0x148c22=_0xee65f0[_0x4cb59d(_0x2e6247._0x51ec9a)];for(let _0x5219ec=_0x21f405+0x1;_0x5219ec<_0xee65f0[_0x4cb59d(0x9b)];_0x5219ec++){if(isSectionDivider(_0xee65f0[_0x5219ec])){_0x148c22=_0x5219ec;break;}}let _0x1e4514=-0x1,_0x25b5ca=-0x1;for(let _0x3fba46=_0x21f405+0x1;_0x3fba46<_0x148c22;_0x3fba46++){if(_0xee65f0[_0x3fba46][_0x4cb59d(_0x2e6247._0x28a038)]()!=='')_0x25b5ca=_0x3fba46;if(isAssignmentLine(_0xee65f0[_0x3fba46]))_0x1e4514=_0x3fba46;}const _0x3a6370=_0x1e4514>=0x0?_0x1e4514:_0x25b5ca,_0x1a5dd4=_0x3a6370>=0x0?_0x3a6370+0x1:_0x21f405+0x1;return _0xee65f0[_0x4cb59d(_0x2e6247._0x1037f7)](_0x1a5dd4,0x0,_0x48fb66),joinLines(_0xee65f0,_0x36c5bc||_0xee65f0[_0x4cb59d(0x9b)]>0x0);}if(_0xee65f0[_0x4cb59d(0x9b)]>0x0)_0xee65f0['push']('');return _0xee65f0[_0x4cb59d(0x11e)]('#\x20---\x20'+_0x4510eb+_0x4cb59d(0xe0),_0x48fb66),joinLines(_0xee65f0,!![]);}return _0xee65f0[_0x4cb59d(_0x2e6247._0x382c06)](_0x48fb66),joinLines(_0xee65f0,!![]);}__name(insertEnvVar,_0x55dbd9(0xa5));function _0x1172(){const _0x360585=['igLZig5VDcbHigTUB3DUihj1BM5LCIbZzxr0Aw5NiokaLcbJAg9VC2uGB25LigzYB20GDgHLihj1BM5LCI1JB25MAwCGBgLZDc4','C2fUAxrPEMvsDw5jzfnLz21LBNq','AxnbC3nPz25Tzw50tgLUzq','vvrd','C2vJCMv0C0XHEwvYrMLSzxngB3i','C2XPy2u','vu5pvevtvf9orvrxt1jl','C3bSAwnL','Dw5VDgvZDc8Uzw52','BwfRzvj1BKLK','zgvIDwDNzxjgAwXLrM9Y','DMfSAwrHDgvdB2XSzwn0Aw9UtMfTzq','ouvnwfrsta','B2jQzwn0','AgfZ','yxbWlxnLCNzLCJPYzwfKEq','vu5pvevtvf9erujvr19lruvqx0nbteXt','C3bSAxq','uNvUBMvYqwrHChrLCK5VDezVDw5KrxjYB3i','CNvUDgLTzs5QC29U','CNvUC0rPCKzVCG','nty5mtaWme1Lt1jIzW','nZeZmtuWne9ss1ngqW','zgvMAw5LuhjVCgvYDhK','vu5pvevtvf9tte9xx01p','lNj1BNm','Dw5RBM93BI1YDw5UzxiTA2v5','ic0Tlq','vu5pvevtvf9qt1bvuf9huKfdrv9nuW','C2HHCMreAxjgB3i','BxvZDcbUB3qGyMuGzw1WDhK','DhjPBq','BMfTzq','vu5pvevtvf9cuK9xu0vs','ywjVCNrLza','CNvUswrtDgfYDgvKqxq','CNvUrgLYrM9Y','zMfPBgLUz1nPBMnL','C2HHCMreyxLZrgvZy2vUzgLUzW','C2HHCMrqyxrOrM9YuNvUswq','yxbWlxnLCNzLCJPYzxvZzwq','A2LUza','CNvU','zw52rMLSzuzVCG','mtbnzMTowei','DMfSAwrHDgvtzwDTzw50tMfTzq','ywrK','vw5ZDxbWB3j0zwrsDw5lAw5KrxjYB3i','zhvYyxrPB25nCW','qxbW','x2HLBhbLCNm','Axntzwn0Aw9UrgL2AwrLCG','vu5pvevtvf9dt05tt0Xf','C3rKB3v0lMXVzW','yxnZAwDUBwvUDevUDhjPzxm','AM9PBG','yMXVyIbOyxnOig11C3qGyMuGBg93zxjJyxnLigHLEcWGz290oIa','ztjL','Dg9tDhjPBMC','CMvWBgfJzq','Dw5VDgvZDc8UC2vJCMv0CW','ChjVAMvJDfj1BNnsB290','Aw5KzxHpzG','zMfPBgvK','vu5pvevtvf9erujvr19esvi','DMfSAwrHDgvgC1nHzMvoyw1L','zw52q29UDgvUDa','uNvUBMvYtM90q29UzMLNDxjLzevYCM9Y','uNvUBMvY','C2HHCMrqyxrOrM9YvgLTzxn0yw1W','sw52ywXPzejSB2jiyxnOrxjYB3i','vw5WBgfJzwfIBgvsDw5jzevYCM9Y','CgfYC2u','C2vJCMv0','vu5pvevtvf9usu1fwK9orq','z2v0vvrdrgf0zq','CgfYC2vfBNzdB250zw50','yMXVyNnsB290rM9Y','tK9Fq09mt1i','lMPZB25S','z2v0vvrdtw9UDgG','C2vJCMv0C0zPBgvgB3i','x2rHEs5QC29UBa','C3rHDhvZ','DgvYBwLUywW','CMvJzw50','igLZigfSC28GC2v0igLUihLVDxiGC2HLBgWGzw52AxjVBM1LBNqG4OcuigL0ihDPBgWGA2vLCcbYzxnVBhzPBMCGzNjVBsb0AgvYzsaODgHLigvUDMLYB25Tzw50ihDPBNmGB3zLCIb0AguGzMLSzsKU','CgfKu3rHCNq','CgLJA2vYlxnUyxbZAg90lNr4Da','ChvZAa','C2vJCMv0CW','Aw5JBhvKzxm','CgfYC2vbChbtzxj2zxjfDMvUDa','zw52','zgvIDwDeAxjgB3i','vu5pvevtvf9mt0DFtevwruW','C3bSAxrmAw5LCW','y2f0zwDVCML6zvzHCMLHyMXL','zMXHz3m','CMvXDwLYzvj1BKrPCKzVCG','yMXVyLjLBfnLz21LBNrZrM9Y','CMvTB3zLrw52vMfY','CMvNzxG','Dg9mB3DLCKnHC2u','vu5pvevtvf9erujvr19nqvHFqLLurvm','C3rHCNrZv2L0Aa','DgvZDa','AxnszwDLEeXPDgvYywW','CNvUBMvY','BxvZDcbIzsbHihn0CMLUzW','C3rYAw5N','C291CMnL','zMLUzeLUzgv4','C2nLBMfYAw9szwzgCM9TrMLSzu5HBwu','igLZigfSC28GC2v0igLUihvUB3rLC3qVlMvUDIdIGjqGDgHLihnLy3jLDcb2ywX1zsbUB3CGC2HHzg93CYbPDc4','AgvHCNrIzwf0','BgvUz3rO','mZuYnZi0zM5jBu5q','C3rLChmUANnVBMW','zM9SzfnJzw5HCMLVuNvU','vu5pvevtvf9dqunirv9esvi','vu5pvevtvf9erujvrW','zMXVB3i','C291CMnLCY5QC29U','BwfUAwzLC3qUANnVBG','iI4G','Aw5Zzxj0rw52vMfY','y29TBwfUzhmUANnVBMW','vu5pvevtvf9eruzbvuXux1rjtuvpvvrFtvm','zw5KC1DPDgG','Dw5VDgvZDa','y3j5ChrV','mJKXotC3nJriC3rJAwC','Bgf5zxjZrM9Y','ChjVAMvJDfj1BKrPCKzVCG','ywn0AxzLrw52tMfTzq','igLZigfSC28GC2v0igLUihvUB3rLC3qVlNnLy3jLDhmG4OcuihrOzsbZzwnYzxqGDMfSDwuGC2HHzg93CYb0AgLZig9Uzs4','C2vJCMv0C0nVBNrLBNq','zgvSzxrLu2HHzg93v2fYBMLUzW','C3rHCNrLzef0','mJe5otC5owvUtMXNCq','DgvZDerPCKzVCG','lMrLyNvN','BM93','x3nJzw5HCMLVCW','vu5pvevtvf9iruferuq','x2jSB2jZ','ndK0nJuYnwvcCxDVqG','Aw52ywXPzc1Uyw1L','mZi1nZG0CfLLsKHc','yMXVyLbHDgHgB3i','lY5Kzwj1z2DLCG','AxnuzxjTAw5HBfj1BNrPBwvtDgf0zq','lMPZB24','m25Nquf3AG','zhvWBgLJyxrL','AxnfEhrLCM5HBfzHCK5HBwu','lNzPzxDLCI5SB2nR'];_0x1172=function(){return _0x360585;};return _0x1172();}function removeEnvVar(_0x29f495,_0xecaf29){const _0x5456ec={_0x464160:0x9b},_0x1d3f66=_0x55dbd9,{lines:_0x5c8964,trailingNewline:_0x13e124}=splitLines(_0x29f495),_0x593102=_0x5c8964['filter'](_0x374952=>!isAssignmentOf(_0x374952,_0xecaf29)),_0x1432aa=_0x593102[_0x1d3f66(_0x5456ec._0x464160)]!==_0x5c8964[_0x1d3f66(0x9b)];return{'content':joinLines(_0x593102,_0x13e124),'removed':_0x1432aa};}__name(removeEnvVar,_0x55dbd9(0x8c));var SECTION_BY_KIND={'app':_0x55dbd9(0xf6),'runner':_0x55dbd9(0x109),'secret':void 0x0};function planAddVariable(_0x43a723){const _0x3cf3be={_0x1dc411:0xdf,_0xd42df2:0xc5,_0x44e7c4:0xbb,_0x3d6854:0xd3,_0x298587:0x10e,_0x3ed972:0x11f,_0x5484f2:0x122,_0x5460c1:0xcd},_0x37af5f=_0x55dbd9,{name:_0x243182,kind:_0x564006}=_0x43a723;if(_0x564006==='runner'){if(!isRunnerConfigKey(_0x243182))return{'ok':![],'code':_0x37af5f(_0x3cf3be._0x1dc411),'message':_0x243182+_0x37af5f(_0x3cf3be._0xd42df2)};}else{if(!isExternalVarName(_0x243182))return{'ok':![],'code':_0x37af5f(_0x3cf3be._0x44e7c4),'message':_0x243182+'\x20must\x20be\x20UPPER_SNAKE\x20(e.g.\x20APP_BASE_URL)\x20so\x20a\x20scenario\x20can\x20reference\x20it\x20by\x20name.'};}const _0x31b839=envKeys(_0x43a723[_0x37af5f(0x107)])[_0x37af5f(_0x3cf3be._0x3d6854)](_0x243182),_0x1ecdee=envKeys(_0x43a723[_0x37af5f(0xb0)])['has'](_0x243182),_0x2e6f34=_0x564006===_0x37af5f(_0x3cf3be._0x298587)?_0x37af5f(_0x3cf3be._0x3ed972):_0x37af5f(_0x3cf3be._0x5484f2),_0x2b299b=_0x2e6f34===_0x37af5f(0x11f)?_0x1ecdee:_0x31b839,_0x13e9be=_0x2e6f34===_0x37af5f(0x11f)?'unotest/.secrets':_0x37af5f(_0x3cf3be._0x5460c1);if(_0x2b299b)return{'ok':![],'code':_0x37af5f(0xc2),'message':_0x243182+'\x20already\x20exists\x20in\x20'+_0x13e9be+'\x20—\x20pick\x20a\x20different\x20name\x20or\x20edit\x20the\x20existing\x20value.'};const _0x3e2286=[];return _0x564006===_0x37af5f(_0x3cf3be._0x298587)&&_0x31b839&&_0x3e2286['push'](_0x243182+_0x37af5f(0x99)),_0x564006!==_0x37af5f(0x10e)&&_0x1ecdee&&_0x3e2286[_0x37af5f(0x11e)](_0x243182+_0x37af5f(0xaf)),{'ok':!![],'target':_0x2e6f34,'sectionLabel':SECTION_BY_KIND[_0x564006],'warnings':_0x3e2286};}__name(planAddVariable,'planAddVariable');function deleteShadowWarning(_0x284a42,_0x10e8dd,_0x1b7c40){const _0x15ce3e=_0x55dbd9;if(_0x1b7c40!==void 0x0&&_0x1b7c40!==_0x10e8dd)return[_0x284a42+_0x15ce3e(0x11b)];return[];}__name(deleteShadowWarning,_0x55dbd9(0xb1));var TERMINAL_RUNTIME_STATES=['completed',_0x55dbd9(0x104),_0x55dbd9(0xe7)];function isTerminalRuntimeState(_0x290602){const _0x311ad8=_0x55dbd9;return TERMINAL_RUNTIME_STATES[_0x311ad8(0x120)](_0x290602);}__name(isTerminalRuntimeState,_0x55dbd9(0xbf));export{BLOBS_DIR,COLLECTIONS_SUBDIR,COLLECTION_NAME_FORBIDDEN_RE,COMMANDS_FILE,DAY_INDEX_FILE,E2E_SUBDIR,ENV_FILE,HEARTBEAT_FILE,HELPERS_SUBDIR,InvalidBlobHashError,LOCK_FILE,LOG_FILE,PICKER_SNAPSHOT_FILE,RUNNER_CONFIG_KEYS,RUNS_SUBDIR,RUNTIME_FILE,RUN_INDEX_SCHEMA_VERSION,RUN_MANIFEST_FILE,RUN_SOURCES_FILE,RunnerAdapterNotFoundError,RunnerNotConfiguredError,SCENARIOS_INDEX_DIR,SCENARIOS_LATEST_FILE,SCENARIO_RECENT_WINDOW,SECRETS_FILE,SEGMENT_NAME_FORBIDDEN_RE,SNAPSHOTS_SUBDIR,STDERR_FILE,STDOUT_FILE,STEPS_FILE,TERMINAL_RUNTIME_STATES,TERMINAL_WS_EVENT,UNOTEST_DIR,UnplaceableRunIdError,UnsupportedRunKindError,activeEnvName,blobPathFor,blobRelPathFor,blobRelSegmentsFor,blobsRootFor,categorizeVariable,debugDirFor,debuggerFileFor,deleteShadowWarning,envFileFor,envKeys,envLayerFilesFor,foldScenarioRun,insertEnvVar,isExternalVarName,isFailingStatus,isRegexLiteral,isRunnerConfigKey,isTerminalRuntimeState,makeRunId,parseAppServerEvent,parseEnvContent,planAddVariable,projectRunDirFor,projectRunsRoot,regexLiteral,removeEnvVar,requireRunDirFor,runDirFor,runIdStartedAt,runsDirFor,sanitizeRunIdSegment,scenarioIndexFileName,scenarioRefFromFileName,secretsFileFor,secretsLayerFilesFor,serializeEnvValue,shardDaysDescending,shardDirFor,shardPathForRunId,shardPathForTimestamp,testDirFor,validateCollectionName,validateSegmentName};
1
+ const _0x16fbf0=_0xaab4;(function(_0x27b502,_0x1ea4b2){const _0x66f883={_0x42b591:0x177,_0x4d3a5f:0x1a2,_0x580b08:0x132},_0x4f4757=_0xaab4,_0x4e433c=_0x27b502();while(!![]){try{const _0x42992d=-parseInt(_0x4f4757(0x146))/0x1+-parseInt(_0x4f4757(0x16c))/0x2*(parseInt(_0x4f4757(0x12f))/0x3)+parseInt(_0x4f4757(0x138))/0x4+-parseInt(_0x4f4757(0x15f))/0x5+parseInt(_0x4f4757(_0x66f883._0x42b591))/0x6+-parseInt(_0x4f4757(_0x66f883._0x4d3a5f))/0x7+parseInt(_0x4f4757(_0x66f883._0x580b08))/0x8;if(_0x42992d===_0x1ea4b2)break;else _0x4e433c['push'](_0x4e433c['shift']());}catch(_0x24ba0b){_0x4e433c['push'](_0x4e433c['shift']());}}}(_0x4609,0x1a784));var __defProp=Object[_0x16fbf0(0x171)],__name=(_0x47ca56,_0x39ffbb)=>__defProp(_0x47ca56,_0x16fbf0(0x114),{'value':_0x39ffbb,'configurable':!![]});function _0x4609(){const _0x1020f8=['tK9Fq09mt1i','BgvUz3rO','BxvZDcbUB3qGy29UDgfPBIbCic8GoIaQid8GiIa8id4GFcbVCIbJB250CM9SignOyxjHy3rLCNm','Bgf5zxjZrM9Y','zMXHz3m','yMXVyLjLBfnLz21LBNrZrM9Y','zMXHDe1HCa','zxHWzwn0lwzHAwW','vu5pvevtvf9mt0DFtevwruW','uNvUBMvYtM90q29UzMLNDxjLzevYCM9Y','Dw5VDgvZDc8UC2vJCMv0CW','C2XPy2u','DgvYBwLUywW','C3rKzxjYlMXVzW','C3rLChmUANnVBMW','iI4G','CNvUC0rPCKzVCG','yMXVyIbOyxnOig11C3qGyMuGBg93zxjJyxnLigHLEcWGz290oIa','zw52q29UDgvUDa','CMvNzxG','yxbWlxnLCNzLCJPLCNjVCG','igLZigfSC28GC2v0igLUihLVDxiGC2HLBgWGzw52AxjVBM1LBNqG4OcuigL0ihDPBgWGA2vLCcbYzxnVBhzPBMCGzNjVBsb0AgvYzsaODgHLigvUDMLYB25Tzw50ihDPBNmGB3zLCIb0AguGzMLSzsKU','C3rHDhvZ','BMfTzq','vu5pvevtvf9usu1fwK9orq','vu5pvevtvf9eruzbvuXux05bvKLhqvrjt05FveLnru9vvf9nuW','C2fUAxrPEMvsDw5jzfnLz21LBNq','y3j5ChrV','vu5pvevtvf9cuK9xu0vs','AxnbBM5VDgf0Aw9UtgLUzq','vw5ZDxbWB3j0zwrsDw5lAw5KrxjYB3i','CgfYC2vbChbtzxj2zxjfDMvUDa','Dw5VDgvZDa','lMPZB25S','BxvZDcbUB3qGyMuGzw1WDhK','zMfPBfn0CMvHAW','zMfPBgvK','C3bSAxrmAw5LCW','vu5pvevtvf9mt0nbteu','C3bSAxq','lMrLyNvN','zw52tMfTzxngCM9TrgLYtgLZDgLUzW','Aw5Zzxj0rw52vMfY','uNvUBMvYqwrHChrLCK5VDezVDw5KrxjYB3i','z2v0vvrdrgf0zq','ChjVAMvJDfj1BKrPCKzVCG','CNvUDgLTzs5QC29U','BxvZDcbUB3qGC3rHCNqGD2L0AcaNlIC','C2vYAwfSAxPLrw52vMfSDwu','y29TBwfUzhmUANnVBMW','m0XXtxf5DG','igLZigfSC28GC2v0igLUihvUB3rLC3qVlMvUDIdIGjqGDgHLihnLy3jLDcb2ywX1zsbUB3CGC2HHzg93CYbPDc4','AxngywLSAw5Nu3rHDhvZ','ndu3odG4mgj3rM5xua','igLZigfSC28GC2v0igLUihvUB3rLC3qVlNnLy3jLDhmG4OcuihrOzsbZzwnYzxqGDMfSDwuGC2HHzg93CYb0AgLZig9Uzs4','Dw5VDgvZDc8Uzw52','yxnZAwDUBwvUDevUDhjPzxm','igLZig5VDcbHigTUB3DUihj1BM5LCIbZzxr0Aw5NiokaLcbJAg9VC2uGB25LigzYB20GDgHLihj1BM5LCI1JB25MAwCGBgLZDc4','CgLJA2vYlxnUyxbZAg90lNr4Da','ndeZmdy0t2PKEvnZ','vu5pvevtvf9dt05tt0Xf','CMvXDwLYzvj1BKrPCKzVCG','AgfZ','C2vJCMv0','Aw52ywXPzc1Uyw1L','AxnbC3nPz25Tzw50tgLUzq','C3rYAw5N','CgfYC2vfBNzdB250zw50','DgvZDa','AM9PBKXPBMvZ','C2vJCMv0CW','DhjPBq','C3rHCNrZv2L0Aa','mJaYodyXuK1JtwPY','vu5pvevtvf9erujvr19quKvwsuvxx0jzvevt','x2nVBgXLy3rPB25Z','CNvUBMvYici','uNvUBMvY','ChvZAa','lNnLy3jLDhm','C3rKB3v0lMXVzW','vvrd','CgXHBKfKzfzHCMLHyMXL','C2HHCMreAxjgB3i','Dw5RBM93BI1YDw5UzxiTA2v5','sw52ywXPzejSB2jiyxnOrxjYB3i','AxnbC3nPz25Tzw50t2y','C2vJCMv0C0XHEwvYrMLSzxngB3i','AM9PBG','ic0Tlq','y2f0zwDVCML6zvzHCMLHyMXL','C291CMnL','z2v0uMfUzg9TvMfSDwvZ','yMXVyLjLBfbHDgHgB3i','CMvZzxj2zwrvBMrLCNnJB3jL','AgvHCNrIzwf0','zw52s2v5CW','B2jQzwn0','odq5nZu1r0nLvLzr','C2fTCgXL','lNzPzxDLCI5SB2nR','rK9sq0vFq09mt1i','BM93','BxvZDcbIzsbHihn0CMLUzW','zMLUzeLUzgv4','zgvSzxrLu2HHzg93v2fYBMLUzW','vu5pvevtvf9dqunirv9esvi','zw5KC1DPDgG','CMvNzxHmAxrLCMfS','vu5pvevtvf9erujvr19lruvqx0nbteXt','AxnsDw5ZrgLYtMfTzq','mZGXnJjrwg1Xsva','C2nLBMfYAw9szwzgCM9TrMLSzu5HBwu','lMPZB24','CgfKu3rHCNq','ywn0AxzLrw52tMfTzq','zgvMAw5LuhjVCgvYDhK','x2jSB2jZ','DMfSAwrHDgvtzwDTzw50tMfTzq','vu5pvevtvf9orvrxt1jl','y29TCgXLDgvK','CNvUswq','mtu1mdqWCxjhuKzk','CgfYC2u','CMvTB3zLrw52vMfY','Aw5JBhvKzxm','zMXVB3i','BwfUAwzLC3qUANnVBG','vu5pvevtvf9qt1bvuf9huKfdrv9nuW','zw52','vw5WBgfJzwfIBgvsDw5jzevYCM9Y','iYaTls0G','CgfYC2vty2vUyxjPB0fUBM90yxrPB25Z','lNnUyxbZAg90CW','C2HHCMreyxLZrgvZy2vUzgLUzW','CNvUswrtDgfYDgvKqxq','CNvUBMvY','BwfRzvj1BKLK','C3bSAwnL','yxbW','C2HHCMrqyxrOrM9YvgLTzxn0yw1W','zhvYyxrPB25nCW','C291CMnLCY5QC29U','vu5pvevtvf9erujvr19esvi','C2HHCMrqyxrOrM9YuNvUswq','CMvWBgfJzq','refuqujbu0vFvvjm','qxbW','DMfSAwrHDgvdB2XSzwn0Aw9UtMfTzq','AxnfEhrLCM5HBfzHCK5HBwu','z2v0vvrdrNvSBfLLyxi','C29YDa','yMXVyLbHDgHgB3i','Aw50zxjYDxb0zwq','vu5pvevtvf9eruzbvuXux1rjtuvpvvrFtvm','yMXVyNnsB290rM9Y','lY5Kzwj1z2DLCG','iokaLcbWAwnRigeGzgLMzMvYzw50ig5HBwuGB3iGzwrPDcb0AguGzxHPC3rPBMCGDMfSDwuU','zw52tgf5zxjgAwXLC0zVCG','vu5pvevtvf9ftLy','A2LUza','BxvZDcbUB3qGC3rHCNqGD2L0AcaNxYCGkhjLC2vYDMvKkq','iIbKB2vZig5VDcbZDxbWB3j0ihj1BIbRAw5Kici','Dg9mB3DLCKnHC2u','lNj1BNm','mtqWoda3mxzfChLHyG','ywrK','Aw5KzxHpzG','yxbWlxnLCNzLCJPYzxvZzwq','vu5pvevtvf9tte9xx01p','DgvTCgXHDgu','C3rHCNrLzef0','zw52rMLSzuzVCG','AxnuzxjTAw5HBfj1BNrPBwvtDgf0zq'];_0x4609=function(){return _0x1020f8;};return _0x4609();}function parseAppServerEvent(_0x458d26){const _0x7b784e={_0x482484:0x145,_0x532e99:0x178,_0x2c3955:0x19d},_0x4e9c97=_0x16fbf0,_0x17bb3e=_0x458d26[_0x4e9c97(0x144)]();if(!_0x17bb3e[_0x4e9c97(_0x7b784e._0x482484)]('{'))return null;try{const _0x344bf7=JSON[_0x4e9c97(_0x7b784e._0x532e99)](_0x17bb3e);if(_0x344bf7['kind']==='app-server:ready'||_0x344bf7[_0x4e9c97(0x19d)]===_0x4e9c97(0x1a5)||_0x344bf7[_0x4e9c97(_0x7b784e._0x2c3955)]===_0x4e9c97(0x111))return _0x344bf7;return null;}catch{return null;}}__name(parseAppServerEvent,_0x16fbf0(0x11c));var UNOTEST_DIR=_0x16fbf0(0x11d),E2E_SUBDIR='e2e',HELPERS_SUBDIR='_helpers',COLLECTIONS_SUBDIR=_0x16fbf0(0x148),RUNS_SUBDIR=_0x16fbf0(0x1a1),SNAPSHOTS_SUBDIR=_0x16fbf0(0x182);function testDirFor(_0x151f2b){return''+E2E_SUBDIR+_0x151f2b;}__name(testDirFor,'testDirFor');function _0xaab4(_0x1fc96a,_0x167754){_0x1fc96a=_0x1fc96a-0x107;const _0x4609f6=_0x4609();let _0xaab483=_0x4609f6[_0x1fc96a];if(_0xaab4['jKztFt']===undefined){var _0x5e8398=function(_0x3e7ad){const _0x37d681='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x47ca56='',_0x39ffbb='';for(let _0x458d26=0x0,_0x17bb3e,_0x344bf7,_0x151f2b=0x0;_0x344bf7=_0x3e7ad['charAt'](_0x151f2b++);~_0x344bf7&&(_0x17bb3e=_0x458d26%0x4?_0x17bb3e*0x40+_0x344bf7:_0x344bf7,_0x458d26++%0x4)?_0x47ca56+=String['fromCharCode'](0xff&_0x17bb3e>>(-0x2*_0x458d26&0x6)):0x0){_0x344bf7=_0x37d681['indexOf'](_0x344bf7);}for(let _0x2314fe=0x0,_0x36180c=_0x47ca56['length'];_0x2314fe<_0x36180c;_0x2314fe++){_0x39ffbb+='%'+('00'+_0x47ca56['charCodeAt'](_0x2314fe)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x39ffbb);};_0xaab4['zxSzMx']=_0x5e8398,_0xaab4['EmkOhr']={},_0xaab4['jKztFt']=!![];}const _0xe991c7=_0x4609f6[0x0],_0x3661e4=_0x1fc96a+_0xe991c7,_0x4db459=_0xaab4['EmkOhr'][_0x3661e4];return!_0x4db459?(_0xaab483=_0xaab4['zxSzMx'](_0xaab483),_0xaab4['EmkOhr'][_0x3661e4]=_0xaab483):_0xaab483=_0x4db459,_0xaab483;}function runsDirFor(_0x2314fe,_0x36180c){return''+RUNS_SUBDIR+_0x2314fe+(_0x36180c?'.'+_0x36180c:'');}__name(runsDirFor,_0x16fbf0(0x10d));function isRunsDirName(_0x19dd49){const _0xb789e1={_0x420afe:0x145},_0x30bfbe=_0x16fbf0;return _0x19dd49===RUNS_SUBDIR||_0x19dd49[_0x30bfbe(_0xb789e1._0x420afe)](RUNS_SUBDIR+'-')||_0x19dd49[_0x30bfbe(_0xb789e1._0x420afe)](RUNS_SUBDIR+'.');}__name(isRunsDirName,_0x16fbf0(0x16b));function debugDirFor(_0x1cf491){const _0x1a6308={_0x307a89:0x125},_0x1eea9d=_0x16fbf0;return _0x1eea9d(_0x1a6308._0x307a89)+_0x1cf491;}__name(debugDirFor,'debugDirFor');function debuggerFileFor(_0x11461a){const _0x4af555={_0x21e37d:0x16e},_0x4ddd08=_0x16fbf0;return UNOTEST_DIR+_0x4ddd08(0x199)+_0x11461a+_0x4ddd08(_0x4af555._0x21e37d);}__name(debuggerFileFor,'debuggerFileFor');var LOCK_FILE=_0x16fbf0(0x161),LOG_FILE='.viewer.log',STEPS_FILE=_0x16fbf0(0x10b),HEARTBEAT_FILE=_0x16fbf0(0x15c),DAY_INDEX_FILE='_day.jsonl',SCENARIOS_INDEX_DIR='_scenarios',SCENARIOS_LATEST_FILE='_latest.json',STDOUT_FILE=_0x16fbf0(0x14d),STDERR_FILE=_0x16fbf0(0x10a),COMMANDS_FILE=_0x16fbf0(0x12e),RUNTIME_FILE=_0x16fbf0(0x12b),PICKER_SNAPSHOT_FILE=_0x16fbf0(0x137),ENV_FILE='unotest/.env',SECRETS_FILE=_0x16fbf0(0x107);function envFileFor(_0x1ea002,_0x4dc23e){return''+ENV_FILE+_0x1ea002+(_0x4dc23e?'.'+_0x4dc23e:'');}__name(envFileFor,_0x16fbf0(0x1a9));function secretsFileFor(_0x1e9dbe,_0x45a318){return''+SECRETS_FILE+_0x1e9dbe+(_0x45a318?'.'+_0x45a318:'');}__name(secretsFileFor,'secretsFileFor');function envLayerFilesFor(_0x49997c,_0x48149a){return layersFor(ENV_FILE,_0x49997c,_0x48149a);}__name(envLayerFilesFor,_0x16fbf0(0x19b));function secretsLayerFilesFor(_0x2a5edb,_0x1672e1){return layersFor(SECRETS_FILE,_0x2a5edb,_0x1672e1);}__name(secretsLayerFilesFor,_0x16fbf0(0x154));function layersFor(_0x3a7901,_0x451704,_0x487233){const _0x6278ac=_0x16fbf0,_0x29309f=[_0x3a7901];if(_0x451704)_0x29309f['push'](''+_0x3a7901+_0x451704);if(_0x487233){_0x29309f['push'](_0x3a7901+'.'+_0x487233);if(_0x451704)_0x29309f[_0x6278ac(0x14b)](''+_0x3a7901+_0x451704+'.'+_0x487233);}return _0x29309f;}__name(layersFor,_0x16fbf0(0x1ae));function activeEnvName(_0x3c11dc){const _0x1be3c0=_0x16fbf0,_0x2f8c78=_0x3c11dc[_0x1be3c0(0x19c)]?.['trim']();return _0x2f8c78?_0x2f8c78:void 0x0;}__name(activeEnvName,_0x16fbf0(0x170));var RESERVED_ENV_NAMES=new Set(['example',_0x16fbf0(0x160),_0x16fbf0(0x1a7)]);function envNamesFromDirListing(_0x2891ea,_0x3c7b60){const _0x422c36={_0x3abf9b:0x1b1,_0x337423:0x13b,_0x139cc3:0x1a3},_0x47a170=_0x16fbf0,_0x2f10e7=['.env',_0x47a170(0x14c)][_0x47a170(_0x422c36._0x3abf9b)](_0x4a5d85=>_0x3c7b60?[_0x4a5d85,''+_0x4a5d85+_0x3c7b60]:[_0x4a5d85]),_0x1ce989=new Set();for(const _0x1d7340 of _0x2891ea){for(const _0x2fbc0b of _0x2f10e7){const _0x394768=_0x2fbc0b+'.';if(!_0x1d7340['startsWith'](_0x394768))continue;const _0x39e344=_0x1d7340['slice'](_0x394768[_0x47a170(0x1ac)]);if(!_0x39e344||_0x39e344['includes']('/'))continue;if(RESERVED_ENV_NAMES[_0x47a170(_0x422c36._0x337423)](_0x39e344))continue;_0x1ce989[_0x47a170(_0x422c36._0x139cc3)](_0x39e344);}}return[..._0x1ce989][_0x47a170(0x194)]();}__name(envNamesFromDirListing,_0x16fbf0(0x126));function isRegexLiteral(_0x258207){const _0x17c0b0={_0x517fff:0x15e,_0x1948e6:0x13f,_0x5dc748:0x1af,_0x2394ea:0x13f},_0x17d8d9=_0x16fbf0;return typeof _0x258207===_0x17d8d9(_0x17c0b0._0x517fff)&&_0x258207!==null&&_0x258207[_0x17d8d9(0x19d)]==='regex'&&typeof _0x258207['source']===_0x17d8d9(_0x17c0b0._0x1948e6)&&typeof _0x258207[_0x17d8d9(_0x17c0b0._0x5dc748)]===_0x17d8d9(_0x17c0b0._0x2394ea);}__name(isRegexLiteral,'isRegexLiteral');function regexLiteral(_0x771f2e,_0x2d0580=''){const _0x1aff1d=_0x16fbf0;return{'kind':_0x1aff1d(0x110),'source':_0x771f2e,'flags':_0x2d0580};}__name(regexLiteral,_0x16fbf0(0x169));var RAND_BYTES=0x6;function makeRunId(_0x5996eb){const _0x30d641={_0x16789e:0x118},_0x57e22c=_0x16fbf0,_0x324a7b=sanitizeRunIdSegment(_0x5996eb),_0x1d017b=Date[_0x57e22c(0x163)]()['toString'](0x24),_0x17977c=new Uint8Array(RAND_BYTES);globalThis[_0x57e22c(_0x30d641._0x16789e)][_0x57e22c(0x159)](_0x17977c);let _0x3f1da8='';for(let _0x37f3ca=0x0;_0x37f3ca<_0x17977c[_0x57e22c(0x1ac)];_0x37f3ca++){_0x3f1da8+=_0x17977c[_0x37f3ca]['toString'](0x10)[_0x57e22c(0x16f)](0x2,'0');}return _0x324a7b+'-'+_0x1d017b+'-'+_0x3f1da8;}__name(makeRunId,_0x16fbf0(0x186));function sanitizeRunIdSegment(_0x3d37ae){const _0x4b915b=_0x16fbf0,_0x573828=_0x3d37ae[_0x4b915b(0x18e)](/[^a-zA-Z0-9_-]+/g,'-')[_0x4b915b(0x18e)](/-+/g,'-')['replace'](/^-|-$/g,'');return _0x573828[_0x4b915b(0x1ac)]>0x0?_0x573828:'run';}__name(sanitizeRunIdSegment,_0x16fbf0(0x117));var RANDOM_SUFFIX_RE=/^[0-9a-f]{6,}$/,MIN_PLAUSIBLE_MS=Date['UTC'](0x7e4,0x0,0x1),MAX_PLAUSIBLE_MS=Date[_0x16fbf0(0x14e)](0x834,0x0,0x1);function runIdStartedAt(_0x31d7df){const _0x1cf5bd={_0x5487ba:0x124,_0x112f4e:0x1ac,_0x12ac44:0x141},_0x209541=_0x16fbf0,_0x3c5777=_0x31d7df[_0x209541(_0x1cf5bd._0x5487ba)]('-');if(_0x3c5777[_0x209541(_0x1cf5bd._0x112f4e)]<0x3)return null;const _0x245808=_0x3c5777[_0x3c5777[_0x209541(_0x1cf5bd._0x112f4e)]-0x1];if(!RANDOM_SUFFIX_RE[_0x209541(_0x1cf5bd._0x12ac44)](_0x245808))return null;const _0x3a07bf=_0x3c5777[_0x3c5777['length']-0x2];if(!/^[0-9a-z]+$/['test'](_0x3a07bf))return null;const _0x1d3570=parseInt(_0x3a07bf,0x24);if(!Number['isFinite'](_0x1d3570))return null;if(_0x1d3570<MIN_PLAUSIBLE_MS||_0x1d3570>=MAX_PLAUSIBLE_MS)return null;return _0x1d3570;}__name(runIdStartedAt,_0x16fbf0(0x184));function shardPathForTimestamp(_0x180332){const _0x2a2cfa={_0x13d8e6:0x193,_0x190a37:0x129},_0x1b3400=_0x16fbf0,_0x53b001=new Date(_0x180332),_0x2515e8=String(_0x53b001[_0x1b3400(_0x2a2cfa._0x13d8e6)]())[_0x1b3400(0x16f)](0x4,'0'),_0x376e32=String(_0x53b001['getUTCMonth']()+0x1)['padStart'](0x2,'0'),_0x57eb3d=String(_0x53b001[_0x1b3400(_0x2a2cfa._0x190a37)]())[_0x1b3400(0x16f)](0x2,'0');return _0x2515e8+'/'+_0x376e32+'/'+_0x57eb3d;}__name(shardPathForTimestamp,_0x16fbf0(0x189));function shardPathForRunId(_0xcca627){const _0x8c3265=runIdStartedAt(_0xcca627);return _0x8c3265===null?null:shardPathForTimestamp(_0x8c3265);}__name(shardPathForRunId,_0x16fbf0(0x18d));function runDirFor(_0x2eb209,_0x313d93){const _0x1a8f0e=shardPathForRunId(_0x313d93);return _0x1a8f0e===null?null:_0x2eb209+'/'+_0x1a8f0e+'/'+_0x313d93;}__name(runDirFor,'runDirFor');var UnplaceableRunIdError=class extends Error{static{__name(this,_0x16fbf0(0x17f));}constructor(_0x262764){const _0x4d86c0={_0x1de25b:0x114,_0x2faf7a:0x17f},_0x31d094=_0x16fbf0;super('runId\x20carries\x20no\x20timestamp,\x20cannot\x20place\x20it\x20in\x20a\x20shard:\x20'+_0x262764),this[_0x31d094(_0x4d86c0._0x1de25b)]=_0x31d094(_0x4d86c0._0x2faf7a);}};function requireRunDirFor(_0x1029d7,_0x4554b5){const _0x1fecaa=runDirFor(_0x1029d7,_0x4554b5);if(_0x1fecaa===null)throw new UnplaceableRunIdError(_0x4554b5);return _0x1fecaa;}__name(requireRunDirFor,_0x16fbf0(0x13a));function projectRunsRoot(_0x4c56b2='',_0x1e706e){return UNOTEST_DIR+'/'+runsDirFor(_0x4c56b2,_0x1e706e);}__name(projectRunsRoot,'projectRunsRoot');function projectRunDirFor(_0x49816c,_0x424fb8='',_0x40fc84){return requireRunDirFor(projectRunsRoot(_0x424fb8,_0x40fc84),_0x49816c);}__name(projectRunDirFor,_0x16fbf0(0x12a));function shardDirFor(_0x2cd947,_0x1a867d){return _0x2cd947+'/'+shardPathForTimestamp(_0x1a867d);}__name(shardDirFor,_0x16fbf0(0x150));function*shardDaysDescending(_0x17e838,_0x32819f,_0x566543){const _0x8a1d21={_0x2d78c2:0x17b},_0x4fc611=_0x16fbf0,_0x566989=0x5265c00;let _0x302123=Math[_0x4fc611(_0x8a1d21._0x2d78c2)](_0x32819f/_0x566989)*_0x566989;for(let _0x4e1116=0x0;_0x4e1116<_0x566543;_0x4e1116++){yield shardDirFor(_0x17e838,_0x302123),_0x302123-=_0x566989;}}__name(shardDaysDescending,_0x16fbf0(0x183));var RUN_INDEX_SCHEMA_VERSION=0x2,SCENARIO_RECENT_WINDOW=0xc;function isFailingStatus(_0x24d8dd){const _0x3754c1={_0x2a1815:0x196},_0x15c900=_0x16fbf0;return _0x24d8dd===_0x15c900(0x121)||_0x24d8dd===_0x15c900(_0x3754c1._0x2a1815);}__name(isFailingStatus,_0x16fbf0(0x131));function foldScenarioRun(_0x76eb89,_0x2b928c){const _0x3cd450={_0x719c9d:0x113,_0x3cae7e:0x120},_0x3961eb=_0x16fbf0,_0xb6f9a6={'lastRunId':_0x2b928c[_0x3961eb(0x176)],'lastStatus':_0x2b928c[_0x3961eb(_0x3cd450._0x719c9d)],'lastAt':_0x2b928c[_0x3961eb(0x1a8)],'lastDurationMs':_0x2b928c[_0x3961eb(0x18a)],'recent':[..._0x76eb89?.['recent']??[],_0x2b928c[_0x3961eb(0x113)]]['slice'](-SCENARIO_RECENT_WINDOW)};if(!isFailingStatus(_0x2b928c[_0x3961eb(0x113)]))return{..._0xb6f9a6,'failStreak':0x0,'failingSince':null};const _0x325f3e=(_0x76eb89?.[_0x3961eb(_0x3cd450._0x3cae7e)]??0x0)+0x1;return{..._0xb6f9a6,'failStreak':_0x325f3e,'failingSince':_0x325f3e===0x1?_0x2b928c[_0x3961eb(0x1a8)]:_0x76eb89?.['failingSince']??_0x2b928c[_0x3961eb(0x1a8)]};}__name(foldScenarioRun,'foldScenarioRun');function scenarioIndexFileName(_0x43de6f){const _0x362363={_0x1e8797:0x11e},_0x5075bb=_0x16fbf0;return encodeURIComponent(_0x43de6f)+_0x5075bb(_0x362363._0x1e8797);}__name(scenarioIndexFileName,'scenarioIndexFileName');function scenarioRefFromFileName(_0x4f7598){const _0x8ca3fb={_0x29bd87:0x168,_0x33be60:0x108},_0x7918ac=_0x16fbf0;if(!_0x4f7598[_0x7918ac(_0x8ca3fb._0x29bd87)](_0x7918ac(0x11e)))return null;try{return decodeURIComponent(_0x4f7598[_0x7918ac(_0x8ca3fb._0x33be60)](0x0,-_0x7918ac(0x11e)[_0x7918ac(0x1ac)]));}catch{return null;}}__name(scenarioRefFromFileName,_0x16fbf0(0x16d));var BLOBS_DIR=_0x16fbf0(0x172),GENERATION_SEP='~',HASH_RE=/^[0-9a-f]{8,}$/,InvalidBlobHashError=class extends Error{static{__name(this,_0x16fbf0(0x152));}constructor(_0xf720e8){const _0x177862=_0x16fbf0;super(_0x177862(0x10e)+_0xf720e8),this['name']='InvalidBlobHashError';}};function blobPathFor(_0x3497cd,_0x286546,_0x522650,_0x43a19b=0x0){return _0x3497cd+'/'+blobRelPathFor(_0x286546,_0x522650,_0x43a19b);}__name(blobPathFor,_0x16fbf0(0x195));function blobRelSegmentsFor(_0x2f97dc,_0xbb4d74,_0x11fecb=0x0){const _0xd8d544={_0x542fe8:0x141,_0x857d38:0x108},_0x3d6130=_0x16fbf0;if(!HASH_RE[_0x3d6130(_0xd8d544._0x542fe8)](_0x2f97dc))throw new InvalidBlobHashError(_0x2f97dc);const _0xd5c526=_0x11fecb>0x0?''+GENERATION_SEP+_0x11fecb:'';return[BLOBS_DIR,_0x2f97dc['slice'](0x0,0x2),_0x2f97dc[_0x3d6130(_0xd8d544._0x857d38)](0x2,0x4),''+_0x2f97dc+_0xd5c526+'.'+_0xbb4d74];}__name(blobRelSegmentsFor,_0x16fbf0(0x1b0));function blobRelPathFor(_0x36568c,_0x18460e,_0xb1a6fd=0x0){const _0x38555b=_0x16fbf0;return blobRelSegmentsFor(_0x36568c,_0x18460e,_0xb1a6fd)[_0x38555b(0x155)]('/');}__name(blobRelPathFor,_0x16fbf0(0x15a));function blobsRootFor(_0x35798c){return _0x35798c+'/'+BLOBS_DIR;}__name(blobsRootFor,_0x16fbf0(0x198));var FS_UNSAFE_NAME_RE=/[\\/:*?"<>|\x00-\x1f]/;function validateFsSafeName(_0x4e1d52,_0x38c8f8){const _0x10f39b={_0x17a578:0x13f,_0x40f019:0x144,_0x458190:0x15b,_0x22c431:0x1ad},_0x745ed8=_0x16fbf0;if(typeof _0x4e1d52!==_0x745ed8(_0x10f39b._0x17a578))return _0x745ed8(0x164);const _0x7ba47b=_0x4e1d52[_0x745ed8(_0x10f39b._0x40f019)]();if(_0x7ba47b['length']===0x0)return _0x745ed8(0x11f);if(_0x7ba47b==='.'||_0x7ba47b==='..')return'must\x20not\x20be\x20\x22.\x22\x20or\x20\x22..\x22';if(_0x7ba47b[_0x745ed8(0x145)]('.'))return _0x745ed8(0x12c);if(_0x38c8f8?.[_0x745ed8(_0x10f39b._0x458190)]&&_0x7ba47b[_0x745ed8(0x145)]('_'))return _0x745ed8(0x19e);if(FS_UNSAFE_NAME_RE['test'](_0x7ba47b))return _0x745ed8(_0x10f39b._0x22c431);return null;}__name(validateFsSafeName,'validateFsSafeName');var COLLECTION_NAME_FORBIDDEN_RE=FS_UNSAFE_NAME_RE;function validateCollectionName(_0xe88968){return validateFsSafeName(_0xe88968);}__name(validateCollectionName,_0x16fbf0(0x191));var RUN_MANIFEST_FILE=_0x16fbf0(0x17c),RUN_SOURCES_FILE=_0x16fbf0(0x18b),UnsupportedRunKindError=class extends Error{static{__name(this,_0x16fbf0(0x11b));}constructor(_0x4ccdfa,_0x2dd2dc){const _0x124c60={_0x507cf7:0x149,_0x1e1620:0x11b},_0x3252a5=_0x16fbf0;super(_0x3252a5(_0x124c60._0x507cf7)+_0x2dd2dc+_0x3252a5(0x19f)+_0x4ccdfa+'\x22'),this[_0x3252a5(0x114)]=_0x3252a5(_0x124c60._0x1e1620);}},RunnerAdapterNotFoundError=class extends Error{static{__name(this,_0x16fbf0(0x128));}constructor(_0x35e8d2,_0x2985d3){const _0x104842={_0x4aafb7:0x114},_0x4745b2=_0x16fbf0;super('cannot\x20load\x20runner\x20adapter\x20\x22'+_0x35e8d2+_0x4745b2(0x10c)+_0x2985d3),this[_0x4745b2(_0x104842._0x4aafb7)]='RunnerAdapterNotFoundError';}},RunnerNotConfiguredError=class extends Error{static{__name(this,_0x16fbf0(0x1b4));}constructor(_0x858ff4){const _0x3ce7ec=_0x16fbf0;super(_0x858ff4),this[_0x3ce7ec(0x114)]='RunnerNotConfiguredError';}},EXPECT_FAIL_ANNOTATION=_0x16fbf0(0x1b2),ANNOTATION_RE=/^\s*\/\/\s*@([a-z0-9-]+)\s*$/;function isAnnotationLine(_0x31364c){const _0x23816c=_0x16fbf0;return ANNOTATION_RE[_0x23816c(0x141)](_0x31364c);}__name(isAnnotationLine,_0x16fbf0(0x11a));function parseScenarioAnnotations(_0x1c8ad4){const _0x56f1b9=_0x16fbf0,_0x9c9098=new Set();for(const _0x32baed of _0x1c8ad4[_0x56f1b9(0x124)](/\r?\n/)){const _0xbec022=_0x32baed[_0x56f1b9(0x144)]();if(_0xbec022==='')continue;if(!_0xbec022['startsWith']('//'))break;const _0x428b67=_0xbec022['match'](ANNOTATION_RE);if(_0x428b67)_0x9c9098[_0x56f1b9(0x1a3)](_0x428b67[0x1]);}return{'expectFail':_0x9c9098[_0x56f1b9(0x13b)](EXPECT_FAIL_ANNOTATION)};}__name(parseScenarioAnnotations,_0x16fbf0(0x181));var SEGMENT_NAME_FORBIDDEN_RE=FS_UNSAFE_NAME_RE;function validateSegmentName(_0x2991dc){return validateFsSafeName(_0x2991dc,{'reservedUnderscore':!![]});}__name(validateSegmentName,_0x16fbf0(0x173));var TERMINAL_WS_EVENT=_0x16fbf0(0x109),RUNNER_CONFIG_KEYS=new Set([_0x16fbf0(0x119),'UNOTEST_HEADED',_0x16fbf0(0x1a6),_0x16fbf0(0x197),_0x16fbf0(0x116),_0x16fbf0(0x17d),_0x16fbf0(0x123),_0x16fbf0(0x115),_0x16fbf0(0x1b3),'UNOTEST_DEBUG',_0x16fbf0(0x18c),'UNOTEST_DEBUG_MAX_BYTES',_0x16fbf0(0x147),'UNOTEST_DEBUG_HTML_MAX_BYTES',_0x16fbf0(0x16a),_0x16fbf0(0x174),_0x16fbf0(0x139),_0x16fbf0(0x167),_0x16fbf0(0x1ab),_0x16fbf0(0x162),_0x16fbf0(0x18f)]);function isRunnerConfigKey(_0x706eba){const _0x415cfe=_0x16fbf0;return RUNNER_CONFIG_KEYS[_0x415cfe(0x13b)](_0x706eba);}__name(isRunnerConfigKey,'isRunnerConfigKey');function categorizeVariable(_0x1f2f40){const _0x5271e1={_0x43d83f:0x114},_0x25f30d=_0x16fbf0;if(_0x1f2f40[_0x25f30d(0x158)]===_0x25f30d(0x143))return _0x25f30d(0x13c);return isRunnerConfigKey(_0x1f2f40[_0x25f30d(_0x5271e1._0x43d83f)])?'runner':_0x25f30d(0x188);}__name(categorizeVariable,_0x16fbf0(0x157));function isExternalVarName(_0x490bca){const _0x541264=_0x16fbf0;return/^[A-Z][A-Z0-9_]*$/[_0x541264(0x141)](_0x490bca);}__name(isExternalVarName,_0x16fbf0(0x192));var ENV_KEY_RE=/^[A-Za-z_][A-Za-z0-9_]*$/;function*assignmentEntries(_0xb83738){const _0x36e6af={_0x3e97ab:0x144,_0x5bf617:0x145,_0x3e209f:0x144,_0x39d975:0x141},_0x517e8e=_0x16fbf0;for(const _0x28bbf9 of _0xb83738[_0x517e8e(0x124)](/\r?\n/)){const _0x304b1a=_0x28bbf9[_0x517e8e(_0x36e6af._0x3e97ab)]();if(_0x304b1a===''||_0x304b1a[_0x517e8e(_0x36e6af._0x5bf617)]('#'))continue;const _0x3871e6=_0x304b1a[_0x517e8e(0x1a4)]('=');if(_0x3871e6<=0x0)continue;const _0x520fcc=_0x304b1a['slice'](0x0,_0x3871e6)[_0x517e8e(_0x36e6af._0x3e209f)]();if(!ENV_KEY_RE[_0x517e8e(_0x36e6af._0x39d975)](_0x520fcc))continue;yield[_0x520fcc,_0x304b1a['slice'](_0x3871e6+0x1)[_0x517e8e(0x144)]()];}}__name(assignmentEntries,_0x16fbf0(0x135));function parseEnvContent(_0x1a70f6){const _0xb6c7fb={_0x32bed0:0x1ac,_0x1fab44:0x108},_0x360f9e=_0x16fbf0,_0x165bf9={};for(const [_0x22a8fb,_0x3104af]of assignmentEntries(_0x1a70f6)){let _0x668f7b=_0x3104af;if(_0x668f7b['length']>=0x2){const _0x472f38=_0x668f7b[0x0],_0x21be30=_0x668f7b[_0x668f7b[_0x360f9e(_0xb6c7fb._0x32bed0)]-0x1];(_0x472f38==='\x22'||_0x472f38==='\x27')&&_0x472f38===_0x21be30&&(_0x668f7b=_0x668f7b[_0x360f9e(_0xb6c7fb._0x1fab44)](0x1,-0x1));}_0x165bf9[_0x22a8fb]=_0x668f7b;}return _0x165bf9;}__name(parseEnvContent,_0x16fbf0(0x140));function serializeEnvValue(_0x51fd9c){const _0x26048f={_0x1cdd8e:0x141,_0x13b1bd:0x18e},_0x4fe715=_0x16fbf0;if(_0x51fd9c==='')return'';if(/[\s#"'=\\]|^[`]/[_0x4fe715(0x141)](_0x51fd9c)||/[\n\r]/[_0x4fe715(_0x26048f._0x1cdd8e)](_0x51fd9c)){const _0xa3fc6b=_0x51fd9c['replace'](/\\/g,'\x5c\x5c')[_0x4fe715(0x18e)](/"/g,'\x5c\x22')['replace'](/\n/g,'\x5cn')[_0x4fe715(_0x26048f._0x13b1bd)](/\r/g,'\x5cr');return'\x22'+_0xa3fc6b+'\x22';}return _0x51fd9c;}__name(serializeEnvValue,_0x16fbf0(0x12d));function envKeys(_0x2c7e11){const _0x2bacad=_0x16fbf0,_0x2a201b=new Set();for(const [_0x561730]of assignmentEntries(_0x2c7e11))_0x2a201b[_0x2bacad(0x1a3)](_0x561730);return _0x2a201b;}__name(envKeys,_0x16fbf0(0x15d));function isSectionDivider(_0x14a3f6){const _0x43028f={_0x1887cb:0x141},_0x43a195=_0x16fbf0,_0x24d5ea=_0x14a3f6['trim']();return _0x24d5ea[_0x43a195(0x145)]('#')&&/---/[_0x43a195(_0x43028f._0x1887cb)](_0x24d5ea);}__name(isSectionDivider,'isSectionDivider');function isAssignmentLine(_0x32462e){const _0x507d38={_0x1b86bc:0x145,_0x3c925d:0x1a4},_0x3a415b=_0x16fbf0,_0x33b70e=_0x32462e['trim']();if(_0x33b70e===''||_0x33b70e[_0x3a415b(_0x507d38._0x1b86bc)]('#'))return![];const _0x25fe9e=_0x33b70e[_0x3a415b(_0x507d38._0x3c925d)]('=');return _0x25fe9e>0x0&&ENV_KEY_RE[_0x3a415b(0x141)](_0x33b70e[_0x3a415b(0x108)](0x0,_0x25fe9e)[_0x3a415b(0x144)]());}__name(isAssignmentLine,_0x16fbf0(0x13e));function isAssignmentOf(_0x19daae,_0x3fc7fa){const _0x4378bb={_0x508b0c:0x145,_0x1ec8e6:0x1a4,_0x581cca:0x144},_0x582f6a=_0x16fbf0,_0x58d781=_0x19daae[_0x582f6a(0x144)]();if(_0x58d781===''||_0x58d781[_0x582f6a(_0x4378bb._0x508b0c)]('#'))return![];const _0x4e134d=_0x58d781[_0x582f6a(_0x4378bb._0x1ec8e6)]('=');if(_0x4e134d<=0x0)return![];return _0x58d781[_0x582f6a(0x108)](0x0,_0x4e134d)[_0x582f6a(_0x4378bb._0x581cca)]()===_0x3fc7fa;}__name(isAssignmentOf,_0x16fbf0(0x153));function splitLines(_0xc64324){const _0x4e4e1b={_0x1ec493:0x168},_0x11c6b7=_0x16fbf0,_0x1b3085=_0xc64324[_0x11c6b7(_0x4e4e1b._0x1ec493)]('\x0a'),_0x1d73a1=_0x1b3085?_0xc64324[_0x11c6b7(0x108)](0x0,-0x1):_0xc64324;return{'lines':_0x1d73a1===''?[]:_0x1d73a1[_0x11c6b7(0x124)]('\x0a'),'trailingNewline':_0x1b3085};}__name(splitLines,_0x16fbf0(0x122));function joinLines(_0x1b9c81,_0x5c87f4){const _0x2a4f22={_0x412d96:0x155},_0x500da7=_0x16fbf0,_0xbead28=_0x1b9c81[_0x500da7(_0x2a4f22._0x412d96)]('\x0a');return _0x5c87f4||_0xbead28===''?_0xbead28+'\x0a':_0xbead28;}__name(joinLines,_0x16fbf0(0x142));function insertEnvVar(_0x133524,_0x53e775,_0x9d77f0,_0x187b6a){const _0x2fec7d={_0xca4aa2:0x1a0,_0x2181f6:0x165,_0x177d74:0x1ac,_0x29b100:0x14b,_0x418600:0x180,_0x39dc34:0x156},_0x3afa80=_0x16fbf0,_0x5f472c=_0x53e775+'='+serializeEnvValue(_0x9d77f0),{lines:_0x20f1c8,trailingNewline:_0xc04978}=splitLines(_0x133524);if(_0x187b6a){const _0xff11ef=new RegExp('\x5cb'+_0x187b6a[_0x3afa80(_0x2fec7d._0xca4aa2)]()+'\x5cb'),_0x5d67c3=_0x20f1c8[_0x3afa80(_0x2fec7d._0x2181f6)](_0xf2d056=>isSectionDivider(_0xf2d056)&&_0xff11ef[_0x3afa80(0x141)](_0xf2d056[_0x3afa80(0x1a0)]()));if(_0x5d67c3!==-0x1){let _0x2eda63=_0x20f1c8[_0x3afa80(_0x2fec7d._0x177d74)];for(let _0x3f6b33=_0x5d67c3+0x1;_0x3f6b33<_0x20f1c8[_0x3afa80(0x1ac)];_0x3f6b33++){if(isSectionDivider(_0x20f1c8[_0x3f6b33])){_0x2eda63=_0x3f6b33;break;}}let _0x1b9f6a=-0x1,_0x46968b=-0x1;for(let _0x623c27=_0x5d67c3+0x1;_0x623c27<_0x2eda63;_0x623c27++){if(_0x20f1c8[_0x623c27][_0x3afa80(0x144)]()!=='')_0x46968b=_0x623c27;if(isAssignmentLine(_0x20f1c8[_0x623c27]))_0x1b9f6a=_0x623c27;}const _0x28d01d=_0x1b9f6a>=0x0?_0x1b9f6a:_0x46968b,_0x1307d5=_0x28d01d>=0x0?_0x28d01d+0x1:_0x5d67c3+0x1;return _0x20f1c8[_0x3afa80(0x187)](_0x1307d5,0x0,_0x5f472c),joinLines(_0x20f1c8,_0xc04978||_0x20f1c8['length']>0x0);}if(_0x20f1c8['length']>0x0)_0x20f1c8[_0x3afa80(_0x2fec7d._0x29b100)]('');return _0x20f1c8[_0x3afa80(_0x2fec7d._0x29b100)](_0x3afa80(_0x2fec7d._0x418600)+_0x187b6a+_0x3afa80(_0x2fec7d._0x39dc34),_0x5f472c),joinLines(_0x20f1c8,!![]);}return _0x20f1c8[_0x3afa80(_0x2fec7d._0x29b100)](_0x5f472c),joinLines(_0x20f1c8,!![]);}__name(insertEnvVar,_0x16fbf0(0x127));function removeEnvVar(_0x2604ff,_0x20386f){const _0x4b5914=_0x16fbf0,{lines:_0x47b635,trailingNewline:_0x1b8102}=splitLines(_0x2604ff),_0x43272f=_0x47b635['filter'](_0x19a923=>!isAssignmentOf(_0x19a923,_0x20386f)),_0x3b33dd=_0x43272f['length']!==_0x47b635[_0x4b5914(0x1ac)];return{'content':joinLines(_0x43272f,_0x1b8102),'removed':_0x3b33dd};}__name(removeEnvVar,_0x16fbf0(0x179));var SECTION_BY_KIND={'app':_0x16fbf0(0x190),'runner':_0x16fbf0(0x14a),'secret':void 0x0};function planAddVariable(_0x555431){const _0x280e98={_0x5594ef:0x151,_0x474b6e:0x13b,_0x2100f4:0x13c,_0x1b10fb:0x14b,_0x281c21:0x130,_0x4ae45d:0x13c,_0x4c1022:0x14b,_0x27bf63:0x133},_0x29f15f=_0x16fbf0,{name:_0x209c24,kind:_0x182fe2}=_0x555431;if(_0x182fe2===_0x29f15f(0x185)){if(!isRunnerConfigKey(_0x209c24))return{'ok':![],'code':_0x29f15f(_0x280e98._0x5594ef),'message':_0x209c24+_0x29f15f(0x136)};}else{if(!isExternalVarName(_0x209c24))return{'ok':![],'code':_0x29f15f(0x13d),'message':_0x209c24+'\x20must\x20be\x20UPPER_SNAKE\x20(e.g.\x20APP_BASE_URL)\x20so\x20a\x20scenario\x20can\x20reference\x20it\x20by\x20name.'};}const _0x4aa2ec=envKeys(_0x555431[_0x29f15f(0x10f)])[_0x29f15f(_0x280e98._0x474b6e)](_0x209c24),_0x381b72=envKeys(_0x555431['secretsContent'])[_0x29f15f(0x13b)](_0x209c24),_0x321664=_0x182fe2===_0x29f15f(_0x280e98._0x2100f4)?'secrets':_0x29f15f(0x17e),_0x27f579=_0x321664===_0x29f15f(0x143)?_0x381b72:_0x4aa2ec,_0x36fa81=_0x321664==='secrets'?'unotest/.secrets':_0x29f15f(0x134);if(_0x27f579)return{'ok':![],'code':'duplicate','message':_0x209c24+'\x20already\x20exists\x20in\x20'+_0x36fa81+_0x29f15f(0x19a)};const _0x107f9b=[];return _0x182fe2==='secret'&&_0x4aa2ec&&_0x107f9b[_0x29f15f(_0x280e98._0x1b10fb)](_0x209c24+_0x29f15f(_0x280e98._0x281c21)),_0x182fe2!==_0x29f15f(_0x280e98._0x4ae45d)&&_0x381b72&&_0x107f9b[_0x29f15f(_0x280e98._0x4c1022)](_0x209c24+_0x29f15f(_0x280e98._0x27bf63)),{'ok':!![],'target':_0x321664,'sectionLabel':SECTION_BY_KIND[_0x182fe2],'warnings':_0x107f9b};}__name(planAddVariable,_0x16fbf0(0x14f));function deleteShadowWarning(_0x5457e9,_0x2fae30,_0x1ccfc3){const _0x4b49d1={_0x3a23da:0x112},_0xe847fe=_0x16fbf0;if(_0x1ccfc3!==void 0x0&&_0x1ccfc3!==_0x2fae30)return[_0x5457e9+_0xe847fe(_0x4b49d1._0x3a23da)];return[];}__name(deleteShadowWarning,_0x16fbf0(0x166));var TERMINAL_RUNTIME_STATES=[_0x16fbf0(0x175),'failed','aborted'];function isTerminalRuntimeState(_0x35f580){const _0x3e0415=_0x16fbf0;return TERMINAL_RUNTIME_STATES[_0x3e0415(0x17a)](_0x35f580);}__name(isTerminalRuntimeState,_0x16fbf0(0x1aa));export{BLOBS_DIR,COLLECTIONS_SUBDIR,COLLECTION_NAME_FORBIDDEN_RE,COMMANDS_FILE,DAY_INDEX_FILE,E2E_SUBDIR,ENV_FILE,EXPECT_FAIL_ANNOTATION,HEARTBEAT_FILE,HELPERS_SUBDIR,InvalidBlobHashError,LOCK_FILE,LOG_FILE,PICKER_SNAPSHOT_FILE,RUNNER_CONFIG_KEYS,RUNS_SUBDIR,RUNTIME_FILE,RUN_INDEX_SCHEMA_VERSION,RUN_MANIFEST_FILE,RUN_SOURCES_FILE,RunnerAdapterNotFoundError,RunnerNotConfiguredError,SCENARIOS_INDEX_DIR,SCENARIOS_LATEST_FILE,SCENARIO_RECENT_WINDOW,SECRETS_FILE,SEGMENT_NAME_FORBIDDEN_RE,SNAPSHOTS_SUBDIR,STDERR_FILE,STDOUT_FILE,STEPS_FILE,TERMINAL_RUNTIME_STATES,TERMINAL_WS_EVENT,UNOTEST_DIR,UnplaceableRunIdError,UnsupportedRunKindError,activeEnvName,blobPathFor,blobRelPathFor,blobRelSegmentsFor,blobsRootFor,categorizeVariable,debugDirFor,debuggerFileFor,deleteShadowWarning,envFileFor,envKeys,envLayerFilesFor,envNamesFromDirListing,foldScenarioRun,insertEnvVar,isAnnotationLine,isExternalVarName,isFailingStatus,isRegexLiteral,isRunnerConfigKey,isRunsDirName,isTerminalRuntimeState,makeRunId,parseAppServerEvent,parseEnvContent,parseScenarioAnnotations,planAddVariable,projectRunDirFor,projectRunsRoot,regexLiteral,removeEnvVar,requireRunDirFor,runDirFor,runIdStartedAt,runsDirFor,sanitizeRunIdSegment,scenarioIndexFileName,scenarioRefFromFileName,secretsFileFor,secretsLayerFilesFor,serializeEnvValue,shardDaysDescending,shardDirFor,shardPathForRunId,shardPathForTimestamp,testDirFor,validateCollectionName,validateSegmentName};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unotest/protocol",
3
- "version": "0.19.0",
3
+ "version": "0.21.0",
4
4
  "description": "Cross-runner protocol for the @unotest ecosystem: shared TypeScript types, path constants, the IRunnerAdapter contract that lets @unotest/viewer drive @unotest/web, @unotest/mobile (and future runners) through the same surface. Pure types + pure functions only — zero runtime deps, browser-safe.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {