@reticlehq/core 3.9.0 → 3.10.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 (55) hide show
  1. package/dist/artifacts/flow-constants.d.ts +17 -0
  2. package/dist/artifacts/flow-constants.js +15 -0
  3. package/dist/artifacts/flow-results.d.ts +27 -2
  4. package/dist/artifacts/flow-step-tool.d.ts +17 -0
  5. package/dist/artifacts/flow-step-tool.js +18 -1
  6. package/dist/artifacts/flow-types.d.ts +59 -0
  7. package/dist/artifacts/flow-types.js +51 -6
  8. package/dist/identity/github-action.d.ts +2 -2
  9. package/dist/identity/github-action.js +1 -1
  10. package/dist/index.d.ts +3 -0
  11. package/dist/index.js +3 -0
  12. package/dist/schema/event-message.json +1 -0
  13. package/dist/schema/event-payloads.json +47 -1
  14. package/dist/schema/event-type.json +1 -0
  15. package/dist/schema/reticle-event.json +1 -0
  16. package/dist/schema/reticle-message.json +1 -0
  17. package/dist/telemetry-refusal.d.ts +82 -0
  18. package/dist/telemetry-refusal.js +49 -0
  19. package/dist/telemetry-signals.d.ts +44 -0
  20. package/dist/telemetry-signals.js +17 -0
  21. package/dist/telemetry.d.ts +66 -2
  22. package/dist/telemetry.js +8 -1
  23. package/dist/verdict/findings.d.ts +34 -0
  24. package/dist/verdict/findings.js +37 -0
  25. package/dist/verdict/predicate.d.ts +1 -0
  26. package/dist/verdict/predicate.js +26 -1
  27. package/dist/verdict/verdict-attribution.js +1 -0
  28. package/dist/verdict/verified-constants.d.ts +17 -0
  29. package/dist/verdict/verified-constants.js +17 -0
  30. package/dist/wire/click-input.d.ts +26 -0
  31. package/dist/wire/click-input.js +65 -0
  32. package/dist/wire/constants/animation-command.d.ts +2 -0
  33. package/dist/wire/constants/animation-command.js +2 -0
  34. package/dist/wire/constants/console-event.d.ts +44 -0
  35. package/dist/wire/constants/console-event.js +44 -0
  36. package/dist/wire/constants/constants.d.ts +38 -13
  37. package/dist/wire/constants/constants.js +38 -13
  38. package/dist/wire/constants/determinism.d.ts +17 -0
  39. package/dist/wire/constants/determinism.js +17 -0
  40. package/dist/wire/constants/event-types.d.ts +113 -0
  41. package/dist/wire/constants/event-types.js +87 -0
  42. package/dist/wire/event-payloads.d.ts +16 -93
  43. package/dist/wire/event-payloads.js +26 -72
  44. package/dist/wire/event-priority.js +1 -0
  45. package/dist/wire/global-press.d.ts +9 -2
  46. package/dist/wire/global-press.js +39 -12
  47. package/dist/wire/messages.d.ts +3 -0
  48. package/dist/wire/net.d.ts +39 -0
  49. package/dist/wire/net.js +56 -8
  50. package/dist/wire/redaction.d.ts +18 -0
  51. package/dist/wire/redaction.js +72 -0
  52. package/dist/wire/tool-names.d.ts +4 -0
  53. package/dist/wire/tool-names.js +4 -0
  54. package/dist/wire/types.d.ts +8 -0
  55. package/package.json +1 -1
@@ -192,6 +192,23 @@ export declare const ReplayStatus: {
192
192
  readonly UNVERIFIABLE: "unverifiable";
193
193
  };
194
194
  export type ReplayStatus = (typeof ReplayStatus)[keyof typeof ReplayStatus];
195
+ /**
196
+ * The status of a replayed suite (`SuiteVerdict.status`). `partial` is a suite that stopped before
197
+ * every selected flow ran (see `SuiteStopReason`), so a green count over half a suite never reads as a pass.
198
+ */
199
+ export declare const SuiteVerdictStatus: {
200
+ readonly PASS: "pass";
201
+ readonly FAIL: "fail";
202
+ readonly UNVERIFIABLE: "unverifiable";
203
+ readonly PARTIAL: "partial";
204
+ };
205
+ export type SuiteVerdictStatus = (typeof SuiteVerdictStatus)[keyof typeof SuiteVerdictStatus];
206
+ /** Why a suite ended before every selected flow ran (`SuiteVerdict.stopped.reason`). */
207
+ export declare const SuiteStopReason: {
208
+ readonly TIME_BUDGET: "time_budget";
209
+ readonly SESSION_LOST: "session_lost";
210
+ };
211
+ export type SuiteStopReason = (typeof SuiteStopReason)[keyof typeof SuiteStopReason];
195
212
  /**
196
213
  * Why an anchor failed to resolve at replay time (the "whose fault is
197
214
  * it" reason kind). Drives the human `reason` sentence and whether a nearest-match is offered.
@@ -204,6 +204,21 @@ export const ReplayStatus = {
204
204
  ERROR: 'error', // the flow could not load or a resolved action failed
205
205
  UNVERIFIABLE: 'unverifiable', // run could not be completed or graded (precondition unmet, secrets missing, document replaced)
206
206
  };
207
+ /**
208
+ * The status of a replayed suite (`SuiteVerdict.status`). `partial` is a suite that stopped before
209
+ * every selected flow ran (see `SuiteStopReason`), so a green count over half a suite never reads as a pass.
210
+ */
211
+ export const SuiteVerdictStatus = {
212
+ PASS: 'pass',
213
+ FAIL: 'fail',
214
+ UNVERIFIABLE: 'unverifiable',
215
+ PARTIAL: 'partial',
216
+ };
217
+ /** Why a suite ended before every selected flow ran (`SuiteVerdict.stopped.reason`). */
218
+ export const SuiteStopReason = {
219
+ TIME_BUDGET: 'time_budget', // the total time budget was spent
220
+ SESSION_LOST: 'session_lost', // the tab closed or a lease expired
221
+ };
207
222
  /**
208
223
  * Why an anchor failed to resolve at replay time (the "whose fault is
209
224
  * it" reason kind). Drives the human `reason` sentence and whether a nearest-match is offered.
@@ -7,7 +7,7 @@
7
7
  * flow's types" still answers for both halves.
8
8
  */
9
9
  import type { Contradiction } from '../verdict/findings.js';
10
- import type { DriftReason, HealStatus, ReplayStatus, SuiteIsolation } from './flow-constants.js';
10
+ import type { DriftReason, HealStatus, ReplayStatus, SuiteIsolation, SuiteStopReason, SuiteVerdictStatus } from './flow-constants.js';
11
11
  /**
12
12
  * A legible-drift record returned when an anchor misses at replay.
13
13
  * The "whose fault is it" payload: what was expected, why it's gone, and the closest surviving
@@ -71,6 +71,14 @@ export interface ReactionDigest {
71
71
  summary: ReactionSummaryDigest;
72
72
  }
73
73
  export interface FlowStepResult {
74
+ /**
75
+ * For a sequence step: how many of its sub-steps completed with their checks held, of how many.
76
+ * A sequence is often a whole journey, so without this it scored all or nothing.
77
+ */
78
+ subSteps?: {
79
+ passed: number;
80
+ total: number;
81
+ };
74
82
  /** 0-based index of this step in the flow. */
75
83
  step: number;
76
84
  /**
@@ -237,7 +245,24 @@ export interface SuiteVerdict {
237
245
  * the regression suite — measured: a flow saved as `{steps: [], intent: "..."}`, which `flow_save`
238
246
  * had ALREADY graded assertion-free with a warning, came back "all 1 flow pass".
239
247
  */
240
- status: 'pass' | 'fail' | 'unverifiable';
248
+ status: SuiteVerdictStatus;
249
+ /**
250
+ * Flows that were selected but NOT run because the suite stopped early (`stopped` says why).
251
+ * Present only on a `partial` suite. Named rather than subtracted, so the caller knows exactly
252
+ * which flows still need a run.
253
+ */
254
+ notRun?: string[];
255
+ /**
256
+ * Why a `partial` suite ended before every selected flow ran: the total time budget ran out, or
257
+ * the browser session was lost (the tab closed or a lease expired). For a lost session `flow`
258
+ * names the flow that was running when it went, and `nextAction` names one way to reconnect.
259
+ */
260
+ stopped?: {
261
+ reason: SuiteStopReason;
262
+ flow?: string;
263
+ budgetMs?: number;
264
+ nextAction: string;
265
+ };
241
266
  total: number;
242
267
  passed: number;
243
268
  failed: number;
@@ -15,6 +15,11 @@
15
15
  */
16
16
  /** The `step` address of a finding that belongs to the whole journey, not to one step in it. */
17
17
  export declare const CROSS_STEP_ADDRESS = -1;
18
+ /**
19
+ * The one step name the browser SDK needs, on its own. A bundler keeps a whole object when one of its
20
+ * properties is read, so the SDK naming `FlowStepTool.ACT` loaded every step name into every page.
21
+ */
22
+ export declare const ACT_STEP_TOOL = "reticle_act";
18
23
  export declare const FlowStepTool: {
19
24
  readonly ACT: "reticle_act";
20
25
  readonly ACT_SEQUENCE: "reticle_act_sequence";
@@ -28,6 +33,18 @@ export declare const FlowStepTool: {
28
33
  * created to end, and a new one would have re-opened it.
29
34
  */
30
35
  readonly INVOKE: "reticle_invoke";
36
+ /**
37
+ * Open a page in the middle of a journey; `navigate` names it. The outcome of a change often shows
38
+ * only on another page (a paused short link must stop redirecting), and without this step no flow
39
+ * could reach it.
40
+ */
41
+ readonly NAVIGATE: "reticle_navigate";
42
+ /**
43
+ * Send one request to the app and judge the answer; `request` and `response` describe it. Some
44
+ * rules live only on the server (a bad value is refused with 400, a signed-out caller is refused),
45
+ * and a page that behaves can hide a server that does not.
46
+ */
47
+ readonly REQUEST: "reticle_request";
31
48
  };
32
49
  /** The companion type. It lives beside the const, so naming either one reaches only this leaf. */
33
50
  export type FlowStepTool = (typeof FlowStepTool)[keyof typeof FlowStepTool];
@@ -15,8 +15,13 @@
15
15
  */
16
16
  /** The `step` address of a finding that belongs to the whole journey, not to one step in it. */
17
17
  export const CROSS_STEP_ADDRESS = -1;
18
+ /**
19
+ * The one step name the browser SDK needs, on its own. A bundler keeps a whole object when one of its
20
+ * properties is read, so the SDK naming `FlowStepTool.ACT` loaded every step name into every page.
21
+ */
22
+ export const ACT_STEP_TOOL = 'reticle_act';
18
23
  export const FlowStepTool = {
19
- ACT: 'reticle_act',
24
+ ACT: ACT_STEP_TOOL,
20
25
  ACT_SEQUENCE: 'reticle_act_sequence',
21
26
  ACT_AND_WAIT: 'reticle_act_and_wait',
22
27
  /**
@@ -28,4 +33,16 @@ export const FlowStepTool = {
28
33
  * created to end, and a new one would have re-opened it.
29
34
  */
30
35
  INVOKE: 'reticle_invoke',
36
+ /**
37
+ * Open a page in the middle of a journey; `navigate` names it. The outcome of a change often shows
38
+ * only on another page (a paused short link must stop redirecting), and without this step no flow
39
+ * could reach it.
40
+ */
41
+ NAVIGATE: 'reticle_navigate',
42
+ /**
43
+ * Send one request to the app and judge the answer; `request` and `response` describe it. Some
44
+ * rules live only on the server (a bad value is refused with 400, a signed-out caller is refused),
45
+ * and a page that behaves can hide a server that does not.
46
+ */
47
+ REQUEST: 'reticle_request',
31
48
  };
@@ -21,6 +21,7 @@ export declare const FlowAnchorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
21
21
  kind: z.ZodLiteral<"testid">;
22
22
  value: z.ZodString;
23
23
  of: z.ZodOptional<z.ZodNumber>;
24
+ nth: z.ZodOptional<z.ZodNumber>;
24
25
  source: z.ZodOptional<z.ZodObject<{
25
26
  file: z.ZodString;
26
27
  line: z.ZodNumber;
@@ -32,6 +33,8 @@ export declare const FlowAnchorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
32
33
  name: z.ZodOptional<z.ZodString>;
33
34
  nth: z.ZodOptional<z.ZodNumber>;
34
35
  of: z.ZodOptional<z.ZodNumber>;
36
+ alsoRoles: z.ZodOptional<z.ZodArray<z.ZodString>>;
37
+ within: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
38
  }, z.core.$strip>, z.ZodObject<{
36
39
  kind: z.ZodLiteral<"signal">;
37
40
  name: z.ZodString;
@@ -45,6 +48,9 @@ export declare const FlowAnchorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
45
48
  }, z.core.$strip>>;
46
49
  role: z.ZodOptional<z.ZodString>;
47
50
  name: z.ZodOptional<z.ZodString>;
51
+ nth: z.ZodOptional<z.ZodNumber>;
52
+ of: z.ZodOptional<z.ZodNumber>;
53
+ text: z.ZodOptional<z.ZodString>;
48
54
  }, z.core.$strip>], "kind">;
49
55
  export type FlowAnchor = z.infer<typeof FlowAnchorSchema>;
50
56
  export declare const FlowPredicateSchema: z.ZodType<Predicate, unknown, z.core.$ZodTypeInternals<Predicate, unknown>>;
@@ -118,6 +124,12 @@ export interface FlowStep {
118
124
  * `timeout_ms`, so a recorded step can carry one too.
119
125
  */
120
126
  timeoutMs?: number;
127
+ /**
128
+ * The gap in ms between the sub-steps of an act_sequence driven with `burst`, which dispatches each
129
+ * one with no settle. Replay keeps that pace: a timing-sensitive page answers differently at the
130
+ * default settle, and a flow that was green live then fails on the same build (#2130).
131
+ */
132
+ burstMs?: number;
121
133
  /** The page (route pathname) this step ran on, recorded at capture. */
122
134
  page?: string;
123
135
  /** The page it ended on once its action settled — where it led, when that differs from `page`. */
@@ -132,6 +144,41 @@ export interface FlowStep {
132
144
  * repair would still have to happen in every copy, and the sub-journey could not be reused.
133
145
  */
134
146
  invoke?: string;
147
+ /**
148
+ * The page this step opens, when `tool` is `FlowStepTool.NAVIGATE`: a path on the app (`/u07`),
149
+ * or a full URL on the app's origin. Replay opens it, goes on with the page that loads, and judges
150
+ * the step's `expect` there.
151
+ */
152
+ navigate?: string;
153
+ /**
154
+ * The request this step sends, when `tool` is `FlowStepTool.REQUEST`. `url` is a path on the app
155
+ * or a full URL on its origin. It goes with the page's cookies, so as the signed-in user, unless
156
+ * `anonymous` is true. `body` is sent as it is, with `contentType` (JSON when absent).
157
+ */
158
+ request?: FlowRequest;
159
+ /** What the answer to `request` must be. Every field given must hold. */
160
+ response?: FlowResponse;
161
+ }
162
+ export interface FlowRequest {
163
+ method: string;
164
+ url: string;
165
+ body?: string;
166
+ contentType?: string;
167
+ anonymous?: boolean;
168
+ /**
169
+ * Send as ANOTHER account: the name of a secret that holds that account's `Cookie` header,
170
+ * supplied at replay (`RETICLE_SECRET_<NAME>`, or the call's `secrets`), never kept in the flow.
171
+ * A rule about who may change what can only be checked as someone else.
172
+ */
173
+ as?: string;
174
+ }
175
+ export interface FlowResponse {
176
+ /** The status code, or one of several. */
177
+ status?: number | number[];
178
+ /** A text the body must contain. */
179
+ contains?: string;
180
+ /** A text the body must not contain. */
181
+ absent?: string;
135
182
  }
136
183
  export declare const FlowStepSchema: z.ZodType<FlowStep>;
137
184
  /**
@@ -598,6 +645,7 @@ export declare const FlowFileSchema: z.ZodObject<{
598
645
  kind: z.ZodLiteral<"testid">;
599
646
  value: z.ZodString;
600
647
  of: z.ZodOptional<z.ZodNumber>;
648
+ nth: z.ZodOptional<z.ZodNumber>;
601
649
  source: z.ZodOptional<z.ZodObject<{
602
650
  file: z.ZodString;
603
651
  line: z.ZodNumber;
@@ -609,6 +657,8 @@ export declare const FlowFileSchema: z.ZodObject<{
609
657
  name: z.ZodOptional<z.ZodString>;
610
658
  nth: z.ZodOptional<z.ZodNumber>;
611
659
  of: z.ZodOptional<z.ZodNumber>;
660
+ alsoRoles: z.ZodOptional<z.ZodArray<z.ZodString>>;
661
+ within: z.ZodOptional<z.ZodArray<z.ZodString>>;
612
662
  }, z.core.$strip>, z.ZodObject<{
613
663
  kind: z.ZodLiteral<"signal">;
614
664
  name: z.ZodString;
@@ -622,6 +672,9 @@ export declare const FlowFileSchema: z.ZodObject<{
622
672
  }, z.core.$strip>>;
623
673
  role: z.ZodOptional<z.ZodString>;
624
674
  name: z.ZodOptional<z.ZodString>;
675
+ nth: z.ZodOptional<z.ZodNumber>;
676
+ of: z.ZodOptional<z.ZodNumber>;
677
+ text: z.ZodOptional<z.ZodString>;
625
678
  }, z.core.$strip>], "kind">>>;
626
679
  labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
627
680
  needs: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -1135,6 +1188,7 @@ export declare const RecordedFlowSchema: z.ZodObject<{
1135
1188
  kind: z.ZodLiteral<"testid">;
1136
1189
  value: z.ZodString;
1137
1190
  of: z.ZodOptional<z.ZodNumber>;
1191
+ nth: z.ZodOptional<z.ZodNumber>;
1138
1192
  source: z.ZodOptional<z.ZodObject<{
1139
1193
  file: z.ZodString;
1140
1194
  line: z.ZodNumber;
@@ -1146,6 +1200,8 @@ export declare const RecordedFlowSchema: z.ZodObject<{
1146
1200
  name: z.ZodOptional<z.ZodString>;
1147
1201
  nth: z.ZodOptional<z.ZodNumber>;
1148
1202
  of: z.ZodOptional<z.ZodNumber>;
1203
+ alsoRoles: z.ZodOptional<z.ZodArray<z.ZodString>>;
1204
+ within: z.ZodOptional<z.ZodArray<z.ZodString>>;
1149
1205
  }, z.core.$strip>, z.ZodObject<{
1150
1206
  kind: z.ZodLiteral<"signal">;
1151
1207
  name: z.ZodString;
@@ -1159,6 +1215,9 @@ export declare const RecordedFlowSchema: z.ZodObject<{
1159
1215
  }, z.core.$strip>>;
1160
1216
  role: z.ZodOptional<z.ZodString>;
1161
1217
  name: z.ZodOptional<z.ZodString>;
1218
+ nth: z.ZodOptional<z.ZodNumber>;
1219
+ of: z.ZodOptional<z.ZodNumber>;
1220
+ text: z.ZodOptional<z.ZodString>;
1162
1221
  }, z.core.$strip>], "kind">>>;
1163
1222
  labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
1164
1223
  needs: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -41,11 +41,15 @@ export const FlowAnchorSchema = z.discriminatedUnion('kind', [
41
41
  // How many elements carried this test id when the step was recorded, when more than one did.
42
42
  // A replay takes the first, so a shared test id is named at save instead of found as a drift.
43
43
  of: z.number().int().min(2).optional(),
44
+ // Which of them the step acted on, in page order. Honoured only while the page still has
45
+ // exactly `of` of them, as for a role anchor; otherwise the step is ambiguous (#2135).
46
+ nth: z.number().int().min(0).optional(),
44
47
  source: z
45
48
  .object({ file: z.string(), line: z.number(), column: z.number().optional() })
46
49
  .optional(),
47
50
  }),
48
- z.object({
51
+ z
52
+ .object({
49
53
  kind: z.literal(AnchorKind.ROLE),
50
54
  role: z.string().min(1),
51
55
  name: z.string().optional(),
@@ -53,6 +57,16 @@ export const FlowAnchorSchema = z.discriminatedUnion('kind', [
53
57
  // Honoured only while the page still has exactly `of` of them; otherwise the step is ambiguous.
54
58
  nth: z.number().int().min(0).optional(),
55
59
  of: z.number().int().min(2).optional(),
60
+ // Other roles that count as the same control: a spec that allows "a link or a button" is built
61
+ // either way, and one flow grades every build. A position counts in one role, so not with nth.
62
+ alsoRoles: z.array(z.string().min(1)).min(1).optional(),
63
+ // The roles of the control's nearest named containers at record time, innermost first (a button
64
+ // in an alert in a dialog: ["alert", "dialog"]). When the name finds nothing, the replay takes
65
+ // the only control of the role inside that chain; several is ambiguous, never a guess.
66
+ within: z.array(z.string().min(1)).min(1).max(3).optional(),
67
+ })
68
+ .refine((anchor) => anchor.alsoRoles === undefined || anchor.nth === undefined, {
69
+ error: '`alsoRoles` cannot be used with `nth`: a position counts the controls of one role only.',
56
70
  }),
57
71
  z.object({ kind: z.literal(AnchorKind.SIGNAL), name: z.string().min(1) }),
58
72
  // Auto-anchor: re-find an element by component identity / source location when it has no testid.
@@ -65,6 +79,13 @@ export const FlowAnchorSchema = z.discriminatedUnion('kind', [
65
79
  .optional(),
66
80
  role: z.string().optional(),
67
81
  name: z.string().optional(),
82
+ // Which of the elements this anchor matched was recorded, in page order, and how many there were.
83
+ // A list renders every item from one JSX site. Honoured only while the page has exactly `of`.
84
+ nth: z.number().int().min(0).optional(),
85
+ of: z.number().int().min(2).optional(),
86
+ // The element's own words, when it has no accessible name. A source line is the recorded
87
+ // implementation's layout; the words identify the element on any layout that keeps them.
88
+ text: z.string().min(1).max(200).optional(),
68
89
  }),
69
90
  ]);
70
91
  // A ref is one session's address. Kept, it resolves to nothing on replay — and a scope that
@@ -72,8 +93,9 @@ export const FlowAnchorSchema = z.discriminatedUnion('kind', [
72
93
  // on the one schema both the save path and the load path go through.
73
94
  export const FlowPredicateSchema = PredicateSchema.superRefine((predicate, ctx) => {
74
95
  const field = sessionBoundField(predicate);
75
- if (field === undefined)
96
+ if (field === undefined) {
76
97
  return;
98
+ }
77
99
  ctx.addIssue({
78
100
  code: z.ZodIssueCode.custom,
79
101
  message: sessionRefRefusal(field),
@@ -152,7 +174,26 @@ const baseFlowStep = z.object({
152
174
  expect: ExpectSchema.optional(),
153
175
  degraded: z.boolean().optional(),
154
176
  timeoutMs: z.number().int().nonnegative().optional(),
177
+ burstMs: z.number().nonnegative().optional(),
155
178
  invoke: z.string().min(1).optional(),
179
+ navigate: z.string().min(1).optional(),
180
+ request: z
181
+ .object({
182
+ method: z.string().min(1),
183
+ url: z.string().min(1),
184
+ body: z.string().optional(),
185
+ contentType: z.string().optional(),
186
+ anonymous: z.boolean().optional(),
187
+ as: z.string().min(1).optional(),
188
+ })
189
+ .optional(),
190
+ response: z
191
+ .object({
192
+ status: z.union([z.number().int(), z.array(z.number().int()).min(1)]).optional(),
193
+ contains: z.string().optional(),
194
+ absent: z.string().optional(),
195
+ })
196
+ .optional(),
156
197
  /** See FlowStep.page / FlowStep.endPage. */
157
198
  page: z.string().optional(),
158
199
  endPage: z.string().optional(),
@@ -377,8 +418,9 @@ export const FlowFileSchema = z.object({
377
418
  * excludes nothing, so tidying a flow back into the suite is one field.
378
419
  */
379
420
  export function isQuarantined(flow) {
380
- if (flow.status !== FlowStatus.QUARANTINED)
421
+ if (flow.status !== FlowStatus.QUARANTINED) {
381
422
  return false;
423
+ }
382
424
  const q = flow.quarantine;
383
425
  return (q !== undefined &&
384
426
  'string' === typeof q.reason &&
@@ -435,8 +477,9 @@ export function flowExpectHasConsequence(expect) {
435
477
  * false-green question — can the route commit while the view does not render? — answered first.
436
478
  */
437
479
  export function flowExpectIsPresenceOnly(expect) {
438
- if (expect === undefined || flowExpectHasConsequence(expect))
480
+ if (expect === undefined || flowExpectHasConsequence(expect)) {
439
481
  return false;
482
+ }
440
483
  // A `compare` reaching here reads text on both sides, which is two readings of the same DOM.
441
484
  return expectClauses(expect).some((clause) => PRESENCE_GRADED.has(clause.kind) || PredicateKind.COMPARE === clause.kind);
442
485
  }
@@ -448,12 +491,14 @@ export function flowExpectIsPresenceOnly(expect) {
448
491
  * probe a struct for one key per kind, and a predicate carries its kind on itself.
449
492
  */
450
493
  function expectClauses(expect) {
451
- if (expect === undefined)
494
+ if (expect === undefined) {
452
495
  return [];
496
+ }
453
497
  if (PredicateKind.ALL_OF === expect.kind || PredicateKind.ANY_OF === expect.kind) {
454
498
  return expect.predicates.flatMap(expectClauses);
455
499
  }
456
- if (PredicateKind.NOT === expect.kind)
500
+ if (PredicateKind.NOT === expect.kind) {
457
501
  return expectClauses(expect.predicate);
502
+ }
458
503
  return [expect];
459
504
  }
@@ -3,5 +3,5 @@
3
3
  * `scripts/set-version.mjs` writes the version on each release, and `version-lockstep.test.ts`
4
4
  * fails when a doc pins another tag.
5
5
  */
6
- export declare const RETICLE_ACTION_VERSION = "3.9.0";
7
- export declare const RETICLE_ACTION_USES = "reticlehq/reticle/action@v3.9.0";
6
+ export declare const RETICLE_ACTION_VERSION = "3.10.1";
7
+ export declare const RETICLE_ACTION_USES = "reticlehq/reticle/action@v3.10.1";
@@ -3,5 +3,5 @@
3
3
  * `scripts/set-version.mjs` writes the version on each release, and `version-lockstep.test.ts`
4
4
  * fails when a doc pins another tag.
5
5
  */
6
- export const RETICLE_ACTION_VERSION = '3.9.0';
6
+ export const RETICLE_ACTION_VERSION = '3.10.1';
7
7
  export const RETICLE_ACTION_USES = `reticlehq/reticle/action@v${RETICLE_ACTION_VERSION}`;
package/dist/index.d.ts CHANGED
@@ -25,7 +25,9 @@ export * from './artifacts/flow-unreached.js';
25
25
  export * from './artifacts/flow-mutation-target.js';
26
26
  export * from './graph/app-graph.js';
27
27
  export * from './wire/constants/constants.js';
28
+ export * from './wire/constants/animation-command.js';
28
29
  export * from './wire/constants/response-body-reason.js';
30
+ export * from './wire/constants/console-event.js';
29
31
  export * from './identity/source-constants.js';
30
32
  export * from './identity/testid-attribute.js';
31
33
  export * from './identity/github-action.js';
@@ -43,6 +45,7 @@ export * from './wire/constants/reticle-chrome.js';
43
45
  export * from './wire/platform-link.js';
44
46
  export * from './wire/constants/match-args.js';
45
47
  export * from './wire/constants/discovery.js';
48
+ export * from './wire/constants/determinism.js';
46
49
  export * from './identity/document-identity.js';
47
50
  export * from './identity/edit-epoch.js';
48
51
  export * from './wire/messages.js';
package/dist/index.js CHANGED
@@ -26,7 +26,9 @@ export * from './artifacts/flow-unreached.js'; // unreachedRoutes — known rout
26
26
  export * from './artifacts/flow-mutation-target.js'; // what a flow says it depends on: mutationTargetsFor + perturbationFor
27
27
  export * from './graph/app-graph.js'; // the App Graph: an app as screens, actions, requests; one fold for cloud and daemon
28
28
  export * from './wire/constants/constants.js'; // EventType, ActionType, wire constants, TRANSPORT_LIMITS, …
29
+ export * from './wire/constants/animation-command.js'; // reticle_animations argument names
29
30
  export * from './wire/constants/response-body-reason.js'; // why a NET_REQUEST carries no response body (#1520)
31
+ export * from './wire/constants/console-event.js'; // console payload fields (CONSOLE_EVENT) and the pre-attach error buffer (#1540)
30
32
  export * from './identity/source-constants.js'; // DATA_RETICLE_SOURCE_ATTR, RETICLE_ROOT_GLOBAL
31
33
  export * from './identity/testid-attribute.js'; // DEFAULT_TESTID_ATTR, ALTERNATIVE_TESTID_ATTRS
32
34
  export * from './identity/github-action.js'; // RETICLE_ACTION_USES — the Action tag docs and cloud print
@@ -45,6 +47,7 @@ export * from './wire/constants/reticle-chrome.js'; // Reticle's own UI, hidden
45
47
  export * from './wire/platform-link.js'; // daemon <-> platform: capabilities, drive spec, tool session
46
48
  export * from './wire/constants/match-args.js'; // the arguments of the `match` command
47
49
  export * from './wire/constants/discovery.js'; // the call-the-founder invitation, one link for every surface
50
+ export * from './wire/constants/determinism.js'; // the clock and random source of a deterministic lease
48
51
  export * from './identity/document-identity.js'; // which document an observation belongs to
49
52
  export * from './identity/edit-epoch.js'; // which round of source edits an observation belongs to
50
53
  export * from './wire/messages.js'; // ReticleEvent + the message schemas
@@ -22,6 +22,7 @@
22
22
  "dom.text",
23
23
  "net.request",
24
24
  "net.pending",
25
+ "net.unpatched",
25
26
  "net.stream",
26
27
  "perf",
27
28
  "route.change",
@@ -62,6 +62,13 @@
62
62
  },
63
63
  "initial": {
64
64
  "type": "boolean"
65
+ },
66
+ "live": {
67
+ "type": "string",
68
+ "enum": [
69
+ "assertive",
70
+ "polite"
71
+ ]
65
72
  }
66
73
  },
67
74
  "required": [
@@ -101,6 +108,9 @@
101
108
  },
102
109
  "requestShape": {
103
110
  "type": "string"
111
+ },
112
+ "fromDepartedDocument": {
113
+ "type": "boolean"
104
114
  }
105
115
  },
106
116
  "required": [
@@ -132,6 +142,12 @@
132
142
  },
133
143
  "urlRaw": {
134
144
  "type": "string"
145
+ },
146
+ "fromDepartedDocument": {
147
+ "type": "boolean"
148
+ },
149
+ "pageUnloaded": {
150
+ "type": "boolean"
135
151
  }
136
152
  },
137
153
  "required": [
@@ -141,6 +157,29 @@
141
157
  "initiator"
142
158
  ]
143
159
  },
160
+ "net.unpatched": {
161
+ "$schema": "http://json-schema.org/draft-07/schema#",
162
+ "type": "object",
163
+ "properties": {
164
+ "url": {
165
+ "type": "string"
166
+ },
167
+ "urlRaw": {
168
+ "type": "string"
169
+ },
170
+ "initiator": {
171
+ "type": "string"
172
+ },
173
+ "status": {
174
+ "type": "number"
175
+ }
176
+ },
177
+ "required": [
178
+ "url",
179
+ "initiator"
180
+ ],
181
+ "additionalProperties": {}
182
+ },
144
183
  "net.stream": {
145
184
  "$schema": "http://json-schema.org/draft-07/schema#",
146
185
  "type": "object",
@@ -223,6 +262,9 @@
223
262
  "at": {
224
263
  "type": "number"
225
264
  },
265
+ "shift": {
266
+ "type": "number"
267
+ },
226
268
  "shifted": {
227
269
  "type": "object",
228
270
  "properties": {
@@ -717,7 +759,8 @@
717
759
  "wrapped-network",
718
760
  "unobserved-ipc",
719
761
  "verdictless-send",
720
- "unwatched-state"
762
+ "unwatched-state",
763
+ "canvas-paint-unobserved"
721
764
  ]
722
765
  },
723
766
  "count": {
@@ -1046,6 +1089,9 @@
1046
1089
  "poll",
1047
1090
  "act"
1048
1091
  ]
1092
+ },
1093
+ "visible": {
1094
+ "type": "boolean"
1049
1095
  }
1050
1096
  },
1051
1097
  "required": [
@@ -9,6 +9,7 @@
9
9
  "dom.text",
10
10
  "net.request",
11
11
  "net.pending",
12
+ "net.unpatched",
12
13
  "net.stream",
13
14
  "perf",
14
15
  "route.change",
@@ -15,6 +15,7 @@
15
15
  "dom.text",
16
16
  "net.request",
17
17
  "net.pending",
18
+ "net.unpatched",
18
19
  "net.stream",
19
20
  "perf",
20
21
  "route.change",
@@ -288,6 +288,7 @@
288
288
  "dom.text",
289
289
  "net.request",
290
290
  "net.pending",
291
+ "net.unpatched",
291
292
  "net.stream",
292
293
  "perf",
293
294
  "route.change",