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