@unotest/protocol 0.9.0 → 0.10.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
@@ -2,6 +2,48 @@
2
2
 
3
3
  All notable changes to `@unotest/protocol` are documented in this file.
4
4
 
5
+ ## [0.10.0] - 2026-08-06
6
+
7
+ ### Patch Changes
8
+
9
+ - 574841f: Dedup pass across the tree (jscpd 0 clones, ratchet threshold 0). New public export in `@unotest/grounder-client`: `intEnvInRange(env, name, def, min, max)` — the `UNOTEST_GROUNDER_*` integer-env parser shared by the consumer side and the grounder server. Everything else is internal refactoring with no behavior change: protocol gains a shared fs-safe-name validator behind `validateCollectionName` / `validateSegmentName` and a shared env-file assignment iterator; core's `RuntimeInspection` becomes a `Pick` of `RuntimeStateFile`; dsl's `ExecutionWalker` threads one `WalkCtx` object instead of an eight-argument clump and AST nodes use constructor parameter properties; web deduplicates the MCP tool scaffolds, action plugins, DSL contracts, perception LRU caches, and semantic-dom grouping passes.
10
+
11
+ ## [0.9.2] - 2026-06-16
12
+
13
+ ### Added
14
+
15
+ - **Snapshot bundle protocol.** `SNAPSHOTS_SUBDIR` (`unotest/.snapshots/`) and a
16
+ `SnapshotTab` (`kind: "snapshot"`, keyed by its own `snapshotId`) — an imported,
17
+ terminal run rendered from a portable `*.unotest.zip` bundle rather than the live
18
+ runner, so a teammate's exported run opens as a foreign tab without colliding with
19
+ the viewer's own `runId` space.
20
+ - **`RunManifest.capture`.** The artifact-capture flags (`console` / `network`)
21
+ resolved from the runner's env at start, recorded so the viewer can tell "capture
22
+ was disabled" apart from "capture was on but the run aborted before writing
23
+ `console.json` / `network.json`". Optional — pre-existing runs omit it and the
24
+ viewer falls back to a file-presence heuristic.
25
+
26
+ ## [0.9.1] - 2026-06-14
27
+
28
+ ### Added
29
+
30
+ - **Probe protocol.** `DbgCommandProbe` + `ProbeResult` / `ProbeResultEvent` —
31
+ evaluate a DSL locator string against the live page and report what it matches
32
+ (count, the N a trailing `.first()`/`.last()`/`.nth()` collapsed, per-match
33
+ identity). Shared shape so the agent's `check_locator` and the viewer's human
34
+ probe report identically.
35
+ - **Agent tool-call events.** `ToolCallEvent` / `ToolResultEvent` — an attached
36
+ MCP server surfaces each tool call + result into the run's event stream so the
37
+ viewer's System console shows what the agent called and how it ended.
38
+ - **`RuntimeStateFile.breakpoints`.** The run's active breakpoints (`"line:col"`
39
+ keys — `.debugger.json` seed + any `--breakpoints` override), so the viewer can
40
+ paint gutter dots for breakpoints that aren't persisted.
41
+ - **App-server protocol.** `AppServerEvent` + `parseAppServerEvent` and the
42
+ `IRunnerAdapter` / launch-spec contracts for the project dev app-server
43
+ integration.
44
+ - **Env editing helpers** (`env-edit`) and additional path constants/helpers
45
+ (`paths`).
46
+
5
47
  ## [0.9.0] - 2026-06-11
6
48
 
7
49
  ### Added
package/dist/index.d.ts CHANGED
@@ -1,5 +1,31 @@
1
1
  import { Readable } from 'node:stream';
2
2
 
3
+ type AppServerEvent =
4
+ /** The app under test is ready. Web holders carry the dev-server
5
+ * `url`; device holders (mobile) carry a human `detail` line instead
6
+ * («A: UnoTest-A booted, UnoPeak.app installed»). At least one of
7
+ * the two is expected; the panel renders whichever is present. */
8
+ {
9
+ kind: "app-server:ready";
10
+ url?: string;
11
+ detail?: string;
12
+ }
13
+ /** Already provided by someone else — nothing spawned; the holder
14
+ * exits 0 (web: URL already serving). */
15
+ | {
16
+ kind: "app-server:reused";
17
+ url?: string;
18
+ detail?: string;
19
+ }
20
+ /** Configuration / spawn / readiness failure. The holder exits 1. */
21
+ | {
22
+ kind: "app-server:error";
23
+ message: string;
24
+ };
25
+ /** Parse one stdout line into an `AppServerEvent`, or null when the line
26
+ * is ordinary dev-server output. */
27
+ declare function parseAppServerEvent(line: string): AppServerEvent | null;
28
+
3
29
  /** User-facing project directory containing scenarios + helpers + collections. */
4
30
  declare const UNOTEST_DIR = "unotest";
5
31
  /** Subdir under `unotest/` for `.test.js` scenarios. */
@@ -12,6 +38,24 @@ declare const COLLECTIONS_SUBDIR = "_collections";
12
38
  * Dot-prefix so a single `.gitignore` line covers all runtime debris
13
39
  * without touching user code in `unotest/e2e/`. */
14
40
  declare const RUNS_SUBDIR = ".runs";
41
+ /** Imported snapshot bundles under `unotest/`: `.snapshots/<snapshotId>/`.
42
+ * Foreign/portable (a teammate's exported run) — NOT per-target-suffixed; the
43
+ * manifest carries the originating target. Dot-prefixed → covered by the same
44
+ * `.gitignore` line as other runtime debris. */
45
+ declare const SNAPSHOTS_SUBDIR = ".snapshots";
46
+ /** Scenario tree under `unotest/`: `e2e` / `e2e-mobile`. */
47
+ declare function testDirFor(suffix: string): string;
48
+ /** Run-artifact root under `unotest/`: `.runs` / `.runs-mobile`. */
49
+ declare function runsDirFor(suffix: string): string;
50
+ /** `UNOTEST_DEBUG` artifact root under `unotest/`: `.debug` /
51
+ * `.debug-mobile`. */
52
+ declare function debugDirFor(suffix: string): string;
53
+ /** Per-target shared breakpoint store, relative to project root:
54
+ * `unotest/.debugger.json` / `unotest/.debugger-mobile.json`. Breakpoint
55
+ * keys are scenario names RELATIVE to the target's testDir, so each
56
+ * target needs its own file (same key ≠ same scenario across targets).
57
+ * Schema: `BreakpointsFile` in `protocol/breakpoints-file.ts`. */
58
+ declare function debuggerFileFor(suffix: string): string;
15
59
  /** Lockfile path *relative to* `unotest/`. Project-local (multiple viewers
16
60
  * for different projects coexist). */
17
61
  declare const LOCK_FILE = ".viewer.lock";
@@ -45,23 +89,31 @@ declare const RUNTIME_FILE = "runtime.json";
45
89
  * Snapshot inspector tab fetches it via the run-dir asset endpoint to show
46
90
  * "what the picker sees" for diagnosing ref/coverage gaps. */
47
91
  declare const PICKER_SNAPSHOT_FILE = "picker-snapshot.txt";
48
- /** Per-project shared breakpoint store. Path is relative to project root
49
- * (NOT under `unotest/.runs/`). Schema: `BreakpointsFile` in
50
- * `protocol/breakpoints-file.ts`. */
51
- declare const DEBUGGER_FILE = "unotest/.debugger.json";
52
92
  /** Project env file edited by the viewer's env-variable editor. Relative
53
93
  * to project root. Surfaced as `EnvFile` (`protocol/env-file.ts`). */
54
94
  declare const ENV_FILE = "unotest/.env";
55
95
  /** Secret scenario variables, beside `.env` under `unotest/`. Same KEY=VALUE
56
96
  * format; secrecy is a property of THIS file (not a name heuristic). */
57
97
  declare const SECRETS_FILE = "unotest/.secrets";
58
- /** Per-environment overlay file for `.env` / `.secrets`. `unotest/.env`
59
- * (+ `.secrets`) hold shared defaults; `unotest/.env.<name>` overrides them
60
- * for a named environment (`staging`, `production`, …), selected at run time
61
- * via `UNOTEST_ENV` / `--env`. Overlay wins over base; ambient process.env
62
- * still wins over both. No env name → base file only. */
63
- declare function envFileFor(envName?: string): string;
64
- declare function secretsFileFor(envName?: string): string;
98
+ /** Env/secrets file naming spans TWO axes (M-11):
99
+ *
100
+ * - TARGET (dash, M-10): `.env` is the shared base AND web's file (bare
101
+ * suffix); `.env-mobile` overrides it for the mobile runner.
102
+ * - ENVIRONMENT (dot): `.env.<name>` overrides for a named environment
103
+ * (`staging`, `production`, …), selected at run time via
104
+ * `UNOTEST_ENV` / `--env`.
105
+ *
106
+ * They compose: `unotest/.env-mobile.staging`. Precedence (low→high):
107
+ * base → target → env-overlay → target+env-overlay — an explicit
108
+ * `--env` is a runtime intent and beats a static target default.
109
+ * Ambient process.env still wins over every file. */
110
+ declare function envFileFor(suffix: string, envName?: string): string;
111
+ declare function secretsFileFor(suffix: string, envName?: string): string;
112
+ /** Ordered (low→high precedence) layer list for a target's env files.
113
+ * Bare suffix / unset env collapse to fewer layers — web with no named
114
+ * environment reads just `[unotest/.env]`. */
115
+ declare function envLayerFilesFor(suffix: string, envName?: string): string[];
116
+ declare function secretsLayerFilesFor(suffix: string, envName?: string): string[];
65
117
  /** Read an environment name from a process-env-like record (`UNOTEST_ENV`),
66
118
  * normalising empty/blank to `undefined` (= base only). */
67
119
  declare function activeEnvName(env: Record<string, string | undefined>): string | undefined;
@@ -96,11 +148,9 @@ declare function makeRunId(name: string): string;
96
148
  * random suffix appended by `makeRunId`. */
97
149
  declare function sanitizeRunIdSegment(name: string): string;
98
150
 
99
- /** Filesystem-unsafe characters in a collection name. Block-list approach
100
- * (any Unicode letter is fine — collections can be named in any
101
- * language) bounded by what `posix.join("…", `${name}.yaml`)` must keep
102
- * safe: no path separators, no Windows-reserved punctuation, no NUL /
103
- * control chars. */
151
+ /** Filesystem-unsafe characters in a collection name — see
152
+ * `FS_UNSAFE_NAME_RE` for the block-list rationale. Kept as a named
153
+ * re-export for the published surface. */
104
154
  declare const COLLECTION_NAME_FORBIDDEN_RE: RegExp;
105
155
  /** Validate a collection name. Returns `null` on success, or a
106
156
  * human-readable reason string on failure. Shared by the viewer-server
@@ -199,6 +249,17 @@ interface RunManifest {
199
249
  /** Wallclock at runner start. Distinct from the first event's `t`
200
250
  * (which may have leading delay for adapter setup). */
201
251
  startedAt: number;
252
+ /** Opt-in artifact-capture flags as resolved from the runner's env at
253
+ * start (`UNOTEST_CONSOLE` / `UNOTEST_NETWORK`). Recorded here so the
254
+ * viewer can tell "capture was disabled" apart from "capture was on but
255
+ * the run aborted before writing console.json / network.json" — a
256
+ * distinction the mere presence of those files can't make. Optional: runs
257
+ * produced before this field existed simply omit it, and the viewer falls
258
+ * back to a file-presence heuristic. */
259
+ capture?: {
260
+ console: boolean;
261
+ network: boolean;
262
+ };
202
263
  }
203
264
 
204
265
  /** Snapshot file holding entry + every helper source that was loaded. */
@@ -220,6 +281,21 @@ interface IRunnerAdapter {
220
281
  * (e.g. `"@unotest/web"`). NOT used for control flow — viewer
221
282
  * must not branch on this. */
222
283
  readonly name: string;
284
+ /** Per-target artifact suffix — the single axis that scopes EVERY
285
+ * per-target filesystem name (M-10): `""` for web (the first target
286
+ * keeps the bare names), `"-mobile"` for mobile, `"-unity"` for a
287
+ * future unity runner. Derived names (via `paths.ts` helpers):
288
+ * scenario tree `e2e<suffix>`, run artifacts `.runs<suffix>`, debug
289
+ * logs `.debug<suffix>`, breakpoints `.debugger<suffix>.json`, env
290
+ * overlays `.env<suffix>`. The viewer scopes discovery/runs/
291
+ * breakpoints by the active target's suffix so no folder name is
292
+ * ever hardcoded in viewer source (OCP: a new target just declares
293
+ * its suffix). */
294
+ readonly suffix: string;
295
+ /** Debug-toolbar capabilities the viewer gates its controls on (OCP — a
296
+ * new target just declares what it supports; viewer never branches on the
297
+ * runner name). See `DebugCapabilities`. */
298
+ readonly debug: DebugCapabilities;
223
299
  /** Which `RunRequest.kind` values this adapter can handle. Viewer
224
300
  * rejects unsupported kinds with `UnsupportedRunKindError` before
225
301
  * building argv. */
@@ -238,6 +314,106 @@ interface IRunnerAdapter {
238
314
  * (`UNOTEST_WORKER_INDEX/COUNT`) is NOT the adapter's
239
315
  * responsibility — see `D-C4` in the collections plan. */
240
316
  buildEnv(req: RunRequest): NodeJS.ProcessEnv;
317
+ /** Argv (after the bin path) that starts this runner's LONG-LIVED
318
+ * app-under-test holder (M-12/M-16) — the process that prepares the
319
+ * app (web: spawns the dev server; mobile: boots devices + installs
320
+ * the build), emits `AppServerEvent` JSON lines on stdout, and tears
321
+ * down what it owns when terminated. Absent → the runner has no
322
+ * app-launch capability and the viewer hides the feature for this
323
+ * target. Example: `["app-server"]`. */
324
+ appServerArgs?(): string[];
325
+ /** Path inputs the App panel renders for this target (M-17) — each
326
+ * spec becomes an input + file-picker button whose value is saved
327
+ * into the target's env file (`envKey`). The viewer stays
328
+ * platform-blind: extensions/labels are vocab the adapter owns
329
+ * (mobile iOS: `.app`; a future Android entry adds `.apk`). */
330
+ appServerPickers?(): readonly AppPathPickerSpec[];
331
+ /** Host-OS requirement for THIS runner. The viewer resolves it against
332
+ * the server's real `process.platform` and gates the switcher: an
333
+ * unsupported host shows `reason` and blocks activation (e.g. mobile is
334
+ * macOS-only — iOS Simulator is Apple-licensed). Absent → runs on any
335
+ * host (web). OCP: a new platform-bound runner just declares this; the
336
+ * viewer never hardcodes which target needs which OS. */
337
+ readonly host?: HostRequirement;
338
+ /** Structured environment preflight ("doctor") — what must be installed/
339
+ * configured for this runner to actually run here (mobile: Xcode +
340
+ * simulators; web: Node + a system browser). Pure-ish but MAY shell out
341
+ * to probe the host, hence async; the viewer invokes it on demand (a
342
+ * "Check" button), never on every switch. Absent → nothing to verify
343
+ * beyond the package being installed. The viewer renders the returned
344
+ * list verbatim (severity + message + fix `detail`) — it owns no runner
345
+ * vocab. */
346
+ doctor?(ctx: DoctorContext): Promise<DoctorCheck[]>;
347
+ }
348
+ /** Severity of a single {@link DoctorCheck}. `error` = the runner cannot
349
+ * run until fixed; `warning` = may work, review; `ok` = satisfied. */
350
+ type CheckSeverity = "ok" | "warning" | "error";
351
+ /** One environment-preflight result. The single shape both `@unotest/web`
352
+ * and `@unotest/mobile` already produce from their `runEnvironmentChecks`
353
+ * — lifted here so the viewer (and any future surface) consumes one type,
354
+ * not a per-runner copy. */
355
+ interface DoctorCheck {
356
+ /** Short check id, e.g. `"xcode-cli"`, `"Node.js version"`. */
357
+ name: string;
358
+ severity: CheckSeverity;
359
+ /** One-line outcome, e.g. `"Xcode CLI tools at /Applications/…"`. */
360
+ message: string;
361
+ /** Human-readable remediation when not `ok` — a command or concrete
362
+ * next step. Surfaced under the message in the UI. */
363
+ detail?: string;
364
+ }
365
+ /** What an adapter's {@link IRunnerAdapter.doctor} receives. Kept as an
366
+ * object so new context (e.g. a target's env file) can be added without
367
+ * touching every implementor's signature. */
368
+ interface DoctorContext {
369
+ /** Absolute path to the project root (the dir containing `unotest/`) —
370
+ * for project-aware checks (mobile reads `package.json` to hint RN/Expo). */
371
+ projectRoot: string;
372
+ }
373
+ /** A runner's host-OS requirement. The viewer compares `platforms` against
374
+ * `process.platform`; a mismatch shows `reason` and blocks the switch. */
375
+ interface HostRequirement {
376
+ /** `process.platform` values this runner can execute on, e.g. `["darwin"]`
377
+ * for iOS. */
378
+ platforms: ReadonlyArray<NodeJS.Platform>;
379
+ /** Shown when the current host isn't in `platforms` — one sentence the
380
+ * user reads in the switcher / setup panel. */
381
+ reason: string;
382
+ }
383
+ /** What a runner's debug session supports — drives which debug-toolbar
384
+ * controls the viewer shows. A target that lacks a capability gets the
385
+ * control hidden (no dead buttons). */
386
+ interface DebugCapabilities {
387
+ /** In-page locator picker / recorder — click an element in the SHARED,
388
+ * inspectable page to insert its locator/assertion (web). Runners that
389
+ * drive an opaque device without a clickable DOM (mobile via WDA) set this
390
+ * false → the viewer hides the picker cluster (Capture/Execute +
391
+ * target/A/eye). NOTE: distinct from `attach` — the wheel + agent join
392
+ * apply to mobile too. */
393
+ picker: boolean;
394
+ /** Collaborative attach: a second client (the MCP agent) can join the live
395
+ * debug session and co-drive it, coordinated by the control wheel. True for
396
+ * web (shared browser) AND mobile (shared device via WDA). The viewer shows
397
+ * the wheel / "who's driving" badge when set. */
398
+ attach: boolean;
399
+ /** A failure-pause is resumable as a RETRY of the failed step (mobile D-17:
400
+ * the user fixes the device/app state, Continue re-executes the same
401
+ * statement). When false (web: resume past a failure means "skip & pretend
402
+ * it passed"), the viewer hides Continue/Step on a failure-pause so the
403
+ * only action is Stop. */
404
+ resumeFromFailure: boolean;
405
+ }
406
+ /** One path-input row in the viewer's App panel (M-17). */
407
+ interface AppPathPickerSpec {
408
+ /** Env var the picked path is saved to (e.g. `"APP_PATH"`). Routed to
409
+ * the target's env file by the viewer's variables API (M-11). */
410
+ envKey: string;
411
+ /** Selectable leaf extensions (lowercase, with dot). macOS `.app`
412
+ * bundles are directories — the file browser treats a matching dir
413
+ * as a selectable leaf. */
414
+ extensions: readonly string[];
415
+ /** Human label rendered above the input (e.g. `"iOS app bundle"`). */
416
+ label: string;
241
417
  }
242
418
  /** Thrown by the viewer when a `RunRequest.kind` isn't in the
243
419
  * adapter's `supportedKinds`. The exception filter maps to HTTP 400
@@ -293,10 +469,10 @@ interface ScenariosPayload {
293
469
  * subtrees (`_helpers`, `_collections`) and any `_`/`.`-prefixed dir. */
294
470
  folders: string[];
295
471
  }
296
- /** Filesystem-unsafe characters in a single path segment. Includes the
297
- * path separators (`\` `/`) so a valid segment is guaranteed to be ONE
298
- * level — no nesting smuggled through a name. Mirrors the block-list
299
- * rationale of `validateCollectionName`. */
472
+ /** Filesystem-unsafe characters in a single path segment — see
473
+ * `FS_UNSAFE_NAME_RE` (it includes both path separators, so a valid
474
+ * segment is guaranteed to be ONE level). Kept as a named re-export for
475
+ * the published surface. */
300
476
  declare const SEGMENT_NAME_FORBIDDEN_RE: RegExp;
301
477
  /** Validate a single scenario-file stem or folder name. Returns `null` on
302
478
  * success, else a human-readable reason. Shared by the viewer-server
@@ -384,6 +560,13 @@ declare function categorizeVariable(v: {
384
560
  * above instead. Convention only — no value inspection. */
385
561
  declare function isExternalVarName(name: string): boolean;
386
562
 
563
+ /** Parse `KEY=VALUE` env-file CONTENT into a plain record. Pure — the
564
+ * caller does the fs read. Blank lines and `#` comments are skipped;
565
+ * balanced surrounding single/double quotes are stripped; keys not
566
+ * matching `[A-Za-z_][A-Za-z0-9_]*` are ignored. Shared by the web and
567
+ * mobile runners' layered env loaders (M-11) so both parse `.env` files
568
+ * identically. */
569
+ declare function parseEnvContent(raw: string): Record<string, string>;
387
570
  /** Quote on write only when the value would otherwise be ambiguous (spaces,
388
571
  * `#`, quotes, `=`, backslash, leading backtick, or newlines). Plain tokens
389
572
  * stay unquoted. Mirrors the viewer env-dotenv serializer. */
@@ -690,9 +873,60 @@ interface DbgCommandWheel {
690
873
  cmd: "wheel";
691
874
  owner: "agent" | "human";
692
875
  }
693
- type DbgCommand = DbgCommandStep | DbgCommandContinue | DbgCommandPause | DbgCommandSetBp | DbgCommandClearBp | DbgCommandAbort | DbgCommandPickerStart | DbgCommandPickerStop | DbgCommandSnapshot | DbgCommandRecord | DbgCommandWheel;
876
+ /** Evaluate a DSL locator STRING against the live (paused or running) page and
877
+ * report what it matches — count, the N a trailing .first()/.last()/.nth()
878
+ * collapses, and per-match identity — via a `probe:result` event. The runner
879
+ * parses `locator` with the SAME DSL parser the agent's `check_locator` uses,
880
+ * so agent and human probe identically. READ-ONLY (never acts on the page),
881
+ * so it is intentionally NOT wheel-gated: any client may probe at any time. */
882
+ interface DbgCommandProbe {
883
+ id: string;
884
+ cmd: "probe";
885
+ /** Locator exactly as written in a test, e.g.
886
+ * getByRole('row').filter({hasText: 'Uma Quinn'}).first(). */
887
+ locator: string;
888
+ /** Cap on the number of match details returned (default 20). */
889
+ limit?: number;
890
+ }
891
+ type DbgCommand = DbgCommandStep | DbgCommandContinue | DbgCommandPause | DbgCommandSetBp | DbgCommandClearBp | DbgCommandAbort | DbgCommandPickerStart | DbgCommandPickerStop | DbgCommandSnapshot | DbgCommandRecord | DbgCommandWheel | DbgCommandProbe;
694
892
  type DbgCommandKind = DbgCommand["cmd"];
695
893
 
894
+ interface ProbeMatch {
895
+ /** 0-based position among the locator's matches. */
896
+ index: number;
897
+ role?: string;
898
+ name?: string;
899
+ /** Trimmed/clipped textContent of the element. */
900
+ text?: string;
901
+ testId?: string;
902
+ href?: string;
903
+ /** Currently visible? Non-waiting check (a match can exist but be off-screen). */
904
+ visible: boolean;
905
+ }
906
+ interface ProbePinned {
907
+ /** The terminal index op that collapsed a multi-match to a single element. */
908
+ op: "first" | "last" | "nth";
909
+ /** How many elements the chain matched BEFORE the terminal op — i.e. how many
910
+ * the .first()/.last()/.nth() silently picked from. `ofCount > 1` flags an
911
+ * index op hiding ambiguity. */
912
+ ofCount: number;
913
+ }
914
+ interface ProbeResult {
915
+ /** Human-readable chain echo. NOT a selector. */
916
+ chain: string;
917
+ /** Elements the full chain matches. */
918
+ count: number;
919
+ /** Present only when the chain ends in first/last/nth. */
920
+ pinned?: ProbePinned;
921
+ /** Details of up to the requested limit of matches. */
922
+ matches: ProbeMatch[];
923
+ /** True count before truncation (equal to `count`). */
924
+ totalCount: number;
925
+ truncated: boolean;
926
+ /** Actionable hints: nothing matched, hidden ambiguity, truncation, stale ref. */
927
+ warnings: string[];
928
+ }
929
+
696
930
  /** Terminal outcome reported by the runner via `run:finished`. */
697
931
  type RunOutcome = "completed" | "failed" | "aborted" | "interrupted";
698
932
  /** Scenario-level run-id. Format opaque to consumers; treat as string. */
@@ -758,6 +992,9 @@ interface FailureBundleWrittenEvent extends RunArtifactBase {
758
992
  /** Project-relative path to the screenshot PNG inside the bundle,
759
993
  * when tier-2 capture succeeded. */
760
994
  screenshotPath?: string;
995
+ /** Page URL at the moment of failure (same value captured into the
996
+ * bundle's `snapshot.json`/`outline.txt`), for the viewer's ErrorCard. */
997
+ url?: string;
761
998
  }
762
999
  interface RunFinishedEvent extends RunArtifactBase {
763
1000
  kind: "run:finished";
@@ -829,8 +1066,49 @@ interface WheelChangedEvent extends RunArtifactBase {
829
1066
  kind: "wheel:changed";
830
1067
  owner: "agent" | "human";
831
1068
  }
1069
+ /** Emitted in response to a `probe` debug command: the result of evaluating a
1070
+ * locator string against the live page. `id` echoes the command's id so the
1071
+ * client that issued the probe can correlate the reply. READ-ONLY — producing
1072
+ * it never changed the page. */
1073
+ interface ProbeResultEvent extends RunArtifactBase {
1074
+ kind: "probe:result";
1075
+ /** Correlates with the issuing `DbgCommandProbe.id`. */
1076
+ id: string;
1077
+ result: ProbeResult;
1078
+ }
1079
+ /** A single MCP tool invocation by the agent, surfaced into the session's
1080
+ * event stream so the human sees — in the viewer's System console — what the
1081
+ * agent called and how it ended. Emitted ONLY while the MCP server is attached
1082
+ * to this run (own-browser calls have no session to attach to). Paired:
1083
+ * `tool:call` at invocation, `tool:result` at completion, correlated by
1084
+ * `callId`. Read-only telemetry — emitting it never touches the page. */
1085
+ interface ToolCallEvent extends RunArtifactBase {
1086
+ kind: "tool:call";
1087
+ /** Correlates with the matching `tool:result` (one MCP call). */
1088
+ callId: string;
1089
+ /** MCP tool name, e.g. "check_locator", "explore_step". */
1090
+ tool: string;
1091
+ /** Arguments as a secret-redacted, length-capped JSON string — NOT the raw
1092
+ * object. Capped upstream so the line stays a single atomic append. */
1093
+ args: string;
1094
+ }
1095
+ interface ToolResultEvent extends RunArtifactBase {
1096
+ kind: "tool:result";
1097
+ /** Correlates with the issuing `ToolCallEvent.callId`. */
1098
+ callId: string;
1099
+ tool: string;
1100
+ ok: boolean;
1101
+ durationMs: number;
1102
+ /** Secret-redacted, length-capped preview of the result text. */
1103
+ preview: string;
1104
+ /** Present only when `ok` is false. */
1105
+ error?: {
1106
+ class: string;
1107
+ message: string;
1108
+ };
1109
+ }
832
1110
  /** Discriminated union of every JSONL event the scenario runner emits. */
833
- type RunArtifact = RunStartedEvent | StepStartedEvent | StepOkEvent | StepFailEvent | ScreenshotEvent | FailureBundleWrittenEvent | PausedEvent | ResumedEvent | LocatorPickedEvent | WheelChangedEvent | RunFinishedEvent;
1111
+ type RunArtifact = RunStartedEvent | StepStartedEvent | StepOkEvent | StepFailEvent | ScreenshotEvent | FailureBundleWrittenEvent | PausedEvent | ResumedEvent | LocatorPickedEvent | WheelChangedEvent | ProbeResultEvent | ToolCallEvent | ToolResultEvent | RunFinishedEvent;
834
1112
  interface CollectionRunStartedEvent extends RunArtifactBase {
835
1113
  kind: "collection-run:started";
836
1114
  runId: RunId;
@@ -974,8 +1252,16 @@ interface CollectionRunTab {
974
1252
  kind: "collection-run";
975
1253
  runId: RunId;
976
1254
  }
1255
+ /** Open imported snapshot — a teammate's run exported as a portable
1256
+ * `*.unotest.zip`. Functionally a (terminal) run rendered from a bundle, not
1257
+ * the live runner; keyed by its own `snapshotId` so it never collides with
1258
+ * the viewer's own `runId` space. The `SNAPSHOT` badge marks it as foreign. */
1259
+ interface SnapshotTab {
1260
+ kind: "snapshot";
1261
+ snapshotId: string;
1262
+ }
977
1263
  /** Discriminated union of every open-tab shape the frontend supports. */
978
- type TabKind = ScenarioTab | HelperTab | CollectionTab | ScenarioRunTab | CollectionRunTab;
1264
+ type TabKind = ScenarioTab | HelperTab | CollectionTab | ScenarioRunTab | CollectionRunTab | SnapshotTab;
979
1265
  /** All tab `kind` literals — useful for switch-completeness checks. */
980
1266
  type TabKindName = TabKind["kind"];
981
1267
 
@@ -1010,6 +1296,15 @@ interface EnvUpdate {
1010
1296
  }
1011
1297
 
1012
1298
  type RuntimeState = "starting" | "running" | "paused-step" | "paused-failure" | "paused-breakpoint" | "completed" | "failed" | "aborted";
1299
+ /** The terminal run states — a runtime in any of these has FINISHED and is no
1300
+ * longer live / attachable. */
1301
+ declare const TERMINAL_RUNTIME_STATES: readonly ["completed", "failed", "aborted"];
1302
+ /** True when `state` is terminal (completed / failed / aborted): the run ended.
1303
+ * The single source of truth — every consumer (attach discovery, list_runtimes,
1304
+ * current-location, terminal handling) calls this instead of re-spelling the
1305
+ * literal set. Accepts a plain string so both `RuntimeState` and the runner's
1306
+ * own exec-state union pass without coupling. */
1307
+ declare function isTerminalRuntimeState(state: string): boolean;
1013
1308
  interface RuntimeStateFile {
1014
1309
  runId: string;
1015
1310
  scenario: string;
@@ -1044,6 +1339,20 @@ interface RuntimeStateFile {
1044
1339
  * server / agent) attach to the SAME live browser the human is debugging.
1045
1340
  * Absent for non-shared (normal) runs. Localhost only. */
1046
1341
  wsEndpoint?: string;
1342
+ /** Active device slot of a mobile debug run (`--debug`) — the collaborative
1343
+ * attach handle for runners that drive a shared DEVICE instead of a browser
1344
+ * (the device's WDA is reachable by any client in the project). A second
1345
+ * client (the mobile MCP / agent) joins by targeting this slot + the run's
1346
+ * `commands.jsonl` wheel. Absent for non-debug runs and for browser runners
1347
+ * (which advertise `wsEndpoint` instead). */
1348
+ deviceSlot?: string;
1349
+ /** The run's ACTIVE breakpoints as `"line:col"` keys (0-based col) — the
1350
+ * union of `.debugger.json` for this scenario AND any ephemeral `--debug
1351
+ * --breakpoints` override the runner was started with. Published so the
1352
+ * viewer can paint glyph dots for breakpoints that aren't persisted in
1353
+ * `.debugger.json` (e.g. an agent's `run_test {breakpoints}` override).
1354
+ * Absent ⇒ none / not a debug run. */
1355
+ breakpoints?: string[];
1047
1356
  lastFailure: {
1048
1357
  line: number;
1049
1358
  col: number;
@@ -1057,4 +1366,4 @@ interface RuntimeStateFile {
1057
1366
  updatedAt: number;
1058
1367
  }
1059
1368
 
1060
- export { type AddVariablePlan, type AddVariablePlanInput, type AuthoringRunRequest, type BreakpointEntry, type BreakpointsFile, COLLECTIONS_SUBDIR, COLLECTION_NAME_FORBIDDEN_RE, COMMANDS_FILE, type CollectionMeta, type CollectionRunArtifact, type CollectionRunFinishedEvent, type CollectionRunRequest, type CollectionRunStartedEvent, type CollectionRunTab, type CollectionScenarioFinishedEvent, type CollectionScenarioStartedEvent, type CollectionTab, DEBUGGER_FILE, type DbgCommand, type DbgCommandAbort, type DbgCommandClearBp, type DbgCommandContinue, type DbgCommandKind, type DbgCommandPause, type DbgCommandPickerStart, type DbgCommandPickerStop, type DbgCommandRecord, type DbgCommandSetBp, type DbgCommandSnapshot, type DbgCommandStep, type DbgCommandWheel, 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 IDslLanguageService, type ILaunchedProcess, type IProcessLauncher, type IRunnerAdapter, LOCK_FILE, LOG_FILE, type LaunchSpec, type LocatorPickedEvent, type LockFile, type LogLineMessage, type Matcher, PICKER_SNAPSHOT_FILE, type PausedEvent, type PickerMode, RUNNER_CONFIG_KEYS, RUNS_SUBDIR, RUNTIME_FILE, RUN_MANIFEST_FILE, RUN_SOURCES_FILE, type RecordedActionKind, type RegexLiteral, type ResumedEvent, type RunArtifact, type RunFinishedEvent, type RunId, type RunKind, type RunManifest, type RunMeta, type RunOutcome, type RunRequest, type RunSources, type RunStartedEvent, type RunStatus, RunnerAdapterNotFoundError, RunnerNotConfiguredError, type RuntimeState, type RuntimeStateFile, SECRETS_FILE, SEGMENT_NAME_FORBIDDEN_RE, STDERR_FILE, STDOUT_FILE, STEPS_FILE, type ScenarioMeta, type ScenarioRunRequest, type ScenarioRunTab, type ScenarioTab, type ScenariosPayload, type ScreenshotEvent, type StepFailEvent, type StepOkEvent, type StepStartedEvent, 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, UNOTEST_DIR, UnsupportedRunKindError, type VariableCategory, type VariableKind, type VariablePlanError, type WheelChangedEvent, type WsMessage, type WsMessageKind, activeEnvName, categorizeVariable, deleteShadowWarning, envFileFor, envKeys, insertEnvVar, isExternalVarName, isRegexLiteral, isRunnerConfigKey, makeRunId, planAddVariable, regexLiteral, removeEnvVar, sanitizeRunIdSegment, secretsFileFor, serializeEnvValue, validateCollectionName, validateSegmentName };
1369
+ export { type AddVariablePlan, type AddVariablePlanInput, type AppPathPickerSpec, type AppServerEvent, type AuthoringRunRequest, 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, 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, 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_MANIFEST_FILE, RUN_SOURCES_FILE, type RecordedActionKind, type RegexLiteral, type ResumedEvent, type RunArtifact, type RunFinishedEvent, type RunId, type RunKind, type RunManifest, type RunMeta, type RunOutcome, type RunRequest, type RunSources, type RunStartedEvent, type RunStatus, RunnerAdapterNotFoundError, RunnerNotConfiguredError, type RuntimeState, type RuntimeStateFile, SECRETS_FILE, SEGMENT_NAME_FORBIDDEN_RE, SNAPSHOTS_SUBDIR, STDERR_FILE, STDOUT_FILE, STEPS_FILE, type ScenarioMeta, type ScenarioRunRequest, type ScenarioRunTab, type ScenarioTab, 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, UnsupportedRunKindError, type VariableCategory, type VariableKind, type VariablePlanError, type WheelChangedEvent, type WsMessage, type WsMessageKind, activeEnvName, categorizeVariable, debugDirFor, debuggerFileFor, deleteShadowWarning, envFileFor, envKeys, envLayerFilesFor, insertEnvVar, isExternalVarName, isRegexLiteral, isRunnerConfigKey, isTerminalRuntimeState, makeRunId, parseAppServerEvent, parseEnvContent, planAddVariable, regexLiteral, removeEnvVar, runsDirFor, sanitizeRunIdSegment, secretsFileFor, secretsLayerFilesFor, serializeEnvValue, testDirFor, validateCollectionName, validateSegmentName };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1f0e61=_0x33f9;(function(_0x38cb05,_0x1ead2a){const _0x13d8d8={_0x4a53ac:0x25d,_0x17e566:0x234,_0x10c109:0x24b,_0x39c227:0x20d,_0x385608:0x200,_0x232f49:0x201},_0x39243a=_0x33f9,_0xc8ec76=_0x38cb05();while(!![]){try{const _0x36e89c=parseInt(_0x39243a(_0x13d8d8._0x4a53ac))/0x1*(-parseInt(_0x39243a(_0x13d8d8._0x17e566))/0x2)+-parseInt(_0x39243a(_0x13d8d8._0x10c109))/0x3+parseInt(_0x39243a(_0x13d8d8._0x39c227))/0x4*(-parseInt(_0x39243a(0x252))/0x5)+parseInt(_0x39243a(_0x13d8d8._0x385608))/0x6+parseInt(_0x39243a(0x205))/0x7+parseInt(_0x39243a(0x224))/0x8+-parseInt(_0x39243a(0x207))/0x9*(-parseInt(_0x39243a(_0x13d8d8._0x232f49))/0xa);if(_0x36e89c===_0x1ead2a)break;else _0xc8ec76['push'](_0xc8ec76['shift']());}catch(_0x21d4af){_0xc8ec76['push'](_0xc8ec76['shift']());}}}(_0x51ae,0x69c7c));var __defProp=Object['defineProperty'],__name=(_0x55616a,_0x2ea849)=>__defProp(_0x55616a,_0x1f0e61(0x211),{'value':_0x2ea849,'configurable':!![]}),UNOTEST_DIR=_0x1f0e61(0x1ee),E2E_SUBDIR=_0x1f0e61(0x258),HELPERS_SUBDIR=_0x1f0e61(0x22c),COLLECTIONS_SUBDIR='_collections',RUNS_SUBDIR=_0x1f0e61(0x21b),LOCK_FILE=_0x1f0e61(0x259),LOG_FILE=_0x1f0e61(0x22e),STEPS_FILE=_0x1f0e61(0x21c),HEARTBEAT_FILE='heartbeat',STDOUT_FILE=_0x1f0e61(0x254),STDERR_FILE=_0x1f0e61(0x220),COMMANDS_FILE=_0x1f0e61(0x1ed),RUNTIME_FILE=_0x1f0e61(0x250),PICKER_SNAPSHOT_FILE=_0x1f0e61(0x1ff),DEBUGGER_FILE=_0x1f0e61(0x20f),ENV_FILE=_0x1f0e61(0x221),SECRETS_FILE='unotest/.secrets';function _0x51ae(){const _0x2131f0=['AxnfEhrLCM5HBfzHCK5HBwu','iIbKB2vZig5VDcbZDxbWB3j0ihj1BIbRAw5Kici','vu5pvevtvf9ftLy','vw5ZDxbWB3j0zwrsDw5lAw5KrxjYB3i','vu5pvevtvf9mt0nbteu','vu5pvevtvf9dt05tt0Xf','zw52s2v5CW','A2LUza','C2vJCMv0','y2fUBM90igXVywqGCNvUBMvYigfKyxb0zxiGiG','CgLJA2vYlxnUyxbZAg90lNr4Da','ndi5nZy0ngPpvwDxCG','ody5otbMse50DgS','CMvNzxHmAxrLCMfS','C291CMnL','C3bSAxrmAw5LCW','mJeWodyXn3rywgPuvG','vu5pvevtvf9erujvr19ive1mx01bwf9cwvrfuW','ntq5re9iueDY','uNvUBMvYqwrHChrLCK5VDezVDw5KrxjYB3i','BxvZDcbUB3qGC3rHCNqGD2L0AcaNlIC','Aw52ywXPzc1Uyw1L','refuqujbu0vFvvjm','vu5pvevtvf9erujvr19lruvqx0nbteXt','mZmWotK2s3bYvKn3','vu5pvevtvf9erujvrW','Dw5VDgvZDc8UzgvIDwDNzxiUANnVBG','Dg9mB3DLCKnHC2u','BMfTzq','igLZigfSC28GC2v0igLUihvUB3rLC3qVlMvUDIdIGjqGDgHLihnLy3jLDcb2ywX1zsbUB3CGC2HHzg93CYbPDc4','Dw5VDgvZDc8UC2vJCMv0CW','C3rYAw5N','CNvU','vu5pvevtvf9erujvr19esvi','vu5pvevtvf9dqunirv9esvi','CgfKu3rHCNq','BxvZDcbUB3qGy29UDgfPBIbCic8GoIaQid8GiIa8id4GFcbVCIbJB250CM9SignOyxjHy3rLCNm','AgfZ','lNj1BNm','C3rLChmUANnVBMW','zw5KC1DPDgG','BgvUz3rO','AxnszwDLEeXPDgvYywW','C3rKzxjYlMXVzW','Dw5VDgvZDc8Uzw52','Dw5RBM93BI1YDw5UzxiTA2v5','vu5pvevtvf9mt0DFtevwruW','otu1nZzmu1HisMy','vu5pvevtvf9orvrxt1jl','C3rHCNrZv2L0Aa','ywrK','B2jQzwn0','DhjPBq','igLZigfSC28GC2v0igLUihvUB3rLC3qVlNnLy3jLDhmG4OcuihrOzsbZzwnYzxqGDMfSDwuGC2HHzg93CYb0AgLZig9Uzs4','vu5pvevtvf9qt1bvuf9huKfdrv9nuW','x2HLBhbLCNm','zw52q29UDgvUDa','lNzPzxDLCI5SB2C','CMvWBgfJzq','iI4G','C2XPy2u','C2fUAxrPEMvsDw5jzfnLz21LBNq','CMvNzxG','mtrMAhPIDMu','zhvWBgLJyxrL','Dg9tDhjPBMC','Aw5KzxHpzG','yxbW','AxnbC3nPz25Tzw50t2y','Aw5Zzxj0rw52vMfY','C2vJCMv0C0zPBgvgB3i','AM9PBG','uNvUBMvYtM90q29UzMLNDxjLzevYCM9Y','C291CMnLCY5QC29U','y3j5ChrV','DgvZDa','vu5pvevtvf9eruzbvuXux1rjtuvpvvrFtvm','C2vJCMv0CW','ChvZAa','zMLUzeLUzgv4','zgvSzxrLu2HHzg93v2fYBMLUzW','igLZig5VDcbHigTUB3DUihj1BM5LCIbZzxr0Aw5NiokaLcbJAg9VC2uGB25LigzYB20GDgHLihj1BM5LCI1JB25MAwCGBgLZDc4','BxvZDcbUB3qGC3rHCNqGD2L0AcaNxYCGkhjLC2vYDMvKkq','Axntzwn0Aw9UrgL2AwrLCG','ig11C3qGyMuGvvbqrvjFu05bs0uGkguUzY4Gqvbqx0jbu0vFvvjmksbZBYbHihnJzw5HCMLVignHBIbYzwzLCMvUy2uGAxqGyNKGBMfTzs4','y2f0zwDVCML6zvzHCMLHyMXL','mZq2odK5B01ouhby','iokaLcbWAwnRigeGzgLMzMvYzw50ig5HBwuGB3iGzwrPDcb0AguGzxHPC3rPBMCGDMfSDwuU','C2vYAwfSAxPLrw52vMfSDwu','iYaTls0G','BxvZDcbUB3qGyMuGzw1WDhK','CNvUDgLTzs5QC29U','igfSCMvHzhKGzxHPC3rZigLUia','ndvArK55CfK','zw52','C3rKB3v0lMXVzW','CMvTB3zLrw52vMfY','CNvUBMvY','vu5pvevtvf9cuK9xu0vs','ztjL','lNzPzxDLCI5SB2nR','vu5pvevtvf9erujvr19quKvwsuvxx0jzvevt','zMLSDgvY','C2vJCMv0C0nVBNrLBNq','mZGWnJnfCgf1D2C','C3bSAxq','qxbW','y29TBwfUzhmUANnVBMW','Dw5VDgvZDa','CgXHBKfKzfzHCMLHyMXL','vu5pvevtvf9iruferuq','DMfSAwrHDgvtzwDTzw50tMfTzq','C3bSAwnL','BxvZDcbUB3qGyMuGiI4Iig9YiciUlIi','BwfUAwzLC3qUANnVBG'];_0x51ae=function(){return _0x2131f0;};return _0x51ae();}function envFileFor(_0xc63703){return _0xc63703?ENV_FILE+'.'+_0xc63703:ENV_FILE;}__name(envFileFor,'envFileFor');function secretsFileFor(_0x45ac5d){return _0x45ac5d?SECRETS_FILE+'.'+_0x45ac5d:SECRETS_FILE;}__name(secretsFileFor,_0x1f0e61(0x23b));function activeEnvName(_0x27e8e9){const _0x268161=_0x1f0e61,_0x250b3b=_0x27e8e9[_0x268161(0x1f7)]?.['trim']();return _0x250b3b?_0x250b3b:void 0x0;}function _0x33f9(_0x2e96f1,_0x5b0908){_0x2e96f1=_0x2e96f1-0x1ec;const _0x51aebd=_0x51ae();let _0x33f91d=_0x51aebd[_0x2e96f1];if(_0x33f9['mirZHF']===undefined){var _0x56bae3=function(_0x51aad6){const _0x11a841='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x55616a='',_0x2ea849='';for(let _0xc63703=0x0,_0x45ac5d,_0x27e8e9,_0x250b3b=0x0;_0x27e8e9=_0x51aad6['charAt'](_0x250b3b++);~_0x27e8e9&&(_0x45ac5d=_0xc63703%0x4?_0x45ac5d*0x40+_0x27e8e9:_0x27e8e9,_0xc63703++%0x4)?_0x55616a+=String['fromCharCode'](0xff&_0x45ac5d>>(-0x2*_0xc63703&0x6)):0x0){_0x27e8e9=_0x11a841['indexOf'](_0x27e8e9);}for(let _0x53a502=0x0,_0x2a672f=_0x55616a['length'];_0x53a502<_0x2a672f;_0x53a502++){_0x2ea849+='%'+('00'+_0x55616a['charCodeAt'](_0x53a502)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2ea849);};_0x33f9['KPQEhF']=_0x56bae3,_0x33f9['FSigyn']={},_0x33f9['mirZHF']=!![];}const _0x273467=_0x51aebd[0x0],_0x5a525f=_0x2e96f1+_0x273467,_0x551b20=_0x33f9['FSigyn'][_0x5a525f];return!_0x551b20?(_0x33f91d=_0x33f9['KPQEhF'](_0x33f91d),_0x33f9['FSigyn'][_0x5a525f]=_0x33f91d):_0x33f91d=_0x551b20,_0x33f91d;}__name(activeEnvName,'activeEnvName');function isRegexLiteral(_0x53a502){const _0x9e11bf={_0x359d3b:0x228},_0x3b88e3=_0x1f0e61;return typeof _0x53a502===_0x3b88e3(_0x9e11bf._0x359d3b)&&_0x53a502!==null&&_0x53a502[_0x3b88e3(0x1fc)]==='regex'&&typeof _0x53a502[_0x3b88e3(0x203)]===_0x3b88e3(0x214)&&typeof _0x53a502['flags']==='string';}__name(isRegexLiteral,_0x1f0e61(0x21f));function regexLiteral(_0x2a672f,_0x50f6e0=''){const _0x35d2d4={_0x3b5303:0x233},_0x741b72=_0x1f0e61;return{'kind':_0x741b72(_0x35d2d4._0x3b5303),'source':_0x2a672f,'flags':_0x50f6e0};}__name(regexLiteral,_0x1f0e61(0x202));var RAND_BYTES=0x3;function makeRunId(_0x36f805){const _0x947e41={_0x58b3cc:0x236,_0x562653:0x23f},_0x2ad894=_0x1f0e61,_0x3d2060=sanitizeRunIdSegment(_0x36f805),_0x5160e2=Date['now']()[_0x2ad894(_0x947e41._0x58b3cc)](0x24),_0x2b69d4=new Uint8Array(RAND_BYTES);globalThis[_0x2ad894(_0x947e41._0x562653)]['getRandomValues'](_0x2b69d4);let _0x57fdcc='';for(let _0x4083cc=0x0;_0x4083cc<_0x2b69d4[_0x2ad894(0x21e)];_0x4083cc++){_0x57fdcc+=_0x2b69d4[_0x4083cc][_0x2ad894(_0x947e41._0x58b3cc)](0x10)[_0x2ad894(0x218)](0x2,'0');}return _0x3d2060+'-'+_0x5160e2+'-'+_0x57fdcc;}__name(makeRunId,'makeRunId');function sanitizeRunIdSegment(_0xe3bd1d){const _0x467364={_0x24e5be:0x21e},_0x4a8dee=_0x1f0e61,_0xe79735=_0xe3bd1d[_0x4a8dee(0x22f)](/[^a-zA-Z0-9_-]+/g,'-')['replace'](/-+/g,'-')[_0x4a8dee(0x22f)](/^-|-$/g,'');return _0xe79735[_0x4a8dee(_0x467364._0x24e5be)]>0x0?_0xe79735:_0x4a8dee(0x215);}__name(sanitizeRunIdSegment,_0x1f0e61(0x232));var COLLECTION_NAME_FORBIDDEN_RE=/[\\/:*?"<>|\x00-\x1f]/;function validateCollectionName(_0xbc4dce){const _0x479df4={_0x5351f5:0x229,_0x39eee9:0x21e,_0x5ab7b3:0x24f,_0x45ef4f:0x226,_0x4e9515:0x240,_0x3887ad:0x219},_0x268c8b=_0x1f0e61;if(typeof _0xbc4dce!=='string')return'must\x20be\x20a\x20string';const _0x3550bc=_0xbc4dce[_0x268c8b(_0x479df4._0x5351f5)]();if(_0x3550bc[_0x268c8b(_0x479df4._0x39eee9)]===0x0)return _0x268c8b(_0x479df4._0x5ab7b3);if(_0x3550bc==='.'||_0x3550bc==='..')return _0x268c8b(0x1f3);if(_0x3550bc[_0x268c8b(_0x479df4._0x45ef4f)]('.'))return _0x268c8b(0x209);if(COLLECTION_NAME_FORBIDDEN_RE[_0x268c8b(_0x479df4._0x4e9515)](_0x3550bc))return _0x268c8b(_0x479df4._0x3887ad);return null;}__name(validateCollectionName,'validateCollectionName');var RUN_MANIFEST_FILE=_0x1f0e61(0x1f4),RUN_SOURCES_FILE=_0x1f0e61(0x23e),UnsupportedRunKindError=class extends Error{static{__name(this,_0x1f0e61(0x1f8));}constructor(_0x9ee938,_0x2b19b5){const _0x1bf2d3=_0x1f0e61;super('runner\x20\x22'+_0x2b19b5+_0x1bf2d3(0x1f6)+_0x9ee938+'\x22'),this['name']=_0x1bf2d3(0x1f8);}},RunnerAdapterNotFoundError=class extends Error{static{__name(this,_0x1f0e61(0x208));}constructor(_0xcb36ad,_0x5d07d3){const _0x2818de={_0x529a02:0x1fe,_0x2cbf13:0x208},_0x2ecb25=_0x1f0e61;super(_0x2ecb25(_0x2818de._0x529a02)+_0xcb36ad+_0x2ecb25(0x230)+_0x5d07d3),this['name']=_0x2ecb25(_0x2818de._0x2cbf13);}},RunnerNotConfiguredError=class extends Error{static{__name(this,'RunnerNotConfiguredError');}constructor(_0x4570c2){const _0x59a39c={_0x3825bb:0x211},_0x3da234=_0x1f0e61;super(_0x4570c2),this[_0x3da234(_0x59a39c._0x3825bb)]=_0x3da234(0x23d);}},SEGMENT_NAME_FORBIDDEN_RE=/[\\/:*?"<>|\x00-\x1f]/;function validateSegmentName(_0x5c3b0e){const _0x5a3c1e={_0xa8ba3e:0x24f,_0x12b4c2:0x1f3,_0x5b4a98:0x226,_0x2bb7db:0x247,_0x30c8cd:0x240},_0x45da77=_0x1f0e61;if(typeof _0x5c3b0e!=='string')return'must\x20be\x20a\x20string';const _0xa31cd7=_0x5c3b0e['trim']();if(_0xa31cd7[_0x45da77(0x21e)]===0x0)return _0x45da77(_0x5a3c1e._0xa8ba3e);if(_0xa31cd7==='.'||_0xa31cd7==='..')return _0x45da77(_0x5a3c1e._0x12b4c2);if(_0xa31cd7[_0x45da77(_0x5a3c1e._0x5b4a98)]('.'))return _0x45da77(0x209);if(_0xa31cd7[_0x45da77(_0x5a3c1e._0x5b4a98)]('_'))return _0x45da77(_0x5a3c1e._0x2bb7db);if(SEGMENT_NAME_FORBIDDEN_RE[_0x45da77(_0x5a3c1e._0x30c8cd)](_0xa31cd7))return'must\x20not\x20contain\x20\x5c\x20/\x20:\x20*\x20?\x20\x22\x20<\x20>\x20|\x20or\x20control\x20characters';return null;}__name(validateSegmentName,_0x1f0e61(0x1f1));var TERMINAL_WS_EVENT='terminal',RUNNER_CONFIG_KEYS=new Set([_0x1f0e61(0x257),_0x1f0e61(0x1f0),'UNOTEST_SLOW_MO',_0x1f0e61(0x241),'UNOTEST_DEFAULT_NAVIGATION_TIMEOUT_MS',_0x1f0e61(0x22b),_0x1f0e61(0x1f9),'UNOTEST_TIMEZONE',_0x1f0e61(0x223),_0x1f0e61(0x20e),_0x1f0e61(0x216),'UNOTEST_DEBUG_MAX_BYTES',_0x1f0e61(0x25a),_0x1f0e61(0x206),_0x1f0e61(0x20c),_0x1f0e61(0x225),_0x1f0e61(0x1fa),_0x1f0e61(0x217),'NO_COLOR','FORCE_COLOR',_0x1f0e61(0x20b)]);function isRunnerConfigKey(_0x38536f){const _0x3a6264=_0x1f0e61;return RUNNER_CONFIG_KEYS[_0x3a6264(0x21a)](_0x38536f);}__name(isRunnerConfigKey,'isRunnerConfigKey');function categorizeVariable(_0x2b874){const _0x4c935b={_0x168734:0x203,_0x350445:0x242,_0x55f45b:0x1fd},_0x368e97=_0x1f0e61;if(_0x2b874[_0x368e97(_0x4c935b._0x168734)]===_0x368e97(_0x4c935b._0x350445))return _0x368e97(_0x4c935b._0x55f45b);return isRunnerConfigKey(_0x2b874['name'])?_0x368e97(0x256):_0x368e97(0x238);}__name(categorizeVariable,_0x1f0e61(0x24a));function isExternalVarName(_0xac84a0){const _0x4cc968={_0x3bbd51:0x240},_0x5b803e=_0x1f0e61;return/^[A-Z][A-Z0-9_]*$/[_0x5b803e(_0x4cc968._0x3bbd51)](_0xac84a0);}__name(isExternalVarName,_0x1f0e61(0x1f5));function serializeEnvValue(_0x58f93f){const _0xa7ee4f={_0x1e58da:0x240,_0x1e72ab:0x22f},_0x479ca7=_0x1f0e61;if(_0x58f93f==='')return'';if(/[\s#"'=\\]|^[`]/['test'](_0x58f93f)||/[\n\r]/[_0x479ca7(_0xa7ee4f._0x1e58da)](_0x58f93f)){const _0x397997=_0x58f93f[_0x479ca7(_0xa7ee4f._0x1e72ab)](/\\/g,'\x5c\x5c')[_0x479ca7(0x22f)](/"/g,'\x5c\x22')[_0x479ca7(_0xa7ee4f._0x1e72ab)](/\n/g,'\x5cn')[_0x479ca7(_0xa7ee4f._0x1e72ab)](/\r/g,'\x5cr');return'\x22'+_0x397997+'\x22';}return _0x58f93f;}__name(serializeEnvValue,_0x1f0e61(0x24d));function envKeys(_0x534855){const _0x25e112={_0x37da95:0x25e,_0x4b476b:0x229,_0x51891e:0x240,_0x24be55:0x227},_0x56be10=_0x1f0e61,_0x23cfac=new Set();for(const _0x2ba23f of _0x534855[_0x56be10(_0x25e112._0x37da95)](/\r?\n/)){const _0x6e3c9=_0x2ba23f[_0x56be10(_0x25e112._0x4b476b)]();if(_0x6e3c9===''||_0x6e3c9[_0x56be10(0x226)]('#'))continue;const _0x111485=_0x6e3c9['indexOf']('=');if(_0x111485<=0x0)continue;const _0x36d4cc=_0x6e3c9['slice'](0x0,_0x111485)[_0x56be10(0x229)]();if(/^[A-Za-z_][A-Za-z0-9_]*$/[_0x56be10(_0x25e112._0x51891e)](_0x36d4cc))_0x23cfac[_0x56be10(_0x25e112._0x24be55)](_0x36d4cc);}return _0x23cfac;}__name(envKeys,_0x1f0e61(0x1fb));function isSectionDivider(_0x59aa3b){const _0x4c6a02={_0x41c6a4:0x226},_0x46402d=_0x1f0e61,_0x537627=_0x59aa3b[_0x46402d(0x229)]();return _0x537627[_0x46402d(_0x4c6a02._0x41c6a4)]('#')&&/---/[_0x46402d(0x240)](_0x537627);}__name(isSectionDivider,_0x1f0e61(0x248));function isAssignmentLine(_0x8ece7d){const _0x1a0f81={_0x1d0949:0x237,_0x527170:0x231},_0x2814aa=_0x1f0e61,_0x25dd6b=_0x8ece7d[_0x2814aa(0x229)]();if(_0x25dd6b===''||_0x25dd6b[_0x2814aa(0x226)]('#'))return![];const _0x318078=_0x25dd6b[_0x2814aa(_0x1a0f81._0x1d0949)]('=');return _0x318078>0x0&&/^[A-Za-z_][A-Za-z0-9_]*$/[_0x2814aa(0x240)](_0x25dd6b[_0x2814aa(_0x1a0f81._0x527170)](0x0,_0x318078)[_0x2814aa(0x229)]());}__name(isAssignmentLine,'isAssignmentLine');function isAssignmentOf(_0x2d8764,_0x3b91d7){const _0x1b74e2=_0x1f0e61,_0x24bfb6=_0x2d8764[_0x1b74e2(0x229)]();if(_0x24bfb6===''||_0x24bfb6[_0x1b74e2(0x226)]('#'))return![];const _0xa82690=_0x24bfb6['indexOf']('=');if(_0xa82690<=0x0)return![];return _0x24bfb6[_0x1b74e2(0x231)](0x0,_0xa82690)[_0x1b74e2(0x229)]()===_0x3b91d7;}__name(isAssignmentOf,_0x1f0e61(0x239));function splitLines(_0x20d72d){const _0x45a3eb={_0x2de1f2:0x21d,_0xe1cf45:0x231,_0x281fc2:0x25e},_0x5c4cb8=_0x1f0e61,_0x2c281a=_0x20d72d[_0x5c4cb8(_0x45a3eb._0x2de1f2)]('\x0a'),_0x3355ad=_0x2c281a?_0x20d72d[_0x5c4cb8(_0x45a3eb._0xe1cf45)](0x0,-0x1):_0x20d72d;return{'lines':_0x3355ad===''?[]:_0x3355ad[_0x5c4cb8(_0x45a3eb._0x281fc2)]('\x0a'),'trailingNewline':_0x2c281a};}__name(splitLines,_0x1f0e61(0x204));function joinLines(_0x50f552,_0x14d8b8){const _0x2117fc=_0x1f0e61,_0x93be1b=_0x50f552[_0x2117fc(0x23c)]('\x0a');return _0x14d8b8||_0x93be1b===''?_0x93be1b+'\x0a':_0x93be1b;}__name(joinLines,'joinLines');function insertEnvVar(_0x188c04,_0x3e47bc,_0x2940c5,_0xed420d){const _0x2b7248={_0xd59b30:0x210,_0x288b8b:0x229,_0x5eab7d:0x243},_0x4859a1=_0x1f0e61,_0x37c865=_0x3e47bc+'='+serializeEnvValue(_0x2940c5),{lines:_0x5d31ae,trailingNewline:_0x134cb9}=splitLines(_0x188c04);if(_0xed420d){const _0x4bf986=new RegExp('\x5cb'+_0xed420d[_0x4859a1(_0x2b7248._0xd59b30)]()+'\x5cb'),_0x374d59=_0x5d31ae[_0x4859a1(0x244)](_0x3bc857=>isSectionDivider(_0x3bc857)&&_0x4bf986[_0x4859a1(0x240)](_0x3bc857[_0x4859a1(0x210)]()));if(_0x374d59!==-0x1){let _0x5f0b95=_0x5d31ae['length'];for(let _0x1466cf=_0x374d59+0x1;_0x1466cf<_0x5d31ae[_0x4859a1(0x21e)];_0x1466cf++){if(isSectionDivider(_0x5d31ae[_0x1466cf])){_0x5f0b95=_0x1466cf;break;}}let _0x49654c=-0x1,_0x1879bb=-0x1;for(let _0x55e7d2=_0x374d59+0x1;_0x55e7d2<_0x5f0b95;_0x55e7d2++){if(_0x5d31ae[_0x55e7d2][_0x4859a1(_0x2b7248._0x288b8b)]()!=='')_0x1879bb=_0x55e7d2;if(isAssignmentLine(_0x5d31ae[_0x55e7d2]))_0x49654c=_0x55e7d2;}const _0x3333f6=_0x49654c>=0x0?_0x49654c:_0x1879bb,_0x322b38=_0x3333f6>=0x0?_0x3333f6+0x1:_0x374d59+0x1;return _0x5d31ae[_0x4859a1(0x1f2)](_0x322b38,0x0,_0x37c865),joinLines(_0x5d31ae,_0x134cb9||_0x5d31ae['length']>0x0);}if(_0x5d31ae['length']>0x0)_0x5d31ae['push']('');return _0x5d31ae[_0x4859a1(_0x2b7248._0x5eab7d)](_0x4859a1(0x24e)+_0xed420d+'\x20---',_0x37c865),joinLines(_0x5d31ae,!![]);}return _0x5d31ae[_0x4859a1(0x243)](_0x37c865),joinLines(_0x5d31ae,!![]);}__name(insertEnvVar,_0x1f0e61(0x23a));function removeEnvVar(_0x52edbb,_0x248430){const _0x2d1812={_0x2bc4bc:0x25b},_0x202974=_0x1f0e61,{lines:_0x206f2b,trailingNewline:_0x45a27c}=splitLines(_0x52edbb),_0x4f6dfe=_0x206f2b[_0x202974(_0x2d1812._0x2bc4bc)](_0x42693d=>!isAssignmentOf(_0x42693d,_0x248430)),_0x23c17d=_0x4f6dfe[_0x202974(0x21e)]!==_0x206f2b[_0x202974(0x21e)];return{'content':joinLines(_0x4f6dfe,_0x45a27c),'removed':_0x23c17d};}__name(removeEnvVar,_0x1f0e61(0x255));var SECTION_BY_KIND={'app':_0x1f0e61(0x1ec),'runner':'Runner','secret':void 0x0};function planAddVariable(_0x1699f1){const _0x39dd5f={_0x4ec17c:0x222,_0x3dee5e:0x25c,_0x5f393b:0x21a,_0x71ccda:0x1fd,_0x3bc962:0x242,_0x5bf886:0x213,_0x1c05ff:0x221,_0xa68ea5:0x235,_0x5da33b:0x251,_0x1f2001:0x24c},_0x1156a9=_0x1f0e61,{name:_0x10c3e7,kind:_0x4f2b4f}=_0x1699f1;if(_0x4f2b4f===_0x1156a9(0x256)){if(!isRunnerConfigKey(_0x10c3e7))return{'ok':![],'code':_0x1156a9(_0x39dd5f._0x4ec17c),'message':_0x10c3e7+_0x1156a9(0x246)};}else{if(!isExternalVarName(_0x10c3e7))return{'ok':![],'code':_0x1156a9(0x20a),'message':_0x10c3e7+_0x1156a9(0x249)};}const _0x3bc757=envKeys(_0x1699f1[_0x1156a9(0x22d)])['has'](_0x10c3e7),_0xcd7eb7=envKeys(_0x1699f1[_0x1156a9(_0x39dd5f._0x3dee5e)])[_0x1156a9(_0x39dd5f._0x5f393b)](_0x10c3e7),_0x58d91e=_0x4f2b4f===_0x1156a9(_0x39dd5f._0x71ccda)?_0x1156a9(_0x39dd5f._0x3bc962):_0x1156a9(0x253),_0x579a83=_0x58d91e==='secrets'?_0xcd7eb7:_0x3bc757,_0xf67b1e=_0x58d91e==='secrets'?_0x1156a9(_0x39dd5f._0x5bf886):_0x1156a9(_0x39dd5f._0x1c05ff);if(_0x579a83)return{'ok':![],'code':_0x1156a9(_0x39dd5f._0xa68ea5),'message':_0x10c3e7+_0x1156a9(_0x39dd5f._0x5da33b)+_0xf67b1e+_0x1156a9(_0x39dd5f._0x1f2001)};const _0x849263=[];return _0x4f2b4f===_0x1156a9(_0x39dd5f._0x71ccda)&&_0x3bc757&&_0x849263[_0x1156a9(0x243)](_0x10c3e7+_0x1156a9(0x212)),_0x4f2b4f!==_0x1156a9(0x1fd)&&_0xcd7eb7&&_0x849263['push'](_0x10c3e7+_0x1156a9(0x22a)),{'ok':!![],'target':_0x58d91e,'sectionLabel':SECTION_BY_KIND[_0x4f2b4f],'warnings':_0x849263};}__name(planAddVariable,_0x1f0e61(0x1ef));function deleteShadowWarning(_0xf8edb1,_0x4962ce,_0x4e53ce){if(_0x4e53ce!==void 0x0&&_0x4e53ce!==_0x4962ce)return[_0xf8edb1+'\x20is\x20also\x20set\x20in\x20your\x20shell\x20environment\x20—\x20it\x20will\x20keep\x20resolving\x20from\x20there\x20(the\x20environment\x20wins\x20over\x20the\x20file).'];return[];}__name(deleteShadowWarning,_0x1f0e61(0x245));export{COLLECTIONS_SUBDIR,COLLECTION_NAME_FORBIDDEN_RE,COMMANDS_FILE,DEBUGGER_FILE,E2E_SUBDIR,ENV_FILE,HEARTBEAT_FILE,HELPERS_SUBDIR,LOCK_FILE,LOG_FILE,PICKER_SNAPSHOT_FILE,RUNNER_CONFIG_KEYS,RUNS_SUBDIR,RUNTIME_FILE,RUN_MANIFEST_FILE,RUN_SOURCES_FILE,RunnerAdapterNotFoundError,RunnerNotConfiguredError,SECRETS_FILE,SEGMENT_NAME_FORBIDDEN_RE,STDERR_FILE,STDOUT_FILE,STEPS_FILE,TERMINAL_WS_EVENT,UNOTEST_DIR,UnsupportedRunKindError,activeEnvName,categorizeVariable,deleteShadowWarning,envFileFor,envKeys,insertEnvVar,isExternalVarName,isRegexLiteral,isRunnerConfigKey,makeRunId,planAddVariable,regexLiteral,removeEnvVar,sanitizeRunIdSegment,secretsFileFor,serializeEnvValue,validateCollectionName,validateSegmentName};
1
+ const _0x3af863=_0x3001;(function(_0x292c0f,_0x1cb400){const _0x3f0318={_0x1a15e1:0x114,_0x55f148:0x15f,_0xc55da1:0xeb,_0x20d246:0xf4},_0x5aab49=_0x3001,_0x34759c=_0x292c0f();while(!![]){try{const _0xee06d1=parseInt(_0x5aab49(0x112))/0x1*(parseInt(_0x5aab49(0x12b))/0x2)+-parseInt(_0x5aab49(_0x3f0318._0x1a15e1))/0x3+parseInt(_0x5aab49(_0x3f0318._0x55f148))/0x4+-parseInt(_0x5aab49(0x116))/0x5+parseInt(_0x5aab49(0x13c))/0x6*(parseInt(_0x5aab49(_0x3f0318._0xc55da1))/0x7)+parseInt(_0x5aab49(_0x3f0318._0x20d246))/0x8*(-parseInt(_0x5aab49(0xf7))/0x9)+parseInt(_0x5aab49(0x147))/0xa;if(_0xee06d1===_0x1cb400)break;else _0x34759c['push'](_0x34759c['shift']());}catch(_0x3d0c6d){_0x34759c['push'](_0x34759c['shift']());}}}(_0xabb2,0xc17ca));var __defProp=Object[_0x3af863(0x12d)],__name=(_0x2c4d73,_0x5af5cf)=>__defProp(_0x2c4d73,_0x3af863(0x103),{'value':_0x5af5cf,'configurable':!![]});function parseAppServerEvent(_0x4fefd4){const _0x24da1e={_0x3b852c:0xfe},_0x25bb0f=_0x3af863,_0x64da04=_0x4fefd4[_0x25bb0f(0x10d)]();if(!_0x64da04[_0x25bb0f(_0x24da1e._0x3b852c)]('{'))return null;try{const _0x38a665=JSON[_0x25bb0f(0x10c)](_0x64da04);if(_0x38a665['kind']===_0x25bb0f(0x106)||_0x38a665[_0x25bb0f(0x14a)]==='app-server:reused'||_0x38a665['kind']===_0x25bb0f(0x151))return _0x38a665;return null;}catch{return null;}}__name(parseAppServerEvent,'parseAppServerEvent');function _0xabb2(){const _0x580d4d=['qxbW','nde4oda3oeDczvHOyG','vu5pvevtvf9dt05tt0Xf','zw52','zgvIDwDeAxjgB3i','C3rKB3v0lMXVzW','CMvTB3zLrw52vMfY','C3rKzxjYlMXVzW','C3rHCNrZv2L0Aa','C2vJCMv0C0XHEwvYrMLSzxngB3i','Dg9tDhjPBMC','C2vJCMv0CW','C3rLChmUANnVBMW','BMfTzq','ywjVCNrLza','DMfSAwrHDgvdB2XSzwn0Aw9UtMfTzq','yxbWlxnLCNzLCJPYzwfKEq','AxnszwDLEeXPDgvYywW','ztjL','C291CMnLCY5QC29U','x2HLBhbLCNm','zMLUzeLUzgv4','CgfYC2u','DhjPBq','zw52tgf5zxjgAwXLC0zVCG','lNzPzxDLCI5SB2C','y29TBwfUzhmUANnVBMW','CgLJA2vYlxnUyxbZAg90lNr4Da','mta3ody2nK1nt3Dtsa','lMPZB24','mJG0mda4og1yveDkwq','lNj1BNm','nJiZote1mgrODezita','BxvZDcbIzsbHihn0CMLUzW','uNvUBMvYtM90q29UzMLNDxjLzevYCM9Y','zw52rMLSzuzVCG','Aw52ywXPzc1Uyw1L','BwfRzvj1BKLK','vu5pvevtvf9eruzbvuXux1rjtuvpvvrFtvm','vu5pvevtvf9erujvr19esvi','BxvZDcbUB3qGy29UDgfPBIbCic8GoIaQid8GiIa8id4GFcbVCIbJB250CM9SignOyxjHy3rLCNm','Dw5VDgvZDc8UC2vJCMv0CW','CMvNzxHmAxrLCMfS','y2fUBM90igXVywqGCNvUBMvYigfKyxb0zxiGiG','y2f0zwDVCML6zvzHCMLHyMXL','vu5pvevtvf9cuK9xu0vs','vu5pvevtvf9mt0DFtevwruW','refuqujbu0vFvvjm','AM9PBKXPBMvZ','vu5pvevtvf9erujvrW','ig11C3qGyMuGvvbqrvjFu05bs0uGkguUzY4Gqvbqx0jbu0vFvvjmksbZBYbHihnJzw5HCMLVignHBIbYzwzLCMvUy2uGAxqGyNKGBMfTzs4','ic0Tlq','vu5pvevtvf9erujvr19nqvHFqLLurvm','mNLmzgfxuG','ywrK','zgvMAw5LuhjVCgvYDhK','Aw5KzxHpzG','rK9sq0vFq09mt1i','Dg9mB3DLCKnHC2u','C3bSAwnL','igfSCMvHzhKGzxHPC3rZigLUia','C2XPy2u','CgXHBKfKzfzHCMLHyMXL','C291CMnL','Dw5VDgvZDa','zw52s2v5CW','DMfSAwrHDgvtzwDTzw50tMfTzq','BxvZDcbUB3qGyMuGiI4Iig9YiciUlIi','vu5pvevtvf9erujvr19lruvqx0nbteXt','vu5pvevtvf9erujvr19quKvwsuvxx0jzvevt','mZyWAuDlDfjZ','vu5pvevtvf9erujvr19ive1mx01bwf9cwvrfuW','ChvZAa','Aw5JBhvKzxm','CgfKu3rHCNq','DgvZDa','zw52q29UDgvUDa','C2vJCMv0','zMXHz3m','vu5pvevtvf9iruferuq','Dw5VDgvZDc8Uzw52','mty0odC1ndbdv1fLvge','C3bSAxrmAw5LCW','AxnfEhrLCM5HBfzHCK5HBwu','A2LUza','BM93','CMvWBgfJzq','zhvWBgLJyxrL','C3bSAxq','BxvZDcbUB3qGC3rHCNqGD2L0AcaNxYCGkhjLC2vYDMvKkq','CgfYC2vfBNzdB250zw50','yxbWlxnLCNzLCJPLCNjVCG','vu5pvevtvf9mt0nbteu','x2nVBgXLy3rPB25Z','C3rYAw5N','vu5pvevtvf9orvrxt1jl','Aw5Zzxj0rw52vMfY','AgfZ','CMvZzxj2zwrvBMrLCNnJB3jL','C2vYAwfSAxPLrw52vMfSDwu','AxnsDw5UzxjdB25MAwDlzxK','BwfUAwzLC3qUANnVBG','BxvZDcbUB3qGC3rHCNqGD2L0AcaNlIC','AxnbC3nPz25Tzw50tgLUzq','CNvUDgLTzs5QC29U','mtKZnJKYoePuuLnjuG','AxnuzxjTAw5HBfj1BNrPBwvtDgf0zq','lY5Kzwj1z2DLCG','vw5ZDxbWB3j0zwrsDw5lAw5KrxjYB3i','BgvUz3rO','zw5KC1DPDgG','CNvUBMvY','igLZigfSC28GC2v0igLUihLVDxiGC2HLBgWGzw52AxjVBM1LBNqG4OcuigL0ihDPBgWGA2vLCcbYzxnVBhzPBMCGzNjVBsb0AgvYzsaODgHLigvUDMLYB25Tzw50ihDPBNmGB3zLCIb0AguGzMLSzsKU','y29TCgXLDgvK','lMrLyNvN','vu5pvevtvf9qt1bvuf9huKfdrv9nuW','ywn0AxzLrw52tMfTzq','DMfSAwrHDgvgC1nHzMvoyw1L','Axntzwn0Aw9UrgL2AwrLCG','Dw5RBM93BI1YDw5UzxiTA2v5','vu5pvevtvf9ftLy','iIbKB2vZig5VDcbZDxbWB3j0ihj1BIbRAw5Kici','odiZnZzNwwrcAge','tK9Fq09mt1i','yxnZAwDUBwvUDevUDhjPzxm','zMLSDgvY','CMvNzxG','CNvUBMvYici','igLZigfSC28GC2v0igLUihvUB3rLC3qVlNnLy3jLDhmG4OcuihrOzsbZzwnYzxqGDMfSDwuGC2HHzg93CYb0AgLZig9Uzs4','AxnbC3nPz25Tzw50t2y','zgvIDwDNzxjgAwXLrM9Y','mtzQBNn4vvq','zMfPBgvK'];_0xabb2=function(){return _0x580d4d;};return _0xabb2();}var UNOTEST_DIR=_0x3af863(0x136),E2E_SUBDIR=_0x3af863(0x108),HELPERS_SUBDIR=_0x3af863(0x10a),COLLECTIONS_SUBDIR=_0x3af863(0x153),RUNS_SUBDIR=_0x3af863(0x115),SNAPSHOTS_SUBDIR='.snapshots';function testDirFor(_0x4d26ba){return''+E2E_SUBDIR+_0x4d26ba;}__name(testDirFor,'testDirFor');function runsDirFor(_0x2ac07f){return''+RUNS_SUBDIR+_0x2ac07f;}__name(runsDirFor,'runsDirFor');function debugDirFor(_0x44e744){const _0x3020e9={_0x110531:0xe3},_0x6c4398=_0x3af863;return _0x6c4398(_0x3020e9._0x110531)+_0x44e744;}__name(debugDirFor,_0x3af863(0xfa));function debuggerFileFor(_0x4ecb5e){const _0x2a110d={_0x42f0c0:0x161},_0x29375f=_0x3af863;return UNOTEST_DIR+_0x29375f(_0x2a110d._0x42f0c0)+_0x4ecb5e+_0x29375f(0x113);}__name(debuggerFileFor,_0x3af863(0xf3));var LOCK_FILE='.viewer.lock',LOG_FILE=_0x3af863(0x10f),STEPS_FILE=_0x3af863(0x102),HEARTBEAT_FILE='heartbeat',STDOUT_FILE=_0x3af863(0xfb),STDERR_FILE=_0x3af863(0xfd),COMMANDS_FILE=_0x3af863(0x110),RUNTIME_FILE=_0x3af863(0x15e),PICKER_SNAPSHOT_FILE=_0x3af863(0x111),ENV_FILE=_0x3af863(0x146),SECRETS_FILE='unotest/.secrets';function envFileFor(_0x27c935,_0x1741bc){return''+ENV_FILE+_0x27c935+(_0x1741bc?'.'+_0x1741bc:'');}function _0x3001(_0x13b6df,_0x243c07){_0x13b6df=_0x13b6df-0xe2;const _0xabb211=_0xabb2();let _0x3001bb=_0xabb211[_0x13b6df];if(_0x3001['CzUEeS']===undefined){var _0x24748c=function(_0x37454a){const _0x430c98='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2c4d73='',_0x5af5cf='';for(let _0x4fefd4=0x0,_0x64da04,_0x38a665,_0x4d26ba=0x0;_0x38a665=_0x37454a['charAt'](_0x4d26ba++);~_0x38a665&&(_0x64da04=_0x4fefd4%0x4?_0x64da04*0x40+_0x38a665:_0x38a665,_0x4fefd4++%0x4)?_0x2c4d73+=String['fromCharCode'](0xff&_0x64da04>>(-0x2*_0x4fefd4&0x6)):0x0){_0x38a665=_0x430c98['indexOf'](_0x38a665);}for(let _0x2ac07f=0x0,_0x44e744=_0x2c4d73['length'];_0x2ac07f<_0x44e744;_0x2ac07f++){_0x5af5cf+='%'+('00'+_0x2c4d73['charCodeAt'](_0x2ac07f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5af5cf);};_0x3001['CmqAQY']=_0x24748c,_0x3001['lHTyFU']={},_0x3001['CzUEeS']=!![];}const _0x29ca53=_0xabb211[0x0],_0x17469a=_0x13b6df+_0x29ca53,_0x466431=_0x3001['lHTyFU'][_0x17469a];return!_0x466431?(_0x3001bb=_0x3001['CmqAQY'](_0x3001bb),_0x3001['lHTyFU'][_0x17469a]=_0x3001bb):_0x3001bb=_0x466431,_0x3001bb;}__name(envFileFor,_0x3af863(0x119));function secretsFileFor(_0x36d758,_0x9eb2f8){return''+SECRETS_FILE+_0x36d758+(_0x9eb2f8?'.'+_0x9eb2f8:'');}__name(secretsFileFor,'secretsFileFor');function envLayerFilesFor(_0x2250b7,_0x13c50a){return layersFor(ENV_FILE,_0x2250b7,_0x13c50a);}__name(envLayerFilesFor,_0x3af863(0x10e));function secretsLayerFilesFor(_0x1a17b5,_0x3b488c){return layersFor(SECRETS_FILE,_0x1a17b5,_0x3b488c);}__name(secretsLayerFilesFor,_0x3af863(0xff));function layersFor(_0x3b2663,_0x5e81a9,_0x397f33){const _0x2db625={_0x5af82c:0x13e,_0x3d32ed:0x13e},_0x242d68=_0x3af863,_0x1ae05e=[_0x3b2663];if(_0x5e81a9)_0x1ae05e[_0x242d68(_0x2db625._0x5af82c)](''+_0x3b2663+_0x5e81a9);if(_0x397f33){_0x1ae05e[_0x242d68(_0x2db625._0x5af82c)](_0x3b2663+'.'+_0x397f33);if(_0x5e81a9)_0x1ae05e[_0x242d68(_0x2db625._0x3d32ed)](''+_0x3b2663+_0x5e81a9+'.'+_0x397f33);}return _0x1ae05e;}__name(layersFor,'layersFor');function activeEnvName(_0x172638){const _0x51d8d6=_0x3af863,_0x980f8c=_0x172638[_0x51d8d6(0xe9)]?.[_0x51d8d6(0x10d)]();return _0x980f8c?_0x980f8c:void 0x0;}__name(activeEnvName,_0x3af863(0xe5));function isRegexLiteral(_0x1f82ed){const _0x37d5c4={_0x3fe3f7:0x144},_0x88c922=_0x3af863;return typeof _0x1f82ed==='object'&&_0x1f82ed!==null&&_0x1f82ed[_0x88c922(0x14a)]===_0x88c922(0xef)&&typeof _0x1f82ed['source']==='string'&&typeof _0x1f82ed[_0x88c922(_0x37d5c4._0x3fe3f7)]===_0x88c922(0x154);}__name(isRegexLiteral,_0x3af863(0x107));function regexLiteral(_0x55afca,_0xc973fc=''){const _0x391974={_0x21dcdb:0xef},_0x227a3b=_0x3af863;return{'kind':_0x227a3b(_0x391974._0x21dcdb),'source':_0x55afca,'flags':_0xc973fc};}__name(regexLiteral,_0x3af863(0x120));var RAND_BYTES=0x3;function makeRunId(_0x7701cd){const _0x14824b={_0x31b74d:0x14b},_0x35e4a6=_0x3af863,_0x4be992=sanitizeRunIdSegment(_0x7701cd),_0xcbb46f=Date[_0x35e4a6(_0x14824b._0x31b74d)]()[_0x35e4a6(0x100)](0x24),_0x4edba0=new Uint8Array(RAND_BYTES);globalThis['crypto']['getRandomValues'](_0x4edba0);let _0x30e854='';for(let _0xc9b405=0x0;_0xc9b405<_0x4edba0[_0x35e4a6(0x163)];_0xc9b405++){_0x30e854+=_0x4edba0[_0xc9b405]['toString'](0x10)[_0x35e4a6(0x140)](0x2,'0');}return _0x4be992+'-'+_0xcbb46f+'-'+_0x30e854;}__name(makeRunId,_0x3af863(0x11b));function sanitizeRunIdSegment(_0x276ce5){const _0x27600d={_0x20bf6a:0x14c,_0x4a7a8b:0x163},_0x353692=_0x3af863,_0x272c16=_0x276ce5[_0x353692(_0x27600d._0x20bf6a)](/[^a-zA-Z0-9_-]+/g,'-')[_0x353692(0x14c)](/-+/g,'-')['replace'](/^-|-$/g,'');return _0x272c16[_0x353692(_0x27600d._0x4a7a8b)]>0x0?_0x272c16:'run';}__name(sanitizeRunIdSegment,'sanitizeRunIdSegment');var FS_UNSAFE_NAME_RE=/[\\/:*?"<>|\x00-\x1f]/;function validateFsSafeName(_0x3aad8a,_0x277e72){const _0x3fce5a={_0x34cc92:0x154,_0xf883ed:0x117,_0x203054:0x10d,_0x3241e2:0x163,_0x209483:0xfe,_0x4290b3:0x14f,_0x4b4b67:0x11e},_0x478dbf=_0x3af863;if(typeof _0x3aad8a!==_0x478dbf(_0x3fce5a._0x34cc92))return _0x478dbf(_0x3fce5a._0xf883ed);const _0x55d298=_0x3aad8a[_0x478dbf(_0x3fce5a._0x203054)]();if(_0x55d298[_0x478dbf(_0x3fce5a._0x3241e2)]===0x0)return'must\x20not\x20be\x20empty';if(_0x55d298==='.'||_0x55d298==='..')return _0x478dbf(0x139);if(_0x55d298[_0x478dbf(0xfe)]('.'))return _0x478dbf(0x15c);if(_0x277e72?.[_0x478dbf(0x158)]&&_0x55d298[_0x478dbf(_0x3fce5a._0x209483)]('_'))return _0x478dbf(_0x3fce5a._0x4290b3);if(FS_UNSAFE_NAME_RE[_0x478dbf(0x141)](_0x55d298))return _0x478dbf(_0x3fce5a._0x4b4b67);return null;}__name(validateFsSafeName,_0x3af863(0xe6));var COLLECTION_NAME_FORBIDDEN_RE=FS_UNSAFE_NAME_RE;function validateCollectionName(_0x581992){return validateFsSafeName(_0x581992);}__name(validateCollectionName,_0x3af863(0x105));var RUN_MANIFEST_FILE=_0x3af863(0x15b),RUN_SOURCES_FILE=_0x3af863(0x109),UnsupportedRunKindError=class extends Error{static{__name(this,'UnsupportedRunKindError');}constructor(_0x35456e,_0x2e04b0){const _0x4a534e={_0x57ab1e:0x162},_0x38ac22=_0x3af863;super(_0x38ac22(0xf0)+_0x2e04b0+_0x38ac22(0xea)+_0x35456e+'\x22'),this['name']=_0x38ac22(_0x4a534e._0x57ab1e);}},RunnerAdapterNotFoundError=class extends Error{static{__name(this,'RunnerAdapterNotFoundError');}constructor(_0x2485a6,_0x1904f6){const _0x499b90={_0x244775:0x121},_0x36f05f=_0x3af863;super(_0x36f05f(_0x499b90._0x244775)+_0x2485a6+'\x22.\x20'+_0x1904f6),this['name']='RunnerAdapterNotFoundError';}},RunnerNotConfiguredError=class extends Error{static{__name(this,_0x3af863(0x118));}constructor(_0x41836b){const _0x2bf1c2={_0x2ee599:0x103},_0x4567e7=_0x3af863;super(_0x41836b),this[_0x4567e7(_0x2bf1c2._0x2ee599)]=_0x4567e7(0x118);}},SEGMENT_NAME_FORBIDDEN_RE=FS_UNSAFE_NAME_RE;function validateSegmentName(_0x1d6eb8){return validateFsSafeName(_0x1d6eb8,{'reservedUnderscore':!![]});}__name(validateSegmentName,_0x3af863(0x138));var TERMINAL_WS_EVENT='terminal',RUNNER_CONFIG_KEYS=new Set([_0x3af863(0x123),_0x3af863(0x145),'UNOTEST_SLOW_MO',_0x3af863(0x11c),'UNOTEST_DEFAULT_NAVIGATION_TIMEOUT_MS',_0x3af863(0xe4),_0x3af863(0x152),'UNOTEST_TIMEZONE',_0x3af863(0x124),_0x3af863(0x127),_0x3af863(0x11d),_0x3af863(0x12a),_0x3af863(0x13b),_0x3af863(0x13d),_0x3af863(0x13a),_0x3af863(0x155),_0x3af863(0xf8),'UNOTEST_CACHE_DIR',_0x3af863(0xec),_0x3af863(0x12f),_0x3af863(0x125)]);function isRunnerConfigKey(_0x31ff90){const _0x18a9bf=_0x3af863;return RUNNER_CONFIG_KEYS[_0x18a9bf(0x157)](_0x31ff90);}__name(isRunnerConfigKey,_0x3af863(0x15a));function categorizeVariable(_0x9d1ef8){const _0x108d3d={_0x5e2a2f:0x135,_0x5f544b:0x101,_0x18d8d9:0x165},_0x34c7a3=_0x3af863;if(_0x9d1ef8[_0x34c7a3(_0x108d3d._0x5e2a2f)]===_0x34c7a3(_0x108d3d._0x5f544b))return _0x34c7a3(0x143);return isRunnerConfigKey(_0x9d1ef8['name'])?_0x34c7a3(_0x108d3d._0x18d8d9):'app';}__name(categorizeVariable,_0x3af863(0x122));function isExternalVarName(_0x4ba162){return/^[A-Z][A-Z0-9_]*$/['test'](_0x4ba162);}__name(isExternalVarName,_0x3af863(0x149));var ENV_KEY_RE=/^[A-Za-z_][A-Za-z0-9_]*$/;function*assignmentEntries(_0x305042){const _0x5cd4cd={_0x11cd8d:0x14e,_0x857492:0x10d,_0x2373a0:0x12e,_0xc79da8:0x133,_0x1b5281:0x10d},_0x25e555=_0x3af863;for(const _0x2e7218 of _0x305042[_0x25e555(_0x5cd4cd._0x11cd8d)](/\r?\n/)){const _0x2ad880=_0x2e7218[_0x25e555(_0x5cd4cd._0x857492)]();if(_0x2ad880===''||_0x2ad880['startsWith']('#'))continue;const _0x2b9d3b=_0x2ad880[_0x25e555(_0x5cd4cd._0x2373a0)]('=');if(_0x2b9d3b<=0x0)continue;const _0x39cc4e=_0x2ad880[_0x25e555(_0x5cd4cd._0xc79da8)](0x0,_0x2b9d3b)[_0x25e555(0x10d)]();if(!ENV_KEY_RE['test'](_0x39cc4e))continue;yield[_0x39cc4e,_0x2ad880[_0x25e555(0x133)](_0x2b9d3b+0x1)[_0x25e555(_0x5cd4cd._0x1b5281)]()];}}__name(assignmentEntries,_0x3af863(0xed));function parseEnvContent(_0x1953f0){const _0x2cc9ab={_0x57a554:0x163,_0x5a360a:0x133},_0x179b07=_0x3af863,_0xd02196={};for(const [_0x361bf0,_0x1035fb]of assignmentEntries(_0x1953f0)){let _0x19480e=_0x1035fb;if(_0x19480e[_0x179b07(_0x2cc9ab._0x57a554)]>=0x2){const _0x3bb840=_0x19480e[0x0],_0x180ba8=_0x19480e[_0x19480e['length']-0x1];(_0x3bb840==='\x22'||_0x3bb840==='\x27')&&_0x3bb840===_0x180ba8&&(_0x19480e=_0x19480e[_0x179b07(_0x2cc9ab._0x5a360a)](0x1,-0x1));}_0xd02196[_0x361bf0]=_0x19480e;}return _0xd02196;}__name(parseEnvContent,_0x3af863(0x150));function serializeEnvValue(_0x49261d){const _0x40a8de={_0x2fc71f:0x141,_0x480b77:0x14c},_0x566c11=_0x3af863;if(_0x49261d==='')return'';if(/[\s#"'=\\]|^[`]/[_0x566c11(_0x40a8de._0x2fc71f)](_0x49261d)||/[\n\r]/[_0x566c11(_0x40a8de._0x2fc71f)](_0x49261d)){const _0x3b13fa=_0x49261d[_0x566c11(0x14c)](/\\/g,'\x5c\x5c')['replace'](/"/g,'\x5c\x22')[_0x566c11(0x14c)](/\n/g,'\x5cn')[_0x566c11(_0x40a8de._0x480b77)](/\r/g,'\x5cr');return'\x22'+_0x3b13fa+'\x22';}return _0x49261d;}__name(serializeEnvValue,_0x3af863(0x159));function envKeys(_0x7592e2){const _0xec33c5={_0x3000c4:0x12c},_0x5756a2=_0x3af863,_0x102d9b=new Set();for(const [_0x255e6c]of assignmentEntries(_0x7592e2))_0x102d9b[_0x5756a2(_0xec33c5._0x3000c4)](_0x255e6c);return _0x102d9b;}__name(envKeys,_0x3af863(0x137));function isSectionDivider(_0x1ece30){const _0x30e501={_0x5b2c10:0x141},_0xfa7e13=_0x3af863,_0xb63b3c=_0x1ece30['trim']();return _0xb63b3c['startsWith']('#')&&/---/[_0xfa7e13(_0x30e501._0x5b2c10)](_0xb63b3c);}__name(isSectionDivider,_0x3af863(0xe7));function isAssignmentLine(_0x42f45b){const _0x3494c5={_0x54fa5f:0x10d},_0x47e9db=_0x3af863,_0x783a7=_0x42f45b[_0x47e9db(0x10d)]();if(_0x783a7===''||_0x783a7[_0x47e9db(0xfe)]('#'))return![];const _0x3ec538=_0x783a7[_0x47e9db(0x12e)]('=');return _0x3ec538>0x0&&ENV_KEY_RE[_0x47e9db(0x141)](_0x783a7[_0x47e9db(0x133)](0x0,_0x3ec538)[_0x47e9db(_0x3494c5._0x54fa5f)]());}__name(isAssignmentLine,_0x3af863(0x15d));function isAssignmentOf(_0x13573,_0x2e2e12){const _0x3b0e3d={_0x4575df:0x10d},_0x3e529c=_0x3af863,_0x4ff7fa=_0x13573['trim']();if(_0x4ff7fa===''||_0x4ff7fa[_0x3e529c(0xfe)]('#'))return![];const _0x2be79a=_0x4ff7fa[_0x3e529c(0x12e)]('=');if(_0x2be79a<=0x0)return![];return _0x4ff7fa['slice'](0x0,_0x2be79a)[_0x3e529c(_0x3b0e3d._0x4575df)]()===_0x2e2e12;}__name(isAssignmentOf,_0x3af863(0xf2));function splitLines(_0x4ea897){const _0x4d7f7d={_0x3ad332:0x164},_0x18e2fc=_0x3af863,_0x279d9=_0x4ea897[_0x18e2fc(_0x4d7f7d._0x3ad332)]('\x0a'),_0x4d557f=_0x279d9?_0x4ea897['slice'](0x0,-0x1):_0x4ea897;return{'lines':_0x4d557f===''?[]:_0x4d557f['split']('\x0a'),'trailingNewline':_0x279d9};}__name(splitLines,_0x3af863(0x148));function joinLines(_0x48d273,_0x2c51ec){const _0x1baf2e=_0x48d273['join']('\x0a');return _0x2c51ec||_0x1baf2e===''?_0x1baf2e+'\x0a':_0x1baf2e;}__name(joinLines,_0x3af863(0x126));function insertEnvVar(_0x2ce0d7,_0x1305da,_0x1d4a84,_0x592885){const _0x5404a1={_0x1a310f:0x10b,_0x388478:0x163,_0xf1d692:0x13e,_0x4d5dab:0x129},_0x4159ad=_0x3af863,_0x4e75f8=_0x1305da+'='+serializeEnvValue(_0x1d4a84),{lines:_0x53d799,trailingNewline:_0x44d980}=splitLines(_0x2ce0d7);if(_0x592885){const _0x21f75e=new RegExp('\x5cb'+_0x592885['toLowerCase']()+'\x5cb'),_0x101836=_0x53d799[_0x4159ad(_0x5404a1._0x1a310f)](_0x485c72=>isSectionDivider(_0x485c72)&&_0x21f75e['test'](_0x485c72[_0x4159ad(0x130)]()));if(_0x101836!==-0x1){let _0x175bc2=_0x53d799['length'];for(let _0x5b060e=_0x101836+0x1;_0x5b060e<_0x53d799[_0x4159ad(_0x5404a1._0x388478)];_0x5b060e++){if(isSectionDivider(_0x53d799[_0x5b060e])){_0x175bc2=_0x5b060e;break;}}let _0x2c54c0=-0x1,_0x143a0b=-0x1;for(let _0x19e9bb=_0x101836+0x1;_0x19e9bb<_0x175bc2;_0x19e9bb++){if(_0x53d799[_0x19e9bb]['trim']()!=='')_0x143a0b=_0x19e9bb;if(isAssignmentLine(_0x53d799[_0x19e9bb]))_0x2c54c0=_0x19e9bb;}const _0x46726a=_0x2c54c0>=0x0?_0x2c54c0:_0x143a0b,_0x2beb12=_0x46726a>=0x0?_0x46726a+0x1:_0x101836+0x1;return _0x53d799[_0x4159ad(0x131)](_0x2beb12,0x0,_0x4e75f8),joinLines(_0x53d799,_0x44d980||_0x53d799[_0x4159ad(0x163)]>0x0);}if(_0x53d799[_0x4159ad(_0x5404a1._0x388478)]>0x0)_0x53d799['push']('');return _0x53d799[_0x4159ad(_0x5404a1._0xf1d692)]('#\x20---\x20'+_0x592885+_0x4159ad(_0x5404a1._0x4d5dab),_0x4e75f8),joinLines(_0x53d799,!![]);}return _0x53d799['push'](_0x4e75f8),joinLines(_0x53d799,!![]);}__name(insertEnvVar,_0x3af863(0x156));function removeEnvVar(_0x5cfe9b,_0x296461){const _0x1c0857={_0x1bb897:0xee},_0x42c45d=_0x3af863,{lines:_0x18b79b,trailingNewline:_0x26bcb4}=splitLines(_0x5cfe9b),_0x554dce=_0x18b79b[_0x42c45d(_0x1c0857._0x1bb897)](_0x155987=>!isAssignmentOf(_0x155987,_0x296461)),_0x4bdab9=_0x554dce[_0x42c45d(0x163)]!==_0x18b79b[_0x42c45d(0x163)];return{'content':joinLines(_0x554dce,_0x26bcb4),'removed':_0x4bdab9};}__name(removeEnvVar,_0x3af863(0xfc));var SECTION_BY_KIND={'app':_0x3af863(0xf6),'runner':'Runner','secret':void 0x0};function planAddVariable(_0x3c88ae){const _0x1495a3={_0xa3396c:0x165,_0x22397c:0x11a,_0x5851cd:0x128,_0x290788:0x142,_0x15118d:0x157,_0x1c0a63:0x11f,_0xa26f2e:0x143,_0x2eecfc:0x143},_0x14176e=_0x3af863,{name:_0x5a8edd,kind:_0x568275}=_0x3c88ae;if(_0x568275===_0x14176e(_0x1495a3._0xa3396c)){if(!isRunnerConfigKey(_0x5a8edd))return{'ok':![],'code':_0x14176e(0xe8),'message':_0x5a8edd+'\x20is\x20not\x20a\x20known\x20runner\x20setting\x20—\x20choose\x20one\x20from\x20the\x20runner-config\x20list.'};}else{if(!isExternalVarName(_0x5a8edd))return{'ok':![],'code':_0x14176e(_0x1495a3._0x22397c),'message':_0x5a8edd+_0x14176e(_0x1495a3._0x5851cd)};}const _0x3f7dee=envKeys(_0x3c88ae[_0x14176e(_0x1495a3._0x290788)])[_0x14176e(_0x1495a3._0x15118d)](_0x5a8edd),_0x37f47e=envKeys(_0x3c88ae['secretsContent'])['has'](_0x5a8edd),_0x107c4b=_0x568275==='secret'?_0x14176e(0x101):_0x14176e(0xf9),_0x38302b=_0x107c4b===_0x14176e(0x101)?_0x37f47e:_0x3f7dee,_0x291f59=_0x107c4b===_0x14176e(0x101)?_0x14176e(_0x1495a3._0x1c0a63):_0x14176e(0x146);if(_0x38302b)return{'ok':![],'code':_0x14176e(0x14d),'message':_0x5a8edd+_0x14176e(0x132)+_0x291f59+'\x20—\x20pick\x20a\x20different\x20name\x20or\x20edit\x20the\x20existing\x20value.'};const _0x603722=[];return _0x568275===_0x14176e(_0x1495a3._0xa26f2e)&&_0x3f7dee&&_0x603722['push'](_0x5a8edd+'\x20is\x20also\x20set\x20in\x20unotest/.env\x20—\x20the\x20secret\x20value\x20now\x20shadows\x20it.'),_0x568275!==_0x14176e(_0x1495a3._0x2eecfc)&&_0x37f47e&&_0x603722[_0x14176e(0x13e)](_0x5a8edd+_0x14176e(0xf1)),{'ok':!![],'target':_0x107c4b,'sectionLabel':SECTION_BY_KIND[_0x568275],'warnings':_0x603722};}__name(planAddVariable,_0x3af863(0x134));function deleteShadowWarning(_0x3d5690,_0x4a7604,_0x1bf08b){const _0x434fd0={_0x24ebc7:0x166},_0x535c8e=_0x3af863;if(_0x1bf08b!==void 0x0&&_0x1bf08b!==_0x4a7604)return[_0x3d5690+_0x535c8e(_0x434fd0._0x24ebc7)];return[];}__name(deleteShadowWarning,'deleteShadowWarning');var TERMINAL_RUNTIME_STATES=[_0x3af863(0xe2),_0x3af863(0xf5),_0x3af863(0x104)];function isTerminalRuntimeState(_0x292e8b){const _0x54fe09={_0x1e6c18:0x13f},_0x12d066=_0x3af863;return TERMINAL_RUNTIME_STATES[_0x12d066(_0x54fe09._0x1e6c18)](_0x292e8b);}__name(isTerminalRuntimeState,_0x3af863(0x160));export{COLLECTIONS_SUBDIR,COLLECTION_NAME_FORBIDDEN_RE,COMMANDS_FILE,E2E_SUBDIR,ENV_FILE,HEARTBEAT_FILE,HELPERS_SUBDIR,LOCK_FILE,LOG_FILE,PICKER_SNAPSHOT_FILE,RUNNER_CONFIG_KEYS,RUNS_SUBDIR,RUNTIME_FILE,RUN_MANIFEST_FILE,RUN_SOURCES_FILE,RunnerAdapterNotFoundError,RunnerNotConfiguredError,SECRETS_FILE,SEGMENT_NAME_FORBIDDEN_RE,SNAPSHOTS_SUBDIR,STDERR_FILE,STDOUT_FILE,STEPS_FILE,TERMINAL_RUNTIME_STATES,TERMINAL_WS_EVENT,UNOTEST_DIR,UnsupportedRunKindError,activeEnvName,categorizeVariable,debugDirFor,debuggerFileFor,deleteShadowWarning,envFileFor,envKeys,envLayerFilesFor,insertEnvVar,isExternalVarName,isRegexLiteral,isRunnerConfigKey,isTerminalRuntimeState,makeRunId,parseAppServerEvent,parseEnvContent,planAddVariable,regexLiteral,removeEnvVar,runsDirFor,sanitizeRunIdSegment,secretsFileFor,secretsLayerFilesFor,serializeEnvValue,testDirFor,validateCollectionName,validateSegmentName};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unotest/protocol",
3
- "version": "0.9.0",
3
+ "version": "0.10.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": {