@reticlehq/core 3.6.0 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/artifacts/artifacts-entry.d.ts +2 -0
  2. package/dist/artifacts/artifacts-entry.js +2 -0
  3. package/dist/artifacts/drive-script.d.ts +158 -52
  4. package/dist/artifacts/drive-script.js +24 -1
  5. package/dist/artifacts/flow-constants.d.ts +18 -0
  6. package/dist/artifacts/flow-constants.js +20 -0
  7. package/dist/artifacts/flow-results.d.ts +450 -0
  8. package/dist/artifacts/flow-results.js +1 -0
  9. package/dist/artifacts/flow-types.d.ts +25 -437
  10. package/dist/artifacts/flow-types.js +5 -2
  11. package/dist/artifacts/harness-credits.d.ts +39 -0
  12. package/dist/artifacts/harness-credits.js +69 -0
  13. package/dist/artifacts/harness-map.d.ts +98 -0
  14. package/dist/artifacts/harness-map.js +36 -0
  15. package/dist/artifacts/impact.d.ts +354 -145
  16. package/dist/artifacts/impact.js +66 -48
  17. package/dist/artifacts/journal.d.ts +56 -5
  18. package/dist/artifacts/journal.js +26 -0
  19. package/dist/artifacts/screenshot-upload.d.ts +51 -0
  20. package/dist/artifacts/screenshot-upload.js +26 -0
  21. package/dist/hooks/hook-events.d.ts +4 -4
  22. package/dist/hud-entry.d.ts +1 -0
  23. package/dist/hud-entry.js +2 -0
  24. package/dist/index.d.ts +5 -0
  25. package/dist/index.js +5 -0
  26. package/dist/onboarding.d.ts +8 -0
  27. package/dist/onboarding.js +6 -0
  28. package/dist/realm/registry.js +19 -1
  29. package/dist/schema/command-message.json +30 -0
  30. package/dist/schema/command-name.json +3 -1
  31. package/dist/schema/event-payloads.json +40 -2
  32. package/dist/schema/reticle-message.json +30 -0
  33. package/dist/telemetry-bug.d.ts +169 -0
  34. package/dist/telemetry-bug.js +123 -0
  35. package/dist/telemetry-entry.d.ts +1 -0
  36. package/dist/telemetry-entry.js +1 -0
  37. package/dist/telemetry-feedback.d.ts +2 -2
  38. package/dist/telemetry-refusal.d.ts +2 -2
  39. package/dist/telemetry-session.d.ts +74 -0
  40. package/dist/telemetry-session.js +54 -0
  41. package/dist/telemetry-signals.d.ts +339 -0
  42. package/dist/telemetry-signals.js +138 -0
  43. package/dist/telemetry.d.ts +300 -254
  44. package/dist/telemetry.js +40 -115
  45. package/dist/verdict/disparity.d.ts +105 -0
  46. package/dist/verdict/disparity.js +40 -0
  47. package/dist/verdict/findings.d.ts +6 -0
  48. package/dist/verdict/findings.js +9 -0
  49. package/dist/verdict/instrumentation-coverage.d.ts +115 -0
  50. package/dist/verdict/instrumentation-coverage.js +226 -0
  51. package/dist/verdict/instrumentation-gap.js +1 -1
  52. package/dist/verdict/intent.d.ts +19 -5
  53. package/dist/verdict/intent.js +13 -1
  54. package/dist/verdict/predicate-tree.d.ts +15 -0
  55. package/dist/verdict/predicate-tree.js +21 -0
  56. package/dist/verdict/predicate.d.ts +14 -0
  57. package/dist/verdict/predicate.js +87 -3
  58. package/dist/verdict/security.d.ts +25 -0
  59. package/dist/verdict/security.js +82 -0
  60. package/dist/verdict/verification-run.d.ts +620 -32
  61. package/dist/verdict/verification-run.js +82 -0
  62. package/dist/wire/constants/constants.d.ts +15 -16
  63. package/dist/wire/constants/constants.js +16 -17
  64. package/dist/wire/constants/hud-controls.js +17 -5
  65. package/dist/wire/constants/hud-use.d.ts +29 -4
  66. package/dist/wire/constants/hud-use.js +26 -4
  67. package/dist/wire/constants/mcp-wire.d.ts +10 -0
  68. package/dist/wire/constants/mcp-wire.js +10 -0
  69. package/dist/wire/constants/reticle-chrome.d.ts +19 -0
  70. package/dist/wire/constants/reticle-chrome.js +19 -0
  71. package/dist/wire/constants/session-constants.d.ts +15 -2
  72. package/dist/wire/constants/session-constants.js +15 -2
  73. package/dist/wire/desktop-contract.d.ts +8 -0
  74. package/dist/wire/desktop-contract.js +11 -0
  75. package/dist/wire/event-payloads.d.ts +56 -4
  76. package/dist/wire/event-payloads.js +17 -0
  77. package/dist/wire/messages.d.ts +105 -32
  78. package/dist/wire/messages.js +9 -1
  79. package/dist/wire/platform-link.d.ts +77 -0
  80. package/dist/wire/platform-link.js +45 -0
  81. package/dist/wire/tool-names.d.ts +2 -0
  82. package/dist/wire/tool-names.js +2 -0
  83. package/dist/wire/types.d.ts +19 -6
  84. package/dist/wire/types.js +5 -0
  85. package/dist/words/notices.d.ts +1 -1
  86. package/dist/words/notices.js +1 -1
  87. package/dist/words/upgrade.js +1 -1
  88. package/dist/words/writing-rule.d.ts +14 -0
  89. package/dist/words/writing-rule.js +17 -0
  90. package/package.json +1 -1
@@ -1,11 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  import { StepEffect } from './step-effect.js';
3
3
  import { ActionType } from '../wire/constants/constants.js';
4
- import type { Contradiction } from '../verdict/findings.js';
5
4
  import { PredicateKind } from '../verdict/consequence.js';
6
5
  import { type Predicate } from '../verdict/predicate.js';
7
6
  export { FlowExpectSchema, type FlowExpect } from './flow-expect-flat.js';
8
- import { type DriftReason, type HealStatus, type ReplayStatus, type SuiteIsolation } from './flow-constants.js';
7
+ export * from './flow-results.js';
9
8
  /**
10
9
  * The MCP tool names that can appear as a recorded flow step's `tool`. These are the ONLY tool names
11
10
  * that cross the wire into a persisted flow file — the browser recorder stamps them, the server replays
@@ -99,22 +98,22 @@ export declare const FlowAnchorSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
99
98
  kind: "component";
100
99
  role?: string | undefined;
101
100
  component?: string | undefined;
102
- name?: string | undefined;
103
101
  source?: {
104
102
  file: string;
105
103
  line: number;
106
104
  column?: number | undefined;
107
105
  } | undefined;
106
+ name?: string | undefined;
108
107
  }, {
109
108
  kind: "component";
110
109
  role?: string | undefined;
111
110
  component?: string | undefined;
112
- name?: string | undefined;
113
111
  source?: {
114
112
  file: string;
115
113
  line: number;
116
114
  column?: number | undefined;
117
115
  } | undefined;
116
+ name?: string | undefined;
118
117
  }>]>;
119
118
  export type FlowAnchor = z.infer<typeof FlowAnchorSchema>;
120
119
  export declare const FlowPredicateSchema: z.ZodEffects<z.ZodType<Predicate, z.ZodTypeDef, Predicate>, Predicate, Predicate>;
@@ -199,395 +198,6 @@ export interface FlowStep {
199
198
  invoke?: string;
200
199
  }
201
200
  export declare const FlowStepSchema: z.ZodType<FlowStep>;
202
- /**
203
- * A legible-drift record returned when an anchor misses at replay.
204
- * The "whose fault is it" payload: what was expected, why it's gone, and the closest surviving
205
- * anchor (a concrete fix suggestion). Never a bare "command failed".
206
- */
207
- export interface Drift {
208
- /** Named reason kind (testid not found / signal not observed). */
209
- reasonKind: DriftReason;
210
- /** Human sentence, e.g. `testid "chat-send" not found`. */
211
- reason: string;
212
- /** The missed anchor value (the testid string, or the signal name). */
213
- anchor: string;
214
- /** Closest present testid via the live near-miss; null only when the page has no testids (or signal drift). */
215
- nearest: string | null;
216
- /**
217
- * True when two or more present testids tie at the minimum edit distance, so `nearest` is an
218
- * arbitrary pick. An ambiguous drift is NEVER auto-healed (a wrong rebind ships a bug green) —
219
- * it is surfaced for a human/agent to choose. Absent ⇒ unambiguous.
220
- */
221
- ambiguous?: boolean;
222
- }
223
- /** The per-step result of re-resolving + running one anchored step. */
224
- /**
225
- * Counts of what an app did inside one window, and the width of that window.
226
- *
227
- * Defined HERE because it is part of the artifact contract, and consumed by the engine that computes
228
- * it: core is the bottom of the graph and everything depends on it, so one shape lives in one place
229
- * rather than being declared twice and drifting.
230
- */
231
- export interface ReactionSummary {
232
- total: number;
233
- network: number;
234
- domAdded: number;
235
- domRemoved: number;
236
- domChanged: number;
237
- routeChanges: number;
238
- consoleErrors: number;
239
- animations: number;
240
- signals: number;
241
- }
242
- /**
243
- * The digest's counts: `total` always, every other counter only when it is NON-ZERO.
244
- *
245
- * This shape is sparse and the full `ReactionSummary` above is not, on purpose. The digest ships on
246
- * every step of every replay and on every `act_and_wait`; the full report does not. Across a
247
- * four-step replay 25 of 36 counters are typically zero — every step spelling out `"network":0,
248
- * "domAdded":0,"routeChanges":0,…` whether or not anything moved.
249
- *
250
- * Omitting a zero is a ROUTE cut and never an evidence cut: an absent counter IS zero, so the reader
251
- * answers the same question from the same facts. Read one as `summary.network ?? 0`.
252
- *
253
- * `total` is unconditional because "the window was empty" is itself evidence, and a summary with no
254
- * keys could not be told apart from one that was never computed.
255
- */
256
- export type ReactionSummaryDigest = {
257
- total: number;
258
- } & Partial<Omit<ReactionSummary, 'total'>>;
259
- /** The lean reaction report: the window and the counts, without the per-event timeline. */
260
- export interface ReactionDigest {
261
- window_ms: number;
262
- summary: ReactionSummaryDigest;
263
- }
264
- export interface FlowStepResult {
265
- /** 0-based index of this step in the flow. */
266
- step: number;
267
- /**
268
- * The tool the step runs — FlowStepTool.ACT | ACT_SEQUENCE | the synthetic success oracle.
269
- *
270
- * OMITTED when it is `ACT`, which 137/137 steps in this repo's corpus are. Read it as
271
- * `tool ?? FlowStepTool.ACT`. Every reader only ever asks "is this the success oracle?", and a
272
- * missing field is correctly falsy against that — so the coercion fails in the safe direction.
273
- */
274
- tool?: string;
275
- /** The testid/signal value the step is bound to (the re-resolved anchor). */
276
- anchor: string;
277
- /**
278
- * Where this step lives, rendered, when the flow is a COMPOSITE — `signin#0 (invoked from full#1)`.
279
- *
280
- * Absent for a flat flow, where `step` is already the whole answer and an address on every row
281
- * would be noise on every replay of every flow.
282
- */
283
- at?: string;
284
- /**
285
- * The route (pathname) the page was on when this step ran — the "which page" of the journey.
286
- * Additive/optional: present when a route is observable, absent in route-less contexts (e.g. a
287
- * fake session with no route events). Lets a replay result read as a page-by-page journey.
288
- */
289
- page?: string;
290
- /** The route the page was on once this step settled — where it led. Absent when unobservable. */
291
- endPage?: string;
292
- /**
293
- * A compact summary of the observable CONSEQUENCE in the window right after this step ran — the
294
- * "what happened" of the journey: a route change, a domain signal (e.g. a modal opening), a
295
- * network call, or console errors. Additive/optional and intentionally terse (token-cheap). It
296
- * captures what had landed by the time the action settled, so a very-late async effect may not
297
- * appear; the asserted consequence (expect/success) is the authoritative pass/fail signal.
298
- */
299
- consequence?: string;
300
- /**
301
- * Wall-clock ms this step took (dispatch → post-settle), from the session's injected elapsed clock.
302
- * Additive/optional: absent in contexts with no advancing clock. Feeds per-step run-to-run perf diffs.
303
- */
304
- durationMs?: number;
305
- /**
306
- * The event-stream span this step's evidence lives in — its drill address.
307
- *
308
- * `reticle_observe` already accepts `{ since, until }` and returns "the span between action A and
309
- * B", so a step that carries its own window is a step somebody can ask about afterwards without
310
- * re-driving anything. Without it the evidence is captured and has no address, which is why a
311
- * deterministic run could say a step passed and nothing more.
312
- *
313
- * Bounded on BOTH ends deliberately. A `since` alone returns everything from that point to now, so
314
- * on a long flow step two's window would include steps three through twenty-five — and an agent
315
- * reading it would attribute the whole tail to one click.
316
- *
317
- * Additive/optional, and omitted rather than zero-width where no clock advanced: a `{since: 0,
318
- * until: 0}` would read as "this step caused nothing" instead of "nothing here measures time".
319
- */
320
- window?: {
321
- since: number;
322
- until: number;
323
- };
324
- /**
325
- * What the app DID in that window, as counts.
326
- *
327
- * `consequence` beside it is a sentence — readable, and not scannable. Twenty-five sentences is
328
- * prose somebody has to read; twenty-five of these is a surface they can skim for the one row that
329
- * is unlike the others, which is the whole difference between a step ledger and a wall of text.
330
- *
331
- * The counts, not the events. The per-event timeline is the expensive half and it is one
332
- * `reticle_observe { since, until }` away using this step's own `window`, so the cheap form is
333
- * what travels and the full form is addressable rather than sent.
334
- */
335
- digest?: ReactionDigest;
336
- /**
337
- * Channels that DISAGREE about what this step did — reported even when the step passed.
338
- *
339
- * That is the entire point. A step whose anchor resolved, whose action fired and whose declared
340
- * consequence held, while a request in the same window failed, is the false green this product
341
- * exists to catch. The detectors run independently of the assertion, so a green step with an entry
342
- * here is a finding, not a contradiction in terms.
343
- *
344
- * Omitted when the channels agree, never an empty array: a field that is always present teaches a
345
- * reader to skim past it, and the whole value here is that its presence is the signal.
346
- */
347
- contradictions?: Contradiction[];
348
- /**
349
- * The console errors and uncaught exceptions this step's window saw, the first few only; `digest`
350
- * still counts every one. A run artifact's `evidence.consoleErrors` is built from these, so it
351
- * reports what replay observed instead of claiming a clean console. Omitted when there were none.
352
- */
353
- consoleErrors?: {
354
- level: string;
355
- message: string;
356
- at: number;
357
- }[];
358
- ok: boolean;
359
- error?: string;
360
- note?: string;
361
- /** Present iff this step stopped on an anchor miss. */
362
- drift?: Drift;
363
- /**
364
- * A confidence-scored nearest-match rebind for this drifted step (additive,
365
- * optional). Set only for a confident testid drift.
366
- */
367
- proposal?: HealProposal;
368
- }
369
- /**
370
- * The autonomy decision envelope — the feedback a human used to give, made machine-actionable. From
371
- * a replay result it states the verdict, what changed, WHERE in the source to look (file:line, from a
372
- * component anchor), a suggested fix, and the single next action — so a coding agent decides its next
373
- * move without a human in the loop. Terse by design (token-cheap).
374
- */
375
- export interface ReplayDecision {
376
- /** pass = intent held; drift = a locator/anchor missed; fail = an action or the success oracle failed. */
377
- verdict: 'pass' | 'drift' | 'fail';
378
- /** One-line human/agent summary of the outcome. */
379
- summary: string;
380
- /** What regressed (the drift reason or failure), when not a pass. */
381
- whatChanged?: string;
382
- /** Where to look — `file:line` from the failing step's source anchor, or the page route. */
383
- whereInSource?: string;
384
- /** A concrete fix hint (e.g. rebind to the nearest surviving anchor). */
385
- suggestedFix?: string;
386
- /** The single next action the agent should take. */
387
- nextAction: string;
388
- }
389
- /**
390
- * One flow's line in a suite verdict — pass counts as a name; a failure carries the actionable
391
- * decision fields so the agent can fix it without re-querying.
392
- */
393
- export interface SuiteFlowResult {
394
- flow: string;
395
- /**
396
- * The flow never ran: its file failed to load, or its leased context never came up. Nothing was
397
- * learned about the app, so this row is not a regression — it is Reticle reporting its own failure
398
- * in the same array as the app's. Measured: one sweep emitted 8 `flow-regression` bug_found events
399
- * off rows like these, from a suite where no flow ever executed.
400
- */
401
- couldNotRun?: boolean;
402
- verdict: 'pass' | 'drift' | 'fail';
403
- whatChanged?: string;
404
- whereInSource?: string;
405
- nextAction?: string;
406
- }
407
- /**
408
- * The consolidated verdict of replaying EVERY known flow — the autonomous loop's "did I break
409
- * anything, and what do I fix" answer in one deterministic call. Passing flows are counted; only
410
- * failures carry detail (token-cheap). `status` is fail if any flow drifted or errored.
411
- */
412
- export interface SuiteVerdict {
413
- /**
414
- * `unverifiable` means the suite contained flows that CANNOT FAIL, so "pass" would be a lie.
415
- *
416
- * A recorded flow with no steps, or one that asserts no observable consequence, replays green no
417
- * matter what the app does. Reporting `pass` for it is a false green in the exact feature sold as
418
- * the regression suite — measured: a flow saved as `{steps: [], intent: "..."}`, which `flow_save`
419
- * had ALREADY graded assertion-free with a warning, came back "all 1 flow pass".
420
- */
421
- status: 'pass' | 'fail' | 'unverifiable';
422
- total: number;
423
- passed: number;
424
- failed: number;
425
- summary: string;
426
- /** Only the failing flows, with their decision (verdict, what changed, where, next action). */
427
- failures: SuiteFlowResult[];
428
- /**
429
- * How the flows were kept apart — see `SuiteIsolation`.
430
- *
431
- * Absent when the caller did not say. Present, it is the difference between two counts that can
432
- * be compared and two that cannot: a shared-session pass may be inherited from an earlier flow.
433
- */
434
- isolation?: SuiteIsolation;
435
- /**
436
- * Flows that replayed without error but assert nothing, so their green means nothing. Counted
437
- * apart from `passed` — a number that includes them is not a count of anything verified.
438
- */
439
- unverifiable?: {
440
- flow: string;
441
- reason: string;
442
- }[];
443
- /**
444
- * Flows that have both passed AND failed on UNCHANGED code — intermittent, not regressions.
445
- *
446
- * A flake and a regression demand opposite responses: one is chased, the other is quarantined. The
447
- * ledger that answers this already existed and was written only by the CLI, so an agent replaying a
448
- * suite a hundred times could never learn which of its failures were noise. Omitted entirely when
449
- * the ledger has not seen enough runs to say.
450
- */
451
- flaky?: string[];
452
- /**
453
- * How much of what the suite DROVE it actually proved.
454
- *
455
- * `unverifiable` above catches a flow that asserts nothing at all. It cannot catch the commoner
456
- * shape: a flow of twelve steps where three declare a consequence and nine do not. That flow
457
- * passes, counts in `passed`, and nine of its steps would have replayed green whether or not the
458
- * feature worked.
459
- *
460
- * So the count travels. Sixty-three steps driven and forty-seven declared is not "75% verified" —
461
- * it is verified for forty-seven and silent about sixteen, and only a number carrying both lets a
462
- * reader tell those apart. Omitted when no flow file was available to count, because an invented
463
- * zero would read as "nothing was declared" rather than "nothing was counted".
464
- */
465
- coverage?: {
466
- steps: number;
467
- declared: number;
468
- };
469
- /**
470
- * Known routes this run never opened.
471
- *
472
- * `coverage` above counts what the suite DROVE. Neither it nor anything else here notices a route
473
- * no flow goes near — so a selection replaying two of eleven flows reports "all 2 flows pass",
474
- * which is true and says nothing about the nine routes that were not looked at.
475
- *
476
- * Known means seen before, not enumerated from the app: every flow the project holds contributes
477
- * the route it starts on. Omitted when the caller knows of no routes, because "0 unreached" from
478
- * an empty ledger reads as a clean sweep rather than as an unanswered question.
479
- */
480
- unreached?: string[];
481
- /**
482
- * Every channel disagreement the suite saw, including on flows that PASSED.
483
- *
484
- * The step-level rule already says a contradiction is reported regardless of `ok`, for the reason
485
- * that a step whose action fired and whose consequence held, while a request in the same window
486
- * failed, is the false green this product exists to catch. The suite verdict returned only its
487
- * failures, so on a green run every one of those was computed, attached to a step, and discarded
488
- * at exactly the moment somebody would have read it — a nightly run of a hundred steps reporting
489
- * "all 12 flows pass".
490
- *
491
- * Carrying them also means a green suite is not reported as `pass`: see `status`.
492
- */
493
- contradictions?: SuiteContradiction[];
494
- }
495
- /** A step-level contradiction, addressed back to the flow and step that produced it. */
496
- export interface SuiteContradiction extends Contradiction {
497
- flow: string;
498
- /** Index within the flow, so the reader can drill straight to the step's own window. */
499
- step: number;
500
- }
501
- /** The reticle_flow_replay envelope. */
502
- export interface FlowReplayResult {
503
- name: string;
504
- status: ReplayStatus;
505
- /**
506
- * Contradictions that span steps — found by re-running the detectors over the WHOLE replay, minus
507
- * everything a step already reported.
508
- *
509
- * A step's window closes when the step ends, so a request fired at step 2 and still unanswered at
510
- * step 5 sits outside every per-step window. It is exactly the shape a long journey produces and
511
- * exactly the shape a per-step view cannot see.
512
- *
513
- * Omitted when the whole-span pass adds nothing over the steps.
514
- */
515
- crossStep?: Contradiction[];
516
- /**
517
- * What this flow knows after this run — every defect it has seen, and whether it is still open.
518
- *
519
- * Written back to the flow file so the next replay starts from it. This is how a flow gets
520
- * stricter without anybody writing a new assertion: a defect observed, then observed GONE, becomes
521
- * something the app can never quietly reacquire.
522
- */
523
- learned?: {
524
- kind: string;
525
- step: number;
526
- state: 'open' | 'guarded';
527
- cleanRuns?: number | undefined;
528
- }[];
529
- /** Defects this run saw disappear. The app got better here. */
530
- promoted?: string[];
531
- /** Guarded defects that came back. The app got worse here, and only this flow would have known. */
532
- regressed?: string[];
533
- steps: FlowStepResult[];
534
- /** The machine-actionable decision derived from this replay (autonomy layer). */
535
- decision?: ReplayDecision;
536
- /** Set when status === 'error' (load failure or resolved action failure). */
537
- error?: {
538
- code: string;
539
- message: string;
540
- };
541
- /**
542
- * Set when the replay STOPPED before the end of the flow.
543
- *
544
- * Replay breaks on the first failing step, so a flow that halted returns fewer step results than
545
- * it has steps — and nothing said so. A caller reading a two-step flow's one result saw a step
546
- * that was simply absent, which was reported as replay "silently skipping" an action. It does not
547
- * skip; it stops, and now it says where and how much it never reached. Omitted entirely when every
548
- * step ran, so a clean pass carries no extra bytes.
549
- */
550
- halted?: {
551
- atStep: number;
552
- notAttempted: number;
553
- };
554
- /**
555
- * Set on an `ok` replay whose flow cannot fail: it asserts no observable consequence, or has no
556
- * steps at all. The replay genuinely completed, so the status stays `ok` — but a bare `ok` read
557
- * as proof the feature works is exactly the false confidence `flow-risk.ts` argues against, and
558
- * `reticle_flow_verify` already refuses to count these as passes. This carries the same reason,
559
- * from the same function, to the single-flow caller who would otherwise never see it.
560
- */
561
- unverifiable?: {
562
- reason: string;
563
- };
564
- /**
565
- * The confident rebind proposals aggregated across drifted steps (additive,
566
- * optional — present only when at least one drifted step has a confident nearest match).
567
- */
568
- proposals?: HealProposal[];
569
- /**
570
- * The push-default deviation report over this replay's route segments (ranked deviations vs the learned
571
- * envelope, or a fall-back note below N=3 runs). Additive; present when segments were observed.
572
- */
573
- deviation?: unknown;
574
- /**
575
- * What the project already knows about this flow, fetched from shared memory on the agent's
576
- * behalf.
577
- *
578
- * Present only when the project is linked, memory sync is on, and the team has actually captured
579
- * something about this flow. Shared memory an agent has to remember to consult is never consulted,
580
- * so the verification asks on the agent's behalf — the difference between memory the platform
581
- * stores and memory the platform uses.
582
- *
583
- * Deliberately additive and deliberately small: a verdict whose own result has been pushed below
584
- * a wall of statements is a worse verdict.
585
- */
586
- knows?: {
587
- statement: string;
588
- status: string;
589
- }[];
590
- }
591
201
  /**
592
202
  * The on-disk flow file: diffable, git-tracked, anchor-resolved.
593
203
  * The optional `dynamic` field (both `dynamic` + `success` are optional, so a
@@ -828,6 +438,7 @@ export declare const FlowFileSchema: z.ZodObject<{
828
438
  scope?: string;
829
439
  self?: boolean;
830
440
  satisfies?: import("../index.js").PropertyAssertion;
441
+ ignoreCase?: boolean;
831
442
  } | {
832
443
  kind: typeof PredicateKind.NET;
833
444
  method?: string;
@@ -840,6 +451,7 @@ export declare const FlowFileSchema: z.ZodObject<{
840
451
  bodyMatches?: Record<string, unknown>;
841
452
  requestBodyContains?: string;
842
453
  requestBodyMatches?: Record<string, unknown>;
454
+ repeatable?: boolean;
843
455
  } | {
844
456
  kind: typeof PredicateKind.ROUTE;
845
457
  pathname?: string;
@@ -1126,6 +738,7 @@ export declare const FlowFileSchema: z.ZodObject<{
1126
738
  scope?: string;
1127
739
  self?: boolean;
1128
740
  satisfies?: import("../index.js").PropertyAssertion;
741
+ ignoreCase?: boolean;
1129
742
  } | {
1130
743
  kind: typeof PredicateKind.NET;
1131
744
  method?: string;
@@ -1138,6 +751,7 @@ export declare const FlowFileSchema: z.ZodObject<{
1138
751
  bodyMatches?: Record<string, unknown>;
1139
752
  requestBodyContains?: string;
1140
753
  requestBodyMatches?: Record<string, unknown>;
754
+ repeatable?: boolean;
1141
755
  } | {
1142
756
  kind: typeof PredicateKind.ROUTE;
1143
757
  pathname?: string;
@@ -1451,6 +1065,7 @@ export declare const FlowFileSchema: z.ZodObject<{
1451
1065
  scope?: string;
1452
1066
  self?: boolean;
1453
1067
  satisfies?: import("../index.js").PropertyAssertion;
1068
+ ignoreCase?: boolean;
1454
1069
  } | {
1455
1070
  kind: typeof PredicateKind.NET;
1456
1071
  method?: string;
@@ -1463,6 +1078,7 @@ export declare const FlowFileSchema: z.ZodObject<{
1463
1078
  bodyMatches?: Record<string, unknown>;
1464
1079
  requestBodyContains?: string;
1465
1080
  requestBodyMatches?: Record<string, unknown>;
1081
+ repeatable?: boolean;
1466
1082
  } | {
1467
1083
  kind: typeof PredicateKind.ROUTE;
1468
1084
  pathname?: string;
@@ -1631,22 +1247,22 @@ export declare const FlowFileSchema: z.ZodObject<{
1631
1247
  kind: "component";
1632
1248
  role?: string | undefined;
1633
1249
  component?: string | undefined;
1634
- name?: string | undefined;
1635
1250
  source?: {
1636
1251
  file: string;
1637
1252
  line: number;
1638
1253
  column?: number | undefined;
1639
1254
  } | undefined;
1255
+ name?: string | undefined;
1640
1256
  }, {
1641
1257
  kind: "component";
1642
1258
  role?: string | undefined;
1643
1259
  component?: string | undefined;
1644
- name?: string | undefined;
1645
1260
  source?: {
1646
1261
  file: string;
1647
1262
  line: number;
1648
1263
  column?: number | undefined;
1649
1264
  } | undefined;
1265
+ name?: string | undefined;
1650
1266
  }>]>, "many">>;
1651
1267
  /**
1652
1268
  * Free-form labels a suite selects on — `smoke`, `checkout`, `slow`.
@@ -1793,12 +1409,12 @@ export declare const FlowFileSchema: z.ZodObject<{
1793
1409
  kind: "component";
1794
1410
  role?: string | undefined;
1795
1411
  component?: string | undefined;
1796
- name?: string | undefined;
1797
1412
  source?: {
1798
1413
  file: string;
1799
1414
  line: number;
1800
1415
  column?: number | undefined;
1801
1416
  } | undefined;
1417
+ name?: string | undefined;
1802
1418
  })[] | undefined;
1803
1419
  labels?: string[] | undefined;
1804
1420
  needs?: string[] | undefined;
@@ -1965,12 +1581,12 @@ export declare const FlowFileSchema: z.ZodObject<{
1965
1581
  kind: "component";
1966
1582
  role?: string | undefined;
1967
1583
  component?: string | undefined;
1968
- name?: string | undefined;
1969
1584
  source?: {
1970
1585
  file: string;
1971
1586
  line: number;
1972
1587
  column?: number | undefined;
1973
1588
  } | undefined;
1589
+ name?: string | undefined;
1974
1590
  })[] | undefined;
1975
1591
  labels?: string[] | undefined;
1976
1592
  needs?: string[] | undefined;
@@ -2246,6 +1862,7 @@ export declare const RecordedFlowSchema: z.ZodObject<{
2246
1862
  scope?: string;
2247
1863
  self?: boolean;
2248
1864
  satisfies?: import("../index.js").PropertyAssertion;
1865
+ ignoreCase?: boolean;
2249
1866
  } | {
2250
1867
  kind: typeof PredicateKind.NET;
2251
1868
  method?: string;
@@ -2258,6 +1875,7 @@ export declare const RecordedFlowSchema: z.ZodObject<{
2258
1875
  bodyMatches?: Record<string, unknown>;
2259
1876
  requestBodyContains?: string;
2260
1877
  requestBodyMatches?: Record<string, unknown>;
1878
+ repeatable?: boolean;
2261
1879
  } | {
2262
1880
  kind: typeof PredicateKind.ROUTE;
2263
1881
  pathname?: string;
@@ -2544,6 +2162,7 @@ export declare const RecordedFlowSchema: z.ZodObject<{
2544
2162
  scope?: string;
2545
2163
  self?: boolean;
2546
2164
  satisfies?: import("../index.js").PropertyAssertion;
2165
+ ignoreCase?: boolean;
2547
2166
  } | {
2548
2167
  kind: typeof PredicateKind.NET;
2549
2168
  method?: string;
@@ -2556,6 +2175,7 @@ export declare const RecordedFlowSchema: z.ZodObject<{
2556
2175
  bodyMatches?: Record<string, unknown>;
2557
2176
  requestBodyContains?: string;
2558
2177
  requestBodyMatches?: Record<string, unknown>;
2178
+ repeatable?: boolean;
2559
2179
  } | {
2560
2180
  kind: typeof PredicateKind.ROUTE;
2561
2181
  pathname?: string;
@@ -2869,6 +2489,7 @@ export declare const RecordedFlowSchema: z.ZodObject<{
2869
2489
  scope?: string;
2870
2490
  self?: boolean;
2871
2491
  satisfies?: import("../index.js").PropertyAssertion;
2492
+ ignoreCase?: boolean;
2872
2493
  } | {
2873
2494
  kind: typeof PredicateKind.NET;
2874
2495
  method?: string;
@@ -2881,6 +2502,7 @@ export declare const RecordedFlowSchema: z.ZodObject<{
2881
2502
  bodyMatches?: Record<string, unknown>;
2882
2503
  requestBodyContains?: string;
2883
2504
  requestBodyMatches?: Record<string, unknown>;
2505
+ repeatable?: boolean;
2884
2506
  } | {
2885
2507
  kind: typeof PredicateKind.ROUTE;
2886
2508
  pathname?: string;
@@ -3049,22 +2671,22 @@ export declare const RecordedFlowSchema: z.ZodObject<{
3049
2671
  kind: "component";
3050
2672
  role?: string | undefined;
3051
2673
  component?: string | undefined;
3052
- name?: string | undefined;
3053
2674
  source?: {
3054
2675
  file: string;
3055
2676
  line: number;
3056
2677
  column?: number | undefined;
3057
2678
  } | undefined;
2679
+ name?: string | undefined;
3058
2680
  }, {
3059
2681
  kind: "component";
3060
2682
  role?: string | undefined;
3061
2683
  component?: string | undefined;
3062
- name?: string | undefined;
3063
2684
  source?: {
3064
2685
  file: string;
3065
2686
  line: number;
3066
2687
  column?: number | undefined;
3067
2688
  } | undefined;
2689
+ name?: string | undefined;
3068
2690
  }>]>, "many">>;
3069
2691
  /**
3070
2692
  * Free-form labels a suite selects on — `smoke`, `checkout`, `slow`.
@@ -3211,12 +2833,12 @@ export declare const RecordedFlowSchema: z.ZodObject<{
3211
2833
  kind: "component";
3212
2834
  role?: string | undefined;
3213
2835
  component?: string | undefined;
3214
- name?: string | undefined;
3215
2836
  source?: {
3216
2837
  file: string;
3217
2838
  line: number;
3218
2839
  column?: number | undefined;
3219
2840
  } | undefined;
2841
+ name?: string | undefined;
3220
2842
  })[] | undefined;
3221
2843
  labels?: string[] | undefined;
3222
2844
  needs?: string[] | undefined;
@@ -3383,12 +3005,12 @@ export declare const RecordedFlowSchema: z.ZodObject<{
3383
3005
  kind: "component";
3384
3006
  role?: string | undefined;
3385
3007
  component?: string | undefined;
3386
- name?: string | undefined;
3387
3008
  source?: {
3388
3009
  file: string;
3389
3010
  line: number;
3390
3011
  column?: number | undefined;
3391
3012
  } | undefined;
3013
+ name?: string | undefined;
3392
3014
  })[] | undefined;
3393
3015
  labels?: string[] | undefined;
3394
3016
  needs?: string[] | undefined;
@@ -3452,12 +3074,12 @@ export declare const RecordedFlowSchema: z.ZodObject<{
3452
3074
  kind: "component";
3453
3075
  role?: string | undefined;
3454
3076
  component?: string | undefined;
3455
- name?: string | undefined;
3456
3077
  source?: {
3457
3078
  file: string;
3458
3079
  line: number;
3459
3080
  column?: number | undefined;
3460
3081
  } | undefined;
3082
+ name?: string | undefined;
3461
3083
  })[] | undefined;
3462
3084
  labels?: string[] | undefined;
3463
3085
  needs?: string[] | undefined;
@@ -3627,12 +3249,12 @@ export declare const RecordedFlowSchema: z.ZodObject<{
3627
3249
  kind: "component";
3628
3250
  role?: string | undefined;
3629
3251
  component?: string | undefined;
3630
- name?: string | undefined;
3631
3252
  source?: {
3632
3253
  file: string;
3633
3254
  line: number;
3634
3255
  column?: number | undefined;
3635
3256
  } | undefined;
3257
+ name?: string | undefined;
3636
3258
  })[] | undefined;
3637
3259
  labels?: string[] | undefined;
3638
3260
  needs?: string[] | undefined;
@@ -3650,40 +3272,6 @@ export declare const RecordedFlowSchema: z.ZodObject<{
3650
3272
  };
3651
3273
  name: string;
3652
3274
  }>;
3653
- /** A concrete, confidence-scored rebind proposed for one drifted step. */
3654
- export interface HealProposal {
3655
- /** 0-based step index in the flow. */
3656
- step: number;
3657
- /** Old (missing) testid anchor value. */
3658
- from: string;
3659
- /** Proposed nearest present testid. */
3660
- to: string;
3661
- /** Normalized (0,1]; >= HEAL_CONFIDENCE_MIN to be applicable. */
3662
- confidence: number;
3663
- }
3664
- /** One applied rebind (a HealProposal that was written to disk). */
3665
- export interface HealChange {
3666
- step: number;
3667
- from: string;
3668
- to: string;
3669
- }
3670
- /** The reticle_flow_heal envelope. */
3671
- export interface FlowHealResult {
3672
- name: string;
3673
- status: HealStatus;
3674
- /** Whether the file was rewritten (true only when status === 'healed'). */
3675
- applied: boolean;
3676
- /** Confident, applicable rebinds. With apply:false these are the dry-run diff. */
3677
- proposals: HealProposal[];
3678
- /** Anchors actually written (empty unless applied). */
3679
- changed: HealChange[];
3680
- /** Human one-liner for the agent (e.g. "nothing to heal", floor explanation). */
3681
- message: string;
3682
- error?: {
3683
- code: string;
3684
- message: string;
3685
- };
3686
- }
3687
3275
  export type RecordedFlow = z.infer<typeof RecordedFlowSchema>;
3688
3276
  /**
3689
3277
  * One replayable-flow chip on the in-page HUD.