@unotest/protocol 0.25.0 → 0.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +252 -0
- package/README.md +5 -0
- package/dist/index.d.ts +619 -6
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,257 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.26.1] - 2026-08-30
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- `BundleManifest` gains `declaredVariables?: string[]` — the external
|
|
8
|
+
NAMES a suite declares (values never travel) — and `BundleUploadOk`
|
|
9
|
+
gains `variableGaps?`, how a box reports the ones it cannot supply.
|
|
10
|
+
|
|
11
|
+
- `CollectionMeta` gains `prepare: string | null` — the collection's own
|
|
12
|
+
environment-preparation command, read from `prepare:` in its YAML.
|
|
13
|
+
|
|
14
|
+
- 9424f6b: Fix: screenshots stayed blank in the viewer when runs write to a separate
|
|
15
|
+
artifact root
|
|
16
|
+
|
|
17
|
+
A run whose artifacts do not live under the working directory — every run on
|
|
18
|
+
a box, where the sources are a disposable copy of a test bundle — emitted
|
|
19
|
+
`screenshot` events whose path was relativised against the working directory.
|
|
20
|
+
That came out as `../../../…`, which the viewer's asset route refuses to
|
|
21
|
+
serve, so every step preview rendered as a broken image. Artifact paths are
|
|
22
|
+
now relative to the artifact root, which is still the project root on every
|
|
23
|
+
local run.
|
|
24
|
+
|
|
25
|
+
The failure bundle had the mirror-image problem: it was written to
|
|
26
|
+
`.unotest/failures/` under the working directory, so on a box it landed
|
|
27
|
+
inside the bundle copy — outside the tree the viewer serves, and discarded on
|
|
28
|
+
the next bundle push. It now hangs off the artifact root too, which leaves
|
|
29
|
+
local runs byte-for-byte unchanged.
|
|
30
|
+
|
|
31
|
+
The inspector's Semantic DOM, Console, Network and Snapshot panes were dark
|
|
32
|
+
for a third reason, and this one bit local runs as well: they composed the
|
|
33
|
+
run's directory in the browser and left out the date shard runs have been
|
|
34
|
+
filed under since M-10, plus the environment suffix on a box. The viewer's
|
|
35
|
+
asset route now takes `?file=<name-relative-to-the-run-dir>` and resolves the
|
|
36
|
+
directory itself — runs root, target suffix, environment suffix and shard are
|
|
37
|
+
all things only the server knows. `?path=` stays for the whole paths the
|
|
38
|
+
server ships on run events.
|
|
39
|
+
|
|
40
|
+
## [0.26.0] - 2026-08-30
|
|
41
|
+
|
|
42
|
+
### Minor Changes
|
|
43
|
+
|
|
44
|
+
- 3eede7c: The viewer can now be hosted: it shows which test bundle an environment
|
|
45
|
+
is running, and lets you switch it.
|
|
46
|
+
|
|
47
|
+
This is the other half of `bundle push`. Nothing changes for a local
|
|
48
|
+
viewer — everything here appears only when something is hosting it.
|
|
49
|
+
|
|
50
|
+
- **The artifact root and the project root are now genuinely separate.**
|
|
51
|
+
The viewer already took `UNOTEST_ARTIFACTS_ROOT` for the run queue;
|
|
52
|
+
run discovery, the run index, snapshots, log capture and the viewer's
|
|
53
|
+
own lock file now honour it too. Locally the two are the same directory
|
|
54
|
+
and nothing moves. Where they differ — sources in a disposable copy of a
|
|
55
|
+
bundle, history in the environment beside it — the history is no longer
|
|
56
|
+
read out of (or written into) the sources.
|
|
57
|
+
- **Bundle badge in the status bar.** `main@1a2b3c4`, or `wip` for a
|
|
58
|
+
bundle packed from an uncommitted tree, with the author, the pinned
|
|
59
|
+
`@unotest/web` and who switched the environment last. Clicking it lists
|
|
60
|
+
the bundles pushed to this environment and switches to one — that runs
|
|
61
|
+
as a maintenance ticket on the host, so it waits for the environment to
|
|
62
|
+
be free instead of pulling the code out from under a running suite.
|
|
63
|
+
- **Runs remember their bundle.** `manifest.json` and `GET /api/runs`
|
|
64
|
+
carry `bundleId` (from `UNOTEST_BUNDLE_ID`, set by the host); the runs
|
|
65
|
+
list marks the ones that ran on another bundle, so "was this red run
|
|
66
|
+
even the code I am looking at?" has an answer.
|
|
67
|
+
- **The contract is a file, not a mode.** `@unotest/protocol` gains
|
|
68
|
+
`WorkspaceFile` — the host writes `unotest/.workspace.json` beside the
|
|
69
|
+
artifacts and the viewer reads it, the same way the guard's session
|
|
70
|
+
header narrows the UI. No file, no bundle UI; the viewer never learns
|
|
71
|
+
what a box is. Values of environment variables and secrets never appear
|
|
72
|
+
in it — only their names.
|
|
73
|
+
- **Queue tickets can name a bundle.** `QueueTicket.source.bundleId` is
|
|
74
|
+
recorded when a run is queued, so a run executes the code it was
|
|
75
|
+
ordered with even if the environment moved on while it waited.
|
|
76
|
+
|
|
77
|
+
- 6d1c612: `npx @unotest/web bundle push` — send your suite to a box, instead of
|
|
78
|
+
giving a box access to your repository.
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
npx @unotest/web bundle push --box https://tests.example.com
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
It packs `unotest/`, `unotest.config`, `package.json` and its lockfile
|
|
85
|
+
into one archive and uploads it. That is the whole channel: a box holds
|
|
86
|
+
no deploy key and no token for anybody's code and never pulls anything,
|
|
87
|
+
so nothing is on it that was not pushed to it. (There is no path-scoped
|
|
88
|
+
git credential anywhere — a key that can fetch `unotest/` can fetch the
|
|
89
|
+
product source next to it, which is why this direction is the only one
|
|
90
|
+
we offer.)
|
|
91
|
+
|
|
92
|
+
- **Uncommitted work travels.** The manifest records `dirty: true` and
|
|
93
|
+
the bundle shows up as _wip_, so pushing a fix you have not committed
|
|
94
|
+
yet is a normal loop, not a release step.
|
|
95
|
+
- **What would fail on the box is refused here.** A scenario that reads a
|
|
96
|
+
file outside `unotest/` (`MODULE_NOT_FOUND` on the box, hours later, on
|
|
97
|
+
a run nobody is watching), a missing lockfile (`npm ci` will not run
|
|
98
|
+
without one), no `@unotest/web` in the dependencies, a symlink. Each
|
|
99
|
+
problem names the file, the line and the fix.
|
|
100
|
+
- **Secrets do not travel.** `unotest/.env*` and `.secrets*` are excluded
|
|
101
|
+
even if committed: environment values belong to the environment and are
|
|
102
|
+
injected over the bundle when it runs.
|
|
103
|
+
- **In a git project, git decides what belongs.** The file list comes from
|
|
104
|
+
`git ls-files --cached --others --exclude-standard`, so whatever your
|
|
105
|
+
`.gitignore` keeps out — generated databases, recordings, `.runs` —
|
|
106
|
+
stays out. Content is read from the working tree, not the index.
|
|
107
|
+
- **The id is the content.** `bundleId` is a hash of the packed files, not
|
|
108
|
+
a commit sha (a dirty tree's sha is not unique), so re-pushing an
|
|
109
|
+
unchanged suite is an instant no-op and two people packing the same tree
|
|
110
|
+
get the same bundle.
|
|
111
|
+
- `--dry-run` packs and checks without uploading, `--out <file>` keeps the
|
|
112
|
+
archive (plain `tar.gz` — `tar -tzf` shows what is inside), `--json`
|
|
113
|
+
prints `{ bundleId, status }` for a CI job that runs it afterwards.
|
|
114
|
+
- `UNOTEST_BOX_URL` / `UNOTEST_BOX_TOKEN` supply the address and the
|
|
115
|
+
token, which a CI job usually takes from its secret store. Tokens are
|
|
116
|
+
issued per project on the box.
|
|
117
|
+
|
|
118
|
+
- dbfa36f: Your CI can now ask a box to run the suite it just pushed, and a box can
|
|
119
|
+
report the result back to GitHub.
|
|
120
|
+
|
|
121
|
+
```sh
|
|
122
|
+
npx @unotest/web bundle push --run --env test --collection smoke
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
`--run` sends the second half of the CI recipe: upload the bundle, then
|
|
126
|
+
order a run of it. Two requests rather than one flag on the upload,
|
|
127
|
+
because a bundle is _content_ — pushing an identical tree twice is normal
|
|
128
|
+
and answers `exists` — while "run it" is an event. The same split is what
|
|
129
|
+
lets a deploy script run a bundle somebody pushed hours ago.
|
|
130
|
+
|
|
131
|
+
- **The box answers as soon as the runs are queued** (202) with their run
|
|
132
|
+
ids. A suite takes minutes to hours; an HTTP request held open for that
|
|
133
|
+
long is a timeout in somebody's proxy, not a result. The ids are real
|
|
134
|
+
from the moment you get them, so a CI log can print a link into the
|
|
135
|
+
viewer straight away.
|
|
136
|
+
- **`--env <name>` is required with `--run`.** Which environments a box
|
|
137
|
+
has is the operator's decision, and guessing one would be guessing
|
|
138
|
+
which system gets tested.
|
|
139
|
+
- **Without `--collection`, the box runs what that environment normally
|
|
140
|
+
runs** — the collections its `schedules` name. Naming them explicitly is
|
|
141
|
+
the deploy-check case; leaving it out is the "same as every night" case.
|
|
142
|
+
- **`--pr <number>` coalesces.** A newer push of the same pull request
|
|
143
|
+
withdraws its older runs that are still _waiting_; a run that already
|
|
144
|
+
started is never killed. Three pushes in five minutes cost one suite.
|
|
145
|
+
`--json` reports how many were withdrawn, so "my run vanished" has an
|
|
146
|
+
answer in the log of the run that replaced it.
|
|
147
|
+
- **Refusals are typed and say what to do**: no such environment, an
|
|
148
|
+
environment belonging to another project, a bundle the box no longer
|
|
149
|
+
holds, nothing to run.
|
|
150
|
+
|
|
151
|
+
On a hosted viewer, the queue panel now names the change each machine
|
|
152
|
+
ticket belongs to (`PR #412@1a2b3c4`) instead of a row of identical "ci"
|
|
153
|
+
entries, and the history gained a **this bundle only** filter for the
|
|
154
|
+
moment you are judging the bundle in front of you rather than the last
|
|
155
|
+
month of runs.
|
|
156
|
+
|
|
157
|
+
Nothing changes for a local `npx @unotest/web viewer`: there are no
|
|
158
|
+
bundles there, so neither the badge nor the filter appears.
|
|
159
|
+
|
|
160
|
+
- c43aa00: Runs of one project now take turns instead of colliding.
|
|
161
|
+
|
|
162
|
+
Until now nothing coordinated them: the viewer refused a second run with
|
|
163
|
+
HTTP 409, and that was the whole defence — a `npx @unotest/web e2e` in a
|
|
164
|
+
terminal, an agent's `run_test` and a scheduled suite would all start on
|
|
165
|
+
top of each other, driving the same browser and the same seeded database
|
|
166
|
+
at the same time. The 409 protected the UI, not the machine.
|
|
167
|
+
|
|
168
|
+
- **A filesystem queue**, in `unotest/.queue<target>[.<env>]/` beside the
|
|
169
|
+
runs root it belongs to. A run writes a ticket, waits until it is at
|
|
170
|
+
the head, takes a slot, runs, and gives the slot back. There is no
|
|
171
|
+
daemon: whoever holds the slot executes the run itself, so nothing new
|
|
172
|
+
has to be installed, started or kept alive. Only `open("wx")`, rename,
|
|
173
|
+
unlink and mtime — no `flock`, which lies on network and container
|
|
174
|
+
filesystems. A crashed producer is reaped by whoever comes next.
|
|
175
|
+
- **Every producer is in it**: the CLI (`e2e`, `collection`, `author`),
|
|
176
|
+
the viewer's Run button, and the MCP `run_test` (which spawns the CLI).
|
|
177
|
+
A collection is ONE run — its `workers` still run in parallel inside
|
|
178
|
+
it, because a child process carries its parent's lease and skips the
|
|
179
|
+
queue.
|
|
180
|
+
- **The viewer shows the queue**: the Active panel lists what is waiting,
|
|
181
|
+
including tickets a terminal or an agent wrote, with a button to take
|
|
182
|
+
any of them back out. `GET /api/queue`, `DELETE /api/queue/:ticket`,
|
|
183
|
+
and a `queue:changed` websocket message.
|
|
184
|
+
- **Config**: `queue.concurrency` (default 1) and `queue.enabled`
|
|
185
|
+
(default true) in `unotest.config`. Both the CLI and the viewer read
|
|
186
|
+
the same file, so they cannot disagree about how many slots exist.
|
|
187
|
+
- **Escape hatches**: `UNOTEST_NO_QUEUE=1` runs without queueing;
|
|
188
|
+
Ctrl-C while waiting gives up your place in line and runs nothing.
|
|
189
|
+
- **For boxes**: `UNOTEST_QUEUE_GLOBAL_DIR` + `UNOTEST_QUEUE_GLOBAL_SLOTS`
|
|
190
|
+
add a host-wide budget several environments share (a collection weighs
|
|
191
|
+
its worker count), and `UNOTEST_ARTIFACTS_ROOT` puts `.runs` / `.queue`
|
|
192
|
+
somewhere other than the directory the tests live in — so the history
|
|
193
|
+
outlives a throwaway copy of the tests.
|
|
194
|
+
|
|
195
|
+
### Migration notes
|
|
196
|
+
|
|
197
|
+
**`POST /api/run` no longer answers 409.** Ordering a run while another
|
|
198
|
+
one is active used to fail with `ActiveRunConflictError` (HTTP 409); it
|
|
199
|
+
now succeeds and the run waits. The response changed shape with it:
|
|
200
|
+
|
|
201
|
+
```diff
|
|
202
|
+
- { runId, kind, ref, pid, startedAt }
|
|
203
|
+
+ { runId, kind, ref, status: "queued" | "running", ticket, acceptedAt }
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
`runId` is still final and immediately usable — open the tab on it as
|
|
207
|
+
before — but the run may not have started yet, and `pid` is not known at
|
|
208
|
+
that point. `POST /api/runs/:runId/abort` covers both states: it
|
|
209
|
+
withdraws a waiting ticket or SIGTERMs a running child.
|
|
210
|
+
|
|
211
|
+
Anything that treated 409 as "busy, try later" should now simply order
|
|
212
|
+
the run. Anything that relied on "only one run can exist" should read
|
|
213
|
+
`GET /api/queue`. To keep the old immediate-start behaviour (without the
|
|
214
|
+
protection), set `queue.enabled: false`.
|
|
215
|
+
|
|
216
|
+
- 8ec4177: Scheduled runs: declare what should run on its own, next to the tests it
|
|
217
|
+
runs.
|
|
218
|
+
|
|
219
|
+
```js
|
|
220
|
+
// unotest.config.mjs
|
|
221
|
+
export default {
|
|
222
|
+
schedules: [
|
|
223
|
+
{ collection: "smoke", cron: "0 * * * *" },
|
|
224
|
+
{ collection: "nightly", cron: "0 3 * * *", prepare: "node seed.mjs" },
|
|
225
|
+
],
|
|
226
|
+
};
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
- **`schedules`** — a new config leaf: collection + cron, plus an
|
|
230
|
+
optional `env` (which environment the run happens in) and `prepare` (a
|
|
231
|
+
command run before the suite). Versioned with the tests, so "what is
|
|
232
|
+
supposed to run nightly" is in the repo instead of on a machine nobody
|
|
233
|
+
can see.
|
|
234
|
+
- **`npx @unotest/web schedules`** prints what is declared; `--json` is
|
|
235
|
+
the machine shape a scheduler reads back. Each entry also carries the
|
|
236
|
+
collection's `workers` resolved from its yaml manifest, so an executor
|
|
237
|
+
can weigh the run without parsing yaml itself.
|
|
238
|
+
- **`npx @unotest/web collection <name> --scheduled`** runs a collection
|
|
239
|
+
the way its schedule does: in the entry's `env` (unless you set one)
|
|
240
|
+
and with its `prepare` command first, inside the same run slot
|
|
241
|
+
(preparing touches the target, which is exactly what the run queue
|
|
242
|
+
serialises). A failed prepare exits **94**, not 1 — "the environment
|
|
243
|
+
was not prepared, nothing was tested" is a different event from "the
|
|
244
|
+
suite is red", and alerting has to tell them apart. A collection
|
|
245
|
+
listed in `schedules` more than once needs `--scheduled=<index>`
|
|
246
|
+
(zero-based) — guessing which entry's prepare to run is refused.
|
|
247
|
+
|
|
248
|
+
**Nothing in this package ticks.** `schedules` is data: no cron parser,
|
|
249
|
+
no timers, no background runs. Cron is executed by whatever hosts your
|
|
250
|
+
runs — your CI (`on: schedule` + `unotest-web collection`), or a box. A
|
|
251
|
+
clone of a repo that declares schedules therefore never starts running
|
|
252
|
+
suites by itself; `unotest-web schedules` says so out loud instead of
|
|
253
|
+
implying a timer that does not exist.
|
|
254
|
+
|
|
3
255
|
## [0.25.0] - 2026-08-29
|
|
4
256
|
|
|
5
257
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -28,3 +28,8 @@ that needs an environment lives in the consumer package — not here.
|
|
|
28
28
|
written by runners under `unotest/.runs/<runId>/`, read by the viewer.
|
|
29
29
|
- `WsMessage` — the typed websocket event protocol from viewer-server
|
|
30
30
|
to viewer-web.
|
|
31
|
+
- `QueueTicket` / `IRunQueue` — the run queue's on-disk ticket format,
|
|
32
|
+
its directory layout (`unotest/.queue<target>[.<env>]/`) and the
|
|
33
|
+
engine contract every producer depends on. The implementation is
|
|
34
|
+
`FsRunQueue` in `@unotest/core` (it needs a filesystem; this package
|
|
35
|
+
does not).
|
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ type AppServerEvent =
|
|
|
26
26
|
* is ordinary dev-server output. */
|
|
27
27
|
declare function parseAppServerEvent(line: string): AppServerEvent | null;
|
|
28
28
|
|
|
29
|
+
declare function isRecord(v: unknown): v is Record<string, unknown>;
|
|
30
|
+
|
|
29
31
|
/** User-facing project directory containing scenarios + helpers + collections. */
|
|
30
32
|
declare const UNOTEST_DIR = "unotest";
|
|
31
33
|
/** Subdir under `unotest/` for `.test.js` scenarios. */
|
|
@@ -136,6 +138,22 @@ declare function secretsFileFor(suffix: string, envName?: string): string;
|
|
|
136
138
|
* environment reads just `[unotest/.env]`. */
|
|
137
139
|
declare function envLayerFilesFor(suffix: string, envName?: string): string[];
|
|
138
140
|
declare function secretsLayerFilesFor(suffix: string, envName?: string): string[];
|
|
141
|
+
/** Absolute root the `unotest/` ARTIFACT tree (`.runs`, `.queue`) hangs
|
|
142
|
+
* off, when it is not the directory the sources live in.
|
|
143
|
+
*
|
|
144
|
+
* Two roots exist because they have different lifetimes. On a box the
|
|
145
|
+
* sources are a disposable unpacked copy of a test bundle — replaced
|
|
146
|
+
* whenever a newer one is pushed, garbage-collected when it is not the
|
|
147
|
+
* active one; the artifacts are the history of what ran, and must
|
|
148
|
+
* outlive every copy. Keeping `.runs` / `.queue` in the environment's
|
|
149
|
+
* own directory is what lets the sources be swept without taking the
|
|
150
|
+
* history with them. Unset (every npm user, and every local run) = the
|
|
151
|
+
* project root, exactly as before. */
|
|
152
|
+
declare const ARTIFACTS_ROOT_ENV = "UNOTEST_ARTIFACTS_ROOT";
|
|
153
|
+
/** Resolve the artifact root from a process-env-like record, falling
|
|
154
|
+
* back to the source root. Blank is treated as unset — an exported but
|
|
155
|
+
* empty variable must not relocate anything. */
|
|
156
|
+
declare function artifactsRootFrom(env: Record<string, string | undefined>, projectRoot: string): string;
|
|
139
157
|
/** Read an environment name from a process-env-like record (`UNOTEST_ENV`),
|
|
140
158
|
* normalising empty/blank to `undefined` (= base only). */
|
|
141
159
|
declare function activeEnvName(env: Record<string, string | undefined>): string | undefined;
|
|
@@ -409,7 +427,12 @@ interface StepFailEvent extends RunArtifactBase {
|
|
|
409
427
|
}
|
|
410
428
|
interface ScreenshotEvent extends RunArtifactBase {
|
|
411
429
|
kind: "screenshot";
|
|
412
|
-
/**
|
|
430
|
+
/** Artifact-root-relative path to the PNG (under
|
|
431
|
+
* `unotest/.runs<suffix>/<shard>/<runId>/screenshot/`). The artifact
|
|
432
|
+
* root is the project root on every local run, and the environment's
|
|
433
|
+
* directory on a box — where the sources are a disposable bundle copy
|
|
434
|
+
* and making this cwd-relative yields a `../../..` path the viewer's
|
|
435
|
+
* asset route refuses to serve. */
|
|
413
436
|
path: string;
|
|
414
437
|
/** Step identity for captures bound to a specific step (per-step
|
|
415
438
|
* screenshots under `UNOTEST_STEP_SCREENSHOTS`). Same semantics as
|
|
@@ -455,10 +478,10 @@ interface JudgeVerdictEvent extends RunArtifactBase {
|
|
|
455
478
|
* agent-fix MCP tools. */
|
|
456
479
|
interface FailureBundleWrittenEvent extends RunArtifactBase {
|
|
457
480
|
kind: "failure-bundle:written";
|
|
458
|
-
/**
|
|
481
|
+
/** Artifact-root-relative path to the bundle directory. */
|
|
459
482
|
bundlePath: string;
|
|
460
|
-
/**
|
|
461
|
-
* when tier-2 capture succeeded. */
|
|
483
|
+
/** Artifact-root-relative path to the screenshot PNG inside the
|
|
484
|
+
* bundle, when tier-2 capture succeeded. */
|
|
462
485
|
screenshotPath?: string;
|
|
463
486
|
/** Page URL at the moment of failure (same value captured into the
|
|
464
487
|
* bundle's `snapshot.json`/`outline.txt`), for the viewer's ErrorCard. */
|
|
@@ -684,6 +707,11 @@ interface RunMeta {
|
|
|
684
707
|
* collection-runs themselves. Populated by the writer from the
|
|
685
708
|
* child's `manifest.json`. */
|
|
686
709
|
parentRunId?: string;
|
|
710
|
+
/** Which test bundle produced this run, from its manifest. Absent for
|
|
711
|
+
* every local run; on a box it is what tells two runs of the same
|
|
712
|
+
* scenario apart when the environment moved to another bundle between
|
|
713
|
+
* them. */
|
|
714
|
+
bundleId?: string;
|
|
687
715
|
}
|
|
688
716
|
|
|
689
717
|
/** Bumped when a line's shape changes incompatibly. A file whose header
|
|
@@ -744,6 +772,564 @@ declare function scenarioIndexFileName(ref: string): string;
|
|
|
744
772
|
/** Inverse of `scenarioIndexFileName`. */
|
|
745
773
|
declare function scenarioRefFromFileName(fileName: string): string | null;
|
|
746
774
|
|
|
775
|
+
/** Run endpoint, relative to the box origin:
|
|
776
|
+
* `POST <origin>/api/box/ci/run` with `Authorization: Bearer <token>` —
|
|
777
|
+
* the same project token that uploaded the bundle. */
|
|
778
|
+
declare const CI_RUN_PATH = "/api/box/ci/run";
|
|
779
|
+
/** Where a ticket came from, when it came from a machine.
|
|
780
|
+
*
|
|
781
|
+
* `api` is the honest answer for `POST /ci/run`: the caller is somebody's
|
|
782
|
+
* CI job holding a project token, and which CI product it is is not
|
|
783
|
+
* something the box can know or needs to. `github`/`gitlab` are set only
|
|
784
|
+
* when the box itself received (and verified) a webhook, which is when it
|
|
785
|
+
* also has somewhere to report a status back to. */
|
|
786
|
+
type CiProviderId = "github" | "gitlab" | "api";
|
|
787
|
+
/** What a CI job asks for. The bundle is named by id — the box does not
|
|
788
|
+
* guess "the newest one", because the point of the pair upload+run is
|
|
789
|
+
* that a job runs exactly the tree it just packed. */
|
|
790
|
+
interface CiRunRequest {
|
|
791
|
+
bundleId: string;
|
|
792
|
+
/** Environment name on the box (`test`, `staging`). Which environments
|
|
793
|
+
* exist is the operator's decision, so the name is spelled out rather
|
|
794
|
+
* than derived. */
|
|
795
|
+
environment: string;
|
|
796
|
+
/** Collections to run. Absent = whatever this bundle's `schedules`
|
|
797
|
+
* name for this environment — "run what this environment normally
|
|
798
|
+
* runs", which is what a deploy check wants and what keeps the CI
|
|
799
|
+
* recipe from repeating the suite's own configuration. */
|
|
800
|
+
collections?: string[];
|
|
801
|
+
/** Provenance for the queue badges and for coalescing: which pull
|
|
802
|
+
* request / branch this run belongs to. Free-form and untrusted — it
|
|
803
|
+
* labels, it never authorises. */
|
|
804
|
+
pr?: number;
|
|
805
|
+
branch?: string;
|
|
806
|
+
sha?: string;
|
|
807
|
+
}
|
|
808
|
+
/** One queued run. The ids are generated by the box before anything
|
|
809
|
+
* starts, so a CI job can print a link to the viewer immediately. */
|
|
810
|
+
interface CiQueuedRun {
|
|
811
|
+
runId: string;
|
|
812
|
+
collection: string;
|
|
813
|
+
}
|
|
814
|
+
interface CiRunAccepted {
|
|
815
|
+
status: "queued";
|
|
816
|
+
bundleId: string;
|
|
817
|
+
environment: string;
|
|
818
|
+
runs: CiQueuedRun[];
|
|
819
|
+
/** Waiting tickets of the same branch/PR withdrawn in favour of this
|
|
820
|
+
* one. Reported rather than silent: "my run vanished" must have an
|
|
821
|
+
* answer in the CI log of the run that replaced it. */
|
|
822
|
+
superseded?: number;
|
|
823
|
+
}
|
|
824
|
+
/** Why a run request was refused. A code, not a message — the CLI turns
|
|
825
|
+
* each into its own advice, and matching on message text is the
|
|
826
|
+
* string-match error handling the monorepo forbids. */
|
|
827
|
+
type CiRunErrorCode =
|
|
828
|
+
/** Missing, unknown or revoked token. */
|
|
829
|
+
"unauthorized"
|
|
830
|
+
/** The token's project does not own that environment. */
|
|
831
|
+
| "scope-mismatch"
|
|
832
|
+
/** No such environment on this box. */
|
|
833
|
+
| "unknown-environment"
|
|
834
|
+
/** The box holds no bundle with that id — push it first. */
|
|
835
|
+
| "unknown-bundle"
|
|
836
|
+
/** Neither the request nor the bundle's `schedules` name a collection
|
|
837
|
+
* to run in this environment. */
|
|
838
|
+
| "no-collections"
|
|
839
|
+
/** Not a readable request. */
|
|
840
|
+
| "malformed"
|
|
841
|
+
/** The bundle could not be installed on the box. Retryable. */
|
|
842
|
+
| "storage";
|
|
843
|
+
interface CiRunError {
|
|
844
|
+
error: {
|
|
845
|
+
code: CiRunErrorCode;
|
|
846
|
+
message: string;
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
type CiRunResponse = CiRunAccepted | CiRunError;
|
|
850
|
+
/** Validate a request off the wire. Null for anything we will not act on:
|
|
851
|
+
* the box answers `malformed` rather than filling in a default, because
|
|
852
|
+
* every default here would be "run something nobody asked for". */
|
|
853
|
+
declare function parseCiRunRequest(value: unknown): CiRunRequest | null;
|
|
854
|
+
/** Parse a box's answer. Null when the body is not one of ours at all —
|
|
855
|
+
* a proxy's HTML error page, a captive portal — which the caller reports
|
|
856
|
+
* as "that URL is not a box" rather than as a run problem. */
|
|
857
|
+
declare function parseCiRunResponse(value: unknown): CiRunResponse | null;
|
|
858
|
+
/** Structural validation of the CI provenance carried on a queue ticket.
|
|
859
|
+
* Shared by the ticket parser and by whoever reads a ticket back. */
|
|
860
|
+
declare function parseCiProvider(value: unknown): CiProviderId | null;
|
|
861
|
+
|
|
862
|
+
/** Queue root under `unotest/`, mirroring the two axes of `runsDirFor`:
|
|
863
|
+
* TARGET (dash) and ENVIRONMENT (dot) — `.queue`, `.queue-mobile`,
|
|
864
|
+
* `.queue.staging`. One queue per runs root, always: what serialises
|
|
865
|
+
* runs must be scoped exactly like what stores them. */
|
|
866
|
+
declare const QUEUE_SUBDIR = ".queue";
|
|
867
|
+
/** Waiting tickets. The FILE NAME is the queue order (see
|
|
868
|
+
* `makeQueueTicketName`) — no index, nothing to rebuild. */
|
|
869
|
+
declare const QUEUE_TICKETS_DIR = "tickets";
|
|
870
|
+
/** Tickets that hold a slot. Visibility only: the slot files are the
|
|
871
|
+
* authority, a `running/` entry without one is garbage (GC unlinks it). */
|
|
872
|
+
declare const QUEUE_RUNNING_DIR = "running";
|
|
873
|
+
/** Env-level leases: `slots/slot-<n>`, `n < concurrency`. Created with
|
|
874
|
+
* `open("wx")` — the loser of the race gets EEXIST and keeps waiting. */
|
|
875
|
+
declare const QUEUE_SLOTS_DIR = "slots";
|
|
876
|
+
/** Mutex file for the all-or-nothing weight claim in a global pool.
|
|
877
|
+
* Short-lived by construction; a stale one is reaped like any lease. */
|
|
878
|
+
declare const QUEUE_MUTEX_FILE = ".mutex";
|
|
879
|
+
/** Set by a lease holder on every child it spawns. A process that sees
|
|
880
|
+
* it is already covered by someone's slot and must not queue again —
|
|
881
|
+
* this is the "top-level run" boundary (a collection's scenario
|
|
882
|
+
* subprocesses). Value: the holder's runId, for diagnostics. */
|
|
883
|
+
declare const QUEUE_LEASE_ENV = "UNOTEST_QUEUE_LEASE";
|
|
884
|
+
/** Escape hatch: `1` runs without touching the queue at all. */
|
|
885
|
+
declare const QUEUE_DISABLED_ENV = "UNOTEST_NO_QUEUE";
|
|
886
|
+
/** Optional host-wide weight pool shared by every environment on the
|
|
887
|
+
* box (a shared volume in compose). Unset = no global pool. */
|
|
888
|
+
declare const QUEUE_GLOBAL_DIR_ENV = "UNOTEST_QUEUE_GLOBAL_DIR";
|
|
889
|
+
declare const QUEUE_GLOBAL_SLOTS_ENV = "UNOTEST_QUEUE_GLOBAL_SLOTS";
|
|
890
|
+
/** Bumped when the on-disk ticket shape changes incompatibly. A reader
|
|
891
|
+
* that meets a higher version treats the ticket as opaque and waits for
|
|
892
|
+
* its owner to reap it rather than guessing. */
|
|
893
|
+
declare const QUEUE_SCHEMA_VERSION = 1;
|
|
894
|
+
/** Queue root under `unotest/` for a target + environment. */
|
|
895
|
+
declare function queueDirFor(suffix: string, envName?: string): string;
|
|
896
|
+
/** True for directory names under `unotest/` that hold a queue for ANY
|
|
897
|
+
* target/environment combination. Mirrors `isRunsDirName`. */
|
|
898
|
+
declare function isQueueDirName(name: string): boolean;
|
|
899
|
+
/** Artifact-root-relative queue root: `unotest/.queue<suffix>[.<env>]`. */
|
|
900
|
+
declare function projectQueueRoot(suffix?: string, envName?: string): string;
|
|
901
|
+
/** Ordered highest-priority-first. `maintenance` takes every slot of its
|
|
902
|
+
* environment (branch switch, `npm ci`); `interactive` is a human
|
|
903
|
+
* waiting in front of a viewer / terminal / agent; `ci` and `schedule`
|
|
904
|
+
* are machines that can wait. */
|
|
905
|
+
type QueuePriority = "maintenance" | "interactive" | "ci" | "schedule";
|
|
906
|
+
/** Every priority, highest first. */
|
|
907
|
+
declare const QUEUE_PRIORITIES: readonly QueuePriority[];
|
|
908
|
+
declare function queuePriorityRank(priority: QueuePriority): number;
|
|
909
|
+
declare function queuePriorityFromRank(rank: number): QueuePriority | null;
|
|
910
|
+
/** What a ticket asks the queue to run. `maintenance` is not a
|
|
911
|
+
* `RunKind` — it produces no run artifacts, it takes the environment
|
|
912
|
+
* exclusively to mutate it (stage 3: unpacking a new test bundle,
|
|
913
|
+
* reinstalling its dependencies). Declared here so the engine's
|
|
914
|
+
* exclusivity rule is written once, not retrofitted around a later
|
|
915
|
+
* producer. */
|
|
916
|
+
type QueueTicketKind = RunKind | "maintenance";
|
|
917
|
+
/** Who put the ticket in. Diagnostics only — the engine never branches
|
|
918
|
+
* on it; the UI shows it so "why is my run waiting" has an answer. */
|
|
919
|
+
type QueueProducerKind = "cli" | "viewer" | "mcp" | "schedule" | "ci";
|
|
920
|
+
interface QueueProducer {
|
|
921
|
+
kind: QueueProducerKind;
|
|
922
|
+
/** Pid of the process that will EXECUTE the run — the ticket holder
|
|
923
|
+
* runs it itself, there is no dispatcher. */
|
|
924
|
+
pid: number;
|
|
925
|
+
/** `os.hostname()`. The queue is single-host by design (see the plan's
|
|
926
|
+
* non-goals); this is here to make a cross-host mistake visible
|
|
927
|
+
* instead of silent. */
|
|
928
|
+
host: string;
|
|
929
|
+
}
|
|
930
|
+
/** WHERE the tests come from, when that is not simply "the working
|
|
931
|
+
* directory". A box runs uploaded bundles: the ticket records which one
|
|
932
|
+
* AT THE MOMENT IT WAS QUEUED, so a run executes the code that was asked
|
|
933
|
+
* for even if the environment was pointed at another bundle while the
|
|
934
|
+
* ticket waited.
|
|
935
|
+
*
|
|
936
|
+
* Deliberately only the id: branch, commit and author are properties of
|
|
937
|
+
* the bundle, and the queue is not where anybody should read them from.
|
|
938
|
+
* Nothing about a project or a customer — see the plan's "the project
|
|
939
|
+
* axis is a box-layer concept". */
|
|
940
|
+
interface QueueTicketSource {
|
|
941
|
+
bundleId: string;
|
|
942
|
+
}
|
|
943
|
+
/** WHY the run was ordered, when a machine ordered it. Labels only: the
|
|
944
|
+
* queue never branches on any of this, the viewer prints it ("PR #412",
|
|
945
|
+
* "release-3.2") so a waiting ticket nobody recognises has an
|
|
946
|
+
* explanation, and the box uses it to withdraw the tickets a newer push
|
|
947
|
+
* to the same branch made pointless.
|
|
948
|
+
*
|
|
949
|
+
* Nothing here is trusted. `checkId` is opaque to everything but the
|
|
950
|
+
* provider that issued it — the queue carries it so a finished run can be
|
|
951
|
+
* reported back to the right check without a second index. */
|
|
952
|
+
interface QueueTicketCi {
|
|
953
|
+
provider: CiProviderId;
|
|
954
|
+
/** Repository the change belongs to, as the provider spells it. */
|
|
955
|
+
repo?: string;
|
|
956
|
+
branch?: string;
|
|
957
|
+
sha?: string;
|
|
958
|
+
/** Pull / merge request number. */
|
|
959
|
+
pr?: number;
|
|
960
|
+
/** The provider-side status this run reports into. */
|
|
961
|
+
checkId?: string;
|
|
962
|
+
}
|
|
963
|
+
/** One line naming the change a ticket belongs to: `PR #412`,
|
|
964
|
+
* `main@1a2b3c4`, or the provider when it carries neither. Lives here so
|
|
965
|
+
* the viewer's queue panel, the box's log and a CI recipe cannot each
|
|
966
|
+
* invent their own spelling of the same fact. */
|
|
967
|
+
declare function describeTicketCi(ci: QueueTicketCi): string;
|
|
968
|
+
/** What is ordered, and by whom. */
|
|
969
|
+
interface QueueTicket {
|
|
970
|
+
schemaVersion: number;
|
|
971
|
+
/** Generated by the PRODUCER before enqueueing, so it can return the
|
|
972
|
+
* id (and open the tab) without waiting for the run to start. */
|
|
973
|
+
runId: string;
|
|
974
|
+
kind: QueueTicketKind;
|
|
975
|
+
/** WHAT to run: the scenario / collection name, exactly as in
|
|
976
|
+
* `RunRequest` — and the `ref` the produced run carries in `RunMeta`.
|
|
977
|
+
* Not a git ref. */
|
|
978
|
+
ref: string;
|
|
979
|
+
/** Environment name; absent = base. Redundant with the queue
|
|
980
|
+
* directory, kept for readable diagnostics. */
|
|
981
|
+
env?: string;
|
|
982
|
+
priority: QueuePriority;
|
|
983
|
+
/** Cost in a global pool: a collection weighs its `workers`, a single
|
|
984
|
+
* scenario weighs 1. Clamped to the pool size by the engine — a
|
|
985
|
+
* collection with more workers than the pool has slots must still be
|
|
986
|
+
* able to run. Ignored when no global pool is configured. */
|
|
987
|
+
weight: number;
|
|
988
|
+
producer: QueueProducer;
|
|
989
|
+
/** Absent on every local run: the sources are the working directory. */
|
|
990
|
+
source?: QueueTicketSource;
|
|
991
|
+
/** Absent unless a machine with an opinion about a commit ordered this
|
|
992
|
+
* run. Additive: a reader that does not know the field ignores it. */
|
|
993
|
+
ci?: QueueTicketCi;
|
|
994
|
+
createdAt: number;
|
|
995
|
+
}
|
|
996
|
+
/** `<rank>-<base36 ms>-<rand>.json`. The name IS the queue order: rank
|
|
997
|
+
* first, then the enqueue timestamp, then a random tiebreak for two
|
|
998
|
+
* producers landing in the same millisecond.
|
|
999
|
+
*
|
|
1000
|
+
* Clock skew between producers is a documented non-problem: every
|
|
1001
|
+
* producer of one queue runs on one host (cross-host queues are a
|
|
1002
|
+
* non-goal), so they read the same clock. */
|
|
1003
|
+
declare function makeQueueTicketName(priority: QueuePriority, createdAt: number, random: string): string;
|
|
1004
|
+
interface ParsedTicketName {
|
|
1005
|
+
rank: number;
|
|
1006
|
+
priority: QueuePriority;
|
|
1007
|
+
createdAt: number;
|
|
1008
|
+
random: string;
|
|
1009
|
+
}
|
|
1010
|
+
/** Parse a ticket file name, or null when the entry is not one — a
|
|
1011
|
+
* half-written temp file, an editor's backup, a quarantined ticket.
|
|
1012
|
+
* Callers MUST skip nulls rather than guess: an unparseable name has no
|
|
1013
|
+
* position, and inventing one reorders the queue. */
|
|
1014
|
+
declare function parseQueueTicketName(name: string): ParsedTicketName | null;
|
|
1015
|
+
/** Total order over ticket names — priority, then FIFO. Plain string
|
|
1016
|
+
* comparison would do while every base36 timestamp is the same width
|
|
1017
|
+
* (it is, until 2059), but a width change must reorder rather than
|
|
1018
|
+
* silently sort `100` before `99`. */
|
|
1019
|
+
declare function compareQueueTicketNames(a: string, b: string): number;
|
|
1020
|
+
/** Structural validation of a ticket read off disk. Returns null for
|
|
1021
|
+
* anything we cannot trust — a torn write, a future schema version, a
|
|
1022
|
+
* file some other tool dropped in the directory. Null is not an error
|
|
1023
|
+
* for the caller: an unreadable ticket is treated as garbage and reaped
|
|
1024
|
+
* on its own staleness timer, never executed. */
|
|
1025
|
+
declare function parseQueueTicket(value: unknown): QueueTicket | null;
|
|
1026
|
+
/** What a producer asks for. Only `weight` is optional; the engine fills
|
|
1027
|
+
* the rest of the ticket (schema version, timestamp). */
|
|
1028
|
+
interface EnqueueRunInput {
|
|
1029
|
+
runId: string;
|
|
1030
|
+
kind: QueueTicketKind;
|
|
1031
|
+
ref: string;
|
|
1032
|
+
env?: string;
|
|
1033
|
+
priority: QueuePriority;
|
|
1034
|
+
weight?: number;
|
|
1035
|
+
producer: QueueProducer;
|
|
1036
|
+
source?: QueueTicketSource;
|
|
1037
|
+
ci?: QueueTicketCi;
|
|
1038
|
+
}
|
|
1039
|
+
/** A ticket that holds a slot. Released exactly once, by the holder. */
|
|
1040
|
+
interface RunQueueLease {
|
|
1041
|
+
readonly runId: string;
|
|
1042
|
+
readonly ticketName: string;
|
|
1043
|
+
/** Environment the holder MUST pass to the process that executes the
|
|
1044
|
+
* run, so its children (a collection's scenario subprocesses) bypass
|
|
1045
|
+
* the queue instead of deadlocking behind their own parent. */
|
|
1046
|
+
readonly env: Readonly<Record<string, string>>;
|
|
1047
|
+
release(): Promise<void>;
|
|
1048
|
+
/** Same, from a process that is about to exit and cannot await —
|
|
1049
|
+
* a signal handler. Without it a Ctrl-C'd run would hold its slot
|
|
1050
|
+
* until the staleness timer expires and block the next run for a
|
|
1051
|
+
* minute for no reason. */
|
|
1052
|
+
releaseSync(): void;
|
|
1053
|
+
}
|
|
1054
|
+
interface RunQueueTicketHandle {
|
|
1055
|
+
/** File name — also this ticket's identity in `DELETE /api/queue/:ticket`. */
|
|
1056
|
+
readonly name: string;
|
|
1057
|
+
readonly ticket: QueueTicket;
|
|
1058
|
+
/** Wait until this ticket owns a slot. Rejects with
|
|
1059
|
+
* `QueueTicketLostError` when the ticket is cancelled or reaped while
|
|
1060
|
+
* waiting, and with `QueueWaitAbortedError` when the caller's signal
|
|
1061
|
+
* fires (the ticket is withdrawn first, either way). */
|
|
1062
|
+
acquire(opts?: {
|
|
1063
|
+
signal?: AbortSignal;
|
|
1064
|
+
}): Promise<RunQueueLease>;
|
|
1065
|
+
/** Withdraw a still-waiting ticket. Idempotent. */
|
|
1066
|
+
cancel(): Promise<void>;
|
|
1067
|
+
}
|
|
1068
|
+
interface QueueEntry {
|
|
1069
|
+
name: string;
|
|
1070
|
+
ticket: QueueTicket;
|
|
1071
|
+
}
|
|
1072
|
+
interface QueuePoolState {
|
|
1073
|
+
total: number;
|
|
1074
|
+
used: number;
|
|
1075
|
+
}
|
|
1076
|
+
interface QueueSnapshot {
|
|
1077
|
+
/** Ordered exactly as the queue will serve them. */
|
|
1078
|
+
waiting: QueueEntry[];
|
|
1079
|
+
running: QueueEntry[];
|
|
1080
|
+
slots: QueuePoolState;
|
|
1081
|
+
/** Present only when a global pool is configured for this host. */
|
|
1082
|
+
global?: QueuePoolState;
|
|
1083
|
+
}
|
|
1084
|
+
interface IRunQueue {
|
|
1085
|
+
enqueue(input: EnqueueRunInput): Promise<RunQueueTicketHandle>;
|
|
1086
|
+
snapshot(): Promise<QueueSnapshot>;
|
|
1087
|
+
/** Withdraw a waiting ticket by file name. Returns false when the
|
|
1088
|
+
* ticket is already gone or already running. */
|
|
1089
|
+
cancel(ticketName: string): Promise<boolean>;
|
|
1090
|
+
/** Reap what died: stale tickets, stale leases, `running/` entries
|
|
1091
|
+
* with no lease behind them. Every producer runs this on its way
|
|
1092
|
+
* past, so a queue with any traffic needs no janitor. */
|
|
1093
|
+
sweep(): Promise<void>;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
/** Bumped when the manifest shape changes incompatibly. A box that meets
|
|
1097
|
+
* a higher version refuses the upload with a readable message instead of
|
|
1098
|
+
* guessing what a field it does not know means. */
|
|
1099
|
+
declare const BUNDLE_SCHEMA_VERSION = 1;
|
|
1100
|
+
/** The manifest, stored at the root of the archive so a bundle on disk
|
|
1101
|
+
* describes itself.
|
|
1102
|
+
*
|
|
1103
|
+
* It is NOT part of the content hash: it carries the `bundleId`, which
|
|
1104
|
+
* would otherwise have to predict its own hash. Everything the hash
|
|
1105
|
+
* covers is the suite; everything the manifest adds is provenance. */
|
|
1106
|
+
declare const BUNDLE_MANIFEST_FILE = "bundle.json";
|
|
1107
|
+
/** Upload endpoint, relative to the box origin:
|
|
1108
|
+
* `POST <origin>/api/box/bundles/<bundleId>` with the gzipped tar as the
|
|
1109
|
+
* body and `Authorization: Bearer <token>`.
|
|
1110
|
+
*
|
|
1111
|
+
* The id is in the PATH rather than derived from the body so the receiver
|
|
1112
|
+
* can answer "already have it" without reading a single byte of the
|
|
1113
|
+
* upload — re-pushing an unchanged suite is the common case (a CI job
|
|
1114
|
+
* runs on every push; most of them change nothing under `unotest/`). */
|
|
1115
|
+
declare const BUNDLE_UPLOAD_PATH = "/api/box/bundles";
|
|
1116
|
+
/** Box origin (`https://box.example.com`) and the upload token, for
|
|
1117
|
+
* people and CI jobs that would rather not repeat them on every command
|
|
1118
|
+
* line. Flags win over both. */
|
|
1119
|
+
declare const BOX_URL_ENV = "UNOTEST_BOX_URL";
|
|
1120
|
+
declare const BOX_TOKEN_ENV = "UNOTEST_BOX_TOKEN";
|
|
1121
|
+
/** Set by a box on every run it starts: which bundle the sources came
|
|
1122
|
+
* from. The runner stamps it into the run's manifest, so history keeps
|
|
1123
|
+
* the answer to "which code produced this" after the environment has
|
|
1124
|
+
* moved on. Never set locally — there is no bundle there. */
|
|
1125
|
+
declare const BUNDLE_ID_ENV = "UNOTEST_BUNDLE_ID";
|
|
1126
|
+
/** Where the code came from — provenance, never identity. A bundle is
|
|
1127
|
+
* identified by its CONTENT (see `bundleId`): the sha of a dirty working
|
|
1128
|
+
* tree is not unique, and two people can push different trees from the
|
|
1129
|
+
* same commit. */
|
|
1130
|
+
interface BundleGitInfo {
|
|
1131
|
+
/** Remote URL with any credential stripped by the packer. Absent when
|
|
1132
|
+
* the project has no remote. */
|
|
1133
|
+
repo?: string;
|
|
1134
|
+
branch?: string;
|
|
1135
|
+
sha?: string;
|
|
1136
|
+
/** Uncommitted changes at pack time. The viewer labels such a bundle
|
|
1137
|
+
* "wip" so nobody reads `branch@sha` as "this is what is on the
|
|
1138
|
+
* branch". */
|
|
1139
|
+
dirty: boolean;
|
|
1140
|
+
}
|
|
1141
|
+
interface BundleManifest {
|
|
1142
|
+
schemaVersion: number;
|
|
1143
|
+
/** Short HANDLE derived from the full content hash — see
|
|
1144
|
+
* `computeBundleId` in `@unotest/core`. Stable across repacks of an
|
|
1145
|
+
* identical tree, which is what makes a re-upload a no-op. Directory
|
|
1146
|
+
* names, URLs and run manifests carry this. */
|
|
1147
|
+
bundleId: string;
|
|
1148
|
+
/** FULL sha256 of the payload tree — the integrity anchor a box
|
|
1149
|
+
* verifies whole after unpacking (64 bits of `bundleId` name a
|
|
1150
|
+
* bundle; 256 bits guarantee it). Optional only because a manifest
|
|
1151
|
+
* written by a pre-release packer lacks it. */
|
|
1152
|
+
sha256?: string;
|
|
1153
|
+
createdAt: number;
|
|
1154
|
+
/** The `@unotest/web` the bundle pins, read from its own package.json.
|
|
1155
|
+
* The box installs exactly this (`npm ci`) and checks it against its
|
|
1156
|
+
* minimum before storing anything: a suite pinned to a version older
|
|
1157
|
+
* than the box supports is refused at upload, where a human is still
|
|
1158
|
+
* watching, instead of failing on a nightly run. */
|
|
1159
|
+
webVersion: string;
|
|
1160
|
+
/** Who packed it, for the "who switched the environment" banner.
|
|
1161
|
+
* `git config user.email`, falling back to the OS user. */
|
|
1162
|
+
author?: string;
|
|
1163
|
+
git?: BundleGitInfo;
|
|
1164
|
+
/** NAMES of the externals the suite declares (`.env` / `.secrets` key
|
|
1165
|
+
* names). Values never travel — they belong to the environment a box
|
|
1166
|
+
* runs the suite in — so the names are what lets a box answer "nothing
|
|
1167
|
+
* here can supply LOGIN" at upload instead of an hour later. Optional:
|
|
1168
|
+
* a bundle packed by an older CLI carries none. */
|
|
1169
|
+
declaredVariables?: string[];
|
|
1170
|
+
/** Payload size, excluding this manifest. Diagnostics and limits — a
|
|
1171
|
+
* box states its cap in these terms. */
|
|
1172
|
+
fileCount: number;
|
|
1173
|
+
byteSize: number;
|
|
1174
|
+
}
|
|
1175
|
+
/** Structural validation of a manifest read off disk or off the wire.
|
|
1176
|
+
* Null for anything we cannot trust — a torn write, a newer schema, a
|
|
1177
|
+
* file that is not a manifest at all. Callers treat null as "this is not
|
|
1178
|
+
* a bundle", never as "assume defaults": a bundle whose provenance we
|
|
1179
|
+
* invented would show a branch nobody pushed. */
|
|
1180
|
+
declare function parseBundleManifest(value: unknown): BundleManifest | null;
|
|
1181
|
+
/** One-line provenance for a UI or a log: `main@1a2b3c4`, `main@1a2b3c4
|
|
1182
|
+
* (wip)`, or the bundle id when the tree had no git at all. Lives here
|
|
1183
|
+
* so the CLI, the viewer and the box daemon cannot each invent their own
|
|
1184
|
+
* spelling of the same fact. */
|
|
1185
|
+
declare function describeBundle(manifest: BundleManifest): string;
|
|
1186
|
+
/** `created` — the box stored it now; `exists` — same content hash was
|
|
1187
|
+
* already there and the upload was a no-op. Both are success: a CI job
|
|
1188
|
+
* that pushes an unchanged suite must not go red. */
|
|
1189
|
+
type BundleUploadStatus = "created" | "exists";
|
|
1190
|
+
/** An environment on the box that would not be able to RUN this suite:
|
|
1191
|
+
* the bundle declares external variables (its `.env.example` /
|
|
1192
|
+
* `.secrets.example` keys) that the environment neither sets nor holds
|
|
1193
|
+
* as a secret.
|
|
1194
|
+
*
|
|
1195
|
+
* Reported at UPLOAD, where a person is still watching, rather than as a
|
|
1196
|
+
* red suite an hour later — the values live with the environment by
|
|
1197
|
+
* design and no bundle can carry them, so "you pushed fine, and nothing
|
|
1198
|
+
* here can run it" is exactly what the box knows and the pusher does
|
|
1199
|
+
* not. Never fatal: a suite may legitimately not use every key it
|
|
1200
|
+
* declares. */
|
|
1201
|
+
interface BundleVariableGap {
|
|
1202
|
+
/** Project on the box — half of the `<project>/<environment>` target an
|
|
1203
|
+
* operator types, so the advice can be copied rather than assembled. */
|
|
1204
|
+
project: string;
|
|
1205
|
+
/** Environment name within the project (`prod`, `staging`). */
|
|
1206
|
+
environment: string;
|
|
1207
|
+
/** Declared by the bundle, provided by neither variables nor secrets. */
|
|
1208
|
+
missing: string[];
|
|
1209
|
+
}
|
|
1210
|
+
interface BundleUploadOk {
|
|
1211
|
+
status: BundleUploadStatus;
|
|
1212
|
+
bundleId: string;
|
|
1213
|
+
/** Present only when something is missing somewhere. */
|
|
1214
|
+
variableGaps?: BundleVariableGap[];
|
|
1215
|
+
}
|
|
1216
|
+
/** Why an upload was refused. A code, not a message, because the CLI
|
|
1217
|
+
* turns each into its own advice — and because matching on message text
|
|
1218
|
+
* is exactly the string-match error handling the monorepo forbids. */
|
|
1219
|
+
type BundleUploadErrorCode =
|
|
1220
|
+
/** Missing, unknown or revoked token. */
|
|
1221
|
+
"unauthorized"
|
|
1222
|
+
/** Bigger than the box accepts. */
|
|
1223
|
+
| "too-large"
|
|
1224
|
+
/** Not a readable bundle: broken gzip/tar, no manifest, bad manifest. */
|
|
1225
|
+
| "malformed"
|
|
1226
|
+
/** The content hash of what arrived is not the id it was sent under —
|
|
1227
|
+
* a truncated upload or a proxy that rewrote the body. */
|
|
1228
|
+
| "id-mismatch"
|
|
1229
|
+
/** The bundle pins an `@unotest/web` older than this box supports. */
|
|
1230
|
+
| "min-version"
|
|
1231
|
+
/** The token's scope does not match where the bundle says it is from. */
|
|
1232
|
+
| "scope-mismatch"
|
|
1233
|
+
/** The box could not store it (disk, permissions). Retryable. */
|
|
1234
|
+
| "storage";
|
|
1235
|
+
interface BundleUploadError {
|
|
1236
|
+
error: {
|
|
1237
|
+
code: BundleUploadErrorCode;
|
|
1238
|
+
message: string;
|
|
1239
|
+
};
|
|
1240
|
+
}
|
|
1241
|
+
type BundleUploadResponse = BundleUploadOk | BundleUploadError;
|
|
1242
|
+
/** Parse a box's answer. Null when the body is not one of ours at all —
|
|
1243
|
+
* a proxy's HTML error page, a captive portal — which the caller reports
|
|
1244
|
+
* as "that URL is not a box" rather than as a bundle problem. */
|
|
1245
|
+
declare function parseBundleUploadResponse(value: unknown): BundleUploadResponse | null;
|
|
1246
|
+
|
|
1247
|
+
declare const WORKSPACE_SCHEMA_VERSION = 1;
|
|
1248
|
+
/** Written by the host beside the artifacts it manages:
|
|
1249
|
+
* `<artifactsRoot>/unotest/.workspace.json`. In the artifact tree and
|
|
1250
|
+
* not in the sources, because the sources are a bundle — immutable,
|
|
1251
|
+
* shared between environments, and replaced under this very file. */
|
|
1252
|
+
declare const WORKSPACE_FILE = ".workspace.json";
|
|
1253
|
+
interface WorkspaceBundle {
|
|
1254
|
+
bundleId: string;
|
|
1255
|
+
/** Ready to print: `main@1a2b3c4`, `main@1a2b3c4 (wip)`, or the id. */
|
|
1256
|
+
label: string;
|
|
1257
|
+
branch?: string;
|
|
1258
|
+
sha?: string;
|
|
1259
|
+
/** Packed from a working tree with uncommitted changes. */
|
|
1260
|
+
dirty: boolean;
|
|
1261
|
+
author?: string;
|
|
1262
|
+
createdAt: number;
|
|
1263
|
+
/** `@unotest/web` this bundle pinned — what its runs execute on. */
|
|
1264
|
+
webVersion: string;
|
|
1265
|
+
}
|
|
1266
|
+
interface WorkspaceFile {
|
|
1267
|
+
schemaVersion: number;
|
|
1268
|
+
/** Human label of what this viewer serves, e.g. `acme/test`. Opaque to
|
|
1269
|
+
* the viewer: it prints it and never parses it. */
|
|
1270
|
+
workspace: string;
|
|
1271
|
+
/** Environment name — the `.runs.<env>` suffix this viewer reads. */
|
|
1272
|
+
environment: string;
|
|
1273
|
+
/** Whether switching bundles is offered at all. False where what is
|
|
1274
|
+
* deployed is the point (a release environment follows its branch). */
|
|
1275
|
+
allowSwitch: boolean;
|
|
1276
|
+
/** What the environment runs now. Absent before the first push. */
|
|
1277
|
+
currentBundleId?: string;
|
|
1278
|
+
/** Who pointed it there, and when — the banner on a shared
|
|
1279
|
+
* environment, where "why did the tests change" needs an answer. */
|
|
1280
|
+
switchedBy?: string;
|
|
1281
|
+
switchedAt?: number;
|
|
1282
|
+
/** Bundles available to switch to, newest first. */
|
|
1283
|
+
bundles: WorkspaceBundle[];
|
|
1284
|
+
/** NAMES of the values the host injects into every run here. Names
|
|
1285
|
+
* only, always: the values (and every secret among them) belong to the
|
|
1286
|
+
* host and never travel to a browser. */
|
|
1287
|
+
variables: string[];
|
|
1288
|
+
secrets: string[];
|
|
1289
|
+
/** Where to POST `{ bundleId }` to switch, relative to the page's own
|
|
1290
|
+
* origin. Absent when switching is not offered. */
|
|
1291
|
+
switchPath?: string;
|
|
1292
|
+
}
|
|
1293
|
+
/** Null for anything we cannot trust — a torn write, a newer schema, a
|
|
1294
|
+
* file that is not ours. Null means "no host", i.e. exactly the local
|
|
1295
|
+
* viewer: the bundle UI stays hidden rather than half-populated. */
|
|
1296
|
+
declare function parseWorkspaceFile(value: unknown): WorkspaceFile | null;
|
|
1297
|
+
|
|
1298
|
+
/** One scheduled run of one collection. */
|
|
1299
|
+
interface ScheduleEntry {
|
|
1300
|
+
/** Collection name — the file stem under `_collections/`. */
|
|
1301
|
+
collection: string;
|
|
1302
|
+
/** Standard 5-field cron expression, interpreted by whoever executes
|
|
1303
|
+
* the schedule. Opaque to every public package. */
|
|
1304
|
+
cron: string;
|
|
1305
|
+
/** Environment name (`.env.<name>` overlay + `.runs<suffix>.<name>`
|
|
1306
|
+
* artifact root) the run happens in. Absent = base. */
|
|
1307
|
+
env?: string;
|
|
1308
|
+
/** Shell command run BEFORE the collection, inside the same queue
|
|
1309
|
+
* slot: seeding a database, resetting a fixture. A failure means the
|
|
1310
|
+
* environment was not prepared — a different thing from a red suite,
|
|
1311
|
+
* and reported as such (see `PREPARE_FAILED_EXIT` in `@unotest/web`). */
|
|
1312
|
+
prepare?: string;
|
|
1313
|
+
/** `workers` of the collection's OWN manifest — resolved by
|
|
1314
|
+
* `unotest-web schedules --json`, never written in `unotest.config`:
|
|
1315
|
+
* the yaml stays the single authority on parallelism. Carried here so
|
|
1316
|
+
* an executor can weigh the run's queue ticket (a suite costs its
|
|
1317
|
+
* worker count in a host-wide pool) without parsing yaml itself.
|
|
1318
|
+
* Absent when the manifest declares none, or does not exist. */
|
|
1319
|
+
workers?: number;
|
|
1320
|
+
}
|
|
1321
|
+
/** Structural validation of one entry read from JSON. Null for anything
|
|
1322
|
+
* we cannot trust — a consumer skips it rather than scheduling a run it
|
|
1323
|
+
* does not understand. A malformed `workers` is dropped alone (the
|
|
1324
|
+
* engine's weight then defaults to 1) — losing a weight is recoverable,
|
|
1325
|
+
* losing a schedule is a suite that silently stops running. */
|
|
1326
|
+
declare function parseScheduleEntry(value: unknown): ScheduleEntry | null;
|
|
1327
|
+
/** Parse the whole `schedules --json` payload. Null when the text is not
|
|
1328
|
+
* a JSON array — the caller reports "could not read the schedules"
|
|
1329
|
+
* rather than silently running nothing. Entries that fail validation
|
|
1330
|
+
* are dropped individually and counted by the caller. */
|
|
1331
|
+
declare function parseSchedulesJson(text: string): ScheduleEntry[] | null;
|
|
1332
|
+
|
|
747
1333
|
/** Blob root under the runs root. Leading underscore for the same reason
|
|
748
1334
|
* as `_scenarios`: derived, internal, and can never be mistaken for a
|
|
749
1335
|
* `YYYY` shard directory. */
|
|
@@ -804,6 +1390,17 @@ interface CollectionMeta {
|
|
|
804
1390
|
* is absent (callers default to 1 = sequential). A CLI `--workers`
|
|
805
1391
|
* flag overrides this value for one run. */
|
|
806
1392
|
workers: number | null;
|
|
1393
|
+
/** Optional `prepare:` from the YAML — a shell command that readies the
|
|
1394
|
+
* environment (seeding a database, resetting a fixture) before the
|
|
1395
|
+
* suite runs, inside the same queue slot.
|
|
1396
|
+
*
|
|
1397
|
+
* It belongs to the COLLECTION, not to a schedule: a suite that needs
|
|
1398
|
+
* seeded fixtures needs them however it was started. Before this, a
|
|
1399
|
+
* `prepare` could only live in a `schedules` entry, so the same
|
|
1400
|
+
* collection run from CI, from the viewer or by hand was red on a box
|
|
1401
|
+
* for the want of a table. A schedules entry may still name its own
|
|
1402
|
+
* `prepare` (it wins for that tick), and `--no-prepare` skips it. */
|
|
1403
|
+
prepare: string | null;
|
|
807
1404
|
}
|
|
808
1405
|
|
|
809
1406
|
declare const RUN_MANIFEST_FILE = "manifest.json";
|
|
@@ -845,6 +1442,14 @@ interface RunManifest {
|
|
|
845
1442
|
console: boolean;
|
|
846
1443
|
network: boolean;
|
|
847
1444
|
};
|
|
1445
|
+
/** Which test bundle produced this run, when the sources came from one
|
|
1446
|
+
* (`UNOTEST_BUNDLE_ID`, set by a box). Absent for every local run,
|
|
1447
|
+
* where the sources are simply the working directory.
|
|
1448
|
+
*
|
|
1449
|
+
* Recorded so history stays readable after the fact: a box runs many
|
|
1450
|
+
* bundles into one environment, and "which code produced this red
|
|
1451
|
+
* run" is otherwise unanswerable once the environment moved on. */
|
|
1452
|
+
bundleId?: string;
|
|
848
1453
|
}
|
|
849
1454
|
|
|
850
1455
|
/** Snapshot file holding entry + every helper source that was loaded. */
|
|
@@ -1455,6 +2060,14 @@ interface EnvChangedMessage {
|
|
|
1455
2060
|
kind: "env:changed";
|
|
1456
2061
|
env?: string;
|
|
1457
2062
|
}
|
|
2063
|
+
/** Emitted when the run queue changed — a ticket was added, claimed,
|
|
2064
|
+
* cancelled or reaped. Carries no payload: producers other than this
|
|
2065
|
+
* viewer (a terminal, an agent) change the queue too, so the only
|
|
2066
|
+
* trustworthy answer is the directory itself. Clients refetch
|
|
2067
|
+
* `/api/queue`, exactly like `fs:bp-changed`. */
|
|
2068
|
+
interface QueueChangedMessage {
|
|
2069
|
+
kind: "queue:changed";
|
|
2070
|
+
}
|
|
1458
2071
|
/** A single line of stdout or stderr captured from a runner child the
|
|
1459
2072
|
* viewer-server spawned. Logs always carry a `runId` so the browser
|
|
1460
2073
|
* attaches them to the right run-pane. */
|
|
@@ -1472,7 +2085,7 @@ interface ErrorMessage {
|
|
|
1472
2085
|
message: string;
|
|
1473
2086
|
}
|
|
1474
2087
|
/** Discriminated union of every WS message the server emits to clients. */
|
|
1475
|
-
type WsMessage = FsScenariosChangedMessage | FsHelpersChangedMessage | FsCollectionsChangedMessage | FsBreakpointsChangedMessage | FsRunStartedMessage | FsRunStepMessage | FsCollectionRunStepMessage | FsRunFinishedMessage | EnvChangedMessage | LogLineMessage | ErrorMessage;
|
|
2088
|
+
type WsMessage = FsScenariosChangedMessage | FsHelpersChangedMessage | FsCollectionsChangedMessage | FsBreakpointsChangedMessage | FsRunStartedMessage | FsRunStepMessage | FsCollectionRunStepMessage | FsRunFinishedMessage | EnvChangedMessage | QueueChangedMessage | LogLineMessage | ErrorMessage;
|
|
1476
2089
|
/** All WS message `kind` literals as a union type — useful for handler
|
|
1477
2090
|
* registries (`Record<WsMessageKind, Handler>`). */
|
|
1478
2091
|
type WsMessageKind = WsMessage["kind"];
|
|
@@ -1705,4 +2318,4 @@ declare const JUDGE_ENV: {
|
|
|
1705
2318
|
readonly skipPreflight: "UNOTEST_JUDGE_SKIP_PREFLIGHT";
|
|
1706
2319
|
};
|
|
1707
2320
|
|
|
1708
|
-
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, JUDGE_ENV, JUDGE_ROUTES, type JudgeErrorResponse, type JudgeHealthResponse, type JudgeRequest, type JudgeVerdict, type JudgeVerdictEvent, LOCK_FILE, LOG_FILE, type LaunchSpec, type LocatorPickedEvent, type LockFile, type LogLineMessage, type Matcher, type OverviewTab, 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 };
|
|
2321
|
+
export { ARTIFACTS_ROOT_ENV, type AddVariablePlan, type AddVariablePlanInput, type AppPathPickerSpec, type AppServerEvent, type AuthoringRunRequest, BLOBS_DIR, BOX_TOKEN_ENV, BOX_URL_ENV, BUNDLE_ID_ENV, BUNDLE_MANIFEST_FILE, BUNDLE_SCHEMA_VERSION, BUNDLE_UPLOAD_PATH, type BreakpointEntry, type BreakpointsFile, type BundleGitInfo, type BundleManifest, type BundleUploadError, type BundleUploadErrorCode, type BundleUploadOk, type BundleUploadResponse, type BundleUploadStatus, type BundleVariableGap, CI_RUN_PATH, COLLECTIONS_SUBDIR, COLLECTION_NAME_FORBIDDEN_RE, COMMANDS_FILE, type CheckSeverity, type CiProviderId, type CiQueuedRun, type CiRunAccepted, type CiRunError, type CiRunErrorCode, type CiRunRequest, type CiRunResponse, 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 EnqueueRunInput, 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 IRunQueue, type IRunnerAdapter, InvalidBlobHashError, JUDGE_ENV, JUDGE_ROUTES, type JudgeErrorResponse, type JudgeHealthResponse, type JudgeRequest, type JudgeVerdict, type JudgeVerdictEvent, LOCK_FILE, LOG_FILE, type LaunchSpec, type LocatorPickedEvent, type LockFile, type LogLineMessage, type Matcher, type OverviewTab, PICKER_SNAPSHOT_FILE, type ParsedTicketName, type PausedEvent, type PickerMode, type ProbeMatch, type ProbePinned, type ProbeResult, type ProbeResultEvent, QUEUE_DISABLED_ENV, QUEUE_GLOBAL_DIR_ENV, QUEUE_GLOBAL_SLOTS_ENV, QUEUE_LEASE_ENV, QUEUE_MUTEX_FILE, QUEUE_PRIORITIES, QUEUE_RUNNING_DIR, QUEUE_SCHEMA_VERSION, QUEUE_SLOTS_DIR, QUEUE_SUBDIR, QUEUE_TICKETS_DIR, type QueueChangedMessage, type QueueEntry, type QueuePoolState, type QueuePriority, type QueueProducer, type QueueProducerKind, type QueueSnapshot, type QueueTicket, type QueueTicketCi, type QueueTicketKind, type QueueTicketSource, RUNNER_CONFIG_KEYS, 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 RunQueueLease, type RunQueueTicketHandle, 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 ScheduleEntry, 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, WORKSPACE_FILE, WORKSPACE_SCHEMA_VERSION, type WheelChangedEvent, type WorkspaceBundle, type WorkspaceFile, type WsMessage, type WsMessageKind, activeEnvName, artifactsRootFrom, blobPathFor, blobRelPathFor, blobRelSegmentsFor, blobsRootFor, categorizeVariable, compareQueueTicketNames, debugDirFor, debuggerFileFor, deleteShadowWarning, describeBundle, describeTicketCi, envFileFor, envKeys, envLayerFilesFor, envNamesFromDirListing, foldScenarioRun, insertEnvVar, isAnnotationLine, isExternalVarName, isFailingStatus, isQueueDirName, isRecord, isRegexLiteral, isRunnerConfigKey, isRunsDirName, isTerminalRuntimeState, makeQueueTicketName, makeRunId, parseAppServerEvent, parseBundleManifest, parseBundleUploadResponse, parseCiProvider, parseCiRunRequest, parseCiRunResponse, parseEnvContent, parseQueueTicket, parseQueueTicketName, parseScenarioAnnotations, parseScheduleEntry, parseSchedulesJson, parseWorkspaceFile, planAddVariable, projectQueueRoot, projectRunDirFor, projectRunsRoot, queueDirFor, queuePriorityFromRank, queuePriorityRank, 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 _0x48998b=_0x3a78;(function(_0x4b5ee6,_0x37527c){const _0x1b2dee={_0x311c97:0x1eb,_0x16342b:0x229,_0x36f585:0x1ce,_0x5c7055:0x1f2,_0x3b7b07:0x206,_0x26d02d:0x18e,_0x56072a:0x1c8},_0x502c5a=_0x3a78,_0x2129ad=_0x4b5ee6();while(!![]){try{const _0x3a2d30=parseInt(_0x502c5a(0x1f4))/0x1*(parseInt(_0x502c5a(0x1da))/0x2)+parseInt(_0x502c5a(_0x1b2dee._0x311c97))/0x3*(-parseInt(_0x502c5a(_0x1b2dee._0x16342b))/0x4)+-parseInt(_0x502c5a(_0x1b2dee._0x36f585))/0x5*(-parseInt(_0x502c5a(0x1d8))/0x6)+-parseInt(_0x502c5a(0x190))/0x7*(-parseInt(_0x502c5a(_0x1b2dee._0x5c7055))/0x8)+parseInt(_0x502c5a(0x175))/0x9*(parseInt(_0x502c5a(_0x1b2dee._0x3b7b07))/0xa)+parseInt(_0x502c5a(_0x1b2dee._0x26d02d))/0xb*(parseInt(_0x502c5a(_0x1b2dee._0x56072a))/0xc)+-parseInt(_0x502c5a(0x1e7))/0xd*(parseInt(_0x502c5a(0x1a5))/0xe);if(_0x3a2d30===_0x37527c)break;else _0x2129ad['push'](_0x2129ad['shift']());}catch(_0x4b2b18){_0x2129ad['push'](_0x2129ad['shift']());}}}(_0x5be3,0xd6fe4));var __defProp=Object['defineProperty'],__name=(_0x5d24f8,_0x221ed9)=>__defProp(_0x5d24f8,_0x48998b(0x18b),{'value':_0x221ed9,'configurable':!![]});function parseAppServerEvent(_0x2dbd71){const _0x2ef7ed={_0xde2658:0x216,_0x15d8e4:0x17a,_0x3bfc85:0x204,_0x4fc71a:0x1fb,_0x2d34e7:0x17a,_0x144e1a:0x1c9},_0x2d504b=_0x48998b,_0x1dc19f=_0x2dbd71[_0x2d504b(0x17b)]();if(!_0x1dc19f[_0x2d504b(_0x2ef7ed._0xde2658)]('{'))return null;try{const _0x4a816d=JSON[_0x2d504b(0x20d)](_0x1dc19f);if(_0x4a816d[_0x2d504b(_0x2ef7ed._0x15d8e4)]===_0x2d504b(_0x2ef7ed._0x3bfc85)||_0x4a816d[_0x2d504b(_0x2ef7ed._0x15d8e4)]===_0x2d504b(_0x2ef7ed._0x4fc71a)||_0x4a816d[_0x2d504b(_0x2ef7ed._0x2d34e7)]===_0x2d504b(_0x2ef7ed._0x144e1a))return _0x4a816d;return null;}catch{return null;}}__name(parseAppServerEvent,'parseAppServerEvent');var UNOTEST_DIR=_0x48998b(0x186),E2E_SUBDIR=_0x48998b(0x1d4),HELPERS_SUBDIR=_0x48998b(0x210),COLLECTIONS_SUBDIR=_0x48998b(0x208),RUNS_SUBDIR=_0x48998b(0x18d),SNAPSHOTS_SUBDIR=_0x48998b(0x222);function testDirFor(_0x23a893){return''+E2E_SUBDIR+_0x23a893;}__name(testDirFor,_0x48998b(0x19b));function runsDirFor(_0x3d5309,_0x509b74){return''+RUNS_SUBDIR+_0x3d5309+(_0x509b74?'.'+_0x509b74:'');}__name(runsDirFor,_0x48998b(0x22d));function isRunsDirName(_0x50beb5){const _0x171f6d={_0x5a38e5:0x216},_0x5cb8ce=_0x48998b;return _0x50beb5===RUNS_SUBDIR||_0x50beb5[_0x5cb8ce(_0x171f6d._0x5a38e5)](RUNS_SUBDIR+'-')||_0x50beb5[_0x5cb8ce(0x216)](RUNS_SUBDIR+'.');}__name(isRunsDirName,'isRunsDirName');function debugDirFor(_0x391af7){return'.debug'+_0x391af7;}__name(debugDirFor,_0x48998b(0x1b6));function debuggerFileFor(_0x561a83){const _0x4a9d3b={_0x1970d6:0x213,_0x596d4b:0x1d9},_0x123268=_0x48998b;return UNOTEST_DIR+_0x123268(_0x4a9d3b._0x1970d6)+_0x561a83+_0x123268(_0x4a9d3b._0x596d4b);}__name(debuggerFileFor,'debuggerFileFor');var LOCK_FILE=_0x48998b(0x16d),LOG_FILE=_0x48998b(0x1b3),STEPS_FILE=_0x48998b(0x1ed),HEARTBEAT_FILE=_0x48998b(0x18a),DAY_INDEX_FILE=_0x48998b(0x1e6),SCENARIOS_INDEX_DIR=_0x48998b(0x1ea),SCENARIOS_LATEST_FILE=_0x48998b(0x1cf),STDOUT_FILE=_0x48998b(0x227),STDERR_FILE=_0x48998b(0x1bb),COMMANDS_FILE='commands.jsonl',RUNTIME_FILE=_0x48998b(0x1b8),PICKER_SNAPSHOT_FILE=_0x48998b(0x1cd),ENV_FILE='unotest/.env',SECRETS_FILE=_0x48998b(0x197);function envFileFor(_0xec4686,_0x4becbf){return''+ENV_FILE+_0xec4686+(_0x4becbf?'.'+_0x4becbf:'');}__name(envFileFor,_0x48998b(0x1e1));function secretsFileFor(_0x9da832,_0x48a63d){return''+SECRETS_FILE+_0x9da832+(_0x48a63d?'.'+_0x48a63d:'');}__name(secretsFileFor,_0x48998b(0x1b7));function envLayerFilesFor(_0x2d190c,_0x4e5b6e){return layersFor(ENV_FILE,_0x2d190c,_0x4e5b6e);}__name(envLayerFilesFor,_0x48998b(0x202));function secretsLayerFilesFor(_0x2d4093,_0x12f057){return layersFor(SECRETS_FILE,_0x2d4093,_0x12f057);}__name(secretsLayerFilesFor,_0x48998b(0x182));function layersFor(_0x356632,_0x405347,_0x40bc27){const _0x4befc0={_0x175955:0x1a6},_0x592b79=_0x48998b,_0xed3bad=[_0x356632];if(_0x405347)_0xed3bad['push'](''+_0x356632+_0x405347);if(_0x40bc27){_0xed3bad[_0x592b79(_0x4befc0._0x175955)](_0x356632+'.'+_0x40bc27);if(_0x405347)_0xed3bad[_0x592b79(_0x4befc0._0x175955)](''+_0x356632+_0x405347+'.'+_0x40bc27);}return _0xed3bad;}__name(layersFor,_0x48998b(0x1e2));function activeEnvName(_0x19273d){const _0x8e051e={_0x296c69:0x1d7},_0x32b468=_0x48998b,_0x114829=_0x19273d[_0x32b468(_0x8e051e._0x296c69)]?.[_0x32b468(0x17b)]();return _0x114829?_0x114829:void 0x0;}__name(activeEnvName,'activeEnvName');var RESERVED_ENV_NAMES=new Set(['example',_0x48998b(0x1b9),_0x48998b(0x1a7)]);function _0x3a78(_0x12d6b1,_0x6c5c09){_0x12d6b1=_0x12d6b1-0x16c;const _0x5be382=_0x5be3();let _0x3a7895=_0x5be382[_0x12d6b1];if(_0x3a78['kddBaa']===undefined){var _0x7d973a=function(_0x290a77){const _0x3a773f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5d24f8='',_0x221ed9='';for(let _0x2dbd71=0x0,_0x1dc19f,_0x4a816d,_0x23a893=0x0;_0x4a816d=_0x290a77['charAt'](_0x23a893++);~_0x4a816d&&(_0x1dc19f=_0x2dbd71%0x4?_0x1dc19f*0x40+_0x4a816d:_0x4a816d,_0x2dbd71++%0x4)?_0x5d24f8+=String['fromCharCode'](0xff&_0x1dc19f>>(-0x2*_0x2dbd71&0x6)):0x0){_0x4a816d=_0x3a773f['indexOf'](_0x4a816d);}for(let _0x3d5309=0x0,_0x509b74=_0x5d24f8['length'];_0x3d5309<_0x509b74;_0x3d5309++){_0x221ed9+='%'+('00'+_0x5d24f8['charCodeAt'](_0x3d5309)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x221ed9);};_0x3a78['RJrkXx']=_0x7d973a,_0x3a78['UfDpOr']={},_0x3a78['kddBaa']=!![];}const _0xbcc5ed=_0x5be382[0x0],_0x30c822=_0x12d6b1+_0xbcc5ed,_0x1f43de=_0x3a78['UfDpOr'][_0x30c822];return!_0x1f43de?(_0x3a7895=_0x3a78['RJrkXx'](_0x3a7895),_0x3a78['UfDpOr'][_0x30c822]=_0x3a7895):_0x3a7895=_0x1f43de,_0x3a7895;}function envNamesFromDirListing(_0x57b8e9,_0x5eb081){const _0xd6861a={_0x4926e1:0x177,_0x4f3fa5:0x170,_0x3948f9:0x228},_0x27dfec=_0x48998b,_0x165561=[_0x27dfec(0x212),_0x27dfec(0x1f8)][_0x27dfec(_0xd6861a._0x4926e1)](_0xbfe117=>_0x5eb081?[_0xbfe117,''+_0xbfe117+_0x5eb081]:[_0xbfe117]),_0x135a3d=new Set();for(const _0x386cfa of _0x57b8e9){for(const _0x4cc7df of _0x165561){const _0x609b39=_0x4cc7df+'.';if(!_0x386cfa[_0x27dfec(0x216)](_0x609b39))continue;const _0x5336a1=_0x386cfa[_0x27dfec(0x1cc)](_0x609b39['length']);if(!_0x5336a1||_0x5336a1['includes']('/'))continue;if(RESERVED_ENV_NAMES[_0x27dfec(_0xd6861a._0x4f3fa5)](_0x5336a1))continue;_0x135a3d['add'](_0x5336a1);}}return[..._0x135a3d][_0x27dfec(_0xd6861a._0x3948f9)]();}__name(envNamesFromDirListing,_0x48998b(0x16c));function isRegexLiteral(_0x332ef8){const _0x205561={_0x1990d5:0x17a,_0x526a56:0x1c1},_0x498fa6=_0x48998b;return typeof _0x332ef8===_0x498fa6(0x1a8)&&_0x332ef8!==null&&_0x332ef8[_0x498fa6(_0x205561._0x1990d5)]===_0x498fa6(0x22b)&&typeof _0x332ef8[_0x498fa6(0x1de)]===_0x498fa6(_0x205561._0x526a56)&&typeof _0x332ef8[_0x498fa6(0x218)]===_0x498fa6(_0x205561._0x526a56);}__name(isRegexLiteral,_0x48998b(0x224));function regexLiteral(_0x3d04b8,_0x43a3c0=''){return{'kind':'regex','source':_0x3d04b8,'flags':_0x43a3c0};}__name(regexLiteral,'regexLiteral');var RAND_BYTES=0x6;function makeRunId(_0x184f45){const _0x5a90a9={_0x1b8b66:0x1fd,_0x20af26:0x1ac,_0x50d376:0x1c3,_0x589fd8:0x214},_0x4e571a=_0x48998b,_0x5d9cd1=sanitizeRunIdSegment(_0x184f45),_0x5a0497=Date[_0x4e571a(_0x5a90a9._0x1b8b66)]()['toString'](0x24),_0x32f0d3=new Uint8Array(RAND_BYTES);globalThis[_0x4e571a(_0x5a90a9._0x20af26)][_0x4e571a(0x1b1)](_0x32f0d3);let _0x152bf3='';for(let _0x20eab5=0x0;_0x20eab5<_0x32f0d3[_0x4e571a(_0x5a90a9._0x50d376)];_0x20eab5++){_0x152bf3+=_0x32f0d3[_0x20eab5][_0x4e571a(_0x5a90a9._0x589fd8)](0x10)['padStart'](0x2,'0');}return _0x5d9cd1+'-'+_0x5a0497+'-'+_0x152bf3;}__name(makeRunId,_0x48998b(0x16e));function sanitizeRunIdSegment(_0x291701){const _0x34c6d3={_0x5367f6:0x19c},_0x343271=_0x48998b,_0x336689=_0x291701[_0x343271(_0x34c6d3._0x5367f6)](/[^a-zA-Z0-9_-]+/g,'-')['replace'](/-+/g,'-')[_0x343271(0x19c)](/^-|-$/g,'');return _0x336689[_0x343271(0x1c3)]>0x0?_0x336689:'run';}__name(sanitizeRunIdSegment,'sanitizeRunIdSegment');var RANDOM_SUFFIX_RE=/^[0-9a-f]{6,}$/,MIN_PLAUSIBLE_MS=Date[_0x48998b(0x1d0)](0x7e4,0x0,0x1),MAX_PLAUSIBLE_MS=Date[_0x48998b(0x1d0)](0x834,0x0,0x1);function runIdStartedAt(_0x1c4630){const _0x1db9b4={_0x19c9af:0x1c3,_0x212115:0x22e,_0x5947e9:0x1b0},_0x4dbb5f=_0x48998b,_0x5be9c7=_0x1c4630[_0x4dbb5f(0x223)]('-');if(_0x5be9c7[_0x4dbb5f(_0x1db9b4._0x19c9af)]<0x3)return null;const _0x39b0d0=_0x5be9c7[_0x5be9c7['length']-0x1];if(!RANDOM_SUFFIX_RE[_0x4dbb5f(_0x1db9b4._0x212115)](_0x39b0d0))return null;const _0x4009f9=_0x5be9c7[_0x5be9c7[_0x4dbb5f(0x1c3)]-0x2];if(!/^[0-9a-z]+$/[_0x4dbb5f(0x22e)](_0x4009f9))return null;const _0xd3d50a=parseInt(_0x4009f9,0x24);if(!Number[_0x4dbb5f(_0x1db9b4._0x5947e9)](_0xd3d50a))return null;if(_0xd3d50a<MIN_PLAUSIBLE_MS||_0xd3d50a>=MAX_PLAUSIBLE_MS)return null;return _0xd3d50a;}__name(runIdStartedAt,_0x48998b(0x187));function shardPathForTimestamp(_0x29a8ed){const _0x77dc14={_0x25ad13:0x22a,_0x140a12:0x174,_0x14d255:0x1f7,_0x5c1a7f:0x1f0},_0x1ef35d=_0x48998b,_0x392594=new Date(_0x29a8ed),_0x1d747b=String(_0x392594[_0x1ef35d(_0x77dc14._0x25ad13)]())[_0x1ef35d(0x1f0)](0x4,'0'),_0x27a25e=String(_0x392594[_0x1ef35d(_0x77dc14._0x140a12)]()+0x1)[_0x1ef35d(0x1f0)](0x2,'0'),_0x29ee7d=String(_0x392594[_0x1ef35d(_0x77dc14._0x14d255)]())[_0x1ef35d(_0x77dc14._0x5c1a7f)](0x2,'0');return _0x1d747b+'/'+_0x27a25e+'/'+_0x29ee7d;}__name(shardPathForTimestamp,'shardPathForTimestamp');function shardPathForRunId(_0x2403b5){const _0x46f7ac=runIdStartedAt(_0x2403b5);return _0x46f7ac===null?null:shardPathForTimestamp(_0x46f7ac);}__name(shardPathForRunId,_0x48998b(0x196));function runDirFor(_0x5a50ef,_0x57212a){const _0x2ce433=shardPathForRunId(_0x57212a);return _0x2ce433===null?null:_0x5a50ef+'/'+_0x2ce433+'/'+_0x57212a;}__name(runDirFor,_0x48998b(0x21d));var UnplaceableRunIdError=class extends Error{static{__name(this,_0x48998b(0x1af));}constructor(_0x37fae5){const _0x362ca7={_0x28e644:0x18b,_0xb989:0x1af},_0xebcc3f=_0x48998b;super(_0xebcc3f(0x1db)+_0x37fae5),this[_0xebcc3f(_0x362ca7._0x28e644)]=_0xebcc3f(_0x362ca7._0xb989);}};function requireRunDirFor(_0x42d11b,_0x49430a){const _0x25b51a=runDirFor(_0x42d11b,_0x49430a);if(_0x25b51a===null)throw new UnplaceableRunIdError(_0x49430a);return _0x25b51a;}__name(requireRunDirFor,_0x48998b(0x1d1));function projectRunsRoot(_0x22dfd0='',_0x214647){return UNOTEST_DIR+'/'+runsDirFor(_0x22dfd0,_0x214647);}__name(projectRunsRoot,_0x48998b(0x19e));function projectRunDirFor(_0x3bd41d,_0x13bb5c='',_0x374eed){return requireRunDirFor(projectRunsRoot(_0x13bb5c,_0x374eed),_0x3bd41d);}__name(projectRunDirFor,_0x48998b(0x1c7));function shardDirFor(_0x58f14c,_0x24ec5e){return _0x58f14c+'/'+shardPathForTimestamp(_0x24ec5e);}__name(shardDirFor,_0x48998b(0x215));function*shardDaysDescending(_0x160072,_0x11fde2,_0x52091d){const _0x177bc0={_0x2442d4:0x173},_0x1037de=_0x48998b,_0x402e96=0x5265c00;let _0x1943fa=Math[_0x1037de(_0x177bc0._0x2442d4)](_0x11fde2/_0x402e96)*_0x402e96;for(let _0xe58fe9=0x0;_0xe58fe9<_0x52091d;_0xe58fe9++){yield shardDirFor(_0x160072,_0x1943fa),_0x1943fa-=_0x402e96;}}__name(shardDaysDescending,_0x48998b(0x1ab));var RUN_INDEX_SCHEMA_VERSION=0x2,SCENARIO_RECENT_WINDOW=0xc;function isFailingStatus(_0x2e4c1f){const _0x41308f={_0x38a319:0x205},_0x38820f=_0x48998b;return _0x2e4c1f===_0x38820f(_0x41308f._0x38a319)||_0x2e4c1f==='interrupted';}__name(isFailingStatus,'isFailingStatus');function foldScenarioRun(_0x5ecc3c,_0x26919c){const _0x5256a2={_0x31516d:0x1cc,_0x19b4f2:0x17c,_0x2bec71:0x181},_0x150cc8=_0x48998b,_0x161e3a={'lastRunId':_0x26919c['runId'],'lastStatus':_0x26919c['status'],'lastAt':_0x26919c[_0x150cc8(0x181)],'lastDurationMs':_0x26919c[_0x150cc8(0x1d5)],'recent':[..._0x5ecc3c?.['recent']??[],_0x26919c[_0x150cc8(0x17c)]][_0x150cc8(_0x5256a2._0x31516d)](-SCENARIO_RECENT_WINDOW)};if(!isFailingStatus(_0x26919c[_0x150cc8(_0x5256a2._0x19b4f2)]))return{..._0x161e3a,'failStreak':0x0,'failingSince':null};const _0x507a51=(_0x5ecc3c?.[_0x150cc8(0x1dc)]??0x0)+0x1;return{..._0x161e3a,'failStreak':_0x507a51,'failingSince':_0x507a51===0x1?_0x26919c[_0x150cc8(_0x5256a2._0x2bec71)]:_0x5ecc3c?.['failingSince']??_0x26919c[_0x150cc8(0x181)]};}__name(foldScenarioRun,_0x48998b(0x1c5));function scenarioIndexFileName(_0x4f8c67){const _0x779deb={_0x53d457:0x19d},_0xe27d43=_0x48998b;return encodeURIComponent(_0x4f8c67)+_0xe27d43(_0x779deb._0x53d457);}__name(scenarioIndexFileName,_0x48998b(0x176));function scenarioRefFromFileName(_0x33343b){const _0x1a6ea4={_0x52c910:0x1cc,_0x4ee519:0x1c3},_0x28abf1=_0x48998b;if(!_0x33343b[_0x28abf1(0x1ae)](_0x28abf1(0x19d)))return null;try{return decodeURIComponent(_0x33343b[_0x28abf1(_0x1a6ea4._0x52c910)](0x0,-_0x28abf1(0x19d)[_0x28abf1(_0x1a6ea4._0x4ee519)]));}catch{return null;}}__name(scenarioRefFromFileName,'scenarioRefFromFileName');var BLOBS_DIR=_0x48998b(0x20b),GENERATION_SEP='~',HASH_RE=/^[0-9a-f]{8,}$/,InvalidBlobHashError=class extends Error{static{__name(this,'InvalidBlobHashError');}constructor(_0x9b1eb){const _0x4fb744={_0x33353e:0x1f6,_0x44e71c:0x18b},_0x18e272=_0x48998b;super(_0x18e272(_0x4fb744._0x33353e)+_0x9b1eb),this[_0x18e272(_0x4fb744._0x44e71c)]=_0x18e272(0x207);}};function blobPathFor(_0x2d5181,_0x3e4b18,_0x1baf9e,_0x34ae66=0x0){return _0x2d5181+'/'+blobRelPathFor(_0x3e4b18,_0x1baf9e,_0x34ae66);}__name(blobPathFor,_0x48998b(0x1f5));function blobRelSegmentsFor(_0x4f036b,_0x3330ab,_0x206dbd=0x0){const _0x58e8fe={_0x27739e:0x1cc},_0x44af99=_0x48998b;if(!HASH_RE[_0x44af99(0x22e)](_0x4f036b))throw new InvalidBlobHashError(_0x4f036b);const _0x94eb4d=_0x206dbd>0x0?''+GENERATION_SEP+_0x206dbd:'';return[BLOBS_DIR,_0x4f036b[_0x44af99(_0x58e8fe._0x27739e)](0x0,0x2),_0x4f036b['slice'](0x2,0x4),''+_0x4f036b+_0x94eb4d+'.'+_0x3330ab];}__name(blobRelSegmentsFor,_0x48998b(0x1ff));function blobRelPathFor(_0x2eceb6,_0x511947,_0x34c151=0x0){const _0x1bb93b=_0x48998b;return blobRelSegmentsFor(_0x2eceb6,_0x511947,_0x34c151)[_0x1bb93b(0x1cb)]('/');}__name(blobRelPathFor,_0x48998b(0x183));function _0x5be3(){const _0x2c9c6a=['BxvZDcbUB3qGy29UDgfPBIbCic8GoIaQid8GiIa8id4GFcbVCIbJB250CM9SignOyxjHy3rLCNm','C291CMnLCY5QC29U','AxnbBM5VDgf0Aw9UtgLUzq','DMfSAwrHDgvgC1nHzMvoyw1L','CNvUrgLYrM9Y','Dw5VDgvZDc8Uzw52','CgXHBKfKzfzHCMLHyMXL','vu5pvevtvf9erujvr19lruvqx0nbteXt','zMLUzeLUzgv4','lNnUyxbZAg90CW','C3bSAxq','AxnszwDLEeXPDgvYywW','C2vJCMv0','vu5pvevtvf9kvurhrv9mt0DFtevwruW','C3rKB3v0lMXVzW','C29YDa','mteYnhzxu1rmuW','z2v0vvrdrNvSBfLLyxi','CMvNzxG','iI4G','CNvUC0rPCKzVCG','DgvZDa','Dw5RBM93BI1YDw5UzxiTA2v5','iokaLcbWAwnRigeGzgLMzMvYzw50ig5HBwuGB3iGzwrPDcb0AguGzxHPC3rPBMCGDMfSDwuU','zw52s2v5CW','yMXVyNnsB290rM9Y','zw52tMfTzxngCM9TrgLYtgLZDgLUzW','lNzPzxDLCI5SB2nR','BwfRzvj1BKLK','zw52','AgfZ','vu5pvevtvf9kvurhrv9bq0nfu1nFve9lru4','vu5pvevtvf9eruzbvuXux1rjtuvpvvrFtvm','zMXVB3i','z2v0vvrdtw9UDgG','ntqYmda3CNvQsgDY','C2nLBMfYAw9jBMrLEezPBgvoyw1L','zMXHDe1HCa','zhvWBgLJyxrL','vu5pvevtvf9kvurhrv9nt0rfta','A2LUza','DhjPBq','C3rHDhvZ','tK9Fq09mt1i','rK9sq0vFq09mt1i','ywrK','AxnfEhrLCM5HBfzHCK5HBwu','C3rHCNrLzef0','C2vJCMv0C0XHEwvYrMLSzxngB3i','yMXVyLjLBfbHDgHgB3i','vu5pvevtvf9erujvr19nqvHFqLLurvm','vu5pvevtvf9kvurhrv9wt1rf','Dw5VDgvZDa','CNvUswrtDgfYDgvKqxq','AxnbC3nPz25Tzw50t2y','qxbW','AgvHCNrIzwf0','BMfTzq','CgfYC2vty2vUyxjPB0fUBM90yxrPB25Z','lNj1BNm','ntm0mZKXz2ffwfvQ','yxbW','n3r4BfzgvG','BxvZDcbIzsbHihn0CMLUzW','zMLSDgvY','y2fUBM90igXVywqGCNvUBMvYigfKyxb0zxiGiG','uNvUBMvYqwrHChrLCK5VDezVDw5KrxjYB3i','vu5pvevtvf9kvurhrv9qt1ju','C2HHCMrqyxrOrM9YuNvUswq','Dw5VDgvZDc8UC2vJCMv0CW','vu5pvevtvf9kvurhrv9it1nu','Dg9mB3DLCKnHC2u','AxnbC3nPz25Tzw50tgLUzq','DgvZDerPCKzVCG','CMvWBgfJzq','lMPZB25S','ChjVAMvJDfj1BNnsB290','CgfYC2vfBNzdB250zw50','C3bSAwnL','vu5pvevtvf9iruferuq','Aw5KzxHpzG','C2vJCMv0C0nVBNrLBNq','vu5pvevtvf9cuK9xu0vs','ntC0EgfeCwrk','ChvZAa','DgvTCgXHDgu','B2jQzwn0','vu5pvevtvf9erujvr19ive1mx01bwf9cwvrfuW','C2vYAwfSAxPLrw52vMfSDwu','C2HHCMreyxLZrgvZy2vUzgLUzW','y3j5ChrV','vu5pvevtvf9erujvr19quKvwsuvxx0jzvevt','zw5KC1DPDgG','vw5WBgfJzwfIBgvsDw5jzevYCM9Y','AxngAw5PDgu','z2v0uMfUzg9TvMfSDwvZ','AM9PBKXPBMvZ','lNzPzxDLCI5SB2C','C3bSAxrmAw5LCW','vu5pvevtvf9kvurhrv9usu1ft1vux01t','zgvIDwDeAxjgB3i','C2vJCMv0C0zPBgvgB3i','CNvUDgLTzs5QC29U','C2fTCgXL','vu5pvevtvf9usu1fwK9orq','C3rKzxjYlMXVzW','vw5ZDxbWB3j0zwrsDw5lAw5KrxjYB3i','Axntzwn0Aw9UrgL2AwrLCG','Aw5JBhvKzxm','vu5pvevtvf9erujvr19esvi','vu5pvevtvf9mt0DFtevwruW','C3rYAw5N','CMvTB3zLrw52vMfY','BgvUz3rO','BxvZDcbUB3qGC3rHCNqGD2L0AcaNxYCGkhjLC2vYDMvKkq','zM9SzfnJzw5HCMLVuNvU','vu5pvevtvf9qt1bvuf9huKfdrv9nuW','ChjVAMvJDfj1BKrPCKzVCG','mJa0rKvts0f0','yxbWlxnLCNzLCJPLCNjVCG','vu5pvevtvf9kvurhrv9quK9wsurfuG','AM9PBG','C2XPy2u','CgLJA2vYlxnUyxbZAg90lNr4Da','nJvVu0LvB3O','x2XHDgvZDc5QC29U','vvrd','CMvXDwLYzvj1BKrPCKzVCG','CNvUBMvYici','CNvUBMvY','ztjL','zhvYyxrPB25nCW','ig11C3qGyMuGvvbqrvjFu05bs0uGkguUzY4Gqvbqx0jbu0vFvvjmksbZBYbHihnJzw5HCMLVignHBIbYzwzLCMvUy2uGAxqGyNKGBMfTzs4','vu5pvevtvf9ftLy','mJaXnta0DK9KsM9s','lMPZB24','mtuWmdbfs1bMAvq','CNvUswqGy2fYCMLLCYbUBYb0Aw1LC3rHBxaSignHBM5VDcbWBgfJzsbPDcbPBIbHihnOyxjKoIa','zMfPBfn0CMvHAW','vu5pvevtvf9dt05tt0Xf','C291CMnL','igLZigfSC28GC2v0igLUihvUB3rLC3qVlMvUDIdIGjqGDgHLihnLy3jLDcb2ywX1zsbUB3CGC2HHzg93CYbPDc4','igfSCMvHzhKGzxHPC3rZigLUia','zw52rMLSzuzVCG','Bgf5zxjZrM9Y','ic0Tlq','BxvZDcbUB3qGyMuGiI4Iig9YiciUlIi','iYaTls0G','x2rHEs5QC29UBa','mti3nde2oxDVEg95Ca','igLZigfSC28GC2v0igLUihvUB3rLC3qVlNnLy3jLDhmG4OcuihrOzsbZzwnYzxqGDMfSDwuGC2HHzg93CYb0AgLZig9Uzs4','yxnZAwDUBwvUDevUDhjPzxm','x3nJzw5HCMLVCW','ntK5n0TczgfKAq','vu5pvevtvf9mt0nbteu','C3rLChmUANnVBMW','uNvUBMvYtM90q29UzMLNDxjLzevYCM9Y','refuqujbu0vFvvjm','CgfKu3rHCNq','igLZig5VDcbHigTUB3DUihj1BM5LCIbZzxr0Aw5NiokaLcbJAg9VC2uGB25LigzYB20GDgHLihj1BM5LCI1JB25MAwCGBgLZDc4','mta5mJa3nZzHAxztr3m','vu5pvevtvf9kvurhrv9vuKW','mty5z3vszw5w','yMXVyLbHDgHgB3i','yMXVyIbOyxnOig11C3qGyMuGBg93zxjJyxnLigHLEcWGz290oIa','z2v0vvrdrgf0zq','lNnLy3jLDhm','vu5pvevtvf9kvurhrv9ut0TftG','AxnsDw5UzxjdB25MAwDlzxK','yxbWlxnLCNzLCJPYzxvZzwq','igLZigfSC28GC2v0igLUihLVDxiGC2HLBgWGzw52AxjVBM1LBNqG4OcuigL0ihDPBgWGA2vLCcbYzxnVBhzPBMCGzNjVBsb0AgvYzsaODgHLigvUDMLYB25Tzw50ihDPBNmGB3zLCIb0AguGzMLSzsKU','BM93','vu5pvevtvf9kvurhrv9nt0rf','yMXVyLjLBfnLz21LBNrZrM9Y','Bwf0y2G','vu5pvevtvf9kvurhrv9dtefvrevFqKLo','zw52tgf5zxjgAwXLC0zVCG','uNvUBMvY','yxbWlxnLCNzLCJPYzwfKEq','zMfPBgvK','mJyWtfPLEKfJ','sw52ywXPzejSB2jiyxnOrxjYB3i','x2nVBgXLy3rPB25Z','vu5pvevtvf9kvurhrv9srvrssuvt','DgvYBwLUywW','x2jSB2jZ','zxHWzwn0lwzHAwW','CgfYC2u','y29TCgXLDgvK','vu5pvevtvf9eruzbvuXux05bvKLhqvrjt05FveLnru9vvf9nuW','x2HLBhbLCNm','C2vJCMv0CW','lMvUDG','lY5Kzwj1z2DLCG','Dg9tDhjPBMC','C2HHCMreAxjgB3i','C3rHCNrZv2L0Aa','DMfSAwrHDgvdB2XSzwn0Aw9UtMfTzq','zMXHz3m'];_0x5be3=function(){return _0x2c9c6a;};return _0x5be3();}function blobsRootFor(_0x2a5901){return _0x2a5901+'/'+BLOBS_DIR;}__name(blobsRootFor,_0x48998b(0x232));var FS_UNSAFE_NAME_RE=/[\\/:*?"<>|\x00-\x1f]/;function validateFsSafeName(_0x26bec8,_0x4f51aa){const _0x2f6bca={_0x3f18b6:0x191,_0x52b455:0x1e4,_0x89d5e0:0x216,_0x149651:0x1c4,_0x3630d2:0x219},_0x55763a=_0x48998b;if(typeof _0x26bec8!=='string')return _0x55763a(_0x2f6bca._0x3f18b6);const _0x39bbec=_0x26bec8['trim']();if(_0x39bbec['length']===0x0)return'must\x20not\x20be\x20empty';if(_0x39bbec==='.'||_0x39bbec==='..')return _0x55763a(_0x2f6bca._0x52b455);if(_0x39bbec[_0x55763a(_0x2f6bca._0x89d5e0)]('.'))return'must\x20not\x20start\x20with\x20\x27.\x27';if(_0x4f51aa?.['reservedUnderscore']&&_0x39bbec[_0x55763a(0x216)]('_'))return _0x55763a(_0x2f6bca._0x149651);if(FS_UNSAFE_NAME_RE[_0x55763a(0x22e)](_0x39bbec))return _0x55763a(_0x2f6bca._0x3630d2);return null;}__name(validateFsSafeName,_0x48998b(0x21c));var COLLECTION_NAME_FORBIDDEN_RE=FS_UNSAFE_NAME_RE;function validateCollectionName(_0x23ec74){return validateFsSafeName(_0x23ec74);}__name(validateCollectionName,_0x48998b(0x217));var RUN_MANIFEST_FILE='manifest.json',RUN_SOURCES_FILE=_0x48998b(0x21a),UnsupportedRunKindError=class extends Error{static{__name(this,_0x48998b(0x1bc));}constructor(_0x459af8,_0x33a823){const _0x4549a6=_0x48998b;super(_0x4549a6(0x1d2)+_0x33a823+'\x22\x20does\x20not\x20support\x20run\x20kind\x20\x22'+_0x459af8+'\x22'),this[_0x4549a6(0x18b)]=_0x4549a6(0x1bc);}},RunnerAdapterNotFoundError=class extends Error{static{__name(this,'RunnerAdapterNotFoundError');}constructor(_0x4d8af1,_0xe37a08){const _0x5290c9={_0x4f97a4:0x193,_0x2fe449:0x22c},_0x340af7=_0x48998b;super(_0x340af7(_0x5290c9._0x4f97a4)+_0x4d8af1+_0x340af7(_0x5290c9._0x2fe449)+_0xe37a08),this['name']=_0x340af7(0x194);}},RunnerNotConfiguredError=class extends Error{static{__name(this,'RunnerNotConfiguredError');}constructor(_0x3e2d3b){const _0x4b1b68={_0x117666:0x1ee},_0x5c9ad2=_0x48998b;super(_0x3e2d3b),this['name']=_0x5c9ad2(_0x4b1b68._0x117666);}},EXPECT_FAIL_ANNOTATION=_0x48998b(0x20c),ANNOTATION_RE=/^\s*\/\/\s*@([a-z0-9-]+)\s*$/;function isAnnotationLine(_0x3cd65f){return ANNOTATION_RE['test'](_0x3cd65f);}__name(isAnnotationLine,_0x48998b(0x21b));function parseScenarioAnnotations(_0x4877ce){const _0xa0fd42={_0x28377c:0x223,_0x5b6627:0x17b},_0x4aad92=_0x48998b,_0x42850d=new Set();for(const _0x1f37f4 of _0x4877ce[_0x4aad92(_0xa0fd42._0x28377c)](/\r?\n/)){const _0x54ae13=_0x1f37f4[_0x4aad92(_0xa0fd42._0x5b6627)]();if(_0x54ae13==='')continue;if(!_0x54ae13[_0x4aad92(0x216)]('//'))break;const _0x232015=_0x54ae13[_0x4aad92(0x200)](ANNOTATION_RE);if(_0x232015)_0x42850d['add'](_0x232015[0x1]);}return{'expectFail':_0x42850d[_0x4aad92(0x170)](EXPECT_FAIL_ANNOTATION)};}__name(parseScenarioAnnotations,_0x48998b(0x18c));var SEGMENT_NAME_FORBIDDEN_RE=FS_UNSAFE_NAME_RE;function validateSegmentName(_0xbf877f){return validateFsSafeName(_0xbf877f,{'reservedUnderscore':!![]});}__name(validateSegmentName,'validateSegmentName');var TERMINAL_WS_EVENT=_0x48998b(0x20a),RUNNER_CONFIG_KEYS=new Set([_0x48998b(0x1a4),_0x48998b(0x1a1),'UNOTEST_SLOW_MO',_0x48998b(0x172),_0x48998b(0x20f),_0x48998b(0x1c6),_0x48998b(0x1ec),_0x48998b(0x1ba),_0x48998b(0x1c0),'UNOTEST_DEBUG',_0x48998b(0x1bf),_0x48998b(0x184),_0x48998b(0x1ad),_0x48998b(0x1a9),_0x48998b(0x220),'UNOTEST_NETWORK',_0x48998b(0x1dd),'UNOTEST_CACHE_DIR',_0x48998b(0x17d),_0x48998b(0x17e),_0x48998b(0x1ef)]);function isRunnerConfigKey(_0x1c76e3){return RUNNER_CONFIG_KEYS['has'](_0x1c76e3);}__name(isRunnerConfigKey,_0x48998b(0x1fa));function categorizeVariable(_0xe5443f){const _0x92daf5={_0x40704c:0x211,_0x13b1f6:0x1d3},_0x1cb9f8=_0x48998b;if(_0xe5443f[_0x1cb9f8(0x1de)]===_0x1cb9f8(_0x92daf5._0x40704c))return _0x1cb9f8(0x225);return isRunnerConfigKey(_0xe5443f['name'])?_0x1cb9f8(_0x92daf5._0x13b1f6):_0x1cb9f8(0x18f);}__name(categorizeVariable,'categorizeVariable');function isExternalVarName(_0x40262e){const _0x587f6c=_0x48998b;return/^[A-Z][A-Z0-9_]*$/[_0x587f6c(0x22e)](_0x40262e);}__name(isExternalVarName,_0x48998b(0x180));var ENV_KEY_RE=/^[A-Za-z_][A-Za-z0-9_]*$/;function*assignmentEntries(_0x2a291c){const _0x58398b={_0x46f85a:0x223,_0x1c2523:0x1cc,_0x5cc1b1:0x17b},_0x102ac3=_0x48998b;for(const _0x255370 of _0x2a291c[_0x102ac3(_0x58398b._0x46f85a)](/\r?\n/)){const _0x3b499f=_0x255370[_0x102ac3(0x17b)]();if(_0x3b499f===''||_0x3b499f['startsWith']('#'))continue;const _0x3c5fe6=_0x3b499f[_0x102ac3(0x1a2)]('=');if(_0x3c5fe6<=0x0)continue;const _0x23aec0=_0x3b499f[_0x102ac3(_0x58398b._0x1c2523)](0x0,_0x3c5fe6)[_0x102ac3(_0x58398b._0x5cc1b1)]();if(!ENV_KEY_RE['test'](_0x23aec0))continue;yield[_0x23aec0,_0x3b499f[_0x102ac3(0x1cc)](_0x3c5fe6+0x1)['trim']()];}}__name(assignmentEntries,_0x48998b(0x1e9));function parseEnvContent(_0x69d830){const _0x323330={_0x36f340:0x1cc},_0x13dc4a=_0x48998b,_0x3f8351={};for(const [_0x1dcedc,_0x4a11b5]of assignmentEntries(_0x69d830)){let _0x3e57ec=_0x4a11b5;if(_0x3e57ec[_0x13dc4a(0x1c3)]>=0x2){const _0x4dca11=_0x3e57ec[0x0],_0x592c85=_0x3e57ec[_0x3e57ec[_0x13dc4a(0x1c3)]-0x1];(_0x4dca11==='\x22'||_0x4dca11==='\x27')&&_0x4dca11===_0x592c85&&(_0x3e57ec=_0x3e57ec[_0x13dc4a(_0x323330._0x36f340)](0x1,-0x1));}_0x3f8351[_0x1dcedc]=_0x3e57ec;}return _0x3f8351;}__name(parseEnvContent,_0x48998b(0x19f));function serializeEnvValue(_0x54fe01){const _0x5446c9={_0x1b90ec:0x22e},_0x10aaa6=_0x48998b;if(_0x54fe01==='')return'';if(/[\s#"'=\\]|^[`]/['test'](_0x54fe01)||/[\n\r]/[_0x10aaa6(_0x5446c9._0x1b90ec)](_0x54fe01)){const _0x1bdae0=_0x54fe01[_0x10aaa6(0x19c)](/\\/g,'\x5c\x5c')[_0x10aaa6(0x19c)](/"/g,'\x5c\x22')['replace'](/\n/g,'\x5cn')['replace'](/\r/g,'\x5cr');return'\x22'+_0x1bdae0+'\x22';}return _0x54fe01;}__name(serializeEnvValue,_0x48998b(0x1aa));function envKeys(_0x32db9a){const _0x59b0f0=_0x48998b,_0x187981=new Set();for(const [_0x5845fb]of assignmentEntries(_0x32db9a))_0x187981[_0x59b0f0(0x17f)](_0x5845fb);return _0x187981;}__name(envKeys,_0x48998b(0x231));function isSectionDivider(_0x4b9f9d){const _0x533ac3={_0x40c158:0x216},_0x1e26ac=_0x48998b,_0x5478cf=_0x4b9f9d[_0x1e26ac(0x17b)]();return _0x5478cf[_0x1e26ac(_0x533ac3._0x40c158)]('#')&&/---/['test'](_0x5478cf);}__name(isSectionDivider,_0x48998b(0x1bd));function isAssignmentLine(_0xdd1532){const _0x1d18a3={_0x20d083:0x17b,_0x58abc7:0x216,_0x451c30:0x1cc},_0x57e01b=_0x48998b,_0x3a3d62=_0xdd1532[_0x57e01b(_0x1d18a3._0x20d083)]();if(_0x3a3d62===''||_0x3a3d62[_0x57e01b(_0x1d18a3._0x58abc7)]('#'))return![];const _0x51c0e5=_0x3a3d62[_0x57e01b(0x1a2)]('=');return _0x51c0e5>0x0&&ENV_KEY_RE[_0x57e01b(0x22e)](_0x3a3d62[_0x57e01b(_0x1d18a3._0x451c30)](0x0,_0x51c0e5)[_0x57e01b(0x17b)]());}__name(isAssignmentLine,_0x48998b(0x19a));function isAssignmentOf(_0x563c9c,_0x2ff3a5){const _0x44fe68={_0x460ee5:0x17b,_0x1a5dc0:0x1a2,_0x47157a:0x1cc,_0x3c99c4:0x17b},_0x130216=_0x48998b,_0x41f6b6=_0x563c9c[_0x130216(_0x44fe68._0x460ee5)]();if(_0x41f6b6===''||_0x41f6b6['startsWith']('#'))return![];const _0x2d3c4a=_0x41f6b6[_0x130216(_0x44fe68._0x1a5dc0)]('=');if(_0x2d3c4a<=0x0)return![];return _0x41f6b6[_0x130216(_0x44fe68._0x47157a)](0x0,_0x2d3c4a)[_0x130216(_0x44fe68._0x3c99c4)]()===_0x2ff3a5;}__name(isAssignmentOf,_0x48998b(0x188));function splitLines(_0xcceac5){const _0x399916={_0x120b51:0x1ae},_0x2444ff=_0x48998b,_0x2b666d=_0xcceac5[_0x2444ff(_0x399916._0x120b51)]('\x0a'),_0x2b3cf9=_0x2b666d?_0xcceac5['slice'](0x0,-0x1):_0xcceac5;return{'lines':_0x2b3cf9===''?[]:_0x2b3cf9['split']('\x0a'),'trailingNewline':_0x2b666d};}__name(splitLines,_0x48998b(0x1b4));function joinLines(_0x20e25e,_0x10dacf){const _0x13b04b=_0x48998b,_0x8e431=_0x20e25e[_0x13b04b(0x1cb)]('\x0a');return _0x10dacf||_0x8e431===''?_0x8e431+'\x0a':_0x8e431;}__name(joinLines,_0x48998b(0x1b2));function insertEnvVar(_0x21dc23,_0x1fc789,_0x5b263d,_0x49b030){const _0x5c741a={_0x26b56d:0x199,_0x5358da:0x1c3,_0x193dfb:0x1a0,_0x2dac5f:0x1c3,_0x1c21b2:0x1a6,_0x49dc0b:0x1e5},_0x1e6b1b=_0x48998b,_0xb6be74=_0x1fc789+'='+serializeEnvValue(_0x5b263d),{lines:_0x36fd0c,trailingNewline:_0x4ddae2}=splitLines(_0x21dc23);if(_0x49b030){const _0x5f20b8=new RegExp('\x5cb'+_0x49b030[_0x1e6b1b(_0x5c741a._0x26b56d)]()+'\x5cb'),_0x251360=_0x36fd0c[_0x1e6b1b(0x221)](_0x17e153=>isSectionDivider(_0x17e153)&&_0x5f20b8[_0x1e6b1b(0x22e)](_0x17e153['toLowerCase']()));if(_0x251360!==-0x1){let _0x24be3a=_0x36fd0c[_0x1e6b1b(0x1c3)];for(let _0x230aef=_0x251360+0x1;_0x230aef<_0x36fd0c[_0x1e6b1b(_0x5c741a._0x5358da)];_0x230aef++){if(isSectionDivider(_0x36fd0c[_0x230aef])){_0x24be3a=_0x230aef;break;}}let _0x40b6b0=-0x1,_0x327fbd=-0x1;for(let _0x41a7a9=_0x251360+0x1;_0x41a7a9<_0x24be3a;_0x41a7a9++){if(_0x36fd0c[_0x41a7a9][_0x1e6b1b(0x17b)]()!=='')_0x327fbd=_0x41a7a9;if(isAssignmentLine(_0x36fd0c[_0x41a7a9]))_0x40b6b0=_0x41a7a9;}const _0x151a75=_0x40b6b0>=0x0?_0x40b6b0:_0x327fbd,_0x39262c=_0x151a75>=0x0?_0x151a75+0x1:_0x251360+0x1;return _0x36fd0c[_0x1e6b1b(_0x5c741a._0x193dfb)](_0x39262c,0x0,_0xb6be74),joinLines(_0x36fd0c,_0x4ddae2||_0x36fd0c['length']>0x0);}if(_0x36fd0c[_0x1e6b1b(_0x5c741a._0x2dac5f)]>0x0)_0x36fd0c[_0x1e6b1b(_0x5c741a._0x1c21b2)]('');return _0x36fd0c[_0x1e6b1b(0x1a6)](_0x1e6b1b(_0x5c741a._0x49dc0b)+_0x49b030+_0x1e6b1b(0x1e3),_0xb6be74),joinLines(_0x36fd0c,!![]);}return _0x36fd0c[_0x1e6b1b(_0x5c741a._0x1c21b2)](_0xb6be74),joinLines(_0x36fd0c,!![]);}__name(insertEnvVar,'insertEnvVar');function removeEnvVar(_0x23efb1,_0x98046a){const _0x43a7be={_0x2966ea:0x192,_0x5632ca:0x1c3},_0x202b33=_0x48998b,{lines:_0x206580,trailingNewline:_0x29c312}=splitLines(_0x23efb1),_0x3bf3c0=_0x206580[_0x202b33(_0x43a7be._0x2966ea)](_0x27d7ef=>!isAssignmentOf(_0x27d7ef,_0x98046a)),_0x1a09e6=_0x3bf3c0['length']!==_0x206580[_0x202b33(_0x43a7be._0x5632ca)];return{'content':joinLines(_0x3bf3c0,_0x29c312),'removed':_0x1a09e6};}__name(removeEnvVar,_0x48998b(0x1c2));var SECTION_BY_KIND={'app':_0x48998b(0x189),'runner':_0x48998b(0x203),'secret':void 0x0};function planAddVariable(_0x352b98){const _0x28bcac={_0xbf4246:0x170,_0x1ea2ac:0x211,_0x1211fb:0x211,_0x85737:0x197,_0x50dea5:0x21e,_0x2bc27f:0x1e0,_0x5d66b4:0x1a6},_0xe307d2=_0x48998b,{name:_0x360179,kind:_0x38dc99}=_0x352b98;if(_0x38dc99==='runner'){if(!isRunnerConfigKey(_0x360179))return{'ok':![],'code':_0xe307d2(0x22f),'message':_0x360179+_0xe307d2(0x1f1)};}else{if(!isExternalVarName(_0x360179))return{'ok':![],'code':'invalid-name','message':_0x360179+_0xe307d2(0x1d6)};}const _0x277d58=envKeys(_0x352b98['envContent'])['has'](_0x360179),_0x3b050e=envKeys(_0x352b98[_0xe307d2(0x1a3)])[_0xe307d2(_0x28bcac._0xbf4246)](_0x360179),_0x417950=_0x38dc99==='secret'?_0xe307d2(_0x28bcac._0x1ea2ac):_0xe307d2(0x16f),_0xa4582=_0x417950==='secrets'?_0x3b050e:_0x277d58,_0x465e50=_0x417950===_0xe307d2(_0x28bcac._0x1211fb)?_0xe307d2(_0x28bcac._0x85737):_0xe307d2(_0x28bcac._0x50dea5);if(_0xa4582)return{'ok':![],'code':_0xe307d2(0x178),'message':_0x360179+_0xe307d2(_0x28bcac._0x2bc27f)+_0x465e50+_0xe307d2(0x230)};const _0x2bb8cc=[];return _0x38dc99===_0xe307d2(0x225)&&_0x277d58&&_0x2bb8cc[_0xe307d2(_0x28bcac._0x5d66b4)](_0x360179+_0xe307d2(0x1df)),_0x38dc99!=='secret'&&_0x3b050e&&_0x2bb8cc[_0xe307d2(0x1a6)](_0x360179+_0xe307d2(0x1e8)),{'ok':!![],'target':_0x417950,'sectionLabel':SECTION_BY_KIND[_0x38dc99],'warnings':_0x2bb8cc};}__name(planAddVariable,_0x48998b(0x21f));function deleteShadowWarning(_0x4b8711,_0x2b0369,_0x3f639a){const _0x53aa5a={_0x41fa91:0x1fc},_0x507e61=_0x48998b;if(_0x3f639a!==void 0x0&&_0x3f639a!==_0x2b0369)return[_0x4b8711+_0x507e61(_0x53aa5a._0x41fa91)];return[];}__name(deleteShadowWarning,'deleteShadowWarning');var TERMINAL_RUNTIME_STATES=[_0x48998b(0x20e),_0x48998b(0x205),'aborted'];function isTerminalRuntimeState(_0x37ac1b){const _0x15d641=_0x48998b;return TERMINAL_RUNTIME_STATES[_0x15d641(0x1be)](_0x37ac1b);}__name(isTerminalRuntimeState,'isTerminalRuntimeState');var JUDGE_ROUTES={'judge':'/judge','health':'/health'},JUDGE_ENV={'mode':_0x48998b(0x1fe),'url':_0x48998b(0x1f3),'token':_0x48998b(0x1f9),'requestTimeoutMs':_0x48998b(0x1b5),'preamble':'UNOTEST_JUDGE_PREAMBLE','provider':_0x48998b(0x1ca),'model':_0x48998b(0x179),'callTimeoutMs':'UNOTEST_JUDGE_CALL_TIMEOUT_MS','retries':_0x48998b(0x209),'vote':_0x48998b(0x185),'accessToken':_0x48998b(0x171),'claudeBin':_0x48998b(0x201),'host':_0x48998b(0x198),'port':_0x48998b(0x195),'logLevel':_0x48998b(0x226),'skipPreflight':'UNOTEST_JUDGE_SKIP_PREFLIGHT'};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,JUDGE_ENV,JUDGE_ROUTES,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};
|
|
1
|
+
const _0x1f456e=_0x3d64;(function(_0x1d96a3,_0x502878){const _0x1d86eb={_0x3cad26:0xf3,_0x570be5:0x15a,_0x464e22:0x186},_0x5e4ad3=_0x3d64,_0x4ca2bb=_0x1d96a3();while(!![]){try{const _0x96bf67=parseInt(_0x5e4ad3(0x18b))/0x1+parseInt(_0x5e4ad3(0x1c2))/0x2*(-parseInt(_0x5e4ad3(0x1ae))/0x3)+parseInt(_0x5e4ad3(0x172))/0x4+parseInt(_0x5e4ad3(0x1a2))/0x5+-parseInt(_0x5e4ad3(0xf8))/0x6+parseInt(_0x5e4ad3(_0x1d86eb._0x3cad26))/0x7*(parseInt(_0x5e4ad3(_0x1d86eb._0x570be5))/0x8)+parseInt(_0x5e4ad3(_0x1d86eb._0x464e22))/0x9*(-parseInt(_0x5e4ad3(0x13f))/0xa);if(_0x96bf67===_0x502878)break;else _0x4ca2bb['push'](_0x4ca2bb['shift']());}catch(_0x1079d5){_0x4ca2bb['push'](_0x4ca2bb['shift']());}}}(_0x2707,0xcf466));var __defProp=Object[_0x1f456e(0x134)],__name=(_0x2c2a73,_0x306fa4)=>__defProp(_0x2c2a73,_0x1f456e(0x1b9),{'value':_0x306fa4,'configurable':!![]});function parseAppServerEvent(_0x167da8){const _0x16db44={_0x36450b:0xeb,_0x96e8e3:0x1a5,_0x5ae6e4:0x13b,_0x2b1f94:0x11d},_0x2cecfc=_0x1f456e,_0x4664a6=_0x167da8[_0x2cecfc(_0x16db44._0x36450b)]();if(!_0x4664a6[_0x2cecfc(0x118)]('{'))return null;try{const _0x3350bc=JSON[_0x2cecfc(0x162)](_0x4664a6);if(_0x3350bc[_0x2cecfc(_0x16db44._0x96e8e3)]==='app-server:ready'||_0x3350bc[_0x2cecfc(_0x16db44._0x96e8e3)]===_0x2cecfc(_0x16db44._0x5ae6e4)||_0x3350bc['kind']===_0x2cecfc(_0x16db44._0x2b1f94))return _0x3350bc;return null;}catch{return null;}}function _0x3d64(_0x25ad30,_0x1a9709){_0x25ad30=_0x25ad30-0xe6;const _0x2707e0=_0x2707();let _0x3d6433=_0x2707e0[_0x25ad30];if(_0x3d64['fIJVeE']===undefined){var _0x2078ac=function(_0x5ad325){const _0x27ec8a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2c2a73='',_0x306fa4='';for(let _0x167da8=0x0,_0x4664a6,_0x3350bc,_0x4554db=0x0;_0x3350bc=_0x5ad325['charAt'](_0x4554db++);~_0x3350bc&&(_0x4664a6=_0x167da8%0x4?_0x4664a6*0x40+_0x3350bc:_0x3350bc,_0x167da8++%0x4)?_0x2c2a73+=String['fromCharCode'](0xff&_0x4664a6>>(-0x2*_0x167da8&0x6)):0x0){_0x3350bc=_0x27ec8a['indexOf'](_0x3350bc);}for(let _0x151b01=0x0,_0x36338b=_0x2c2a73['length'];_0x151b01<_0x36338b;_0x151b01++){_0x306fa4+='%'+('00'+_0x2c2a73['charCodeAt'](_0x151b01)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x306fa4);};_0x3d64['xXFchn']=_0x2078ac,_0x3d64['qXfdiE']={},_0x3d64['fIJVeE']=!![];}const _0x41e87a=_0x2707e0[0x0],_0x28b826=_0x25ad30+_0x41e87a,_0x10bd07=_0x3d64['qXfdiE'][_0x28b826];return!_0x10bd07?(_0x3d6433=_0x3d64['xXFchn'](_0x3d6433),_0x3d64['qXfdiE'][_0x28b826]=_0x3d6433):_0x3d6433=_0x10bd07,_0x3d6433;}__name(parseAppServerEvent,_0x1f456e(0x10a));function isRecord(_0x4554db){const _0x4f4bda=_0x1f456e;return typeof _0x4554db===_0x4f4bda(0x10d)&&_0x4554db!==null&&!Array['isArray'](_0x4554db);}__name(isRecord,_0x1f456e(0x1ec));var UNOTEST_DIR=_0x1f456e(0x1af),E2E_SUBDIR=_0x1f456e(0x19e),HELPERS_SUBDIR=_0x1f456e(0x179),COLLECTIONS_SUBDIR=_0x1f456e(0x10c),RUNS_SUBDIR=_0x1f456e(0xea),SNAPSHOTS_SUBDIR='.snapshots';function testDirFor(_0x151b01){return''+E2E_SUBDIR+_0x151b01;}__name(testDirFor,_0x1f456e(0x110));function runsDirFor(_0x36338b,_0x4867b5){return''+RUNS_SUBDIR+_0x36338b+(_0x4867b5?'.'+_0x4867b5:'');}__name(runsDirFor,_0x1f456e(0x19c));function isRunsDirName(_0x31d563){const _0xbc0d35={_0x84ef74:0x118},_0x2a060f=_0x1f456e;return _0x31d563===RUNS_SUBDIR||_0x31d563[_0x2a060f(0x118)](RUNS_SUBDIR+'-')||_0x31d563[_0x2a060f(_0xbc0d35._0x84ef74)](RUNS_SUBDIR+'.');}__name(isRunsDirName,_0x1f456e(0x1c0));function debugDirFor(_0x3fcd86){return'.debug'+_0x3fcd86;}__name(debugDirFor,_0x1f456e(0x157));function debuggerFileFor(_0x448b27){const _0x3f976=_0x1f456e;return UNOTEST_DIR+_0x3f976(0x1aa)+_0x448b27+'.json';}__name(debuggerFileFor,_0x1f456e(0x125));var LOCK_FILE=_0x1f456e(0x154),LOG_FILE='.viewer.log',STEPS_FILE='steps.jsonl',HEARTBEAT_FILE=_0x1f456e(0x171),DAY_INDEX_FILE=_0x1f456e(0x159),SCENARIOS_INDEX_DIR=_0x1f456e(0x17b),SCENARIOS_LATEST_FILE=_0x1f456e(0x16a),STDOUT_FILE=_0x1f456e(0x181),STDERR_FILE=_0x1f456e(0x147),COMMANDS_FILE=_0x1f456e(0x14d),RUNTIME_FILE=_0x1f456e(0x122),PICKER_SNAPSHOT_FILE=_0x1f456e(0x191),ENV_FILE=_0x1f456e(0x1e3),SECRETS_FILE=_0x1f456e(0xfb);function envFileFor(_0x38d22e,_0x421d4a){return''+ENV_FILE+_0x38d22e+(_0x421d4a?'.'+_0x421d4a:'');}__name(envFileFor,_0x1f456e(0x119));function secretsFileFor(_0x38eb1d,_0x3a8719){return''+SECRETS_FILE+_0x38eb1d+(_0x3a8719?'.'+_0x3a8719:'');}__name(secretsFileFor,_0x1f456e(0x105));function envLayerFilesFor(_0x188017,_0x549df0){return layersFor(ENV_FILE,_0x188017,_0x549df0);}__name(envLayerFilesFor,'envLayerFilesFor');function secretsLayerFilesFor(_0x42174d,_0x572f6f){return layersFor(SECRETS_FILE,_0x42174d,_0x572f6f);}__name(secretsLayerFilesFor,'secretsLayerFilesFor');function layersFor(_0x1adbbc,_0x145cbd,_0x3772bd){const _0x4794e4=_0x1f456e,_0x44f5d2=[_0x1adbbc];if(_0x145cbd)_0x44f5d2[_0x4794e4(0x1d5)](''+_0x1adbbc+_0x145cbd);if(_0x3772bd){_0x44f5d2['push'](_0x1adbbc+'.'+_0x3772bd);if(_0x145cbd)_0x44f5d2['push'](''+_0x1adbbc+_0x145cbd+'.'+_0x3772bd);}return _0x44f5d2;}__name(layersFor,'layersFor');var ARTIFACTS_ROOT_ENV=_0x1f456e(0x1ac);function artifactsRootFrom(_0x53ba1e,_0x19387d){const _0x1192a3=_0x53ba1e[ARTIFACTS_ROOT_ENV]?.['trim']();return _0x1192a3?_0x1192a3:_0x19387d;}__name(artifactsRootFrom,_0x1f456e(0x168));function activeEnvName(_0x1593cb){const _0x576978={_0x483ba8:0x150,_0x134054:0xeb},_0x537a19=_0x1f456e,_0xd0b5aa=_0x1593cb[_0x537a19(_0x576978._0x483ba8)]?.[_0x537a19(_0x576978._0x134054)]();return _0xd0b5aa?_0xd0b5aa:void 0x0;}__name(activeEnvName,_0x1f456e(0x166));var RESERVED_ENV_NAMES=new Set([_0x1f456e(0x1c4),_0x1f456e(0x1d9),_0x1f456e(0x1ef)]);function envNamesFromDirListing(_0x5ac762,_0x141e5d){const _0x5ab2c7={_0x4c0b79:0x138},_0x115d96=_0x1f456e,_0x5b4f0c=['.env',_0x115d96(0x163)]['flatMap'](_0x26a38e=>_0x141e5d?[_0x26a38e,''+_0x26a38e+_0x141e5d]:[_0x26a38e]),_0x4156af=new Set();for(const _0x3d0d94 of _0x5ac762){for(const _0x48e264 of _0x5b4f0c){const _0x117538=_0x48e264+'.';if(!_0x3d0d94[_0x115d96(0x118)](_0x117538))continue;const _0x595d1d=_0x3d0d94[_0x115d96(0x10e)](_0x117538[_0x115d96(0x187)]);if(!_0x595d1d||_0x595d1d[_0x115d96(0xfc)]('/'))continue;if(RESERVED_ENV_NAMES[_0x115d96(_0x5ab2c7._0x4c0b79)](_0x595d1d))continue;_0x4156af[_0x115d96(0x1d0)](_0x595d1d);}}return[..._0x4156af][_0x115d96(0xe6)]();}__name(envNamesFromDirListing,_0x1f456e(0x128));function isRegexLiteral(_0x57fe27){const _0x1e81b7={_0x456b5a:0x10d,_0x13da5b:0x1a5,_0xa4f978:0x12d},_0x33e72c=_0x1f456e;return typeof _0x57fe27===_0x33e72c(_0x1e81b7._0x456b5a)&&_0x57fe27!==null&&_0x57fe27[_0x33e72c(_0x1e81b7._0x13da5b)]===_0x33e72c(_0x1e81b7._0xa4f978)&&typeof _0x57fe27[_0x33e72c(0x15d)]===_0x33e72c(0x14f)&&typeof _0x57fe27['flags']===_0x33e72c(0x14f);}__name(isRegexLiteral,'isRegexLiteral');function regexLiteral(_0x2a3982,_0x1fec94=''){const _0x39d3d5={_0x415dcf:0x12d},_0x4bf85b=_0x1f456e;return{'kind':_0x4bf85b(_0x39d3d5._0x415dcf),'source':_0x2a3982,'flags':_0x1fec94};}__name(regexLiteral,_0x1f456e(0xf7));var RAND_BYTES=0x6;function makeRunId(_0x1ea968){const _0x38eaee={_0x3515fb:0x1c5,_0x20d250:0x13c,_0x212b18:0x187},_0x1ad7ad=_0x1f456e,_0x29d7f3=sanitizeRunIdSegment(_0x1ea968),_0x29f014=Date['now']()[_0x1ad7ad(0x16e)](0x24),_0x37a194=new Uint8Array(RAND_BYTES);globalThis[_0x1ad7ad(_0x38eaee._0x3515fb)][_0x1ad7ad(_0x38eaee._0x20d250)](_0x37a194);let _0x33d2cc='';for(let _0x4c7a57=0x0;_0x4c7a57<_0x37a194[_0x1ad7ad(_0x38eaee._0x212b18)];_0x4c7a57++){_0x33d2cc+=_0x37a194[_0x4c7a57][_0x1ad7ad(0x16e)](0x10)[_0x1ad7ad(0x152)](0x2,'0');}return _0x29d7f3+'-'+_0x29f014+'-'+_0x33d2cc;}__name(makeRunId,_0x1f456e(0x196));function sanitizeRunIdSegment(_0x20aa8f){const _0x2600af={_0x2e78dd:0x1c6,_0x35a493:0x14b},_0x14e810=_0x1f456e,_0x518277=_0x20aa8f[_0x14e810(0x1c6)](/[^a-zA-Z0-9_-]+/g,'-')[_0x14e810(_0x2600af._0x2e78dd)](/-+/g,'-')[_0x14e810(0x1c6)](/^-|-$/g,'');return _0x518277[_0x14e810(0x187)]>0x0?_0x518277:_0x14e810(_0x2600af._0x35a493);}__name(sanitizeRunIdSegment,'sanitizeRunIdSegment');var RANDOM_SUFFIX_RE=/^[0-9a-f]{6,}$/,MIN_PLAUSIBLE_MS=Date[_0x1f456e(0x13a)](0x7e4,0x0,0x1),MAX_PLAUSIBLE_MS=Date[_0x1f456e(0x13a)](0x834,0x0,0x1);function runIdStartedAt(_0x32f072){const _0x1d9d04={_0x501e77:0x187},_0x506678=_0x1f456e,_0xd7562a=_0x32f072[_0x506678(0x184)]('-');if(_0xd7562a[_0x506678(_0x1d9d04._0x501e77)]<0x3)return null;const _0x580fb5=_0xd7562a[_0xd7562a[_0x506678(_0x1d9d04._0x501e77)]-0x1];if(!RANDOM_SUFFIX_RE[_0x506678(0x1ee)](_0x580fb5))return null;const _0xf56632=_0xd7562a[_0xd7562a['length']-0x2];if(!/^[0-9a-z]+$/['test'](_0xf56632))return null;const _0x29bc64=parseInt(_0xf56632,0x24);if(!Number[_0x506678(0x14c)](_0x29bc64))return null;if(_0x29bc64<MIN_PLAUSIBLE_MS||_0x29bc64>=MAX_PLAUSIBLE_MS)return null;return _0x29bc64;}__name(runIdStartedAt,_0x1f456e(0x151));function shardPathForTimestamp(_0x3ccdff){const _0x248ea8=_0x1f456e,_0x2a44c3=new Date(_0x3ccdff),_0x47295a=String(_0x2a44c3[_0x248ea8(0x117)]())[_0x248ea8(0x152)](0x4,'0'),_0x13bebd=String(_0x2a44c3[_0x248ea8(0x1d4)]()+0x1)[_0x248ea8(0x152)](0x2,'0'),_0x5c66b7=String(_0x2a44c3[_0x248ea8(0x10b)]())['padStart'](0x2,'0');return _0x47295a+'/'+_0x13bebd+'/'+_0x5c66b7;}__name(shardPathForTimestamp,_0x1f456e(0x11a));function shardPathForRunId(_0xc862ea){const _0x591234=runIdStartedAt(_0xc862ea);return _0x591234===null?null:shardPathForTimestamp(_0x591234);}__name(shardPathForRunId,_0x1f456e(0x115));function runDirFor(_0x4d90c0,_0x3fd45e){const _0x50d7af=shardPathForRunId(_0x3fd45e);return _0x50d7af===null?null:_0x4d90c0+'/'+_0x50d7af+'/'+_0x3fd45e;}__name(runDirFor,_0x1f456e(0x1b5));var UnplaceableRunIdError=class extends Error{static{__name(this,_0x1f456e(0x15b));}constructor(_0x47c66f){const _0x190556={_0x1509bf:0x15b},_0x17a9aa=_0x1f456e;super(_0x17a9aa(0x1c3)+_0x47c66f),this[_0x17a9aa(0x1b9)]=_0x17a9aa(_0x190556._0x1509bf);}};function requireRunDirFor(_0x5cad41,_0x158aad){const _0xb948d7=runDirFor(_0x5cad41,_0x158aad);if(_0xb948d7===null)throw new UnplaceableRunIdError(_0x158aad);return _0xb948d7;}__name(requireRunDirFor,_0x1f456e(0x13d));function projectRunsRoot(_0x2ebced='',_0x5c0cd7){return UNOTEST_DIR+'/'+runsDirFor(_0x2ebced,_0x5c0cd7);}__name(projectRunsRoot,_0x1f456e(0xfa));function projectRunDirFor(_0x32b595,_0x4683d4='',_0x5d59c6){return requireRunDirFor(projectRunsRoot(_0x4683d4,_0x5d59c6),_0x32b595);}__name(projectRunDirFor,_0x1f456e(0x1a7));function shardDirFor(_0x13fed2,_0x4187e2){return _0x13fed2+'/'+shardPathForTimestamp(_0x4187e2);}__name(shardDirFor,_0x1f456e(0x1b8));function*shardDaysDescending(_0x491a26,_0x4d3651,_0x4d3fb7){const _0x4e3db5={_0x548883:0x18a},_0xf54603=_0x1f456e,_0x5fce7a=0x5265c00;let _0xef0c80=Math[_0xf54603(_0x4e3db5._0x548883)](_0x4d3651/_0x5fce7a)*_0x5fce7a;for(let _0x856339=0x0;_0x856339<_0x4d3fb7;_0x856339++){yield shardDirFor(_0x491a26,_0xef0c80),_0xef0c80-=_0x5fce7a;}}__name(shardDaysDescending,'shardDaysDescending');var RUN_INDEX_SCHEMA_VERSION=0x2,SCENARIO_RECENT_WINDOW=0xc;function isFailingStatus(_0x325d17){const _0x1dc7b0={_0x23ffc2:0x1d2},_0x12270c=_0x1f456e;return _0x325d17===_0x12270c(_0x1dc7b0._0x23ffc2)||_0x325d17===_0x12270c(0x1a1);}__name(isFailingStatus,_0x1f456e(0x155));function foldScenarioRun(_0x50a5e2,_0x57ff4d){const _0x6b8932={_0x38cef1:0x137,_0x5cf313:0x17c,_0x1b7866:0x1db,_0x35a38e:0x10e,_0x31061b:0x18f},_0x5e9d8b=_0x1f456e,_0x395bfb={'lastRunId':_0x57ff4d[_0x5e9d8b(0x1bc)],'lastStatus':_0x57ff4d[_0x5e9d8b(0x1db)],'lastAt':_0x57ff4d[_0x5e9d8b(0x18f)],'lastDurationMs':_0x57ff4d[_0x5e9d8b(_0x6b8932._0x38cef1)],'recent':[..._0x50a5e2?.[_0x5e9d8b(_0x6b8932._0x5cf313)]??[],_0x57ff4d[_0x5e9d8b(_0x6b8932._0x1b7866)]][_0x5e9d8b(_0x6b8932._0x35a38e)](-SCENARIO_RECENT_WINDOW)};if(!isFailingStatus(_0x57ff4d['status']))return{..._0x395bfb,'failStreak':0x0,'failingSince':null};const _0xf1b6b=(_0x50a5e2?.[_0x5e9d8b(0x1de)]??0x0)+0x1;return{..._0x395bfb,'failStreak':_0xf1b6b,'failingSince':_0xf1b6b===0x1?_0x57ff4d[_0x5e9d8b(0x18f)]:_0x50a5e2?.[_0x5e9d8b(0x1cf)]??_0x57ff4d[_0x5e9d8b(_0x6b8932._0x31061b)]};}__name(foldScenarioRun,'foldScenarioRun');function scenarioIndexFileName(_0x4792cf){const _0x44dd91={_0x5b2dd8:0x1c8},_0x25b1f9=_0x1f456e;return encodeURIComponent(_0x4792cf)+_0x25b1f9(_0x44dd91._0x5b2dd8);}__name(scenarioIndexFileName,'scenarioIndexFileName');function scenarioRefFromFileName(_0x29ba0e){const _0x4ee1d3={_0xba456d:0x10e,_0x4557db:0x1c8,_0x2ce6ef:0x187},_0x9a5cca=_0x1f456e;if(!_0x29ba0e['endsWith']('.jsonl'))return null;try{return decodeURIComponent(_0x29ba0e[_0x9a5cca(_0x4ee1d3._0xba456d)](0x0,-_0x9a5cca(_0x4ee1d3._0x4557db)[_0x9a5cca(_0x4ee1d3._0x2ce6ef)]));}catch{return null;}}__name(scenarioRefFromFileName,_0x1f456e(0x1e2));var CI_RUN_PATH='/api/box/ci/run',PROVIDER_IDS=[_0x1f456e(0x141),_0x1f456e(0x169),_0x1f456e(0x1dc)],RUN_ERROR_CODES=['unauthorized','scope-mismatch',_0x1f456e(0x1b7),_0x1f456e(0x12a),'no-collections','malformed',_0x1f456e(0x1e8)];function parseCiRunRequest(_0x546561){const _0x588704={_0x5f0bac:0x14f,_0x130497:0x187,_0x34f797:0x1b1,_0x226173:0x167},_0x3717c0=_0x1f456e;if(!isRecord(_0x546561))return null;const {bundleId:_0x4d8315,environment:_0x25bbf9,collections:_0x4622c9,pr:_0x1f4147,branch:_0x5b7659,sha:_0x2c6492}=_0x546561;if(typeof _0x4d8315!==_0x3717c0(0x14f)||_0x4d8315[_0x3717c0(0x187)]===0x0)return null;if(typeof _0x25bbf9!==_0x3717c0(_0x588704._0x5f0bac)||_0x25bbf9[_0x3717c0(_0x588704._0x130497)]===0x0)return null;let _0x23dffa=null;if(_0x4622c9!==void 0x0){if(!Array[_0x3717c0(0x18e)](_0x4622c9))return null;if(_0x4622c9[_0x3717c0(_0x588704._0x34f797)](_0xb35d32=>typeof _0xb35d32!=='string'||_0xb35d32[_0x3717c0(0x187)]===0x0))return null;_0x23dffa=_0x4622c9;}if(_0x1f4147!==void 0x0&&(typeof _0x1f4147!=='number'||!Number[_0x3717c0(0x111)](_0x1f4147)))return null;for(const _0x58ce77 of[_0x5b7659,_0x2c6492]){if(_0x58ce77!==void 0x0&&typeof _0x58ce77!==_0x3717c0(_0x588704._0x5f0bac))return null;}return{'bundleId':_0x4d8315,'environment':_0x25bbf9,..._0x23dffa?{'collections':_0x23dffa}:{},...typeof _0x1f4147===_0x3717c0(_0x588704._0x226173)?{'pr':_0x1f4147}:{},...typeof _0x5b7659==='string'?{'branch':_0x5b7659}:{},...typeof _0x2c6492===_0x3717c0(_0x588704._0x5f0bac)?{'sha':_0x2c6492}:{}};}__name(parseCiRunRequest,_0x1f456e(0x139));function parseCiRunResponse(_0x10fad9){const _0xb4b029={_0x389d2d:0x12e,_0x178a9c:0x167},_0x1bb827=_0x1f456e;if(!isRecord(_0x10fad9))return null;if(isRecord(_0x10fad9['error'])){const {code:_0x3ba2de,message:_0x950b80}=_0x10fad9[_0x1bb827(_0xb4b029._0x389d2d)];if(!RUN_ERROR_CODES[_0x1bb827(0xfc)](_0x3ba2de))return null;if(typeof _0x950b80!==_0x1bb827(0x14f))return null;return{'error':{'code':_0x3ba2de,'message':_0x950b80}};}const {status:_0x3d6190,bundleId:_0x131aa4,environment:_0x577291,runs:_0x539b83,superseded:_0x2a5b26}=_0x10fad9;if(_0x3d6190!==_0x1bb827(0x1bb))return null;if(typeof _0x131aa4!==_0x1bb827(0x14f)||typeof _0x577291!==_0x1bb827(0x14f))return null;if(!Array[_0x1bb827(0x18e)](_0x539b83))return null;const _0x3bba69=[];for(const _0x1ad4e8 of _0x539b83){if(!isRecord(_0x1ad4e8))return null;const {runId:_0x5cc16e,collection:_0x300396}=_0x1ad4e8;if(typeof _0x5cc16e!=='string'||typeof _0x300396!=='string')return null;_0x3bba69['push']({'runId':_0x5cc16e,'collection':_0x300396});}if(_0x2a5b26!==void 0x0&&typeof _0x2a5b26!==_0x1bb827(0x167))return null;return{'status':'queued','bundleId':_0x131aa4,'environment':_0x577291,'runs':_0x3bba69,...typeof _0x2a5b26===_0x1bb827(_0xb4b029._0x178a9c)?{'superseded':_0x2a5b26}:{}};}__name(parseCiRunResponse,_0x1f456e(0x1ba));function parseCiProvider(_0x1a17fb){const _0x2a6847=_0x1f456e;return PROVIDER_IDS[_0x2a6847(0xfc)](_0x1a17fb)?_0x1a17fb:null;}__name(parseCiProvider,_0x1f456e(0x14e));var QUEUE_SUBDIR='.queue',QUEUE_TICKETS_DIR=_0x1f456e(0x198),QUEUE_RUNNING_DIR='running',QUEUE_SLOTS_DIR='slots',QUEUE_MUTEX_FILE='.mutex',QUEUE_LEASE_ENV=_0x1f456e(0x114),QUEUE_DISABLED_ENV=_0x1f456e(0xec),QUEUE_GLOBAL_DIR_ENV=_0x1f456e(0x189),QUEUE_GLOBAL_SLOTS_ENV='UNOTEST_QUEUE_GLOBAL_SLOTS',QUEUE_SCHEMA_VERSION=0x1;function queueDirFor(_0x4784e8,_0x1549ce){return''+QUEUE_SUBDIR+_0x4784e8+(_0x1549ce?'.'+_0x1549ce:'');}__name(queueDirFor,_0x1f456e(0x148));function isQueueDirName(_0x1826cb){const _0x949af9={_0x54f374:0x118},_0x1ec942=_0x1f456e;return _0x1826cb===QUEUE_SUBDIR||_0x1826cb[_0x1ec942(_0x949af9._0x54f374)](QUEUE_SUBDIR+'-')||_0x1826cb[_0x1ec942(0x118)](QUEUE_SUBDIR+'.');}__name(isQueueDirName,_0x1f456e(0x108));function projectQueueRoot(_0x38bf8c='',_0x5c2e6d){return UNOTEST_DIR+'/'+queueDirFor(_0x38bf8c,_0x5c2e6d);}__name(projectQueueRoot,'projectQueueRoot');var PRIORITY_RANKS=Object[_0x1f456e(0x174)]({'maintenance':0x0,'interactive':0x1,'ci':0x2,'schedule':0x3}),RANK_PRIORITIES=[_0x1f456e(0x1cd),_0x1f456e(0x1b4),'ci',_0x1f456e(0x120)],QUEUE_PRIORITIES=RANK_PRIORITIES;function queuePriorityRank(_0x328945){return PRIORITY_RANKS[_0x328945];}__name(queuePriorityRank,_0x1f456e(0x19f));function queuePriorityFromRank(_0x6301bd){return RANK_PRIORITIES[_0x6301bd]??null;}__name(queuePriorityFromRank,_0x1f456e(0x1e6));function describeTicketCi(_0x34726e){const _0x33d784={_0x224f4a:0x1a9,_0x34dd56:0x197,_0x3612b6:0x197,_0x38e9f7:0x10e,_0x43289c:0x1a3},_0x4923d3=_0x1f456e,_0x540b95=_0x34726e['sha']?'@'+_0x34726e[_0x4923d3(_0x33d784._0x224f4a)][_0x4923d3(0x10e)](0x0,0x7):'';if(_0x34726e['pr']!==void 0x0)return'PR\x20#'+_0x34726e['pr']+_0x540b95;if(_0x34726e[_0x4923d3(_0x33d784._0x34dd56)]!==void 0x0)return''+_0x34726e[_0x4923d3(_0x33d784._0x3612b6)]+_0x540b95;return _0x540b95[_0x4923d3(0x187)]>0x0?_0x540b95[_0x4923d3(_0x33d784._0x38e9f7)](0x1):_0x34726e[_0x4923d3(_0x33d784._0x43289c)];}__name(describeTicketCi,_0x1f456e(0x1e0));function makeQueueTicketName(_0xc222df,_0x48db1a,_0x4d1bad){const _0x2965b1={_0x2160e5:0x16e},_0x17b4d7=_0x1f456e;return queuePriorityRank(_0xc222df)+'-'+_0x48db1a[_0x17b4d7(_0x2965b1._0x2160e5)](0x24)+'-'+_0x4d1bad+_0x17b4d7(0x100);}function _0x2707(){const _0x105d41=['C2nLBMfYAw8','BxvZDcbIzsbHihn0CMLUzW','uNvUBMvYtM90q29UzMLNDxjLzevYCM9Y','x2HLBhbLCNm','CgfYC2vty2HLzhvSzuvUDhj5','x3nJzw5HCMLVCW','CMvJzw50','zw52s2v5CW','C2vYAwfSAxPLrw52vMfSDwu','l2HLywX0Aa','CMvTB3zLrw52vMfY','C3rKB3v0lMXVzW','qxbW','z2L0','C3bSAxq','y29TCgfYzvf1zxvLvgLJA2v0tMfTzxm','mJC5qLPYy0nT','BgvUz3rO','y29TCgXLDgvK','vu5pvevtvf9rvuvvrv9hte9cquXFreLs','zMXVB3i','mZK0ntK2y2n4rvj4','yxnZAwDUBwvUDevUDhjPzxm','Aw5Zzxj0rw52vMfY','AxnbCNjHEq','C3rHCNrLzef0','refuqujbu0vFvvjm','CgLJA2vYlxnUyxbZAg90lNr4Da','vu5pvevtvf9kvurhrv9dtefvrevFqKLo','y2XP','tK9Fq09mt1i','DMfSAwrHDgvdB2XSzwn0Aw9UtMfTzq','BwfRzvj1BKLK','yNjHBMnO','DgLJA2v0CW','CgXHBKfKzfzHCMLHyMXL','ywjVCNrLza','vu5pvevtvf9kvurhrv9wt1rf','CNvUC0rPCKzVCG','CNvUBMvY','ztjL','CxvLDwvqCMLVCML0EvjHBMS','BwfUAwzLC3qUANnVBG','Aw50zxjYDxb0zwq','mZGZmZa3nuDLthvkva','ChjVDMLKzxi','BxvZDcbUB3qGyMuGzw1WDhK','A2LUza','yMXVyLjLBfnLz21LBNrZrM9Y','ChjVAMvJDfj1BKrPCKzVCG','vu5pvevtvf9tte9xx01p','C2HH','lY5Kzwj1z2DLCG','vu5pvevtvf9kvurhrv9srvrssuvt','vu5pvevtvf9buLrjrKfdvfnFuK9pva','yMXVyNnsB290rM9Y','nNrMtgPHBG','Dw5VDgvZDa','Aw52ywXPzc1Uyw1L','C29Tzq','C2vJCMv0C0nVBNrLBNq','uNvUBMvYqwrHChrLCK5VDezVDw5KrxjYB3i','Aw50zxjHy3rPDMu','CNvUrgLYrM9Y','igLZig5VDcbHigTUB3DUihj1BM5LCIbZzxr0Aw5NiokaLcbJAg9VC2uGB25LigzYB20GDgHLihj1BM5LCI1JB25MAwCGBgLZDc4','Dw5RBM93BI1LBNzPCM9UBwvUDa','C2HHCMreAxjgB3i','BMfTzq','CgfYC2vdAvj1BLjLC3bVBNnL','CxvLDwvK','CNvUswq','zgvZy3jPyMvcDw5KBgu','Dg9mB3DLCKnHC2u','CgfYC2vwyxjPywjSzuDHChm','AxnsDw5ZrgLYtMfTzq','C291CMnLCY5QC29U','mtq2ody2ueT6sxjo','CNvUswqGy2fYCMLLCYbUBYb0Aw1LC3rHBxaSignHBM5VDcbWBgfJzsbPDcbPBIbHihnOyxjKoIa','zxHHBxbSzq','y3j5ChrV','CMvWBgfJzq','C2vJCMv0CW','lMPZB25S','yNvUzgXLswq','BxvZDcbUB3qGC3rHCNqGD2L0AcaNxYCGkhjLC2vYDMvKkq','zMLUzeLUzgv4','DgvYBwLUywW','BwfPBNrLBMfUy2u','AwqTBwLZBwf0y2G','zMfPBgLUz1nPBMnL','ywrK','AxnuzxjTAw5HBfj1BNrPBwvtDgf0zq','zMfPBgvK','vu5pvevtvf9kvurhrv9bq0nfu1nFve9lru4','z2v0vvrdtw9UDgG','ChvZAa','yNvUzgXLlMPZB24','vu5pvevtvf9kvurhrv9ut0TftG','yM9VBgvHBG','C2fTCgXL','vu5pvevtvf9kvurhrv9nt0rfta','C3rHDhvZ','yxbP','Dw5RBM93BI1YDw5UzxiTA2v5','zMfPBfn0CMvHAW','vu5pvevtvf9mt0nbteu','zgvZy3jPyMvuAwnRzxrdAq','BxvZDcbUB3qGC3rHCNqGD2L0AcaNlIC','C2nLBMfYAw9szwzgCM9TrMLSzu5HBwu','Dw5VDgvZDc8Uzw52','l2fWAs9IB3GVyNvUzgXLCW','l2P1zgDL','CxvLDwvqCMLVCML0EuzYB21syw5R','vu5pvevtvf9mt0DFtevwruW','C3rVCMfNzq','AxnbC3nPz25Tzw50t2y','AxnfEhrLCM5HBfzHCK5HBwu','Aw5KzxHpzG','AxnszwnVCMq','DMfSAwrHDgvtzwDTzw50tMfTzq','DgvZDa','DgvTCgXHDgu','Ag9ZDa','C29YDa','vu5pvevtvf9ct1HFve9lru4','vu5pvevtvf9iruferuq','zw52','lNj1BNm','DhjPBq','vu5pvevtvf9ot19rvuvvrq','C2nOzw1HvMvYC2LVBG','CgfYC2vrDwv1zvrPy2TLDa','vu5pvevtvf9kvurhrv9nt0rf','CMfUAW','CgfYC2vfBNzdB250zw50','zw52q29UDgvUDa','mZa4zNLHthvM','zgvSzxrLu2HHzg93v2fYBMLUzW','zxHPC3rZ','yMXVyLjLBfbHDgHgB3i','CMvNzxHmAxrLCMfS','otCYnJK1nfDPvK9NCq','vu5pvevtvf9kvurhrv9usu1ft1vux01t','ChjVAMvJDfj1BNnsB290','Dw5VDgvZDc8UC2vJCMv0CW','Aw5JBhvKzxm','vu5pvevtvf9eruzbvuXux05bvKLhqvrjt05FveLnru9vvf9nuW','vu5pvevtvf9eruzbvuXux1rjtuvpvvrFtvm','vu5pvevtvf9kvurhrv9quKvbtujmrq','lMPZB24','iI4G','sw52ywXPzejSB2jiyxnOrxjYB3i','vu5pvevtvf9usu1fwK9orq','igLZigfSC28GC2v0igLUihvUB3rLC3qVlMvUDIdIGjqGDgHLihnLy3jLDcb2ywX1zsbUB3CGC2HHzg93CYbPDc4','C2vJCMv0C0zPBgvgB3i','zhvWBgLJyxrL','CgfYC2vcDw5KBgu','AxnrDwv1zurPCK5HBwu','vu5pvevtvf9erujvr19quKvwsuvxx0jzvevt','CgfYC2vbChbtzxj2zxjfDMvUDa','z2v0vvrdrgf0zq','x2nVBgXLy3rPB25Z','B2jQzwn0','C2XPy2u','CMvZzxj2zwrvBMrLCNnJB3jL','DgvZDerPCKzVCG','AxnjBNrLz2vY','y3jLyxrLzef0','zxHLyW','vu5pvevtvf9rvuvvrv9mruftrq','C2HHCMrqyxrOrM9YuNvUswq','vu5pvevtvf9orvrxt1jl','z2v0vvrdrNvSBfLLyxi','C3rHCNrZv2L0Aa','zw52rMLSzuzVCG','C2HHCMrqyxrOrM9YvgLTzxn0yw1W','BwnW','CgfYC2vhAxrjBMzV','yxbWlxnLCNzLCJPLCNjVCG','vu5pvevtvf9kvurhrv9vuKW','AxnbBM5VDgf0Aw9UtgLUzq','C2nOzwr1Bgu','CMfUzg9T','CNvUDgLTzs5QC29U','icH3AxaP','zxHWzwn0lwzHAwW','zgvIDwDNzxjgAwXLrM9Y','uNvUBMvY','lNDVCMTZCgfJzs5QC29U','zw52tMfTzxngCM9TrgLYtgLZDgLUzW','AxnsDw5UzxjdB25MAwDlzxK','Dw5RBM93BI1IDw5KBgu','y3jLyxrLza','CgfYC2vcDw5KBgvnyw5PzMvZDa','CMvNzxG','zxjYB3i','BwfRzvf1zxvLvgLJA2v0tMfTzq','yMXVyIbOyxnOig11C3qGyMuGBg93zxjJyxnLigHLEcWGz290oIa','vu5pvevtvf9dt05tt0Xf','CgfYC2vuAwnRzxrdAq','igLZigfSC28GC2v0igLUihLVDxiGC2HLBgWGzw52AxjVBM1LBNqG4OcuigL0ihDPBgWGA2vLCcbYzxnVBhzPBMCGzNjVBsb0AgvYzsaODgHLigvUDMLYB25Tzw50ihDPBNmGB3zLCIb0AguGzMLSzsKU','zgvMAw5LuhjVCgvYDhK','yxv0Ag9YAw5N','vu5pvevtvf9erujvr19lruvqx0nbteXt','zhvYyxrPB25nCW','AgfZ','CgfYC2vdAvj1BLjLCxvLC3q','vvrd','yxbWlxnLCNzLCJPYzxvZzwq','z2v0uMfUzg9TvMfSDwvZ','CMvXDwLYzvj1BKrPCKzVCG','iYaTls0G','nZm1mtbbu2XJCva','DMLLD2vY','z2L0AhvI','DMfSAwrHDgvgC1nHzMvoyw1L','CNvUBMvYici','vu5pvevtvf9erujvrW','CgfYC2vcDw5KBgvvCgXVywrszxnWB25Zzq','CgLK','C3rKzxjYlMXVzW','CxvLDwveAxjgB3i','vu5pvevtvf9kvurhrv9it1nu','vu5pvevtvf9kvurhrv9dquXmx1rjtuvpvvrFtvm','CNvU','AxngAw5PDgu','y29TBwfUzhmUANnVBMW','CgfYC2vdAvbYB3zPzgvY','C3rYAw5N','vu5pvevtvf9ftLy','CNvUswrtDgfYDgvKqxq','CgfKu3rHCNq','vu5pvevtvf9cvu5etevFsuq','lNzPzxDLCI5SB2nR','AxngywLSAw5Nu3rHDhvZ','y2fUBM90igXVywqGCNvUBMvYigfKyxb0zxiGiG','zgvIDwDeAxjgB3i','AM9PBG','x2rHEs5QC29UBa','mJC4nJGWzK9wD0PL','vw5WBgfJzwfIBgvsDw5jzevYCM9Y','ig11C3qGyMuGvvbqrvjFu05bs0uGkguUzY4Gqvbqx0jbu0vFvvjmksbZBYbHihnJzw5HCMLVignHBIbYzwzLCMvUy2uGAxqGyNKGBMfTzs4','C291CMnL','rK9sq0vFq09mt1i','vu5pvevtvf9dqunirv9esvi','vu5pvevtvf9kvurhrv9mt0DFtevwruW','vu5pvevtvf9qt1bvuf9huKfdrv9nuW','CgfYC2u','lNnLy3jLDhm','vu5pvevtvf9erujvr19nqvHFqLLurvm','CgfYC2vrDwv1zvrPy2TLDe5HBwu','ywn0AxzLrw52tMfTzq','BNvTyMvY','yxj0AwzHy3rZuM9VDezYB20','z2L0BgfI','x2XHDgvZDc5QC29U','zw5KC1DPDgG','C3rYAw5NtgLZDa','CgfYC2vty2vUyxjPB0fUBM90yxrPB25Z','Dg9tDhjPBMC','C2vJCMv0','yMXVyLbHDgHgB3i','AgvHCNrIzwf0','nJaZodeYr2THBfb4','yxbW','zNjLzxPL','x2jSB2jZ'];_0x2707=function(){return _0x105d41;};return _0x2707();}__name(makeQueueTicketName,_0x1f456e(0x12f));var TICKET_NAME_RE=/^([0-3])-([0-9a-z]+)-([0-9a-f]+)\.json$/;function parseQueueTicketName(_0x242b8e){const _0x45d307={_0x1bef9c:0x113,_0x5e4893:0x14c},_0x19fd1e=_0x1f456e,_0x5f4528=TICKET_NAME_RE[_0x19fd1e(_0x45d307._0x1bef9c)](_0x242b8e);if(!_0x5f4528)return null;const _0x209dd2=Number(_0x5f4528[0x1]),_0x47dfee=queuePriorityFromRank(_0x209dd2);if(_0x47dfee===null)return null;const _0x21a933=parseInt(_0x5f4528[0x2],0x24);if(!Number[_0x19fd1e(_0x45d307._0x5e4893)](_0x21a933))return null;return{'rank':_0x209dd2,'priority':_0x47dfee,'createdAt':_0x21a933,'random':_0x5f4528[0x3]};}__name(parseQueueTicketName,_0x1f456e(0x165));function compareQueueTicketNames(_0x10c928,_0x52127d){const _0xfe946d={_0x2fdbb:0xf0,_0x48facd:0xf0,_0x443698:0xf0,_0x4a787c:0x112,_0x180928:0x112,_0x29232e:0x121},_0x25772c=_0x1f456e,_0xf7d2a7=parseQueueTicketName(_0x10c928),_0x2dc934=parseQueueTicketName(_0x52127d);if(!_0xf7d2a7||!_0x2dc934)return _0x10c928<_0x52127d?-0x1:_0x10c928>_0x52127d?0x1:0x0;if(_0xf7d2a7['rank']!==_0x2dc934[_0x25772c(_0xfe946d._0x2fdbb)])return _0xf7d2a7[_0x25772c(_0xfe946d._0x48facd)]-_0x2dc934[_0x25772c(_0xfe946d._0x443698)];if(_0xf7d2a7[_0x25772c(0x112)]!==_0x2dc934[_0x25772c(_0xfe946d._0x4a787c)])return _0xf7d2a7[_0x25772c(0x112)]-_0x2dc934[_0x25772c(_0xfe946d._0x180928)];return _0xf7d2a7[_0x25772c(0x121)]<_0x2dc934[_0x25772c(0x121)]?-0x1:_0xf7d2a7[_0x25772c(_0xfe946d._0x29232e)]>_0x2dc934[_0x25772c(0x121)]?0x1:0x0;}__name(compareQueueTicketNames,_0x1f456e(0x185));var TICKET_KINDS=[_0x1f456e(0x176),'collection',_0x1f456e(0x135),_0x1f456e(0x1cd)],PRODUCER_KINDS=[_0x1f456e(0x193),_0x1f456e(0x140),_0x1f456e(0x11b),_0x1f456e(0x120),'ci'];function parseQueueTicket(_0x5183a7){const _0x2a17bd={_0x40abcf:0x187,_0x593a12:0xfc,_0x222e03:0x14c,_0xa73180:0xfc,_0x5aeefc:0x14f,_0x58487e:0x1c9,_0xaccbfc:0x1a5,_0xb0fc2d:0x146,_0x359f14:0x1f0},_0x8b9d9b=_0x1f456e;if(!isRecord(_0x5183a7))return null;const {schemaVersion:_0x40cf25,runId:_0x250366,kind:_0x307abd,ref:_0x3619a8,env:_0x4532b7,priority:_0x24788e,weight:_0x306679,producer:_0x437d1d,source:_0x476fea,ci:_0x56f617,createdAt:_0x538784}=_0x5183a7;if(_0x40cf25!==QUEUE_SCHEMA_VERSION)return null;if(typeof _0x250366!==_0x8b9d9b(0x14f)||_0x250366[_0x8b9d9b(_0x2a17bd._0x40abcf)]===0x0)return null;if(typeof _0x3619a8!==_0x8b9d9b(0x14f))return null;if(!TICKET_KINDS['includes'](_0x307abd))return null;if(!QUEUE_PRIORITIES[_0x8b9d9b(_0x2a17bd._0x593a12)](_0x24788e))return null;if(typeof _0x306679!=='number'||!Number[_0x8b9d9b(_0x2a17bd._0x222e03)](_0x306679)||_0x306679<0x1)return null;if(typeof _0x538784!==_0x8b9d9b(0x167)||!Number['isFinite'](_0x538784))return null;if(!isRecord(_0x437d1d))return null;if(!PRODUCER_KINDS[_0x8b9d9b(_0x2a17bd._0xa73180)](_0x437d1d['kind']))return null;if(typeof _0x437d1d['pid']!=='number'||typeof _0x437d1d[_0x8b9d9b(0x1f0)]!==_0x8b9d9b(_0x2a17bd._0x5aeefc))return null;if(_0x4532b7!==void 0x0&&typeof _0x4532b7!=='string')return null;let _0x2d3cec=null;if(_0x476fea!==void 0x0){if(!isRecord(_0x476fea)||typeof _0x476fea['bundleId']!=='string'||_0x476fea[_0x8b9d9b(_0x2a17bd._0x58487e)][_0x8b9d9b(_0x2a17bd._0x40abcf)]===0x0)return null;_0x2d3cec={'bundleId':_0x476fea[_0x8b9d9b(0x1c9)]};}let _0x1db3d5=null;if(_0x56f617!==void 0x0){_0x1db3d5=parseTicketCi(_0x56f617);if(_0x1db3d5===null)return null;}return{'schemaVersion':QUEUE_SCHEMA_VERSION,'runId':_0x250366,'kind':_0x307abd,'ref':_0x3619a8,'priority':_0x24788e,'weight':_0x306679,'producer':{'kind':_0x437d1d[_0x8b9d9b(_0x2a17bd._0xaccbfc)],'pid':_0x437d1d[_0x8b9d9b(_0x2a17bd._0xb0fc2d)],'host':_0x437d1d[_0x8b9d9b(_0x2a17bd._0x359f14)]},'createdAt':_0x538784,...typeof _0x4532b7===_0x8b9d9b(_0x2a17bd._0x5aeefc)?{'env':_0x4532b7}:{},..._0x2d3cec?{'source':_0x2d3cec}:{},..._0x1db3d5?{'ci':_0x1db3d5}:{}};}__name(parseQueueTicket,_0x1f456e(0xee));function parseTicketCi(_0x4d6814){const _0x4b90f0={_0x1a4a0c:0x1a3,_0x59912e:0x111,_0x2de4e1:0x14f,_0x8bacf2:0x167},_0x30092a=_0x1f456e;if(!isRecord(_0x4d6814))return null;const _0x2f66ad=parseCiProvider(_0x4d6814[_0x30092a(_0x4b90f0._0x1a4a0c)]);if(_0x2f66ad===null)return null;const {repo:_0x2469fb,branch:_0xa5801a,sha:_0x290778,pr:_0x439491,checkId:_0x3b2770}=_0x4d6814;for(const _0x43b716 of[_0x2469fb,_0xa5801a,_0x290778,_0x3b2770]){if(_0x43b716!==void 0x0&&typeof _0x43b716!=='string')return null;}if(_0x439491!==void 0x0&&(typeof _0x439491!=='number'||!Number[_0x30092a(_0x4b90f0._0x59912e)](_0x439491)))return null;return{'provider':_0x2f66ad,...typeof _0x2469fb===_0x30092a(0x14f)?{'repo':_0x2469fb}:{},...typeof _0xa5801a===_0x30092a(_0x4b90f0._0x2de4e1)?{'branch':_0xa5801a}:{},...typeof _0x290778===_0x30092a(0x14f)?{'sha':_0x290778}:{},...typeof _0x439491===_0x30092a(_0x4b90f0._0x8bacf2)?{'pr':_0x439491}:{},...typeof _0x3b2770==='string'?{'checkId':_0x3b2770}:{}};}__name(parseTicketCi,_0x1f456e(0x132));var BUNDLE_SCHEMA_VERSION=0x1,BUNDLE_MANIFEST_FILE=_0x1f456e(0x1d6),BUNDLE_UPLOAD_PATH=_0x1f456e(0x1e4),BOX_URL_ENV='UNOTEST_BOX_URL',BOX_TOKEN_ENV=_0x1f456e(0xe7),BUNDLE_ID_ENV=_0x1f456e(0x153);function parseGitInfo(_0x261804){const _0x321e14={_0x33a409:0x1d8,_0x55ec87:0x14f,_0x2b8144:0x14f},_0x1cc1ae=_0x1f456e;if(!isRecord(_0x261804))return null;const {repo:_0x1111f1,branch:_0x4f130f,sha:_0x2052f6,dirty:_0x51369d}=_0x261804;if(typeof _0x51369d!==_0x1cc1ae(_0x321e14._0x33a409))return null;for(const _0x123138 of[_0x1111f1,_0x4f130f,_0x2052f6]){if(_0x123138!==void 0x0&&typeof _0x123138!==_0x1cc1ae(_0x321e14._0x55ec87))return null;}return{'dirty':_0x51369d,...typeof _0x1111f1===_0x1cc1ae(_0x321e14._0x55ec87)?{'repo':_0x1111f1}:{},...typeof _0x4f130f===_0x1cc1ae(0x14f)?{'branch':_0x4f130f}:{},...typeof _0x2052f6===_0x1cc1ae(_0x321e14._0x2b8144)?{'sha':_0x2052f6}:{}};}__name(parseGitInfo,_0x1f456e(0x11c));function parseBundleManifest(_0x3b2213){const _0x563d3e={_0x168d2a:0x14f,_0x55055d:0x1ee,_0x3d96e4:0x14f,_0xa38849:0x14c,_0x398b35:0x111,_0x14a9c6:0x167,_0x53459d:0x187},_0x505d1e=_0x1f456e;if(!isRecord(_0x3b2213))return null;const {schemaVersion:_0x531279,bundleId:_0x266a5a,sha256:_0x54328d,createdAt:_0x4235d5,webVersion:_0x3aae9f,author:_0x527dde,git:_0x3a8ac2,fileCount:_0x166df4,byteSize:_0x5a0351,declaredVariables:_0x4fcbb2}=_0x3b2213;if(_0x531279!==BUNDLE_SCHEMA_VERSION)return null;if(typeof _0x266a5a!==_0x505d1e(_0x563d3e._0x168d2a)||_0x266a5a['length']===0x0)return null;if(_0x54328d!==void 0x0&&!/^[0-9a-f]{64}$/[_0x505d1e(_0x563d3e._0x55055d)](String(_0x54328d)))return null;if(typeof _0x3aae9f!==_0x505d1e(_0x563d3e._0x3d96e4)||_0x3aae9f[_0x505d1e(0x187)]===0x0)return null;if(typeof _0x4235d5!=='number'||!Number[_0x505d1e(_0x563d3e._0xa38849)](_0x4235d5))return null;if(typeof _0x166df4!=='number'||!Number[_0x505d1e(_0x563d3e._0x398b35)](_0x166df4))return null;if(typeof _0x5a0351!==_0x505d1e(_0x563d3e._0x14a9c6)||!Number['isInteger'](_0x5a0351))return null;if(_0x527dde!==void 0x0&&typeof _0x527dde!=='string')return null;let _0x10a0c5=null;if(_0x3a8ac2!==void 0x0){_0x10a0c5=parseGitInfo(_0x3a8ac2);if(_0x10a0c5===null)return null;}const _0x1e8b67=Array['isArray'](_0x4fcbb2)?_0x4fcbb2['filter'](_0xaecde5=>typeof _0xaecde5===_0x505d1e(0x14f)):[];return{'schemaVersion':BUNDLE_SCHEMA_VERSION,'bundleId':_0x266a5a,...typeof _0x54328d===_0x505d1e(0x14f)?{'sha256':_0x54328d}:{},'createdAt':_0x4235d5,'webVersion':_0x3aae9f,'fileCount':_0x166df4,'byteSize':_0x5a0351,...typeof _0x527dde==='string'?{'author':_0x527dde}:{},..._0x10a0c5?{'git':_0x10a0c5}:{},..._0x1e8b67[_0x505d1e(_0x563d3e._0x53459d)]>0x0?{'declaredVariables':_0x1e8b67}:{}};}__name(parseBundleManifest,_0x1f456e(0x12c));function describeBundle(_0x481d94){const _0x58b3fd={_0x1d5a67:0x183,_0x3f9d8d:0x1a9,_0x4635db:0x197},_0x2f77de=_0x1f456e,_0x220980=_0x481d94[_0x2f77de(_0x58b3fd._0x1d5a67)];if(!_0x220980||_0x220980['branch']===void 0x0&&_0x220980['sha']===void 0x0)return _0x481d94[_0x2f77de(0x1c9)];const _0x3ce3f7=_0x220980[_0x2f77de(_0x58b3fd._0x3f9d8d)]?_0x220980['sha']['slice'](0x0,0x7):'?',_0xbcd43d=_0x220980[_0x2f77de(_0x58b3fd._0x4635db)]??'?';return _0xbcd43d+'@'+_0x3ce3f7+(_0x220980['dirty']?_0x2f77de(0x123):'');}__name(describeBundle,_0x1f456e(0x1bd));var UPLOAD_ERROR_CODES=['unauthorized','too-large','malformed',_0x1f456e(0x1ce),'min-version','scope-mismatch',_0x1f456e(0x1e8)];function parseBundleUploadResponse(_0xb9631a){const _0x43febb={_0x50b7a9:0x12e,_0x37c558:0x14f,_0x4f7ebe:0xf5},_0x473324=_0x1f456e;if(!isRecord(_0xb9631a))return null;if(isRecord(_0xb9631a[_0x473324(_0x43febb._0x50b7a9)])){const {code:_0x41e445,message:_0x5780b6}=_0xb9631a[_0x473324(0x12e)];if(!UPLOAD_ERROR_CODES[_0x473324(0xfc)](_0x41e445))return null;if(typeof _0x5780b6!==_0x473324(_0x43febb._0x37c558))return null;return{'error':{'code':_0x41e445,'message':_0x5780b6}};}const {status:_0x438b64,bundleId:_0x478f3f}=_0xb9631a;if(_0x438b64!==_0x473324(0x12b)&&_0x438b64!==_0x473324(_0x43febb._0x4f7ebe))return null;if(typeof _0x478f3f!=='string'||_0x478f3f[_0x473324(0x187)]===0x0)return null;const _0x2d2826=parseVariableGaps(_0xb9631a['variableGaps']);return _0x2d2826===null?{'status':_0x438b64,'bundleId':_0x478f3f}:{'status':_0x438b64,'bundleId':_0x478f3f,'variableGaps':_0x2d2826};}__name(parseBundleUploadResponse,_0x1f456e(0x145));function parseVariableGaps(_0x4b68b3){const _0x56a4f1={_0xf792c5:0x18e,_0x1db080:0x14f,_0x249741:0x187},_0x1cc21f=_0x1f456e;if(!Array[_0x1cc21f(_0x56a4f1._0xf792c5)](_0x4b68b3))return null;const _0x7a9c98=[];for(const _0x59003d of _0x4b68b3){if(!isRecord(_0x59003d))continue;const {project:_0x32c7c9,environment:_0x17a6a7,missing:_0x48b473}=_0x59003d;if(typeof _0x32c7c9!==_0x1cc21f(_0x56a4f1._0x1db080)||typeof _0x17a6a7!==_0x1cc21f(_0x56a4f1._0x1db080))continue;if(!Array[_0x1cc21f(0x18e)](_0x48b473))continue;const _0x4473e5=_0x48b473['filter'](_0x29cb8d=>typeof _0x29cb8d==='string');if(_0x4473e5[_0x1cc21f(0x187)]>0x0)_0x7a9c98[_0x1cc21f(0x1d5)]({'project':_0x32c7c9,'environment':_0x17a6a7,'missing':_0x4473e5});}return _0x7a9c98[_0x1cc21f(_0x56a4f1._0x249741)]>0x0?_0x7a9c98:null;}__name(parseVariableGaps,_0x1f456e(0x1bf));var WORKSPACE_SCHEMA_VERSION=0x1,WORKSPACE_FILE=_0x1f456e(0x127);function stringList(_0x592518){const _0x5b7831={_0x5ba089:0x1b1},_0x51c88f=_0x1f456e;if(!Array[_0x51c88f(0x18e)](_0x592518))return null;if(_0x592518[_0x51c88f(_0x5b7831._0x5ba089)](_0x2f4112=>typeof _0x2f4112!=='string'))return null;return _0x592518;}__name(stringList,_0x1f456e(0x16c));function parseBundle(_0x23949a){const _0x5bf20c={_0x18c98e:0x14f,_0x2646a5:0x1d8,_0x35d740:0x167,_0x4c7e99:0x14f,_0x1f4f74:0x14f},_0x528e2e=_0x1f456e;if(!isRecord(_0x23949a))return null;const {bundleId:_0x1ff03a,label:_0x26c452,branch:_0x4b877d,sha:_0x474101,dirty:_0x5867ac,author:_0x4d4680,createdAt:_0x1f1e93,webVersion:_0x17aa99}=_0x23949a;if(typeof _0x1ff03a!==_0x528e2e(0x14f)||_0x1ff03a[_0x528e2e(0x187)]===0x0)return null;if(typeof _0x26c452!=='string'||typeof _0x17aa99!==_0x528e2e(_0x5bf20c._0x18c98e))return null;if(typeof _0x5867ac!==_0x528e2e(_0x5bf20c._0x2646a5))return null;if(typeof _0x1f1e93!==_0x528e2e(_0x5bf20c._0x35d740)||!Number[_0x528e2e(0x14c)](_0x1f1e93))return null;for(const _0x459d5e of[_0x4b877d,_0x474101,_0x4d4680]){if(_0x459d5e!==void 0x0&&typeof _0x459d5e!==_0x528e2e(_0x5bf20c._0x18c98e))return null;}return{'bundleId':_0x1ff03a,'label':_0x26c452,'dirty':_0x5867ac,'createdAt':_0x1f1e93,'webVersion':_0x17aa99,...typeof _0x4b877d===_0x528e2e(_0x5bf20c._0x4c7e99)?{'branch':_0x4b877d}:{},...typeof _0x474101===_0x528e2e(_0x5bf20c._0x1f4f74)?{'sha':_0x474101}:{},...typeof _0x4d4680==='string'?{'author':_0x4d4680}:{}};}__name(parseBundle,_0x1f456e(0x107));function parseWorkspaceFile(_0x1faf62){const _0x123f22={_0x4772e0:0x1d8,_0x11a473:0x167},_0x5d4120=_0x1f456e;if(!isRecord(_0x1faf62))return null;if(_0x1faf62[_0x5d4120(0xed)]!==WORKSPACE_SCHEMA_VERSION)return null;const {workspace:_0x3952f4,environment:_0x16143c,allowSwitch:_0x28c032,currentBundleId:_0x20a055,switchedBy:_0x29a259,switchedAt:_0x22a6c8,bundles:_0x27f269,variables:_0x41649f,secrets:_0x483deb,switchPath:_0x28b38a}=_0x1faf62;if(typeof _0x3952f4!=='string'||typeof _0x16143c!==_0x5d4120(0x14f))return null;if(typeof _0x28c032!==_0x5d4120(_0x123f22._0x4772e0))return null;if(!Array[_0x5d4120(0x18e)](_0x27f269))return null;const _0x5da384=[];for(const _0x54e02f of _0x27f269){const _0x7c3f44=parseBundle(_0x54e02f);if(!_0x7c3f44)return null;_0x5da384['push'](_0x7c3f44);}const _0x1facbc=stringList(_0x41649f),_0x271c24=stringList(_0x483deb);if(!_0x1facbc||!_0x271c24)return null;for(const _0x5576a8 of[_0x20a055,_0x29a259,_0x28b38a]){if(_0x5576a8!==void 0x0&&typeof _0x5576a8!==_0x5d4120(0x14f))return null;}if(_0x22a6c8!==void 0x0&&typeof _0x22a6c8!==_0x5d4120(0x167))return null;return{'schemaVersion':WORKSPACE_SCHEMA_VERSION,'workspace':_0x3952f4,'environment':_0x16143c,'allowSwitch':_0x28c032,'bundles':_0x5da384,'variables':_0x1facbc,'secrets':_0x271c24,...typeof _0x20a055===_0x5d4120(0x14f)?{'currentBundleId':_0x20a055}:{},...typeof _0x29a259===_0x5d4120(0x14f)?{'switchedBy':_0x29a259}:{},...typeof _0x22a6c8===_0x5d4120(_0x123f22._0x11a473)?{'switchedAt':_0x22a6c8}:{},...typeof _0x28b38a==='string'?{'switchPath':_0x28b38a}:{}};}__name(parseWorkspaceFile,'parseWorkspaceFile');function parseScheduleEntry(_0x3c93f5){const _0x295aaf={_0x10a3b5:0x14f,_0x32e837:0xeb,_0x245a95:0x167},_0x256310=_0x1f456e;if(!isRecord(_0x3c93f5))return null;const {collection:_0x241d4b,cron:_0x29396f,env:_0x570031,prepare:_0x306a09,workers:_0x245b27}=_0x3c93f5;if(typeof _0x241d4b!==_0x256310(0x14f)||_0x241d4b['length']===0x0)return null;if(typeof _0x29396f!==_0x256310(_0x295aaf._0x10a3b5)||_0x29396f[_0x256310(_0x295aaf._0x32e837)]()[_0x256310(0x187)]===0x0)return null;if(_0x570031!==void 0x0&&typeof _0x570031!==_0x256310(_0x295aaf._0x10a3b5))return null;if(_0x306a09!==void 0x0&&typeof _0x306a09!==_0x256310(_0x295aaf._0x10a3b5))return null;const _0x4668f2=typeof _0x245b27===_0x256310(_0x295aaf._0x245a95)&&Number['isInteger'](_0x245b27)&&_0x245b27>=0x1?_0x245b27:void 0x0;return{'collection':_0x241d4b,'cron':_0x29396f,..._0x570031!==void 0x0?{'env':_0x570031}:{},..._0x306a09!==void 0x0?{'prepare':_0x306a09}:{},..._0x4668f2!==void 0x0?{'workers':_0x4668f2}:{}};}__name(parseScheduleEntry,_0x1f456e(0x17a));function parseSchedulesJson(_0x2254c2){const _0x6039bc={_0x534947:0x1d5},_0x218bd8=_0x1f456e;let _0x527fd2;try{_0x527fd2=JSON[_0x218bd8(0x162)](_0x2254c2);}catch{return null;}if(!Array[_0x218bd8(0x18e)](_0x527fd2))return null;const _0x2034e4=[];for(const _0x4c2f9c of _0x527fd2){const _0x4b543f=parseScheduleEntry(_0x4c2f9c);if(_0x4b543f)_0x2034e4[_0x218bd8(_0x6039bc._0x534947)](_0x4b543f);}return _0x2034e4;}__name(parseSchedulesJson,'parseSchedulesJson');var BLOBS_DIR=_0x1f456e(0x175),GENERATION_SEP='~',HASH_RE=/^[0-9a-f]{8,}$/,InvalidBlobHashError=class extends Error{static{__name(this,_0x1f456e(0x102));}constructor(_0x184749){const _0x1673aa={_0x462817:0x102},_0x3475e0=_0x1f456e;super(_0x3475e0(0x130)+_0x184749),this[_0x3475e0(0x1b9)]=_0x3475e0(_0x1673aa._0x462817);}};function blobPathFor(_0x871821,_0x2e90b0,_0x3b09ed,_0x36f0fd=0x0){return _0x871821+'/'+blobRelPathFor(_0x2e90b0,_0x3b09ed,_0x36f0fd);}__name(blobPathFor,_0x1f456e(0x170));function blobRelSegmentsFor(_0x180487,_0xc79989,_0x1e87e7=0x0){const _0xb9df6b={_0x5a2ae8:0x1ee,_0x4938bd:0x10e},_0x437b4d=_0x1f456e;if(!HASH_RE[_0x437b4d(_0xb9df6b._0x5a2ae8)](_0x180487))throw new InvalidBlobHashError(_0x180487);const _0x1b9095=_0x1e87e7>0x0?''+GENERATION_SEP+_0x1e87e7:'';return[BLOBS_DIR,_0x180487[_0x437b4d(0x10e)](0x0,0x2),_0x180487[_0x437b4d(_0xb9df6b._0x4938bd)](0x2,0x4),''+_0x180487+_0x1b9095+'.'+_0xc79989];}__name(blobRelSegmentsFor,_0x1f456e(0x1a6));function blobRelPathFor(_0x3fbe57,_0x2103fe,_0x64c58c=0x0){const _0x406cc7={_0x5549ae:0x158},_0x3e2dba=_0x1f456e;return blobRelSegmentsFor(_0x3fbe57,_0x2103fe,_0x64c58c)[_0x3e2dba(_0x406cc7._0x5549ae)]('/');}__name(blobRelPathFor,_0x1f456e(0xf6));function blobsRootFor(_0x537a3e){return _0x537a3e+'/'+BLOBS_DIR;}__name(blobsRootFor,_0x1f456e(0x1ad));var FS_UNSAFE_NAME_RE=/[\\/:*?"<>|\x00-\x1f]/;function validateFsSafeName(_0x42e5bb,_0x1d2ba0){const _0x4c8f66={_0x13028d:0x177,_0x65edc9:0xeb,_0x1c4cab:0x1e1,_0x35eb64:0x10f},_0x28a157=_0x1f456e;if(typeof _0x42e5bb!==_0x28a157(0x14f))return _0x28a157(_0x4c8f66._0x13028d);const _0xc23e88=_0x42e5bb[_0x28a157(_0x4c8f66._0x65edc9)]();if(_0xc23e88['length']===0x0)return _0x28a157(0x1a4);if(_0xc23e88==='.'||_0xc23e88==='..')return'must\x20not\x20be\x20\x22.\x22\x20or\x20\x22..\x22';if(_0xc23e88[_0x28a157(0x118)]('.'))return _0x28a157(_0x4c8f66._0x1c4cab);if(_0x1d2ba0?.[_0x28a157(_0x4c8f66._0x35eb64)]&&_0xc23e88['startsWith']('_'))return _0x28a157(0x1ca);if(FS_UNSAFE_NAME_RE['test'](_0xc23e88))return'must\x20not\x20contain\x20\x5c\x20/\x20:\x20*\x20?\x20\x22\x20<\x20>\x20|\x20or\x20control\x20characters';return null;}__name(validateFsSafeName,_0x1f456e(0x142));var COLLECTION_NAME_FORBIDDEN_RE=FS_UNSAFE_NAME_RE;function validateCollectionName(_0x1409d8){return validateFsSafeName(_0x1409d8);}__name(validateCollectionName,_0x1f456e(0x195));var RUN_MANIFEST_FILE=_0x1f456e(0x1a0),RUN_SOURCES_FILE=_0x1f456e(0x1c1),UnsupportedRunKindError=class extends Error{static{__name(this,'UnsupportedRunKindError');}constructor(_0x53e73f,_0x433a37){const _0x3a0747=_0x1f456e;super(_0x3a0747(0x143)+_0x433a37+'\x22\x20does\x20not\x20support\x20run\x20kind\x20\x22'+_0x53e73f+'\x22'),this['name']='UnsupportedRunKindError';}},RunnerAdapterNotFoundError=class extends Error{static{__name(this,_0x1f456e(0x1b3));}constructor(_0x5e7412,_0x3f6242){const _0x12217c={_0x987318:0x156},_0x381793=_0x1f456e;super(_0x381793(_0x12217c._0x987318)+_0x5e7412+_0x381793(0x101)+_0x3f6242),this['name']=_0x381793(0x1b3);}},RunnerNotConfiguredError=class extends Error{static{__name(this,'RunnerNotConfiguredError');}constructor(_0x24381b){const _0x3c1833=_0x1f456e;super(_0x24381b),this[_0x3c1833(0x1b9)]=_0x3c1833(0x178);}},EXPECT_FAIL_ANNOTATION=_0x1f456e(0x124),ANNOTATION_RE=/^\s*\/\/\s*@([a-z0-9-]+)\s*$/;function isAnnotationLine(_0x1703a5){return ANNOTATION_RE['test'](_0x1703a5);}__name(isAnnotationLine,_0x1f456e(0x11f));function parseScenarioAnnotations(_0x5eb7d2){const _0x12bebb={_0x1bd2c8:0xeb,_0x14ed07:0x118,_0x4479d6:0x1d0},_0x3f4f51=_0x1f456e,_0x43cf61=new Set();for(const _0x504d40 of _0x5eb7d2['split'](/\r?\n/)){const _0x134b6f=_0x504d40[_0x3f4f51(_0x12bebb._0x1bd2c8)]();if(_0x134b6f==='')continue;if(!_0x134b6f[_0x3f4f51(_0x12bebb._0x14ed07)]('//'))break;const _0x11b46f=_0x134b6f['match'](ANNOTATION_RE);if(_0x11b46f)_0x43cf61[_0x3f4f51(_0x12bebb._0x4479d6)](_0x11b46f[0x1]);}return{'expectFail':_0x43cf61[_0x3f4f51(0x138)](EXPECT_FAIL_ANNOTATION)};}__name(parseScenarioAnnotations,_0x1f456e(0x16d));var SEGMENT_NAME_FORBIDDEN_RE=FS_UNSAFE_NAME_RE;function validateSegmentName(_0xda5703){return validateFsSafeName(_0xda5703,{'reservedUnderscore':!![]});}__name(validateSegmentName,_0x1f456e(0x1ed));var TERMINAL_WS_EVENT=_0x1f456e(0x1cc),RUNNER_CONFIG_KEYS=new Set(['UNOTEST_BROWSER',_0x1f456e(0xe8),_0x1f456e(0x1a8),_0x1f456e(0xfe),_0x1f456e(0xfd),_0x1f456e(0x161),_0x1f456e(0x1df),_0x1f456e(0x103),_0x1f456e(0x1e7),_0x1f456e(0x144),'UNOTEST_DEBUG_DIR',_0x1f456e(0x164),_0x1f456e(0x109),'UNOTEST_DEBUG_HTML_MAX_BYTES',_0x1f456e(0x136),_0x1f456e(0x116),_0x1f456e(0x131),_0x1f456e(0x15f),_0x1f456e(0x194),_0x1f456e(0x15e),_0x1f456e(0x190)]);function isRunnerConfigKey(_0x260be4){const _0x16c98b={_0xdb846:0x138},_0x3e627c=_0x1f456e;return RUNNER_CONFIG_KEYS[_0x3e627c(_0x16c98b._0xdb846)](_0x260be4);}__name(isRunnerConfigKey,_0x1f456e(0x129));function categorizeVariable(_0x44a8be){const _0x1844c1={_0x196617:0x15d,_0x26afe3:0x16f,_0x113085:0x19d},_0x4da939=_0x1f456e;if(_0x44a8be[_0x4da939(_0x1844c1._0x196617)]===_0x4da939(0x1c7))return _0x4da939(_0x1844c1._0x26afe3);return isRunnerConfigKey(_0x44a8be[_0x4da939(0x1b9)])?_0x4da939(_0x1844c1._0x113085):_0x4da939(0x173);}__name(categorizeVariable,'categorizeVariable');function isExternalVarName(_0x16936e){return/^[A-Z][A-Z0-9_]*$/['test'](_0x16936e);}__name(isExternalVarName,_0x1f456e(0x1ea));var ENV_KEY_RE=/^[A-Za-z_][A-Za-z0-9_]*$/;function*assignmentEntries(_0x31c166){const _0x1d2c78={_0x14c5fa:0x184,_0x336197:0x1eb,_0x39192f:0x1ee},_0x3d7df5=_0x1f456e;for(const _0x387503 of _0x31c166[_0x3d7df5(_0x1d2c78._0x14c5fa)](/\r?\n/)){const _0x6e9440=_0x387503['trim']();if(_0x6e9440===''||_0x6e9440[_0x3d7df5(0x118)]('#'))continue;const _0x340d5a=_0x6e9440[_0x3d7df5(_0x1d2c78._0x336197)]('=');if(_0x340d5a<=0x0)continue;const _0x8b7fd0=_0x6e9440[_0x3d7df5(0x10e)](0x0,_0x340d5a)['trim']();if(!ENV_KEY_RE[_0x3d7df5(_0x1d2c78._0x39192f)](_0x8b7fd0))continue;yield[_0x8b7fd0,_0x6e9440[_0x3d7df5(0x10e)](_0x340d5a+0x1)[_0x3d7df5(0xeb)]()];}}__name(assignmentEntries,_0x1f456e(0x18c));function parseEnvContent(_0x5a2793){const _0x423462=_0x1f456e,_0xf89c25={};for(const [_0x41d52e,_0x42d416]of assignmentEntries(_0x5a2793)){let _0x8ba335=_0x42d416;if(_0x8ba335['length']>=0x2){const _0x5d8f93=_0x8ba335[0x0],_0x2addea=_0x8ba335[_0x8ba335[_0x423462(0x187)]-0x1];(_0x5d8f93==='\x22'||_0x5d8f93==='\x27')&&_0x5d8f93===_0x2addea&&(_0x8ba335=_0x8ba335[_0x423462(0x10e)](0x1,-0x1));}_0xf89c25[_0x41d52e]=_0x8ba335;}return _0xf89c25;}__name(parseEnvContent,_0x1f456e(0xf1));function serializeEnvValue(_0x11157c){const _0x4098d1={_0x422cf5:0x1c6},_0x4cb5df=_0x1f456e;if(_0x11157c==='')return'';if(/[\s#"'=\\]|^[`]/[_0x4cb5df(0x1ee)](_0x11157c)||/[\n\r]/['test'](_0x11157c)){const _0x9aa512=_0x11157c['replace'](/\\/g,'\x5c\x5c')[_0x4cb5df(0x1c6)](/"/g,'\x5c\x22')[_0x4cb5df(_0x4098d1._0x422cf5)](/\n/g,'\x5cn')[_0x4cb5df(_0x4098d1._0x422cf5)](/\r/g,'\x5cr');return'\x22'+_0x9aa512+'\x22';}return _0x11157c;}__name(serializeEnvValue,_0x1f456e(0x17e));function envKeys(_0xceeec9){const _0x1e4346={_0x4b83b1:0x1d0},_0x3d64f3=_0x1f456e,_0x35b2a1=new Set();for(const [_0x4b44fd]of assignmentEntries(_0xceeec9))_0x35b2a1[_0x3d64f3(_0x1e4346._0x4b83b1)](_0x4b44fd);return _0x35b2a1;}__name(envKeys,_0x1f456e(0x17d));function isSectionDivider(_0x4c9756){const _0x14144e={_0x47a3cb:0x1ee},_0x5d8553=_0x1f456e,_0x2c9d10=_0x4c9756[_0x5d8553(0xeb)]();return _0x2c9d10['startsWith']('#')&&/---/[_0x5d8553(_0x14144e._0x47a3cb)](_0x2c9d10);}__name(isSectionDivider,'isSectionDivider');function isAssignmentLine(_0x37cdca){const _0x431558={_0x3f32c8:0x118,_0x630781:0x1eb,_0x383753:0xeb},_0x562670=_0x1f456e,_0x247000=_0x37cdca['trim']();if(_0x247000===''||_0x247000[_0x562670(_0x431558._0x3f32c8)]('#'))return![];const _0x27bd85=_0x247000[_0x562670(_0x431558._0x630781)]('=');return _0x27bd85>0x0&&ENV_KEY_RE['test'](_0x247000[_0x562670(0x10e)](0x0,_0x27bd85)[_0x562670(_0x431558._0x383753)]());}__name(isAssignmentLine,'isAssignmentLine');function isAssignmentOf(_0x36fb5e,_0x1c1eed){const _0x4a4b31={_0x5c41bd:0x118,_0x328fd6:0x1eb},_0x32694b=_0x1f456e,_0x458201=_0x36fb5e['trim']();if(_0x458201===''||_0x458201[_0x32694b(_0x4a4b31._0x5c41bd)]('#'))return![];const _0x1c1090=_0x458201[_0x32694b(_0x4a4b31._0x328fd6)]('=');if(_0x1c1090<=0x0)return![];return _0x458201['slice'](0x0,_0x1c1090)[_0x32694b(0xeb)]()===_0x1c1eed;}__name(isAssignmentOf,_0x1f456e(0x1e9));function splitLines(_0x159ed2){const _0x147510={_0x417251:0x16b},_0xbf8684=_0x1f456e,_0x4c625e=_0x159ed2[_0xbf8684(_0x147510._0x417251)]('\x0a'),_0x1fdf94=_0x4c625e?_0x159ed2[_0xbf8684(0x10e)](0x0,-0x1):_0x159ed2;return{'lines':_0x1fdf94===''?[]:_0x1fdf94[_0xbf8684(0x184)]('\x0a'),'trailingNewline':_0x4c625e};}__name(splitLines,'splitLines');function joinLines(_0x3ac6ce,_0x108815){const _0x40e818={_0x4c6062:0x158},_0x5daef7=_0x1f456e,_0x1285b7=_0x3ac6ce[_0x5daef7(_0x40e818._0x4c6062)]('\x0a');return _0x108815||_0x1285b7===''?_0x1285b7+'\x0a':_0x1285b7;}__name(joinLines,'joinLines');function insertEnvVar(_0x5c790a,_0x87c8e0,_0xa99877,_0x34f6bf){const _0x4d515c={_0x4e5755:0x1cb,_0x251fd5:0x187,_0xf5f54c:0x187,_0x587ddd:0x1d5},_0x545c35=_0x1f456e,_0x143576=_0x87c8e0+'='+serializeEnvValue(_0xa99877),{lines:_0x5b339d,trailingNewline:_0x3a3285}=splitLines(_0x5c790a);if(_0x34f6bf){const _0x4b582b=new RegExp('\x5cb'+_0x34f6bf[_0x545c35(0x1be)]()+'\x5cb'),_0x712f95=_0x5b339d[_0x545c35(_0x4d515c._0x4e5755)](_0x1d0275=>isSectionDivider(_0x1d0275)&&_0x4b582b[_0x545c35(0x1ee)](_0x1d0275['toLowerCase']()));if(_0x712f95!==-0x1){let _0x246d2e=_0x5b339d[_0x545c35(_0x4d515c._0x251fd5)];for(let _0x21b0b0=_0x712f95+0x1;_0x21b0b0<_0x5b339d['length'];_0x21b0b0++){if(isSectionDivider(_0x5b339d[_0x21b0b0])){_0x246d2e=_0x21b0b0;break;}}let _0x312bff=-0x1,_0x5d918f=-0x1;for(let _0x3b2834=_0x712f95+0x1;_0x3b2834<_0x246d2e;_0x3b2834++){if(_0x5b339d[_0x3b2834]['trim']()!=='')_0x5d918f=_0x3b2834;if(isAssignmentLine(_0x5b339d[_0x3b2834]))_0x312bff=_0x3b2834;}const _0x151b19=_0x312bff>=0x0?_0x312bff:_0x5d918f,_0x428d60=_0x151b19>=0x0?_0x151b19+0x1:_0x712f95+0x1;return _0x5b339d['splice'](_0x428d60,0x0,_0x143576),joinLines(_0x5b339d,_0x3a3285||_0x5b339d[_0x545c35(_0x4d515c._0xf5f54c)]>0x0);}if(_0x5b339d[_0x545c35(0x187)]>0x0)_0x5b339d[_0x545c35(_0x4d515c._0x587ddd)]('');return _0x5b339d['push'](_0x545c35(0x13e)+_0x34f6bf+'\x20---',_0x143576),joinLines(_0x5b339d,!![]);}return _0x5b339d[_0x545c35(0x1d5)](_0x143576),joinLines(_0x5b339d,!![]);}__name(insertEnvVar,_0x1f456e(0x18d));function removeEnvVar(_0x230d3b,_0xe7b953){const _0xac832f={_0x204efa:0x187,_0x4ef7e9:0x187},_0x54df3a=_0x1f456e,{lines:_0x5979e3,trailingNewline:_0x3f7b51}=splitLines(_0x230d3b),_0x527f6e=_0x5979e3['filter'](_0x2a9bc0=>!isAssignmentOf(_0x2a9bc0,_0xe7b953)),_0x4f3927=_0x527f6e[_0x54df3a(_0xac832f._0x204efa)]!==_0x5979e3[_0x54df3a(_0xac832f._0x4ef7e9)];return{'content':joinLines(_0x527f6e,_0x3f7b51),'removed':_0x4f3927};}__name(removeEnvVar,_0x1f456e(0x180));var SECTION_BY_KIND={'app':_0x1f456e(0x182),'runner':_0x1f456e(0x126),'secret':void 0x0};function planAddVariable(_0x2fd052){const _0x43f906={_0x1cf3f4:0x19d,_0x9a0b37:0xf2,_0x26e4c3:0x138,_0x457cea:0x1b2,_0x34ef75:0x138,_0x3435ec:0x16f,_0x538b3b:0xfb,_0x1a4a91:0x16f,_0x105cb6:0x104},_0x3100ff=_0x1f456e,{name:_0x53f312,kind:_0x30441c}=_0x2fd052;if(_0x30441c===_0x3100ff(_0x43f906._0x1cf3f4)){if(!isRunnerConfigKey(_0x53f312))return{'ok':![],'code':_0x3100ff(0x1dd),'message':_0x53f312+_0x3100ff(0x1b6)};}else{if(!isExternalVarName(_0x53f312))return{'ok':![],'code':_0x3100ff(0x1b0),'message':_0x53f312+_0x3100ff(0x15c)};}const _0x4351b5=envKeys(_0x2fd052[_0x3100ff(_0x43f906._0x9a0b37)])[_0x3100ff(_0x43f906._0x26e4c3)](_0x53f312),_0x1acb97=envKeys(_0x2fd052[_0x3100ff(_0x43f906._0x457cea)])[_0x3100ff(_0x43f906._0x34ef75)](_0x53f312),_0xc61f47=_0x30441c===_0x3100ff(_0x43f906._0x3435ec)?'secrets':_0x3100ff(0xe9),_0x4d1950=_0xc61f47===_0x3100ff(0x1c7)?_0x1acb97:_0x4351b5,_0x4c27c4=_0xc61f47===_0x3100ff(0x1c7)?_0x3100ff(_0x43f906._0x538b3b):_0x3100ff(0x1e3);if(_0x4d1950)return{'ok':![],'code':_0x3100ff(0x106),'message':_0x53f312+'\x20already\x20exists\x20in\x20'+_0x4c27c4+'\x20—\x20pick\x20a\x20different\x20name\x20or\x20edit\x20the\x20existing\x20value.'};const _0xa118d9=[];return _0x30441c===_0x3100ff(_0x43f906._0x1a4a91)&&_0x4351b5&&_0xa118d9[_0x3100ff(0x1d5)](_0x53f312+_0x3100ff(_0x43f906._0x105cb6)),_0x30441c!=='secret'&&_0x1acb97&&_0xa118d9['push'](_0x53f312+'\x20is\x20also\x20set\x20in\x20unotest/.secrets\x20—\x20the\x20secret\x20value\x20shadows\x20this\x20one.'),{'ok':!![],'target':_0xc61f47,'sectionLabel':SECTION_BY_KIND[_0x30441c],'warnings':_0xa118d9};}__name(planAddVariable,_0x1f456e(0x199));function deleteShadowWarning(_0x10757c,_0xc6e91c,_0xc43936){const _0x8898cc=_0x1f456e;if(_0xc43936!==void 0x0&&_0xc43936!==_0xc6e91c)return[_0x10757c+_0x8898cc(0x133)];return[];}__name(deleteShadowWarning,_0x1f456e(0xf4));var TERMINAL_RUNTIME_STATES=[_0x1f456e(0x188),_0x1f456e(0x1d2),_0x1f456e(0x19a)];function isTerminalRuntimeState(_0x4eef8a){const _0x2034d9={_0x4301de:0xfc},_0x202945=_0x1f456e;return TERMINAL_RUNTIME_STATES[_0x202945(_0x2034d9._0x4301de)](_0x4eef8a);}__name(isTerminalRuntimeState,_0x1f456e(0x1d1));var JUDGE_ROUTES={'judge':_0x1f456e(0x1e5),'health':_0x1f456e(0x17f)},JUDGE_ENV={'mode':_0x1f456e(0xef),'url':_0x1f456e(0x11e),'token':_0x1f456e(0x1d7),'requestTimeoutMs':_0x1f456e(0xf9),'preamble':_0x1f456e(0xff),'provider':'UNOTEST_JUDGE_PROVIDER','model':_0x1f456e(0x1da),'callTimeoutMs':_0x1f456e(0x14a),'retries':_0x1f456e(0x1ab),'vote':_0x1f456e(0x19b),'accessToken':_0x1f456e(0x1d3),'claudeBin':_0x1f456e(0x192),'host':_0x1f456e(0x149),'port':'UNOTEST_JUDGE_PORT','logLevel':_0x1f456e(0x160),'skipPreflight':'UNOTEST_JUDGE_SKIP_PREFLIGHT'};export{ARTIFACTS_ROOT_ENV,BLOBS_DIR,BOX_TOKEN_ENV,BOX_URL_ENV,BUNDLE_ID_ENV,BUNDLE_MANIFEST_FILE,BUNDLE_SCHEMA_VERSION,BUNDLE_UPLOAD_PATH,CI_RUN_PATH,COLLECTIONS_SUBDIR,COLLECTION_NAME_FORBIDDEN_RE,COMMANDS_FILE,DAY_INDEX_FILE,E2E_SUBDIR,ENV_FILE,EXPECT_FAIL_ANNOTATION,HEARTBEAT_FILE,HELPERS_SUBDIR,InvalidBlobHashError,JUDGE_ENV,JUDGE_ROUTES,LOCK_FILE,LOG_FILE,PICKER_SNAPSHOT_FILE,QUEUE_DISABLED_ENV,QUEUE_GLOBAL_DIR_ENV,QUEUE_GLOBAL_SLOTS_ENV,QUEUE_LEASE_ENV,QUEUE_MUTEX_FILE,QUEUE_PRIORITIES,QUEUE_RUNNING_DIR,QUEUE_SCHEMA_VERSION,QUEUE_SLOTS_DIR,QUEUE_SUBDIR,QUEUE_TICKETS_DIR,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,WORKSPACE_FILE,WORKSPACE_SCHEMA_VERSION,activeEnvName,artifactsRootFrom,blobPathFor,blobRelPathFor,blobRelSegmentsFor,blobsRootFor,categorizeVariable,compareQueueTicketNames,debugDirFor,debuggerFileFor,deleteShadowWarning,describeBundle,describeTicketCi,envFileFor,envKeys,envLayerFilesFor,envNamesFromDirListing,foldScenarioRun,insertEnvVar,isAnnotationLine,isExternalVarName,isFailingStatus,isQueueDirName,isRecord,isRegexLiteral,isRunnerConfigKey,isRunsDirName,isTerminalRuntimeState,makeQueueTicketName,makeRunId,parseAppServerEvent,parseBundleManifest,parseBundleUploadResponse,parseCiProvider,parseCiRunRequest,parseCiRunResponse,parseEnvContent,parseQueueTicket,parseQueueTicketName,parseScenarioAnnotations,parseScheduleEntry,parseSchedulesJson,parseWorkspaceFile,planAddVariable,projectQueueRoot,projectRunDirFor,projectRunsRoot,queueDirFor,queuePriorityFromRank,queuePriorityRank,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.
|
|
3
|
+
"version": "0.26.1",
|
|
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": {
|