@syntrologie/adapt-chatbot 2.8.0-canary.62 → 2.8.0-canary.621

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