@reticlehq/core 1.3.1 → 2.0.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.
Files changed (84) hide show
  1. package/README.md +14 -88
  2. package/dist/brand.d.ts +21 -0
  3. package/dist/brand.d.ts.map +1 -0
  4. package/dist/brand.js +16 -0
  5. package/dist/brand.js.map +1 -0
  6. package/dist/constants.d.ts +378 -0
  7. package/dist/constants.d.ts.map +1 -0
  8. package/dist/constants.js +352 -0
  9. package/dist/constants.js.map +1 -0
  10. package/dist/daemon-registry.d.ts +36 -0
  11. package/dist/daemon-registry.d.ts.map +1 -0
  12. package/dist/daemon-registry.js +48 -0
  13. package/dist/daemon-registry.js.map +1 -0
  14. package/dist/flow-constants.d.ts +175 -0
  15. package/dist/flow-constants.d.ts.map +1 -0
  16. package/dist/flow-constants.js +162 -0
  17. package/dist/flow-constants.js.map +1 -0
  18. package/dist/flow-types.d.ts +1204 -0
  19. package/dist/flow-types.d.ts.map +1 -0
  20. package/dist/flow-types.js +152 -0
  21. package/dist/flow-types.js.map +1 -0
  22. package/dist/index.d.ts +14 -2
  23. package/dist/index.d.ts.map +1 -0
  24. package/dist/index.js +14 -5563
  25. package/dist/index.js.map +1 -0
  26. package/dist/messages.d.ts +424 -0
  27. package/dist/messages.d.ts.map +1 -0
  28. package/dist/messages.js +103 -0
  29. package/dist/messages.js.map +1 -0
  30. package/dist/notices.d.ts +60 -0
  31. package/dist/notices.d.ts.map +1 -0
  32. package/dist/notices.js +64 -0
  33. package/dist/notices.js.map +1 -0
  34. package/dist/schema/command-message.json +41 -0
  35. package/dist/schema/command-result.json +34 -0
  36. package/dist/schema/event-message.json +77 -0
  37. package/dist/schema/event-type.json +35 -0
  38. package/dist/schema/hello-message.json +59 -0
  39. package/dist/schema/reticle-event.json +63 -0
  40. package/dist/schema/reticle-message.json +193 -0
  41. package/dist/security.d.ts +5 -0
  42. package/dist/security.d.ts.map +1 -0
  43. package/dist/security.js +22 -0
  44. package/dist/security.js.map +1 -0
  45. package/dist/session-constants.d.ts +116 -0
  46. package/dist/session-constants.d.ts.map +1 -0
  47. package/dist/session-constants.js +113 -0
  48. package/dist/session-constants.js.map +1 -0
  49. package/dist/state-select.d.ts +23 -0
  50. package/dist/state-select.d.ts.map +1 -0
  51. package/dist/state-select.js +60 -0
  52. package/dist/state-select.js.map +1 -0
  53. package/dist/toon.d.ts +44 -0
  54. package/dist/toon.d.ts.map +1 -0
  55. package/dist/toon.js +153 -0
  56. package/dist/toon.js.map +1 -0
  57. package/dist/types.d.ts +833 -0
  58. package/dist/types.d.ts.map +1 -0
  59. package/dist/types.js +165 -0
  60. package/dist/types.js.map +1 -0
  61. package/dist/upgrade.d.ts +74 -0
  62. package/dist/upgrade.d.ts.map +1 -0
  63. package/dist/upgrade.js +87 -0
  64. package/dist/upgrade.js.map +1 -0
  65. package/dist/verification-run.d.ts +1195 -0
  66. package/dist/verification-run.d.ts.map +1 -0
  67. package/dist/verification-run.js +261 -0
  68. package/dist/verification-run.js.map +1 -0
  69. package/package.json +32 -79
  70. package/dist/babel.d.ts +0 -7
  71. package/dist/babel.js +0 -32
  72. package/dist/cli.d.ts +0 -1
  73. package/dist/cli.js +0 -11273
  74. package/dist/eslint.d.ts +0 -1
  75. package/dist/eslint.js +0 -134
  76. package/dist/loader.cjs +0 -52
  77. package/dist/next.d.ts +0 -21
  78. package/dist/next.js +0 -24
  79. package/dist/server.d.ts +0 -1
  80. package/dist/server.js +0 -9495
  81. package/dist/test.d.ts +0 -1
  82. package/dist/test.js +0 -9377
  83. package/dist/vite.d.ts +0 -1
  84. package/dist/vite.js +0 -196
@@ -0,0 +1,1204 @@
1
+ import { z } from 'zod';
2
+ import { ActionType, type DriftReason, type HealStatus, type ReplayStatus } from './constants.js';
3
+ /**
4
+ * A semantic anchor: how a step re-finds its element/event at replay
5
+ * time. Never a volatile eXX ref. testid/role+name bind a DOM element; signal binds an event.
6
+ */
7
+ export declare const FlowAnchorSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
8
+ kind: z.ZodLiteral<"testid">;
9
+ value: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ value: string;
12
+ kind: "testid";
13
+ }, {
14
+ value: string;
15
+ kind: "testid";
16
+ }>, z.ZodObject<{
17
+ kind: z.ZodLiteral<"role">;
18
+ role: z.ZodString;
19
+ name: z.ZodOptional<z.ZodString>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ role: string;
22
+ kind: "role";
23
+ name?: string | undefined;
24
+ }, {
25
+ role: string;
26
+ kind: "role";
27
+ name?: string | undefined;
28
+ }>, z.ZodObject<{
29
+ kind: z.ZodLiteral<"signal">;
30
+ name: z.ZodString;
31
+ }, "strip", z.ZodTypeAny, {
32
+ kind: "signal";
33
+ name: string;
34
+ }, {
35
+ kind: "signal";
36
+ name: string;
37
+ }>, z.ZodObject<{
38
+ kind: z.ZodLiteral<"component">;
39
+ component: z.ZodOptional<z.ZodString>;
40
+ source: z.ZodOptional<z.ZodObject<{
41
+ file: z.ZodString;
42
+ line: z.ZodNumber;
43
+ column: z.ZodOptional<z.ZodNumber>;
44
+ }, "strip", z.ZodTypeAny, {
45
+ file: string;
46
+ line: number;
47
+ column?: number | undefined;
48
+ }, {
49
+ file: string;
50
+ line: number;
51
+ column?: number | undefined;
52
+ }>>;
53
+ role: z.ZodOptional<z.ZodString>;
54
+ name: z.ZodOptional<z.ZodString>;
55
+ }, "strip", z.ZodTypeAny, {
56
+ kind: "component";
57
+ role?: string | undefined;
58
+ component?: string | undefined;
59
+ source?: {
60
+ file: string;
61
+ line: number;
62
+ column?: number | undefined;
63
+ } | undefined;
64
+ name?: string | undefined;
65
+ }, {
66
+ kind: "component";
67
+ role?: string | undefined;
68
+ component?: string | undefined;
69
+ source?: {
70
+ file: string;
71
+ line: number;
72
+ column?: number | undefined;
73
+ } | undefined;
74
+ name?: string | undefined;
75
+ }>]>;
76
+ export type FlowAnchor = z.infer<typeof FlowAnchorSchema>;
77
+ /** A post-condition a step asserts (compiled from a structured annotation; optional). */
78
+ export declare const FlowExpectSchema: z.ZodObject<{
79
+ signal: z.ZodOptional<z.ZodString>;
80
+ /**
81
+ * Optional payload shape an `assert-signal` annotation requires the signal
82
+ * to match (the predicate DSL's signal.dataMatches). Additive/optional — a flow file with a
83
+ * bare `signal` still parses, and the on-disk version stays FLOW_FILE_VERSION 1.
84
+ */
85
+ signalData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
86
+ net: z.ZodOptional<z.ZodObject<{
87
+ method: z.ZodOptional<z.ZodString>;
88
+ urlContains: z.ZodOptional<z.ZodString>;
89
+ status: z.ZodOptional<z.ZodNumber>;
90
+ /**
91
+ * Exact number of matching requests since the action — turns presence into a cardinality
92
+ * assertion. Catches the double-submit / useEffect-double-fire / retry-storm regression class:
93
+ * the request fired (presence passes) but fired the WRONG number of times. Omit = presence (≥1).
94
+ */
95
+ count: z.ZodOptional<z.ZodNumber>;
96
+ }, "strip", z.ZodTypeAny, {
97
+ status?: number | undefined;
98
+ method?: string | undefined;
99
+ urlContains?: string | undefined;
100
+ count?: number | undefined;
101
+ }, {
102
+ status?: number | undefined;
103
+ method?: string | undefined;
104
+ urlContains?: string | undefined;
105
+ count?: number | undefined;
106
+ }>>;
107
+ /**
108
+ * Console golden end-condition: assert the action logged (or, with absent:true, did NOT log) a
109
+ * console message at `level` (default 'error'). `absent:true` is the common case — "the action
110
+ * completed with a clean console" — catching the regression where an action throws a caught error
111
+ * / logs an uncaught rejection while the UI still renders fine (a presence check passes it).
112
+ */
113
+ console: z.ZodOptional<z.ZodObject<{
114
+ level: z.ZodOptional<z.ZodString>;
115
+ absent: z.ZodOptional<z.ZodBoolean>;
116
+ }, "strip", z.ZodTypeAny, {
117
+ level?: string | undefined;
118
+ absent?: boolean | undefined;
119
+ }, {
120
+ level?: string | undefined;
121
+ absent?: boolean | undefined;
122
+ }>>;
123
+ element: z.ZodOptional<z.ZodObject<{
124
+ testid: z.ZodOptional<z.ZodString>;
125
+ role: z.ZodOptional<z.ZodString>;
126
+ name: z.ZodOptional<z.ZodString>;
127
+ }, "strip", z.ZodTypeAny, {
128
+ testid?: string | undefined;
129
+ role?: string | undefined;
130
+ name?: string | undefined;
131
+ }, {
132
+ testid?: string | undefined;
133
+ role?: string | undefined;
134
+ name?: string | undefined;
135
+ }>>;
136
+ /**
137
+ * Assert a registered store's value — the source of truth no DOM/network read can reach. Compiles
138
+ * to the predicate engine's `state` predicate. Additive/optional — a flow without it still parses
139
+ * and the on-disk version stays FLOW_FILE_VERSION 1. `equals` accepts a literal, omitted = presence,
140
+ * or a `{ $gte | $contains | $length }` operator pattern.
141
+ */
142
+ state: z.ZodOptional<z.ZodObject<{
143
+ store: z.ZodOptional<z.ZodString>;
144
+ path: z.ZodString;
145
+ equals: z.ZodOptional<z.ZodUnknown>;
146
+ /**
147
+ * Treat this as an INVARIANT that must still hold AFTER the action settles, rather than a
148
+ * condition to wait for. Set it for a blast-radius check ("this unrelated path must NOT have
149
+ * moved") — without it a wait-until-true read passes before an over-reaching side-effect lands.
150
+ */
151
+ hold: z.ZodOptional<z.ZodBoolean>;
152
+ }, "strip", z.ZodTypeAny, {
153
+ path: string;
154
+ store?: string | undefined;
155
+ equals?: unknown;
156
+ hold?: boolean | undefined;
157
+ }, {
158
+ path: string;
159
+ store?: string | undefined;
160
+ equals?: unknown;
161
+ hold?: boolean | undefined;
162
+ }>>;
163
+ }, "strip", z.ZodTypeAny, {
164
+ signal?: string | undefined;
165
+ signalData?: Record<string, unknown> | undefined;
166
+ net?: {
167
+ status?: number | undefined;
168
+ method?: string | undefined;
169
+ urlContains?: string | undefined;
170
+ count?: number | undefined;
171
+ } | undefined;
172
+ console?: {
173
+ level?: string | undefined;
174
+ absent?: boolean | undefined;
175
+ } | undefined;
176
+ element?: {
177
+ testid?: string | undefined;
178
+ role?: string | undefined;
179
+ name?: string | undefined;
180
+ } | undefined;
181
+ state?: {
182
+ path: string;
183
+ store?: string | undefined;
184
+ equals?: unknown;
185
+ hold?: boolean | undefined;
186
+ } | undefined;
187
+ }, {
188
+ signal?: string | undefined;
189
+ signalData?: Record<string, unknown> | undefined;
190
+ net?: {
191
+ status?: number | undefined;
192
+ method?: string | undefined;
193
+ urlContains?: string | undefined;
194
+ count?: number | undefined;
195
+ } | undefined;
196
+ console?: {
197
+ level?: string | undefined;
198
+ absent?: boolean | undefined;
199
+ } | undefined;
200
+ element?: {
201
+ testid?: string | undefined;
202
+ role?: string | undefined;
203
+ name?: string | undefined;
204
+ } | undefined;
205
+ state?: {
206
+ path: string;
207
+ store?: string | undefined;
208
+ equals?: unknown;
209
+ hold?: boolean | undefined;
210
+ } | undefined;
211
+ }>;
212
+ export type FlowExpect = z.infer<typeof FlowExpectSchema>;
213
+ /** One step of a flow: an anchored action (+ optional expectation). */
214
+ export interface FlowStep {
215
+ /** ReticleTool.ACT | ReticleTool.ACT_SEQUENCE (the server-side tool constant). */
216
+ tool: string;
217
+ anchor: FlowAnchor;
218
+ action?: ActionType;
219
+ args?: Record<string, unknown>;
220
+ expect?: FlowExpect;
221
+ /** true when the anchor is best-effort (no testid was resolvable at record time). NOT dropped. */
222
+ degraded?: boolean;
223
+ /** sub-steps for an act_sequence, each independently anchored. */
224
+ steps?: FlowStep[];
225
+ }
226
+ export declare const FlowStepSchema: z.ZodType<FlowStep>;
227
+ /**
228
+ * A legible-drift record returned when an anchor misses at replay.
229
+ * The "whose fault is it" payload: what was expected, why it's gone, and the closest surviving
230
+ * anchor (a concrete fix suggestion). Never a bare "command failed".
231
+ */
232
+ export interface Drift {
233
+ /** Named reason kind (testid not found / signal not observed). */
234
+ reasonKind: DriftReason;
235
+ /** Human sentence, e.g. `testid "chat-send" not found`. */
236
+ reason: string;
237
+ /** The missed anchor value (the testid string, or the signal name). */
238
+ anchor: string;
239
+ /** Closest present testid via the live near-miss; null only when the page has no testids (or signal drift). */
240
+ nearest: string | null;
241
+ /**
242
+ * True when two or more present testids tie at the minimum edit distance, so `nearest` is an
243
+ * arbitrary pick. An ambiguous drift is NEVER auto-healed (a wrong rebind ships a bug green) —
244
+ * it is surfaced for a human/agent to choose. Absent ⇒ unambiguous.
245
+ */
246
+ ambiguous?: boolean;
247
+ }
248
+ /** The per-step result of re-resolving + running one anchored step. */
249
+ export interface FlowStepResult {
250
+ /** 0-based index of this step in the flow. */
251
+ step: number;
252
+ /** The server-side tool constant the step runs (ReticleTool.ACT | ACT_SEQUENCE). */
253
+ tool: string;
254
+ /** The testid/signal value the step is bound to (the re-resolved anchor). */
255
+ anchor: string;
256
+ /**
257
+ * The route (pathname) the page was on when this step ran — the "which page" of the journey.
258
+ * Additive/optional: present when a route is observable, absent in route-less contexts (e.g. a
259
+ * fake session with no route events). Lets a replay result read as a page-by-page journey.
260
+ */
261
+ page?: string;
262
+ /**
263
+ * A compact summary of the observable CONSEQUENCE in the window right after this step ran — the
264
+ * "what happened" of the journey: a route change, a domain signal (e.g. a modal opening), a
265
+ * network call, or console errors. Additive/optional and intentionally terse (token-cheap). It
266
+ * captures what had landed by the time the action settled, so a very-late async effect may not
267
+ * appear; the asserted consequence (expect/success) is the authoritative pass/fail signal.
268
+ */
269
+ consequence?: string;
270
+ ok: boolean;
271
+ error?: string;
272
+ note?: string;
273
+ /** Present iff this step stopped on an anchor miss. */
274
+ drift?: Drift;
275
+ /**
276
+ * A confidence-scored nearest-match rebind for this drifted step (additive,
277
+ * optional). Set only for a confident testid drift.
278
+ */
279
+ proposal?: HealProposal;
280
+ }
281
+ /**
282
+ * The autonomy decision envelope — the feedback a human used to give, made machine-actionable. From
283
+ * a replay result it states the verdict, what changed, WHERE in the source to look (file:line, from a
284
+ * component anchor), a suggested fix, and the single next action — so a coding agent decides its next
285
+ * move without a human in the loop. Terse by design (token-cheap).
286
+ */
287
+ export interface ReplayDecision {
288
+ /** pass = intent held; drift = a locator/anchor missed; fail = an action or the success oracle failed. */
289
+ verdict: 'pass' | 'drift' | 'fail';
290
+ /** One-line human/agent summary of the outcome. */
291
+ summary: string;
292
+ /** What regressed (the drift reason or failure), when not a pass. */
293
+ whatChanged?: string;
294
+ /** Where to look — `file:line` from the failing step's source anchor, or the page route. */
295
+ whereInSource?: string;
296
+ /** A concrete fix hint (e.g. rebind to the nearest surviving anchor). */
297
+ suggestedFix?: string;
298
+ /** The single next action the agent should take. */
299
+ nextAction: string;
300
+ }
301
+ /**
302
+ * One flow's line in a suite verdict — pass counts as a name; a failure carries the actionable
303
+ * decision fields so the agent can fix it without re-querying.
304
+ */
305
+ export interface SuiteFlowResult {
306
+ flow: string;
307
+ verdict: 'pass' | 'drift' | 'fail';
308
+ whatChanged?: string;
309
+ whereInSource?: string;
310
+ nextAction?: string;
311
+ }
312
+ /**
313
+ * The consolidated verdict of replaying EVERY known flow — the autonomous loop's "did I break
314
+ * anything, and what do I fix" answer in one deterministic call. Passing flows are counted; only
315
+ * failures carry detail (token-cheap). `status` is fail if any flow drifted or errored.
316
+ */
317
+ export interface SuiteVerdict {
318
+ status: 'pass' | 'fail';
319
+ total: number;
320
+ passed: number;
321
+ failed: number;
322
+ summary: string;
323
+ /** Only the failing flows, with their decision (verdict, what changed, where, next action). */
324
+ failures: SuiteFlowResult[];
325
+ }
326
+ /** The reticle_flow_replay envelope. */
327
+ export interface FlowReplayResult {
328
+ name: string;
329
+ status: ReplayStatus;
330
+ steps: FlowStepResult[];
331
+ /** The machine-actionable decision derived from this replay (autonomy layer). */
332
+ decision?: ReplayDecision;
333
+ /** Set when status === 'error' (load failure or resolved action failure). */
334
+ error?: {
335
+ code: string;
336
+ message: string;
337
+ };
338
+ /**
339
+ * The confident rebind proposals aggregated across drifted steps (additive,
340
+ * optional — present only when at least one drifted step has a confident nearest match).
341
+ */
342
+ proposals?: HealProposal[];
343
+ }
344
+ /**
345
+ * The on-disk flow file: diffable, git-tracked, anchor-resolved.
346
+ * The optional `dynamic` field (both `dynamic` + `success` are optional, so a
347
+ * file with neither still parses — back-compat is locked by a test).
348
+ */
349
+ export declare const FlowFileSchema: z.ZodObject<{
350
+ version: z.ZodLiteral<1>;
351
+ name: z.ZodString;
352
+ /**
353
+ * The business goal this flow exists to verify, one line (e.g. "ship a deploy to production").
354
+ * Optional + back-compat (a flow without it still parses). Set via an `intent` annotation. The
355
+ * point of "intent + outcome oracle": a flow that declares an intent should also assert an
356
+ * observable business OUTCOME (a consequence success-state), or it claims to verify a goal it
357
+ * cannot actually check — flow-classify flags that gap.
358
+ */
359
+ intent: z.ZodOptional<z.ZodString>;
360
+ /**
361
+ * The project the flow was recorded against (the connecting session's HELLO `projectId`), stamped at
362
+ * save time. Scopes a flow to its app so a shared daemon's HUD lists only the current project's flows
363
+ * instead of every project that ever saved to that daemon. Optional + back-compat: a flow with no
364
+ * projectId is treated as global (visible everywhere), so pre-existing files parse and still show.
365
+ */
366
+ projectId: z.ZodOptional<z.ZodString>;
367
+ /**
368
+ * The route (pathname) the journey started on, captured at record time. Replay navigates here
369
+ * before step 1 so a flow whose first anchor lives on another page doesn't drift on step 1 ("a
370
+ * step no longer matches") just because replay began on the wrong page. Optional + back-compat: a
371
+ * flow without it (or recorded before this shipped) replays from the current page as before, and
372
+ * the on-disk version stays FLOW_FILE_VERSION 1.
373
+ */
374
+ startPath: z.ZodOptional<z.ZodString>;
375
+ fixture: z.ZodOptional<z.ZodString>;
376
+ /** From the injected clock (ms) — deterministic in tests, byte-stable on disk. */
377
+ createdAt: z.ZodNumber;
378
+ steps: z.ZodArray<z.ZodType<FlowStep, z.ZodTypeDef, FlowStep>, "many">;
379
+ success: z.ZodOptional<z.ZodObject<{
380
+ signal: z.ZodOptional<z.ZodString>;
381
+ /**
382
+ * Optional payload shape an `assert-signal` annotation requires the signal
383
+ * to match (the predicate DSL's signal.dataMatches). Additive/optional — a flow file with a
384
+ * bare `signal` still parses, and the on-disk version stays FLOW_FILE_VERSION 1.
385
+ */
386
+ signalData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
387
+ net: z.ZodOptional<z.ZodObject<{
388
+ method: z.ZodOptional<z.ZodString>;
389
+ urlContains: z.ZodOptional<z.ZodString>;
390
+ status: z.ZodOptional<z.ZodNumber>;
391
+ /**
392
+ * Exact number of matching requests since the action — turns presence into a cardinality
393
+ * assertion. Catches the double-submit / useEffect-double-fire / retry-storm regression class:
394
+ * the request fired (presence passes) but fired the WRONG number of times. Omit = presence (≥1).
395
+ */
396
+ count: z.ZodOptional<z.ZodNumber>;
397
+ }, "strip", z.ZodTypeAny, {
398
+ status?: number | undefined;
399
+ method?: string | undefined;
400
+ urlContains?: string | undefined;
401
+ count?: number | undefined;
402
+ }, {
403
+ status?: number | undefined;
404
+ method?: string | undefined;
405
+ urlContains?: string | undefined;
406
+ count?: number | undefined;
407
+ }>>;
408
+ /**
409
+ * Console golden end-condition: assert the action logged (or, with absent:true, did NOT log) a
410
+ * console message at `level` (default 'error'). `absent:true` is the common case — "the action
411
+ * completed with a clean console" — catching the regression where an action throws a caught error
412
+ * / logs an uncaught rejection while the UI still renders fine (a presence check passes it).
413
+ */
414
+ console: z.ZodOptional<z.ZodObject<{
415
+ level: z.ZodOptional<z.ZodString>;
416
+ absent: z.ZodOptional<z.ZodBoolean>;
417
+ }, "strip", z.ZodTypeAny, {
418
+ level?: string | undefined;
419
+ absent?: boolean | undefined;
420
+ }, {
421
+ level?: string | undefined;
422
+ absent?: boolean | undefined;
423
+ }>>;
424
+ element: z.ZodOptional<z.ZodObject<{
425
+ testid: z.ZodOptional<z.ZodString>;
426
+ role: z.ZodOptional<z.ZodString>;
427
+ name: z.ZodOptional<z.ZodString>;
428
+ }, "strip", z.ZodTypeAny, {
429
+ testid?: string | undefined;
430
+ role?: string | undefined;
431
+ name?: string | undefined;
432
+ }, {
433
+ testid?: string | undefined;
434
+ role?: string | undefined;
435
+ name?: string | undefined;
436
+ }>>;
437
+ /**
438
+ * Assert a registered store's value — the source of truth no DOM/network read can reach. Compiles
439
+ * to the predicate engine's `state` predicate. Additive/optional — a flow without it still parses
440
+ * and the on-disk version stays FLOW_FILE_VERSION 1. `equals` accepts a literal, omitted = presence,
441
+ * or a `{ $gte | $contains | $length }` operator pattern.
442
+ */
443
+ state: z.ZodOptional<z.ZodObject<{
444
+ store: z.ZodOptional<z.ZodString>;
445
+ path: z.ZodString;
446
+ equals: z.ZodOptional<z.ZodUnknown>;
447
+ /**
448
+ * Treat this as an INVARIANT that must still hold AFTER the action settles, rather than a
449
+ * condition to wait for. Set it for a blast-radius check ("this unrelated path must NOT have
450
+ * moved") — without it a wait-until-true read passes before an over-reaching side-effect lands.
451
+ */
452
+ hold: z.ZodOptional<z.ZodBoolean>;
453
+ }, "strip", z.ZodTypeAny, {
454
+ path: string;
455
+ store?: string | undefined;
456
+ equals?: unknown;
457
+ hold?: boolean | undefined;
458
+ }, {
459
+ path: string;
460
+ store?: string | undefined;
461
+ equals?: unknown;
462
+ hold?: boolean | undefined;
463
+ }>>;
464
+ }, "strip", z.ZodTypeAny, {
465
+ signal?: string | undefined;
466
+ signalData?: Record<string, unknown> | undefined;
467
+ net?: {
468
+ status?: number | undefined;
469
+ method?: string | undefined;
470
+ urlContains?: string | undefined;
471
+ count?: number | undefined;
472
+ } | undefined;
473
+ console?: {
474
+ level?: string | undefined;
475
+ absent?: boolean | undefined;
476
+ } | undefined;
477
+ element?: {
478
+ testid?: string | undefined;
479
+ role?: string | undefined;
480
+ name?: string | undefined;
481
+ } | undefined;
482
+ state?: {
483
+ path: string;
484
+ store?: string | undefined;
485
+ equals?: unknown;
486
+ hold?: boolean | undefined;
487
+ } | undefined;
488
+ }, {
489
+ signal?: string | undefined;
490
+ signalData?: Record<string, unknown> | undefined;
491
+ net?: {
492
+ status?: number | undefined;
493
+ method?: string | undefined;
494
+ urlContains?: string | undefined;
495
+ count?: number | undefined;
496
+ } | undefined;
497
+ console?: {
498
+ level?: string | undefined;
499
+ absent?: boolean | undefined;
500
+ } | undefined;
501
+ element?: {
502
+ testid?: string | undefined;
503
+ role?: string | undefined;
504
+ name?: string | undefined;
505
+ } | undefined;
506
+ state?: {
507
+ path: string;
508
+ store?: string | undefined;
509
+ equals?: unknown;
510
+ hold?: boolean | undefined;
511
+ } | undefined;
512
+ }>>;
513
+ /**
514
+ * Anchors whose CONTENT must not be asserted (e.g. LLM output). Replay asserts
515
+ * presence, not words. Compiled from a `mark-dynamic` annotation.
516
+ */
517
+ dynamic: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
518
+ kind: z.ZodLiteral<"testid">;
519
+ value: z.ZodString;
520
+ }, "strip", z.ZodTypeAny, {
521
+ value: string;
522
+ kind: "testid";
523
+ }, {
524
+ value: string;
525
+ kind: "testid";
526
+ }>, z.ZodObject<{
527
+ kind: z.ZodLiteral<"role">;
528
+ role: z.ZodString;
529
+ name: z.ZodOptional<z.ZodString>;
530
+ }, "strip", z.ZodTypeAny, {
531
+ role: string;
532
+ kind: "role";
533
+ name?: string | undefined;
534
+ }, {
535
+ role: string;
536
+ kind: "role";
537
+ name?: string | undefined;
538
+ }>, z.ZodObject<{
539
+ kind: z.ZodLiteral<"signal">;
540
+ name: z.ZodString;
541
+ }, "strip", z.ZodTypeAny, {
542
+ kind: "signal";
543
+ name: string;
544
+ }, {
545
+ kind: "signal";
546
+ name: string;
547
+ }>, z.ZodObject<{
548
+ kind: z.ZodLiteral<"component">;
549
+ component: z.ZodOptional<z.ZodString>;
550
+ source: z.ZodOptional<z.ZodObject<{
551
+ file: z.ZodString;
552
+ line: z.ZodNumber;
553
+ column: z.ZodOptional<z.ZodNumber>;
554
+ }, "strip", z.ZodTypeAny, {
555
+ file: string;
556
+ line: number;
557
+ column?: number | undefined;
558
+ }, {
559
+ file: string;
560
+ line: number;
561
+ column?: number | undefined;
562
+ }>>;
563
+ role: z.ZodOptional<z.ZodString>;
564
+ name: z.ZodOptional<z.ZodString>;
565
+ }, "strip", z.ZodTypeAny, {
566
+ kind: "component";
567
+ role?: string | undefined;
568
+ component?: string | undefined;
569
+ source?: {
570
+ file: string;
571
+ line: number;
572
+ column?: number | undefined;
573
+ } | undefined;
574
+ name?: string | undefined;
575
+ }, {
576
+ kind: "component";
577
+ role?: string | undefined;
578
+ component?: string | undefined;
579
+ source?: {
580
+ file: string;
581
+ line: number;
582
+ column?: number | undefined;
583
+ } | undefined;
584
+ name?: string | undefined;
585
+ }>]>, "many">>;
586
+ }, "strip", z.ZodTypeAny, {
587
+ name: string;
588
+ steps: FlowStep[];
589
+ version: 1;
590
+ createdAt: number;
591
+ intent?: string | undefined;
592
+ projectId?: string | undefined;
593
+ startPath?: string | undefined;
594
+ fixture?: string | undefined;
595
+ success?: {
596
+ signal?: string | undefined;
597
+ signalData?: Record<string, unknown> | undefined;
598
+ net?: {
599
+ status?: number | undefined;
600
+ method?: string | undefined;
601
+ urlContains?: string | undefined;
602
+ count?: number | undefined;
603
+ } | undefined;
604
+ console?: {
605
+ level?: string | undefined;
606
+ absent?: boolean | undefined;
607
+ } | undefined;
608
+ element?: {
609
+ testid?: string | undefined;
610
+ role?: string | undefined;
611
+ name?: string | undefined;
612
+ } | undefined;
613
+ state?: {
614
+ path: string;
615
+ store?: string | undefined;
616
+ equals?: unknown;
617
+ hold?: boolean | undefined;
618
+ } | undefined;
619
+ } | undefined;
620
+ dynamic?: ({
621
+ value: string;
622
+ kind: "testid";
623
+ } | {
624
+ role: string;
625
+ kind: "role";
626
+ name?: string | undefined;
627
+ } | {
628
+ kind: "signal";
629
+ name: string;
630
+ } | {
631
+ kind: "component";
632
+ role?: string | undefined;
633
+ component?: string | undefined;
634
+ source?: {
635
+ file: string;
636
+ line: number;
637
+ column?: number | undefined;
638
+ } | undefined;
639
+ name?: string | undefined;
640
+ })[] | undefined;
641
+ }, {
642
+ name: string;
643
+ steps: FlowStep[];
644
+ version: 1;
645
+ createdAt: number;
646
+ intent?: string | undefined;
647
+ projectId?: string | undefined;
648
+ startPath?: string | undefined;
649
+ fixture?: string | undefined;
650
+ success?: {
651
+ signal?: string | undefined;
652
+ signalData?: Record<string, unknown> | undefined;
653
+ net?: {
654
+ status?: number | undefined;
655
+ method?: string | undefined;
656
+ urlContains?: string | undefined;
657
+ count?: number | undefined;
658
+ } | undefined;
659
+ console?: {
660
+ level?: string | undefined;
661
+ absent?: boolean | undefined;
662
+ } | undefined;
663
+ element?: {
664
+ testid?: string | undefined;
665
+ role?: string | undefined;
666
+ name?: string | undefined;
667
+ } | undefined;
668
+ state?: {
669
+ path: string;
670
+ store?: string | undefined;
671
+ equals?: unknown;
672
+ hold?: boolean | undefined;
673
+ } | undefined;
674
+ } | undefined;
675
+ dynamic?: ({
676
+ value: string;
677
+ kind: "testid";
678
+ } | {
679
+ role: string;
680
+ kind: "role";
681
+ name?: string | undefined;
682
+ } | {
683
+ kind: "signal";
684
+ name: string;
685
+ } | {
686
+ kind: "component";
687
+ role?: string | undefined;
688
+ component?: string | undefined;
689
+ source?: {
690
+ file: string;
691
+ line: number;
692
+ column?: number | undefined;
693
+ } | undefined;
694
+ name?: string | undefined;
695
+ })[] | undefined;
696
+ }>;
697
+ export type FlowFile = z.infer<typeof FlowFileSchema>;
698
+ /**
699
+ * The in-page → wire payload for a finished human recording. The browser
700
+ * compiles captured interactions into a FlowFile-shaped object (resolving semantic anchors at
701
+ * capture time) and emits it as ONE EventType.FLOW_RECORDED event; the server persists it.
702
+ */
703
+ export declare const RecordedFlowSchema: z.ZodObject<{
704
+ name: z.ZodString;
705
+ flow: z.ZodObject<{
706
+ version: z.ZodLiteral<1>;
707
+ name: z.ZodString;
708
+ /**
709
+ * The business goal this flow exists to verify, one line (e.g. "ship a deploy to production").
710
+ * Optional + back-compat (a flow without it still parses). Set via an `intent` annotation. The
711
+ * point of "intent + outcome oracle": a flow that declares an intent should also assert an
712
+ * observable business OUTCOME (a consequence success-state), or it claims to verify a goal it
713
+ * cannot actually check — flow-classify flags that gap.
714
+ */
715
+ intent: z.ZodOptional<z.ZodString>;
716
+ /**
717
+ * The project the flow was recorded against (the connecting session's HELLO `projectId`), stamped at
718
+ * save time. Scopes a flow to its app so a shared daemon's HUD lists only the current project's flows
719
+ * instead of every project that ever saved to that daemon. Optional + back-compat: a flow with no
720
+ * projectId is treated as global (visible everywhere), so pre-existing files parse and still show.
721
+ */
722
+ projectId: z.ZodOptional<z.ZodString>;
723
+ /**
724
+ * The route (pathname) the journey started on, captured at record time. Replay navigates here
725
+ * before step 1 so a flow whose first anchor lives on another page doesn't drift on step 1 ("a
726
+ * step no longer matches") just because replay began on the wrong page. Optional + back-compat: a
727
+ * flow without it (or recorded before this shipped) replays from the current page as before, and
728
+ * the on-disk version stays FLOW_FILE_VERSION 1.
729
+ */
730
+ startPath: z.ZodOptional<z.ZodString>;
731
+ fixture: z.ZodOptional<z.ZodString>;
732
+ /** From the injected clock (ms) — deterministic in tests, byte-stable on disk. */
733
+ createdAt: z.ZodNumber;
734
+ steps: z.ZodArray<z.ZodType<FlowStep, z.ZodTypeDef, FlowStep>, "many">;
735
+ success: z.ZodOptional<z.ZodObject<{
736
+ signal: z.ZodOptional<z.ZodString>;
737
+ /**
738
+ * Optional payload shape an `assert-signal` annotation requires the signal
739
+ * to match (the predicate DSL's signal.dataMatches). Additive/optional — a flow file with a
740
+ * bare `signal` still parses, and the on-disk version stays FLOW_FILE_VERSION 1.
741
+ */
742
+ signalData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
743
+ net: z.ZodOptional<z.ZodObject<{
744
+ method: z.ZodOptional<z.ZodString>;
745
+ urlContains: z.ZodOptional<z.ZodString>;
746
+ status: z.ZodOptional<z.ZodNumber>;
747
+ /**
748
+ * Exact number of matching requests since the action — turns presence into a cardinality
749
+ * assertion. Catches the double-submit / useEffect-double-fire / retry-storm regression class:
750
+ * the request fired (presence passes) but fired the WRONG number of times. Omit = presence (≥1).
751
+ */
752
+ count: z.ZodOptional<z.ZodNumber>;
753
+ }, "strip", z.ZodTypeAny, {
754
+ status?: number | undefined;
755
+ method?: string | undefined;
756
+ urlContains?: string | undefined;
757
+ count?: number | undefined;
758
+ }, {
759
+ status?: number | undefined;
760
+ method?: string | undefined;
761
+ urlContains?: string | undefined;
762
+ count?: number | undefined;
763
+ }>>;
764
+ /**
765
+ * Console golden end-condition: assert the action logged (or, with absent:true, did NOT log) a
766
+ * console message at `level` (default 'error'). `absent:true` is the common case — "the action
767
+ * completed with a clean console" — catching the regression where an action throws a caught error
768
+ * / logs an uncaught rejection while the UI still renders fine (a presence check passes it).
769
+ */
770
+ console: z.ZodOptional<z.ZodObject<{
771
+ level: z.ZodOptional<z.ZodString>;
772
+ absent: z.ZodOptional<z.ZodBoolean>;
773
+ }, "strip", z.ZodTypeAny, {
774
+ level?: string | undefined;
775
+ absent?: boolean | undefined;
776
+ }, {
777
+ level?: string | undefined;
778
+ absent?: boolean | undefined;
779
+ }>>;
780
+ element: z.ZodOptional<z.ZodObject<{
781
+ testid: z.ZodOptional<z.ZodString>;
782
+ role: z.ZodOptional<z.ZodString>;
783
+ name: z.ZodOptional<z.ZodString>;
784
+ }, "strip", z.ZodTypeAny, {
785
+ testid?: string | undefined;
786
+ role?: string | undefined;
787
+ name?: string | undefined;
788
+ }, {
789
+ testid?: string | undefined;
790
+ role?: string | undefined;
791
+ name?: string | undefined;
792
+ }>>;
793
+ /**
794
+ * Assert a registered store's value — the source of truth no DOM/network read can reach. Compiles
795
+ * to the predicate engine's `state` predicate. Additive/optional — a flow without it still parses
796
+ * and the on-disk version stays FLOW_FILE_VERSION 1. `equals` accepts a literal, omitted = presence,
797
+ * or a `{ $gte | $contains | $length }` operator pattern.
798
+ */
799
+ state: z.ZodOptional<z.ZodObject<{
800
+ store: z.ZodOptional<z.ZodString>;
801
+ path: z.ZodString;
802
+ equals: z.ZodOptional<z.ZodUnknown>;
803
+ /**
804
+ * Treat this as an INVARIANT that must still hold AFTER the action settles, rather than a
805
+ * condition to wait for. Set it for a blast-radius check ("this unrelated path must NOT have
806
+ * moved") — without it a wait-until-true read passes before an over-reaching side-effect lands.
807
+ */
808
+ hold: z.ZodOptional<z.ZodBoolean>;
809
+ }, "strip", z.ZodTypeAny, {
810
+ path: string;
811
+ store?: string | undefined;
812
+ equals?: unknown;
813
+ hold?: boolean | undefined;
814
+ }, {
815
+ path: string;
816
+ store?: string | undefined;
817
+ equals?: unknown;
818
+ hold?: boolean | undefined;
819
+ }>>;
820
+ }, "strip", z.ZodTypeAny, {
821
+ signal?: string | undefined;
822
+ signalData?: Record<string, unknown> | undefined;
823
+ net?: {
824
+ status?: number | undefined;
825
+ method?: string | undefined;
826
+ urlContains?: string | undefined;
827
+ count?: number | undefined;
828
+ } | undefined;
829
+ console?: {
830
+ level?: string | undefined;
831
+ absent?: boolean | undefined;
832
+ } | undefined;
833
+ element?: {
834
+ testid?: string | undefined;
835
+ role?: string | undefined;
836
+ name?: string | undefined;
837
+ } | undefined;
838
+ state?: {
839
+ path: string;
840
+ store?: string | undefined;
841
+ equals?: unknown;
842
+ hold?: boolean | undefined;
843
+ } | undefined;
844
+ }, {
845
+ signal?: string | undefined;
846
+ signalData?: Record<string, unknown> | undefined;
847
+ net?: {
848
+ status?: number | undefined;
849
+ method?: string | undefined;
850
+ urlContains?: string | undefined;
851
+ count?: number | undefined;
852
+ } | undefined;
853
+ console?: {
854
+ level?: string | undefined;
855
+ absent?: boolean | undefined;
856
+ } | undefined;
857
+ element?: {
858
+ testid?: string | undefined;
859
+ role?: string | undefined;
860
+ name?: string | undefined;
861
+ } | undefined;
862
+ state?: {
863
+ path: string;
864
+ store?: string | undefined;
865
+ equals?: unknown;
866
+ hold?: boolean | undefined;
867
+ } | undefined;
868
+ }>>;
869
+ /**
870
+ * Anchors whose CONTENT must not be asserted (e.g. LLM output). Replay asserts
871
+ * presence, not words. Compiled from a `mark-dynamic` annotation.
872
+ */
873
+ dynamic: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
874
+ kind: z.ZodLiteral<"testid">;
875
+ value: z.ZodString;
876
+ }, "strip", z.ZodTypeAny, {
877
+ value: string;
878
+ kind: "testid";
879
+ }, {
880
+ value: string;
881
+ kind: "testid";
882
+ }>, z.ZodObject<{
883
+ kind: z.ZodLiteral<"role">;
884
+ role: z.ZodString;
885
+ name: z.ZodOptional<z.ZodString>;
886
+ }, "strip", z.ZodTypeAny, {
887
+ role: string;
888
+ kind: "role";
889
+ name?: string | undefined;
890
+ }, {
891
+ role: string;
892
+ kind: "role";
893
+ name?: string | undefined;
894
+ }>, z.ZodObject<{
895
+ kind: z.ZodLiteral<"signal">;
896
+ name: z.ZodString;
897
+ }, "strip", z.ZodTypeAny, {
898
+ kind: "signal";
899
+ name: string;
900
+ }, {
901
+ kind: "signal";
902
+ name: string;
903
+ }>, z.ZodObject<{
904
+ kind: z.ZodLiteral<"component">;
905
+ component: z.ZodOptional<z.ZodString>;
906
+ source: z.ZodOptional<z.ZodObject<{
907
+ file: z.ZodString;
908
+ line: z.ZodNumber;
909
+ column: z.ZodOptional<z.ZodNumber>;
910
+ }, "strip", z.ZodTypeAny, {
911
+ file: string;
912
+ line: number;
913
+ column?: number | undefined;
914
+ }, {
915
+ file: string;
916
+ line: number;
917
+ column?: number | undefined;
918
+ }>>;
919
+ role: z.ZodOptional<z.ZodString>;
920
+ name: z.ZodOptional<z.ZodString>;
921
+ }, "strip", z.ZodTypeAny, {
922
+ kind: "component";
923
+ role?: string | undefined;
924
+ component?: string | undefined;
925
+ source?: {
926
+ file: string;
927
+ line: number;
928
+ column?: number | undefined;
929
+ } | undefined;
930
+ name?: string | undefined;
931
+ }, {
932
+ kind: "component";
933
+ role?: string | undefined;
934
+ component?: string | undefined;
935
+ source?: {
936
+ file: string;
937
+ line: number;
938
+ column?: number | undefined;
939
+ } | undefined;
940
+ name?: string | undefined;
941
+ }>]>, "many">>;
942
+ }, "strip", z.ZodTypeAny, {
943
+ name: string;
944
+ steps: FlowStep[];
945
+ version: 1;
946
+ createdAt: number;
947
+ intent?: string | undefined;
948
+ projectId?: string | undefined;
949
+ startPath?: string | undefined;
950
+ fixture?: string | undefined;
951
+ success?: {
952
+ signal?: string | undefined;
953
+ signalData?: Record<string, unknown> | undefined;
954
+ net?: {
955
+ status?: number | undefined;
956
+ method?: string | undefined;
957
+ urlContains?: string | undefined;
958
+ count?: number | undefined;
959
+ } | undefined;
960
+ console?: {
961
+ level?: string | undefined;
962
+ absent?: boolean | undefined;
963
+ } | undefined;
964
+ element?: {
965
+ testid?: string | undefined;
966
+ role?: string | undefined;
967
+ name?: string | undefined;
968
+ } | undefined;
969
+ state?: {
970
+ path: string;
971
+ store?: string | undefined;
972
+ equals?: unknown;
973
+ hold?: boolean | undefined;
974
+ } | undefined;
975
+ } | undefined;
976
+ dynamic?: ({
977
+ value: string;
978
+ kind: "testid";
979
+ } | {
980
+ role: string;
981
+ kind: "role";
982
+ name?: string | undefined;
983
+ } | {
984
+ kind: "signal";
985
+ name: string;
986
+ } | {
987
+ kind: "component";
988
+ role?: string | undefined;
989
+ component?: string | undefined;
990
+ source?: {
991
+ file: string;
992
+ line: number;
993
+ column?: number | undefined;
994
+ } | undefined;
995
+ name?: string | undefined;
996
+ })[] | undefined;
997
+ }, {
998
+ name: string;
999
+ steps: FlowStep[];
1000
+ version: 1;
1001
+ createdAt: number;
1002
+ intent?: string | undefined;
1003
+ projectId?: string | undefined;
1004
+ startPath?: string | undefined;
1005
+ fixture?: string | undefined;
1006
+ success?: {
1007
+ signal?: string | undefined;
1008
+ signalData?: Record<string, unknown> | undefined;
1009
+ net?: {
1010
+ status?: number | undefined;
1011
+ method?: string | undefined;
1012
+ urlContains?: string | undefined;
1013
+ count?: number | undefined;
1014
+ } | undefined;
1015
+ console?: {
1016
+ level?: string | undefined;
1017
+ absent?: boolean | undefined;
1018
+ } | undefined;
1019
+ element?: {
1020
+ testid?: string | undefined;
1021
+ role?: string | undefined;
1022
+ name?: string | undefined;
1023
+ } | undefined;
1024
+ state?: {
1025
+ path: string;
1026
+ store?: string | undefined;
1027
+ equals?: unknown;
1028
+ hold?: boolean | undefined;
1029
+ } | undefined;
1030
+ } | undefined;
1031
+ dynamic?: ({
1032
+ value: string;
1033
+ kind: "testid";
1034
+ } | {
1035
+ role: string;
1036
+ kind: "role";
1037
+ name?: string | undefined;
1038
+ } | {
1039
+ kind: "signal";
1040
+ name: string;
1041
+ } | {
1042
+ kind: "component";
1043
+ role?: string | undefined;
1044
+ component?: string | undefined;
1045
+ source?: {
1046
+ file: string;
1047
+ line: number;
1048
+ column?: number | undefined;
1049
+ } | undefined;
1050
+ name?: string | undefined;
1051
+ })[] | undefined;
1052
+ }>;
1053
+ }, "strip", z.ZodTypeAny, {
1054
+ flow: {
1055
+ name: string;
1056
+ steps: FlowStep[];
1057
+ version: 1;
1058
+ createdAt: number;
1059
+ intent?: string | undefined;
1060
+ projectId?: string | undefined;
1061
+ startPath?: string | undefined;
1062
+ fixture?: string | undefined;
1063
+ success?: {
1064
+ signal?: string | undefined;
1065
+ signalData?: Record<string, unknown> | undefined;
1066
+ net?: {
1067
+ status?: number | undefined;
1068
+ method?: string | undefined;
1069
+ urlContains?: string | undefined;
1070
+ count?: number | undefined;
1071
+ } | undefined;
1072
+ console?: {
1073
+ level?: string | undefined;
1074
+ absent?: boolean | undefined;
1075
+ } | undefined;
1076
+ element?: {
1077
+ testid?: string | undefined;
1078
+ role?: string | undefined;
1079
+ name?: string | undefined;
1080
+ } | undefined;
1081
+ state?: {
1082
+ path: string;
1083
+ store?: string | undefined;
1084
+ equals?: unknown;
1085
+ hold?: boolean | undefined;
1086
+ } | undefined;
1087
+ } | undefined;
1088
+ dynamic?: ({
1089
+ value: string;
1090
+ kind: "testid";
1091
+ } | {
1092
+ role: string;
1093
+ kind: "role";
1094
+ name?: string | undefined;
1095
+ } | {
1096
+ kind: "signal";
1097
+ name: string;
1098
+ } | {
1099
+ kind: "component";
1100
+ role?: string | undefined;
1101
+ component?: string | undefined;
1102
+ source?: {
1103
+ file: string;
1104
+ line: number;
1105
+ column?: number | undefined;
1106
+ } | undefined;
1107
+ name?: string | undefined;
1108
+ })[] | undefined;
1109
+ };
1110
+ name: string;
1111
+ }, {
1112
+ flow: {
1113
+ name: string;
1114
+ steps: FlowStep[];
1115
+ version: 1;
1116
+ createdAt: number;
1117
+ intent?: string | undefined;
1118
+ projectId?: string | undefined;
1119
+ startPath?: string | undefined;
1120
+ fixture?: string | undefined;
1121
+ success?: {
1122
+ signal?: string | undefined;
1123
+ signalData?: Record<string, unknown> | undefined;
1124
+ net?: {
1125
+ status?: number | undefined;
1126
+ method?: string | undefined;
1127
+ urlContains?: string | undefined;
1128
+ count?: number | undefined;
1129
+ } | undefined;
1130
+ console?: {
1131
+ level?: string | undefined;
1132
+ absent?: boolean | undefined;
1133
+ } | undefined;
1134
+ element?: {
1135
+ testid?: string | undefined;
1136
+ role?: string | undefined;
1137
+ name?: string | undefined;
1138
+ } | undefined;
1139
+ state?: {
1140
+ path: string;
1141
+ store?: string | undefined;
1142
+ equals?: unknown;
1143
+ hold?: boolean | undefined;
1144
+ } | undefined;
1145
+ } | undefined;
1146
+ dynamic?: ({
1147
+ value: string;
1148
+ kind: "testid";
1149
+ } | {
1150
+ role: string;
1151
+ kind: "role";
1152
+ name?: string | undefined;
1153
+ } | {
1154
+ kind: "signal";
1155
+ name: string;
1156
+ } | {
1157
+ kind: "component";
1158
+ role?: string | undefined;
1159
+ component?: string | undefined;
1160
+ source?: {
1161
+ file: string;
1162
+ line: number;
1163
+ column?: number | undefined;
1164
+ } | undefined;
1165
+ name?: string | undefined;
1166
+ })[] | undefined;
1167
+ };
1168
+ name: string;
1169
+ }>;
1170
+ /** A concrete, confidence-scored rebind proposed for one drifted step. */
1171
+ export interface HealProposal {
1172
+ /** 0-based step index in the flow. */
1173
+ step: number;
1174
+ /** Old (missing) testid anchor value. */
1175
+ from: string;
1176
+ /** Proposed nearest present testid. */
1177
+ to: string;
1178
+ /** Normalized (0,1]; >= HEAL_CONFIDENCE_MIN to be applicable. */
1179
+ confidence: number;
1180
+ }
1181
+ /** One applied rebind (a HealProposal that was written to disk). */
1182
+ export interface HealChange {
1183
+ step: number;
1184
+ from: string;
1185
+ to: string;
1186
+ }
1187
+ /** The reticle_flow_heal envelope. */
1188
+ export interface FlowHealResult {
1189
+ name: string;
1190
+ status: HealStatus;
1191
+ /** Whether the file was rewritten (true only when status === 'healed'). */
1192
+ applied: boolean;
1193
+ /** Confident, applicable rebinds. With apply:false these are the dry-run diff. */
1194
+ proposals: HealProposal[];
1195
+ /** Anchors actually written (empty unless applied). */
1196
+ changed: HealChange[];
1197
+ /** Human one-liner for the agent (e.g. "nothing to heal", floor explanation). */
1198
+ message: string;
1199
+ error?: {
1200
+ code: string;
1201
+ message: string;
1202
+ };
1203
+ }
1204
+ //# sourceMappingURL=flow-types.d.ts.map