@syntrologie/adapt-chatbot 2.27.0 → 2.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/AdaptiveChatBar.d.ts +76 -0
  2. package/dist/AdaptiveChatBar.d.ts.map +1 -0
  3. package/dist/AdaptiveChatBar.js +10 -0
  4. package/dist/AdaptiveChatBar.js.map +7 -0
  5. package/dist/AdaptiveChatBarMountable.d.ts +35 -0
  6. package/dist/AdaptiveChatBarMountable.d.ts.map +1 -0
  7. package/dist/AdaptiveChatTrail.d.ts +77 -0
  8. package/dist/AdaptiveChatTrail.d.ts.map +1 -0
  9. package/dist/AdaptiveChatTrail.js +9 -0
  10. package/dist/AdaptiveChatTrail.js.map +7 -0
  11. package/dist/AdaptiveChipsStrip.d.ts +1150 -0
  12. package/dist/AdaptiveChipsStrip.d.ts.map +1 -0
  13. package/dist/AdaptiveChipsStrip.js +11 -0
  14. package/dist/AdaptiveChipsStrip.js.map +7 -0
  15. package/dist/AdaptiveChipsStripMountable.d.ts +24 -0
  16. package/dist/AdaptiveChipsStripMountable.d.ts.map +1 -0
  17. package/dist/ChatAssistantLit.d.ts +22 -50
  18. package/dist/ChatAssistantLit.d.ts.map +1 -1
  19. package/dist/ChatAssistantLit.js +5 -3
  20. package/dist/ChatSession.d.ts +178 -0
  21. package/dist/ChatSession.d.ts.map +1 -0
  22. package/dist/ChatTransport.d.ts +283 -0
  23. package/dist/ChatTransport.d.ts.map +1 -0
  24. package/dist/NavLinkMountable.d.ts +25 -0
  25. package/dist/NavLinkMountable.d.ts.map +1 -0
  26. package/dist/NavLinkMountable.test.d.ts +2 -0
  27. package/dist/NavLinkMountable.test.d.ts.map +1 -0
  28. package/dist/TextAnswerMountable.d.ts +17 -0
  29. package/dist/TextAnswerMountable.d.ts.map +1 -0
  30. package/dist/Turnstile.d.ts +83 -0
  31. package/dist/Turnstile.d.ts.map +1 -0
  32. package/dist/chunk-435KJD27.js +192 -0
  33. package/dist/chunk-435KJD27.js.map +7 -0
  34. package/dist/chunk-AUER7ZCK.js +634 -0
  35. package/dist/chunk-AUER7ZCK.js.map +7 -0
  36. package/dist/chunk-DOMEUJR7.js +382 -0
  37. package/dist/chunk-DOMEUJR7.js.map +7 -0
  38. package/dist/{chunk-W457NMGD.js → chunk-KUO67E2W.js} +1537 -4130
  39. package/dist/chunk-KUO67E2W.js.map +7 -0
  40. package/dist/chunk-QELVKBQV.js +214 -0
  41. package/dist/chunk-QELVKBQV.js.map +7 -0
  42. package/dist/chunk-UC4XU6GH.js +3306 -0
  43. package/dist/chunk-UC4XU6GH.js.map +7 -0
  44. package/dist/elements/ActionHandler.d.ts +34 -0
  45. package/dist/elements/ActionHandler.d.ts.map +1 -0
  46. package/dist/elements/ElementInstanceStore.d.ts +155 -0
  47. package/dist/elements/ElementInstanceStore.d.ts.map +1 -0
  48. package/dist/elements/ElementInstanceStore.test.d.ts +2 -0
  49. package/dist/elements/ElementInstanceStore.test.d.ts.map +1 -0
  50. package/dist/elements/ElementTypeHandler.d.ts +77 -0
  51. package/dist/elements/ElementTypeHandler.d.ts.map +1 -0
  52. package/dist/elements/ItemHandler.d.ts +60 -0
  53. package/dist/elements/ItemHandler.d.ts.map +1 -0
  54. package/dist/elements/ItemHandler.test.d.ts +2 -0
  55. package/dist/elements/ItemHandler.test.d.ts.map +1 -0
  56. package/dist/elements/TileHandler.d.ts +52 -0
  57. package/dist/elements/TileHandler.d.ts.map +1 -0
  58. package/dist/elements/blockRenderer.d.ts +46 -0
  59. package/dist/elements/blockRenderer.d.ts.map +1 -0
  60. package/dist/elements/blockRenderer.test.d.ts +13 -0
  61. package/dist/elements/blockRenderer.test.d.ts.map +1 -0
  62. package/dist/elements/blocks.d.ts +58 -0
  63. package/dist/elements/blocks.d.ts.map +1 -0
  64. package/dist/elements/envelope.d.ts +24 -0
  65. package/dist/elements/envelope.d.ts.map +1 -0
  66. package/dist/elements/fetcher.d.ts +40 -0
  67. package/dist/elements/fetcher.d.ts.map +1 -0
  68. package/dist/elements/index.d.ts +32 -0
  69. package/dist/elements/index.d.ts.map +1 -0
  70. package/dist/elements/types.d.ts +106 -0
  71. package/dist/elements/types.d.ts.map +1 -0
  72. package/dist/observer/__tests__/allowlist.test.d.ts +9 -0
  73. package/dist/observer/__tests__/allowlist.test.d.ts.map +1 -0
  74. package/dist/observer/__tests__/observer-isolation.test.d.ts +13 -0
  75. package/dist/observer/__tests__/observer-isolation.test.d.ts.map +1 -0
  76. package/dist/observer/__tests__/queue.test.d.ts +2 -0
  77. package/dist/observer/__tests__/queue.test.d.ts.map +1 -0
  78. package/dist/observer/__tests__/transport.test.d.ts +2 -0
  79. package/dist/observer/__tests__/transport.test.d.ts.map +1 -0
  80. package/dist/observer/allowlist.d.ts +32 -0
  81. package/dist/observer/allowlist.d.ts.map +1 -0
  82. package/dist/observer/index.d.ts +35 -0
  83. package/dist/observer/index.d.ts.map +1 -0
  84. package/dist/observer/queue.d.ts +57 -0
  85. package/dist/observer/queue.d.ts.map +1 -0
  86. package/dist/observer/transport.d.ts +26 -0
  87. package/dist/observer/transport.d.ts.map +1 -0
  88. package/dist/runtime.d.ts +7 -0
  89. package/dist/runtime.d.ts.map +1 -1
  90. package/dist/runtime.js +1617 -2
  91. package/dist/runtime.js.map +4 -4
  92. package/dist/schema.d.ts +3120 -7
  93. package/dist/schema.d.ts.map +1 -1
  94. package/dist/schema.js +40 -0
  95. package/dist/schema.js.map +2 -2
  96. package/dist/types.d.ts +30 -2
  97. package/dist/types.d.ts.map +1 -1
  98. package/package.json +13 -1
  99. package/dist/chunk-W457NMGD.js.map +0 -7
package/dist/schema.d.ts CHANGED
@@ -42,8 +42,8 @@ export declare const configSchema: z.ZodObject<{
42
42
  ctaHref?: string | undefined;
43
43
  }>>;
44
44
  }, "strip", z.ZodTypeAny, {
45
- backendUrl: string;
46
45
  greeting: string;
46
+ backendUrl: string;
47
47
  maxHistory: number;
48
48
  mlflowRunId?: string | undefined;
49
49
  suggestions?: string[] | undefined;
@@ -55,8 +55,8 @@ export declare const configSchema: z.ZodObject<{
55
55
  } | undefined;
56
56
  }, {
57
57
  backendUrl: string;
58
- mlflowRunId?: string | undefined;
59
58
  greeting?: string | undefined;
59
+ mlflowRunId?: string | undefined;
60
60
  maxHistory?: number | undefined;
61
61
  suggestions?: string[] | undefined;
62
62
  fallback?: {
@@ -69,8 +69,8 @@ export declare const configSchema: z.ZodObject<{
69
69
  export type ChatbotConfigSchema = z.infer<typeof configSchema>;
70
70
  export declare function validateChatbotConfig(data: unknown): z.SafeParseReturnType<{
71
71
  backendUrl: string;
72
- mlflowRunId?: string | undefined;
73
72
  greeting?: string | undefined;
73
+ mlflowRunId?: string | undefined;
74
74
  maxHistory?: number | undefined;
75
75
  suggestions?: string[] | undefined;
76
76
  fallback?: {
@@ -80,8 +80,8 @@ export declare function validateChatbotConfig(data: unknown): z.SafeParseReturnT
80
80
  ctaHref?: string | undefined;
81
81
  } | undefined;
82
82
  }, {
83
- backendUrl: string;
84
83
  greeting: string;
84
+ backendUrl: string;
85
85
  maxHistory: number;
86
86
  mlflowRunId?: string | undefined;
87
87
  suggestions?: string[] | undefined;
@@ -92,12 +92,1201 @@ export declare function validateChatbotConfig(data: unknown): z.SafeParseReturnT
92
92
  ctaHref?: string | undefined;
93
93
  } | undefined;
94
94
  }>;
95
+ /**
96
+ * Props schema for the `adaptive-chatbot:chat-bar` widget. This is the
97
+ * headless chat-input shell — no transport, no message persistence.
98
+ * Customers wire `chat-message-sent` / `chat-interrupt` / `canvas-close`
99
+ * to their own pipeline.
100
+ *
101
+ * All fields are optional: the bar renders an empty trail + send-only
102
+ * placeholder if nothing is passed. Authors who want a stateful chat
103
+ * use `adaptive-chatbot:assistant` instead.
104
+ */
105
+ export declare const chatBarPropsSchema: z.ZodObject<{
106
+ placeholder: z.ZodOptional<z.ZodString>;
107
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
108
+ id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
109
+ role: z.ZodEnum<["user", "assistant"]>;
110
+ text: z.ZodString;
111
+ }, "strip", z.ZodTypeAny, {
112
+ role: "user" | "assistant";
113
+ text: string;
114
+ id: string | number;
115
+ }, {
116
+ role: "user" | "assistant";
117
+ text: string;
118
+ id: string | number;
119
+ }>, "many">>;
120
+ inFlight: z.ZodOptional<z.ZodBoolean>;
121
+ }, "strict", z.ZodTypeAny, {
122
+ messages?: {
123
+ role: "user" | "assistant";
124
+ text: string;
125
+ id: string | number;
126
+ }[] | undefined;
127
+ placeholder?: string | undefined;
128
+ inFlight?: boolean | undefined;
129
+ }, {
130
+ messages?: {
131
+ role: "user" | "assistant";
132
+ text: string;
133
+ id: string | number;
134
+ }[] | undefined;
135
+ placeholder?: string | undefined;
136
+ inFlight?: boolean | undefined;
137
+ }>;
138
+ export type ChatBarProps = z.infer<typeof chatBarPropsSchema>;
139
+ /**
140
+ * Props schema for the `adaptive-chatbot:chips-strip` widget. Chips
141
+ * follow the compositional-action shape (see SuggestionChipSchema in
142
+ * AdaptiveChipsStrip.ts) — same pattern as faq:question.
143
+ */
144
+ export declare const chipsStripPropsSchema: z.ZodObject<{
145
+ chips: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
146
+ kind: z.ZodLiteral<"suggestions:chip">;
147
+ config: z.ZodObject<{
148
+ id: z.ZodString;
149
+ title: z.ZodString;
150
+ payload: z.ZodObject<{
151
+ widget: z.ZodString;
152
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
153
+ }, "strict", z.ZodTypeAny, {
154
+ widget: string;
155
+ props?: Record<string, unknown> | undefined;
156
+ }, {
157
+ widget: string;
158
+ props?: Record<string, unknown> | undefined;
159
+ }>;
160
+ }, "strip", z.ZodTypeAny, {
161
+ title: string;
162
+ id: string;
163
+ payload: {
164
+ widget: string;
165
+ props?: Record<string, unknown> | undefined;
166
+ };
167
+ }, {
168
+ title: string;
169
+ id: string;
170
+ payload: {
171
+ widget: string;
172
+ props?: Record<string, unknown> | undefined;
173
+ };
174
+ }>;
175
+ triggerWhen: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
176
+ type: z.ZodLiteral<"rules">;
177
+ rules: z.ZodArray<z.ZodObject<{
178
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
179
+ type: z.ZodLiteral<"page_url">;
180
+ url: z.ZodString;
181
+ }, "strip", z.ZodTypeAny, {
182
+ type: "page_url";
183
+ url: string;
184
+ }, {
185
+ type: "page_url";
186
+ url: string;
187
+ }>, z.ZodObject<{
188
+ type: z.ZodLiteral<"route">;
189
+ routeId: z.ZodString;
190
+ }, "strip", z.ZodTypeAny, {
191
+ type: "route";
192
+ routeId: string;
193
+ }, {
194
+ type: "route";
195
+ routeId: string;
196
+ }>, z.ZodObject<{
197
+ type: z.ZodLiteral<"anchor_visible">;
198
+ anchorId: z.ZodString;
199
+ state: z.ZodEnum<["visible", "present", "absent"]>;
200
+ }, "strip", z.ZodTypeAny, {
201
+ type: "anchor_visible";
202
+ anchorId: string;
203
+ state: "visible" | "present" | "absent";
204
+ }, {
205
+ type: "anchor_visible";
206
+ anchorId: string;
207
+ state: "visible" | "present" | "absent";
208
+ }>, z.ZodObject<{
209
+ type: z.ZodLiteral<"event_occurred">;
210
+ eventName: z.ZodString;
211
+ withinMs: z.ZodOptional<z.ZodNumber>;
212
+ }, "strip", z.ZodTypeAny, {
213
+ type: "event_occurred";
214
+ eventName: string;
215
+ withinMs?: number | undefined;
216
+ }, {
217
+ type: "event_occurred";
218
+ eventName: string;
219
+ withinMs?: number | undefined;
220
+ }>, z.ZodObject<{
221
+ type: z.ZodLiteral<"state_equals">;
222
+ key: z.ZodString;
223
+ value: z.ZodUnknown;
224
+ }, "strip", z.ZodTypeAny, {
225
+ type: "state_equals";
226
+ key: string;
227
+ value?: unknown;
228
+ }, {
229
+ type: "state_equals";
230
+ key: string;
231
+ value?: unknown;
232
+ }>, z.ZodObject<{
233
+ type: z.ZodLiteral<"viewport">;
234
+ minWidth: z.ZodOptional<z.ZodNumber>;
235
+ maxWidth: z.ZodOptional<z.ZodNumber>;
236
+ minHeight: z.ZodOptional<z.ZodNumber>;
237
+ maxHeight: z.ZodOptional<z.ZodNumber>;
238
+ }, "strip", z.ZodTypeAny, {
239
+ type: "viewport";
240
+ minWidth?: number | undefined;
241
+ maxWidth?: number | undefined;
242
+ minHeight?: number | undefined;
243
+ maxHeight?: number | undefined;
244
+ }, {
245
+ type: "viewport";
246
+ minWidth?: number | undefined;
247
+ maxWidth?: number | undefined;
248
+ minHeight?: number | undefined;
249
+ maxHeight?: number | undefined;
250
+ }>, z.ZodObject<{
251
+ type: z.ZodLiteral<"session_metric">;
252
+ key: z.ZodEnum<["time_on_page", "page_views", "scroll_depth"]>;
253
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
254
+ threshold: z.ZodNumber;
255
+ }, "strip", z.ZodTypeAny, {
256
+ type: "session_metric";
257
+ key: "time_on_page" | "page_views" | "scroll_depth";
258
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
259
+ threshold: number;
260
+ }, {
261
+ type: "session_metric";
262
+ key: "time_on_page" | "page_views" | "scroll_depth";
263
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
264
+ threshold: number;
265
+ }>, z.ZodObject<{
266
+ type: z.ZodLiteral<"dismissed">;
267
+ key: z.ZodString;
268
+ inverted: z.ZodOptional<z.ZodBoolean>;
269
+ }, "strip", z.ZodTypeAny, {
270
+ type: "dismissed";
271
+ key: string;
272
+ inverted?: boolean | undefined;
273
+ }, {
274
+ type: "dismissed";
275
+ key: string;
276
+ inverted?: boolean | undefined;
277
+ }>, z.ZodObject<{
278
+ type: z.ZodLiteral<"cooldown_active">;
279
+ key: z.ZodString;
280
+ inverted: z.ZodOptional<z.ZodBoolean>;
281
+ }, "strip", z.ZodTypeAny, {
282
+ type: "cooldown_active";
283
+ key: string;
284
+ inverted?: boolean | undefined;
285
+ }, {
286
+ type: "cooldown_active";
287
+ key: string;
288
+ inverted?: boolean | undefined;
289
+ }>, z.ZodObject<{
290
+ type: z.ZodLiteral<"frequency_limit">;
291
+ key: z.ZodString;
292
+ limit: z.ZodNumber;
293
+ inverted: z.ZodOptional<z.ZodBoolean>;
294
+ }, "strip", z.ZodTypeAny, {
295
+ type: "frequency_limit";
296
+ key: string;
297
+ limit: number;
298
+ inverted?: boolean | undefined;
299
+ }, {
300
+ type: "frequency_limit";
301
+ key: string;
302
+ limit: number;
303
+ inverted?: boolean | undefined;
304
+ }>, z.ZodObject<{
305
+ type: z.ZodLiteral<"event_count">;
306
+ key: z.ZodString;
307
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
308
+ count: z.ZodNumber;
309
+ withinMs: z.ZodOptional<z.ZodNumber>;
310
+ counter: z.ZodOptional<z.ZodObject<{
311
+ events: z.ZodArray<z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "ui.hesitate", "ui.rage_click", "nav.page_view", "nav.page_leave"]>, "many">;
312
+ match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
313
+ equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
314
+ contains: z.ZodOptional<z.ZodString>;
315
+ }, "strip", z.ZodTypeAny, {
316
+ equals?: string | number | boolean | undefined;
317
+ contains?: string | undefined;
318
+ }, {
319
+ equals?: string | number | boolean | undefined;
320
+ contains?: string | undefined;
321
+ }>>>;
322
+ }, "strip", z.ZodTypeAny, {
323
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
324
+ match?: Record<string, {
325
+ equals?: string | number | boolean | undefined;
326
+ contains?: string | undefined;
327
+ }> | undefined;
328
+ }, {
329
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
330
+ match?: Record<string, {
331
+ equals?: string | number | boolean | undefined;
332
+ contains?: string | undefined;
333
+ }> | undefined;
334
+ }>>;
335
+ }, "strip", z.ZodTypeAny, {
336
+ type: "event_count";
337
+ key: string;
338
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
339
+ count: number;
340
+ withinMs?: number | undefined;
341
+ counter?: {
342
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
343
+ match?: Record<string, {
344
+ equals?: string | number | boolean | undefined;
345
+ contains?: string | undefined;
346
+ }> | undefined;
347
+ } | undefined;
348
+ }, {
349
+ type: "event_count";
350
+ key: string;
351
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
352
+ count: number;
353
+ withinMs?: number | undefined;
354
+ counter?: {
355
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
356
+ match?: Record<string, {
357
+ equals?: string | number | boolean | undefined;
358
+ contains?: string | undefined;
359
+ }> | undefined;
360
+ } | undefined;
361
+ }>]>, "many">;
362
+ value: z.ZodUnknown;
363
+ }, "strip", z.ZodTypeAny, {
364
+ conditions: ({
365
+ type: "page_url";
366
+ url: string;
367
+ } | {
368
+ type: "route";
369
+ routeId: string;
370
+ } | {
371
+ type: "anchor_visible";
372
+ anchorId: string;
373
+ state: "visible" | "present" | "absent";
374
+ } | {
375
+ type: "event_occurred";
376
+ eventName: string;
377
+ withinMs?: number | undefined;
378
+ } | {
379
+ type: "state_equals";
380
+ key: string;
381
+ value?: unknown;
382
+ } | {
383
+ type: "viewport";
384
+ minWidth?: number | undefined;
385
+ maxWidth?: number | undefined;
386
+ minHeight?: number | undefined;
387
+ maxHeight?: number | undefined;
388
+ } | {
389
+ type: "session_metric";
390
+ key: "time_on_page" | "page_views" | "scroll_depth";
391
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
392
+ threshold: number;
393
+ } | {
394
+ type: "dismissed";
395
+ key: string;
396
+ inverted?: boolean | undefined;
397
+ } | {
398
+ type: "cooldown_active";
399
+ key: string;
400
+ inverted?: boolean | undefined;
401
+ } | {
402
+ type: "frequency_limit";
403
+ key: string;
404
+ limit: number;
405
+ inverted?: boolean | undefined;
406
+ } | {
407
+ type: "event_count";
408
+ key: string;
409
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
410
+ count: number;
411
+ withinMs?: number | undefined;
412
+ counter?: {
413
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
414
+ match?: Record<string, {
415
+ equals?: string | number | boolean | undefined;
416
+ contains?: string | undefined;
417
+ }> | undefined;
418
+ } | undefined;
419
+ })[];
420
+ value?: unknown;
421
+ }, {
422
+ conditions: ({
423
+ type: "page_url";
424
+ url: string;
425
+ } | {
426
+ type: "route";
427
+ routeId: string;
428
+ } | {
429
+ type: "anchor_visible";
430
+ anchorId: string;
431
+ state: "visible" | "present" | "absent";
432
+ } | {
433
+ type: "event_occurred";
434
+ eventName: string;
435
+ withinMs?: number | undefined;
436
+ } | {
437
+ type: "state_equals";
438
+ key: string;
439
+ value?: unknown;
440
+ } | {
441
+ type: "viewport";
442
+ minWidth?: number | undefined;
443
+ maxWidth?: number | undefined;
444
+ minHeight?: number | undefined;
445
+ maxHeight?: number | undefined;
446
+ } | {
447
+ type: "session_metric";
448
+ key: "time_on_page" | "page_views" | "scroll_depth";
449
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
450
+ threshold: number;
451
+ } | {
452
+ type: "dismissed";
453
+ key: string;
454
+ inverted?: boolean | undefined;
455
+ } | {
456
+ type: "cooldown_active";
457
+ key: string;
458
+ inverted?: boolean | undefined;
459
+ } | {
460
+ type: "frequency_limit";
461
+ key: string;
462
+ limit: number;
463
+ inverted?: boolean | undefined;
464
+ } | {
465
+ type: "event_count";
466
+ key: string;
467
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
468
+ count: number;
469
+ withinMs?: number | undefined;
470
+ counter?: {
471
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
472
+ match?: Record<string, {
473
+ equals?: string | number | boolean | undefined;
474
+ contains?: string | undefined;
475
+ }> | undefined;
476
+ } | undefined;
477
+ })[];
478
+ value?: unknown;
479
+ }>, "many">;
480
+ default: z.ZodUnknown;
481
+ }, "strip", z.ZodTypeAny, {
482
+ type: "rules";
483
+ rules: {
484
+ conditions: ({
485
+ type: "page_url";
486
+ url: string;
487
+ } | {
488
+ type: "route";
489
+ routeId: string;
490
+ } | {
491
+ type: "anchor_visible";
492
+ anchorId: string;
493
+ state: "visible" | "present" | "absent";
494
+ } | {
495
+ type: "event_occurred";
496
+ eventName: string;
497
+ withinMs?: number | undefined;
498
+ } | {
499
+ type: "state_equals";
500
+ key: string;
501
+ value?: unknown;
502
+ } | {
503
+ type: "viewport";
504
+ minWidth?: number | undefined;
505
+ maxWidth?: number | undefined;
506
+ minHeight?: number | undefined;
507
+ maxHeight?: number | undefined;
508
+ } | {
509
+ type: "session_metric";
510
+ key: "time_on_page" | "page_views" | "scroll_depth";
511
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
512
+ threshold: number;
513
+ } | {
514
+ type: "dismissed";
515
+ key: string;
516
+ inverted?: boolean | undefined;
517
+ } | {
518
+ type: "cooldown_active";
519
+ key: string;
520
+ inverted?: boolean | undefined;
521
+ } | {
522
+ type: "frequency_limit";
523
+ key: string;
524
+ limit: number;
525
+ inverted?: boolean | undefined;
526
+ } | {
527
+ type: "event_count";
528
+ key: string;
529
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
530
+ count: number;
531
+ withinMs?: number | undefined;
532
+ counter?: {
533
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
534
+ match?: Record<string, {
535
+ equals?: string | number | boolean | undefined;
536
+ contains?: string | undefined;
537
+ }> | undefined;
538
+ } | undefined;
539
+ })[];
540
+ value?: unknown;
541
+ }[];
542
+ default?: unknown;
543
+ }, {
544
+ type: "rules";
545
+ rules: {
546
+ conditions: ({
547
+ type: "page_url";
548
+ url: string;
549
+ } | {
550
+ type: "route";
551
+ routeId: string;
552
+ } | {
553
+ type: "anchor_visible";
554
+ anchorId: string;
555
+ state: "visible" | "present" | "absent";
556
+ } | {
557
+ type: "event_occurred";
558
+ eventName: string;
559
+ withinMs?: number | undefined;
560
+ } | {
561
+ type: "state_equals";
562
+ key: string;
563
+ value?: unknown;
564
+ } | {
565
+ type: "viewport";
566
+ minWidth?: number | undefined;
567
+ maxWidth?: number | undefined;
568
+ minHeight?: number | undefined;
569
+ maxHeight?: number | undefined;
570
+ } | {
571
+ type: "session_metric";
572
+ key: "time_on_page" | "page_views" | "scroll_depth";
573
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
574
+ threshold: number;
575
+ } | {
576
+ type: "dismissed";
577
+ key: string;
578
+ inverted?: boolean | undefined;
579
+ } | {
580
+ type: "cooldown_active";
581
+ key: string;
582
+ inverted?: boolean | undefined;
583
+ } | {
584
+ type: "frequency_limit";
585
+ key: string;
586
+ limit: number;
587
+ inverted?: boolean | undefined;
588
+ } | {
589
+ type: "event_count";
590
+ key: string;
591
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
592
+ count: number;
593
+ withinMs?: number | undefined;
594
+ counter?: {
595
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
596
+ match?: Record<string, {
597
+ equals?: string | number | boolean | undefined;
598
+ contains?: string | undefined;
599
+ }> | undefined;
600
+ } | undefined;
601
+ })[];
602
+ value?: unknown;
603
+ }[];
604
+ default?: unknown;
605
+ }>, z.ZodObject<{
606
+ type: z.ZodLiteral<"score">;
607
+ field: z.ZodString;
608
+ threshold: z.ZodNumber;
609
+ above: z.ZodUnknown;
610
+ below: z.ZodUnknown;
611
+ }, "strip", z.ZodTypeAny, {
612
+ type: "score";
613
+ threshold: number;
614
+ field: string;
615
+ above?: unknown;
616
+ below?: unknown;
617
+ }, {
618
+ type: "score";
619
+ threshold: number;
620
+ field: string;
621
+ above?: unknown;
622
+ below?: unknown;
623
+ }>, z.ZodObject<{
624
+ type: z.ZodLiteral<"model">;
625
+ modelId: z.ZodString;
626
+ inputs: z.ZodArray<z.ZodString, "many">;
627
+ outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
628
+ default: z.ZodUnknown;
629
+ }, "strip", z.ZodTypeAny, {
630
+ type: "model";
631
+ modelId: string;
632
+ inputs: string[];
633
+ outputMapping: Record<string, unknown>;
634
+ default?: unknown;
635
+ }, {
636
+ type: "model";
637
+ modelId: string;
638
+ inputs: string[];
639
+ outputMapping: Record<string, unknown>;
640
+ default?: unknown;
641
+ }>, z.ZodObject<{
642
+ type: z.ZodLiteral<"external">;
643
+ endpoint: z.ZodString;
644
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
645
+ default: z.ZodUnknown;
646
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
647
+ }, "strip", z.ZodTypeAny, {
648
+ type: "external";
649
+ endpoint: string;
650
+ default?: unknown;
651
+ method?: "GET" | "POST" | undefined;
652
+ timeoutMs?: number | undefined;
653
+ }, {
654
+ type: "external";
655
+ endpoint: string;
656
+ default?: unknown;
657
+ method?: "GET" | "POST" | undefined;
658
+ timeoutMs?: number | undefined;
659
+ }>]>>>;
660
+ notify: z.ZodOptional<z.ZodNullable<z.ZodObject<{
661
+ title: z.ZodOptional<z.ZodString>;
662
+ body: z.ZodOptional<z.ZodString>;
663
+ icon: z.ZodOptional<z.ZodString>;
664
+ }, "strip", z.ZodTypeAny, {
665
+ title?: string | undefined;
666
+ body?: string | undefined;
667
+ icon?: string | undefined;
668
+ }, {
669
+ title?: string | undefined;
670
+ body?: string | undefined;
671
+ icon?: string | undefined;
672
+ }>>>;
673
+ id: z.ZodOptional<z.ZodString>;
674
+ title: z.ZodOptional<z.ZodString>;
675
+ description: z.ZodOptional<z.ZodString>;
676
+ validation: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
677
+ }, "strip", z.ZodTypeAny, {
678
+ config: {
679
+ title: string;
680
+ id: string;
681
+ payload: {
682
+ widget: string;
683
+ props?: Record<string, unknown> | undefined;
684
+ };
685
+ };
686
+ kind: "suggestions:chip";
687
+ title?: string | undefined;
688
+ id?: string | undefined;
689
+ validation?: string[] | undefined;
690
+ triggerWhen?: {
691
+ type: "rules";
692
+ rules: {
693
+ conditions: ({
694
+ type: "page_url";
695
+ url: string;
696
+ } | {
697
+ type: "route";
698
+ routeId: string;
699
+ } | {
700
+ type: "anchor_visible";
701
+ anchorId: string;
702
+ state: "visible" | "present" | "absent";
703
+ } | {
704
+ type: "event_occurred";
705
+ eventName: string;
706
+ withinMs?: number | undefined;
707
+ } | {
708
+ type: "state_equals";
709
+ key: string;
710
+ value?: unknown;
711
+ } | {
712
+ type: "viewport";
713
+ minWidth?: number | undefined;
714
+ maxWidth?: number | undefined;
715
+ minHeight?: number | undefined;
716
+ maxHeight?: number | undefined;
717
+ } | {
718
+ type: "session_metric";
719
+ key: "time_on_page" | "page_views" | "scroll_depth";
720
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
721
+ threshold: number;
722
+ } | {
723
+ type: "dismissed";
724
+ key: string;
725
+ inverted?: boolean | undefined;
726
+ } | {
727
+ type: "cooldown_active";
728
+ key: string;
729
+ inverted?: boolean | undefined;
730
+ } | {
731
+ type: "frequency_limit";
732
+ key: string;
733
+ limit: number;
734
+ inverted?: boolean | undefined;
735
+ } | {
736
+ type: "event_count";
737
+ key: string;
738
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
739
+ count: number;
740
+ withinMs?: number | undefined;
741
+ counter?: {
742
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
743
+ match?: Record<string, {
744
+ equals?: string | number | boolean | undefined;
745
+ contains?: string | undefined;
746
+ }> | undefined;
747
+ } | undefined;
748
+ })[];
749
+ value?: unknown;
750
+ }[];
751
+ default?: unknown;
752
+ } | {
753
+ type: "score";
754
+ threshold: number;
755
+ field: string;
756
+ above?: unknown;
757
+ below?: unknown;
758
+ } | {
759
+ type: "model";
760
+ modelId: string;
761
+ inputs: string[];
762
+ outputMapping: Record<string, unknown>;
763
+ default?: unknown;
764
+ } | {
765
+ type: "external";
766
+ endpoint: string;
767
+ default?: unknown;
768
+ method?: "GET" | "POST" | undefined;
769
+ timeoutMs?: number | undefined;
770
+ } | null | undefined;
771
+ notify?: {
772
+ title?: string | undefined;
773
+ body?: string | undefined;
774
+ icon?: string | undefined;
775
+ } | null | undefined;
776
+ description?: string | undefined;
777
+ }, {
778
+ config: {
779
+ title: string;
780
+ id: string;
781
+ payload: {
782
+ widget: string;
783
+ props?: Record<string, unknown> | undefined;
784
+ };
785
+ };
786
+ kind: "suggestions:chip";
787
+ title?: string | undefined;
788
+ id?: string | undefined;
789
+ validation?: string[] | undefined;
790
+ triggerWhen?: {
791
+ type: "rules";
792
+ rules: {
793
+ conditions: ({
794
+ type: "page_url";
795
+ url: string;
796
+ } | {
797
+ type: "route";
798
+ routeId: string;
799
+ } | {
800
+ type: "anchor_visible";
801
+ anchorId: string;
802
+ state: "visible" | "present" | "absent";
803
+ } | {
804
+ type: "event_occurred";
805
+ eventName: string;
806
+ withinMs?: number | undefined;
807
+ } | {
808
+ type: "state_equals";
809
+ key: string;
810
+ value?: unknown;
811
+ } | {
812
+ type: "viewport";
813
+ minWidth?: number | undefined;
814
+ maxWidth?: number | undefined;
815
+ minHeight?: number | undefined;
816
+ maxHeight?: number | undefined;
817
+ } | {
818
+ type: "session_metric";
819
+ key: "time_on_page" | "page_views" | "scroll_depth";
820
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
821
+ threshold: number;
822
+ } | {
823
+ type: "dismissed";
824
+ key: string;
825
+ inverted?: boolean | undefined;
826
+ } | {
827
+ type: "cooldown_active";
828
+ key: string;
829
+ inverted?: boolean | undefined;
830
+ } | {
831
+ type: "frequency_limit";
832
+ key: string;
833
+ limit: number;
834
+ inverted?: boolean | undefined;
835
+ } | {
836
+ type: "event_count";
837
+ key: string;
838
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
839
+ count: number;
840
+ withinMs?: number | undefined;
841
+ counter?: {
842
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
843
+ match?: Record<string, {
844
+ equals?: string | number | boolean | undefined;
845
+ contains?: string | undefined;
846
+ }> | undefined;
847
+ } | undefined;
848
+ })[];
849
+ value?: unknown;
850
+ }[];
851
+ default?: unknown;
852
+ } | {
853
+ type: "score";
854
+ threshold: number;
855
+ field: string;
856
+ above?: unknown;
857
+ below?: unknown;
858
+ } | {
859
+ type: "model";
860
+ modelId: string;
861
+ inputs: string[];
862
+ outputMapping: Record<string, unknown>;
863
+ default?: unknown;
864
+ } | {
865
+ type: "external";
866
+ endpoint: string;
867
+ default?: unknown;
868
+ method?: "GET" | "POST" | undefined;
869
+ timeoutMs?: number | undefined;
870
+ } | null | undefined;
871
+ notify?: {
872
+ title?: string | undefined;
873
+ body?: string | undefined;
874
+ icon?: string | undefined;
875
+ } | null | undefined;
876
+ description?: string | undefined;
877
+ }>, {
878
+ config: {
879
+ title: string;
880
+ id: string;
881
+ payload: {
882
+ widget: string;
883
+ props?: Record<string, unknown> | undefined;
884
+ };
885
+ };
886
+ kind: "suggestions:chip";
887
+ title?: string | undefined;
888
+ id?: string | undefined;
889
+ validation?: string[] | undefined;
890
+ triggerWhen?: {
891
+ type: "rules";
892
+ rules: {
893
+ conditions: ({
894
+ type: "page_url";
895
+ url: string;
896
+ } | {
897
+ type: "route";
898
+ routeId: string;
899
+ } | {
900
+ type: "anchor_visible";
901
+ anchorId: string;
902
+ state: "visible" | "present" | "absent";
903
+ } | {
904
+ type: "event_occurred";
905
+ eventName: string;
906
+ withinMs?: number | undefined;
907
+ } | {
908
+ type: "state_equals";
909
+ key: string;
910
+ value?: unknown;
911
+ } | {
912
+ type: "viewport";
913
+ minWidth?: number | undefined;
914
+ maxWidth?: number | undefined;
915
+ minHeight?: number | undefined;
916
+ maxHeight?: number | undefined;
917
+ } | {
918
+ type: "session_metric";
919
+ key: "time_on_page" | "page_views" | "scroll_depth";
920
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
921
+ threshold: number;
922
+ } | {
923
+ type: "dismissed";
924
+ key: string;
925
+ inverted?: boolean | undefined;
926
+ } | {
927
+ type: "cooldown_active";
928
+ key: string;
929
+ inverted?: boolean | undefined;
930
+ } | {
931
+ type: "frequency_limit";
932
+ key: string;
933
+ limit: number;
934
+ inverted?: boolean | undefined;
935
+ } | {
936
+ type: "event_count";
937
+ key: string;
938
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
939
+ count: number;
940
+ withinMs?: number | undefined;
941
+ counter?: {
942
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
943
+ match?: Record<string, {
944
+ equals?: string | number | boolean | undefined;
945
+ contains?: string | undefined;
946
+ }> | undefined;
947
+ } | undefined;
948
+ })[];
949
+ value?: unknown;
950
+ }[];
951
+ default?: unknown;
952
+ } | {
953
+ type: "score";
954
+ threshold: number;
955
+ field: string;
956
+ above?: unknown;
957
+ below?: unknown;
958
+ } | {
959
+ type: "model";
960
+ modelId: string;
961
+ inputs: string[];
962
+ outputMapping: Record<string, unknown>;
963
+ default?: unknown;
964
+ } | {
965
+ type: "external";
966
+ endpoint: string;
967
+ default?: unknown;
968
+ method?: "GET" | "POST" | undefined;
969
+ timeoutMs?: number | undefined;
970
+ } | null | undefined;
971
+ notify?: {
972
+ title?: string | undefined;
973
+ body?: string | undefined;
974
+ icon?: string | undefined;
975
+ } | null | undefined;
976
+ description?: string | undefined;
977
+ }, {
978
+ config: {
979
+ title: string;
980
+ id: string;
981
+ payload: {
982
+ widget: string;
983
+ props?: Record<string, unknown> | undefined;
984
+ };
985
+ };
986
+ kind: "suggestions:chip";
987
+ title?: string | undefined;
988
+ id?: string | undefined;
989
+ validation?: string[] | undefined;
990
+ triggerWhen?: {
991
+ type: "rules";
992
+ rules: {
993
+ conditions: ({
994
+ type: "page_url";
995
+ url: string;
996
+ } | {
997
+ type: "route";
998
+ routeId: string;
999
+ } | {
1000
+ type: "anchor_visible";
1001
+ anchorId: string;
1002
+ state: "visible" | "present" | "absent";
1003
+ } | {
1004
+ type: "event_occurred";
1005
+ eventName: string;
1006
+ withinMs?: number | undefined;
1007
+ } | {
1008
+ type: "state_equals";
1009
+ key: string;
1010
+ value?: unknown;
1011
+ } | {
1012
+ type: "viewport";
1013
+ minWidth?: number | undefined;
1014
+ maxWidth?: number | undefined;
1015
+ minHeight?: number | undefined;
1016
+ maxHeight?: number | undefined;
1017
+ } | {
1018
+ type: "session_metric";
1019
+ key: "time_on_page" | "page_views" | "scroll_depth";
1020
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1021
+ threshold: number;
1022
+ } | {
1023
+ type: "dismissed";
1024
+ key: string;
1025
+ inverted?: boolean | undefined;
1026
+ } | {
1027
+ type: "cooldown_active";
1028
+ key: string;
1029
+ inverted?: boolean | undefined;
1030
+ } | {
1031
+ type: "frequency_limit";
1032
+ key: string;
1033
+ limit: number;
1034
+ inverted?: boolean | undefined;
1035
+ } | {
1036
+ type: "event_count";
1037
+ key: string;
1038
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1039
+ count: number;
1040
+ withinMs?: number | undefined;
1041
+ counter?: {
1042
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1043
+ match?: Record<string, {
1044
+ equals?: string | number | boolean | undefined;
1045
+ contains?: string | undefined;
1046
+ }> | undefined;
1047
+ } | undefined;
1048
+ })[];
1049
+ value?: unknown;
1050
+ }[];
1051
+ default?: unknown;
1052
+ } | {
1053
+ type: "score";
1054
+ threshold: number;
1055
+ field: string;
1056
+ above?: unknown;
1057
+ below?: unknown;
1058
+ } | {
1059
+ type: "model";
1060
+ modelId: string;
1061
+ inputs: string[];
1062
+ outputMapping: Record<string, unknown>;
1063
+ default?: unknown;
1064
+ } | {
1065
+ type: "external";
1066
+ endpoint: string;
1067
+ default?: unknown;
1068
+ method?: "GET" | "POST" | undefined;
1069
+ timeoutMs?: number | undefined;
1070
+ } | null | undefined;
1071
+ notify?: {
1072
+ title?: string | undefined;
1073
+ body?: string | undefined;
1074
+ icon?: string | undefined;
1075
+ } | null | undefined;
1076
+ description?: string | undefined;
1077
+ }>, "many">>;
1078
+ }, "strict", z.ZodTypeAny, {
1079
+ chips: {
1080
+ config: {
1081
+ title: string;
1082
+ id: string;
1083
+ payload: {
1084
+ widget: string;
1085
+ props?: Record<string, unknown> | undefined;
1086
+ };
1087
+ };
1088
+ kind: "suggestions:chip";
1089
+ title?: string | undefined;
1090
+ id?: string | undefined;
1091
+ validation?: string[] | undefined;
1092
+ triggerWhen?: {
1093
+ type: "rules";
1094
+ rules: {
1095
+ conditions: ({
1096
+ type: "page_url";
1097
+ url: string;
1098
+ } | {
1099
+ type: "route";
1100
+ routeId: string;
1101
+ } | {
1102
+ type: "anchor_visible";
1103
+ anchorId: string;
1104
+ state: "visible" | "present" | "absent";
1105
+ } | {
1106
+ type: "event_occurred";
1107
+ eventName: string;
1108
+ withinMs?: number | undefined;
1109
+ } | {
1110
+ type: "state_equals";
1111
+ key: string;
1112
+ value?: unknown;
1113
+ } | {
1114
+ type: "viewport";
1115
+ minWidth?: number | undefined;
1116
+ maxWidth?: number | undefined;
1117
+ minHeight?: number | undefined;
1118
+ maxHeight?: number | undefined;
1119
+ } | {
1120
+ type: "session_metric";
1121
+ key: "time_on_page" | "page_views" | "scroll_depth";
1122
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1123
+ threshold: number;
1124
+ } | {
1125
+ type: "dismissed";
1126
+ key: string;
1127
+ inverted?: boolean | undefined;
1128
+ } | {
1129
+ type: "cooldown_active";
1130
+ key: string;
1131
+ inverted?: boolean | undefined;
1132
+ } | {
1133
+ type: "frequency_limit";
1134
+ key: string;
1135
+ limit: number;
1136
+ inverted?: boolean | undefined;
1137
+ } | {
1138
+ type: "event_count";
1139
+ key: string;
1140
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1141
+ count: number;
1142
+ withinMs?: number | undefined;
1143
+ counter?: {
1144
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1145
+ match?: Record<string, {
1146
+ equals?: string | number | boolean | undefined;
1147
+ contains?: string | undefined;
1148
+ }> | undefined;
1149
+ } | undefined;
1150
+ })[];
1151
+ value?: unknown;
1152
+ }[];
1153
+ default?: unknown;
1154
+ } | {
1155
+ type: "score";
1156
+ threshold: number;
1157
+ field: string;
1158
+ above?: unknown;
1159
+ below?: unknown;
1160
+ } | {
1161
+ type: "model";
1162
+ modelId: string;
1163
+ inputs: string[];
1164
+ outputMapping: Record<string, unknown>;
1165
+ default?: unknown;
1166
+ } | {
1167
+ type: "external";
1168
+ endpoint: string;
1169
+ default?: unknown;
1170
+ method?: "GET" | "POST" | undefined;
1171
+ timeoutMs?: number | undefined;
1172
+ } | null | undefined;
1173
+ notify?: {
1174
+ title?: string | undefined;
1175
+ body?: string | undefined;
1176
+ icon?: string | undefined;
1177
+ } | null | undefined;
1178
+ description?: string | undefined;
1179
+ }[];
1180
+ }, {
1181
+ chips?: {
1182
+ config: {
1183
+ title: string;
1184
+ id: string;
1185
+ payload: {
1186
+ widget: string;
1187
+ props?: Record<string, unknown> | undefined;
1188
+ };
1189
+ };
1190
+ kind: "suggestions:chip";
1191
+ title?: string | undefined;
1192
+ id?: string | undefined;
1193
+ validation?: string[] | undefined;
1194
+ triggerWhen?: {
1195
+ type: "rules";
1196
+ rules: {
1197
+ conditions: ({
1198
+ type: "page_url";
1199
+ url: string;
1200
+ } | {
1201
+ type: "route";
1202
+ routeId: string;
1203
+ } | {
1204
+ type: "anchor_visible";
1205
+ anchorId: string;
1206
+ state: "visible" | "present" | "absent";
1207
+ } | {
1208
+ type: "event_occurred";
1209
+ eventName: string;
1210
+ withinMs?: number | undefined;
1211
+ } | {
1212
+ type: "state_equals";
1213
+ key: string;
1214
+ value?: unknown;
1215
+ } | {
1216
+ type: "viewport";
1217
+ minWidth?: number | undefined;
1218
+ maxWidth?: number | undefined;
1219
+ minHeight?: number | undefined;
1220
+ maxHeight?: number | undefined;
1221
+ } | {
1222
+ type: "session_metric";
1223
+ key: "time_on_page" | "page_views" | "scroll_depth";
1224
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1225
+ threshold: number;
1226
+ } | {
1227
+ type: "dismissed";
1228
+ key: string;
1229
+ inverted?: boolean | undefined;
1230
+ } | {
1231
+ type: "cooldown_active";
1232
+ key: string;
1233
+ inverted?: boolean | undefined;
1234
+ } | {
1235
+ type: "frequency_limit";
1236
+ key: string;
1237
+ limit: number;
1238
+ inverted?: boolean | undefined;
1239
+ } | {
1240
+ type: "event_count";
1241
+ key: string;
1242
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1243
+ count: number;
1244
+ withinMs?: number | undefined;
1245
+ counter?: {
1246
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1247
+ match?: Record<string, {
1248
+ equals?: string | number | boolean | undefined;
1249
+ contains?: string | undefined;
1250
+ }> | undefined;
1251
+ } | undefined;
1252
+ })[];
1253
+ value?: unknown;
1254
+ }[];
1255
+ default?: unknown;
1256
+ } | {
1257
+ type: "score";
1258
+ threshold: number;
1259
+ field: string;
1260
+ above?: unknown;
1261
+ below?: unknown;
1262
+ } | {
1263
+ type: "model";
1264
+ modelId: string;
1265
+ inputs: string[];
1266
+ outputMapping: Record<string, unknown>;
1267
+ default?: unknown;
1268
+ } | {
1269
+ type: "external";
1270
+ endpoint: string;
1271
+ default?: unknown;
1272
+ method?: "GET" | "POST" | undefined;
1273
+ timeoutMs?: number | undefined;
1274
+ } | null | undefined;
1275
+ notify?: {
1276
+ title?: string | undefined;
1277
+ body?: string | undefined;
1278
+ icon?: string | undefined;
1279
+ } | null | undefined;
1280
+ description?: string | undefined;
1281
+ }[] | undefined;
1282
+ }>;
1283
+ export type ChipsStripProps = z.infer<typeof chipsStripPropsSchema>;
95
1284
  /**
96
1285
  * Tile widget definitions for unified JSON Schema generation.
97
1286
  * Maps widget IDs to their props validation schema so the build script
98
1287
  * can inject if/then constraints on tile.props.
99
1288
  */
100
- export declare const tileWidgets: {
1289
+ export declare const tileWidgets: ({
101
1290
  widget: string;
102
1291
  defName: string;
103
1292
  propsSchema: z.ZodObject<{
@@ -138,8 +1327,8 @@ export declare const tileWidgets: {
138
1327
  ctaHref?: string | undefined;
139
1328
  }>>;
140
1329
  }, "strip", z.ZodTypeAny, {
141
- backendUrl: string;
142
1330
  greeting: string;
1331
+ backendUrl: string;
143
1332
  maxHistory: number;
144
1333
  mlflowRunId?: string | undefined;
145
1334
  suggestions?: string[] | undefined;
@@ -151,8 +1340,8 @@ export declare const tileWidgets: {
151
1340
  } | undefined;
152
1341
  }, {
153
1342
  backendUrl: string;
154
- mlflowRunId?: string | undefined;
155
1343
  greeting?: string | undefined;
1344
+ mlflowRunId?: string | undefined;
156
1345
  maxHistory?: number | undefined;
157
1346
  suggestions?: string[] | undefined;
158
1347
  fallback?: {
@@ -162,5 +1351,1929 @@ export declare const tileWidgets: {
162
1351
  ctaHref?: string | undefined;
163
1352
  } | undefined;
164
1353
  }>;
1354
+ } | {
1355
+ widget: string;
1356
+ defName: string;
1357
+ propsSchema: z.ZodObject<{
1358
+ placeholder: z.ZodOptional<z.ZodString>;
1359
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
1360
+ id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
1361
+ role: z.ZodEnum<["user", "assistant"]>;
1362
+ text: z.ZodString;
1363
+ }, "strip", z.ZodTypeAny, {
1364
+ role: "user" | "assistant";
1365
+ text: string;
1366
+ id: string | number;
1367
+ }, {
1368
+ role: "user" | "assistant";
1369
+ text: string;
1370
+ id: string | number;
1371
+ }>, "many">>;
1372
+ inFlight: z.ZodOptional<z.ZodBoolean>;
1373
+ }, "strict", z.ZodTypeAny, {
1374
+ messages?: {
1375
+ role: "user" | "assistant";
1376
+ text: string;
1377
+ id: string | number;
1378
+ }[] | undefined;
1379
+ placeholder?: string | undefined;
1380
+ inFlight?: boolean | undefined;
1381
+ }, {
1382
+ messages?: {
1383
+ role: "user" | "assistant";
1384
+ text: string;
1385
+ id: string | number;
1386
+ }[] | undefined;
1387
+ placeholder?: string | undefined;
1388
+ inFlight?: boolean | undefined;
1389
+ }>;
1390
+ } | {
1391
+ widget: string;
1392
+ defName: string;
1393
+ propsSchema: z.ZodObject<{
1394
+ chips: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
1395
+ kind: z.ZodLiteral<"suggestions:chip">;
1396
+ config: z.ZodObject<{
1397
+ id: z.ZodString;
1398
+ title: z.ZodString;
1399
+ payload: z.ZodObject<{
1400
+ widget: z.ZodString;
1401
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1402
+ }, "strict", z.ZodTypeAny, {
1403
+ widget: string;
1404
+ props?: Record<string, unknown> | undefined;
1405
+ }, {
1406
+ widget: string;
1407
+ props?: Record<string, unknown> | undefined;
1408
+ }>;
1409
+ }, "strip", z.ZodTypeAny, {
1410
+ title: string;
1411
+ id: string;
1412
+ payload: {
1413
+ widget: string;
1414
+ props?: Record<string, unknown> | undefined;
1415
+ };
1416
+ }, {
1417
+ title: string;
1418
+ id: string;
1419
+ payload: {
1420
+ widget: string;
1421
+ props?: Record<string, unknown> | undefined;
1422
+ };
1423
+ }>;
1424
+ triggerWhen: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1425
+ type: z.ZodLiteral<"rules">;
1426
+ rules: z.ZodArray<z.ZodObject<{
1427
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1428
+ type: z.ZodLiteral<"page_url">;
1429
+ url: z.ZodString;
1430
+ }, "strip", z.ZodTypeAny, {
1431
+ type: "page_url";
1432
+ url: string;
1433
+ }, {
1434
+ type: "page_url";
1435
+ url: string;
1436
+ }>, z.ZodObject<{
1437
+ type: z.ZodLiteral<"route">;
1438
+ routeId: z.ZodString;
1439
+ }, "strip", z.ZodTypeAny, {
1440
+ type: "route";
1441
+ routeId: string;
1442
+ }, {
1443
+ type: "route";
1444
+ routeId: string;
1445
+ }>, z.ZodObject<{
1446
+ type: z.ZodLiteral<"anchor_visible">;
1447
+ anchorId: z.ZodString;
1448
+ state: z.ZodEnum<["visible", "present", "absent"]>;
1449
+ }, "strip", z.ZodTypeAny, {
1450
+ type: "anchor_visible";
1451
+ anchorId: string;
1452
+ state: "visible" | "present" | "absent";
1453
+ }, {
1454
+ type: "anchor_visible";
1455
+ anchorId: string;
1456
+ state: "visible" | "present" | "absent";
1457
+ }>, z.ZodObject<{
1458
+ type: z.ZodLiteral<"event_occurred">;
1459
+ eventName: z.ZodString;
1460
+ withinMs: z.ZodOptional<z.ZodNumber>;
1461
+ }, "strip", z.ZodTypeAny, {
1462
+ type: "event_occurred";
1463
+ eventName: string;
1464
+ withinMs?: number | undefined;
1465
+ }, {
1466
+ type: "event_occurred";
1467
+ eventName: string;
1468
+ withinMs?: number | undefined;
1469
+ }>, z.ZodObject<{
1470
+ type: z.ZodLiteral<"state_equals">;
1471
+ key: z.ZodString;
1472
+ value: z.ZodUnknown;
1473
+ }, "strip", z.ZodTypeAny, {
1474
+ type: "state_equals";
1475
+ key: string;
1476
+ value?: unknown;
1477
+ }, {
1478
+ type: "state_equals";
1479
+ key: string;
1480
+ value?: unknown;
1481
+ }>, z.ZodObject<{
1482
+ type: z.ZodLiteral<"viewport">;
1483
+ minWidth: z.ZodOptional<z.ZodNumber>;
1484
+ maxWidth: z.ZodOptional<z.ZodNumber>;
1485
+ minHeight: z.ZodOptional<z.ZodNumber>;
1486
+ maxHeight: z.ZodOptional<z.ZodNumber>;
1487
+ }, "strip", z.ZodTypeAny, {
1488
+ type: "viewport";
1489
+ minWidth?: number | undefined;
1490
+ maxWidth?: number | undefined;
1491
+ minHeight?: number | undefined;
1492
+ maxHeight?: number | undefined;
1493
+ }, {
1494
+ type: "viewport";
1495
+ minWidth?: number | undefined;
1496
+ maxWidth?: number | undefined;
1497
+ minHeight?: number | undefined;
1498
+ maxHeight?: number | undefined;
1499
+ }>, z.ZodObject<{
1500
+ type: z.ZodLiteral<"session_metric">;
1501
+ key: z.ZodEnum<["time_on_page", "page_views", "scroll_depth"]>;
1502
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1503
+ threshold: z.ZodNumber;
1504
+ }, "strip", z.ZodTypeAny, {
1505
+ type: "session_metric";
1506
+ key: "time_on_page" | "page_views" | "scroll_depth";
1507
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1508
+ threshold: number;
1509
+ }, {
1510
+ type: "session_metric";
1511
+ key: "time_on_page" | "page_views" | "scroll_depth";
1512
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1513
+ threshold: number;
1514
+ }>, z.ZodObject<{
1515
+ type: z.ZodLiteral<"dismissed">;
1516
+ key: z.ZodString;
1517
+ inverted: z.ZodOptional<z.ZodBoolean>;
1518
+ }, "strip", z.ZodTypeAny, {
1519
+ type: "dismissed";
1520
+ key: string;
1521
+ inverted?: boolean | undefined;
1522
+ }, {
1523
+ type: "dismissed";
1524
+ key: string;
1525
+ inverted?: boolean | undefined;
1526
+ }>, z.ZodObject<{
1527
+ type: z.ZodLiteral<"cooldown_active">;
1528
+ key: z.ZodString;
1529
+ inverted: z.ZodOptional<z.ZodBoolean>;
1530
+ }, "strip", z.ZodTypeAny, {
1531
+ type: "cooldown_active";
1532
+ key: string;
1533
+ inverted?: boolean | undefined;
1534
+ }, {
1535
+ type: "cooldown_active";
1536
+ key: string;
1537
+ inverted?: boolean | undefined;
1538
+ }>, z.ZodObject<{
1539
+ type: z.ZodLiteral<"frequency_limit">;
1540
+ key: z.ZodString;
1541
+ limit: z.ZodNumber;
1542
+ inverted: z.ZodOptional<z.ZodBoolean>;
1543
+ }, "strip", z.ZodTypeAny, {
1544
+ type: "frequency_limit";
1545
+ key: string;
1546
+ limit: number;
1547
+ inverted?: boolean | undefined;
1548
+ }, {
1549
+ type: "frequency_limit";
1550
+ key: string;
1551
+ limit: number;
1552
+ inverted?: boolean | undefined;
1553
+ }>, z.ZodObject<{
1554
+ type: z.ZodLiteral<"event_count">;
1555
+ key: z.ZodString;
1556
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1557
+ count: z.ZodNumber;
1558
+ withinMs: z.ZodOptional<z.ZodNumber>;
1559
+ counter: z.ZodOptional<z.ZodObject<{
1560
+ events: z.ZodArray<z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "ui.hesitate", "ui.rage_click", "nav.page_view", "nav.page_leave"]>, "many">;
1561
+ match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1562
+ equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1563
+ contains: z.ZodOptional<z.ZodString>;
1564
+ }, "strip", z.ZodTypeAny, {
1565
+ equals?: string | number | boolean | undefined;
1566
+ contains?: string | undefined;
1567
+ }, {
1568
+ equals?: string | number | boolean | undefined;
1569
+ contains?: string | undefined;
1570
+ }>>>;
1571
+ }, "strip", z.ZodTypeAny, {
1572
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1573
+ match?: Record<string, {
1574
+ equals?: string | number | boolean | undefined;
1575
+ contains?: string | undefined;
1576
+ }> | undefined;
1577
+ }, {
1578
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1579
+ match?: Record<string, {
1580
+ equals?: string | number | boolean | undefined;
1581
+ contains?: string | undefined;
1582
+ }> | undefined;
1583
+ }>>;
1584
+ }, "strip", z.ZodTypeAny, {
1585
+ type: "event_count";
1586
+ key: string;
1587
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1588
+ count: number;
1589
+ withinMs?: number | undefined;
1590
+ counter?: {
1591
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1592
+ match?: Record<string, {
1593
+ equals?: string | number | boolean | undefined;
1594
+ contains?: string | undefined;
1595
+ }> | undefined;
1596
+ } | undefined;
1597
+ }, {
1598
+ type: "event_count";
1599
+ key: string;
1600
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1601
+ count: number;
1602
+ withinMs?: number | undefined;
1603
+ counter?: {
1604
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1605
+ match?: Record<string, {
1606
+ equals?: string | number | boolean | undefined;
1607
+ contains?: string | undefined;
1608
+ }> | undefined;
1609
+ } | undefined;
1610
+ }>]>, "many">;
1611
+ value: z.ZodUnknown;
1612
+ }, "strip", z.ZodTypeAny, {
1613
+ conditions: ({
1614
+ type: "page_url";
1615
+ url: string;
1616
+ } | {
1617
+ type: "route";
1618
+ routeId: string;
1619
+ } | {
1620
+ type: "anchor_visible";
1621
+ anchorId: string;
1622
+ state: "visible" | "present" | "absent";
1623
+ } | {
1624
+ type: "event_occurred";
1625
+ eventName: string;
1626
+ withinMs?: number | undefined;
1627
+ } | {
1628
+ type: "state_equals";
1629
+ key: string;
1630
+ value?: unknown;
1631
+ } | {
1632
+ type: "viewport";
1633
+ minWidth?: number | undefined;
1634
+ maxWidth?: number | undefined;
1635
+ minHeight?: number | undefined;
1636
+ maxHeight?: number | undefined;
1637
+ } | {
1638
+ type: "session_metric";
1639
+ key: "time_on_page" | "page_views" | "scroll_depth";
1640
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1641
+ threshold: number;
1642
+ } | {
1643
+ type: "dismissed";
1644
+ key: string;
1645
+ inverted?: boolean | undefined;
1646
+ } | {
1647
+ type: "cooldown_active";
1648
+ key: string;
1649
+ inverted?: boolean | undefined;
1650
+ } | {
1651
+ type: "frequency_limit";
1652
+ key: string;
1653
+ limit: number;
1654
+ inverted?: boolean | undefined;
1655
+ } | {
1656
+ type: "event_count";
1657
+ key: string;
1658
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1659
+ count: number;
1660
+ withinMs?: number | undefined;
1661
+ counter?: {
1662
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1663
+ match?: Record<string, {
1664
+ equals?: string | number | boolean | undefined;
1665
+ contains?: string | undefined;
1666
+ }> | undefined;
1667
+ } | undefined;
1668
+ })[];
1669
+ value?: unknown;
1670
+ }, {
1671
+ conditions: ({
1672
+ type: "page_url";
1673
+ url: string;
1674
+ } | {
1675
+ type: "route";
1676
+ routeId: string;
1677
+ } | {
1678
+ type: "anchor_visible";
1679
+ anchorId: string;
1680
+ state: "visible" | "present" | "absent";
1681
+ } | {
1682
+ type: "event_occurred";
1683
+ eventName: string;
1684
+ withinMs?: number | undefined;
1685
+ } | {
1686
+ type: "state_equals";
1687
+ key: string;
1688
+ value?: unknown;
1689
+ } | {
1690
+ type: "viewport";
1691
+ minWidth?: number | undefined;
1692
+ maxWidth?: number | undefined;
1693
+ minHeight?: number | undefined;
1694
+ maxHeight?: number | undefined;
1695
+ } | {
1696
+ type: "session_metric";
1697
+ key: "time_on_page" | "page_views" | "scroll_depth";
1698
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1699
+ threshold: number;
1700
+ } | {
1701
+ type: "dismissed";
1702
+ key: string;
1703
+ inverted?: boolean | undefined;
1704
+ } | {
1705
+ type: "cooldown_active";
1706
+ key: string;
1707
+ inverted?: boolean | undefined;
1708
+ } | {
1709
+ type: "frequency_limit";
1710
+ key: string;
1711
+ limit: number;
1712
+ inverted?: boolean | undefined;
1713
+ } | {
1714
+ type: "event_count";
1715
+ key: string;
1716
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1717
+ count: number;
1718
+ withinMs?: number | undefined;
1719
+ counter?: {
1720
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1721
+ match?: Record<string, {
1722
+ equals?: string | number | boolean | undefined;
1723
+ contains?: string | undefined;
1724
+ }> | undefined;
1725
+ } | undefined;
1726
+ })[];
1727
+ value?: unknown;
1728
+ }>, "many">;
1729
+ default: z.ZodUnknown;
1730
+ }, "strip", z.ZodTypeAny, {
1731
+ type: "rules";
1732
+ rules: {
1733
+ conditions: ({
1734
+ type: "page_url";
1735
+ url: string;
1736
+ } | {
1737
+ type: "route";
1738
+ routeId: string;
1739
+ } | {
1740
+ type: "anchor_visible";
1741
+ anchorId: string;
1742
+ state: "visible" | "present" | "absent";
1743
+ } | {
1744
+ type: "event_occurred";
1745
+ eventName: string;
1746
+ withinMs?: number | undefined;
1747
+ } | {
1748
+ type: "state_equals";
1749
+ key: string;
1750
+ value?: unknown;
1751
+ } | {
1752
+ type: "viewport";
1753
+ minWidth?: number | undefined;
1754
+ maxWidth?: number | undefined;
1755
+ minHeight?: number | undefined;
1756
+ maxHeight?: number | undefined;
1757
+ } | {
1758
+ type: "session_metric";
1759
+ key: "time_on_page" | "page_views" | "scroll_depth";
1760
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1761
+ threshold: number;
1762
+ } | {
1763
+ type: "dismissed";
1764
+ key: string;
1765
+ inverted?: boolean | undefined;
1766
+ } | {
1767
+ type: "cooldown_active";
1768
+ key: string;
1769
+ inverted?: boolean | undefined;
1770
+ } | {
1771
+ type: "frequency_limit";
1772
+ key: string;
1773
+ limit: number;
1774
+ inverted?: boolean | undefined;
1775
+ } | {
1776
+ type: "event_count";
1777
+ key: string;
1778
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1779
+ count: number;
1780
+ withinMs?: number | undefined;
1781
+ counter?: {
1782
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1783
+ match?: Record<string, {
1784
+ equals?: string | number | boolean | undefined;
1785
+ contains?: string | undefined;
1786
+ }> | undefined;
1787
+ } | undefined;
1788
+ })[];
1789
+ value?: unknown;
1790
+ }[];
1791
+ default?: unknown;
1792
+ }, {
1793
+ type: "rules";
1794
+ rules: {
1795
+ conditions: ({
1796
+ type: "page_url";
1797
+ url: string;
1798
+ } | {
1799
+ type: "route";
1800
+ routeId: string;
1801
+ } | {
1802
+ type: "anchor_visible";
1803
+ anchorId: string;
1804
+ state: "visible" | "present" | "absent";
1805
+ } | {
1806
+ type: "event_occurred";
1807
+ eventName: string;
1808
+ withinMs?: number | undefined;
1809
+ } | {
1810
+ type: "state_equals";
1811
+ key: string;
1812
+ value?: unknown;
1813
+ } | {
1814
+ type: "viewport";
1815
+ minWidth?: number | undefined;
1816
+ maxWidth?: number | undefined;
1817
+ minHeight?: number | undefined;
1818
+ maxHeight?: number | undefined;
1819
+ } | {
1820
+ type: "session_metric";
1821
+ key: "time_on_page" | "page_views" | "scroll_depth";
1822
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1823
+ threshold: number;
1824
+ } | {
1825
+ type: "dismissed";
1826
+ key: string;
1827
+ inverted?: boolean | undefined;
1828
+ } | {
1829
+ type: "cooldown_active";
1830
+ key: string;
1831
+ inverted?: boolean | undefined;
1832
+ } | {
1833
+ type: "frequency_limit";
1834
+ key: string;
1835
+ limit: number;
1836
+ inverted?: boolean | undefined;
1837
+ } | {
1838
+ type: "event_count";
1839
+ key: string;
1840
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1841
+ count: number;
1842
+ withinMs?: number | undefined;
1843
+ counter?: {
1844
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1845
+ match?: Record<string, {
1846
+ equals?: string | number | boolean | undefined;
1847
+ contains?: string | undefined;
1848
+ }> | undefined;
1849
+ } | undefined;
1850
+ })[];
1851
+ value?: unknown;
1852
+ }[];
1853
+ default?: unknown;
1854
+ }>, z.ZodObject<{
1855
+ type: z.ZodLiteral<"score">;
1856
+ field: z.ZodString;
1857
+ threshold: z.ZodNumber;
1858
+ above: z.ZodUnknown;
1859
+ below: z.ZodUnknown;
1860
+ }, "strip", z.ZodTypeAny, {
1861
+ type: "score";
1862
+ threshold: number;
1863
+ field: string;
1864
+ above?: unknown;
1865
+ below?: unknown;
1866
+ }, {
1867
+ type: "score";
1868
+ threshold: number;
1869
+ field: string;
1870
+ above?: unknown;
1871
+ below?: unknown;
1872
+ }>, z.ZodObject<{
1873
+ type: z.ZodLiteral<"model">;
1874
+ modelId: z.ZodString;
1875
+ inputs: z.ZodArray<z.ZodString, "many">;
1876
+ outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1877
+ default: z.ZodUnknown;
1878
+ }, "strip", z.ZodTypeAny, {
1879
+ type: "model";
1880
+ modelId: string;
1881
+ inputs: string[];
1882
+ outputMapping: Record<string, unknown>;
1883
+ default?: unknown;
1884
+ }, {
1885
+ type: "model";
1886
+ modelId: string;
1887
+ inputs: string[];
1888
+ outputMapping: Record<string, unknown>;
1889
+ default?: unknown;
1890
+ }>, z.ZodObject<{
1891
+ type: z.ZodLiteral<"external">;
1892
+ endpoint: z.ZodString;
1893
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
1894
+ default: z.ZodUnknown;
1895
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
1896
+ }, "strip", z.ZodTypeAny, {
1897
+ type: "external";
1898
+ endpoint: string;
1899
+ default?: unknown;
1900
+ method?: "GET" | "POST" | undefined;
1901
+ timeoutMs?: number | undefined;
1902
+ }, {
1903
+ type: "external";
1904
+ endpoint: string;
1905
+ default?: unknown;
1906
+ method?: "GET" | "POST" | undefined;
1907
+ timeoutMs?: number | undefined;
1908
+ }>]>>>;
1909
+ notify: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1910
+ title: z.ZodOptional<z.ZodString>;
1911
+ body: z.ZodOptional<z.ZodString>;
1912
+ icon: z.ZodOptional<z.ZodString>;
1913
+ }, "strip", z.ZodTypeAny, {
1914
+ title?: string | undefined;
1915
+ body?: string | undefined;
1916
+ icon?: string | undefined;
1917
+ }, {
1918
+ title?: string | undefined;
1919
+ body?: string | undefined;
1920
+ icon?: string | undefined;
1921
+ }>>>;
1922
+ id: z.ZodOptional<z.ZodString>;
1923
+ title: z.ZodOptional<z.ZodString>;
1924
+ description: z.ZodOptional<z.ZodString>;
1925
+ validation: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1926
+ }, "strip", z.ZodTypeAny, {
1927
+ config: {
1928
+ title: string;
1929
+ id: string;
1930
+ payload: {
1931
+ widget: string;
1932
+ props?: Record<string, unknown> | undefined;
1933
+ };
1934
+ };
1935
+ kind: "suggestions:chip";
1936
+ title?: string | undefined;
1937
+ id?: string | undefined;
1938
+ validation?: string[] | undefined;
1939
+ triggerWhen?: {
1940
+ type: "rules";
1941
+ rules: {
1942
+ conditions: ({
1943
+ type: "page_url";
1944
+ url: string;
1945
+ } | {
1946
+ type: "route";
1947
+ routeId: string;
1948
+ } | {
1949
+ type: "anchor_visible";
1950
+ anchorId: string;
1951
+ state: "visible" | "present" | "absent";
1952
+ } | {
1953
+ type: "event_occurred";
1954
+ eventName: string;
1955
+ withinMs?: number | undefined;
1956
+ } | {
1957
+ type: "state_equals";
1958
+ key: string;
1959
+ value?: unknown;
1960
+ } | {
1961
+ type: "viewport";
1962
+ minWidth?: number | undefined;
1963
+ maxWidth?: number | undefined;
1964
+ minHeight?: number | undefined;
1965
+ maxHeight?: number | undefined;
1966
+ } | {
1967
+ type: "session_metric";
1968
+ key: "time_on_page" | "page_views" | "scroll_depth";
1969
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1970
+ threshold: number;
1971
+ } | {
1972
+ type: "dismissed";
1973
+ key: string;
1974
+ inverted?: boolean | undefined;
1975
+ } | {
1976
+ type: "cooldown_active";
1977
+ key: string;
1978
+ inverted?: boolean | undefined;
1979
+ } | {
1980
+ type: "frequency_limit";
1981
+ key: string;
1982
+ limit: number;
1983
+ inverted?: boolean | undefined;
1984
+ } | {
1985
+ type: "event_count";
1986
+ key: string;
1987
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1988
+ count: number;
1989
+ withinMs?: number | undefined;
1990
+ counter?: {
1991
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1992
+ match?: Record<string, {
1993
+ equals?: string | number | boolean | undefined;
1994
+ contains?: string | undefined;
1995
+ }> | undefined;
1996
+ } | undefined;
1997
+ })[];
1998
+ value?: unknown;
1999
+ }[];
2000
+ default?: unknown;
2001
+ } | {
2002
+ type: "score";
2003
+ threshold: number;
2004
+ field: string;
2005
+ above?: unknown;
2006
+ below?: unknown;
2007
+ } | {
2008
+ type: "model";
2009
+ modelId: string;
2010
+ inputs: string[];
2011
+ outputMapping: Record<string, unknown>;
2012
+ default?: unknown;
2013
+ } | {
2014
+ type: "external";
2015
+ endpoint: string;
2016
+ default?: unknown;
2017
+ method?: "GET" | "POST" | undefined;
2018
+ timeoutMs?: number | undefined;
2019
+ } | null | undefined;
2020
+ notify?: {
2021
+ title?: string | undefined;
2022
+ body?: string | undefined;
2023
+ icon?: string | undefined;
2024
+ } | null | undefined;
2025
+ description?: string | undefined;
2026
+ }, {
2027
+ config: {
2028
+ title: string;
2029
+ id: string;
2030
+ payload: {
2031
+ widget: string;
2032
+ props?: Record<string, unknown> | undefined;
2033
+ };
2034
+ };
2035
+ kind: "suggestions:chip";
2036
+ title?: string | undefined;
2037
+ id?: string | undefined;
2038
+ validation?: string[] | undefined;
2039
+ triggerWhen?: {
2040
+ type: "rules";
2041
+ rules: {
2042
+ conditions: ({
2043
+ type: "page_url";
2044
+ url: string;
2045
+ } | {
2046
+ type: "route";
2047
+ routeId: string;
2048
+ } | {
2049
+ type: "anchor_visible";
2050
+ anchorId: string;
2051
+ state: "visible" | "present" | "absent";
2052
+ } | {
2053
+ type: "event_occurred";
2054
+ eventName: string;
2055
+ withinMs?: number | undefined;
2056
+ } | {
2057
+ type: "state_equals";
2058
+ key: string;
2059
+ value?: unknown;
2060
+ } | {
2061
+ type: "viewport";
2062
+ minWidth?: number | undefined;
2063
+ maxWidth?: number | undefined;
2064
+ minHeight?: number | undefined;
2065
+ maxHeight?: number | undefined;
2066
+ } | {
2067
+ type: "session_metric";
2068
+ key: "time_on_page" | "page_views" | "scroll_depth";
2069
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2070
+ threshold: number;
2071
+ } | {
2072
+ type: "dismissed";
2073
+ key: string;
2074
+ inverted?: boolean | undefined;
2075
+ } | {
2076
+ type: "cooldown_active";
2077
+ key: string;
2078
+ inverted?: boolean | undefined;
2079
+ } | {
2080
+ type: "frequency_limit";
2081
+ key: string;
2082
+ limit: number;
2083
+ inverted?: boolean | undefined;
2084
+ } | {
2085
+ type: "event_count";
2086
+ key: string;
2087
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2088
+ count: number;
2089
+ withinMs?: number | undefined;
2090
+ counter?: {
2091
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2092
+ match?: Record<string, {
2093
+ equals?: string | number | boolean | undefined;
2094
+ contains?: string | undefined;
2095
+ }> | undefined;
2096
+ } | undefined;
2097
+ })[];
2098
+ value?: unknown;
2099
+ }[];
2100
+ default?: unknown;
2101
+ } | {
2102
+ type: "score";
2103
+ threshold: number;
2104
+ field: string;
2105
+ above?: unknown;
2106
+ below?: unknown;
2107
+ } | {
2108
+ type: "model";
2109
+ modelId: string;
2110
+ inputs: string[];
2111
+ outputMapping: Record<string, unknown>;
2112
+ default?: unknown;
2113
+ } | {
2114
+ type: "external";
2115
+ endpoint: string;
2116
+ default?: unknown;
2117
+ method?: "GET" | "POST" | undefined;
2118
+ timeoutMs?: number | undefined;
2119
+ } | null | undefined;
2120
+ notify?: {
2121
+ title?: string | undefined;
2122
+ body?: string | undefined;
2123
+ icon?: string | undefined;
2124
+ } | null | undefined;
2125
+ description?: string | undefined;
2126
+ }>, {
2127
+ config: {
2128
+ title: string;
2129
+ id: string;
2130
+ payload: {
2131
+ widget: string;
2132
+ props?: Record<string, unknown> | undefined;
2133
+ };
2134
+ };
2135
+ kind: "suggestions:chip";
2136
+ title?: string | undefined;
2137
+ id?: string | undefined;
2138
+ validation?: string[] | undefined;
2139
+ triggerWhen?: {
2140
+ type: "rules";
2141
+ rules: {
2142
+ conditions: ({
2143
+ type: "page_url";
2144
+ url: string;
2145
+ } | {
2146
+ type: "route";
2147
+ routeId: string;
2148
+ } | {
2149
+ type: "anchor_visible";
2150
+ anchorId: string;
2151
+ state: "visible" | "present" | "absent";
2152
+ } | {
2153
+ type: "event_occurred";
2154
+ eventName: string;
2155
+ withinMs?: number | undefined;
2156
+ } | {
2157
+ type: "state_equals";
2158
+ key: string;
2159
+ value?: unknown;
2160
+ } | {
2161
+ type: "viewport";
2162
+ minWidth?: number | undefined;
2163
+ maxWidth?: number | undefined;
2164
+ minHeight?: number | undefined;
2165
+ maxHeight?: number | undefined;
2166
+ } | {
2167
+ type: "session_metric";
2168
+ key: "time_on_page" | "page_views" | "scroll_depth";
2169
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2170
+ threshold: number;
2171
+ } | {
2172
+ type: "dismissed";
2173
+ key: string;
2174
+ inverted?: boolean | undefined;
2175
+ } | {
2176
+ type: "cooldown_active";
2177
+ key: string;
2178
+ inverted?: boolean | undefined;
2179
+ } | {
2180
+ type: "frequency_limit";
2181
+ key: string;
2182
+ limit: number;
2183
+ inverted?: boolean | undefined;
2184
+ } | {
2185
+ type: "event_count";
2186
+ key: string;
2187
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2188
+ count: number;
2189
+ withinMs?: number | undefined;
2190
+ counter?: {
2191
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2192
+ match?: Record<string, {
2193
+ equals?: string | number | boolean | undefined;
2194
+ contains?: string | undefined;
2195
+ }> | undefined;
2196
+ } | undefined;
2197
+ })[];
2198
+ value?: unknown;
2199
+ }[];
2200
+ default?: unknown;
2201
+ } | {
2202
+ type: "score";
2203
+ threshold: number;
2204
+ field: string;
2205
+ above?: unknown;
2206
+ below?: unknown;
2207
+ } | {
2208
+ type: "model";
2209
+ modelId: string;
2210
+ inputs: string[];
2211
+ outputMapping: Record<string, unknown>;
2212
+ default?: unknown;
2213
+ } | {
2214
+ type: "external";
2215
+ endpoint: string;
2216
+ default?: unknown;
2217
+ method?: "GET" | "POST" | undefined;
2218
+ timeoutMs?: number | undefined;
2219
+ } | null | undefined;
2220
+ notify?: {
2221
+ title?: string | undefined;
2222
+ body?: string | undefined;
2223
+ icon?: string | undefined;
2224
+ } | null | undefined;
2225
+ description?: string | undefined;
2226
+ }, {
2227
+ config: {
2228
+ title: string;
2229
+ id: string;
2230
+ payload: {
2231
+ widget: string;
2232
+ props?: Record<string, unknown> | undefined;
2233
+ };
2234
+ };
2235
+ kind: "suggestions:chip";
2236
+ title?: string | undefined;
2237
+ id?: string | undefined;
2238
+ validation?: string[] | undefined;
2239
+ triggerWhen?: {
2240
+ type: "rules";
2241
+ rules: {
2242
+ conditions: ({
2243
+ type: "page_url";
2244
+ url: string;
2245
+ } | {
2246
+ type: "route";
2247
+ routeId: string;
2248
+ } | {
2249
+ type: "anchor_visible";
2250
+ anchorId: string;
2251
+ state: "visible" | "present" | "absent";
2252
+ } | {
2253
+ type: "event_occurred";
2254
+ eventName: string;
2255
+ withinMs?: number | undefined;
2256
+ } | {
2257
+ type: "state_equals";
2258
+ key: string;
2259
+ value?: unknown;
2260
+ } | {
2261
+ type: "viewport";
2262
+ minWidth?: number | undefined;
2263
+ maxWidth?: number | undefined;
2264
+ minHeight?: number | undefined;
2265
+ maxHeight?: number | undefined;
2266
+ } | {
2267
+ type: "session_metric";
2268
+ key: "time_on_page" | "page_views" | "scroll_depth";
2269
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2270
+ threshold: number;
2271
+ } | {
2272
+ type: "dismissed";
2273
+ key: string;
2274
+ inverted?: boolean | undefined;
2275
+ } | {
2276
+ type: "cooldown_active";
2277
+ key: string;
2278
+ inverted?: boolean | undefined;
2279
+ } | {
2280
+ type: "frequency_limit";
2281
+ key: string;
2282
+ limit: number;
2283
+ inverted?: boolean | undefined;
2284
+ } | {
2285
+ type: "event_count";
2286
+ key: string;
2287
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2288
+ count: number;
2289
+ withinMs?: number | undefined;
2290
+ counter?: {
2291
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2292
+ match?: Record<string, {
2293
+ equals?: string | number | boolean | undefined;
2294
+ contains?: string | undefined;
2295
+ }> | undefined;
2296
+ } | undefined;
2297
+ })[];
2298
+ value?: unknown;
2299
+ }[];
2300
+ default?: unknown;
2301
+ } | {
2302
+ type: "score";
2303
+ threshold: number;
2304
+ field: string;
2305
+ above?: unknown;
2306
+ below?: unknown;
2307
+ } | {
2308
+ type: "model";
2309
+ modelId: string;
2310
+ inputs: string[];
2311
+ outputMapping: Record<string, unknown>;
2312
+ default?: unknown;
2313
+ } | {
2314
+ type: "external";
2315
+ endpoint: string;
2316
+ default?: unknown;
2317
+ method?: "GET" | "POST" | undefined;
2318
+ timeoutMs?: number | undefined;
2319
+ } | null | undefined;
2320
+ notify?: {
2321
+ title?: string | undefined;
2322
+ body?: string | undefined;
2323
+ icon?: string | undefined;
2324
+ } | null | undefined;
2325
+ description?: string | undefined;
2326
+ }>, "many">>;
2327
+ }, "strict", z.ZodTypeAny, {
2328
+ chips: {
2329
+ config: {
2330
+ title: string;
2331
+ id: string;
2332
+ payload: {
2333
+ widget: string;
2334
+ props?: Record<string, unknown> | undefined;
2335
+ };
2336
+ };
2337
+ kind: "suggestions:chip";
2338
+ title?: string | undefined;
2339
+ id?: string | undefined;
2340
+ validation?: string[] | undefined;
2341
+ triggerWhen?: {
2342
+ type: "rules";
2343
+ rules: {
2344
+ conditions: ({
2345
+ type: "page_url";
2346
+ url: string;
2347
+ } | {
2348
+ type: "route";
2349
+ routeId: string;
2350
+ } | {
2351
+ type: "anchor_visible";
2352
+ anchorId: string;
2353
+ state: "visible" | "present" | "absent";
2354
+ } | {
2355
+ type: "event_occurred";
2356
+ eventName: string;
2357
+ withinMs?: number | undefined;
2358
+ } | {
2359
+ type: "state_equals";
2360
+ key: string;
2361
+ value?: unknown;
2362
+ } | {
2363
+ type: "viewport";
2364
+ minWidth?: number | undefined;
2365
+ maxWidth?: number | undefined;
2366
+ minHeight?: number | undefined;
2367
+ maxHeight?: number | undefined;
2368
+ } | {
2369
+ type: "session_metric";
2370
+ key: "time_on_page" | "page_views" | "scroll_depth";
2371
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2372
+ threshold: number;
2373
+ } | {
2374
+ type: "dismissed";
2375
+ key: string;
2376
+ inverted?: boolean | undefined;
2377
+ } | {
2378
+ type: "cooldown_active";
2379
+ key: string;
2380
+ inverted?: boolean | undefined;
2381
+ } | {
2382
+ type: "frequency_limit";
2383
+ key: string;
2384
+ limit: number;
2385
+ inverted?: boolean | undefined;
2386
+ } | {
2387
+ type: "event_count";
2388
+ key: string;
2389
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2390
+ count: number;
2391
+ withinMs?: number | undefined;
2392
+ counter?: {
2393
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2394
+ match?: Record<string, {
2395
+ equals?: string | number | boolean | undefined;
2396
+ contains?: string | undefined;
2397
+ }> | undefined;
2398
+ } | undefined;
2399
+ })[];
2400
+ value?: unknown;
2401
+ }[];
2402
+ default?: unknown;
2403
+ } | {
2404
+ type: "score";
2405
+ threshold: number;
2406
+ field: string;
2407
+ above?: unknown;
2408
+ below?: unknown;
2409
+ } | {
2410
+ type: "model";
2411
+ modelId: string;
2412
+ inputs: string[];
2413
+ outputMapping: Record<string, unknown>;
2414
+ default?: unknown;
2415
+ } | {
2416
+ type: "external";
2417
+ endpoint: string;
2418
+ default?: unknown;
2419
+ method?: "GET" | "POST" | undefined;
2420
+ timeoutMs?: number | undefined;
2421
+ } | null | undefined;
2422
+ notify?: {
2423
+ title?: string | undefined;
2424
+ body?: string | undefined;
2425
+ icon?: string | undefined;
2426
+ } | null | undefined;
2427
+ description?: string | undefined;
2428
+ }[];
2429
+ }, {
2430
+ chips?: {
2431
+ config: {
2432
+ title: string;
2433
+ id: string;
2434
+ payload: {
2435
+ widget: string;
2436
+ props?: Record<string, unknown> | undefined;
2437
+ };
2438
+ };
2439
+ kind: "suggestions:chip";
2440
+ title?: string | undefined;
2441
+ id?: string | undefined;
2442
+ validation?: string[] | undefined;
2443
+ triggerWhen?: {
2444
+ type: "rules";
2445
+ rules: {
2446
+ conditions: ({
2447
+ type: "page_url";
2448
+ url: string;
2449
+ } | {
2450
+ type: "route";
2451
+ routeId: string;
2452
+ } | {
2453
+ type: "anchor_visible";
2454
+ anchorId: string;
2455
+ state: "visible" | "present" | "absent";
2456
+ } | {
2457
+ type: "event_occurred";
2458
+ eventName: string;
2459
+ withinMs?: number | undefined;
2460
+ } | {
2461
+ type: "state_equals";
2462
+ key: string;
2463
+ value?: unknown;
2464
+ } | {
2465
+ type: "viewport";
2466
+ minWidth?: number | undefined;
2467
+ maxWidth?: number | undefined;
2468
+ minHeight?: number | undefined;
2469
+ maxHeight?: number | undefined;
2470
+ } | {
2471
+ type: "session_metric";
2472
+ key: "time_on_page" | "page_views" | "scroll_depth";
2473
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2474
+ threshold: number;
2475
+ } | {
2476
+ type: "dismissed";
2477
+ key: string;
2478
+ inverted?: boolean | undefined;
2479
+ } | {
2480
+ type: "cooldown_active";
2481
+ key: string;
2482
+ inverted?: boolean | undefined;
2483
+ } | {
2484
+ type: "frequency_limit";
2485
+ key: string;
2486
+ limit: number;
2487
+ inverted?: boolean | undefined;
2488
+ } | {
2489
+ type: "event_count";
2490
+ key: string;
2491
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2492
+ count: number;
2493
+ withinMs?: number | undefined;
2494
+ counter?: {
2495
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2496
+ match?: Record<string, {
2497
+ equals?: string | number | boolean | undefined;
2498
+ contains?: string | undefined;
2499
+ }> | undefined;
2500
+ } | undefined;
2501
+ })[];
2502
+ value?: unknown;
2503
+ }[];
2504
+ default?: unknown;
2505
+ } | {
2506
+ type: "score";
2507
+ threshold: number;
2508
+ field: string;
2509
+ above?: unknown;
2510
+ below?: unknown;
2511
+ } | {
2512
+ type: "model";
2513
+ modelId: string;
2514
+ inputs: string[];
2515
+ outputMapping: Record<string, unknown>;
2516
+ default?: unknown;
2517
+ } | {
2518
+ type: "external";
2519
+ endpoint: string;
2520
+ default?: unknown;
2521
+ method?: "GET" | "POST" | undefined;
2522
+ timeoutMs?: number | undefined;
2523
+ } | null | undefined;
2524
+ notify?: {
2525
+ title?: string | undefined;
2526
+ body?: string | undefined;
2527
+ icon?: string | undefined;
2528
+ } | null | undefined;
2529
+ description?: string | undefined;
2530
+ }[] | undefined;
2531
+ }>;
2532
+ })[];
2533
+ /**
2534
+ * Action step schemas — registered into the unified canvas-config
2535
+ * JSON Schema's action-step union so authors (and the tactician LLM)
2536
+ * can emit `suggestions:chip` items inside a chips-strip tile's
2537
+ * `props.chips` array with full validation.
2538
+ *
2539
+ * `.innerType()` strips the `.refine()` wrapper (cross-field
2540
+ * refinements don't translate to JSON Schema); runtime Zod still
2541
+ * enforces them.
2542
+ */
2543
+ export declare const actionStepSchemas: {
2544
+ defName: string;
2545
+ schema: z.ZodObject<{
2546
+ kind: z.ZodLiteral<"suggestions:chip">;
2547
+ config: z.ZodObject<{
2548
+ id: z.ZodString;
2549
+ title: z.ZodString;
2550
+ payload: z.ZodObject<{
2551
+ widget: z.ZodString;
2552
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2553
+ }, "strict", z.ZodTypeAny, {
2554
+ widget: string;
2555
+ props?: Record<string, unknown> | undefined;
2556
+ }, {
2557
+ widget: string;
2558
+ props?: Record<string, unknown> | undefined;
2559
+ }>;
2560
+ }, "strip", z.ZodTypeAny, {
2561
+ title: string;
2562
+ id: string;
2563
+ payload: {
2564
+ widget: string;
2565
+ props?: Record<string, unknown> | undefined;
2566
+ };
2567
+ }, {
2568
+ title: string;
2569
+ id: string;
2570
+ payload: {
2571
+ widget: string;
2572
+ props?: Record<string, unknown> | undefined;
2573
+ };
2574
+ }>;
2575
+ triggerWhen: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2576
+ type: z.ZodLiteral<"rules">;
2577
+ rules: z.ZodArray<z.ZodObject<{
2578
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2579
+ type: z.ZodLiteral<"page_url">;
2580
+ url: z.ZodString;
2581
+ }, "strip", z.ZodTypeAny, {
2582
+ type: "page_url";
2583
+ url: string;
2584
+ }, {
2585
+ type: "page_url";
2586
+ url: string;
2587
+ }>, z.ZodObject<{
2588
+ type: z.ZodLiteral<"route">;
2589
+ routeId: z.ZodString;
2590
+ }, "strip", z.ZodTypeAny, {
2591
+ type: "route";
2592
+ routeId: string;
2593
+ }, {
2594
+ type: "route";
2595
+ routeId: string;
2596
+ }>, z.ZodObject<{
2597
+ type: z.ZodLiteral<"anchor_visible">;
2598
+ anchorId: z.ZodString;
2599
+ state: z.ZodEnum<["visible", "present", "absent"]>;
2600
+ }, "strip", z.ZodTypeAny, {
2601
+ type: "anchor_visible";
2602
+ anchorId: string;
2603
+ state: "visible" | "present" | "absent";
2604
+ }, {
2605
+ type: "anchor_visible";
2606
+ anchorId: string;
2607
+ state: "visible" | "present" | "absent";
2608
+ }>, z.ZodObject<{
2609
+ type: z.ZodLiteral<"event_occurred">;
2610
+ eventName: z.ZodString;
2611
+ withinMs: z.ZodOptional<z.ZodNumber>;
2612
+ }, "strip", z.ZodTypeAny, {
2613
+ type: "event_occurred";
2614
+ eventName: string;
2615
+ withinMs?: number | undefined;
2616
+ }, {
2617
+ type: "event_occurred";
2618
+ eventName: string;
2619
+ withinMs?: number | undefined;
2620
+ }>, z.ZodObject<{
2621
+ type: z.ZodLiteral<"state_equals">;
2622
+ key: z.ZodString;
2623
+ value: z.ZodUnknown;
2624
+ }, "strip", z.ZodTypeAny, {
2625
+ type: "state_equals";
2626
+ key: string;
2627
+ value?: unknown;
2628
+ }, {
2629
+ type: "state_equals";
2630
+ key: string;
2631
+ value?: unknown;
2632
+ }>, z.ZodObject<{
2633
+ type: z.ZodLiteral<"viewport">;
2634
+ minWidth: z.ZodOptional<z.ZodNumber>;
2635
+ maxWidth: z.ZodOptional<z.ZodNumber>;
2636
+ minHeight: z.ZodOptional<z.ZodNumber>;
2637
+ maxHeight: z.ZodOptional<z.ZodNumber>;
2638
+ }, "strip", z.ZodTypeAny, {
2639
+ type: "viewport";
2640
+ minWidth?: number | undefined;
2641
+ maxWidth?: number | undefined;
2642
+ minHeight?: number | undefined;
2643
+ maxHeight?: number | undefined;
2644
+ }, {
2645
+ type: "viewport";
2646
+ minWidth?: number | undefined;
2647
+ maxWidth?: number | undefined;
2648
+ minHeight?: number | undefined;
2649
+ maxHeight?: number | undefined;
2650
+ }>, z.ZodObject<{
2651
+ type: z.ZodLiteral<"session_metric">;
2652
+ key: z.ZodEnum<["time_on_page", "page_views", "scroll_depth"]>;
2653
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
2654
+ threshold: z.ZodNumber;
2655
+ }, "strip", z.ZodTypeAny, {
2656
+ type: "session_metric";
2657
+ key: "time_on_page" | "page_views" | "scroll_depth";
2658
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2659
+ threshold: number;
2660
+ }, {
2661
+ type: "session_metric";
2662
+ key: "time_on_page" | "page_views" | "scroll_depth";
2663
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2664
+ threshold: number;
2665
+ }>, z.ZodObject<{
2666
+ type: z.ZodLiteral<"dismissed">;
2667
+ key: z.ZodString;
2668
+ inverted: z.ZodOptional<z.ZodBoolean>;
2669
+ }, "strip", z.ZodTypeAny, {
2670
+ type: "dismissed";
2671
+ key: string;
2672
+ inverted?: boolean | undefined;
2673
+ }, {
2674
+ type: "dismissed";
2675
+ key: string;
2676
+ inverted?: boolean | undefined;
2677
+ }>, z.ZodObject<{
2678
+ type: z.ZodLiteral<"cooldown_active">;
2679
+ key: z.ZodString;
2680
+ inverted: z.ZodOptional<z.ZodBoolean>;
2681
+ }, "strip", z.ZodTypeAny, {
2682
+ type: "cooldown_active";
2683
+ key: string;
2684
+ inverted?: boolean | undefined;
2685
+ }, {
2686
+ type: "cooldown_active";
2687
+ key: string;
2688
+ inverted?: boolean | undefined;
2689
+ }>, z.ZodObject<{
2690
+ type: z.ZodLiteral<"frequency_limit">;
2691
+ key: z.ZodString;
2692
+ limit: z.ZodNumber;
2693
+ inverted: z.ZodOptional<z.ZodBoolean>;
2694
+ }, "strip", z.ZodTypeAny, {
2695
+ type: "frequency_limit";
2696
+ key: string;
2697
+ limit: number;
2698
+ inverted?: boolean | undefined;
2699
+ }, {
2700
+ type: "frequency_limit";
2701
+ key: string;
2702
+ limit: number;
2703
+ inverted?: boolean | undefined;
2704
+ }>, z.ZodObject<{
2705
+ type: z.ZodLiteral<"event_count">;
2706
+ key: z.ZodString;
2707
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
2708
+ count: z.ZodNumber;
2709
+ withinMs: z.ZodOptional<z.ZodNumber>;
2710
+ counter: z.ZodOptional<z.ZodObject<{
2711
+ events: z.ZodArray<z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "ui.hesitate", "ui.rage_click", "nav.page_view", "nav.page_leave"]>, "many">;
2712
+ match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2713
+ equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
2714
+ contains: z.ZodOptional<z.ZodString>;
2715
+ }, "strip", z.ZodTypeAny, {
2716
+ equals?: string | number | boolean | undefined;
2717
+ contains?: string | undefined;
2718
+ }, {
2719
+ equals?: string | number | boolean | undefined;
2720
+ contains?: string | undefined;
2721
+ }>>>;
2722
+ }, "strip", z.ZodTypeAny, {
2723
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2724
+ match?: Record<string, {
2725
+ equals?: string | number | boolean | undefined;
2726
+ contains?: string | undefined;
2727
+ }> | undefined;
2728
+ }, {
2729
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2730
+ match?: Record<string, {
2731
+ equals?: string | number | boolean | undefined;
2732
+ contains?: string | undefined;
2733
+ }> | undefined;
2734
+ }>>;
2735
+ }, "strip", z.ZodTypeAny, {
2736
+ type: "event_count";
2737
+ key: string;
2738
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2739
+ count: number;
2740
+ withinMs?: number | undefined;
2741
+ counter?: {
2742
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2743
+ match?: Record<string, {
2744
+ equals?: string | number | boolean | undefined;
2745
+ contains?: string | undefined;
2746
+ }> | undefined;
2747
+ } | undefined;
2748
+ }, {
2749
+ type: "event_count";
2750
+ key: string;
2751
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2752
+ count: number;
2753
+ withinMs?: number | undefined;
2754
+ counter?: {
2755
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2756
+ match?: Record<string, {
2757
+ equals?: string | number | boolean | undefined;
2758
+ contains?: string | undefined;
2759
+ }> | undefined;
2760
+ } | undefined;
2761
+ }>]>, "many">;
2762
+ value: z.ZodUnknown;
2763
+ }, "strip", z.ZodTypeAny, {
2764
+ conditions: ({
2765
+ type: "page_url";
2766
+ url: string;
2767
+ } | {
2768
+ type: "route";
2769
+ routeId: string;
2770
+ } | {
2771
+ type: "anchor_visible";
2772
+ anchorId: string;
2773
+ state: "visible" | "present" | "absent";
2774
+ } | {
2775
+ type: "event_occurred";
2776
+ eventName: string;
2777
+ withinMs?: number | undefined;
2778
+ } | {
2779
+ type: "state_equals";
2780
+ key: string;
2781
+ value?: unknown;
2782
+ } | {
2783
+ type: "viewport";
2784
+ minWidth?: number | undefined;
2785
+ maxWidth?: number | undefined;
2786
+ minHeight?: number | undefined;
2787
+ maxHeight?: number | undefined;
2788
+ } | {
2789
+ type: "session_metric";
2790
+ key: "time_on_page" | "page_views" | "scroll_depth";
2791
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2792
+ threshold: number;
2793
+ } | {
2794
+ type: "dismissed";
2795
+ key: string;
2796
+ inverted?: boolean | undefined;
2797
+ } | {
2798
+ type: "cooldown_active";
2799
+ key: string;
2800
+ inverted?: boolean | undefined;
2801
+ } | {
2802
+ type: "frequency_limit";
2803
+ key: string;
2804
+ limit: number;
2805
+ inverted?: boolean | undefined;
2806
+ } | {
2807
+ type: "event_count";
2808
+ key: string;
2809
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2810
+ count: number;
2811
+ withinMs?: number | undefined;
2812
+ counter?: {
2813
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2814
+ match?: Record<string, {
2815
+ equals?: string | number | boolean | undefined;
2816
+ contains?: string | undefined;
2817
+ }> | undefined;
2818
+ } | undefined;
2819
+ })[];
2820
+ value?: unknown;
2821
+ }, {
2822
+ conditions: ({
2823
+ type: "page_url";
2824
+ url: string;
2825
+ } | {
2826
+ type: "route";
2827
+ routeId: string;
2828
+ } | {
2829
+ type: "anchor_visible";
2830
+ anchorId: string;
2831
+ state: "visible" | "present" | "absent";
2832
+ } | {
2833
+ type: "event_occurred";
2834
+ eventName: string;
2835
+ withinMs?: number | undefined;
2836
+ } | {
2837
+ type: "state_equals";
2838
+ key: string;
2839
+ value?: unknown;
2840
+ } | {
2841
+ type: "viewport";
2842
+ minWidth?: number | undefined;
2843
+ maxWidth?: number | undefined;
2844
+ minHeight?: number | undefined;
2845
+ maxHeight?: number | undefined;
2846
+ } | {
2847
+ type: "session_metric";
2848
+ key: "time_on_page" | "page_views" | "scroll_depth";
2849
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2850
+ threshold: number;
2851
+ } | {
2852
+ type: "dismissed";
2853
+ key: string;
2854
+ inverted?: boolean | undefined;
2855
+ } | {
2856
+ type: "cooldown_active";
2857
+ key: string;
2858
+ inverted?: boolean | undefined;
2859
+ } | {
2860
+ type: "frequency_limit";
2861
+ key: string;
2862
+ limit: number;
2863
+ inverted?: boolean | undefined;
2864
+ } | {
2865
+ type: "event_count";
2866
+ key: string;
2867
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2868
+ count: number;
2869
+ withinMs?: number | undefined;
2870
+ counter?: {
2871
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2872
+ match?: Record<string, {
2873
+ equals?: string | number | boolean | undefined;
2874
+ contains?: string | undefined;
2875
+ }> | undefined;
2876
+ } | undefined;
2877
+ })[];
2878
+ value?: unknown;
2879
+ }>, "many">;
2880
+ default: z.ZodUnknown;
2881
+ }, "strip", z.ZodTypeAny, {
2882
+ type: "rules";
2883
+ rules: {
2884
+ conditions: ({
2885
+ type: "page_url";
2886
+ url: string;
2887
+ } | {
2888
+ type: "route";
2889
+ routeId: string;
2890
+ } | {
2891
+ type: "anchor_visible";
2892
+ anchorId: string;
2893
+ state: "visible" | "present" | "absent";
2894
+ } | {
2895
+ type: "event_occurred";
2896
+ eventName: string;
2897
+ withinMs?: number | undefined;
2898
+ } | {
2899
+ type: "state_equals";
2900
+ key: string;
2901
+ value?: unknown;
2902
+ } | {
2903
+ type: "viewport";
2904
+ minWidth?: number | undefined;
2905
+ maxWidth?: number | undefined;
2906
+ minHeight?: number | undefined;
2907
+ maxHeight?: number | undefined;
2908
+ } | {
2909
+ type: "session_metric";
2910
+ key: "time_on_page" | "page_views" | "scroll_depth";
2911
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2912
+ threshold: number;
2913
+ } | {
2914
+ type: "dismissed";
2915
+ key: string;
2916
+ inverted?: boolean | undefined;
2917
+ } | {
2918
+ type: "cooldown_active";
2919
+ key: string;
2920
+ inverted?: boolean | undefined;
2921
+ } | {
2922
+ type: "frequency_limit";
2923
+ key: string;
2924
+ limit: number;
2925
+ inverted?: boolean | undefined;
2926
+ } | {
2927
+ type: "event_count";
2928
+ key: string;
2929
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2930
+ count: number;
2931
+ withinMs?: number | undefined;
2932
+ counter?: {
2933
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2934
+ match?: Record<string, {
2935
+ equals?: string | number | boolean | undefined;
2936
+ contains?: string | undefined;
2937
+ }> | undefined;
2938
+ } | undefined;
2939
+ })[];
2940
+ value?: unknown;
2941
+ }[];
2942
+ default?: unknown;
2943
+ }, {
2944
+ type: "rules";
2945
+ rules: {
2946
+ conditions: ({
2947
+ type: "page_url";
2948
+ url: string;
2949
+ } | {
2950
+ type: "route";
2951
+ routeId: string;
2952
+ } | {
2953
+ type: "anchor_visible";
2954
+ anchorId: string;
2955
+ state: "visible" | "present" | "absent";
2956
+ } | {
2957
+ type: "event_occurred";
2958
+ eventName: string;
2959
+ withinMs?: number | undefined;
2960
+ } | {
2961
+ type: "state_equals";
2962
+ key: string;
2963
+ value?: unknown;
2964
+ } | {
2965
+ type: "viewport";
2966
+ minWidth?: number | undefined;
2967
+ maxWidth?: number | undefined;
2968
+ minHeight?: number | undefined;
2969
+ maxHeight?: number | undefined;
2970
+ } | {
2971
+ type: "session_metric";
2972
+ key: "time_on_page" | "page_views" | "scroll_depth";
2973
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2974
+ threshold: number;
2975
+ } | {
2976
+ type: "dismissed";
2977
+ key: string;
2978
+ inverted?: boolean | undefined;
2979
+ } | {
2980
+ type: "cooldown_active";
2981
+ key: string;
2982
+ inverted?: boolean | undefined;
2983
+ } | {
2984
+ type: "frequency_limit";
2985
+ key: string;
2986
+ limit: number;
2987
+ inverted?: boolean | undefined;
2988
+ } | {
2989
+ type: "event_count";
2990
+ key: string;
2991
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2992
+ count: number;
2993
+ withinMs?: number | undefined;
2994
+ counter?: {
2995
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2996
+ match?: Record<string, {
2997
+ equals?: string | number | boolean | undefined;
2998
+ contains?: string | undefined;
2999
+ }> | undefined;
3000
+ } | undefined;
3001
+ })[];
3002
+ value?: unknown;
3003
+ }[];
3004
+ default?: unknown;
3005
+ }>, z.ZodObject<{
3006
+ type: z.ZodLiteral<"score">;
3007
+ field: z.ZodString;
3008
+ threshold: z.ZodNumber;
3009
+ above: z.ZodUnknown;
3010
+ below: z.ZodUnknown;
3011
+ }, "strip", z.ZodTypeAny, {
3012
+ type: "score";
3013
+ threshold: number;
3014
+ field: string;
3015
+ above?: unknown;
3016
+ below?: unknown;
3017
+ }, {
3018
+ type: "score";
3019
+ threshold: number;
3020
+ field: string;
3021
+ above?: unknown;
3022
+ below?: unknown;
3023
+ }>, z.ZodObject<{
3024
+ type: z.ZodLiteral<"model">;
3025
+ modelId: z.ZodString;
3026
+ inputs: z.ZodArray<z.ZodString, "many">;
3027
+ outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3028
+ default: z.ZodUnknown;
3029
+ }, "strip", z.ZodTypeAny, {
3030
+ type: "model";
3031
+ modelId: string;
3032
+ inputs: string[];
3033
+ outputMapping: Record<string, unknown>;
3034
+ default?: unknown;
3035
+ }, {
3036
+ type: "model";
3037
+ modelId: string;
3038
+ inputs: string[];
3039
+ outputMapping: Record<string, unknown>;
3040
+ default?: unknown;
3041
+ }>, z.ZodObject<{
3042
+ type: z.ZodLiteral<"external">;
3043
+ endpoint: z.ZodString;
3044
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
3045
+ default: z.ZodUnknown;
3046
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
3047
+ }, "strip", z.ZodTypeAny, {
3048
+ type: "external";
3049
+ endpoint: string;
3050
+ default?: unknown;
3051
+ method?: "GET" | "POST" | undefined;
3052
+ timeoutMs?: number | undefined;
3053
+ }, {
3054
+ type: "external";
3055
+ endpoint: string;
3056
+ default?: unknown;
3057
+ method?: "GET" | "POST" | undefined;
3058
+ timeoutMs?: number | undefined;
3059
+ }>]>>>;
3060
+ notify: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3061
+ title: z.ZodOptional<z.ZodString>;
3062
+ body: z.ZodOptional<z.ZodString>;
3063
+ icon: z.ZodOptional<z.ZodString>;
3064
+ }, "strip", z.ZodTypeAny, {
3065
+ title?: string | undefined;
3066
+ body?: string | undefined;
3067
+ icon?: string | undefined;
3068
+ }, {
3069
+ title?: string | undefined;
3070
+ body?: string | undefined;
3071
+ icon?: string | undefined;
3072
+ }>>>;
3073
+ id: z.ZodOptional<z.ZodString>;
3074
+ title: z.ZodOptional<z.ZodString>;
3075
+ description: z.ZodOptional<z.ZodString>;
3076
+ validation: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3077
+ }, "strip", z.ZodTypeAny, {
3078
+ config: {
3079
+ title: string;
3080
+ id: string;
3081
+ payload: {
3082
+ widget: string;
3083
+ props?: Record<string, unknown> | undefined;
3084
+ };
3085
+ };
3086
+ kind: "suggestions:chip";
3087
+ title?: string | undefined;
3088
+ id?: string | undefined;
3089
+ validation?: string[] | undefined;
3090
+ triggerWhen?: {
3091
+ type: "rules";
3092
+ rules: {
3093
+ conditions: ({
3094
+ type: "page_url";
3095
+ url: string;
3096
+ } | {
3097
+ type: "route";
3098
+ routeId: string;
3099
+ } | {
3100
+ type: "anchor_visible";
3101
+ anchorId: string;
3102
+ state: "visible" | "present" | "absent";
3103
+ } | {
3104
+ type: "event_occurred";
3105
+ eventName: string;
3106
+ withinMs?: number | undefined;
3107
+ } | {
3108
+ type: "state_equals";
3109
+ key: string;
3110
+ value?: unknown;
3111
+ } | {
3112
+ type: "viewport";
3113
+ minWidth?: number | undefined;
3114
+ maxWidth?: number | undefined;
3115
+ minHeight?: number | undefined;
3116
+ maxHeight?: number | undefined;
3117
+ } | {
3118
+ type: "session_metric";
3119
+ key: "time_on_page" | "page_views" | "scroll_depth";
3120
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3121
+ threshold: number;
3122
+ } | {
3123
+ type: "dismissed";
3124
+ key: string;
3125
+ inverted?: boolean | undefined;
3126
+ } | {
3127
+ type: "cooldown_active";
3128
+ key: string;
3129
+ inverted?: boolean | undefined;
3130
+ } | {
3131
+ type: "frequency_limit";
3132
+ key: string;
3133
+ limit: number;
3134
+ inverted?: boolean | undefined;
3135
+ } | {
3136
+ type: "event_count";
3137
+ key: string;
3138
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3139
+ count: number;
3140
+ withinMs?: number | undefined;
3141
+ counter?: {
3142
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
3143
+ match?: Record<string, {
3144
+ equals?: string | number | boolean | undefined;
3145
+ contains?: string | undefined;
3146
+ }> | undefined;
3147
+ } | undefined;
3148
+ })[];
3149
+ value?: unknown;
3150
+ }[];
3151
+ default?: unknown;
3152
+ } | {
3153
+ type: "score";
3154
+ threshold: number;
3155
+ field: string;
3156
+ above?: unknown;
3157
+ below?: unknown;
3158
+ } | {
3159
+ type: "model";
3160
+ modelId: string;
3161
+ inputs: string[];
3162
+ outputMapping: Record<string, unknown>;
3163
+ default?: unknown;
3164
+ } | {
3165
+ type: "external";
3166
+ endpoint: string;
3167
+ default?: unknown;
3168
+ method?: "GET" | "POST" | undefined;
3169
+ timeoutMs?: number | undefined;
3170
+ } | null | undefined;
3171
+ notify?: {
3172
+ title?: string | undefined;
3173
+ body?: string | undefined;
3174
+ icon?: string | undefined;
3175
+ } | null | undefined;
3176
+ description?: string | undefined;
3177
+ }, {
3178
+ config: {
3179
+ title: string;
3180
+ id: string;
3181
+ payload: {
3182
+ widget: string;
3183
+ props?: Record<string, unknown> | undefined;
3184
+ };
3185
+ };
3186
+ kind: "suggestions:chip";
3187
+ title?: string | undefined;
3188
+ id?: string | undefined;
3189
+ validation?: string[] | undefined;
3190
+ triggerWhen?: {
3191
+ type: "rules";
3192
+ rules: {
3193
+ conditions: ({
3194
+ type: "page_url";
3195
+ url: string;
3196
+ } | {
3197
+ type: "route";
3198
+ routeId: string;
3199
+ } | {
3200
+ type: "anchor_visible";
3201
+ anchorId: string;
3202
+ state: "visible" | "present" | "absent";
3203
+ } | {
3204
+ type: "event_occurred";
3205
+ eventName: string;
3206
+ withinMs?: number | undefined;
3207
+ } | {
3208
+ type: "state_equals";
3209
+ key: string;
3210
+ value?: unknown;
3211
+ } | {
3212
+ type: "viewport";
3213
+ minWidth?: number | undefined;
3214
+ maxWidth?: number | undefined;
3215
+ minHeight?: number | undefined;
3216
+ maxHeight?: number | undefined;
3217
+ } | {
3218
+ type: "session_metric";
3219
+ key: "time_on_page" | "page_views" | "scroll_depth";
3220
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3221
+ threshold: number;
3222
+ } | {
3223
+ type: "dismissed";
3224
+ key: string;
3225
+ inverted?: boolean | undefined;
3226
+ } | {
3227
+ type: "cooldown_active";
3228
+ key: string;
3229
+ inverted?: boolean | undefined;
3230
+ } | {
3231
+ type: "frequency_limit";
3232
+ key: string;
3233
+ limit: number;
3234
+ inverted?: boolean | undefined;
3235
+ } | {
3236
+ type: "event_count";
3237
+ key: string;
3238
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3239
+ count: number;
3240
+ withinMs?: number | undefined;
3241
+ counter?: {
3242
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
3243
+ match?: Record<string, {
3244
+ equals?: string | number | boolean | undefined;
3245
+ contains?: string | undefined;
3246
+ }> | undefined;
3247
+ } | undefined;
3248
+ })[];
3249
+ value?: unknown;
3250
+ }[];
3251
+ default?: unknown;
3252
+ } | {
3253
+ type: "score";
3254
+ threshold: number;
3255
+ field: string;
3256
+ above?: unknown;
3257
+ below?: unknown;
3258
+ } | {
3259
+ type: "model";
3260
+ modelId: string;
3261
+ inputs: string[];
3262
+ outputMapping: Record<string, unknown>;
3263
+ default?: unknown;
3264
+ } | {
3265
+ type: "external";
3266
+ endpoint: string;
3267
+ default?: unknown;
3268
+ method?: "GET" | "POST" | undefined;
3269
+ timeoutMs?: number | undefined;
3270
+ } | null | undefined;
3271
+ notify?: {
3272
+ title?: string | undefined;
3273
+ body?: string | undefined;
3274
+ icon?: string | undefined;
3275
+ } | null | undefined;
3276
+ description?: string | undefined;
3277
+ }>;
165
3278
  }[];
166
3279
  //# sourceMappingURL=schema.d.ts.map