@syntrologie/adapt-nav 2.3.0 → 2.4.0-canary.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/schema.d.ts CHANGED
@@ -46,43 +46,365 @@ export declare const NavTipSchema: z.ZodEffects<z.ZodObject<{
46
46
  showWhen: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
47
47
  type: z.ZodLiteral<"rules">;
48
48
  rules: z.ZodArray<z.ZodObject<{
49
- conditions: z.ZodArray<z.ZodObject<{
50
- type: z.ZodString;
51
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
52
- type: z.ZodString;
53
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
54
- type: z.ZodString;
55
- }, z.ZodTypeAny, "passthrough">>, "many">;
49
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
50
+ type: z.ZodLiteral<"page_url">;
51
+ url: z.ZodString;
52
+ }, "strip", z.ZodTypeAny, {
53
+ type: "page_url";
54
+ url: string;
55
+ }, {
56
+ type: "page_url";
57
+ url: string;
58
+ }>, z.ZodObject<{
59
+ type: z.ZodLiteral<"route">;
60
+ routeId: z.ZodString;
61
+ }, "strip", z.ZodTypeAny, {
62
+ type: "route";
63
+ routeId: string;
64
+ }, {
65
+ type: "route";
66
+ routeId: string;
67
+ }>, z.ZodObject<{
68
+ type: z.ZodLiteral<"anchor_visible">;
69
+ anchorId: z.ZodString;
70
+ state: z.ZodEnum<["visible", "present", "absent"]>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ type: "anchor_visible";
73
+ anchorId: string;
74
+ state: "visible" | "present" | "absent";
75
+ }, {
76
+ type: "anchor_visible";
77
+ anchorId: string;
78
+ state: "visible" | "present" | "absent";
79
+ }>, z.ZodObject<{
80
+ type: z.ZodLiteral<"event_occurred">;
81
+ eventName: z.ZodString;
82
+ withinMs: z.ZodOptional<z.ZodNumber>;
83
+ }, "strip", z.ZodTypeAny, {
84
+ type: "event_occurred";
85
+ eventName: string;
86
+ withinMs?: number | undefined;
87
+ }, {
88
+ type: "event_occurred";
89
+ eventName: string;
90
+ withinMs?: number | undefined;
91
+ }>, z.ZodObject<{
92
+ type: z.ZodLiteral<"state_equals">;
93
+ key: z.ZodString;
94
+ value: z.ZodUnknown;
95
+ }, "strip", z.ZodTypeAny, {
96
+ type: "state_equals";
97
+ key: string;
98
+ value?: unknown;
99
+ }, {
100
+ type: "state_equals";
101
+ key: string;
102
+ value?: unknown;
103
+ }>, z.ZodObject<{
104
+ type: z.ZodLiteral<"viewport">;
105
+ minWidth: z.ZodOptional<z.ZodNumber>;
106
+ maxWidth: z.ZodOptional<z.ZodNumber>;
107
+ minHeight: z.ZodOptional<z.ZodNumber>;
108
+ maxHeight: z.ZodOptional<z.ZodNumber>;
109
+ }, "strip", z.ZodTypeAny, {
110
+ type: "viewport";
111
+ minWidth?: number | undefined;
112
+ maxWidth?: number | undefined;
113
+ minHeight?: number | undefined;
114
+ maxHeight?: number | undefined;
115
+ }, {
116
+ type: "viewport";
117
+ minWidth?: number | undefined;
118
+ maxWidth?: number | undefined;
119
+ minHeight?: number | undefined;
120
+ maxHeight?: number | undefined;
121
+ }>, z.ZodObject<{
122
+ type: z.ZodLiteral<"session_metric">;
123
+ key: z.ZodString;
124
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
125
+ threshold: z.ZodNumber;
126
+ }, "strip", z.ZodTypeAny, {
127
+ type: "session_metric";
128
+ key: string;
129
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
130
+ threshold: number;
131
+ }, {
132
+ type: "session_metric";
133
+ key: string;
134
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
135
+ threshold: number;
136
+ }>, z.ZodObject<{
137
+ type: z.ZodLiteral<"dismissed">;
138
+ key: z.ZodString;
139
+ inverted: z.ZodOptional<z.ZodBoolean>;
140
+ }, "strip", z.ZodTypeAny, {
141
+ type: "dismissed";
142
+ key: string;
143
+ inverted?: boolean | undefined;
144
+ }, {
145
+ type: "dismissed";
146
+ key: string;
147
+ inverted?: boolean | undefined;
148
+ }>, z.ZodObject<{
149
+ type: z.ZodLiteral<"cooldown_active">;
150
+ key: z.ZodString;
151
+ inverted: z.ZodOptional<z.ZodBoolean>;
152
+ }, "strip", z.ZodTypeAny, {
153
+ type: "cooldown_active";
154
+ key: string;
155
+ inverted?: boolean | undefined;
156
+ }, {
157
+ type: "cooldown_active";
158
+ key: string;
159
+ inverted?: boolean | undefined;
160
+ }>, z.ZodObject<{
161
+ type: z.ZodLiteral<"frequency_limit">;
162
+ key: z.ZodString;
163
+ limit: z.ZodNumber;
164
+ inverted: z.ZodOptional<z.ZodBoolean>;
165
+ }, "strip", z.ZodTypeAny, {
166
+ type: "frequency_limit";
167
+ key: string;
168
+ limit: number;
169
+ inverted?: boolean | undefined;
170
+ }, {
171
+ type: "frequency_limit";
172
+ key: string;
173
+ limit: number;
174
+ inverted?: boolean | undefined;
175
+ }>, z.ZodObject<{
176
+ type: z.ZodLiteral<"event_count">;
177
+ key: z.ZodString;
178
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
179
+ count: z.ZodNumber;
180
+ withinMs: z.ZodOptional<z.ZodNumber>;
181
+ }, "strip", z.ZodTypeAny, {
182
+ type: "event_count";
183
+ key: string;
184
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
185
+ count: number;
186
+ withinMs?: number | undefined;
187
+ }, {
188
+ type: "event_count";
189
+ key: string;
190
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
191
+ count: number;
192
+ withinMs?: number | undefined;
193
+ }>]>, "many">;
56
194
  value: z.ZodUnknown;
57
195
  }, "strip", z.ZodTypeAny, {
58
- conditions: z.objectOutputType<{
59
- type: z.ZodString;
60
- }, z.ZodTypeAny, "passthrough">[];
196
+ conditions: ({
197
+ type: "page_url";
198
+ url: string;
199
+ } | {
200
+ type: "route";
201
+ routeId: string;
202
+ } | {
203
+ type: "anchor_visible";
204
+ anchorId: string;
205
+ state: "visible" | "present" | "absent";
206
+ } | {
207
+ type: "event_occurred";
208
+ eventName: string;
209
+ withinMs?: number | undefined;
210
+ } | {
211
+ type: "state_equals";
212
+ key: string;
213
+ value?: unknown;
214
+ } | {
215
+ type: "viewport";
216
+ minWidth?: number | undefined;
217
+ maxWidth?: number | undefined;
218
+ minHeight?: number | undefined;
219
+ maxHeight?: number | undefined;
220
+ } | {
221
+ type: "session_metric";
222
+ key: string;
223
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
224
+ threshold: number;
225
+ } | {
226
+ type: "dismissed";
227
+ key: string;
228
+ inverted?: boolean | undefined;
229
+ } | {
230
+ type: "cooldown_active";
231
+ key: string;
232
+ inverted?: boolean | undefined;
233
+ } | {
234
+ type: "frequency_limit";
235
+ key: string;
236
+ limit: number;
237
+ inverted?: boolean | undefined;
238
+ } | {
239
+ type: "event_count";
240
+ key: string;
241
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
242
+ count: number;
243
+ withinMs?: number | undefined;
244
+ })[];
61
245
  value?: unknown;
62
246
  }, {
63
- conditions: z.objectInputType<{
64
- type: z.ZodString;
65
- }, z.ZodTypeAny, "passthrough">[];
247
+ conditions: ({
248
+ type: "page_url";
249
+ url: string;
250
+ } | {
251
+ type: "route";
252
+ routeId: string;
253
+ } | {
254
+ type: "anchor_visible";
255
+ anchorId: string;
256
+ state: "visible" | "present" | "absent";
257
+ } | {
258
+ type: "event_occurred";
259
+ eventName: string;
260
+ withinMs?: number | undefined;
261
+ } | {
262
+ type: "state_equals";
263
+ key: string;
264
+ value?: unknown;
265
+ } | {
266
+ type: "viewport";
267
+ minWidth?: number | undefined;
268
+ maxWidth?: number | undefined;
269
+ minHeight?: number | undefined;
270
+ maxHeight?: number | undefined;
271
+ } | {
272
+ type: "session_metric";
273
+ key: string;
274
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
275
+ threshold: number;
276
+ } | {
277
+ type: "dismissed";
278
+ key: string;
279
+ inverted?: boolean | undefined;
280
+ } | {
281
+ type: "cooldown_active";
282
+ key: string;
283
+ inverted?: boolean | undefined;
284
+ } | {
285
+ type: "frequency_limit";
286
+ key: string;
287
+ limit: number;
288
+ inverted?: boolean | undefined;
289
+ } | {
290
+ type: "event_count";
291
+ key: string;
292
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
293
+ count: number;
294
+ withinMs?: number | undefined;
295
+ })[];
66
296
  value?: unknown;
67
297
  }>, "many">;
68
298
  default: z.ZodUnknown;
69
299
  }, "strip", z.ZodTypeAny, {
300
+ type: "rules";
70
301
  rules: {
71
- conditions: z.objectOutputType<{
72
- type: z.ZodString;
73
- }, z.ZodTypeAny, "passthrough">[];
302
+ conditions: ({
303
+ type: "page_url";
304
+ url: string;
305
+ } | {
306
+ type: "route";
307
+ routeId: string;
308
+ } | {
309
+ type: "anchor_visible";
310
+ anchorId: string;
311
+ state: "visible" | "present" | "absent";
312
+ } | {
313
+ type: "event_occurred";
314
+ eventName: string;
315
+ withinMs?: number | undefined;
316
+ } | {
317
+ type: "state_equals";
318
+ key: string;
319
+ value?: unknown;
320
+ } | {
321
+ type: "viewport";
322
+ minWidth?: number | undefined;
323
+ maxWidth?: number | undefined;
324
+ minHeight?: number | undefined;
325
+ maxHeight?: number | undefined;
326
+ } | {
327
+ type: "session_metric";
328
+ key: string;
329
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
330
+ threshold: number;
331
+ } | {
332
+ type: "dismissed";
333
+ key: string;
334
+ inverted?: boolean | undefined;
335
+ } | {
336
+ type: "cooldown_active";
337
+ key: string;
338
+ inverted?: boolean | undefined;
339
+ } | {
340
+ type: "frequency_limit";
341
+ key: string;
342
+ limit: number;
343
+ inverted?: boolean | undefined;
344
+ } | {
345
+ type: "event_count";
346
+ key: string;
347
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
348
+ count: number;
349
+ withinMs?: number | undefined;
350
+ })[];
74
351
  value?: unknown;
75
352
  }[];
76
- type: "rules";
77
353
  default?: unknown;
78
354
  }, {
355
+ type: "rules";
79
356
  rules: {
80
- conditions: z.objectInputType<{
81
- type: z.ZodString;
82
- }, z.ZodTypeAny, "passthrough">[];
357
+ conditions: ({
358
+ type: "page_url";
359
+ url: string;
360
+ } | {
361
+ type: "route";
362
+ routeId: string;
363
+ } | {
364
+ type: "anchor_visible";
365
+ anchorId: string;
366
+ state: "visible" | "present" | "absent";
367
+ } | {
368
+ type: "event_occurred";
369
+ eventName: string;
370
+ withinMs?: number | undefined;
371
+ } | {
372
+ type: "state_equals";
373
+ key: string;
374
+ value?: unknown;
375
+ } | {
376
+ type: "viewport";
377
+ minWidth?: number | undefined;
378
+ maxWidth?: number | undefined;
379
+ minHeight?: number | undefined;
380
+ maxHeight?: number | undefined;
381
+ } | {
382
+ type: "session_metric";
383
+ key: string;
384
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
385
+ threshold: number;
386
+ } | {
387
+ type: "dismissed";
388
+ key: string;
389
+ inverted?: boolean | undefined;
390
+ } | {
391
+ type: "cooldown_active";
392
+ key: string;
393
+ inverted?: boolean | undefined;
394
+ } | {
395
+ type: "frequency_limit";
396
+ key: string;
397
+ limit: number;
398
+ inverted?: boolean | undefined;
399
+ } | {
400
+ type: "event_count";
401
+ key: string;
402
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
403
+ count: number;
404
+ withinMs?: number | undefined;
405
+ })[];
83
406
  value?: unknown;
84
407
  }[];
85
- type: "rules";
86
408
  default?: unknown;
87
409
  }>, z.ZodObject<{
88
410
  type: z.ZodLiteral<"score">;
@@ -146,12 +468,12 @@ export declare const NavTipSchema: z.ZodEffects<z.ZodObject<{
146
468
  icon: z.ZodOptional<z.ZodString>;
147
469
  }, "strip", z.ZodTypeAny, {
148
470
  title?: string | undefined;
149
- icon?: string | undefined;
150
471
  body?: string | undefined;
472
+ icon?: string | undefined;
151
473
  }, {
152
474
  title?: string | undefined;
153
- icon?: string | undefined;
154
475
  body?: string | undefined;
476
+ icon?: string | undefined;
155
477
  }>>>;
156
478
  /** AI-generated reasoning for why this tip was recommended */
157
479
  rationale: z.ZodOptional<z.ZodObject<{
@@ -176,13 +498,59 @@ export declare const NavTipSchema: z.ZodEffects<z.ZodObject<{
176
498
  category?: string | undefined;
177
499
  };
178
500
  showWhen?: {
501
+ type: "rules";
179
502
  rules: {
180
- conditions: z.objectOutputType<{
181
- type: z.ZodString;
182
- }, z.ZodTypeAny, "passthrough">[];
503
+ conditions: ({
504
+ type: "page_url";
505
+ url: string;
506
+ } | {
507
+ type: "route";
508
+ routeId: string;
509
+ } | {
510
+ type: "anchor_visible";
511
+ anchorId: string;
512
+ state: "visible" | "present" | "absent";
513
+ } | {
514
+ type: "event_occurred";
515
+ eventName: string;
516
+ withinMs?: number | undefined;
517
+ } | {
518
+ type: "state_equals";
519
+ key: string;
520
+ value?: unknown;
521
+ } | {
522
+ type: "viewport";
523
+ minWidth?: number | undefined;
524
+ maxWidth?: number | undefined;
525
+ minHeight?: number | undefined;
526
+ maxHeight?: number | undefined;
527
+ } | {
528
+ type: "session_metric";
529
+ key: string;
530
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
531
+ threshold: number;
532
+ } | {
533
+ type: "dismissed";
534
+ key: string;
535
+ inverted?: boolean | undefined;
536
+ } | {
537
+ type: "cooldown_active";
538
+ key: string;
539
+ inverted?: boolean | undefined;
540
+ } | {
541
+ type: "frequency_limit";
542
+ key: string;
543
+ limit: number;
544
+ inverted?: boolean | undefined;
545
+ } | {
546
+ type: "event_count";
547
+ key: string;
548
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
549
+ count: number;
550
+ withinMs?: number | undefined;
551
+ })[];
183
552
  value?: unknown;
184
553
  }[];
185
- type: "rules";
186
554
  default?: unknown;
187
555
  } | {
188
556
  type: "score";
@@ -205,8 +573,8 @@ export declare const NavTipSchema: z.ZodEffects<z.ZodObject<{
205
573
  } | null | undefined;
206
574
  notify?: {
207
575
  title?: string | undefined;
208
- icon?: string | undefined;
209
576
  body?: string | undefined;
577
+ icon?: string | undefined;
210
578
  } | null | undefined;
211
579
  rationale?: {
212
580
  why: string;
@@ -224,13 +592,59 @@ export declare const NavTipSchema: z.ZodEffects<z.ZodObject<{
224
592
  category?: string | undefined;
225
593
  };
226
594
  showWhen?: {
595
+ type: "rules";
227
596
  rules: {
228
- conditions: z.objectInputType<{
229
- type: z.ZodString;
230
- }, z.ZodTypeAny, "passthrough">[];
597
+ conditions: ({
598
+ type: "page_url";
599
+ url: string;
600
+ } | {
601
+ type: "route";
602
+ routeId: string;
603
+ } | {
604
+ type: "anchor_visible";
605
+ anchorId: string;
606
+ state: "visible" | "present" | "absent";
607
+ } | {
608
+ type: "event_occurred";
609
+ eventName: string;
610
+ withinMs?: number | undefined;
611
+ } | {
612
+ type: "state_equals";
613
+ key: string;
614
+ value?: unknown;
615
+ } | {
616
+ type: "viewport";
617
+ minWidth?: number | undefined;
618
+ maxWidth?: number | undefined;
619
+ minHeight?: number | undefined;
620
+ maxHeight?: number | undefined;
621
+ } | {
622
+ type: "session_metric";
623
+ key: string;
624
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
625
+ threshold: number;
626
+ } | {
627
+ type: "dismissed";
628
+ key: string;
629
+ inverted?: boolean | undefined;
630
+ } | {
631
+ type: "cooldown_active";
632
+ key: string;
633
+ inverted?: boolean | undefined;
634
+ } | {
635
+ type: "frequency_limit";
636
+ key: string;
637
+ limit: number;
638
+ inverted?: boolean | undefined;
639
+ } | {
640
+ type: "event_count";
641
+ key: string;
642
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
643
+ count: number;
644
+ withinMs?: number | undefined;
645
+ })[];
231
646
  value?: unknown;
232
647
  }[];
233
- type: "rules";
234
648
  default?: unknown;
235
649
  } | {
236
650
  type: "score";
@@ -253,8 +667,8 @@ export declare const NavTipSchema: z.ZodEffects<z.ZodObject<{
253
667
  } | null | undefined;
254
668
  notify?: {
255
669
  title?: string | undefined;
256
- icon?: string | undefined;
257
670
  body?: string | undefined;
671
+ icon?: string | undefined;
258
672
  } | null | undefined;
259
673
  rationale?: {
260
674
  why: string;
@@ -272,13 +686,59 @@ export declare const NavTipSchema: z.ZodEffects<z.ZodObject<{
272
686
  category?: string | undefined;
273
687
  };
274
688
  showWhen?: {
689
+ type: "rules";
275
690
  rules: {
276
- conditions: z.objectOutputType<{
277
- type: z.ZodString;
278
- }, z.ZodTypeAny, "passthrough">[];
691
+ conditions: ({
692
+ type: "page_url";
693
+ url: string;
694
+ } | {
695
+ type: "route";
696
+ routeId: string;
697
+ } | {
698
+ type: "anchor_visible";
699
+ anchorId: string;
700
+ state: "visible" | "present" | "absent";
701
+ } | {
702
+ type: "event_occurred";
703
+ eventName: string;
704
+ withinMs?: number | undefined;
705
+ } | {
706
+ type: "state_equals";
707
+ key: string;
708
+ value?: unknown;
709
+ } | {
710
+ type: "viewport";
711
+ minWidth?: number | undefined;
712
+ maxWidth?: number | undefined;
713
+ minHeight?: number | undefined;
714
+ maxHeight?: number | undefined;
715
+ } | {
716
+ type: "session_metric";
717
+ key: string;
718
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
719
+ threshold: number;
720
+ } | {
721
+ type: "dismissed";
722
+ key: string;
723
+ inverted?: boolean | undefined;
724
+ } | {
725
+ type: "cooldown_active";
726
+ key: string;
727
+ inverted?: boolean | undefined;
728
+ } | {
729
+ type: "frequency_limit";
730
+ key: string;
731
+ limit: number;
732
+ inverted?: boolean | undefined;
733
+ } | {
734
+ type: "event_count";
735
+ key: string;
736
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
737
+ count: number;
738
+ withinMs?: number | undefined;
739
+ })[];
279
740
  value?: unknown;
280
741
  }[];
281
- type: "rules";
282
742
  default?: unknown;
283
743
  } | {
284
744
  type: "score";
@@ -301,8 +761,8 @@ export declare const NavTipSchema: z.ZodEffects<z.ZodObject<{
301
761
  } | null | undefined;
302
762
  notify?: {
303
763
  title?: string | undefined;
304
- icon?: string | undefined;
305
764
  body?: string | undefined;
765
+ icon?: string | undefined;
306
766
  } | null | undefined;
307
767
  rationale?: {
308
768
  why: string;
@@ -320,13 +780,59 @@ export declare const NavTipSchema: z.ZodEffects<z.ZodObject<{
320
780
  category?: string | undefined;
321
781
  };
322
782
  showWhen?: {
783
+ type: "rules";
323
784
  rules: {
324
- conditions: z.objectInputType<{
325
- type: z.ZodString;
326
- }, z.ZodTypeAny, "passthrough">[];
785
+ conditions: ({
786
+ type: "page_url";
787
+ url: string;
788
+ } | {
789
+ type: "route";
790
+ routeId: string;
791
+ } | {
792
+ type: "anchor_visible";
793
+ anchorId: string;
794
+ state: "visible" | "present" | "absent";
795
+ } | {
796
+ type: "event_occurred";
797
+ eventName: string;
798
+ withinMs?: number | undefined;
799
+ } | {
800
+ type: "state_equals";
801
+ key: string;
802
+ value?: unknown;
803
+ } | {
804
+ type: "viewport";
805
+ minWidth?: number | undefined;
806
+ maxWidth?: number | undefined;
807
+ minHeight?: number | undefined;
808
+ maxHeight?: number | undefined;
809
+ } | {
810
+ type: "session_metric";
811
+ key: string;
812
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
813
+ threshold: number;
814
+ } | {
815
+ type: "dismissed";
816
+ key: string;
817
+ inverted?: boolean | undefined;
818
+ } | {
819
+ type: "cooldown_active";
820
+ key: string;
821
+ inverted?: boolean | undefined;
822
+ } | {
823
+ type: "frequency_limit";
824
+ key: string;
825
+ limit: number;
826
+ inverted?: boolean | undefined;
827
+ } | {
828
+ type: "event_count";
829
+ key: string;
830
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
831
+ count: number;
832
+ withinMs?: number | undefined;
833
+ })[];
327
834
  value?: unknown;
328
835
  }[];
329
- type: "rules";
330
836
  default?: unknown;
331
837
  } | {
332
838
  type: "score";
@@ -349,8 +855,8 @@ export declare const NavTipSchema: z.ZodEffects<z.ZodObject<{
349
855
  } | null | undefined;
350
856
  notify?: {
351
857
  title?: string | undefined;
352
- icon?: string | undefined;
353
858
  body?: string | undefined;
859
+ icon?: string | undefined;
354
860
  } | null | undefined;
355
861
  rationale?: {
356
862
  why: string;
@@ -397,43 +903,365 @@ export declare const NavLinkSchema: z.ZodEffects<z.ZodObject<{
397
903
  showWhen: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
398
904
  type: z.ZodLiteral<"rules">;
399
905
  rules: z.ZodArray<z.ZodObject<{
400
- conditions: z.ZodArray<z.ZodObject<{
401
- type: z.ZodString;
402
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
403
- type: z.ZodString;
404
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
405
- type: z.ZodString;
406
- }, z.ZodTypeAny, "passthrough">>, "many">;
906
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
907
+ type: z.ZodLiteral<"page_url">;
908
+ url: z.ZodString;
909
+ }, "strip", z.ZodTypeAny, {
910
+ type: "page_url";
911
+ url: string;
912
+ }, {
913
+ type: "page_url";
914
+ url: string;
915
+ }>, z.ZodObject<{
916
+ type: z.ZodLiteral<"route">;
917
+ routeId: z.ZodString;
918
+ }, "strip", z.ZodTypeAny, {
919
+ type: "route";
920
+ routeId: string;
921
+ }, {
922
+ type: "route";
923
+ routeId: string;
924
+ }>, z.ZodObject<{
925
+ type: z.ZodLiteral<"anchor_visible">;
926
+ anchorId: z.ZodString;
927
+ state: z.ZodEnum<["visible", "present", "absent"]>;
928
+ }, "strip", z.ZodTypeAny, {
929
+ type: "anchor_visible";
930
+ anchorId: string;
931
+ state: "visible" | "present" | "absent";
932
+ }, {
933
+ type: "anchor_visible";
934
+ anchorId: string;
935
+ state: "visible" | "present" | "absent";
936
+ }>, z.ZodObject<{
937
+ type: z.ZodLiteral<"event_occurred">;
938
+ eventName: z.ZodString;
939
+ withinMs: z.ZodOptional<z.ZodNumber>;
940
+ }, "strip", z.ZodTypeAny, {
941
+ type: "event_occurred";
942
+ eventName: string;
943
+ withinMs?: number | undefined;
944
+ }, {
945
+ type: "event_occurred";
946
+ eventName: string;
947
+ withinMs?: number | undefined;
948
+ }>, z.ZodObject<{
949
+ type: z.ZodLiteral<"state_equals">;
950
+ key: z.ZodString;
951
+ value: z.ZodUnknown;
952
+ }, "strip", z.ZodTypeAny, {
953
+ type: "state_equals";
954
+ key: string;
955
+ value?: unknown;
956
+ }, {
957
+ type: "state_equals";
958
+ key: string;
959
+ value?: unknown;
960
+ }>, z.ZodObject<{
961
+ type: z.ZodLiteral<"viewport">;
962
+ minWidth: z.ZodOptional<z.ZodNumber>;
963
+ maxWidth: z.ZodOptional<z.ZodNumber>;
964
+ minHeight: z.ZodOptional<z.ZodNumber>;
965
+ maxHeight: z.ZodOptional<z.ZodNumber>;
966
+ }, "strip", z.ZodTypeAny, {
967
+ type: "viewport";
968
+ minWidth?: number | undefined;
969
+ maxWidth?: number | undefined;
970
+ minHeight?: number | undefined;
971
+ maxHeight?: number | undefined;
972
+ }, {
973
+ type: "viewport";
974
+ minWidth?: number | undefined;
975
+ maxWidth?: number | undefined;
976
+ minHeight?: number | undefined;
977
+ maxHeight?: number | undefined;
978
+ }>, z.ZodObject<{
979
+ type: z.ZodLiteral<"session_metric">;
980
+ key: z.ZodString;
981
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
982
+ threshold: z.ZodNumber;
983
+ }, "strip", z.ZodTypeAny, {
984
+ type: "session_metric";
985
+ key: string;
986
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
987
+ threshold: number;
988
+ }, {
989
+ type: "session_metric";
990
+ key: string;
991
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
992
+ threshold: number;
993
+ }>, z.ZodObject<{
994
+ type: z.ZodLiteral<"dismissed">;
995
+ key: z.ZodString;
996
+ inverted: z.ZodOptional<z.ZodBoolean>;
997
+ }, "strip", z.ZodTypeAny, {
998
+ type: "dismissed";
999
+ key: string;
1000
+ inverted?: boolean | undefined;
1001
+ }, {
1002
+ type: "dismissed";
1003
+ key: string;
1004
+ inverted?: boolean | undefined;
1005
+ }>, z.ZodObject<{
1006
+ type: z.ZodLiteral<"cooldown_active">;
1007
+ key: z.ZodString;
1008
+ inverted: z.ZodOptional<z.ZodBoolean>;
1009
+ }, "strip", z.ZodTypeAny, {
1010
+ type: "cooldown_active";
1011
+ key: string;
1012
+ inverted?: boolean | undefined;
1013
+ }, {
1014
+ type: "cooldown_active";
1015
+ key: string;
1016
+ inverted?: boolean | undefined;
1017
+ }>, z.ZodObject<{
1018
+ type: z.ZodLiteral<"frequency_limit">;
1019
+ key: z.ZodString;
1020
+ limit: z.ZodNumber;
1021
+ inverted: z.ZodOptional<z.ZodBoolean>;
1022
+ }, "strip", z.ZodTypeAny, {
1023
+ type: "frequency_limit";
1024
+ key: string;
1025
+ limit: number;
1026
+ inverted?: boolean | undefined;
1027
+ }, {
1028
+ type: "frequency_limit";
1029
+ key: string;
1030
+ limit: number;
1031
+ inverted?: boolean | undefined;
1032
+ }>, z.ZodObject<{
1033
+ type: z.ZodLiteral<"event_count">;
1034
+ key: z.ZodString;
1035
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1036
+ count: z.ZodNumber;
1037
+ withinMs: z.ZodOptional<z.ZodNumber>;
1038
+ }, "strip", z.ZodTypeAny, {
1039
+ type: "event_count";
1040
+ key: string;
1041
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1042
+ count: number;
1043
+ withinMs?: number | undefined;
1044
+ }, {
1045
+ type: "event_count";
1046
+ key: string;
1047
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1048
+ count: number;
1049
+ withinMs?: number | undefined;
1050
+ }>]>, "many">;
407
1051
  value: z.ZodUnknown;
408
1052
  }, "strip", z.ZodTypeAny, {
409
- conditions: z.objectOutputType<{
410
- type: z.ZodString;
411
- }, z.ZodTypeAny, "passthrough">[];
1053
+ conditions: ({
1054
+ type: "page_url";
1055
+ url: string;
1056
+ } | {
1057
+ type: "route";
1058
+ routeId: string;
1059
+ } | {
1060
+ type: "anchor_visible";
1061
+ anchorId: string;
1062
+ state: "visible" | "present" | "absent";
1063
+ } | {
1064
+ type: "event_occurred";
1065
+ eventName: string;
1066
+ withinMs?: number | undefined;
1067
+ } | {
1068
+ type: "state_equals";
1069
+ key: string;
1070
+ value?: unknown;
1071
+ } | {
1072
+ type: "viewport";
1073
+ minWidth?: number | undefined;
1074
+ maxWidth?: number | undefined;
1075
+ minHeight?: number | undefined;
1076
+ maxHeight?: number | undefined;
1077
+ } | {
1078
+ type: "session_metric";
1079
+ key: string;
1080
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1081
+ threshold: number;
1082
+ } | {
1083
+ type: "dismissed";
1084
+ key: string;
1085
+ inverted?: boolean | undefined;
1086
+ } | {
1087
+ type: "cooldown_active";
1088
+ key: string;
1089
+ inverted?: boolean | undefined;
1090
+ } | {
1091
+ type: "frequency_limit";
1092
+ key: string;
1093
+ limit: number;
1094
+ inverted?: boolean | undefined;
1095
+ } | {
1096
+ type: "event_count";
1097
+ key: string;
1098
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1099
+ count: number;
1100
+ withinMs?: number | undefined;
1101
+ })[];
412
1102
  value?: unknown;
413
1103
  }, {
414
- conditions: z.objectInputType<{
415
- type: z.ZodString;
416
- }, z.ZodTypeAny, "passthrough">[];
1104
+ conditions: ({
1105
+ type: "page_url";
1106
+ url: string;
1107
+ } | {
1108
+ type: "route";
1109
+ routeId: string;
1110
+ } | {
1111
+ type: "anchor_visible";
1112
+ anchorId: string;
1113
+ state: "visible" | "present" | "absent";
1114
+ } | {
1115
+ type: "event_occurred";
1116
+ eventName: string;
1117
+ withinMs?: number | undefined;
1118
+ } | {
1119
+ type: "state_equals";
1120
+ key: string;
1121
+ value?: unknown;
1122
+ } | {
1123
+ type: "viewport";
1124
+ minWidth?: number | undefined;
1125
+ maxWidth?: number | undefined;
1126
+ minHeight?: number | undefined;
1127
+ maxHeight?: number | undefined;
1128
+ } | {
1129
+ type: "session_metric";
1130
+ key: string;
1131
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1132
+ threshold: number;
1133
+ } | {
1134
+ type: "dismissed";
1135
+ key: string;
1136
+ inverted?: boolean | undefined;
1137
+ } | {
1138
+ type: "cooldown_active";
1139
+ key: string;
1140
+ inverted?: boolean | undefined;
1141
+ } | {
1142
+ type: "frequency_limit";
1143
+ key: string;
1144
+ limit: number;
1145
+ inverted?: boolean | undefined;
1146
+ } | {
1147
+ type: "event_count";
1148
+ key: string;
1149
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1150
+ count: number;
1151
+ withinMs?: number | undefined;
1152
+ })[];
417
1153
  value?: unknown;
418
1154
  }>, "many">;
419
1155
  default: z.ZodUnknown;
420
1156
  }, "strip", z.ZodTypeAny, {
1157
+ type: "rules";
421
1158
  rules: {
422
- conditions: z.objectOutputType<{
423
- type: z.ZodString;
424
- }, z.ZodTypeAny, "passthrough">[];
1159
+ conditions: ({
1160
+ type: "page_url";
1161
+ url: string;
1162
+ } | {
1163
+ type: "route";
1164
+ routeId: string;
1165
+ } | {
1166
+ type: "anchor_visible";
1167
+ anchorId: string;
1168
+ state: "visible" | "present" | "absent";
1169
+ } | {
1170
+ type: "event_occurred";
1171
+ eventName: string;
1172
+ withinMs?: number | undefined;
1173
+ } | {
1174
+ type: "state_equals";
1175
+ key: string;
1176
+ value?: unknown;
1177
+ } | {
1178
+ type: "viewport";
1179
+ minWidth?: number | undefined;
1180
+ maxWidth?: number | undefined;
1181
+ minHeight?: number | undefined;
1182
+ maxHeight?: number | undefined;
1183
+ } | {
1184
+ type: "session_metric";
1185
+ key: string;
1186
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1187
+ threshold: number;
1188
+ } | {
1189
+ type: "dismissed";
1190
+ key: string;
1191
+ inverted?: boolean | undefined;
1192
+ } | {
1193
+ type: "cooldown_active";
1194
+ key: string;
1195
+ inverted?: boolean | undefined;
1196
+ } | {
1197
+ type: "frequency_limit";
1198
+ key: string;
1199
+ limit: number;
1200
+ inverted?: boolean | undefined;
1201
+ } | {
1202
+ type: "event_count";
1203
+ key: string;
1204
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1205
+ count: number;
1206
+ withinMs?: number | undefined;
1207
+ })[];
425
1208
  value?: unknown;
426
1209
  }[];
427
- type: "rules";
428
1210
  default?: unknown;
429
1211
  }, {
1212
+ type: "rules";
430
1213
  rules: {
431
- conditions: z.objectInputType<{
432
- type: z.ZodString;
433
- }, z.ZodTypeAny, "passthrough">[];
1214
+ conditions: ({
1215
+ type: "page_url";
1216
+ url: string;
1217
+ } | {
1218
+ type: "route";
1219
+ routeId: string;
1220
+ } | {
1221
+ type: "anchor_visible";
1222
+ anchorId: string;
1223
+ state: "visible" | "present" | "absent";
1224
+ } | {
1225
+ type: "event_occurred";
1226
+ eventName: string;
1227
+ withinMs?: number | undefined;
1228
+ } | {
1229
+ type: "state_equals";
1230
+ key: string;
1231
+ value?: unknown;
1232
+ } | {
1233
+ type: "viewport";
1234
+ minWidth?: number | undefined;
1235
+ maxWidth?: number | undefined;
1236
+ minHeight?: number | undefined;
1237
+ maxHeight?: number | undefined;
1238
+ } | {
1239
+ type: "session_metric";
1240
+ key: string;
1241
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1242
+ threshold: number;
1243
+ } | {
1244
+ type: "dismissed";
1245
+ key: string;
1246
+ inverted?: boolean | undefined;
1247
+ } | {
1248
+ type: "cooldown_active";
1249
+ key: string;
1250
+ inverted?: boolean | undefined;
1251
+ } | {
1252
+ type: "frequency_limit";
1253
+ key: string;
1254
+ limit: number;
1255
+ inverted?: boolean | undefined;
1256
+ } | {
1257
+ type: "event_count";
1258
+ key: string;
1259
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1260
+ count: number;
1261
+ withinMs?: number | undefined;
1262
+ })[];
434
1263
  value?: unknown;
435
1264
  }[];
436
- type: "rules";
437
1265
  default?: unknown;
438
1266
  }>, z.ZodObject<{
439
1267
  type: z.ZodLiteral<"score">;
@@ -497,12 +1325,12 @@ export declare const NavLinkSchema: z.ZodEffects<z.ZodObject<{
497
1325
  icon: z.ZodOptional<z.ZodString>;
498
1326
  }, "strip", z.ZodTypeAny, {
499
1327
  title?: string | undefined;
500
- icon?: string | undefined;
501
1328
  body?: string | undefined;
1329
+ icon?: string | undefined;
502
1330
  }, {
503
1331
  title?: string | undefined;
504
- icon?: string | undefined;
505
1332
  body?: string | undefined;
1333
+ icon?: string | undefined;
506
1334
  }>>>;
507
1335
  /** AI-generated reasoning for why this tip was recommended */
508
1336
  rationale: z.ZodOptional<z.ZodObject<{
@@ -527,13 +1355,59 @@ export declare const NavLinkSchema: z.ZodEffects<z.ZodObject<{
527
1355
  category?: string | undefined;
528
1356
  };
529
1357
  showWhen?: {
1358
+ type: "rules";
530
1359
  rules: {
531
- conditions: z.objectOutputType<{
532
- type: z.ZodString;
533
- }, z.ZodTypeAny, "passthrough">[];
1360
+ conditions: ({
1361
+ type: "page_url";
1362
+ url: string;
1363
+ } | {
1364
+ type: "route";
1365
+ routeId: string;
1366
+ } | {
1367
+ type: "anchor_visible";
1368
+ anchorId: string;
1369
+ state: "visible" | "present" | "absent";
1370
+ } | {
1371
+ type: "event_occurred";
1372
+ eventName: string;
1373
+ withinMs?: number | undefined;
1374
+ } | {
1375
+ type: "state_equals";
1376
+ key: string;
1377
+ value?: unknown;
1378
+ } | {
1379
+ type: "viewport";
1380
+ minWidth?: number | undefined;
1381
+ maxWidth?: number | undefined;
1382
+ minHeight?: number | undefined;
1383
+ maxHeight?: number | undefined;
1384
+ } | {
1385
+ type: "session_metric";
1386
+ key: string;
1387
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1388
+ threshold: number;
1389
+ } | {
1390
+ type: "dismissed";
1391
+ key: string;
1392
+ inverted?: boolean | undefined;
1393
+ } | {
1394
+ type: "cooldown_active";
1395
+ key: string;
1396
+ inverted?: boolean | undefined;
1397
+ } | {
1398
+ type: "frequency_limit";
1399
+ key: string;
1400
+ limit: number;
1401
+ inverted?: boolean | undefined;
1402
+ } | {
1403
+ type: "event_count";
1404
+ key: string;
1405
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1406
+ count: number;
1407
+ withinMs?: number | undefined;
1408
+ })[];
534
1409
  value?: unknown;
535
1410
  }[];
536
- type: "rules";
537
1411
  default?: unknown;
538
1412
  } | {
539
1413
  type: "score";
@@ -556,8 +1430,8 @@ export declare const NavLinkSchema: z.ZodEffects<z.ZodObject<{
556
1430
  } | null | undefined;
557
1431
  notify?: {
558
1432
  title?: string | undefined;
559
- icon?: string | undefined;
560
1433
  body?: string | undefined;
1434
+ icon?: string | undefined;
561
1435
  } | null | undefined;
562
1436
  rationale?: {
563
1437
  why: string;
@@ -575,13 +1449,59 @@ export declare const NavLinkSchema: z.ZodEffects<z.ZodObject<{
575
1449
  category?: string | undefined;
576
1450
  };
577
1451
  showWhen?: {
1452
+ type: "rules";
578
1453
  rules: {
579
- conditions: z.objectInputType<{
580
- type: z.ZodString;
581
- }, z.ZodTypeAny, "passthrough">[];
1454
+ conditions: ({
1455
+ type: "page_url";
1456
+ url: string;
1457
+ } | {
1458
+ type: "route";
1459
+ routeId: string;
1460
+ } | {
1461
+ type: "anchor_visible";
1462
+ anchorId: string;
1463
+ state: "visible" | "present" | "absent";
1464
+ } | {
1465
+ type: "event_occurred";
1466
+ eventName: string;
1467
+ withinMs?: number | undefined;
1468
+ } | {
1469
+ type: "state_equals";
1470
+ key: string;
1471
+ value?: unknown;
1472
+ } | {
1473
+ type: "viewport";
1474
+ minWidth?: number | undefined;
1475
+ maxWidth?: number | undefined;
1476
+ minHeight?: number | undefined;
1477
+ maxHeight?: number | undefined;
1478
+ } | {
1479
+ type: "session_metric";
1480
+ key: string;
1481
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1482
+ threshold: number;
1483
+ } | {
1484
+ type: "dismissed";
1485
+ key: string;
1486
+ inverted?: boolean | undefined;
1487
+ } | {
1488
+ type: "cooldown_active";
1489
+ key: string;
1490
+ inverted?: boolean | undefined;
1491
+ } | {
1492
+ type: "frequency_limit";
1493
+ key: string;
1494
+ limit: number;
1495
+ inverted?: boolean | undefined;
1496
+ } | {
1497
+ type: "event_count";
1498
+ key: string;
1499
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1500
+ count: number;
1501
+ withinMs?: number | undefined;
1502
+ })[];
582
1503
  value?: unknown;
583
1504
  }[];
584
- type: "rules";
585
1505
  default?: unknown;
586
1506
  } | {
587
1507
  type: "score";
@@ -604,8 +1524,8 @@ export declare const NavLinkSchema: z.ZodEffects<z.ZodObject<{
604
1524
  } | null | undefined;
605
1525
  notify?: {
606
1526
  title?: string | undefined;
607
- icon?: string | undefined;
608
1527
  body?: string | undefined;
1528
+ icon?: string | undefined;
609
1529
  } | null | undefined;
610
1530
  rationale?: {
611
1531
  why: string;
@@ -623,13 +1543,59 @@ export declare const NavLinkSchema: z.ZodEffects<z.ZodObject<{
623
1543
  category?: string | undefined;
624
1544
  };
625
1545
  showWhen?: {
1546
+ type: "rules";
626
1547
  rules: {
627
- conditions: z.objectOutputType<{
628
- type: z.ZodString;
629
- }, z.ZodTypeAny, "passthrough">[];
1548
+ conditions: ({
1549
+ type: "page_url";
1550
+ url: string;
1551
+ } | {
1552
+ type: "route";
1553
+ routeId: string;
1554
+ } | {
1555
+ type: "anchor_visible";
1556
+ anchorId: string;
1557
+ state: "visible" | "present" | "absent";
1558
+ } | {
1559
+ type: "event_occurred";
1560
+ eventName: string;
1561
+ withinMs?: number | undefined;
1562
+ } | {
1563
+ type: "state_equals";
1564
+ key: string;
1565
+ value?: unknown;
1566
+ } | {
1567
+ type: "viewport";
1568
+ minWidth?: number | undefined;
1569
+ maxWidth?: number | undefined;
1570
+ minHeight?: number | undefined;
1571
+ maxHeight?: number | undefined;
1572
+ } | {
1573
+ type: "session_metric";
1574
+ key: string;
1575
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1576
+ threshold: number;
1577
+ } | {
1578
+ type: "dismissed";
1579
+ key: string;
1580
+ inverted?: boolean | undefined;
1581
+ } | {
1582
+ type: "cooldown_active";
1583
+ key: string;
1584
+ inverted?: boolean | undefined;
1585
+ } | {
1586
+ type: "frequency_limit";
1587
+ key: string;
1588
+ limit: number;
1589
+ inverted?: boolean | undefined;
1590
+ } | {
1591
+ type: "event_count";
1592
+ key: string;
1593
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1594
+ count: number;
1595
+ withinMs?: number | undefined;
1596
+ })[];
630
1597
  value?: unknown;
631
1598
  }[];
632
- type: "rules";
633
1599
  default?: unknown;
634
1600
  } | {
635
1601
  type: "score";
@@ -652,8 +1618,8 @@ export declare const NavLinkSchema: z.ZodEffects<z.ZodObject<{
652
1618
  } | null | undefined;
653
1619
  notify?: {
654
1620
  title?: string | undefined;
655
- icon?: string | undefined;
656
1621
  body?: string | undefined;
1622
+ icon?: string | undefined;
657
1623
  } | null | undefined;
658
1624
  rationale?: {
659
1625
  why: string;
@@ -671,13 +1637,59 @@ export declare const NavLinkSchema: z.ZodEffects<z.ZodObject<{
671
1637
  category?: string | undefined;
672
1638
  };
673
1639
  showWhen?: {
1640
+ type: "rules";
674
1641
  rules: {
675
- conditions: z.objectInputType<{
676
- type: z.ZodString;
677
- }, z.ZodTypeAny, "passthrough">[];
1642
+ conditions: ({
1643
+ type: "page_url";
1644
+ url: string;
1645
+ } | {
1646
+ type: "route";
1647
+ routeId: string;
1648
+ } | {
1649
+ type: "anchor_visible";
1650
+ anchorId: string;
1651
+ state: "visible" | "present" | "absent";
1652
+ } | {
1653
+ type: "event_occurred";
1654
+ eventName: string;
1655
+ withinMs?: number | undefined;
1656
+ } | {
1657
+ type: "state_equals";
1658
+ key: string;
1659
+ value?: unknown;
1660
+ } | {
1661
+ type: "viewport";
1662
+ minWidth?: number | undefined;
1663
+ maxWidth?: number | undefined;
1664
+ minHeight?: number | undefined;
1665
+ maxHeight?: number | undefined;
1666
+ } | {
1667
+ type: "session_metric";
1668
+ key: string;
1669
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1670
+ threshold: number;
1671
+ } | {
1672
+ type: "dismissed";
1673
+ key: string;
1674
+ inverted?: boolean | undefined;
1675
+ } | {
1676
+ type: "cooldown_active";
1677
+ key: string;
1678
+ inverted?: boolean | undefined;
1679
+ } | {
1680
+ type: "frequency_limit";
1681
+ key: string;
1682
+ limit: number;
1683
+ inverted?: boolean | undefined;
1684
+ } | {
1685
+ type: "event_count";
1686
+ key: string;
1687
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1688
+ count: number;
1689
+ withinMs?: number | undefined;
1690
+ })[];
678
1691
  value?: unknown;
679
1692
  }[];
680
- type: "rules";
681
1693
  default?: unknown;
682
1694
  } | {
683
1695
  type: "score";
@@ -700,8 +1712,8 @@ export declare const NavLinkSchema: z.ZodEffects<z.ZodObject<{
700
1712
  } | null | undefined;
701
1713
  notify?: {
702
1714
  title?: string | undefined;
703
- icon?: string | undefined;
704
1715
  body?: string | undefined;
1716
+ icon?: string | undefined;
705
1717
  } | null | undefined;
706
1718
  rationale?: {
707
1719
  why: string;
@@ -758,43 +1770,365 @@ export declare const configSchema: z.ZodObject<{
758
1770
  showWhen: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
759
1771
  type: z.ZodLiteral<"rules">;
760
1772
  rules: z.ZodArray<z.ZodObject<{
761
- conditions: z.ZodArray<z.ZodObject<{
762
- type: z.ZodString;
763
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
764
- type: z.ZodString;
765
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
766
- type: z.ZodString;
767
- }, z.ZodTypeAny, "passthrough">>, "many">;
1773
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1774
+ type: z.ZodLiteral<"page_url">;
1775
+ url: z.ZodString;
1776
+ }, "strip", z.ZodTypeAny, {
1777
+ type: "page_url";
1778
+ url: string;
1779
+ }, {
1780
+ type: "page_url";
1781
+ url: string;
1782
+ }>, z.ZodObject<{
1783
+ type: z.ZodLiteral<"route">;
1784
+ routeId: z.ZodString;
1785
+ }, "strip", z.ZodTypeAny, {
1786
+ type: "route";
1787
+ routeId: string;
1788
+ }, {
1789
+ type: "route";
1790
+ routeId: string;
1791
+ }>, z.ZodObject<{
1792
+ type: z.ZodLiteral<"anchor_visible">;
1793
+ anchorId: z.ZodString;
1794
+ state: z.ZodEnum<["visible", "present", "absent"]>;
1795
+ }, "strip", z.ZodTypeAny, {
1796
+ type: "anchor_visible";
1797
+ anchorId: string;
1798
+ state: "visible" | "present" | "absent";
1799
+ }, {
1800
+ type: "anchor_visible";
1801
+ anchorId: string;
1802
+ state: "visible" | "present" | "absent";
1803
+ }>, z.ZodObject<{
1804
+ type: z.ZodLiteral<"event_occurred">;
1805
+ eventName: z.ZodString;
1806
+ withinMs: z.ZodOptional<z.ZodNumber>;
1807
+ }, "strip", z.ZodTypeAny, {
1808
+ type: "event_occurred";
1809
+ eventName: string;
1810
+ withinMs?: number | undefined;
1811
+ }, {
1812
+ type: "event_occurred";
1813
+ eventName: string;
1814
+ withinMs?: number | undefined;
1815
+ }>, z.ZodObject<{
1816
+ type: z.ZodLiteral<"state_equals">;
1817
+ key: z.ZodString;
1818
+ value: z.ZodUnknown;
1819
+ }, "strip", z.ZodTypeAny, {
1820
+ type: "state_equals";
1821
+ key: string;
1822
+ value?: unknown;
1823
+ }, {
1824
+ type: "state_equals";
1825
+ key: string;
1826
+ value?: unknown;
1827
+ }>, z.ZodObject<{
1828
+ type: z.ZodLiteral<"viewport">;
1829
+ minWidth: z.ZodOptional<z.ZodNumber>;
1830
+ maxWidth: z.ZodOptional<z.ZodNumber>;
1831
+ minHeight: z.ZodOptional<z.ZodNumber>;
1832
+ maxHeight: z.ZodOptional<z.ZodNumber>;
1833
+ }, "strip", z.ZodTypeAny, {
1834
+ type: "viewport";
1835
+ minWidth?: number | undefined;
1836
+ maxWidth?: number | undefined;
1837
+ minHeight?: number | undefined;
1838
+ maxHeight?: number | undefined;
1839
+ }, {
1840
+ type: "viewport";
1841
+ minWidth?: number | undefined;
1842
+ maxWidth?: number | undefined;
1843
+ minHeight?: number | undefined;
1844
+ maxHeight?: number | undefined;
1845
+ }>, z.ZodObject<{
1846
+ type: z.ZodLiteral<"session_metric">;
1847
+ key: z.ZodString;
1848
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1849
+ threshold: z.ZodNumber;
1850
+ }, "strip", z.ZodTypeAny, {
1851
+ type: "session_metric";
1852
+ key: string;
1853
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1854
+ threshold: number;
1855
+ }, {
1856
+ type: "session_metric";
1857
+ key: string;
1858
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1859
+ threshold: number;
1860
+ }>, z.ZodObject<{
1861
+ type: z.ZodLiteral<"dismissed">;
1862
+ key: z.ZodString;
1863
+ inverted: z.ZodOptional<z.ZodBoolean>;
1864
+ }, "strip", z.ZodTypeAny, {
1865
+ type: "dismissed";
1866
+ key: string;
1867
+ inverted?: boolean | undefined;
1868
+ }, {
1869
+ type: "dismissed";
1870
+ key: string;
1871
+ inverted?: boolean | undefined;
1872
+ }>, z.ZodObject<{
1873
+ type: z.ZodLiteral<"cooldown_active">;
1874
+ key: z.ZodString;
1875
+ inverted: z.ZodOptional<z.ZodBoolean>;
1876
+ }, "strip", z.ZodTypeAny, {
1877
+ type: "cooldown_active";
1878
+ key: string;
1879
+ inverted?: boolean | undefined;
1880
+ }, {
1881
+ type: "cooldown_active";
1882
+ key: string;
1883
+ inverted?: boolean | undefined;
1884
+ }>, z.ZodObject<{
1885
+ type: z.ZodLiteral<"frequency_limit">;
1886
+ key: z.ZodString;
1887
+ limit: z.ZodNumber;
1888
+ inverted: z.ZodOptional<z.ZodBoolean>;
1889
+ }, "strip", z.ZodTypeAny, {
1890
+ type: "frequency_limit";
1891
+ key: string;
1892
+ limit: number;
1893
+ inverted?: boolean | undefined;
1894
+ }, {
1895
+ type: "frequency_limit";
1896
+ key: string;
1897
+ limit: number;
1898
+ inverted?: boolean | undefined;
1899
+ }>, z.ZodObject<{
1900
+ type: z.ZodLiteral<"event_count">;
1901
+ key: z.ZodString;
1902
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1903
+ count: z.ZodNumber;
1904
+ withinMs: z.ZodOptional<z.ZodNumber>;
1905
+ }, "strip", z.ZodTypeAny, {
1906
+ type: "event_count";
1907
+ key: string;
1908
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1909
+ count: number;
1910
+ withinMs?: number | undefined;
1911
+ }, {
1912
+ type: "event_count";
1913
+ key: string;
1914
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1915
+ count: number;
1916
+ withinMs?: number | undefined;
1917
+ }>]>, "many">;
768
1918
  value: z.ZodUnknown;
769
1919
  }, "strip", z.ZodTypeAny, {
770
- conditions: z.objectOutputType<{
771
- type: z.ZodString;
772
- }, z.ZodTypeAny, "passthrough">[];
1920
+ conditions: ({
1921
+ type: "page_url";
1922
+ url: string;
1923
+ } | {
1924
+ type: "route";
1925
+ routeId: string;
1926
+ } | {
1927
+ type: "anchor_visible";
1928
+ anchorId: string;
1929
+ state: "visible" | "present" | "absent";
1930
+ } | {
1931
+ type: "event_occurred";
1932
+ eventName: string;
1933
+ withinMs?: number | undefined;
1934
+ } | {
1935
+ type: "state_equals";
1936
+ key: string;
1937
+ value?: unknown;
1938
+ } | {
1939
+ type: "viewport";
1940
+ minWidth?: number | undefined;
1941
+ maxWidth?: number | undefined;
1942
+ minHeight?: number | undefined;
1943
+ maxHeight?: number | undefined;
1944
+ } | {
1945
+ type: "session_metric";
1946
+ key: string;
1947
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1948
+ threshold: number;
1949
+ } | {
1950
+ type: "dismissed";
1951
+ key: string;
1952
+ inverted?: boolean | undefined;
1953
+ } | {
1954
+ type: "cooldown_active";
1955
+ key: string;
1956
+ inverted?: boolean | undefined;
1957
+ } | {
1958
+ type: "frequency_limit";
1959
+ key: string;
1960
+ limit: number;
1961
+ inverted?: boolean | undefined;
1962
+ } | {
1963
+ type: "event_count";
1964
+ key: string;
1965
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1966
+ count: number;
1967
+ withinMs?: number | undefined;
1968
+ })[];
773
1969
  value?: unknown;
774
1970
  }, {
775
- conditions: z.objectInputType<{
776
- type: z.ZodString;
777
- }, z.ZodTypeAny, "passthrough">[];
1971
+ conditions: ({
1972
+ type: "page_url";
1973
+ url: string;
1974
+ } | {
1975
+ type: "route";
1976
+ routeId: string;
1977
+ } | {
1978
+ type: "anchor_visible";
1979
+ anchorId: string;
1980
+ state: "visible" | "present" | "absent";
1981
+ } | {
1982
+ type: "event_occurred";
1983
+ eventName: string;
1984
+ withinMs?: number | undefined;
1985
+ } | {
1986
+ type: "state_equals";
1987
+ key: string;
1988
+ value?: unknown;
1989
+ } | {
1990
+ type: "viewport";
1991
+ minWidth?: number | undefined;
1992
+ maxWidth?: number | undefined;
1993
+ minHeight?: number | undefined;
1994
+ maxHeight?: number | undefined;
1995
+ } | {
1996
+ type: "session_metric";
1997
+ key: string;
1998
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1999
+ threshold: number;
2000
+ } | {
2001
+ type: "dismissed";
2002
+ key: string;
2003
+ inverted?: boolean | undefined;
2004
+ } | {
2005
+ type: "cooldown_active";
2006
+ key: string;
2007
+ inverted?: boolean | undefined;
2008
+ } | {
2009
+ type: "frequency_limit";
2010
+ key: string;
2011
+ limit: number;
2012
+ inverted?: boolean | undefined;
2013
+ } | {
2014
+ type: "event_count";
2015
+ key: string;
2016
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2017
+ count: number;
2018
+ withinMs?: number | undefined;
2019
+ })[];
778
2020
  value?: unknown;
779
2021
  }>, "many">;
780
2022
  default: z.ZodUnknown;
781
2023
  }, "strip", z.ZodTypeAny, {
2024
+ type: "rules";
782
2025
  rules: {
783
- conditions: z.objectOutputType<{
784
- type: z.ZodString;
785
- }, z.ZodTypeAny, "passthrough">[];
2026
+ conditions: ({
2027
+ type: "page_url";
2028
+ url: string;
2029
+ } | {
2030
+ type: "route";
2031
+ routeId: string;
2032
+ } | {
2033
+ type: "anchor_visible";
2034
+ anchorId: string;
2035
+ state: "visible" | "present" | "absent";
2036
+ } | {
2037
+ type: "event_occurred";
2038
+ eventName: string;
2039
+ withinMs?: number | undefined;
2040
+ } | {
2041
+ type: "state_equals";
2042
+ key: string;
2043
+ value?: unknown;
2044
+ } | {
2045
+ type: "viewport";
2046
+ minWidth?: number | undefined;
2047
+ maxWidth?: number | undefined;
2048
+ minHeight?: number | undefined;
2049
+ maxHeight?: number | undefined;
2050
+ } | {
2051
+ type: "session_metric";
2052
+ key: string;
2053
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2054
+ threshold: number;
2055
+ } | {
2056
+ type: "dismissed";
2057
+ key: string;
2058
+ inverted?: boolean | undefined;
2059
+ } | {
2060
+ type: "cooldown_active";
2061
+ key: string;
2062
+ inverted?: boolean | undefined;
2063
+ } | {
2064
+ type: "frequency_limit";
2065
+ key: string;
2066
+ limit: number;
2067
+ inverted?: boolean | undefined;
2068
+ } | {
2069
+ type: "event_count";
2070
+ key: string;
2071
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2072
+ count: number;
2073
+ withinMs?: number | undefined;
2074
+ })[];
786
2075
  value?: unknown;
787
2076
  }[];
788
- type: "rules";
789
2077
  default?: unknown;
790
2078
  }, {
2079
+ type: "rules";
791
2080
  rules: {
792
- conditions: z.objectInputType<{
793
- type: z.ZodString;
794
- }, z.ZodTypeAny, "passthrough">[];
2081
+ conditions: ({
2082
+ type: "page_url";
2083
+ url: string;
2084
+ } | {
2085
+ type: "route";
2086
+ routeId: string;
2087
+ } | {
2088
+ type: "anchor_visible";
2089
+ anchorId: string;
2090
+ state: "visible" | "present" | "absent";
2091
+ } | {
2092
+ type: "event_occurred";
2093
+ eventName: string;
2094
+ withinMs?: number | undefined;
2095
+ } | {
2096
+ type: "state_equals";
2097
+ key: string;
2098
+ value?: unknown;
2099
+ } | {
2100
+ type: "viewport";
2101
+ minWidth?: number | undefined;
2102
+ maxWidth?: number | undefined;
2103
+ minHeight?: number | undefined;
2104
+ maxHeight?: number | undefined;
2105
+ } | {
2106
+ type: "session_metric";
2107
+ key: string;
2108
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2109
+ threshold: number;
2110
+ } | {
2111
+ type: "dismissed";
2112
+ key: string;
2113
+ inverted?: boolean | undefined;
2114
+ } | {
2115
+ type: "cooldown_active";
2116
+ key: string;
2117
+ inverted?: boolean | undefined;
2118
+ } | {
2119
+ type: "frequency_limit";
2120
+ key: string;
2121
+ limit: number;
2122
+ inverted?: boolean | undefined;
2123
+ } | {
2124
+ type: "event_count";
2125
+ key: string;
2126
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2127
+ count: number;
2128
+ withinMs?: number | undefined;
2129
+ })[];
795
2130
  value?: unknown;
796
2131
  }[];
797
- type: "rules";
798
2132
  default?: unknown;
799
2133
  }>, z.ZodObject<{
800
2134
  type: z.ZodLiteral<"score">;
@@ -858,12 +2192,12 @@ export declare const configSchema: z.ZodObject<{
858
2192
  icon: z.ZodOptional<z.ZodString>;
859
2193
  }, "strip", z.ZodTypeAny, {
860
2194
  title?: string | undefined;
861
- icon?: string | undefined;
862
2195
  body?: string | undefined;
2196
+ icon?: string | undefined;
863
2197
  }, {
864
2198
  title?: string | undefined;
865
- icon?: string | undefined;
866
2199
  body?: string | undefined;
2200
+ icon?: string | undefined;
867
2201
  }>>>;
868
2202
  /** AI-generated reasoning for why this tip was recommended */
869
2203
  rationale: z.ZodOptional<z.ZodObject<{
@@ -888,13 +2222,59 @@ export declare const configSchema: z.ZodObject<{
888
2222
  category?: string | undefined;
889
2223
  };
890
2224
  showWhen?: {
2225
+ type: "rules";
891
2226
  rules: {
892
- conditions: z.objectOutputType<{
893
- type: z.ZodString;
894
- }, z.ZodTypeAny, "passthrough">[];
2227
+ conditions: ({
2228
+ type: "page_url";
2229
+ url: string;
2230
+ } | {
2231
+ type: "route";
2232
+ routeId: string;
2233
+ } | {
2234
+ type: "anchor_visible";
2235
+ anchorId: string;
2236
+ state: "visible" | "present" | "absent";
2237
+ } | {
2238
+ type: "event_occurred";
2239
+ eventName: string;
2240
+ withinMs?: number | undefined;
2241
+ } | {
2242
+ type: "state_equals";
2243
+ key: string;
2244
+ value?: unknown;
2245
+ } | {
2246
+ type: "viewport";
2247
+ minWidth?: number | undefined;
2248
+ maxWidth?: number | undefined;
2249
+ minHeight?: number | undefined;
2250
+ maxHeight?: number | undefined;
2251
+ } | {
2252
+ type: "session_metric";
2253
+ key: string;
2254
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2255
+ threshold: number;
2256
+ } | {
2257
+ type: "dismissed";
2258
+ key: string;
2259
+ inverted?: boolean | undefined;
2260
+ } | {
2261
+ type: "cooldown_active";
2262
+ key: string;
2263
+ inverted?: boolean | undefined;
2264
+ } | {
2265
+ type: "frequency_limit";
2266
+ key: string;
2267
+ limit: number;
2268
+ inverted?: boolean | undefined;
2269
+ } | {
2270
+ type: "event_count";
2271
+ key: string;
2272
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2273
+ count: number;
2274
+ withinMs?: number | undefined;
2275
+ })[];
895
2276
  value?: unknown;
896
2277
  }[];
897
- type: "rules";
898
2278
  default?: unknown;
899
2279
  } | {
900
2280
  type: "score";
@@ -917,8 +2297,8 @@ export declare const configSchema: z.ZodObject<{
917
2297
  } | null | undefined;
918
2298
  notify?: {
919
2299
  title?: string | undefined;
920
- icon?: string | undefined;
921
2300
  body?: string | undefined;
2301
+ icon?: string | undefined;
922
2302
  } | null | undefined;
923
2303
  rationale?: {
924
2304
  why: string;
@@ -936,13 +2316,59 @@ export declare const configSchema: z.ZodObject<{
936
2316
  category?: string | undefined;
937
2317
  };
938
2318
  showWhen?: {
2319
+ type: "rules";
939
2320
  rules: {
940
- conditions: z.objectInputType<{
941
- type: z.ZodString;
942
- }, z.ZodTypeAny, "passthrough">[];
2321
+ conditions: ({
2322
+ type: "page_url";
2323
+ url: string;
2324
+ } | {
2325
+ type: "route";
2326
+ routeId: string;
2327
+ } | {
2328
+ type: "anchor_visible";
2329
+ anchorId: string;
2330
+ state: "visible" | "present" | "absent";
2331
+ } | {
2332
+ type: "event_occurred";
2333
+ eventName: string;
2334
+ withinMs?: number | undefined;
2335
+ } | {
2336
+ type: "state_equals";
2337
+ key: string;
2338
+ value?: unknown;
2339
+ } | {
2340
+ type: "viewport";
2341
+ minWidth?: number | undefined;
2342
+ maxWidth?: number | undefined;
2343
+ minHeight?: number | undefined;
2344
+ maxHeight?: number | undefined;
2345
+ } | {
2346
+ type: "session_metric";
2347
+ key: string;
2348
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2349
+ threshold: number;
2350
+ } | {
2351
+ type: "dismissed";
2352
+ key: string;
2353
+ inverted?: boolean | undefined;
2354
+ } | {
2355
+ type: "cooldown_active";
2356
+ key: string;
2357
+ inverted?: boolean | undefined;
2358
+ } | {
2359
+ type: "frequency_limit";
2360
+ key: string;
2361
+ limit: number;
2362
+ inverted?: boolean | undefined;
2363
+ } | {
2364
+ type: "event_count";
2365
+ key: string;
2366
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2367
+ count: number;
2368
+ withinMs?: number | undefined;
2369
+ })[];
943
2370
  value?: unknown;
944
2371
  }[];
945
- type: "rules";
946
2372
  default?: unknown;
947
2373
  } | {
948
2374
  type: "score";
@@ -965,8 +2391,8 @@ export declare const configSchema: z.ZodObject<{
965
2391
  } | null | undefined;
966
2392
  notify?: {
967
2393
  title?: string | undefined;
968
- icon?: string | undefined;
969
2394
  body?: string | undefined;
2395
+ icon?: string | undefined;
970
2396
  } | null | undefined;
971
2397
  rationale?: {
972
2398
  why: string;
@@ -984,13 +2410,59 @@ export declare const configSchema: z.ZodObject<{
984
2410
  category?: string | undefined;
985
2411
  };
986
2412
  showWhen?: {
2413
+ type: "rules";
987
2414
  rules: {
988
- conditions: z.objectOutputType<{
989
- type: z.ZodString;
990
- }, z.ZodTypeAny, "passthrough">[];
2415
+ conditions: ({
2416
+ type: "page_url";
2417
+ url: string;
2418
+ } | {
2419
+ type: "route";
2420
+ routeId: string;
2421
+ } | {
2422
+ type: "anchor_visible";
2423
+ anchorId: string;
2424
+ state: "visible" | "present" | "absent";
2425
+ } | {
2426
+ type: "event_occurred";
2427
+ eventName: string;
2428
+ withinMs?: number | undefined;
2429
+ } | {
2430
+ type: "state_equals";
2431
+ key: string;
2432
+ value?: unknown;
2433
+ } | {
2434
+ type: "viewport";
2435
+ minWidth?: number | undefined;
2436
+ maxWidth?: number | undefined;
2437
+ minHeight?: number | undefined;
2438
+ maxHeight?: number | undefined;
2439
+ } | {
2440
+ type: "session_metric";
2441
+ key: string;
2442
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2443
+ threshold: number;
2444
+ } | {
2445
+ type: "dismissed";
2446
+ key: string;
2447
+ inverted?: boolean | undefined;
2448
+ } | {
2449
+ type: "cooldown_active";
2450
+ key: string;
2451
+ inverted?: boolean | undefined;
2452
+ } | {
2453
+ type: "frequency_limit";
2454
+ key: string;
2455
+ limit: number;
2456
+ inverted?: boolean | undefined;
2457
+ } | {
2458
+ type: "event_count";
2459
+ key: string;
2460
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2461
+ count: number;
2462
+ withinMs?: number | undefined;
2463
+ })[];
991
2464
  value?: unknown;
992
2465
  }[];
993
- type: "rules";
994
2466
  default?: unknown;
995
2467
  } | {
996
2468
  type: "score";
@@ -1013,8 +2485,8 @@ export declare const configSchema: z.ZodObject<{
1013
2485
  } | null | undefined;
1014
2486
  notify?: {
1015
2487
  title?: string | undefined;
1016
- icon?: string | undefined;
1017
2488
  body?: string | undefined;
2489
+ icon?: string | undefined;
1018
2490
  } | null | undefined;
1019
2491
  rationale?: {
1020
2492
  why: string;
@@ -1032,13 +2504,59 @@ export declare const configSchema: z.ZodObject<{
1032
2504
  category?: string | undefined;
1033
2505
  };
1034
2506
  showWhen?: {
2507
+ type: "rules";
1035
2508
  rules: {
1036
- conditions: z.objectInputType<{
1037
- type: z.ZodString;
1038
- }, z.ZodTypeAny, "passthrough">[];
2509
+ conditions: ({
2510
+ type: "page_url";
2511
+ url: string;
2512
+ } | {
2513
+ type: "route";
2514
+ routeId: string;
2515
+ } | {
2516
+ type: "anchor_visible";
2517
+ anchorId: string;
2518
+ state: "visible" | "present" | "absent";
2519
+ } | {
2520
+ type: "event_occurred";
2521
+ eventName: string;
2522
+ withinMs?: number | undefined;
2523
+ } | {
2524
+ type: "state_equals";
2525
+ key: string;
2526
+ value?: unknown;
2527
+ } | {
2528
+ type: "viewport";
2529
+ minWidth?: number | undefined;
2530
+ maxWidth?: number | undefined;
2531
+ minHeight?: number | undefined;
2532
+ maxHeight?: number | undefined;
2533
+ } | {
2534
+ type: "session_metric";
2535
+ key: string;
2536
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2537
+ threshold: number;
2538
+ } | {
2539
+ type: "dismissed";
2540
+ key: string;
2541
+ inverted?: boolean | undefined;
2542
+ } | {
2543
+ type: "cooldown_active";
2544
+ key: string;
2545
+ inverted?: boolean | undefined;
2546
+ } | {
2547
+ type: "frequency_limit";
2548
+ key: string;
2549
+ limit: number;
2550
+ inverted?: boolean | undefined;
2551
+ } | {
2552
+ type: "event_count";
2553
+ key: string;
2554
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2555
+ count: number;
2556
+ withinMs?: number | undefined;
2557
+ })[];
1039
2558
  value?: unknown;
1040
2559
  }[];
1041
- type: "rules";
1042
2560
  default?: unknown;
1043
2561
  } | {
1044
2562
  type: "score";
@@ -1061,8 +2579,8 @@ export declare const configSchema: z.ZodObject<{
1061
2579
  } | null | undefined;
1062
2580
  notify?: {
1063
2581
  title?: string | undefined;
1064
- icon?: string | undefined;
1065
2582
  body?: string | undefined;
2583
+ icon?: string | undefined;
1066
2584
  } | null | undefined;
1067
2585
  rationale?: {
1068
2586
  why: string;
@@ -1098,13 +2616,59 @@ export declare const configSchema: z.ZodObject<{
1098
2616
  category?: string | undefined;
1099
2617
  };
1100
2618
  showWhen?: {
2619
+ type: "rules";
1101
2620
  rules: {
1102
- conditions: z.objectOutputType<{
1103
- type: z.ZodString;
1104
- }, z.ZodTypeAny, "passthrough">[];
2621
+ conditions: ({
2622
+ type: "page_url";
2623
+ url: string;
2624
+ } | {
2625
+ type: "route";
2626
+ routeId: string;
2627
+ } | {
2628
+ type: "anchor_visible";
2629
+ anchorId: string;
2630
+ state: "visible" | "present" | "absent";
2631
+ } | {
2632
+ type: "event_occurred";
2633
+ eventName: string;
2634
+ withinMs?: number | undefined;
2635
+ } | {
2636
+ type: "state_equals";
2637
+ key: string;
2638
+ value?: unknown;
2639
+ } | {
2640
+ type: "viewport";
2641
+ minWidth?: number | undefined;
2642
+ maxWidth?: number | undefined;
2643
+ minHeight?: number | undefined;
2644
+ maxHeight?: number | undefined;
2645
+ } | {
2646
+ type: "session_metric";
2647
+ key: string;
2648
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2649
+ threshold: number;
2650
+ } | {
2651
+ type: "dismissed";
2652
+ key: string;
2653
+ inverted?: boolean | undefined;
2654
+ } | {
2655
+ type: "cooldown_active";
2656
+ key: string;
2657
+ inverted?: boolean | undefined;
2658
+ } | {
2659
+ type: "frequency_limit";
2660
+ key: string;
2661
+ limit: number;
2662
+ inverted?: boolean | undefined;
2663
+ } | {
2664
+ type: "event_count";
2665
+ key: string;
2666
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2667
+ count: number;
2668
+ withinMs?: number | undefined;
2669
+ })[];
1105
2670
  value?: unknown;
1106
2671
  }[];
1107
- type: "rules";
1108
2672
  default?: unknown;
1109
2673
  } | {
1110
2674
  type: "score";
@@ -1127,8 +2691,8 @@ export declare const configSchema: z.ZodObject<{
1127
2691
  } | null | undefined;
1128
2692
  notify?: {
1129
2693
  title?: string | undefined;
1130
- icon?: string | undefined;
1131
2694
  body?: string | undefined;
2695
+ icon?: string | undefined;
1132
2696
  } | null | undefined;
1133
2697
  rationale?: {
1134
2698
  why: string;
@@ -1157,13 +2721,59 @@ export declare const configSchema: z.ZodObject<{
1157
2721
  category?: string | undefined;
1158
2722
  };
1159
2723
  showWhen?: {
2724
+ type: "rules";
1160
2725
  rules: {
1161
- conditions: z.objectInputType<{
1162
- type: z.ZodString;
1163
- }, z.ZodTypeAny, "passthrough">[];
2726
+ conditions: ({
2727
+ type: "page_url";
2728
+ url: string;
2729
+ } | {
2730
+ type: "route";
2731
+ routeId: string;
2732
+ } | {
2733
+ type: "anchor_visible";
2734
+ anchorId: string;
2735
+ state: "visible" | "present" | "absent";
2736
+ } | {
2737
+ type: "event_occurred";
2738
+ eventName: string;
2739
+ withinMs?: number | undefined;
2740
+ } | {
2741
+ type: "state_equals";
2742
+ key: string;
2743
+ value?: unknown;
2744
+ } | {
2745
+ type: "viewport";
2746
+ minWidth?: number | undefined;
2747
+ maxWidth?: number | undefined;
2748
+ minHeight?: number | undefined;
2749
+ maxHeight?: number | undefined;
2750
+ } | {
2751
+ type: "session_metric";
2752
+ key: string;
2753
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2754
+ threshold: number;
2755
+ } | {
2756
+ type: "dismissed";
2757
+ key: string;
2758
+ inverted?: boolean | undefined;
2759
+ } | {
2760
+ type: "cooldown_active";
2761
+ key: string;
2762
+ inverted?: boolean | undefined;
2763
+ } | {
2764
+ type: "frequency_limit";
2765
+ key: string;
2766
+ limit: number;
2767
+ inverted?: boolean | undefined;
2768
+ } | {
2769
+ type: "event_count";
2770
+ key: string;
2771
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2772
+ count: number;
2773
+ withinMs?: number | undefined;
2774
+ })[];
1164
2775
  value?: unknown;
1165
2776
  }[];
1166
- type: "rules";
1167
2777
  default?: unknown;
1168
2778
  } | {
1169
2779
  type: "score";
@@ -1186,8 +2796,8 @@ export declare const configSchema: z.ZodObject<{
1186
2796
  } | null | undefined;
1187
2797
  notify?: {
1188
2798
  title?: string | undefined;
1189
- icon?: string | undefined;
1190
2799
  body?: string | undefined;
2800
+ icon?: string | undefined;
1191
2801
  } | null | undefined;
1192
2802
  rationale?: {
1193
2803
  why: string;
@@ -1251,13 +2861,59 @@ export declare function validateNavTip(data: unknown): z.SafeParseReturnType<{
1251
2861
  category?: string | undefined;
1252
2862
  };
1253
2863
  showWhen?: {
2864
+ type: "rules";
1254
2865
  rules: {
1255
- conditions: z.objectInputType<{
1256
- type: z.ZodString;
1257
- }, z.ZodTypeAny, "passthrough">[];
2866
+ conditions: ({
2867
+ type: "page_url";
2868
+ url: string;
2869
+ } | {
2870
+ type: "route";
2871
+ routeId: string;
2872
+ } | {
2873
+ type: "anchor_visible";
2874
+ anchorId: string;
2875
+ state: "visible" | "present" | "absent";
2876
+ } | {
2877
+ type: "event_occurred";
2878
+ eventName: string;
2879
+ withinMs?: number | undefined;
2880
+ } | {
2881
+ type: "state_equals";
2882
+ key: string;
2883
+ value?: unknown;
2884
+ } | {
2885
+ type: "viewport";
2886
+ minWidth?: number | undefined;
2887
+ maxWidth?: number | undefined;
2888
+ minHeight?: number | undefined;
2889
+ maxHeight?: number | undefined;
2890
+ } | {
2891
+ type: "session_metric";
2892
+ key: string;
2893
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2894
+ threshold: number;
2895
+ } | {
2896
+ type: "dismissed";
2897
+ key: string;
2898
+ inverted?: boolean | undefined;
2899
+ } | {
2900
+ type: "cooldown_active";
2901
+ key: string;
2902
+ inverted?: boolean | undefined;
2903
+ } | {
2904
+ type: "frequency_limit";
2905
+ key: string;
2906
+ limit: number;
2907
+ inverted?: boolean | undefined;
2908
+ } | {
2909
+ type: "event_count";
2910
+ key: string;
2911
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2912
+ count: number;
2913
+ withinMs?: number | undefined;
2914
+ })[];
1258
2915
  value?: unknown;
1259
2916
  }[];
1260
- type: "rules";
1261
2917
  default?: unknown;
1262
2918
  } | {
1263
2919
  type: "score";
@@ -1280,8 +2936,8 @@ export declare function validateNavTip(data: unknown): z.SafeParseReturnType<{
1280
2936
  } | null | undefined;
1281
2937
  notify?: {
1282
2938
  title?: string | undefined;
1283
- icon?: string | undefined;
1284
2939
  body?: string | undefined;
2940
+ icon?: string | undefined;
1285
2941
  } | null | undefined;
1286
2942
  rationale?: {
1287
2943
  why: string;
@@ -1299,13 +2955,59 @@ export declare function validateNavTip(data: unknown): z.SafeParseReturnType<{
1299
2955
  category?: string | undefined;
1300
2956
  };
1301
2957
  showWhen?: {
2958
+ type: "rules";
1302
2959
  rules: {
1303
- conditions: z.objectOutputType<{
1304
- type: z.ZodString;
1305
- }, z.ZodTypeAny, "passthrough">[];
2960
+ conditions: ({
2961
+ type: "page_url";
2962
+ url: string;
2963
+ } | {
2964
+ type: "route";
2965
+ routeId: string;
2966
+ } | {
2967
+ type: "anchor_visible";
2968
+ anchorId: string;
2969
+ state: "visible" | "present" | "absent";
2970
+ } | {
2971
+ type: "event_occurred";
2972
+ eventName: string;
2973
+ withinMs?: number | undefined;
2974
+ } | {
2975
+ type: "state_equals";
2976
+ key: string;
2977
+ value?: unknown;
2978
+ } | {
2979
+ type: "viewport";
2980
+ minWidth?: number | undefined;
2981
+ maxWidth?: number | undefined;
2982
+ minHeight?: number | undefined;
2983
+ maxHeight?: number | undefined;
2984
+ } | {
2985
+ type: "session_metric";
2986
+ key: string;
2987
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2988
+ threshold: number;
2989
+ } | {
2990
+ type: "dismissed";
2991
+ key: string;
2992
+ inverted?: boolean | undefined;
2993
+ } | {
2994
+ type: "cooldown_active";
2995
+ key: string;
2996
+ inverted?: boolean | undefined;
2997
+ } | {
2998
+ type: "frequency_limit";
2999
+ key: string;
3000
+ limit: number;
3001
+ inverted?: boolean | undefined;
3002
+ } | {
3003
+ type: "event_count";
3004
+ key: string;
3005
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3006
+ count: number;
3007
+ withinMs?: number | undefined;
3008
+ })[];
1306
3009
  value?: unknown;
1307
3010
  }[];
1308
- type: "rules";
1309
3011
  default?: unknown;
1310
3012
  } | {
1311
3013
  type: "score";
@@ -1328,8 +3030,8 @@ export declare function validateNavTip(data: unknown): z.SafeParseReturnType<{
1328
3030
  } | null | undefined;
1329
3031
  notify?: {
1330
3032
  title?: string | undefined;
1331
- icon?: string | undefined;
1332
3033
  body?: string | undefined;
3034
+ icon?: string | undefined;
1333
3035
  } | null | undefined;
1334
3036
  rationale?: {
1335
3037
  why: string;
@@ -1357,13 +3059,59 @@ export declare function validateNavConfig(data: unknown): z.SafeParseReturnType<
1357
3059
  category?: string | undefined;
1358
3060
  };
1359
3061
  showWhen?: {
3062
+ type: "rules";
1360
3063
  rules: {
1361
- conditions: z.objectInputType<{
1362
- type: z.ZodString;
1363
- }, z.ZodTypeAny, "passthrough">[];
3064
+ conditions: ({
3065
+ type: "page_url";
3066
+ url: string;
3067
+ } | {
3068
+ type: "route";
3069
+ routeId: string;
3070
+ } | {
3071
+ type: "anchor_visible";
3072
+ anchorId: string;
3073
+ state: "visible" | "present" | "absent";
3074
+ } | {
3075
+ type: "event_occurred";
3076
+ eventName: string;
3077
+ withinMs?: number | undefined;
3078
+ } | {
3079
+ type: "state_equals";
3080
+ key: string;
3081
+ value?: unknown;
3082
+ } | {
3083
+ type: "viewport";
3084
+ minWidth?: number | undefined;
3085
+ maxWidth?: number | undefined;
3086
+ minHeight?: number | undefined;
3087
+ maxHeight?: number | undefined;
3088
+ } | {
3089
+ type: "session_metric";
3090
+ key: string;
3091
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3092
+ threshold: number;
3093
+ } | {
3094
+ type: "dismissed";
3095
+ key: string;
3096
+ inverted?: boolean | undefined;
3097
+ } | {
3098
+ type: "cooldown_active";
3099
+ key: string;
3100
+ inverted?: boolean | undefined;
3101
+ } | {
3102
+ type: "frequency_limit";
3103
+ key: string;
3104
+ limit: number;
3105
+ inverted?: boolean | undefined;
3106
+ } | {
3107
+ type: "event_count";
3108
+ key: string;
3109
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3110
+ count: number;
3111
+ withinMs?: number | undefined;
3112
+ })[];
1364
3113
  value?: unknown;
1365
3114
  }[];
1366
- type: "rules";
1367
3115
  default?: unknown;
1368
3116
  } | {
1369
3117
  type: "score";
@@ -1386,8 +3134,8 @@ export declare function validateNavConfig(data: unknown): z.SafeParseReturnType<
1386
3134
  } | null | undefined;
1387
3135
  notify?: {
1388
3136
  title?: string | undefined;
1389
- icon?: string | undefined;
1390
3137
  body?: string | undefined;
3138
+ icon?: string | undefined;
1391
3139
  } | null | undefined;
1392
3140
  rationale?: {
1393
3141
  why: string;
@@ -1414,13 +3162,59 @@ export declare function validateNavConfig(data: unknown): z.SafeParseReturnType<
1414
3162
  category?: string | undefined;
1415
3163
  };
1416
3164
  showWhen?: {
3165
+ type: "rules";
1417
3166
  rules: {
1418
- conditions: z.objectOutputType<{
1419
- type: z.ZodString;
1420
- }, z.ZodTypeAny, "passthrough">[];
3167
+ conditions: ({
3168
+ type: "page_url";
3169
+ url: string;
3170
+ } | {
3171
+ type: "route";
3172
+ routeId: string;
3173
+ } | {
3174
+ type: "anchor_visible";
3175
+ anchorId: string;
3176
+ state: "visible" | "present" | "absent";
3177
+ } | {
3178
+ type: "event_occurred";
3179
+ eventName: string;
3180
+ withinMs?: number | undefined;
3181
+ } | {
3182
+ type: "state_equals";
3183
+ key: string;
3184
+ value?: unknown;
3185
+ } | {
3186
+ type: "viewport";
3187
+ minWidth?: number | undefined;
3188
+ maxWidth?: number | undefined;
3189
+ minHeight?: number | undefined;
3190
+ maxHeight?: number | undefined;
3191
+ } | {
3192
+ type: "session_metric";
3193
+ key: string;
3194
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3195
+ threshold: number;
3196
+ } | {
3197
+ type: "dismissed";
3198
+ key: string;
3199
+ inverted?: boolean | undefined;
3200
+ } | {
3201
+ type: "cooldown_active";
3202
+ key: string;
3203
+ inverted?: boolean | undefined;
3204
+ } | {
3205
+ type: "frequency_limit";
3206
+ key: string;
3207
+ limit: number;
3208
+ inverted?: boolean | undefined;
3209
+ } | {
3210
+ type: "event_count";
3211
+ key: string;
3212
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3213
+ count: number;
3214
+ withinMs?: number | undefined;
3215
+ })[];
1421
3216
  value?: unknown;
1422
3217
  }[];
1423
- type: "rules";
1424
3218
  default?: unknown;
1425
3219
  } | {
1426
3220
  type: "score";
@@ -1443,8 +3237,8 @@ export declare function validateNavConfig(data: unknown): z.SafeParseReturnType<
1443
3237
  } | null | undefined;
1444
3238
  notify?: {
1445
3239
  title?: string | undefined;
1446
- icon?: string | undefined;
1447
3240
  body?: string | undefined;
3241
+ icon?: string | undefined;
1448
3242
  } | null | undefined;
1449
3243
  rationale?: {
1450
3244
  why: string;
@@ -1503,43 +3297,365 @@ export declare const actionStepSchemas: {
1503
3297
  showWhen: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1504
3298
  type: z.ZodLiteral<"rules">;
1505
3299
  rules: z.ZodArray<z.ZodObject<{
1506
- conditions: z.ZodArray<z.ZodObject<{
1507
- type: z.ZodString;
1508
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1509
- type: z.ZodString;
1510
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1511
- type: z.ZodString;
1512
- }, z.ZodTypeAny, "passthrough">>, "many">;
3300
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3301
+ type: z.ZodLiteral<"page_url">;
3302
+ url: z.ZodString;
3303
+ }, "strip", z.ZodTypeAny, {
3304
+ type: "page_url";
3305
+ url: string;
3306
+ }, {
3307
+ type: "page_url";
3308
+ url: string;
3309
+ }>, z.ZodObject<{
3310
+ type: z.ZodLiteral<"route">;
3311
+ routeId: z.ZodString;
3312
+ }, "strip", z.ZodTypeAny, {
3313
+ type: "route";
3314
+ routeId: string;
3315
+ }, {
3316
+ type: "route";
3317
+ routeId: string;
3318
+ }>, z.ZodObject<{
3319
+ type: z.ZodLiteral<"anchor_visible">;
3320
+ anchorId: z.ZodString;
3321
+ state: z.ZodEnum<["visible", "present", "absent"]>;
3322
+ }, "strip", z.ZodTypeAny, {
3323
+ type: "anchor_visible";
3324
+ anchorId: string;
3325
+ state: "visible" | "present" | "absent";
3326
+ }, {
3327
+ type: "anchor_visible";
3328
+ anchorId: string;
3329
+ state: "visible" | "present" | "absent";
3330
+ }>, z.ZodObject<{
3331
+ type: z.ZodLiteral<"event_occurred">;
3332
+ eventName: z.ZodString;
3333
+ withinMs: z.ZodOptional<z.ZodNumber>;
3334
+ }, "strip", z.ZodTypeAny, {
3335
+ type: "event_occurred";
3336
+ eventName: string;
3337
+ withinMs?: number | undefined;
3338
+ }, {
3339
+ type: "event_occurred";
3340
+ eventName: string;
3341
+ withinMs?: number | undefined;
3342
+ }>, z.ZodObject<{
3343
+ type: z.ZodLiteral<"state_equals">;
3344
+ key: z.ZodString;
3345
+ value: z.ZodUnknown;
3346
+ }, "strip", z.ZodTypeAny, {
3347
+ type: "state_equals";
3348
+ key: string;
3349
+ value?: unknown;
3350
+ }, {
3351
+ type: "state_equals";
3352
+ key: string;
3353
+ value?: unknown;
3354
+ }>, z.ZodObject<{
3355
+ type: z.ZodLiteral<"viewport">;
3356
+ minWidth: z.ZodOptional<z.ZodNumber>;
3357
+ maxWidth: z.ZodOptional<z.ZodNumber>;
3358
+ minHeight: z.ZodOptional<z.ZodNumber>;
3359
+ maxHeight: z.ZodOptional<z.ZodNumber>;
3360
+ }, "strip", z.ZodTypeAny, {
3361
+ type: "viewport";
3362
+ minWidth?: number | undefined;
3363
+ maxWidth?: number | undefined;
3364
+ minHeight?: number | undefined;
3365
+ maxHeight?: number | undefined;
3366
+ }, {
3367
+ type: "viewport";
3368
+ minWidth?: number | undefined;
3369
+ maxWidth?: number | undefined;
3370
+ minHeight?: number | undefined;
3371
+ maxHeight?: number | undefined;
3372
+ }>, z.ZodObject<{
3373
+ type: z.ZodLiteral<"session_metric">;
3374
+ key: z.ZodString;
3375
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
3376
+ threshold: z.ZodNumber;
3377
+ }, "strip", z.ZodTypeAny, {
3378
+ type: "session_metric";
3379
+ key: string;
3380
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3381
+ threshold: number;
3382
+ }, {
3383
+ type: "session_metric";
3384
+ key: string;
3385
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3386
+ threshold: number;
3387
+ }>, z.ZodObject<{
3388
+ type: z.ZodLiteral<"dismissed">;
3389
+ key: z.ZodString;
3390
+ inverted: z.ZodOptional<z.ZodBoolean>;
3391
+ }, "strip", z.ZodTypeAny, {
3392
+ type: "dismissed";
3393
+ key: string;
3394
+ inverted?: boolean | undefined;
3395
+ }, {
3396
+ type: "dismissed";
3397
+ key: string;
3398
+ inverted?: boolean | undefined;
3399
+ }>, z.ZodObject<{
3400
+ type: z.ZodLiteral<"cooldown_active">;
3401
+ key: z.ZodString;
3402
+ inverted: z.ZodOptional<z.ZodBoolean>;
3403
+ }, "strip", z.ZodTypeAny, {
3404
+ type: "cooldown_active";
3405
+ key: string;
3406
+ inverted?: boolean | undefined;
3407
+ }, {
3408
+ type: "cooldown_active";
3409
+ key: string;
3410
+ inverted?: boolean | undefined;
3411
+ }>, z.ZodObject<{
3412
+ type: z.ZodLiteral<"frequency_limit">;
3413
+ key: z.ZodString;
3414
+ limit: z.ZodNumber;
3415
+ inverted: z.ZodOptional<z.ZodBoolean>;
3416
+ }, "strip", z.ZodTypeAny, {
3417
+ type: "frequency_limit";
3418
+ key: string;
3419
+ limit: number;
3420
+ inverted?: boolean | undefined;
3421
+ }, {
3422
+ type: "frequency_limit";
3423
+ key: string;
3424
+ limit: number;
3425
+ inverted?: boolean | undefined;
3426
+ }>, z.ZodObject<{
3427
+ type: z.ZodLiteral<"event_count">;
3428
+ key: z.ZodString;
3429
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
3430
+ count: z.ZodNumber;
3431
+ withinMs: z.ZodOptional<z.ZodNumber>;
3432
+ }, "strip", z.ZodTypeAny, {
3433
+ type: "event_count";
3434
+ key: string;
3435
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3436
+ count: number;
3437
+ withinMs?: number | undefined;
3438
+ }, {
3439
+ type: "event_count";
3440
+ key: string;
3441
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3442
+ count: number;
3443
+ withinMs?: number | undefined;
3444
+ }>]>, "many">;
1513
3445
  value: z.ZodUnknown;
1514
3446
  }, "strip", z.ZodTypeAny, {
1515
- conditions: z.objectOutputType<{
1516
- type: z.ZodString;
1517
- }, z.ZodTypeAny, "passthrough">[];
3447
+ conditions: ({
3448
+ type: "page_url";
3449
+ url: string;
3450
+ } | {
3451
+ type: "route";
3452
+ routeId: string;
3453
+ } | {
3454
+ type: "anchor_visible";
3455
+ anchorId: string;
3456
+ state: "visible" | "present" | "absent";
3457
+ } | {
3458
+ type: "event_occurred";
3459
+ eventName: string;
3460
+ withinMs?: number | undefined;
3461
+ } | {
3462
+ type: "state_equals";
3463
+ key: string;
3464
+ value?: unknown;
3465
+ } | {
3466
+ type: "viewport";
3467
+ minWidth?: number | undefined;
3468
+ maxWidth?: number | undefined;
3469
+ minHeight?: number | undefined;
3470
+ maxHeight?: number | undefined;
3471
+ } | {
3472
+ type: "session_metric";
3473
+ key: string;
3474
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3475
+ threshold: number;
3476
+ } | {
3477
+ type: "dismissed";
3478
+ key: string;
3479
+ inverted?: boolean | undefined;
3480
+ } | {
3481
+ type: "cooldown_active";
3482
+ key: string;
3483
+ inverted?: boolean | undefined;
3484
+ } | {
3485
+ type: "frequency_limit";
3486
+ key: string;
3487
+ limit: number;
3488
+ inverted?: boolean | undefined;
3489
+ } | {
3490
+ type: "event_count";
3491
+ key: string;
3492
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3493
+ count: number;
3494
+ withinMs?: number | undefined;
3495
+ })[];
1518
3496
  value?: unknown;
1519
3497
  }, {
1520
- conditions: z.objectInputType<{
1521
- type: z.ZodString;
1522
- }, z.ZodTypeAny, "passthrough">[];
3498
+ conditions: ({
3499
+ type: "page_url";
3500
+ url: string;
3501
+ } | {
3502
+ type: "route";
3503
+ routeId: string;
3504
+ } | {
3505
+ type: "anchor_visible";
3506
+ anchorId: string;
3507
+ state: "visible" | "present" | "absent";
3508
+ } | {
3509
+ type: "event_occurred";
3510
+ eventName: string;
3511
+ withinMs?: number | undefined;
3512
+ } | {
3513
+ type: "state_equals";
3514
+ key: string;
3515
+ value?: unknown;
3516
+ } | {
3517
+ type: "viewport";
3518
+ minWidth?: number | undefined;
3519
+ maxWidth?: number | undefined;
3520
+ minHeight?: number | undefined;
3521
+ maxHeight?: number | undefined;
3522
+ } | {
3523
+ type: "session_metric";
3524
+ key: string;
3525
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3526
+ threshold: number;
3527
+ } | {
3528
+ type: "dismissed";
3529
+ key: string;
3530
+ inverted?: boolean | undefined;
3531
+ } | {
3532
+ type: "cooldown_active";
3533
+ key: string;
3534
+ inverted?: boolean | undefined;
3535
+ } | {
3536
+ type: "frequency_limit";
3537
+ key: string;
3538
+ limit: number;
3539
+ inverted?: boolean | undefined;
3540
+ } | {
3541
+ type: "event_count";
3542
+ key: string;
3543
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3544
+ count: number;
3545
+ withinMs?: number | undefined;
3546
+ })[];
1523
3547
  value?: unknown;
1524
3548
  }>, "many">;
1525
3549
  default: z.ZodUnknown;
1526
3550
  }, "strip", z.ZodTypeAny, {
3551
+ type: "rules";
1527
3552
  rules: {
1528
- conditions: z.objectOutputType<{
1529
- type: z.ZodString;
1530
- }, z.ZodTypeAny, "passthrough">[];
3553
+ conditions: ({
3554
+ type: "page_url";
3555
+ url: string;
3556
+ } | {
3557
+ type: "route";
3558
+ routeId: string;
3559
+ } | {
3560
+ type: "anchor_visible";
3561
+ anchorId: string;
3562
+ state: "visible" | "present" | "absent";
3563
+ } | {
3564
+ type: "event_occurred";
3565
+ eventName: string;
3566
+ withinMs?: number | undefined;
3567
+ } | {
3568
+ type: "state_equals";
3569
+ key: string;
3570
+ value?: unknown;
3571
+ } | {
3572
+ type: "viewport";
3573
+ minWidth?: number | undefined;
3574
+ maxWidth?: number | undefined;
3575
+ minHeight?: number | undefined;
3576
+ maxHeight?: number | undefined;
3577
+ } | {
3578
+ type: "session_metric";
3579
+ key: string;
3580
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3581
+ threshold: number;
3582
+ } | {
3583
+ type: "dismissed";
3584
+ key: string;
3585
+ inverted?: boolean | undefined;
3586
+ } | {
3587
+ type: "cooldown_active";
3588
+ key: string;
3589
+ inverted?: boolean | undefined;
3590
+ } | {
3591
+ type: "frequency_limit";
3592
+ key: string;
3593
+ limit: number;
3594
+ inverted?: boolean | undefined;
3595
+ } | {
3596
+ type: "event_count";
3597
+ key: string;
3598
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3599
+ count: number;
3600
+ withinMs?: number | undefined;
3601
+ })[];
1531
3602
  value?: unknown;
1532
3603
  }[];
1533
- type: "rules";
1534
3604
  default?: unknown;
1535
3605
  }, {
3606
+ type: "rules";
1536
3607
  rules: {
1537
- conditions: z.objectInputType<{
1538
- type: z.ZodString;
1539
- }, z.ZodTypeAny, "passthrough">[];
3608
+ conditions: ({
3609
+ type: "page_url";
3610
+ url: string;
3611
+ } | {
3612
+ type: "route";
3613
+ routeId: string;
3614
+ } | {
3615
+ type: "anchor_visible";
3616
+ anchorId: string;
3617
+ state: "visible" | "present" | "absent";
3618
+ } | {
3619
+ type: "event_occurred";
3620
+ eventName: string;
3621
+ withinMs?: number | undefined;
3622
+ } | {
3623
+ type: "state_equals";
3624
+ key: string;
3625
+ value?: unknown;
3626
+ } | {
3627
+ type: "viewport";
3628
+ minWidth?: number | undefined;
3629
+ maxWidth?: number | undefined;
3630
+ minHeight?: number | undefined;
3631
+ maxHeight?: number | undefined;
3632
+ } | {
3633
+ type: "session_metric";
3634
+ key: string;
3635
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3636
+ threshold: number;
3637
+ } | {
3638
+ type: "dismissed";
3639
+ key: string;
3640
+ inverted?: boolean | undefined;
3641
+ } | {
3642
+ type: "cooldown_active";
3643
+ key: string;
3644
+ inverted?: boolean | undefined;
3645
+ } | {
3646
+ type: "frequency_limit";
3647
+ key: string;
3648
+ limit: number;
3649
+ inverted?: boolean | undefined;
3650
+ } | {
3651
+ type: "event_count";
3652
+ key: string;
3653
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3654
+ count: number;
3655
+ withinMs?: number | undefined;
3656
+ })[];
1540
3657
  value?: unknown;
1541
3658
  }[];
1542
- type: "rules";
1543
3659
  default?: unknown;
1544
3660
  }>, z.ZodObject<{
1545
3661
  type: z.ZodLiteral<"score">;
@@ -1603,12 +3719,12 @@ export declare const actionStepSchemas: {
1603
3719
  icon: z.ZodOptional<z.ZodString>;
1604
3720
  }, "strip", z.ZodTypeAny, {
1605
3721
  title?: string | undefined;
1606
- icon?: string | undefined;
1607
3722
  body?: string | undefined;
3723
+ icon?: string | undefined;
1608
3724
  }, {
1609
3725
  title?: string | undefined;
1610
- icon?: string | undefined;
1611
3726
  body?: string | undefined;
3727
+ icon?: string | undefined;
1612
3728
  }>>>;
1613
3729
  /** AI-generated reasoning for why this tip was recommended */
1614
3730
  rationale: z.ZodOptional<z.ZodObject<{
@@ -1633,13 +3749,59 @@ export declare const actionStepSchemas: {
1633
3749
  category?: string | undefined;
1634
3750
  };
1635
3751
  showWhen?: {
3752
+ type: "rules";
1636
3753
  rules: {
1637
- conditions: z.objectOutputType<{
1638
- type: z.ZodString;
1639
- }, z.ZodTypeAny, "passthrough">[];
3754
+ conditions: ({
3755
+ type: "page_url";
3756
+ url: string;
3757
+ } | {
3758
+ type: "route";
3759
+ routeId: string;
3760
+ } | {
3761
+ type: "anchor_visible";
3762
+ anchorId: string;
3763
+ state: "visible" | "present" | "absent";
3764
+ } | {
3765
+ type: "event_occurred";
3766
+ eventName: string;
3767
+ withinMs?: number | undefined;
3768
+ } | {
3769
+ type: "state_equals";
3770
+ key: string;
3771
+ value?: unknown;
3772
+ } | {
3773
+ type: "viewport";
3774
+ minWidth?: number | undefined;
3775
+ maxWidth?: number | undefined;
3776
+ minHeight?: number | undefined;
3777
+ maxHeight?: number | undefined;
3778
+ } | {
3779
+ type: "session_metric";
3780
+ key: string;
3781
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3782
+ threshold: number;
3783
+ } | {
3784
+ type: "dismissed";
3785
+ key: string;
3786
+ inverted?: boolean | undefined;
3787
+ } | {
3788
+ type: "cooldown_active";
3789
+ key: string;
3790
+ inverted?: boolean | undefined;
3791
+ } | {
3792
+ type: "frequency_limit";
3793
+ key: string;
3794
+ limit: number;
3795
+ inverted?: boolean | undefined;
3796
+ } | {
3797
+ type: "event_count";
3798
+ key: string;
3799
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3800
+ count: number;
3801
+ withinMs?: number | undefined;
3802
+ })[];
1640
3803
  value?: unknown;
1641
3804
  }[];
1642
- type: "rules";
1643
3805
  default?: unknown;
1644
3806
  } | {
1645
3807
  type: "score";
@@ -1662,8 +3824,8 @@ export declare const actionStepSchemas: {
1662
3824
  } | null | undefined;
1663
3825
  notify?: {
1664
3826
  title?: string | undefined;
1665
- icon?: string | undefined;
1666
3827
  body?: string | undefined;
3828
+ icon?: string | undefined;
1667
3829
  } | null | undefined;
1668
3830
  rationale?: {
1669
3831
  why: string;
@@ -1681,13 +3843,59 @@ export declare const actionStepSchemas: {
1681
3843
  category?: string | undefined;
1682
3844
  };
1683
3845
  showWhen?: {
3846
+ type: "rules";
1684
3847
  rules: {
1685
- conditions: z.objectInputType<{
1686
- type: z.ZodString;
1687
- }, z.ZodTypeAny, "passthrough">[];
3848
+ conditions: ({
3849
+ type: "page_url";
3850
+ url: string;
3851
+ } | {
3852
+ type: "route";
3853
+ routeId: string;
3854
+ } | {
3855
+ type: "anchor_visible";
3856
+ anchorId: string;
3857
+ state: "visible" | "present" | "absent";
3858
+ } | {
3859
+ type: "event_occurred";
3860
+ eventName: string;
3861
+ withinMs?: number | undefined;
3862
+ } | {
3863
+ type: "state_equals";
3864
+ key: string;
3865
+ value?: unknown;
3866
+ } | {
3867
+ type: "viewport";
3868
+ minWidth?: number | undefined;
3869
+ maxWidth?: number | undefined;
3870
+ minHeight?: number | undefined;
3871
+ maxHeight?: number | undefined;
3872
+ } | {
3873
+ type: "session_metric";
3874
+ key: string;
3875
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3876
+ threshold: number;
3877
+ } | {
3878
+ type: "dismissed";
3879
+ key: string;
3880
+ inverted?: boolean | undefined;
3881
+ } | {
3882
+ type: "cooldown_active";
3883
+ key: string;
3884
+ inverted?: boolean | undefined;
3885
+ } | {
3886
+ type: "frequency_limit";
3887
+ key: string;
3888
+ limit: number;
3889
+ inverted?: boolean | undefined;
3890
+ } | {
3891
+ type: "event_count";
3892
+ key: string;
3893
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3894
+ count: number;
3895
+ withinMs?: number | undefined;
3896
+ })[];
1688
3897
  value?: unknown;
1689
3898
  }[];
1690
- type: "rules";
1691
3899
  default?: unknown;
1692
3900
  } | {
1693
3901
  type: "score";
@@ -1710,8 +3918,8 @@ export declare const actionStepSchemas: {
1710
3918
  } | null | undefined;
1711
3919
  notify?: {
1712
3920
  title?: string | undefined;
1713
- icon?: string | undefined;
1714
3921
  body?: string | undefined;
3922
+ icon?: string | undefined;
1715
3923
  } | null | undefined;
1716
3924
  rationale?: {
1717
3925
  why: string;
@@ -1773,43 +3981,365 @@ export declare const tileWidgets: {
1773
3981
  showWhen: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1774
3982
  type: z.ZodLiteral<"rules">;
1775
3983
  rules: z.ZodArray<z.ZodObject<{
1776
- conditions: z.ZodArray<z.ZodObject<{
1777
- type: z.ZodString;
1778
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1779
- type: z.ZodString;
1780
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1781
- type: z.ZodString;
1782
- }, z.ZodTypeAny, "passthrough">>, "many">;
3984
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3985
+ type: z.ZodLiteral<"page_url">;
3986
+ url: z.ZodString;
3987
+ }, "strip", z.ZodTypeAny, {
3988
+ type: "page_url";
3989
+ url: string;
3990
+ }, {
3991
+ type: "page_url";
3992
+ url: string;
3993
+ }>, z.ZodObject<{
3994
+ type: z.ZodLiteral<"route">;
3995
+ routeId: z.ZodString;
3996
+ }, "strip", z.ZodTypeAny, {
3997
+ type: "route";
3998
+ routeId: string;
3999
+ }, {
4000
+ type: "route";
4001
+ routeId: string;
4002
+ }>, z.ZodObject<{
4003
+ type: z.ZodLiteral<"anchor_visible">;
4004
+ anchorId: z.ZodString;
4005
+ state: z.ZodEnum<["visible", "present", "absent"]>;
4006
+ }, "strip", z.ZodTypeAny, {
4007
+ type: "anchor_visible";
4008
+ anchorId: string;
4009
+ state: "visible" | "present" | "absent";
4010
+ }, {
4011
+ type: "anchor_visible";
4012
+ anchorId: string;
4013
+ state: "visible" | "present" | "absent";
4014
+ }>, z.ZodObject<{
4015
+ type: z.ZodLiteral<"event_occurred">;
4016
+ eventName: z.ZodString;
4017
+ withinMs: z.ZodOptional<z.ZodNumber>;
4018
+ }, "strip", z.ZodTypeAny, {
4019
+ type: "event_occurred";
4020
+ eventName: string;
4021
+ withinMs?: number | undefined;
4022
+ }, {
4023
+ type: "event_occurred";
4024
+ eventName: string;
4025
+ withinMs?: number | undefined;
4026
+ }>, z.ZodObject<{
4027
+ type: z.ZodLiteral<"state_equals">;
4028
+ key: z.ZodString;
4029
+ value: z.ZodUnknown;
4030
+ }, "strip", z.ZodTypeAny, {
4031
+ type: "state_equals";
4032
+ key: string;
4033
+ value?: unknown;
4034
+ }, {
4035
+ type: "state_equals";
4036
+ key: string;
4037
+ value?: unknown;
4038
+ }>, z.ZodObject<{
4039
+ type: z.ZodLiteral<"viewport">;
4040
+ minWidth: z.ZodOptional<z.ZodNumber>;
4041
+ maxWidth: z.ZodOptional<z.ZodNumber>;
4042
+ minHeight: z.ZodOptional<z.ZodNumber>;
4043
+ maxHeight: z.ZodOptional<z.ZodNumber>;
4044
+ }, "strip", z.ZodTypeAny, {
4045
+ type: "viewport";
4046
+ minWidth?: number | undefined;
4047
+ maxWidth?: number | undefined;
4048
+ minHeight?: number | undefined;
4049
+ maxHeight?: number | undefined;
4050
+ }, {
4051
+ type: "viewport";
4052
+ minWidth?: number | undefined;
4053
+ maxWidth?: number | undefined;
4054
+ minHeight?: number | undefined;
4055
+ maxHeight?: number | undefined;
4056
+ }>, z.ZodObject<{
4057
+ type: z.ZodLiteral<"session_metric">;
4058
+ key: z.ZodString;
4059
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
4060
+ threshold: z.ZodNumber;
4061
+ }, "strip", z.ZodTypeAny, {
4062
+ type: "session_metric";
4063
+ key: string;
4064
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4065
+ threshold: number;
4066
+ }, {
4067
+ type: "session_metric";
4068
+ key: string;
4069
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4070
+ threshold: number;
4071
+ }>, z.ZodObject<{
4072
+ type: z.ZodLiteral<"dismissed">;
4073
+ key: z.ZodString;
4074
+ inverted: z.ZodOptional<z.ZodBoolean>;
4075
+ }, "strip", z.ZodTypeAny, {
4076
+ type: "dismissed";
4077
+ key: string;
4078
+ inverted?: boolean | undefined;
4079
+ }, {
4080
+ type: "dismissed";
4081
+ key: string;
4082
+ inverted?: boolean | undefined;
4083
+ }>, z.ZodObject<{
4084
+ type: z.ZodLiteral<"cooldown_active">;
4085
+ key: z.ZodString;
4086
+ inverted: z.ZodOptional<z.ZodBoolean>;
4087
+ }, "strip", z.ZodTypeAny, {
4088
+ type: "cooldown_active";
4089
+ key: string;
4090
+ inverted?: boolean | undefined;
4091
+ }, {
4092
+ type: "cooldown_active";
4093
+ key: string;
4094
+ inverted?: boolean | undefined;
4095
+ }>, z.ZodObject<{
4096
+ type: z.ZodLiteral<"frequency_limit">;
4097
+ key: z.ZodString;
4098
+ limit: z.ZodNumber;
4099
+ inverted: z.ZodOptional<z.ZodBoolean>;
4100
+ }, "strip", z.ZodTypeAny, {
4101
+ type: "frequency_limit";
4102
+ key: string;
4103
+ limit: number;
4104
+ inverted?: boolean | undefined;
4105
+ }, {
4106
+ type: "frequency_limit";
4107
+ key: string;
4108
+ limit: number;
4109
+ inverted?: boolean | undefined;
4110
+ }>, z.ZodObject<{
4111
+ type: z.ZodLiteral<"event_count">;
4112
+ key: z.ZodString;
4113
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
4114
+ count: z.ZodNumber;
4115
+ withinMs: z.ZodOptional<z.ZodNumber>;
4116
+ }, "strip", z.ZodTypeAny, {
4117
+ type: "event_count";
4118
+ key: string;
4119
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4120
+ count: number;
4121
+ withinMs?: number | undefined;
4122
+ }, {
4123
+ type: "event_count";
4124
+ key: string;
4125
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4126
+ count: number;
4127
+ withinMs?: number | undefined;
4128
+ }>]>, "many">;
1783
4129
  value: z.ZodUnknown;
1784
4130
  }, "strip", z.ZodTypeAny, {
1785
- conditions: z.objectOutputType<{
1786
- type: z.ZodString;
1787
- }, z.ZodTypeAny, "passthrough">[];
4131
+ conditions: ({
4132
+ type: "page_url";
4133
+ url: string;
4134
+ } | {
4135
+ type: "route";
4136
+ routeId: string;
4137
+ } | {
4138
+ type: "anchor_visible";
4139
+ anchorId: string;
4140
+ state: "visible" | "present" | "absent";
4141
+ } | {
4142
+ type: "event_occurred";
4143
+ eventName: string;
4144
+ withinMs?: number | undefined;
4145
+ } | {
4146
+ type: "state_equals";
4147
+ key: string;
4148
+ value?: unknown;
4149
+ } | {
4150
+ type: "viewport";
4151
+ minWidth?: number | undefined;
4152
+ maxWidth?: number | undefined;
4153
+ minHeight?: number | undefined;
4154
+ maxHeight?: number | undefined;
4155
+ } | {
4156
+ type: "session_metric";
4157
+ key: string;
4158
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4159
+ threshold: number;
4160
+ } | {
4161
+ type: "dismissed";
4162
+ key: string;
4163
+ inverted?: boolean | undefined;
4164
+ } | {
4165
+ type: "cooldown_active";
4166
+ key: string;
4167
+ inverted?: boolean | undefined;
4168
+ } | {
4169
+ type: "frequency_limit";
4170
+ key: string;
4171
+ limit: number;
4172
+ inverted?: boolean | undefined;
4173
+ } | {
4174
+ type: "event_count";
4175
+ key: string;
4176
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4177
+ count: number;
4178
+ withinMs?: number | undefined;
4179
+ })[];
1788
4180
  value?: unknown;
1789
4181
  }, {
1790
- conditions: z.objectInputType<{
1791
- type: z.ZodString;
1792
- }, z.ZodTypeAny, "passthrough">[];
4182
+ conditions: ({
4183
+ type: "page_url";
4184
+ url: string;
4185
+ } | {
4186
+ type: "route";
4187
+ routeId: string;
4188
+ } | {
4189
+ type: "anchor_visible";
4190
+ anchorId: string;
4191
+ state: "visible" | "present" | "absent";
4192
+ } | {
4193
+ type: "event_occurred";
4194
+ eventName: string;
4195
+ withinMs?: number | undefined;
4196
+ } | {
4197
+ type: "state_equals";
4198
+ key: string;
4199
+ value?: unknown;
4200
+ } | {
4201
+ type: "viewport";
4202
+ minWidth?: number | undefined;
4203
+ maxWidth?: number | undefined;
4204
+ minHeight?: number | undefined;
4205
+ maxHeight?: number | undefined;
4206
+ } | {
4207
+ type: "session_metric";
4208
+ key: string;
4209
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4210
+ threshold: number;
4211
+ } | {
4212
+ type: "dismissed";
4213
+ key: string;
4214
+ inverted?: boolean | undefined;
4215
+ } | {
4216
+ type: "cooldown_active";
4217
+ key: string;
4218
+ inverted?: boolean | undefined;
4219
+ } | {
4220
+ type: "frequency_limit";
4221
+ key: string;
4222
+ limit: number;
4223
+ inverted?: boolean | undefined;
4224
+ } | {
4225
+ type: "event_count";
4226
+ key: string;
4227
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4228
+ count: number;
4229
+ withinMs?: number | undefined;
4230
+ })[];
1793
4231
  value?: unknown;
1794
4232
  }>, "many">;
1795
4233
  default: z.ZodUnknown;
1796
4234
  }, "strip", z.ZodTypeAny, {
4235
+ type: "rules";
1797
4236
  rules: {
1798
- conditions: z.objectOutputType<{
1799
- type: z.ZodString;
1800
- }, z.ZodTypeAny, "passthrough">[];
4237
+ conditions: ({
4238
+ type: "page_url";
4239
+ url: string;
4240
+ } | {
4241
+ type: "route";
4242
+ routeId: string;
4243
+ } | {
4244
+ type: "anchor_visible";
4245
+ anchorId: string;
4246
+ state: "visible" | "present" | "absent";
4247
+ } | {
4248
+ type: "event_occurred";
4249
+ eventName: string;
4250
+ withinMs?: number | undefined;
4251
+ } | {
4252
+ type: "state_equals";
4253
+ key: string;
4254
+ value?: unknown;
4255
+ } | {
4256
+ type: "viewport";
4257
+ minWidth?: number | undefined;
4258
+ maxWidth?: number | undefined;
4259
+ minHeight?: number | undefined;
4260
+ maxHeight?: number | undefined;
4261
+ } | {
4262
+ type: "session_metric";
4263
+ key: string;
4264
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4265
+ threshold: number;
4266
+ } | {
4267
+ type: "dismissed";
4268
+ key: string;
4269
+ inverted?: boolean | undefined;
4270
+ } | {
4271
+ type: "cooldown_active";
4272
+ key: string;
4273
+ inverted?: boolean | undefined;
4274
+ } | {
4275
+ type: "frequency_limit";
4276
+ key: string;
4277
+ limit: number;
4278
+ inverted?: boolean | undefined;
4279
+ } | {
4280
+ type: "event_count";
4281
+ key: string;
4282
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4283
+ count: number;
4284
+ withinMs?: number | undefined;
4285
+ })[];
1801
4286
  value?: unknown;
1802
4287
  }[];
1803
- type: "rules";
1804
4288
  default?: unknown;
1805
4289
  }, {
4290
+ type: "rules";
1806
4291
  rules: {
1807
- conditions: z.objectInputType<{
1808
- type: z.ZodString;
1809
- }, z.ZodTypeAny, "passthrough">[];
4292
+ conditions: ({
4293
+ type: "page_url";
4294
+ url: string;
4295
+ } | {
4296
+ type: "route";
4297
+ routeId: string;
4298
+ } | {
4299
+ type: "anchor_visible";
4300
+ anchorId: string;
4301
+ state: "visible" | "present" | "absent";
4302
+ } | {
4303
+ type: "event_occurred";
4304
+ eventName: string;
4305
+ withinMs?: number | undefined;
4306
+ } | {
4307
+ type: "state_equals";
4308
+ key: string;
4309
+ value?: unknown;
4310
+ } | {
4311
+ type: "viewport";
4312
+ minWidth?: number | undefined;
4313
+ maxWidth?: number | undefined;
4314
+ minHeight?: number | undefined;
4315
+ maxHeight?: number | undefined;
4316
+ } | {
4317
+ type: "session_metric";
4318
+ key: string;
4319
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4320
+ threshold: number;
4321
+ } | {
4322
+ type: "dismissed";
4323
+ key: string;
4324
+ inverted?: boolean | undefined;
4325
+ } | {
4326
+ type: "cooldown_active";
4327
+ key: string;
4328
+ inverted?: boolean | undefined;
4329
+ } | {
4330
+ type: "frequency_limit";
4331
+ key: string;
4332
+ limit: number;
4333
+ inverted?: boolean | undefined;
4334
+ } | {
4335
+ type: "event_count";
4336
+ key: string;
4337
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4338
+ count: number;
4339
+ withinMs?: number | undefined;
4340
+ })[];
1810
4341
  value?: unknown;
1811
4342
  }[];
1812
- type: "rules";
1813
4343
  default?: unknown;
1814
4344
  }>, z.ZodObject<{
1815
4345
  type: z.ZodLiteral<"score">;
@@ -1873,12 +4403,12 @@ export declare const tileWidgets: {
1873
4403
  icon: z.ZodOptional<z.ZodString>;
1874
4404
  }, "strip", z.ZodTypeAny, {
1875
4405
  title?: string | undefined;
1876
- icon?: string | undefined;
1877
4406
  body?: string | undefined;
4407
+ icon?: string | undefined;
1878
4408
  }, {
1879
4409
  title?: string | undefined;
1880
- icon?: string | undefined;
1881
4410
  body?: string | undefined;
4411
+ icon?: string | undefined;
1882
4412
  }>>>;
1883
4413
  /** AI-generated reasoning for why this tip was recommended */
1884
4414
  rationale: z.ZodOptional<z.ZodObject<{
@@ -1903,13 +4433,59 @@ export declare const tileWidgets: {
1903
4433
  category?: string | undefined;
1904
4434
  };
1905
4435
  showWhen?: {
4436
+ type: "rules";
1906
4437
  rules: {
1907
- conditions: z.objectOutputType<{
1908
- type: z.ZodString;
1909
- }, z.ZodTypeAny, "passthrough">[];
4438
+ conditions: ({
4439
+ type: "page_url";
4440
+ url: string;
4441
+ } | {
4442
+ type: "route";
4443
+ routeId: string;
4444
+ } | {
4445
+ type: "anchor_visible";
4446
+ anchorId: string;
4447
+ state: "visible" | "present" | "absent";
4448
+ } | {
4449
+ type: "event_occurred";
4450
+ eventName: string;
4451
+ withinMs?: number | undefined;
4452
+ } | {
4453
+ type: "state_equals";
4454
+ key: string;
4455
+ value?: unknown;
4456
+ } | {
4457
+ type: "viewport";
4458
+ minWidth?: number | undefined;
4459
+ maxWidth?: number | undefined;
4460
+ minHeight?: number | undefined;
4461
+ maxHeight?: number | undefined;
4462
+ } | {
4463
+ type: "session_metric";
4464
+ key: string;
4465
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4466
+ threshold: number;
4467
+ } | {
4468
+ type: "dismissed";
4469
+ key: string;
4470
+ inverted?: boolean | undefined;
4471
+ } | {
4472
+ type: "cooldown_active";
4473
+ key: string;
4474
+ inverted?: boolean | undefined;
4475
+ } | {
4476
+ type: "frequency_limit";
4477
+ key: string;
4478
+ limit: number;
4479
+ inverted?: boolean | undefined;
4480
+ } | {
4481
+ type: "event_count";
4482
+ key: string;
4483
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4484
+ count: number;
4485
+ withinMs?: number | undefined;
4486
+ })[];
1910
4487
  value?: unknown;
1911
4488
  }[];
1912
- type: "rules";
1913
4489
  default?: unknown;
1914
4490
  } | {
1915
4491
  type: "score";
@@ -1932,8 +4508,8 @@ export declare const tileWidgets: {
1932
4508
  } | null | undefined;
1933
4509
  notify?: {
1934
4510
  title?: string | undefined;
1935
- icon?: string | undefined;
1936
4511
  body?: string | undefined;
4512
+ icon?: string | undefined;
1937
4513
  } | null | undefined;
1938
4514
  rationale?: {
1939
4515
  why: string;
@@ -1951,13 +4527,59 @@ export declare const tileWidgets: {
1951
4527
  category?: string | undefined;
1952
4528
  };
1953
4529
  showWhen?: {
4530
+ type: "rules";
1954
4531
  rules: {
1955
- conditions: z.objectInputType<{
1956
- type: z.ZodString;
1957
- }, z.ZodTypeAny, "passthrough">[];
4532
+ conditions: ({
4533
+ type: "page_url";
4534
+ url: string;
4535
+ } | {
4536
+ type: "route";
4537
+ routeId: string;
4538
+ } | {
4539
+ type: "anchor_visible";
4540
+ anchorId: string;
4541
+ state: "visible" | "present" | "absent";
4542
+ } | {
4543
+ type: "event_occurred";
4544
+ eventName: string;
4545
+ withinMs?: number | undefined;
4546
+ } | {
4547
+ type: "state_equals";
4548
+ key: string;
4549
+ value?: unknown;
4550
+ } | {
4551
+ type: "viewport";
4552
+ minWidth?: number | undefined;
4553
+ maxWidth?: number | undefined;
4554
+ minHeight?: number | undefined;
4555
+ maxHeight?: number | undefined;
4556
+ } | {
4557
+ type: "session_metric";
4558
+ key: string;
4559
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4560
+ threshold: number;
4561
+ } | {
4562
+ type: "dismissed";
4563
+ key: string;
4564
+ inverted?: boolean | undefined;
4565
+ } | {
4566
+ type: "cooldown_active";
4567
+ key: string;
4568
+ inverted?: boolean | undefined;
4569
+ } | {
4570
+ type: "frequency_limit";
4571
+ key: string;
4572
+ limit: number;
4573
+ inverted?: boolean | undefined;
4574
+ } | {
4575
+ type: "event_count";
4576
+ key: string;
4577
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4578
+ count: number;
4579
+ withinMs?: number | undefined;
4580
+ })[];
1958
4581
  value?: unknown;
1959
4582
  }[];
1960
- type: "rules";
1961
4583
  default?: unknown;
1962
4584
  } | {
1963
4585
  type: "score";
@@ -1980,8 +4602,8 @@ export declare const tileWidgets: {
1980
4602
  } | null | undefined;
1981
4603
  notify?: {
1982
4604
  title?: string | undefined;
1983
- icon?: string | undefined;
1984
4605
  body?: string | undefined;
4606
+ icon?: string | undefined;
1985
4607
  } | null | undefined;
1986
4608
  rationale?: {
1987
4609
  why: string;
@@ -1999,13 +4621,59 @@ export declare const tileWidgets: {
1999
4621
  category?: string | undefined;
2000
4622
  };
2001
4623
  showWhen?: {
4624
+ type: "rules";
2002
4625
  rules: {
2003
- conditions: z.objectOutputType<{
2004
- type: z.ZodString;
2005
- }, z.ZodTypeAny, "passthrough">[];
4626
+ conditions: ({
4627
+ type: "page_url";
4628
+ url: string;
4629
+ } | {
4630
+ type: "route";
4631
+ routeId: string;
4632
+ } | {
4633
+ type: "anchor_visible";
4634
+ anchorId: string;
4635
+ state: "visible" | "present" | "absent";
4636
+ } | {
4637
+ type: "event_occurred";
4638
+ eventName: string;
4639
+ withinMs?: number | undefined;
4640
+ } | {
4641
+ type: "state_equals";
4642
+ key: string;
4643
+ value?: unknown;
4644
+ } | {
4645
+ type: "viewport";
4646
+ minWidth?: number | undefined;
4647
+ maxWidth?: number | undefined;
4648
+ minHeight?: number | undefined;
4649
+ maxHeight?: number | undefined;
4650
+ } | {
4651
+ type: "session_metric";
4652
+ key: string;
4653
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4654
+ threshold: number;
4655
+ } | {
4656
+ type: "dismissed";
4657
+ key: string;
4658
+ inverted?: boolean | undefined;
4659
+ } | {
4660
+ type: "cooldown_active";
4661
+ key: string;
4662
+ inverted?: boolean | undefined;
4663
+ } | {
4664
+ type: "frequency_limit";
4665
+ key: string;
4666
+ limit: number;
4667
+ inverted?: boolean | undefined;
4668
+ } | {
4669
+ type: "event_count";
4670
+ key: string;
4671
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4672
+ count: number;
4673
+ withinMs?: number | undefined;
4674
+ })[];
2006
4675
  value?: unknown;
2007
4676
  }[];
2008
- type: "rules";
2009
4677
  default?: unknown;
2010
4678
  } | {
2011
4679
  type: "score";
@@ -2028,8 +4696,8 @@ export declare const tileWidgets: {
2028
4696
  } | null | undefined;
2029
4697
  notify?: {
2030
4698
  title?: string | undefined;
2031
- icon?: string | undefined;
2032
4699
  body?: string | undefined;
4700
+ icon?: string | undefined;
2033
4701
  } | null | undefined;
2034
4702
  rationale?: {
2035
4703
  why: string;
@@ -2047,13 +4715,59 @@ export declare const tileWidgets: {
2047
4715
  category?: string | undefined;
2048
4716
  };
2049
4717
  showWhen?: {
4718
+ type: "rules";
2050
4719
  rules: {
2051
- conditions: z.objectInputType<{
2052
- type: z.ZodString;
2053
- }, z.ZodTypeAny, "passthrough">[];
4720
+ conditions: ({
4721
+ type: "page_url";
4722
+ url: string;
4723
+ } | {
4724
+ type: "route";
4725
+ routeId: string;
4726
+ } | {
4727
+ type: "anchor_visible";
4728
+ anchorId: string;
4729
+ state: "visible" | "present" | "absent";
4730
+ } | {
4731
+ type: "event_occurred";
4732
+ eventName: string;
4733
+ withinMs?: number | undefined;
4734
+ } | {
4735
+ type: "state_equals";
4736
+ key: string;
4737
+ value?: unknown;
4738
+ } | {
4739
+ type: "viewport";
4740
+ minWidth?: number | undefined;
4741
+ maxWidth?: number | undefined;
4742
+ minHeight?: number | undefined;
4743
+ maxHeight?: number | undefined;
4744
+ } | {
4745
+ type: "session_metric";
4746
+ key: string;
4747
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4748
+ threshold: number;
4749
+ } | {
4750
+ type: "dismissed";
4751
+ key: string;
4752
+ inverted?: boolean | undefined;
4753
+ } | {
4754
+ type: "cooldown_active";
4755
+ key: string;
4756
+ inverted?: boolean | undefined;
4757
+ } | {
4758
+ type: "frequency_limit";
4759
+ key: string;
4760
+ limit: number;
4761
+ inverted?: boolean | undefined;
4762
+ } | {
4763
+ type: "event_count";
4764
+ key: string;
4765
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4766
+ count: number;
4767
+ withinMs?: number | undefined;
4768
+ })[];
2054
4769
  value?: unknown;
2055
4770
  }[];
2056
- type: "rules";
2057
4771
  default?: unknown;
2058
4772
  } | {
2059
4773
  type: "score";
@@ -2076,8 +4790,8 @@ export declare const tileWidgets: {
2076
4790
  } | null | undefined;
2077
4791
  notify?: {
2078
4792
  title?: string | undefined;
2079
- icon?: string | undefined;
2080
4793
  body?: string | undefined;
4794
+ icon?: string | undefined;
2081
4795
  } | null | undefined;
2082
4796
  rationale?: {
2083
4797
  why: string;
@@ -2113,13 +4827,59 @@ export declare const tileWidgets: {
2113
4827
  category?: string | undefined;
2114
4828
  };
2115
4829
  showWhen?: {
4830
+ type: "rules";
2116
4831
  rules: {
2117
- conditions: z.objectOutputType<{
2118
- type: z.ZodString;
2119
- }, z.ZodTypeAny, "passthrough">[];
4832
+ conditions: ({
4833
+ type: "page_url";
4834
+ url: string;
4835
+ } | {
4836
+ type: "route";
4837
+ routeId: string;
4838
+ } | {
4839
+ type: "anchor_visible";
4840
+ anchorId: string;
4841
+ state: "visible" | "present" | "absent";
4842
+ } | {
4843
+ type: "event_occurred";
4844
+ eventName: string;
4845
+ withinMs?: number | undefined;
4846
+ } | {
4847
+ type: "state_equals";
4848
+ key: string;
4849
+ value?: unknown;
4850
+ } | {
4851
+ type: "viewport";
4852
+ minWidth?: number | undefined;
4853
+ maxWidth?: number | undefined;
4854
+ minHeight?: number | undefined;
4855
+ maxHeight?: number | undefined;
4856
+ } | {
4857
+ type: "session_metric";
4858
+ key: string;
4859
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4860
+ threshold: number;
4861
+ } | {
4862
+ type: "dismissed";
4863
+ key: string;
4864
+ inverted?: boolean | undefined;
4865
+ } | {
4866
+ type: "cooldown_active";
4867
+ key: string;
4868
+ inverted?: boolean | undefined;
4869
+ } | {
4870
+ type: "frequency_limit";
4871
+ key: string;
4872
+ limit: number;
4873
+ inverted?: boolean | undefined;
4874
+ } | {
4875
+ type: "event_count";
4876
+ key: string;
4877
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4878
+ count: number;
4879
+ withinMs?: number | undefined;
4880
+ })[];
2120
4881
  value?: unknown;
2121
4882
  }[];
2122
- type: "rules";
2123
4883
  default?: unknown;
2124
4884
  } | {
2125
4885
  type: "score";
@@ -2142,8 +4902,8 @@ export declare const tileWidgets: {
2142
4902
  } | null | undefined;
2143
4903
  notify?: {
2144
4904
  title?: string | undefined;
2145
- icon?: string | undefined;
2146
4905
  body?: string | undefined;
4906
+ icon?: string | undefined;
2147
4907
  } | null | undefined;
2148
4908
  rationale?: {
2149
4909
  why: string;
@@ -2172,13 +4932,59 @@ export declare const tileWidgets: {
2172
4932
  category?: string | undefined;
2173
4933
  };
2174
4934
  showWhen?: {
4935
+ type: "rules";
2175
4936
  rules: {
2176
- conditions: z.objectInputType<{
2177
- type: z.ZodString;
2178
- }, z.ZodTypeAny, "passthrough">[];
4937
+ conditions: ({
4938
+ type: "page_url";
4939
+ url: string;
4940
+ } | {
4941
+ type: "route";
4942
+ routeId: string;
4943
+ } | {
4944
+ type: "anchor_visible";
4945
+ anchorId: string;
4946
+ state: "visible" | "present" | "absent";
4947
+ } | {
4948
+ type: "event_occurred";
4949
+ eventName: string;
4950
+ withinMs?: number | undefined;
4951
+ } | {
4952
+ type: "state_equals";
4953
+ key: string;
4954
+ value?: unknown;
4955
+ } | {
4956
+ type: "viewport";
4957
+ minWidth?: number | undefined;
4958
+ maxWidth?: number | undefined;
4959
+ minHeight?: number | undefined;
4960
+ maxHeight?: number | undefined;
4961
+ } | {
4962
+ type: "session_metric";
4963
+ key: string;
4964
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4965
+ threshold: number;
4966
+ } | {
4967
+ type: "dismissed";
4968
+ key: string;
4969
+ inverted?: boolean | undefined;
4970
+ } | {
4971
+ type: "cooldown_active";
4972
+ key: string;
4973
+ inverted?: boolean | undefined;
4974
+ } | {
4975
+ type: "frequency_limit";
4976
+ key: string;
4977
+ limit: number;
4978
+ inverted?: boolean | undefined;
4979
+ } | {
4980
+ type: "event_count";
4981
+ key: string;
4982
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4983
+ count: number;
4984
+ withinMs?: number | undefined;
4985
+ })[];
2179
4986
  value?: unknown;
2180
4987
  }[];
2181
- type: "rules";
2182
4988
  default?: unknown;
2183
4989
  } | {
2184
4990
  type: "score";
@@ -2201,8 +5007,8 @@ export declare const tileWidgets: {
2201
5007
  } | null | undefined;
2202
5008
  notify?: {
2203
5009
  title?: string | undefined;
2204
- icon?: string | undefined;
2205
5010
  body?: string | undefined;
5011
+ icon?: string | undefined;
2206
5012
  } | null | undefined;
2207
5013
  rationale?: {
2208
5014
  why: string;