@kitn.ai/ui 0.20.1 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (500) hide show
  1. package/README.md +44 -45
  2. package/dist/components/artifact-card.d.ts +51 -0
  3. package/dist/components/artifact.d.ts +1 -1
  4. package/dist/components/attachments.d.ts +2 -2
  5. package/dist/components/audio-visualizer/index.d.ts +3 -3
  6. package/dist/components/audio-visualizer/labs/lab-choreography.d.ts +59 -0
  7. package/dist/components/audio-visualizer/labs/lab-shaders.d.ts +22 -0
  8. package/dist/components/audio-visualizer/labs/lab-visualizer.d.ts +18 -0
  9. package/dist/components/audio-visualizer/variant-aurora.d.ts +2 -2
  10. package/dist/components/audio-visualizer/variant-bar.d.ts +2 -2
  11. package/dist/components/audio-visualizer/variant-custom.d.ts +2 -2
  12. package/dist/components/audio-visualizer/variant-grid.d.ts +1 -1
  13. package/dist/components/audio-visualizer/variant-radial.d.ts +1 -1
  14. package/dist/components/audio-visualizer/variant-wave.d.ts +1 -1
  15. package/dist/components/card-fallback.d.ts +12 -2
  16. package/dist/components/card-renderer.d.ts +63 -2
  17. package/dist/components/chat-container.d.ts +3 -0
  18. package/dist/components/chat-scope-picker.d.ts +2 -2
  19. package/dist/components/chat-thread.d.ts +68 -18
  20. package/dist/components/choice-card.d.ts +3 -28
  21. package/dist/components/composer-dom.d.ts +1 -1
  22. package/dist/components/composer-highlight.d.ts +1 -1
  23. package/dist/components/composer-history.d.ts +1 -1
  24. package/dist/components/composer.d.ts +1 -1
  25. package/dist/components/confirm-card.d.ts +3 -18
  26. package/dist/components/context.d.ts +8 -4
  27. package/dist/components/conversation-item.d.ts +1 -1
  28. package/dist/components/conversation-list.d.ts +4 -3
  29. package/dist/components/embed.d.ts +3 -3
  30. package/dist/components/file-tree.d.ts +11 -22
  31. package/dist/components/form-widgets.d.ts +1 -1
  32. package/dist/components/form.d.ts +3 -44
  33. package/dist/components/link-preview.d.ts +3 -3
  34. package/dist/components/loader.d.ts +30 -48
  35. package/dist/components/message-skills.d.ts +4 -0
  36. package/dist/components/message.d.ts +84 -21
  37. package/dist/components/model-switcher.d.ts +2 -2
  38. package/dist/components/prompt-input.d.ts +2 -2
  39. package/dist/components/response-compare-types.d.ts +11 -2
  40. package/dist/components/response-compare.d.ts +3 -3
  41. package/dist/components/source.d.ts +12 -3
  42. package/dist/components/tasks-card.d.ts +3 -31
  43. package/dist/components/thread.d.ts +17 -5
  44. package/dist/components/toast.d.ts +2 -2
  45. package/dist/components/tool-classify.d.ts +8 -0
  46. package/dist/components/tool-types.d.ts +29 -1
  47. package/dist/components/tool.d.ts +3 -3
  48. package/dist/components/use-card-resolution.d.ts +1 -1
  49. package/dist/create-tween-D3Y5qiij.js +338 -0
  50. package/dist/create-tween-DGKY1FDY.js +341 -0
  51. package/dist/create-tween-paho5Rh-.js +7 -0
  52. package/dist/custom-elements.json +1681 -454
  53. package/dist/elements/agent-card.js +1 -1
  54. package/dist/elements/artifact.js +1 -1
  55. package/dist/elements/attachments.js +1 -1
  56. package/dist/elements/audio-visualizer.js +1 -1
  57. package/dist/elements/avatar.js +1 -1
  58. package/dist/elements/badge.js +1 -1
  59. package/dist/elements/button.js +1 -1
  60. package/dist/elements/card.js +1 -1
  61. package/dist/elements/cards.js +1 -1
  62. package/dist/elements/chain-of-thought.js +1 -1
  63. package/dist/elements/chat-scope-picker.js +1 -1
  64. package/dist/elements/chat-types.d.ts +70 -10
  65. package/dist/elements/chat-workspace.js +1 -1
  66. package/dist/elements/chat.js +1 -1
  67. package/dist/elements/checkpoint.js +1 -1
  68. package/dist/elements/choice.js +1 -1
  69. package/dist/elements/chunks/{Icon-Tj58ES_d.js → Icon-C-2LvGDG.js} +1 -1
  70. package/dist/elements/chunks/{action-icons-ns1Fnedj.js → action-icons-CaYoImEk.js} +1 -1
  71. package/dist/elements/chunks/arrow-left-Bb46H7w9.js +1 -0
  72. package/dist/elements/chunks/artifact-BBIscOxJ.js +1 -0
  73. package/dist/elements/chunks/{attachments-mCB5F1Fq.js → attachments-BB56zoji.js} +1 -1
  74. package/dist/elements/chunks/audio-visualizer-BxOx4THz.js +1 -0
  75. package/dist/elements/chunks/{badge-B4Zuajl2.js → badge-SxLSZ19R.js} +1 -1
  76. package/dist/elements/chunks/{button-ZWNif3--.js → button-CmkUkz6c.js} +1 -1
  77. package/dist/elements/chunks/card-renderer-Db4ffkWv.js +1 -0
  78. package/dist/elements/chunks/card-tags-D8lZ-C_U.js +1 -0
  79. package/dist/elements/chunks/chat-thread-B3Ks-cKr.js +1 -0
  80. package/dist/elements/chunks/check-C8desc_h.js +1 -0
  81. package/dist/elements/chunks/chevron-down-DKtc2HNB.js +1 -0
  82. package/dist/elements/chunks/chevron-right-Dw4GPhwL.js +1 -0
  83. package/dist/elements/chunks/choice-card-Q9cYYDyM.js +1 -0
  84. package/dist/elements/chunks/circle-BeokBsvB.js +1 -0
  85. package/dist/elements/chunks/circle-check-wJSqt859.js +1 -0
  86. package/dist/elements/chunks/{circle-x-B7faJFlY.js → circle-x-D0MEfxOM.js} +1 -1
  87. package/dist/elements/chunks/code-block-C8VzAraE.js +1 -0
  88. package/dist/elements/chunks/{collapsible-DM1Ckd4e.js → collapsible-Cvj61obE.js} +1 -1
  89. package/dist/elements/chunks/{composer-BguS0QL_.js → composer-D86ztyL0.js} +2 -2
  90. package/dist/elements/chunks/confirm-card-BdyDAGLw.js +1 -0
  91. package/dist/elements/chunks/context-WHDl-xSx.js +1 -0
  92. package/dist/elements/chunks/conversation-list-CdR14_Y4.js +1 -0
  93. package/dist/elements/chunks/create-tween-C_A_B638.js +7 -0
  94. package/dist/elements/chunks/{default-input-Cqqilg9t.js → default-input-CSZqUM81.js} +1 -1
  95. package/dist/elements/chunks/define-BzPnNsXg.js +1 -0
  96. package/dist/elements/chunks/{disclosure-CIZ5c8nO.js → disclosure-DVKsoc1F.js} +1 -1
  97. package/dist/elements/chunks/{download-Dsbg3ste.js → download-BjA54IMJ.js} +1 -1
  98. package/dist/elements/chunks/{dropdown-BDd1-Zgi.js → dropdown-BjVVHWXH.js} +1 -1
  99. package/dist/elements/chunks/{ellipsis-Dw6qrss-.js → ellipsis-BNedmqfi.js} +1 -1
  100. package/dist/elements/chunks/embed-DQsl4XEq.js +1 -0
  101. package/dist/elements/chunks/{external-link-Vt74zAoL.js → external-link-Di-dw2CU.js} +1 -1
  102. package/dist/elements/chunks/{file-text-CZrZF6_v.js → file-text-B3sAODCV.js} +1 -1
  103. package/dist/elements/chunks/{file-tree-DF4okKyo.js → file-tree-Dgto-bMn.js} +1 -1
  104. package/dist/elements/chunks/{folder-glP5rha4.js → folder-D6rMadFV.js} +1 -1
  105. package/dist/elements/chunks/form-CILxvhQ7.js +1 -0
  106. package/dist/elements/chunks/hover-card-BtiF4XiU.js +1 -0
  107. package/dist/elements/chunks/{icon-BLb8beoi.js → icon-DKkmze3y.js} +1 -1
  108. package/dist/elements/chunks/{info-CIsv92JK.js → info-CWRjZkuy.js} +1 -1
  109. package/dist/elements/chunks/{input-Dds1kFyt.js → input--QJBK6BA.js} +1 -1
  110. package/dist/elements/chunks/{kbd-De_xbgi9.js → kbd-C3zuKh8R.js} +1 -1
  111. package/dist/elements/chunks/{link-i4r_k7z4.js → link-BL5JA7Q0.js} +1 -1
  112. package/dist/elements/chunks/link-preview-CU37bbXh.js +1 -0
  113. package/dist/elements/chunks/{loader-BmQH4s3V.js → loader-XmpyxyRH.js} +1 -1
  114. package/dist/elements/chunks/{markdown-Zi21WhUz.js → markdown-3Gv5UZ_o.js} +1 -1
  115. package/dist/elements/chunks/message-CnBA2OUt.js +1 -0
  116. package/dist/elements/chunks/message-X5NZbq-W.js +1 -0
  117. package/dist/elements/chunks/message-square-CnpAm_P0.js +1 -0
  118. package/dist/elements/chunks/{minimize-2--ifeCGrl.js → minimize-2-DwyrUTcM.js} +1 -1
  119. package/dist/elements/chunks/{model-switcher-B94YAKsM.js → model-switcher-CclaJEHt.js} +1 -1
  120. package/dist/elements/chunks/{overlay-kD8dwRv_.js → overlay-Cepd-KcS.js} +1 -1
  121. package/dist/elements/chunks/{paperclip-q21dYOSK.js → paperclip-CdwKjrlu.js} +1 -1
  122. package/dist/elements/chunks/{progress-bar-BrAIIaaJ.js → progress-bar-DMVXBD3b.js} +1 -1
  123. package/dist/elements/chunks/{prompt-suggestion-Bjn2K-fR.js → prompt-suggestion-Di_WZE_5.js} +1 -1
  124. package/dist/elements/chunks/reasoning-D0jMch5u.js +1 -0
  125. package/dist/elements/chunks/{resizable-Dp4JExql.js → resizable-1znbL1Gv.js} +1 -1
  126. package/dist/elements/chunks/{rotate-cw-CFWWkpj2.js → rotate-cw-DVhhgx8n.js} +1 -1
  127. package/dist/elements/chunks/{scroll-area-Bb0kHH1j.js → scroll-area-Bs4bFS1P.js} +1 -1
  128. package/dist/elements/chunks/scroll-button-Bet5NLc4.js +1 -0
  129. package/dist/elements/chunks/{separator-9kRgr1X9.js → separator-C5Gh8qGC.js} +1 -1
  130. package/dist/elements/chunks/{settings-B8lmec4D.js → settings-5vmEFg0K.js} +1 -1
  131. package/dist/elements/chunks/{settings-group-I0hEuXiN.js → settings-group-BWLB38kz.js} +1 -1
  132. package/dist/elements/chunks/{share-C3lTiYGt.js → share-BZ3G_DaB.js} +1 -1
  133. package/dist/elements/chunks/skeleton-DafPJQTp.js +1 -0
  134. package/dist/elements/chunks/slots-CIw9RlAe.js +1 -0
  135. package/dist/elements/chunks/source-D_qj_6uJ.js +1 -0
  136. package/dist/elements/chunks/{star-CSJtGxgv.js → star-Cuv7j2IE.js} +1 -1
  137. package/dist/elements/chunks/{store-CHyW95TP.js → store-C1StPHfW.js} +1 -1
  138. package/dist/elements/chunks/tasks-card-EyoBZfpA.js +1 -0
  139. package/dist/elements/chunks/{text-shimmer-Cn9TmNpI.js → text-shimmer-D9gRSh34.js} +1 -1
  140. package/dist/elements/chunks/textarea-DuhtHfcm.js +1 -0
  141. package/dist/elements/chunks/{thumbs-up-PNVVThEF.js → thumbs-up-B9hwv43w.js} +1 -1
  142. package/dist/elements/chunks/{toast-store-DKbQn3Wn.js → toast-store-Bm3DUEDe.js} +1 -1
  143. package/dist/elements/chunks/{tool-DjTRpIpl.js → tool-CDtW7L0z.js} +1 -1
  144. package/dist/elements/chunks/tooltip-eB226mGK.js +1 -0
  145. package/dist/elements/chunks/{triangle-alert-DsHTHCPm.js → triangle-alert-C1SNzTqK.js} +1 -1
  146. package/dist/elements/chunks/use-card-resolution-YZh2MvI5.js +1 -0
  147. package/dist/elements/chunks/{variant-aurora-Dc4nQUia.js → variant-aurora-Cj1F7D0l.js} +2 -2
  148. package/dist/elements/chunks/{variant-custom-y_3kVQhS.js → variant-custom-T9gpt7QE.js} +1 -1
  149. package/dist/elements/chunks/{variant-wave-D5OR1-9Z.js → variant-wave-CxU9z-TE.js} +2 -2
  150. package/dist/elements/chunks/{video-B7vmenoC.js → video-CK4R7Rus.js} +1 -1
  151. package/dist/elements/chunks/x-D1qx0aLd.js +1 -0
  152. package/dist/elements/coachmark.js +1 -1
  153. package/dist/elements/code-block.js +1 -1
  154. package/dist/elements/command.js +1 -1
  155. package/dist/elements/compare.js +1 -1
  156. package/dist/elements/composer.js +1 -1
  157. package/dist/elements/confirm-card.js +1 -1
  158. package/dist/elements/context-meter.js +1 -1
  159. package/dist/elements/conversation-list.js +1 -1
  160. package/dist/elements/default-input.d.ts +7 -7
  161. package/dist/elements/define.d.ts +1 -0
  162. package/dist/elements/dialog.js +1 -1
  163. package/dist/elements/disclosure.d.ts +1 -1
  164. package/dist/elements/editable-label.js +1 -1
  165. package/dist/elements/element-data-types.d.ts +107 -0
  166. package/dist/elements/embed.js +1 -1
  167. package/dist/elements/empty.js +1 -1
  168. package/dist/elements/feedback-bar.js +1 -1
  169. package/dist/elements/file-tree.js +1 -1
  170. package/dist/elements/file-upload.js +1 -1
  171. package/dist/elements/form.js +1 -1
  172. package/dist/elements/hover-card.js +1 -1
  173. package/dist/elements/icon.js +1 -1
  174. package/dist/elements/image.js +1 -1
  175. package/dist/elements/input.js +1 -1
  176. package/dist/elements/kbd.js +1 -1
  177. package/dist/elements/link-preview.js +1 -1
  178. package/dist/elements/loader.js +1 -1
  179. package/dist/elements/markdown.js +1 -1
  180. package/dist/elements/menu.js +1 -1
  181. package/dist/elements/message-skills.js +1 -1
  182. package/dist/elements/message.js +1 -1
  183. package/dist/elements/model-switcher.js +1 -1
  184. package/dist/elements/nav.js +1 -1
  185. package/dist/elements/notice.js +1 -1
  186. package/dist/elements/pane-group.js +1 -1
  187. package/dist/elements/pane.js +1 -1
  188. package/dist/elements/popover.js +1 -1
  189. package/dist/elements/progress-bar.js +1 -1
  190. package/dist/elements/prompt-dock.js +1 -1
  191. package/dist/elements/prompt-input.js +1 -1
  192. package/dist/elements/prompt-suggestions.js +1 -1
  193. package/dist/elements/reasoning.js +1 -1
  194. package/dist/elements/register.d.ts +8 -6
  195. package/dist/elements/remote.js +1 -1
  196. package/dist/elements/resizable.js +1 -1
  197. package/dist/elements/response-stream.js +2 -2
  198. package/dist/elements/screen.js +1 -1
  199. package/dist/elements/scroll-area.js +1 -1
  200. package/dist/elements/scroll-button.js +1 -1
  201. package/dist/elements/search.js +1 -1
  202. package/dist/elements/segmented.js +1 -1
  203. package/dist/elements/separator.js +1 -1
  204. package/dist/elements/setting-item.js +1 -1
  205. package/dist/elements/settings-group.js +1 -1
  206. package/dist/elements/skeleton.js +1 -1
  207. package/dist/elements/slots.d.ts +16 -0
  208. package/dist/elements/source.js +1 -1
  209. package/dist/elements/status.js +1 -1
  210. package/dist/elements/switch.js +1 -1
  211. package/dist/elements/tabs.js +1 -1
  212. package/dist/elements/tasks.js +1 -1
  213. package/dist/elements/text-shimmer.js +1 -1
  214. package/dist/elements/thinking-bar.js +1 -1
  215. package/dist/elements/thread.js +1 -1
  216. package/dist/elements/toast.js +1 -1
  217. package/dist/elements/tool.js +1 -1
  218. package/dist/elements/tooltip.js +1 -1
  219. package/dist/elements/validate-messages.d.ts +25 -0
  220. package/dist/elements/voice-input.js +1 -1
  221. package/dist/elements/voice-output.js +1 -1
  222. package/dist/elements.d.ts +2725 -214
  223. package/dist/index.d.ts +163 -125
  224. package/dist/index.js +6336 -5802
  225. package/dist/index.server.d.ts +5 -0
  226. package/dist/index.server.js +5446 -4937
  227. package/dist/kai-provider.es.d.ts +5 -0
  228. package/dist/kai-provider.es.js +79 -77
  229. package/dist/kai.es.d.ts +5 -0
  230. package/dist/kai.es.js +1 -1
  231. package/dist/llms/llms-full.txt +762 -148
  232. package/dist/llms/llms.txt +57 -5
  233. package/dist/mcp.es.js +4010 -770
  234. package/dist/primitives/card-component-types.d.ts +11 -0
  235. package/dist/primitives/card-data-types.d.ts +196 -0
  236. package/dist/primitives/card-host.d.ts +1 -1
  237. package/dist/primitives/card-recovery.d.ts +3 -3
  238. package/dist/primitives/card-registry.d.ts +4 -14
  239. package/dist/primitives/card-resolution.d.ts +1 -1
  240. package/dist/primitives/card-routing.d.ts +1 -1
  241. package/dist/primitives/card-tags.d.ts +11 -0
  242. package/dist/primitives/card-validate-cards.d.ts +57 -0
  243. package/dist/primitives/card-validate-generator.testlib.d.ts +20 -0
  244. package/dist/primitives/card-validate-schemas.d.ts +17 -0
  245. package/dist/primitives/card-validate.d.ts +24 -0
  246. package/dist/primitives/create-kai-chat.d.ts +3 -3
  247. package/dist/primitives/embed-providers.d.ts +1 -1
  248. package/dist/primitives/link-preview.d.ts +1 -1
  249. package/dist/primitives/message-feedback.d.ts +2 -2
  250. package/dist/primitives/toast-store.d.ts +1 -1
  251. package/dist/react/index.d.ts +717 -299
  252. package/dist/react/use-kai-chat.d.ts +8 -4
  253. package/dist/react.d.ts +5 -0
  254. package/dist/react.js +417 -316
  255. package/dist/register-impl-bzrZ44ft.js +145 -0
  256. package/dist/remote/host-embed.d.ts +1 -1
  257. package/dist/remote/index.d.ts +2 -2
  258. package/dist/remote/provider-runtime.d.ts +2 -2
  259. package/dist/remote/provider.d.ts +2 -2
  260. package/dist/remote/validate.d.ts +1 -1
  261. package/dist/remote/wire.d.ts +1 -1
  262. package/dist/schemas/artifact.schema.json +92 -0
  263. package/dist/schemas/embed.schema.json +0 -2
  264. package/dist/schemas/from-tool-call.d.ts +48 -0
  265. package/dist/schemas/index.d.ts +48 -0
  266. package/dist/schemas/link.schema.json +0 -2
  267. package/dist/schemas/provider-subsets.d.ts +136 -0
  268. package/dist/schemas/registry.d.ts +140 -0
  269. package/dist/schemas/tool-defs.d.ts +121 -0
  270. package/dist/schemas.d.ts +5 -0
  271. package/dist/schemas.js +717 -0
  272. package/dist/solid-BCJUQqwS.js +22750 -0
  273. package/dist/solid-BdENBcEq.js +20108 -0
  274. package/dist/solid.d.ts +66 -0
  275. package/dist/solid.js +261 -0
  276. package/dist/solid.server.d.ts +5 -0
  277. package/dist/solid.server.js +261 -0
  278. package/dist/state/index.d.ts +14 -4
  279. package/dist/state/messages.d.ts +8 -3
  280. package/dist/state/mock.d.ts +46 -0
  281. package/dist/state/parts.d.ts +85 -0
  282. package/dist/state/stream.d.ts +15 -9
  283. package/dist/state.d.ts +5 -0
  284. package/dist/state.js +253 -84
  285. package/dist/ui/action-icons.d.ts +1 -1
  286. package/dist/ui/collapsible.d.ts +11 -6
  287. package/dist/ui/dropdown.d.ts +47 -42
  288. package/dist/ui/pane-group.d.ts +1 -1
  289. package/dist/variant-aurora-1wMcXRUS.js +381 -0
  290. package/dist/variant-aurora-BKHHiOgL.js +391 -0
  291. package/dist/{variant-aurora-DVtGqVH6.js → variant-aurora-DOb_o4pC.js} +1 -1
  292. package/dist/{variant-custom-Dif-IV4u.js → variant-custom-CJGB0Kbw.js} +1 -1
  293. package/dist/variant-custom-Co0CkXJF.js +200 -0
  294. package/dist/variant-custom-DWSSgmd2.js +170 -0
  295. package/dist/variant-wave-C3-45cL6.js +218 -0
  296. package/dist/{variant-wave-DbfNdvSi.js → variant-wave-CEODq-9q.js} +1 -1
  297. package/dist/variant-wave-jdXBnCUZ.js +208 -0
  298. package/dist/wire/chunk.d.ts +171 -0
  299. package/dist/wire/consume.d.ts +26 -0
  300. package/dist/wire/encode.d.ts +148 -0
  301. package/dist/wire/formats/anthropic.d.ts +2 -0
  302. package/dist/wire/formats/openai.d.ts +5 -0
  303. package/dist/wire/index.d.ts +14 -0
  304. package/dist/wire/read.d.ts +26 -0
  305. package/dist/wire/sink-helpers.d.ts +21 -0
  306. package/dist/wire/sse.d.ts +33 -0
  307. package/dist/wire.d.ts +5 -53
  308. package/dist/wire.js +898 -0
  309. package/frameworks/react/index.tsx +183 -154
  310. package/frameworks/react/runtime.tsx +21 -1
  311. package/frameworks/react/use-kai-chat.tsx +11 -1
  312. package/llms-full.txt +762 -148
  313. package/llms.txt +57 -5
  314. package/package.json +61 -8
  315. package/src/agent-tooling/archetypes.ts +96 -0
  316. package/src/agent-tooling/integrations/anthropic.ts +412 -0
  317. package/src/agent-tooling/integrations/cloudflare.ts +136 -52
  318. package/src/agent-tooling/integrations/langgraph.ts +67 -13
  319. package/src/agent-tooling/integrations/mastra.ts +120 -12
  320. package/src/agent-tooling/integrations/mock.ts +43 -8
  321. package/src/agent-tooling/integrations/ollama.ts +61 -24
  322. package/src/agent-tooling/integrations/openai.ts +87 -0
  323. package/src/agent-tooling/integrations/openrouter.ts +56 -8
  324. package/src/agent-tooling/integrations/pi.ts +79 -23
  325. package/src/agent-tooling/integrations/pydantic-ai.ts +24 -2
  326. package/src/agent-tooling/integrations/vercel-ai-sdk.ts +84 -13
  327. package/src/agent-tooling/mcp/manifest.ts +206 -25
  328. package/src/agent-tooling/mcp/tools/debug.ts +13 -7
  329. package/src/agent-tooling/mcp/tools/reference.ts +285 -6
  330. package/src/agent-tooling/mcp/tools/scaffold.ts +3345 -675
  331. package/src/agent-tooling/registry.ts +17 -0
  332. package/src/agent-tooling/types.ts +229 -1
  333. package/src/components/artifact-card.tsx +120 -0
  334. package/src/components/audio-visualizer/index.tsx +9 -0
  335. package/src/components/audio-visualizer/labs/lab-choreography.ts +187 -0
  336. package/src/components/audio-visualizer/labs/lab-shaders.ts +363 -0
  337. package/src/components/audio-visualizer/labs/lab-visualizer.tsx +102 -0
  338. package/src/components/audio-visualizer/shader-canvas.tsx +31 -1
  339. package/src/components/card-fallback.tsx +42 -10
  340. package/src/components/card-renderer.tsx +146 -9
  341. package/src/components/chat-container.tsx +4 -0
  342. package/src/components/chat-thread.tsx +118 -51
  343. package/src/components/choice-card.tsx +17 -29
  344. package/src/components/composer.tsx +12 -2
  345. package/src/components/confirm-card.tsx +24 -20
  346. package/src/components/context.tsx +12 -4
  347. package/src/components/conversation-list.tsx +18 -2
  348. package/src/components/file-tree.tsx +11 -22
  349. package/src/components/file-upload.tsx +14 -8
  350. package/src/components/form.tsx +14 -47
  351. package/src/components/loader.tsx +39 -12
  352. package/src/components/message-skills.tsx +4 -0
  353. package/src/components/message.tsx +294 -46
  354. package/src/components/reasoning.tsx +92 -5
  355. package/src/components/response-compare-types.ts +25 -0
  356. package/src/components/response-compare.tsx +4 -9
  357. package/src/components/source.tsx +50 -24
  358. package/src/components/tasks-card.tsx +10 -33
  359. package/src/components/thread.tsx +84 -42
  360. package/src/components/toast.tsx +11 -5
  361. package/src/components/tool-classify.ts +26 -0
  362. package/src/components/tool-types.ts +31 -1
  363. package/src/elements/agent-card.tsx +11 -11
  364. package/src/elements/artifact.tsx +15 -7
  365. package/src/elements/attachments.tsx +6 -4
  366. package/src/elements/avatar.tsx +1 -1
  367. package/src/elements/button.tsx +3 -3
  368. package/src/elements/card.tsx +2 -2
  369. package/src/elements/cards.tsx +109 -14
  370. package/src/elements/chain-of-thought.tsx +14 -10
  371. package/src/elements/chat-scope-picker.tsx +9 -7
  372. package/src/elements/chat-types.ts +59 -6
  373. package/src/elements/chat-workspace.tsx +50 -9
  374. package/src/elements/chat.tsx +64 -3
  375. package/src/elements/choice.tsx +8 -8
  376. package/src/elements/coachmark.tsx +1 -1
  377. package/src/elements/command.tsx +8 -23
  378. package/src/elements/compare.tsx +7 -6
  379. package/src/elements/compiled.css +1 -1
  380. package/src/elements/composer.tsx +8 -8
  381. package/src/elements/confirm-card.tsx +9 -9
  382. package/src/elements/context-meter.tsx +4 -18
  383. package/src/elements/conversation-list.tsx +14 -9
  384. package/src/elements/default-input.tsx +3 -3
  385. package/src/elements/define.tsx +178 -43
  386. package/src/elements/editable-label.tsx +17 -2
  387. package/src/elements/element-data-types.ts +112 -0
  388. package/src/elements/element-meta.json +1596 -304
  389. package/src/elements/element-types.d.ts +2636 -211
  390. package/src/elements/feedback-bar.tsx +1 -1
  391. package/src/elements/file-tree.tsx +1 -1
  392. package/src/elements/file-upload.tsx +1 -1
  393. package/src/elements/form.tsx +14 -6
  394. package/src/elements/input.tsx +1 -1
  395. package/src/elements/kbd.tsx +1 -1
  396. package/src/elements/menu.tsx +10 -29
  397. package/src/elements/message-skills.tsx +7 -9
  398. package/src/elements/message.tsx +200 -32
  399. package/src/elements/model-switcher.tsx +5 -3
  400. package/src/elements/pane.tsx +1 -1
  401. package/src/elements/prompt-dock.tsx +8 -8
  402. package/src/elements/prompt-input.tsx +10 -10
  403. package/src/elements/prompt-suggestions.tsx +7 -4
  404. package/src/elements/reasoning.tsx +1 -1
  405. package/src/elements/register.ts +9 -0
  406. package/src/elements/resizable.globals.d.ts +36 -0
  407. package/src/elements/resizable.tsx +24 -13
  408. package/src/elements/response-stream.tsx +1 -1
  409. package/src/elements/scroll-button.tsx +1 -1
  410. package/src/elements/search.tsx +6 -1
  411. package/src/elements/segmented.tsx +5 -11
  412. package/src/elements/separator.tsx +1 -1
  413. package/src/elements/slots.ts +57 -24
  414. package/src/elements/source.tsx +21 -22
  415. package/src/elements/switch.tsx +3 -3
  416. package/src/elements/tasks.tsx +5 -4
  417. package/src/elements/thread.tsx +36 -4
  418. package/src/elements/toast.tsx +3 -2
  419. package/src/elements/tool.tsx +1 -1
  420. package/src/elements/validate-messages.ts +76 -0
  421. package/src/elements/voice-input.tsx +7 -7
  422. package/src/elements/voice-output.tsx +4 -4
  423. package/src/index.ts +141 -6
  424. package/src/primitives/card-component-types.ts +63 -0
  425. package/src/primitives/card-data-types.ts +312 -0
  426. package/src/primitives/card-recovery.ts +13 -2
  427. package/src/primitives/card-registry.tsx +34 -23
  428. package/src/primitives/card-schemas/artifact.schema.json +92 -0
  429. package/src/primitives/card-schemas/embed.schema.json +0 -2
  430. package/src/primitives/card-schemas/link.schema.json +0 -2
  431. package/src/primitives/card-tags.ts +61 -0
  432. package/src/primitives/card-validate-cards.ts +255 -0
  433. package/src/primitives/card-validate-generator.testlib.ts +38 -0
  434. package/src/primitives/card-validate-schemas.ts +58 -0
  435. package/src/primitives/card-validate.ts +48 -20
  436. package/src/primitives/create-tween.ts +54 -2
  437. package/src/primitives/message-feedback.ts +3 -2
  438. package/src/primitives/use-audio-analysis.ts +20 -1
  439. package/src/primitives/use-sequencer.ts +20 -1
  440. package/src/schemas/from-tool-call.ts +151 -0
  441. package/src/schemas/index.ts +340 -0
  442. package/src/schemas/provider-subsets.ts +538 -0
  443. package/src/schemas/registry.ts +355 -0
  444. package/src/schemas/tool-defs.ts +492 -0
  445. package/src/solid.ts +150 -0
  446. package/src/state/index.ts +27 -1
  447. package/src/state/messages.ts +21 -4
  448. package/src/state/mock.ts +211 -0
  449. package/src/state/parts.ts +295 -0
  450. package/src/state/stream.ts +56 -58
  451. package/src/ui/collapsible.tsx +17 -5
  452. package/src/ui/dropdown.tsx +46 -12
  453. package/src/ui/overlay.tsx +10 -4
  454. package/src/wire/chunk.ts +201 -0
  455. package/src/wire/consume.ts +440 -0
  456. package/src/wire/encode.ts +474 -0
  457. package/src/wire/formats/anthropic.ts +267 -0
  458. package/src/wire/formats/openai.ts +187 -0
  459. package/src/wire/index.ts +52 -0
  460. package/src/wire/read.ts +152 -0
  461. package/src/wire/sink-helpers.ts +50 -0
  462. package/src/wire/sse.ts +140 -0
  463. package/dist/create-tween-hvpmSuwW.js +0 -7
  464. package/dist/elements/chunks/arrow-left-DQocUFvy.js +0 -1
  465. package/dist/elements/chunks/audio-visualizer-BqNy7dfm.js +0 -1
  466. package/dist/elements/chunks/card-BkHbp4BA.js +0 -1
  467. package/dist/elements/chunks/chat-thread-CkRN6pZ7.js +0 -1
  468. package/dist/elements/chunks/check-B9-gn6SS.js +0 -1
  469. package/dist/elements/chunks/chevron-down-BNsxc2hk.js +0 -1
  470. package/dist/elements/chunks/chevron-right-Hv00StBO.js +0 -1
  471. package/dist/elements/chunks/circle-0e3KJTDr.js +0 -1
  472. package/dist/elements/chunks/circle-check-BNAS0JEy.js +0 -1
  473. package/dist/elements/chunks/code-block-BFUHn6Va.js +0 -1
  474. package/dist/elements/chunks/context-Cb7k4F-v.js +0 -1
  475. package/dist/elements/chunks/conversation-list-CvoAkWhN.js +0 -1
  476. package/dist/elements/chunks/create-tween-oVvAIG8r.js +0 -7
  477. package/dist/elements/chunks/define-D1din7Ld.js +0 -1
  478. package/dist/elements/chunks/hover-card-Cmm6Q53m.js +0 -1
  479. package/dist/elements/chunks/message-BqyXDN3-.js +0 -1
  480. package/dist/elements/chunks/message-feedback-Djr3z6Yb.js +0 -1
  481. package/dist/elements/chunks/message-square-vFAgbDaX.js +0 -1
  482. package/dist/elements/chunks/reasoning-DTpCGtnY.js +0 -1
  483. package/dist/elements/chunks/scroll-button-B0cH5fXf.js +0 -1
  484. package/dist/elements/chunks/skeleton-DSXW5Yya.js +0 -1
  485. package/dist/elements/chunks/slots--V19HwUb.js +0 -1
  486. package/dist/elements/chunks/textarea-CUwqAX0G.js +0 -1
  487. package/dist/elements/chunks/tooltip-CgBZCVKp.js +0 -1
  488. package/dist/elements/chunks/use-card-resolution-BSu_XHjH.js +0 -1
  489. package/dist/elements/chunks/x-GRUeeQFT.js +0 -1
  490. package/dist/host-embed.d.ts +0 -33
  491. package/dist/kai-provider.d.ts +0 -2
  492. package/dist/origin.d.ts +0 -5
  493. package/dist/provider-runtime.d.ts +0 -27
  494. package/dist/register-impl-DQyejdfb.js +0 -145
  495. package/dist/validate.d.ts +0 -4
  496. package/dist/version.d.ts +0 -4
  497. package/src/components/component-meta.json +0 -4550
  498. package/src/elements/card-media.jpg +0 -0
  499. package/src/elements/resizable.d.ts +0 -27
  500. package/src/elements/video-poster.jpg +0 -0
@@ -1,22 +1,23 @@
1
- import { registerAll, WebComponentProps } from './runtime';
1
+ import { registerAll, WebComponentProps } from './runtime.js';
2
2
  export { registerAll };
3
- export { useKaiChat } from './use-kai-chat';
4
- export type { UseKaiChatOptions, KaiChatController, ChatMessage } from './use-kai-chat';
5
- export { useVoiceInput } from './use-voice-input';
3
+ export { useKaiChat } from './use-kai-chat.js';
4
+ export type { UseKaiChatOptions, KaiChatController } from './use-kai-chat.js';
5
+ export type { ChatMessage, ChatMessageAction, CustomAction, AvatarData, FeedbackVote, MessagePart, MessageSource, RawOrigin, ToolPart, ToolKind, CardEnvelope, AttachmentData, } from './use-kai-chat.js';
6
+ export { useVoiceInput } from './use-voice-input.js';
6
7
  export interface AgentCardProps extends WebComponentProps {
7
- /** The agent's name the primary label. Attribute: `name`. */
8
+ /** The agent's name, the primary label. Attribute: `name`. */
8
9
  name?: string;
9
10
  /** Selected / focused state: highlighted border + surface. Attribute: `active`. */
10
11
  active?: boolean;
11
- /** Raise a prominent "Needs you" pill plus a glowing amber edge the attention-routing signal that pulls focus to this agent. Attribute: `needs-attention`. */
12
+ /** Raise a prominent "Needs you" pill plus a glowing amber edge. This is the attention-routing signal that pulls focus to this agent. Attribute: `needs-attention`. */
12
13
  needsAttention?: boolean;
13
- /** Run status a JS PROPERTY (object), not an attribute. Shape: `{ tone, label?, pulse? }`, where `tone` is one of `working` | `idle` | `done` | `error` | `blocked` (maps to the kit's tool hues), `label` is an optional short string beside the dot, and `pulse` animates the dot. Set it with `el.status = { tone: 'working', label: 'Working', pulse: true }`. */
14
+ /** Run status. A JS PROPERTY (object), not an attribute. Shape: `{ tone, label?, pulse? }`, where `tone` is one of `working` | `idle` | `done` | `error` | `blocked` (maps to the kit's tool hues), `label` is an optional short string beside the dot, and `pulse` animates the dot. Set it with `el.status = { tone: 'working', label: 'Working', pulse: true }`. */
14
15
  status?: {
15
16
  tone: "working" | "idle" | "done" | "error" | "blocked";
16
17
  label?: string;
17
18
  pulse?: boolean;
18
19
  };
19
- /** The card was activated clicked, or Enter / Space while focused. Promote this agent back to focus. */
20
+ /** The card was activated by a click, or by Enter / Space while focused. Promote this agent back to focus. */
20
21
  onActivate?: (event: CustomEvent) => void;
21
22
  /** The trailing "..." kebab was clicked. The consumer opens its own menu; the card only surfaces the affordance (the click does not also activate the card). */
22
23
  onMenu?: (event: CustomEvent) => void;
@@ -25,22 +26,22 @@ export declare const AgentCard: import('react').ForwardRefExoticComponent<AgentC
25
26
  export interface ArtifactProps extends WebComponentProps {
26
27
  /** URL the preview iframe frames. Consumer-controlled. */
27
28
  src?: string;
28
- /** Files for the Code tab tree + each file's preview `url`. Set as a JS property (array). */
29
- files: {
29
+ /** Files for the Code tab tree + each file's preview `url`. Omit for a preview-only artifact (the Code tab then has nothing to show; pair it with `no-tabs` to hide the toggle). Set as a JS property (array). */
30
+ files?: {
30
31
  path: string;
31
- url?: undefined | string;
32
- code?: undefined | string;
33
- language?: undefined | string;
34
- type?: undefined | "html" | "pdf" | "image" | "other";
35
- additions?: undefined | number;
36
- deletions?: undefined | number;
37
- status?: undefined | "added" | "modified" | "deleted" | "renamed" | "untracked";
32
+ url?: string;
33
+ code?: string;
34
+ language?: string;
35
+ type?: "html" | "pdf" | "image" | "other";
36
+ additions?: number;
37
+ deletions?: number;
38
+ status?: "added" | "modified" | "deleted" | "renamed" | "untracked";
38
39
  }[];
39
40
  /** Controlled active tab: `preview` or `code`. When set, the artifact follows it (re-asserted on change). Leave unset for an uncontrolled tab (see `defaultTab`). */
40
41
  tab?: "preview" | "code";
41
42
  /** Uncontrolled INITIAL tab (used only when `tab` is unset). Default `preview`. Seeds the starting tab; the user can then switch freely without the consumer re-asserting a controlled `tab`. */
42
43
  defaultTab?: "preview" | "code";
43
- /** Selected file path syncs the tree highlight, Code source, and preview. */
44
+ /** Selected file path. Syncs the tree highlight, Code source, and preview. */
44
45
  activeFile?: string;
45
46
  /** iframe `sandbox` override. Secure default `allow-scripts allow-forms` (NOT `allow-same-origin`). */
46
47
  sandbox?: string;
@@ -76,6 +77,10 @@ export interface ArtifactProps extends WebComponentProps {
76
77
  onMaximizeChange?: (event: CustomEvent<{
77
78
  maximized: boolean;
78
79
  }>) => void;
80
+ /** The maximize PROTOCOL intent, raised as a raw bubbling + composed CustomEvent (not through `dispatch`) so an enclosing `<kai-resizable>` can catch it and maximize the containing panel. Declared here so it is typed and reaches the generated API. Listen for it to drive maximize from your own chrome, or re-emit it to trigger one. */
81
+ onMaximizeIntent?: (event: CustomEvent<{
82
+ requested: boolean;
83
+ }>) => void;
79
84
  /** Fired when the preview navigates. `detail.url` = the new location. */
80
85
  onNavigate?: (event: CustomEvent<{
81
86
  url: string;
@@ -87,14 +92,14 @@ export interface ArtifactProps extends WebComponentProps {
87
92
  }
88
93
  export declare const Artifact: import('react').ForwardRefExoticComponent<ArtifactProps & import('react').RefAttributes<HTMLElement>>;
89
94
  export interface AttachmentsProps extends WebComponentProps {
90
- /** The attachments to render. Set as a JS property (array). */
91
- items: {
95
+ /** The attachments to render. Omit (or pass an empty array) for the empty state, which shows `emptyText` if set and nothing otherwise. Set as a JS property (array). */
96
+ items?: {
92
97
  id: string;
93
98
  type: "file" | "source-document";
94
- filename?: undefined | string;
95
- mediaType?: undefined | string;
96
- url?: undefined | string;
97
- title?: undefined | string;
99
+ filename?: string;
100
+ mediaType?: string;
101
+ url?: string;
102
+ title?: string;
98
103
  }[];
99
104
  /** Layout: `grid` = visual tiles, `inline` = icon + label chips, `list` = rows. */
100
105
  variant?: "grid" | "inline" | "list";
@@ -158,7 +163,7 @@ export interface AvatarProps extends WebComponentProps {
158
163
  src?: string;
159
164
  /** Alt text for the image. Defaults to `fallback`. */
160
165
  alt?: string;
161
- /** Short text shown when there's no image usually initials (e.g. "JD", "AI"). */
166
+ /** Short text shown when there's no image, usually initials (e.g. "JD", "AI"). */
162
167
  fallback?: string;
163
168
  /** Size token: `sm` | `md` (default) | `lg`. */
164
169
  size?: "sm" | "md" | "lg";
@@ -170,7 +175,7 @@ export interface BadgeProps extends WebComponentProps {
170
175
  }
171
176
  export declare const Badge: import('react').ForwardRefExoticComponent<BadgeProps & import('react').RefAttributes<HTMLElement>>;
172
177
  export interface ButtonProps extends WebComponentProps {
173
- /** Visual style. `default` (filled), `subtle` (muted text, hover tint the toolbar icon look), `ghost` (transparent, hover fill), `outline`, or `destructive`. Defaults to `default`. */
178
+ /** Visual style. `default` (filled), `subtle` (muted text, hover tint, the toolbar icon look), `ghost` (transparent, hover fill), `outline`, or `destructive`. Defaults to `default`. */
174
179
  variant?: "default" | "subtle" | "ghost" | "outline" | "destructive";
175
180
  /** Size token. `icon` / `icon-sm` are square (for icon-only buttons); `sm` / `md` / `lg` size text buttons. Defaults to `md`. */
176
181
  size?: "sm" | "md" | "lg" | "icon" | "icon-sm";
@@ -182,7 +187,7 @@ export interface ButtonProps extends WebComponentProps {
182
187
  label?: string;
183
188
  /** Disable the button (non-interactive, dimmed). */
184
189
  disabled?: boolean;
185
- /** Stretch the button to the full width of its container (a block button) e.g. a card CTA or a stacked action. Attribute: `full`. */
190
+ /** Stretch the button to the full width of its container (a block button), e.g. a card CTA or a stacked action. Attribute: `full`. */
186
191
  full?: boolean;
187
192
  /** Justify the button's content: `start`, `center` (default), or `end`. Combine with `full` for a full-width, left-aligned button. */
188
193
  align?: "start" | "center" | "end";
@@ -195,7 +200,7 @@ export declare const Button: import('react').ForwardRefExoticComponent<ButtonPro
195
200
  export interface CardProps extends WebComponentProps {
196
201
  /** Surface treatment: `outlined` (default) | `filled` | `plain` | `accent`. Attribute: `appearance`. */
197
202
  appearance?: "outlined" | "filled" | "plain" | "accent";
198
- /** `vertical` (default, media on top) | `horizontal` (media at the start) | `responsive` (horizontal when the card's container is wide enough, else vertical a container query on the card's own width). Attribute: `orientation`. */
203
+ /** `vertical` (default, media on top) | `horizontal` (media at the start) | `responsive` (horizontal when the card's container is wide enough, else vertical, via a container query on the card's own width). Attribute: `orientation`. */
199
204
  orientation?: "vertical" | "horizontal" | "responsive";
200
205
  /** The card width below which a `responsive` card collapses to vertical and the footer actions stack. A CSS length; default `28rem`. Attribute: `collapse`. */
201
206
  collapse?: string;
@@ -244,6 +249,8 @@ export interface CardsProps extends WebComponentProps {
244
249
  }[];
245
250
  /** Optional type→tag overrides/additions (merged over the built-ins). Property: `el.types`. Typed as a plain string map (not the `CardTagMap` alias) so the generated React wrapper inlines it instead of emitting an unresolved named type. */
246
251
  types?: Record<string, string>;
252
+ /** JSON Schemas for the card types this app renders, keyed by envelope type. The companion of `types`, which says what DRAWS a card while this says what a VALID one looks like. An OBJECT, so it is a JS property only: `el.schemas = { 'pricing-table': pricingSchema }`, never an attribute. `createCardRegistry(...).validationSchemas` is exactly this shape. Without it the kit validates its own seven built-ins and leaves your own card type, the one your app actually cares about, as the only unchecked thing on screen. A schema here WINS over a built-in of the same name, matching `mergeCardTags`, where your entry is spread over ours. Typed `Record<string, object>` rather than `Record<string, JsonSchema>` deliberately: an imported `.json` schema widens `"type"` to `string`, and an authored one carries `$schema`/`title`/`description`/`additionalProperties`, so the tighter type would reject both of the normal ways to supply one. See `CardSchemaMap` in components/card-renderer.tsx. */
253
+ schemas?: Record<string, object>;
247
254
  /** Optional CardPolicy handling child events. Property: `el.policy`. */
248
255
  policy?: {
249
256
  onSubmit?: (cardId: string, data: unknown) => void;
@@ -259,7 +266,9 @@ export interface CardsProps extends WebComponentProps {
259
266
  onError?: (cardId: string, message: string) => void;
260
267
  maxSendPromptMode?: "compose" | "send";
261
268
  };
262
- /** A child card transitioned to a resolved/deferred state (an action was chosen, a form/tasks submission landed, or it was dismissed) re-emitted off the host as a non-bubbling convenience event so a consumer can observe resolution centrally without diffing the cards array. `detail` = `{ cardId, resolution }`. (A `reopen` un-resolves a card and has no `CardResolution`, so it does NOT fire this observe reopen via the underlying bubbling `kai-card` event.) */
269
+ /** Validate each envelope's `data` against the schema for its type before rendering it, using a built-in's own schema or yours from `schemas`. Default `true`; set `validate-cards="false"` (or `el.validateCards = false`) to opt out. A hard failure (wrong type, a missing required field) renders a diagnostic naming the field instead of the card; a soft failure (bounds) renders the card unchanged. Both emit a contract `error` event. On in production too: a model emitting a bad shape is a production failure mode, so stripping the check there would hide it from exactly the person who needs to see it. */
270
+ validateCards?: boolean;
271
+ /** A child card transitioned to a resolved/deferred state (an action was chosen, a form/tasks submission landed, or it was dismissed). Re-emitted off the host as a non-bubbling convenience event so a consumer can observe resolution centrally without diffing the cards array. `detail` = `{ cardId, resolution }`. (A `reopen` un-resolves a card and has no `CardResolution`, so it does NOT fire this; observe reopen via the underlying bubbling `kai-card` event.) */
263
272
  onCardResolved?: (event: CustomEvent<{
264
273
  cardId: string;
265
274
  resolution: {
@@ -283,63 +292,27 @@ export interface CardsProps extends WebComponentProps {
283
292
  }
284
293
  export declare const Cards: import('react').ForwardRefExoticComponent<CardsProps & import('react').RefAttributes<HTMLElement>>;
285
294
  export interface ChainOfThoughtProps extends WebComponentProps {
286
- /** The reasoning steps. Set as a JS property. Compound sub-parts collapse to this one data model (Route 1). Each `{ label, content?, id? }`. */
287
- steps: {
295
+ /** The reasoning steps. Set as a JS property. Compound sub-parts collapse to this one data model (Route 1). Each `{ label, content?, id? }`. Omit to supply the steps as `<kai-step>` light-DOM children instead; when both are present the property's steps come first. */
296
+ steps?: {
288
297
  label: string;
289
- content?: undefined | string;
290
- id?: undefined | string;
298
+ content?: string;
299
+ id?: string;
291
300
  }[];
292
- /** Open mode: `'multiple'` (default any number of steps open at once) or `'single'` (at most one open; opening a step closes the others). */
301
+ /** Open mode: `'multiple'` (default, any number of steps open at once) or `'single'` (at most one open; opening a step closes the others). */
293
302
  type?: "single" | "multiple";
294
303
  /** Controlled open step key(s). When set, it WINS over user interaction (the consumer owns the open set). String in `single` mode, string[] in `multiple` mode. Set as a JS property. */
295
304
  value?: string | string[];
296
- /** Uncontrolled INITIAL open step key(s) seeds which steps render expanded. Ignored once `value` is provided. Set as a JS property. */
305
+ /** Uncontrolled INITIAL open step key(s), seeding which steps render expanded. Ignored once `value` is provided. Set as a JS property. */
297
306
  defaultValue?: string | string[];
298
- /** The open set changed by user click OR an expand()/collapse()/toggle() call. `value` is a string in `single` mode, a string[] in `multiple` mode. (Maps Radix Accordion's onValueChange.) */
307
+ /** The open set changed, by user click OR an expand()/collapse()/toggle() call. `value` is a string in `single` mode, a string[] in `multiple` mode. (Maps Radix Accordion's onValueChange.) */
299
308
  onValueChange?: (event: CustomEvent<{
300
309
  value: string | string[];
301
310
  }>) => void;
302
311
  }
303
312
  export declare const ChainOfThought: import('react').ForwardRefExoticComponent<ChainOfThoughtProps & import('react').RefAttributes<HTMLElement>>;
304
313
  export interface ChatProps extends WebComponentProps {
305
- /** The full message thread to render, newest last. Each entry carries its role, content, and optional reasoning/tools/attachments/actions. Set as a JS property (`el.messages = [...]`). */
306
- messages: {
307
- id: string;
308
- role: "user" | "assistant";
309
- content: string;
310
- reasoning?: undefined | {
311
- text: string;
312
- label?: undefined | string;
313
- };
314
- tools?: undefined | {
315
- type: string;
316
- state: "input-streaming" | "input-available" | "output-available" | "output-error";
317
- input?: undefined | Record<string, unknown>;
318
- output?: undefined | Record<string, unknown>;
319
- toolCallId?: undefined | string;
320
- errorText?: undefined | string;
321
- }[];
322
- attachments?: undefined | {
323
- id: string;
324
- type: "file" | "source-document";
325
- filename?: undefined | string;
326
- mediaType?: undefined | string;
327
- url?: undefined | string;
328
- title?: undefined | string;
329
- }[];
330
- actions?: undefined | ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
331
- id: string;
332
- label: string;
333
- icon?: undefined | string;
334
- tooltip?: undefined | string;
335
- })[];
336
- avatar?: undefined | {
337
- src?: undefined | string;
338
- fallback?: undefined | string;
339
- alt?: undefined | string;
340
- };
341
- feedback?: undefined | "like" | "dislike";
342
- }[];
314
+ /** Show a Search (Globe) button in the input toolbar; fires a `search` event. */
315
+ search?: boolean;
343
316
  /** Value of the input. A **string** is controlled (the host owns the text and updates it on `kai-value-change`). A **ComposerDoc** is a one-time seed that pre-populates pills; the user then edits freely. Leave unset for uncontrolled. */
344
317
  value?: string | ({
345
318
  type: "text";
@@ -366,7 +339,7 @@ export interface ChatProps extends WebComponentProps {
366
339
  /** Keep suggestions visible after the conversation starts. By default suggestions are conversation starters and hide once `messages` is non-empty; set this to keep them always shown. Default false. */
367
340
  persistSuggestions?: boolean;
368
341
  /** Body/prose font scale for rendered markdown (`'xs' | 'sm' | 'base' | 'lg'`). Defaults to `'sm'`. */
369
- proseSize?: "sm" | "lg" | "xs" | "base";
342
+ proseSize?: "xs" | "sm" | "base" | "lg";
370
343
  /** Shiki theme name for syntax-highlighted code blocks (e.g. `'github-dark-dimmed'`). */
371
344
  codeTheme?: string;
372
345
  /** Enable Shiki syntax highlighting in code blocks. Turn off to render plain `<pre>` blocks (lighter, no highlighter load). Default true. */
@@ -393,27 +366,25 @@ export interface ChatProps extends WebComponentProps {
393
366
  };
394
367
  /** Show the scroll-to-bottom button inside the scroll area. Default true. */
395
368
  scrollButton?: boolean;
396
- /** Whether the host has `slot="header-start"` content (left of the title) set by the `<kai-chat>` facade so a custom control forces the header open. */
369
+ /** Whether the host has `slot="header-start"` content (left of the title). Set by the `<kai-chat>` facade so a custom control forces the header open. */
397
370
  headerStart?: boolean;
398
371
  /** Whether the host has `slot="header-end"` content (right of the controls). */
399
372
  headerEnd?: boolean;
400
- /** REPLACE full custom header in place of the built-in title/model/context bar. */
373
+ /** REPLACE: full custom header in place of the built-in title/model/context bar. */
401
374
  headerFull?: boolean;
402
- /** INJECT left sidebar column (e.g. a conversation list / your own nav). */
375
+ /** INJECT: left sidebar column (e.g. a conversation list / your own nav). */
403
376
  sidebar?: boolean;
404
- /** REPLACE custom zero-state rendered in the message area while the thread is empty (replaces the empty message list only; the composer and its suggestions still render). */
377
+ /** REPLACE: custom zero-state rendered in the message area while the thread is empty (replaces the empty message list only; the composer and its suggestions still render). */
405
378
  empty?: boolean;
406
- /** REPLACE full custom composer in place of the built-in prompt input. The projected content wires its own submit (the data-flow boundary). */
379
+ /** REPLACE: full custom composer in place of the built-in prompt input. The projected content wires its own submit (the data-flow boundary). */
407
380
  composer?: boolean;
408
- /** INJECT accessory row just above the composer (e.g. extra actions). */
381
+ /** INJECT: accessory row just above the composer (e.g. extra actions). */
409
382
  composerActions?: boolean;
410
- /** INJECT footer row below the composer (disclaimers, token meter, …). */
383
+ /** INJECT: footer row below the composer (disclaimers, token meter, …). */
411
384
  footer?: boolean;
412
- /** Show a Search (Globe) button in the input toolbar; fires a `search` event. */
413
- search?: boolean;
414
385
  /** Show a Voice (Mic) button in the input toolbar; fires a `voice` event. */
415
386
  voice?: boolean;
416
- /** Rich entity triggers each `{ char, kind, items }` opens a caret-anchored menu that inserts an atomic pill (`/` skills, `@` agents/plugins). Set as a JS property; forwarded to the input. */
387
+ /** Rich entity triggers. Each `{ char, kind, items }` opens a caret-anchored menu that inserts an atomic pill (`/` skills, `@` agents/plugins). Set as a JS property; forwarded to the input. */
417
388
  triggers?: {
418
389
  char: string;
419
390
  kind: string;
@@ -432,6 +403,122 @@ export interface ChatProps extends WebComponentProps {
432
403
  kindIcons?: Record<string, string>;
433
404
  /** Whether each message's action bar is always visible (`'always'`, default) or only revealed on hover of that message row (`'hover'`). */
434
405
  actionsReveal?: "always" | "hover";
406
+ /** The full message thread to render, newest last. Each entry carries its role, ordered `parts`, and optional actions/avatar/feedback. Set as a JS property (`el.messages = [...]`); a NEW array reference per streaming chunk re-renders (mutating in place does not). Omit for an empty thread. Re-declared here (rather than inherited from `ChatThreadProps`) because the ELEMENT registers a `[]` default and renders the empty state without it, while the SolidJS `<ChatThread>` component still requires it. The facade hands it a validated array either way. Matches `<kai-thread>`. */
407
+ messages?: {
408
+ id: string;
409
+ role: "user" | "assistant";
410
+ parts: ({
411
+ type: "text";
412
+ text: string;
413
+ raw?: {
414
+ source: string;
415
+ payload: unknown;
416
+ };
417
+ } | {
418
+ type: "reasoning";
419
+ text: string;
420
+ label?: string;
421
+ index?: number;
422
+ streamId?: string;
423
+ signature?: string;
424
+ raw?: {
425
+ source: string;
426
+ payload: unknown;
427
+ };
428
+ } | {
429
+ type: "tool";
430
+ tool: {
431
+ type: string;
432
+ kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic";
433
+ state: "input-streaming" | "input-available" | "output-available" | "output-error";
434
+ input?: Record<string, unknown>;
435
+ rawInput?: string;
436
+ output?: Record<string, unknown>;
437
+ toolCallId?: string;
438
+ errorText?: string;
439
+ raw?: {
440
+ source: string;
441
+ payload: unknown;
442
+ };
443
+ };
444
+ raw?: {
445
+ source: string;
446
+ payload: unknown;
447
+ };
448
+ } | {
449
+ type: "card";
450
+ envelope: {
451
+ type: string;
452
+ id: string;
453
+ data: unknown;
454
+ title?: string;
455
+ resolution?: {
456
+ kind: "action";
457
+ action: string;
458
+ payload?: unknown;
459
+ at?: string;
460
+ } | {
461
+ kind: "submit";
462
+ data: unknown;
463
+ at?: string;
464
+ } | {
465
+ kind: "dismissed";
466
+ at?: string;
467
+ } | {
468
+ kind: "expired";
469
+ reason?: string;
470
+ at?: string;
471
+ };
472
+ };
473
+ raw?: {
474
+ source: string;
475
+ payload: unknown;
476
+ };
477
+ } | {
478
+ type: "source";
479
+ source: {
480
+ id?: string;
481
+ url?: string;
482
+ title?: string;
483
+ snippet?: string;
484
+ index?: number;
485
+ };
486
+ raw?: {
487
+ source: string;
488
+ payload: unknown;
489
+ };
490
+ } | {
491
+ type: "file";
492
+ attachment: {
493
+ id: string;
494
+ type: "file" | "source-document";
495
+ filename?: string;
496
+ mediaType?: string;
497
+ url?: string;
498
+ title?: string;
499
+ };
500
+ raw?: {
501
+ source: string;
502
+ payload: unknown;
503
+ };
504
+ })[];
505
+ actions?: ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
506
+ id: string;
507
+ label: string;
508
+ icon?: string;
509
+ tooltip?: string;
510
+ })[];
511
+ avatar?: {
512
+ src?: string;
513
+ fallback?: string;
514
+ alt?: string;
515
+ };
516
+ feedback?: "like" | "dislike";
517
+ }[];
518
+ /** Optional card type -> custom-element tag overrides/additions for `card` parts (merged over the built-ins). Property: `el.cardTypes`. Typed as a plain string map (not the `CardTagMap` alias) so the generated React wrapper inlines it instead of emitting an unresolved named type. */
519
+ cardTypes?: Record<string, string>;
520
+ /** JSON Schemas for the card types this app renders, keyed by envelope type. The companion of `cardTypes`, which says what DRAWS a card while this says what a VALID one looks like. An OBJECT, so it is a JS property only: `el.cardSchemas = { 'pricing-table': pricingSchema }`, never an attribute. `createCardRegistry(...).validationSchemas` is exactly this shape. Without it the kit validates its own seven built-ins and leaves your own card type, the one your app actually cares about, as the only unchecked thing on screen. A schema here WINS over a built-in of the same name. Typed `Record<string, object>` rather than `Record<string, JsonSchema>` deliberately: an imported `.json` schema widens `"type"` to `string`, and an authored one carries `$schema`/`title`/`description`/`additionalProperties`, so the tighter type would reject both of the normal ways to supply one. */
521
+ cardSchemas?: Record<string, object>;
435
522
  /** The staged attachments changed (file added or removed). Carries the full current list so a consumer can react in real time. */
436
523
  onAttachmentsChange?: (event: CustomEvent<{
437
524
  attachments: {
@@ -485,7 +572,7 @@ export interface CheckpointProps extends WebComponentProps {
485
572
  /** Tooltip on hover. */
486
573
  tooltip?: string;
487
574
  /** Visual button style. */
488
- variant?: "default" | "ghost" | "outline";
575
+ variant?: "ghost" | "default" | "outline";
489
576
  /** Button size (use an `icon*` size for an icon-only checkpoint). */
490
577
  size?: "sm" | "md" | "lg" | "icon" | "icon-sm";
491
578
  /** The checkpoint was clicked. */
@@ -494,14 +581,36 @@ export interface CheckpointProps extends WebComponentProps {
494
581
  export declare const Checkpoint: import('react').ForwardRefExoticComponent<CheckpointProps & import('react').RefAttributes<HTMLElement>>;
495
582
  export interface ChoiceProps extends WebComponentProps {
496
583
  /** The choice definition (the CardEnvelope.data). Set as a JS PROPERTY: `el.data = { prompt, options:[…], allowOther?, submitLabel? }`. Import `ChoiceCardData` from `@kitn.ai/ui` for the full shape. */
497
- data?: Record<string, unknown>;
584
+ data?: {
585
+ prompt?: string;
586
+ options: {
587
+ id: string;
588
+ label: string;
589
+ description?: string;
590
+ media?: {
591
+ image?: string;
592
+ imageAlt?: string;
593
+ icon?: string;
594
+ };
595
+ meta?: string;
596
+ recommended?: boolean;
597
+ disabled?: boolean;
598
+ payload?: unknown;
599
+ }[];
600
+ allowOther?: boolean | {
601
+ label?: string;
602
+ placeholder?: string;
603
+ };
604
+ submitLabel?: string;
605
+ dismissible?: boolean;
606
+ };
498
607
  /** Stable card id correlating every emitted CardEvent. Attribute: `card-id`. */
499
608
  cardId?: string;
500
609
  /** Heading rendered in the card chrome (= CardEnvelope.title). Attribute: `heading`. */
501
610
  heading?: string;
502
611
  /** Set when the user resolved this card; renders the read-only view. Property: `el.resolution = { kind:'action', action:'…' }`. */
503
612
  resolution?: Record<string, unknown>;
504
- /** Controlled selection the selected option id. When set, the consumer owns the current pick (RadioGroup `value`). Attribute: `value`. */
613
+ /** Controlled selection: the selected option id. When set, the consumer owns the current pick (RadioGroup `value`). Attribute: `value`. */
505
614
  value?: string;
506
615
  /** Option id to pre-select on mount (uncontrolled seed). Attribute: `default-value`. */
507
616
  defaultValue?: string;
@@ -524,8 +633,8 @@ export interface CoachmarkProps extends WebComponentProps {
524
633
  badge?: string;
525
634
  /** Floating placement relative to the anchor (default `bottom`). */
526
635
  placement?: string;
527
- /** Color tone: `primary` (default, theme accent), `info` (blue), `success` (green), `warning` (amber), or `error` (red) reusing the kit's tool hues. */
528
- tone?: "error" | "primary" | "info" | "success" | "warning";
636
+ /** Color tone: `primary` (default, theme accent), `info` (blue), `success` (green), `warning` (amber), or `error` (red), reusing the kit's tool hues. */
637
+ tone?: "primary" | "info" | "success" | "warning" | "error";
529
638
  /** Render the arrow that points at the anchor (default `true`). Set `arrow="false"` for a plain bubble with no pointer. */
530
639
  arrow?: boolean;
531
640
  /** The × dismiss button was pressed. The consumer records that this hint was seen so it won't show again. */
@@ -546,11 +655,11 @@ export interface CodeBlockProps extends WebComponentProps {
546
655
  /** Disable syntax highlighting (renders plain text, no Shiki). */
547
656
  codeHighlight?: boolean;
548
657
  /** Code text sizing. */
549
- proseSize?: "sm" | "lg" | "xs" | "base";
658
+ proseSize?: "xs" | "sm" | "base" | "lg";
550
659
  }
551
660
  export declare const CodeBlock: import('react').ForwardRefExoticComponent<CodeBlockProps & import('react').RefAttributes<HTMLElement>>;
552
661
  export interface CommandProps extends WebComponentProps {
553
- /** Flat list of items. Set as a JS property not an HTML attribute. */
662
+ /** Flat list of items. Set as a JS property, not an HTML attribute. */
554
663
  items?: {
555
664
  id: string;
556
665
  label: string;
@@ -563,9 +672,9 @@ export interface CommandProps extends WebComponentProps {
563
672
  placeholder?: string;
564
673
  /** Label shown when no items match the current query. */
565
674
  emptyLabel?: string;
566
- /** Fired when the highlighted/active item changes via Arrow keys or when filtering re-clamps the active row. `id` is the newly active item's id, or `undefined` when no item is active (e.g. the filtered list is empty). Lets a host preview the active item without committing a selection. */
675
+ /** Fired when the highlighted/active item changes, via Arrow keys or when filtering re-clamps the active row. `id` is the newly active item's id, or `undefined` when no item is active (e.g. the filtered list is empty). Lets a host preview the active item without committing a selection. */
567
676
  onActiveChange?: (event: CustomEvent<{
568
- id: undefined | string;
677
+ id: string | undefined;
569
678
  }>) => void;
570
679
  /** Fired on every keystroke in the search input. */
571
680
  onQueryChange?: (event: CustomEvent<{
@@ -584,10 +693,10 @@ export interface CompareProps extends WebComponentProps {
584
693
  compareId?: string;
585
694
  /** Re-hydrate / control the user's pick. Set as a JS PROPERTY: `el.selection = { chosenId, rejectedIds }`. Renders the collapsed winner. */
586
695
  selection?: Record<string, unknown>;
587
- /** Layout: `'auto'` (default columns when wide, tabs when narrow, by CONTAINER width) | `'columns'` (side-by-side) | `'tabs'` (pills to switch). Attribute: `layout`. */
696
+ /** Layout: `'auto'` (default, columns when wide, tabs when narrow, by CONTAINER width) | `'columns'` (side-by-side) | `'tabs'` (pills to switch). Attribute: `layout`. */
588
697
  layout?: "auto" | "columns" | "tabs";
589
698
  /** Prose/text size for the rendered candidates. Attribute: `prose-size`. */
590
- proseSize?: "sm" | "lg" | "xs" | "base";
699
+ proseSize?: "xs" | "sm" | "base" | "lg";
591
700
  /** Shiki theme for code blocks in the candidates. Attribute: `code-theme`. */
592
701
  codeTheme?: string;
593
702
  /** Whether code blocks are syntax-highlighted. Attribute: `code-highlight`. */
@@ -610,7 +719,7 @@ export interface CompareProps extends WebComponentProps {
610
719
  }
611
720
  export declare const Compare: import('react').ForwardRefExoticComponent<CompareProps & import('react').RefAttributes<HTMLElement>>;
612
721
  export interface ComposerProps extends WebComponentProps {
613
- /** Controlled value string or a full ComposerDoc (set as JS property). */
722
+ /** Controlled value: a string or a full ComposerDoc (set as JS property). */
614
723
  value?: string | ({
615
724
  type: "text";
616
725
  text: string;
@@ -632,10 +741,10 @@ export interface ComposerProps extends WebComponentProps {
632
741
  /** Show a loading/streaming state and block submit. */
633
742
  loading?: boolean;
634
743
  /** Maximum height in px before the content scrolls. Default 240. */
635
- maxHeight?: string | number;
744
+ maxHeight?: number | string;
636
745
  /** Whether pressing Enter (without Shift) submits. Default true. */
637
746
  submitOnEnter?: boolean;
638
- /** Trigger definitions set as a JS property. */
747
+ /** Trigger definitions. Set as a JS property. */
639
748
  triggers?: {
640
749
  char: string;
641
750
  kind: string;
@@ -650,7 +759,7 @@ export interface ComposerProps extends WebComponentProps {
650
759
  data?: Record<string, unknown>;
651
760
  }[];
652
761
  }[];
653
- /** Keyword highlight rules set as a JS property. */
762
+ /** Keyword highlight rules. Set as a JS property. */
654
763
  highlights?: (string | {
655
764
  pattern: string;
656
765
  flags?: string;
@@ -684,7 +793,7 @@ export interface ComposerProps extends WebComponentProps {
684
793
  data?: undefined | Record<string, unknown>;
685
794
  };
686
795
  }>) => void;
687
- /** The composer gained focus. `focus`/`blur` are NOT composed natively, so they don't escape the shadow root these re-expose them on the host. (For `keydown`/`paste`/`focusin`/`focusout`, listen NATIVELY on `<kai-composer>`: they're composed and already cross the shadow boundary.) */
796
+ /** The composer gained focus. `focus`/`blur` are NOT composed natively, so they don't escape the shadow root; these re-expose them on the host. (For `keydown`/`paste`/`focusin`/`focusout`, listen NATIVELY on `<kai-composer>`: they're composed and already cross the shadow boundary.) */
688
797
  onFocus?: (event: CustomEvent<{
689
798
  originalEvent: FocusEvent;
690
799
  }>) => void;
@@ -752,12 +861,24 @@ export interface ComposerProps extends WebComponentProps {
752
861
  export declare const Composer: import('react').ForwardRefExoticComponent<ComposerProps & import('react').RefAttributes<HTMLElement>>;
753
862
  export interface ConfirmProps extends WebComponentProps {
754
863
  /** The confirm definition (the CardEnvelope.data). Set as a JS PROPERTY: `el.data = { body, tone, actions:[…] }`. Import `ConfirmCardData` from `@kitn.ai/ui` for the full shape. */
755
- data?: Record<string, unknown>;
864
+ data?: {
865
+ heading?: string;
866
+ body?: string;
867
+ tone?: "default" | "warning" | "danger";
868
+ actions: {
869
+ id: string;
870
+ label: string;
871
+ style?: "primary" | "default" | "destructive";
872
+ payload?: unknown;
873
+ default?: boolean;
874
+ }[];
875
+ dismissible?: boolean;
876
+ };
756
877
  /** Stable card id correlating every emitted CardEvent. Attribute: `card-id`. */
757
878
  cardId?: string;
758
879
  /** Heading rendered in the card chrome (= CardEnvelope.title). Attribute: `heading`. */
759
880
  heading?: string;
760
- /** Focus the default action on mount (off by default no focus-stealing). Attribute: `autofocus`. */
881
+ /** Focus the default action on mount (off by default, so nothing steals focus). Attribute: `autofocus`. */
761
882
  autofocus?: boolean;
762
883
  /** Set when the user resolved this card; renders the read-only view. Property: `el.resolution = { kind:'action', action:'…' }`. */
763
884
  resolution?: Record<string, unknown>;
@@ -785,28 +906,28 @@ export interface ContextProps extends WebComponentProps {
785
906
  }
786
907
  export declare const Context: import('react').ForwardRefExoticComponent<ContextProps & import('react').RefAttributes<HTMLElement>>;
787
908
  export interface ConversationsProps extends WebComponentProps {
788
- /** Pre-bucketed conversation groups (e.g. "Today", "Yesterday"), each with its own conversations. Use this when you want to control the grouping/headers yourself; otherwise pass a flat `conversations` array. Set as a JS property. */
789
- groups: {
909
+ /** The list's section headers (`{ id, name, sortOrder, createdAt }`), rendered in array order. A group carries no conversations of its own; it is matched against `conversations` by id, so the two props are complementary rather than alternatives. Omit for an ungrouped list. Set as a JS property. */
910
+ groups?: {
790
911
  id: string;
791
- userId?: undefined | string;
792
- teamId?: undefined | string;
912
+ userId?: string;
913
+ teamId?: string;
793
914
  name: string;
794
915
  sortOrder: number;
795
916
  createdAt: string;
796
917
  }[];
797
- /** A flat list of conversation summaries; the component buckets them by recency for you. Ignored when `groups` is provided. Set as a JS property. */
798
- conversations: {
918
+ /** Every conversation the list renders, flat. Each one is filed under the group whose `id` equals its `groupId`; one with no `groupId`, or with a `groupId` matching no entry in `groups`, falls into a trailing "Ungrouped" section, so nothing you pass in is ever dropped. There is no recency bucketing. Set as a JS property. Omit to supply them as `<kai-conversation>` light-DOM children instead, or for the empty state. */
919
+ conversations?: {
799
920
  id: string;
800
921
  title: string;
801
- groupId?: undefined | string;
922
+ groupId?: string;
802
923
  scope: {
803
924
  type: "document" | "collection";
804
- documentId?: undefined | string;
805
- filters?: undefined | {
806
- tags?: undefined | string[];
807
- authors?: undefined | string[];
808
- contentType?: undefined | "transcript" | "markdown";
809
- dateRange?: undefined | {
925
+ documentId?: string;
926
+ filters?: {
927
+ tags?: string[];
928
+ authors?: string[];
929
+ contentType?: "transcript" | "markdown";
930
+ dateRange?: {
810
931
  from: string;
811
932
  to: string;
812
933
  };
@@ -815,7 +936,7 @@ export interface ConversationsProps extends WebComponentProps {
815
936
  messageCount: number;
816
937
  lastMessageAt: string;
817
938
  updatedAt: string;
818
- trailing?: undefined | string;
939
+ trailing?: string;
819
940
  }[];
820
941
  /** The id of the currently-open conversation, highlighted in the list. */
821
942
  activeId?: string;
@@ -853,7 +974,7 @@ export interface DialogProps extends WebComponentProps {
853
974
  }
854
975
  export declare const Dialog: import('react').ForwardRefExoticComponent<DialogProps & import('react').RefAttributes<HTMLElement>>;
855
976
  export interface EditableLabelProps extends WebComponentProps {
856
- /** The label text settable and reflected to the `value` attribute. Read `el.value` for live state. */
977
+ /** The label text. Settable and reflected to the `value` attribute. Read `el.value` for live state. */
857
978
  value?: string;
858
979
  /** Controlled edit state. `el.editing = true` opens the field; reflected to the `editing` attribute. */
859
980
  editing?: boolean;
@@ -892,7 +1013,7 @@ export interface EmptyProps extends WebComponentProps {
892
1013
  }
893
1014
  export declare const Empty: import('react').ForwardRefExoticComponent<EmptyProps & import('react').RefAttributes<HTMLElement>>;
894
1015
  export interface FeedbackBarProps extends WebComponentProps {
895
- /** The banner label (e.g. "Was this helpful?"). Attribute: `bar-title` (`title` is avoided it's a global HTML attribute). */
1016
+ /** The banner label (e.g. "Was this helpful?"). Attribute: `bar-title` (`title` is avoided because it is a global HTML attribute). */
896
1017
  barTitle?: string;
897
1018
  /** When set, a not-helpful vote opens an optional detail form before the thank-you confirmation. Attribute: `collect-detail`. */
898
1019
  collectDetail?: boolean;
@@ -932,7 +1053,7 @@ export interface FileTreeProps extends WebComponentProps {
932
1053
  deletions?: undefined | number;
933
1054
  status?: undefined | "added" | "modified" | "deleted" | "renamed" | "untracked";
934
1055
  }[];
935
- /** Selected file path highlighted in the tree. */
1056
+ /** Selected file path, highlighted in the tree. */
936
1057
  activeFile?: string;
937
1058
  /** Folder paths expanded initially. Omit to start with all folders open. */
938
1059
  defaultExpanded?: string[];
@@ -949,7 +1070,7 @@ export interface FileUploadProps extends WebComponentProps {
949
1070
  multiple?: boolean;
950
1071
  /** `accept` attribute for the file picker (e.g. `image/*`). */
951
1072
  accept?: string;
952
- /** Disable the dropzone no clicking, no drag-and-drop. */
1073
+ /** Disable the dropzone: no clicking, no drag-and-drop. */
953
1074
  disabled?: boolean;
954
1075
  /** Default dropzone label (overridable via the default slot). */
955
1076
  label?: string;
@@ -960,8 +1081,46 @@ export interface FileUploadProps extends WebComponentProps {
960
1081
  }
961
1082
  export declare const FileUpload: import('react').ForwardRefExoticComponent<FileUploadProps & import('react').RefAttributes<HTMLElement>>;
962
1083
  export interface FormProps extends WebComponentProps {
963
- /** The form definition a JSON Schema (`type:'object'`) + `x-kai-*` UI hints (the CardEnvelope.data). Set as a JS PROPERTY: `el.data = { type:'object', properties:{…} }`. Import the `FormDefinition` type from `@kitn.ai/ui` for the full shape (it is self-referential, so the element types it loosely). */
964
- data?: Record<string, unknown>;
1084
+ /** The form definition: a JSON Schema (`type:'object'`) + `x-kai-*` UI hints (the CardEnvelope.data). Set as a JS PROPERTY: `el.data = { type:'object', properties:{…} }`. Import the `FormDefinition` type from `@kitn.ai/ui` for the full shape. It IS self-referential (`FormField.properties` is another `FormField` map), and the generated `element-types.d.ts` inlines every named type, so the shipped declaration bottoms out in a `Record<string, unknown>` placeholder one level down rather than carrying the recursion. That is why `FormDefinition` is a `type` alias: an interface gets no implicit index signature, so it would not be assignable to that placeholder. */
1085
+ data?: {
1086
+ type: "object";
1087
+ title?: string;
1088
+ description?: string;
1089
+ required?: string[];
1090
+ properties: Record<string, {
1091
+ type: "string" | "number" | "integer" | "boolean" | "array" | "object";
1092
+ title?: string;
1093
+ description?: string;
1094
+ default?: unknown;
1095
+ enum?: unknown[];
1096
+ format?: "email" | "uri" | "url" | "date" | "date-time" | "time";
1097
+ minimum?: number;
1098
+ maximum?: number;
1099
+ minLength?: number;
1100
+ maxLength?: number;
1101
+ pattern?: string;
1102
+ minItems?: number;
1103
+ maxItems?: number;
1104
+ items?: Record<string, unknown> | {
1105
+ enum: unknown[];
1106
+ };
1107
+ properties?: Record<string, Record<string, unknown>>;
1108
+ required?: string[];
1109
+ readOnly?: boolean;
1110
+ "x-kai-widget"?: "textarea" | "slider" | "rating" | "radio" | "select" | "checkbox" | "password" | "switch";
1111
+ "x-kai-placeholder"?: string;
1112
+ "x-kai-step"?: number;
1113
+ }>;
1114
+ "x-kai-order"?: string[];
1115
+ "x-kai-inlineMax"?: number;
1116
+ "x-kai-submitLabel"?: string;
1117
+ "x-kai-dismissible"?: boolean;
1118
+ "x-kai-actions"?: {
1119
+ id: string;
1120
+ label: string;
1121
+ variant?: "default" | "ghost" | "outline";
1122
+ }[];
1123
+ };
965
1124
  /** Stable card id correlating every emitted CardEvent. Attribute: `card-id`. */
966
1125
  cardId?: string;
967
1126
  /** Heading rendered in the card chrome (= CardEnvelope.title). Attribute: `heading`. */
@@ -974,7 +1133,7 @@ export interface FormProps extends WebComponentProps {
974
1133
  defaultValues?: Record<string, unknown>;
975
1134
  /** Disable all fields + submit. Attribute: `disabled`. */
976
1135
  disabled?: boolean;
977
- /** The form's values changed on input current coerced values + validity. */
1136
+ /** The form's values changed on input. Carries the current coerced values + validity. */
978
1137
  onValuesChange?: (event: CustomEvent<{
979
1138
  values: Record<string, unknown>;
980
1139
  valid: boolean;
@@ -1021,7 +1180,7 @@ export declare const Image: import('react').ForwardRefExoticComponent<ImageProps
1021
1180
  export interface InputProps extends WebComponentProps {
1022
1181
  /** Native input type: `text` (default) · `email` · `url` · `search` · `tel` · `password` · `number`. Single-line only. */
1023
1182
  type?: string;
1024
- /** Controlled value settable and reflected to the `value` attribute. `el.value = 'hi'` drives it (no event); typing updates it and fires `kai-input`. Read `el.value` for live state. */
1183
+ /** Controlled value. Settable and reflected to the `value` attribute. `el.value = 'hi'` drives it (no event); typing updates it and fires `kai-input`. Read `el.value` for live state. */
1025
1184
  value?: string;
1026
1185
  /** Placeholder shown when empty. */
1027
1186
  placeholder?: string;
@@ -1058,10 +1217,10 @@ export interface InputProps extends WebComponentProps {
1058
1217
  }
1059
1218
  export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLElement>>;
1060
1219
  export interface KbdProps extends WebComponentProps {
1061
- /** Shortcut spec tokens joined by `+` (e.g. `Mod+Shift+K`). Omit it to show default-slot content instead. Display only; the element does not bind keys. */
1220
+ /** Shortcut spec: tokens joined by `+` (e.g. `Mod+Shift+K`). Omit it to show default-slot content instead. Display only; the element does not bind keys. */
1062
1221
  keys?: string;
1063
1222
  /** `mac` uses ⌘/⌥, `other` uses Ctrl. `auto` (default) sniffs the OS. */
1064
- platform?: "other" | "auto" | "mac";
1223
+ platform?: "auto" | "mac" | "other";
1065
1224
  /** Cap size: `sm` or `md`. Defaults to `md`. */
1066
1225
  size?: "sm" | "md";
1067
1226
  }
@@ -1095,7 +1254,7 @@ export interface MarkdownProps extends WebComponentProps {
1095
1254
  /** The markdown source to render. */
1096
1255
  content: string;
1097
1256
  /** Text/markdown sizing. */
1098
- proseSize?: "sm" | "lg" | "xs" | "base";
1257
+ proseSize?: "xs" | "sm" | "base" | "lg";
1099
1258
  /** Shiki theme for fenced code blocks. */
1100
1259
  codeTheme?: string;
1101
1260
  /** Disable syntax highlighting (no Shiki loads). */
@@ -1103,7 +1262,7 @@ export interface MarkdownProps extends WebComponentProps {
1103
1262
  }
1104
1263
  export declare const Markdown: import('react').ForwardRefExoticComponent<MarkdownProps & import('react').RefAttributes<HTMLElement>>;
1105
1264
  export interface MenuProps extends WebComponentProps {
1106
- /** Tree of menu items. Set as a JS property not an HTML attribute. */
1265
+ /** Tree of menu items. Set as a JS property, not an HTML attribute. */
1107
1266
  items?: {
1108
1267
  id?: string;
1109
1268
  label?: string;
@@ -1118,7 +1277,7 @@ export interface MenuProps extends WebComponentProps {
1118
1277
  }[];
1119
1278
  /** Optional placement hint (unused by the underlying Dropdown which always positions bottom-start, kept for future extension). */
1120
1279
  placement?: string;
1121
- /** Built-in trigger: leading icon (a named icon like `"plus"`, an image URL/data-URI, or text). Use this instead of slotting `slot="trigger"` for the common case a slotted trigger overrides it. */
1280
+ /** Built-in trigger: leading icon (a named icon like `"plus"`, an image URL/data-URI, or text). Use this instead of slotting `slot="trigger"` for the common case; a slotted trigger overrides it. */
1122
1281
  triggerIcon?: string;
1123
1282
  /** Built-in trigger: a text label (e.g. `"High"`). */
1124
1283
  triggerLabel?: string;
@@ -1130,13 +1289,13 @@ export interface MenuProps extends WebComponentProps {
1130
1289
  open?: boolean;
1131
1290
  /** Initial open state on mount (uncontrolled seed). */
1132
1291
  defaultOpen?: boolean;
1133
- /** Disable the trigger click/keyboard and `show()` no longer open the menu. */
1292
+ /** Disable the trigger: click/keyboard and `show()` no longer open the menu. */
1134
1293
  disabled?: boolean;
1135
1294
  /** The menu opened or closed (by click, keyboard, Escape, outside-click, or a method). */
1136
1295
  onOpenChange?: (event: CustomEvent<{
1137
1296
  open: boolean;
1138
1297
  }>) => void;
1139
- /** Fired when the user selects a leaf item. - Plain items: `{ id }`. - Checkbox items: `{ id, checked }` where `checked` is the NEW state. - Radio items: `{ id, radioGroup }` the consumer marks `id` as the selected one in `radioGroup` and clears the others. */
1298
+ /** Fired when the user selects a leaf item. - Plain items: `{ id }`. - Checkbox items: `{ id, checked }` where `checked` is the NEW state. - Radio items: `{ id, radioGroup }`, where the consumer marks `id` as the selected one in `radioGroup` and clears the others. */
1140
1299
  onSelect?: (event: CustomEvent<{
1141
1300
  id: string;
1142
1301
  checked?: undefined | boolean;
@@ -1149,27 +1308,101 @@ export interface MessageProps extends WebComponentProps {
1149
1308
  message?: {
1150
1309
  id: string;
1151
1310
  role: "user" | "assistant";
1152
- content: string;
1153
- reasoning?: {
1311
+ parts: ({
1312
+ type: "text";
1313
+ text: string;
1314
+ raw?: {
1315
+ source: string;
1316
+ payload: unknown;
1317
+ };
1318
+ } | {
1319
+ type: "reasoning";
1154
1320
  text: string;
1155
1321
  label?: string;
1156
- };
1157
- tools?: {
1158
- type: string;
1159
- state: "input-streaming" | "input-available" | "output-available" | "output-error";
1160
- input?: Record<string, unknown>;
1161
- output?: Record<string, unknown>;
1162
- toolCallId?: string;
1163
- errorText?: string;
1164
- }[];
1165
- attachments?: {
1166
- id: string;
1167
- type: "file" | "source-document";
1168
- filename?: string;
1169
- mediaType?: string;
1170
- url?: string;
1171
- title?: string;
1172
- }[];
1322
+ index?: number;
1323
+ streamId?: string;
1324
+ signature?: string;
1325
+ raw?: {
1326
+ source: string;
1327
+ payload: unknown;
1328
+ };
1329
+ } | {
1330
+ type: "tool";
1331
+ tool: {
1332
+ type: string;
1333
+ kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic";
1334
+ state: "input-streaming" | "input-available" | "output-available" | "output-error";
1335
+ input?: Record<string, unknown>;
1336
+ rawInput?: string;
1337
+ output?: Record<string, unknown>;
1338
+ toolCallId?: string;
1339
+ errorText?: string;
1340
+ raw?: {
1341
+ source: string;
1342
+ payload: unknown;
1343
+ };
1344
+ };
1345
+ raw?: {
1346
+ source: string;
1347
+ payload: unknown;
1348
+ };
1349
+ } | {
1350
+ type: "card";
1351
+ envelope: {
1352
+ type: string;
1353
+ id: string;
1354
+ data: unknown;
1355
+ title?: string;
1356
+ resolution?: {
1357
+ kind: "action";
1358
+ action: string;
1359
+ payload?: unknown;
1360
+ at?: string;
1361
+ } | {
1362
+ kind: "submit";
1363
+ data: unknown;
1364
+ at?: string;
1365
+ } | {
1366
+ kind: "dismissed";
1367
+ at?: string;
1368
+ } | {
1369
+ kind: "expired";
1370
+ reason?: string;
1371
+ at?: string;
1372
+ };
1373
+ };
1374
+ raw?: {
1375
+ source: string;
1376
+ payload: unknown;
1377
+ };
1378
+ } | {
1379
+ type: "source";
1380
+ source: {
1381
+ id?: string;
1382
+ url?: string;
1383
+ title?: string;
1384
+ snippet?: string;
1385
+ index?: number;
1386
+ };
1387
+ raw?: {
1388
+ source: string;
1389
+ payload: unknown;
1390
+ };
1391
+ } | {
1392
+ type: "file";
1393
+ attachment: {
1394
+ id: string;
1395
+ type: "file" | "source-document";
1396
+ filename?: string;
1397
+ mediaType?: string;
1398
+ url?: string;
1399
+ title?: string;
1400
+ };
1401
+ raw?: {
1402
+ source: string;
1403
+ payload: unknown;
1404
+ };
1405
+ })[];
1173
1406
  actions?: ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
1174
1407
  id: string;
1175
1408
  label: string;
@@ -1183,14 +1416,12 @@ export interface MessageProps extends WebComponentProps {
1183
1416
  };
1184
1417
  feedback?: "like" | "dislike";
1185
1418
  };
1186
- /** Convenience for simple cases when not passing a `message` object. */
1419
+ /** Who is speaking: `'user'` or `'assistant'`. Convenience for simple cases when not passing a `message` object. This is the SEMANTIC role of the message, not an ARIA role. The name collides with the global ARIA `role` attribute, which is why the facade lifts it off the host (see `liftRoleOffHost`). Neither speaker is a valid ARIA role, so a `role="user"` left on `<kai-message>` is a CRITICAL axe `aria-roles` violation. The accessible role lives on the row inside the shadow root instead: `role="article"` plus an `aria-label` naming the speaker, matching the SolidJS `<Message>` component. */
1187
1420
  role?: "user" | "assistant";
1188
- /** Convenience content (used when `message` is not set). */
1189
- content?: string;
1190
1421
  /** Force markdown on/off. Defaults to on for assistant, off for user. */
1191
1422
  markdown?: boolean;
1192
1423
  /** Text/markdown sizing for the message body. */
1193
- proseSize?: "sm" | "lg" | "xs" | "base";
1424
+ proseSize?: "xs" | "sm" | "base" | "lg";
1194
1425
  /** Shiki theme name used for fenced code blocks in the content. */
1195
1426
  codeTheme?: string;
1196
1427
  /** Disable syntax highlighting for code blocks (no Shiki loads). */
@@ -1203,6 +1434,10 @@ export interface MessageProps extends WebComponentProps {
1203
1434
  avatarFallback?: string;
1204
1435
  /** Avatar rail mode. `'none'` omits the avatar rail entirely so the body spans the full row (predictable layout when you never show avatars). Any other value keeps the default behaviour: the built-in avatar when one resolves, or your `slot="avatar"` content when projected (which REPLACES the built-in). */
1205
1436
  avatar?: string;
1437
+ /** Optional card type -> custom-element tag overrides/additions for `card` parts (merged over the built-ins). Property: `el.cardTypes`. Typed as a plain string map (not the `CardTagMap` alias) so the generated React wrapper inlines it instead of emitting an unresolved named type. */
1438
+ cardTypes?: Record<string, string>;
1439
+ /** JSON Schemas for the card types this app renders, keyed by envelope type. The companion of `cardTypes`, which says what DRAWS a card while this says what a VALID one looks like. An OBJECT, so it is a JS property only: `el.cardSchemas = { 'pricing-table': pricingSchema }`, never an attribute. `createCardRegistry(...).validationSchemas` is exactly this shape. Without it the kit validates its own seven built-ins and leaves your own card type, the one your app actually cares about, as the only unchecked thing on screen. A schema here WINS over a built-in of the same name. Typed `Record<string, object>` rather than `Record<string, JsonSchema>` deliberately: an imported `.json` schema widens `"type"` to `string`, and an authored one carries `$schema`/`title`/`description`/`additionalProperties`, so the tighter type would reject both of the normal ways to supply one. */
1440
+ cardSchemas?: Record<string, object>;
1206
1441
  /** An action button was clicked. `action` is the built-in name or custom id. `state` is present only for the toggleable feedback votes: `'on'` when a like/dislike is set, `'off'` when re-tapped to clear. */
1207
1442
  onMessageAction?: (event: CustomEvent<{
1208
1443
  messageId: string;
@@ -1212,13 +1447,13 @@ export interface MessageProps extends WebComponentProps {
1212
1447
  }
1213
1448
  export declare const Message: import('react').ForwardRefExoticComponent<MessageProps & import('react').RefAttributes<HTMLElement>>;
1214
1449
  export interface ModelSwitcherProps extends WebComponentProps {
1215
- /** The selectable models. Set as a JS property (array). */
1216
- models: {
1450
+ /** The selectable models. Set as a JS property (array). Omit to supply them as `<kai-model>` light-DOM children instead; when both are present the property's models come first. */
1451
+ models?: {
1217
1452
  id: string;
1218
1453
  name: string;
1219
- provider?: undefined | string;
1220
- description?: undefined | string;
1221
- group?: undefined | string;
1454
+ provider?: string;
1455
+ description?: string;
1456
+ group?: string;
1222
1457
  }[];
1223
1458
  /** The currently-selected model id. Defaults to the first model. */
1224
1459
  currentModel?: string;
@@ -1226,7 +1461,7 @@ export interface ModelSwitcherProps extends WebComponentProps {
1226
1461
  open?: boolean;
1227
1462
  /** Initial open state on mount (uncontrolled seed). */
1228
1463
  defaultOpen?: boolean;
1229
- /** Disable the trigger click/keyboard and `show()` no longer open the dropdown. */
1464
+ /** Disable the trigger: click/keyboard and `show()` no longer open the dropdown. */
1230
1465
  disabled?: boolean;
1231
1466
  /** A model was selected. */
1232
1467
  onModelChange?: (event: CustomEvent<{
@@ -1249,7 +1484,7 @@ export interface NavProps extends WebComponentProps {
1249
1484
  disabled?: boolean;
1250
1485
  children?: Record<string, unknown>[];
1251
1486
  status?: {
1252
- tone: "error" | "primary" | "info" | "success" | "warning" | "neutral";
1487
+ tone: "primary" | "info" | "success" | "warning" | "error" | "neutral";
1253
1488
  label?: string;
1254
1489
  pulse?: boolean;
1255
1490
  };
@@ -1286,7 +1521,7 @@ export interface NavProps extends WebComponentProps {
1286
1521
  export declare const Nav: import('react').ForwardRefExoticComponent<NavProps & import('react').RefAttributes<HTMLElement>>;
1287
1522
  export interface NoticeProps extends WebComponentProps {
1288
1523
  /** `neutral` (default) · `info` · `warning` · `error` · `success`. Drives the leading icon's color and the a11y role (`alert` for errors, else `status`). */
1289
- severity?: "error" | "info" | "success" | "warning" | "neutral";
1524
+ severity?: "neutral" | "info" | "warning" | "error" | "success";
1290
1525
  /** Leading icon: omit for the severity default, `"none"` to hide it, or a named icon to override. */
1291
1526
  icon?: string;
1292
1527
  /** Show a dismiss (×) that hides the notice and emits `kai-dismiss`. */
@@ -1318,7 +1553,7 @@ export interface PaneProps extends WebComponentProps {
1318
1553
  onClose?: (event: CustomEvent) => void;
1319
1554
  /** The dock control was clicked (only present when `show-dock`). */
1320
1555
  onDock?: (event: CustomEvent) => void;
1321
- /** The maximize/restore control was clicked. `detail.maximized` is the intended NEXT state drive the `maximized` prop yourself from it. */
1556
+ /** The maximize/restore control was clicked. `detail.maximized` is the intended NEXT state. Drive the `maximized` prop yourself from it. */
1322
1557
  onMaximize?: (event: CustomEvent<{
1323
1558
  maximized: boolean;
1324
1559
  }>) => void;
@@ -1359,7 +1594,7 @@ export interface PaneGroupProps extends WebComponentProps {
1359
1594
  export declare const PaneGroup: import('react').ForwardRefExoticComponent<PaneGroupProps & import('react').RefAttributes<HTMLElement>>;
1360
1595
  export interface PopoverProps extends WebComponentProps {
1361
1596
  /** Floating placement relative to the trigger (floating-ui placement). */
1362
- placement?: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
1597
+ placement?: "top" | "right" | "bottom" | "left" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start";
1363
1598
  /** Gap in px between the trigger and the panel. */
1364
1599
  gutter?: number;
1365
1600
  /** Drive/observe open state (Shoelace-style: settable + reflected to the `open` attribute, the element still self-manages on click). Set `el.open = true`, or `<kai-popover open>`; listen for `kai-open-change`. */
@@ -1386,10 +1621,10 @@ export interface ProgressBarProps extends WebComponentProps {
1386
1621
  }
1387
1622
  export declare const ProgressBar: import('react').ForwardRefExoticComponent<ProgressBarProps & import('react').RefAttributes<HTMLElement>>;
1388
1623
  export interface PromptDockProps extends WebComponentProps {
1389
- /** How the tray frames the input the SPATIAL inset axis: `inset` (default, the classic recessed frame on every side) | `edge` (top/bottom inset only; the input sits flush left/right so the lips span the full width) | `none` (no inset; the lips attach directly as a plain stack). Attribute: `frame`. */
1390
- frame?: "none" | "inset" | "edge";
1391
- /** How the tray surface looks the VISUAL axis, orthogonal to `frame`: `soft` (default, sunken surface + border + radius) | `outlined` (transparent + border + radius) | `filled` (sunken, no border, + radius) | `plain` (bare). Attribute: `appearance`. */
1392
- appearance?: "outlined" | "filled" | "plain" | "soft";
1624
+ /** How the tray frames the input, the SPATIAL inset axis: `inset` (default, the classic recessed frame on every side) | `edge` (top/bottom inset only; the input sits flush left/right so the lips span the full width) | `none` (no inset; the lips attach directly as a plain stack). Attribute: `frame`. */
1625
+ frame?: "inset" | "edge" | "none";
1626
+ /** How the tray surface looks, the VISUAL axis orthogonal to `frame`: `soft` (default, sunken surface + border + radius) | `outlined` (transparent + border + radius) | `filled` (sunken, no border, + radius) | `plain` (bare). Attribute: `appearance`. */
1627
+ appearance?: "soft" | "outlined" | "filled" | "plain";
1393
1628
  }
1394
1629
  export declare const PromptDock: import('react').ForwardRefExoticComponent<PromptDockProps & import('react').RefAttributes<HTMLElement>>;
1395
1630
  export interface PromptInputProps extends WebComponentProps {
@@ -1424,7 +1659,7 @@ export interface PromptInputProps extends WebComponentProps {
1424
1659
  voice?: boolean;
1425
1660
  /** When set and `loading` is true, the send button is replaced by a Stop button (square icon, "Stop" aria-label). Clicking it fires `kai-stop`. */
1426
1661
  stoppable?: boolean;
1427
- /** Send-button visibility. `'always'` (default) always shows it; `'auto'` shows it only when there's text/attachments (an empty composer hides it Enter still submits). To hide it entirely (Enter-only), it's pure CSS: `::part(send){display:none}` no prop needed. Restyle via `::part(send)`. The Stop button (`stoppable` + `loading`) is unaffected. */
1662
+ /** Send-button visibility. `'always'` (default) always shows it; `'auto'` shows it only when there's text/attachments (an empty composer hides it, though Enter still submits). To hide it entirely (Enter-only), it's pure CSS: `::part(send){display:none}`, no prop needed. Restyle via `::part(send)`. The Stop button (`stoppable` + `loading`) is unaffected. */
1428
1663
  submit?: "always" | "auto";
1429
1664
  /** When `false`, hides the built-in paperclip attach button even though the element otherwise supports attachments. Use this when a `+` menu in `toolbar-start` already exposes "Add files", to avoid a duplicate control. Defaults to `true`. */
1430
1665
  attach?: boolean;
@@ -1437,7 +1672,7 @@ export interface PromptInputProps extends WebComponentProps {
1437
1672
  url?: string;
1438
1673
  title?: string;
1439
1674
  }[];
1440
- /** Rich entity triggers each `{ char, kind, items }` opens a caret-anchored menu that inserts an atomic pill. Convention: `/` → skills, `@` → agents (plugins are the grouping/provenance of those items). Set as a JS property. */
1675
+ /** Rich entity triggers. Each `{ char, kind, items }` opens a caret-anchored menu that inserts an atomic pill. Convention: `/` → skills, `@` → agents (plugins are the grouping/provenance of those items). Set as a JS property. */
1441
1676
  triggers?: {
1442
1677
  char: string;
1443
1678
  kind: string;
@@ -1454,7 +1689,7 @@ export interface PromptInputProps extends WebComponentProps {
1454
1689
  }[];
1455
1690
  /** Default icon per entity kind (kind → image URL/data-URI) for pills/menu items without their own `icon`. Overrides the built-in agent/plugin glyphs. JS property. */
1456
1691
  kindIcons?: Record<string, string>;
1457
- /** The staged attachments changed a file was added (via the paperclip) or removed (per-chip ×). Carries the full current list so a consumer can react in real time (validate, show upload progress, toggle the send button). */
1692
+ /** The staged attachments changed: a file was added (via the paperclip) or removed (per-chip ×). Carries the full current list so a consumer can react in real time (validate, show upload progress, toggle the send button). */
1458
1693
  onAttachmentsChange?: (event: CustomEvent<{
1459
1694
  attachments: {
1460
1695
  id: string;
@@ -1554,7 +1789,7 @@ export interface ReasoningProps extends WebComponentProps {
1554
1789
  streaming?: boolean;
1555
1790
  /** Render `text` as markdown. */
1556
1791
  markdown?: boolean;
1557
- /** Gate the disclosure trigger programmatic `show()/hide()/toggle()` still work, but the trigger click no longer toggles. */
1792
+ /** Gate the disclosure trigger: programmatic `show()/hide()/toggle()` still work, but the trigger click no longer toggles. */
1558
1793
  disabled?: boolean;
1559
1794
  /** The reasoning block expanded or collapsed (via the trigger, streaming auto-open, or a method). */
1560
1795
  onOpenChange?: (event: CustomEvent<{
@@ -1575,11 +1810,11 @@ export interface RemoteProps extends WebComponentProps {
1575
1810
  export declare const Remote: import('react').ForwardRefExoticComponent<RemoteProps & import('react').RefAttributes<HTMLElement>>;
1576
1811
  export interface ResizableProps extends WebComponentProps {
1577
1812
  /** Layout axis: `horizontal` (row, default) or `vertical` (column). */
1578
- orientation?: "vertical" | "horizontal";
1813
+ orientation?: "horizontal" | "vertical";
1579
1814
  /** Which item index is maximized (null = none). Declarative source of truth. */
1580
- maximizedIndex?: null | number;
1581
- /** Divider affordance drawn inside each draggable handle's 8px grab zone: - `line` (default) a 1px hairline, transparent at rest, tinting on hover/drag. - `grip` a dotted grip handle. - `none` no visible divider, just the invisible hit-area. The full grab zone and keyboard/ARIA behavior are identical for all three. */
1582
- handle?: "none" | "line" | "grip";
1815
+ maximizedIndex?: number | null;
1816
+ /** Divider affordance drawn inside each draggable handle's 8px grab zone: - `line` (default): a 1px hairline, transparent at rest, tinting on hover/drag. - `grip`: a dotted grip handle. - `none`: no visible divider, just the invisible hit-area. The full grab zone and keyboard/ARIA behavior are identical for all three. */
1817
+ handle?: "line" | "grip" | "none";
1583
1818
  /** Fired on drag-end / keyboard resize / visibility change. `detail.sizes` = panel sizes in percent. */
1584
1819
  onChange?: (event: CustomEvent<{
1585
1820
  sizes: number[];
@@ -1587,7 +1822,11 @@ export interface ResizableProps extends WebComponentProps {
1587
1822
  /** Observe layout maximize state. */
1588
1823
  onMaximizeChange?: (event: CustomEvent<{
1589
1824
  maximized: boolean;
1590
- index: null | number;
1825
+ index: number | null;
1826
+ }>) => void;
1827
+ /** Authoritative maximize state, dispatched as a raw composed CustomEvent (not through `dispatch`) onto the affected `<kai-resizable-item>` and, on restore, onto the group host. A nested element (e.g. `<kai-artifact>`) listens for it to reconcile its own toggle. */
1828
+ onMaximizeState?: (event: CustomEvent<{
1829
+ maximized: boolean;
1591
1830
  }>) => void;
1592
1831
  }
1593
1832
  export declare const Resizable: import('react').ForwardRefExoticComponent<ResizableProps & import('react').RefAttributes<HTMLElement>>;
@@ -1602,14 +1841,15 @@ export interface ResizableItemProps extends WebComponentProps {
1602
1841
  locked?: boolean;
1603
1842
  /** Hide this panel; its divider is dropped and the rest reflow. */
1604
1843
  hidden?: boolean;
1605
- /** Collapse this panel same layout effect as `hidden` (divider dropped, the rest reflow), but it WORKS as a bare boolean from framework JSX. A plain `<kai-resizable-item collapsed>` in React/Solid/Vue/Svelte collapses the panel at the first render; `hidden` does not, because a JSX boolean sets neither the `hidden` attribute nor the IDL property on a custom element, so the parent never sees it. The facade reflects `collapsed` to a `collapsed` attribute the parent reads. Prefer this over `hidden` for declarative collapse. */
1844
+ /** Collapse this panel. Same layout effect as `hidden` (divider dropped, the rest reflow), but it WORKS as a bare boolean from framework JSX. A plain `<kai-resizable-item collapsed>` in React/Solid/Vue/Svelte collapses the panel at the first render; `hidden` does not, because a JSX boolean sets neither the `hidden` attribute nor the IDL property on a custom element, so the parent never sees it. The facade reflects `collapsed` to a `collapsed` attribute the parent reads. Prefer this over `hidden` for declarative collapse. */
1606
1845
  collapsed?: boolean;
1607
1846
  onChange?: (event: CustomEvent<unknown>) => void;
1608
1847
  onMaximizeChange?: (event: CustomEvent<unknown>) => void;
1848
+ onMaximizeState?: (event: CustomEvent<unknown>) => void;
1609
1849
  }
1610
1850
  export declare const ResizableItem: import('react').ForwardRefExoticComponent<ResizableItemProps & import('react').RefAttributes<HTMLElement>>;
1611
1851
  export interface ResponseStreamProps extends WebComponentProps {
1612
- /** Text to stream. A string, or an `AsyncIterable<string>` (set as a JS property async iterables can't be HTML attributes). */
1852
+ /** Text to stream. A string, or an `AsyncIterable<string>` (set as a JS property, since async iterables can't be HTML attributes). */
1613
1853
  text?: string | AsyncIterable<string>;
1614
1854
  /** Reveal animation. */
1615
1855
  mode?: "typewriter" | "fade";
@@ -1622,17 +1862,17 @@ export interface ResponseStreamProps extends WebComponentProps {
1622
1862
  }
1623
1863
  export declare const ResponseStream: import('react').ForwardRefExoticComponent<ResponseStreamProps & import('react').RefAttributes<HTMLElement>>;
1624
1864
  export interface ScopePickerProps extends WebComponentProps {
1625
- /** Authors to offer as scope filters. Set as a JS property. */
1626
- availableAuthors: string[];
1627
- /** Tags to offer as scope filters. Set as a JS property. */
1628
- availableTags: string[];
1865
+ /** Authors to offer as scope filters. Omit to drop the Authors section (for a tag-only picker). Set as a JS property. */
1866
+ availableAuthors?: string[];
1867
+ /** Tags to offer as scope filters. Omit to drop the Tags section (for an author-only picker). Set as a JS property. */
1868
+ availableTags?: string[];
1629
1869
  /** The label shown on the trigger for the active scope. */
1630
1870
  currentLabel?: string;
1631
1871
  /** Drive/observe the dropdown's open state (Shoelace-style: settable + reflected to the `open` attribute, the dropdown still self-manages on click/keyboard). Set `el.open = true`, or `<kai-scope-picker open>`; listen for `kai-open-change`. */
1632
1872
  open?: boolean;
1633
1873
  /** Initial open state on mount (uncontrolled seed). */
1634
1874
  defaultOpen?: boolean;
1635
- /** Disable the trigger click/keyboard and `show()` no longer open the dropdown. */
1875
+ /** Disable the trigger: click/keyboard and `show()` no longer open the dropdown. */
1636
1876
  disabled?: boolean;
1637
1877
  /** The scope dropdown opened or closed (by click, keyboard, Escape, outside-click, or a method). */
1638
1878
  onOpenChange?: (event: CustomEvent<{
@@ -1640,7 +1880,7 @@ export interface ScopePickerProps extends WebComponentProps {
1640
1880
  }>) => void;
1641
1881
  /** A scope was chosen (`undefined` filters = "All Content"). */
1642
1882
  onScopeChange?: (event: CustomEvent<{
1643
- filters: undefined | {
1883
+ filters: {
1644
1884
  tags?: undefined | string[];
1645
1885
  authors?: undefined | string[];
1646
1886
  contentType?: undefined | "transcript" | "markdown";
@@ -1648,7 +1888,7 @@ export interface ScopePickerProps extends WebComponentProps {
1648
1888
  from: string;
1649
1889
  to: string;
1650
1890
  };
1651
- };
1891
+ } | undefined;
1652
1892
  }>) => void;
1653
1893
  }
1654
1894
  export declare const ScopePicker: import('react').ForwardRefExoticComponent<ScopePickerProps & import('react').RefAttributes<HTMLElement>>;
@@ -1680,15 +1920,15 @@ export interface ScrollButtonProps extends WebComponentProps {
1680
1920
  /** CSS id of the scroll container to control. When omitted the element walks up the DOM (outside its own shadow root) to find the nearest scrollable ancestor. Mirrors the `for` convention of `<label for="...">`. */
1681
1921
  for?: string;
1682
1922
  /** Button visual variant: `'outline' | 'ghost' | 'default'`. Defaults to `'outline'`. */
1683
- variant?: "default" | "ghost" | "outline";
1923
+ variant?: "outline" | "ghost" | "default";
1684
1924
  /** Button size token. Defaults to `'icon'` (square). */
1685
1925
  size?: "sm" | "md" | "lg" | "icon" | "icon-sm";
1686
- /** Emitted when the user clicks the button and `scrollToBottom()` is called. Carries no detail consumers use it to know a manual scroll occurred. */
1926
+ /** Emitted when the user clicks the button and `scrollToBottom()` is called. Carries no detail; consumers use it to know a manual scroll occurred. */
1687
1927
  onScroll?: (event: CustomEvent) => void;
1688
1928
  }
1689
1929
  export declare const ScrollButton: import('react').ForwardRefExoticComponent<ScrollButtonProps & import('react').RefAttributes<HTMLElement>>;
1690
1930
  export interface SearchProps extends WebComponentProps {
1691
- /** Controlled query settable and reflected to the `value` attribute. Read `el.value` for live state. */
1931
+ /** Controlled query. Settable and reflected to the `value` attribute. Read `el.value` for live state. */
1692
1932
  value?: string;
1693
1933
  /** Placeholder. Defaults to `Search…`. */
1694
1934
  placeholder?: string;
@@ -1721,7 +1961,7 @@ export interface SegmentedProps extends WebComponentProps {
1721
1961
  label: string;
1722
1962
  icon?: undefined | string;
1723
1963
  }[];
1724
- /** Controlled selected `value` settable and reflected to the `value` attribute. `el.value = 'preview'` drives it; choosing a segment updates it and fires `kai-change`. Read `el.value` for live state. */
1964
+ /** Controlled selected `value`. Settable and reflected to the `value` attribute. `el.value = 'preview'` drives it; choosing a segment updates it and fires `kai-change`. Read `el.value` for live state. */
1725
1965
  value?: string;
1726
1966
  /** Control density: `sm` or `md`. Defaults to `md`. */
1727
1967
  size?: "sm" | "md";
@@ -1732,8 +1972,8 @@ export interface SegmentedProps extends WebComponentProps {
1732
1972
  }
1733
1973
  export declare const Segmented: import('react').ForwardRefExoticComponent<SegmentedProps & import('react').RefAttributes<HTMLElement>>;
1734
1974
  export interface SeparatorProps extends WebComponentProps {
1735
- /** `horizontal` (default, block + full-width) or `vertical` (a rule inside a flex/grid row it stretches to the row height). */
1736
- orientation?: "vertical" | "horizontal";
1975
+ /** `horizontal` (default, block + full-width) or `vertical` (a rule inside a flex/grid row, stretching to the row height). */
1976
+ orientation?: "horizontal" | "vertical";
1737
1977
  }
1738
1978
  export declare const Separator: import('react').ForwardRefExoticComponent<SeparatorProps & import('react').RefAttributes<HTMLElement>>;
1739
1979
  export interface SettingItemProps extends WebComponentProps {
@@ -1762,8 +2002,8 @@ export interface SkeletonProps extends WebComponentProps {
1762
2002
  }
1763
2003
  export declare const Skeleton: import('react').ForwardRefExoticComponent<SkeletonProps & import('react').RefAttributes<HTMLElement>>;
1764
2004
  export interface SkillsProps extends WebComponentProps {
1765
- /** The active skills to badge. Set as a JS property. */
1766
- skills: {
2005
+ /** The active skills to badge. Set as a JS property. Omit to supply them as `<kai-skill>` light-DOM children instead; when both are present the property's skills come first. Nothing renders when there are none. */
2006
+ skills?: {
1767
2007
  id: string;
1768
2008
  name: string;
1769
2009
  }[];
@@ -1774,7 +2014,7 @@ export interface SourceProps extends WebComponentProps {
1774
2014
  href?: string;
1775
2015
  /** Trigger label (defaults to the domain). */
1776
2016
  label?: string;
1777
- /** Hover-card headline. Attribute: `headline` (`title` is avoided it's a global HTML attribute that reflects in a CE constructor and breaks it). */
2017
+ /** Hover-card headline. Attribute: `headline` (`title` is avoided because it is a global HTML attribute that reflects in a CE constructor and breaks it). */
1778
2018
  headline?: string;
1779
2019
  /** Hover-card body text describing the source. */
1780
2020
  description?: string;
@@ -1783,17 +2023,17 @@ export interface SourceProps extends WebComponentProps {
1783
2023
  }
1784
2024
  export declare const Source: import('react').ForwardRefExoticComponent<SourceProps & import('react').RefAttributes<HTMLElement>>;
1785
2025
  export interface SourcesProps extends WebComponentProps {
1786
- /** The sources to render. Set as a JS property. */
1787
- sources: {
2026
+ /** The sources to render. Set as a JS property. Omit to supply them as `<kai-source>` light-DOM children instead; when both are present the property's sources come first. */
2027
+ sources?: {
1788
2028
  href: string;
1789
- title?: undefined | string;
1790
- description?: undefined | string;
1791
- label?: undefined | string;
1792
- showFavicon?: undefined | boolean;
2029
+ title?: string;
2030
+ description?: string;
2031
+ label?: string;
2032
+ showFavicon?: boolean;
1793
2033
  }[];
1794
2034
  /** Show favicons on all items (per-item `showFavicon` overrides). */
1795
2035
  showFavicon?: boolean;
1796
- /** When true, each citation chip is labelled with its 1-based index in the merged (prop + declarative-children) list (`[1]`, `[2]`, …) instead of the per-item `label` or domain fallback. HTML attribute: `numbered` (boolean bare attribute or `numbered="true"`). JS property: `el.numbered = true`. */
2036
+ /** When true, each citation chip is labelled with its 1-based index in the merged (prop + declarative-children) list (`[1]`, `[2]`, …) instead of the per-item `label` or domain fallback. HTML attribute: `numbered` (boolean: a bare attribute or `numbered="true"`). JS property: `el.numbered = true`. */
1797
2037
  numbered?: boolean;
1798
2038
  }
1799
2039
  export declare const Sources: import('react').ForwardRefExoticComponent<SourcesProps & import('react').RefAttributes<HTMLElement>>;
@@ -1809,18 +2049,18 @@ export interface StatusProps extends WebComponentProps {
1809
2049
  }
1810
2050
  export declare const Status: import('react').ForwardRefExoticComponent<StatusProps & import('react').RefAttributes<HTMLElement>>;
1811
2051
  export interface SuggestionsProps extends WebComponentProps {
1812
- /** The suggestions. Strings, or `{ label, value }` when the displayed text and the emitted value differ. Set as a JS property. */
1813
- suggestions: (string | {
2052
+ /** The suggestions. Strings, or `{ label, value }` when the displayed text and the emitted value differ. Set as a JS property. Omit to supply them as `<kai-suggestion>` light-DOM children instead; when both are present the property's suggestions come first. */
2053
+ suggestions?: (string | {
1814
2054
  label: string;
1815
- value?: undefined | string;
1816
- icon?: undefined | string;
2055
+ value?: string;
2056
+ icon?: string;
1817
2057
  })[];
1818
2058
  /** Chip style: `'outline'` (default), `'ghost'`, or `'default'` (filled). */
1819
- variant?: "default" | "ghost" | "outline";
2059
+ variant?: "outline" | "ghost" | "default";
1820
2060
  /** Row height for `layout="list"`: `'md'` (default) or `'lg'` for taller rows. Chips are unaffected. */
1821
2061
  size?: "md" | "lg";
1822
- /** Layout: `'chips'` (default) renders a wrapping row of rounded pills; `'list'` renders a vertical, full-width "Ideas for you" list each row is left-aligned with a leading `icon`, a label, and a hover background. */
1823
- layout?: "list" | "chips";
2062
+ /** Layout: `'chips'` (default) renders a wrapping row of rounded pills; `'list'` renders a vertical, full-width "Ideas for you" list where each row is left-aligned with a leading `icon`, a label, and a hover background. */
2063
+ layout?: "chips" | "list";
1824
2064
  /** Full-width left-aligned rows instead of pills. */
1825
2065
  block?: boolean;
1826
2066
  /** Substring to highlight within each suggestion. */
@@ -1832,7 +2072,7 @@ export interface SuggestionsProps extends WebComponentProps {
1832
2072
  }
1833
2073
  export declare const Suggestions: import('react').ForwardRefExoticComponent<SuggestionsProps & import('react').RefAttributes<HTMLElement>>;
1834
2074
  export interface SwitchProps extends WebComponentProps {
1835
- /** Controlled checked state settable and reflected to the `checked` attribute. `el.checked = true` (or `<kai-switch checked>`) drives it; the toggle UI updates it and fires `kai-change`. Read `el.checked` for live state. */
2075
+ /** Controlled checked state. Settable and reflected to the `checked` attribute. `el.checked = true` (or `<kai-switch checked>`) drives it; the toggle UI updates it and fires `kai-change`. Read `el.checked` for live state. */
1836
2076
  checked?: boolean;
1837
2077
  /** Initial checked state on mount (uncontrolled seed). Bare attribute (`<kai-switch default-checked>`) turns it on. */
1838
2078
  defaultChecked?: boolean;
@@ -1876,7 +2116,23 @@ export interface TabsProps extends WebComponentProps {
1876
2116
  export declare const Tabs: import('react').ForwardRefExoticComponent<TabsProps & import('react').RefAttributes<HTMLElement>>;
1877
2117
  export interface TasksProps extends WebComponentProps {
1878
2118
  /** The tasks definition (the CardEnvelope.data). Set as a JS PROPERTY: `el.data = { tasks:[…], selectAll, confirmLabel, … }`. Import `TasksCardData` from `@kitn.ai/ui` for the full shape. */
1879
- data?: Record<string, unknown>;
2119
+ data?: {
2120
+ mode?: "select" | "progress";
2121
+ heading?: string;
2122
+ tasks: {
2123
+ id: string;
2124
+ label: string;
2125
+ description?: string;
2126
+ checked?: boolean;
2127
+ disabled?: boolean;
2128
+ }[];
2129
+ selectAll?: boolean;
2130
+ confirmLabel?: string;
2131
+ allowEmpty?: boolean;
2132
+ min?: number;
2133
+ max?: number;
2134
+ dismissible?: boolean;
2135
+ };
1880
2136
  /** Stable card id correlating every emitted CardEvent. Attribute: `card-id`. */
1881
2137
  cardId?: string;
1882
2138
  /** Heading rendered in the card chrome (= CardEnvelope.title). Attribute: `heading`. */
@@ -1891,7 +2147,7 @@ export interface TasksProps extends WebComponentProps {
1891
2147
  disabled?: boolean;
1892
2148
  /** Display-only: rows can't be toggled and show the default cursor (no pointer, hover, or focus affordances). Keeps the look as-is. Attribute: `readonly`. */
1893
2149
  readonly?: boolean;
1894
- /** The selection changed on a toggle the selected ids in input order. */
2150
+ /** The selection changed on a toggle. Carries the selected ids in input order. */
1895
2151
  onValueChange?: (event: CustomEvent<{
1896
2152
  value: string[];
1897
2153
  }>) => void;
@@ -1920,31 +2176,105 @@ export interface ThinkingBarProps extends WebComponentProps {
1920
2176
  }
1921
2177
  export declare const ThinkingBar: import('react').ForwardRefExoticComponent<ThinkingBarProps & import('react').RefAttributes<HTMLElement>>;
1922
2178
  export interface ThreadProps extends WebComponentProps {
1923
- /** The full message thread to render, newest last. Each entry carries its role, content, and optional reasoning/tools/attachments/actions/avatar. Set as a JS property (`el.messages = [...]`); a NEW array reference per streaming chunk re-renders (mutating in place does not). */
2179
+ /** The full message thread to render, newest last. Each entry carries its role, ordered `parts`, and optional actions/avatar/feedback. Set as a JS property (`el.messages = [...]`); a NEW array reference per streaming chunk re-renders (mutating in place does not). */
1924
2180
  messages?: {
1925
2181
  id: string;
1926
2182
  role: "user" | "assistant";
1927
- content: string;
1928
- reasoning?: {
2183
+ parts: ({
2184
+ type: "text";
2185
+ text: string;
2186
+ raw?: {
2187
+ source: string;
2188
+ payload: unknown;
2189
+ };
2190
+ } | {
2191
+ type: "reasoning";
1929
2192
  text: string;
1930
2193
  label?: string;
1931
- };
1932
- tools?: {
1933
- type: string;
1934
- state: "input-streaming" | "input-available" | "output-available" | "output-error";
1935
- input?: Record<string, unknown>;
1936
- output?: Record<string, unknown>;
1937
- toolCallId?: string;
1938
- errorText?: string;
1939
- }[];
1940
- attachments?: {
1941
- id: string;
1942
- type: "file" | "source-document";
1943
- filename?: string;
1944
- mediaType?: string;
1945
- url?: string;
1946
- title?: string;
1947
- }[];
2194
+ index?: number;
2195
+ streamId?: string;
2196
+ signature?: string;
2197
+ raw?: {
2198
+ source: string;
2199
+ payload: unknown;
2200
+ };
2201
+ } | {
2202
+ type: "tool";
2203
+ tool: {
2204
+ type: string;
2205
+ kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic";
2206
+ state: "input-streaming" | "input-available" | "output-available" | "output-error";
2207
+ input?: Record<string, unknown>;
2208
+ rawInput?: string;
2209
+ output?: Record<string, unknown>;
2210
+ toolCallId?: string;
2211
+ errorText?: string;
2212
+ raw?: {
2213
+ source: string;
2214
+ payload: unknown;
2215
+ };
2216
+ };
2217
+ raw?: {
2218
+ source: string;
2219
+ payload: unknown;
2220
+ };
2221
+ } | {
2222
+ type: "card";
2223
+ envelope: {
2224
+ type: string;
2225
+ id: string;
2226
+ data: unknown;
2227
+ title?: string;
2228
+ resolution?: {
2229
+ kind: "action";
2230
+ action: string;
2231
+ payload?: unknown;
2232
+ at?: string;
2233
+ } | {
2234
+ kind: "submit";
2235
+ data: unknown;
2236
+ at?: string;
2237
+ } | {
2238
+ kind: "dismissed";
2239
+ at?: string;
2240
+ } | {
2241
+ kind: "expired";
2242
+ reason?: string;
2243
+ at?: string;
2244
+ };
2245
+ };
2246
+ raw?: {
2247
+ source: string;
2248
+ payload: unknown;
2249
+ };
2250
+ } | {
2251
+ type: "source";
2252
+ source: {
2253
+ id?: string;
2254
+ url?: string;
2255
+ title?: string;
2256
+ snippet?: string;
2257
+ index?: number;
2258
+ };
2259
+ raw?: {
2260
+ source: string;
2261
+ payload: unknown;
2262
+ };
2263
+ } | {
2264
+ type: "file";
2265
+ attachment: {
2266
+ id: string;
2267
+ type: "file" | "source-document";
2268
+ filename?: string;
2269
+ mediaType?: string;
2270
+ url?: string;
2271
+ title?: string;
2272
+ };
2273
+ raw?: {
2274
+ source: string;
2275
+ payload: unknown;
2276
+ };
2277
+ })[];
1948
2278
  actions?: ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
1949
2279
  id: string;
1950
2280
  label: string;
@@ -1958,10 +2288,10 @@ export interface ThreadProps extends WebComponentProps {
1958
2288
  };
1959
2289
  feedback?: "like" | "dislike";
1960
2290
  }[];
1961
- /** Show a typing indicator on the pending assistant turn set while awaiting the assistant's reply. */
2291
+ /** Show a typing indicator on the pending assistant turn. Set it while awaiting the assistant's reply. */
1962
2292
  loading?: boolean;
1963
2293
  /** Body/prose font scale for rendered markdown (`'xs' | 'sm' | 'base' | 'lg'`). Defaults to `'sm'`. */
1964
- proseSize?: "sm" | "lg" | "xs" | "base";
2294
+ proseSize?: "xs" | "sm" | "base" | "lg";
1965
2295
  /** Shiki theme name for syntax-highlighted code blocks (e.g. `'github-dark-dimmed'`). */
1966
2296
  codeTheme?: string;
1967
2297
  /** Enable Shiki syntax highlighting in code blocks. Turn off to render plain `<pre>` blocks (lighter, no highlighter load). Default true. */
@@ -1972,6 +2302,10 @@ export interface ThreadProps extends WebComponentProps {
1972
2302
  scrollButton?: boolean;
1973
2303
  /** Extra classes applied to the thread's inner root. */
1974
2304
  class?: string;
2305
+ /** Optional card type -> custom-element tag overrides/additions for `card` parts (merged over the built-ins). Property: `el.cardTypes`. Typed as a plain string map (not the `CardTagMap` alias) so the generated React wrapper inlines it instead of emitting an unresolved named type. */
2306
+ cardTypes?: Record<string, string>;
2307
+ /** JSON Schemas for the card types this app renders, keyed by envelope type. The companion of `cardTypes`, which says what DRAWS a card while this says what a VALID one looks like. An OBJECT, so it is a JS property only: `el.cardSchemas = { 'pricing-table': pricingSchema }`, never an attribute. `createCardRegistry(...).validationSchemas` is exactly this shape. Without it the kit validates its own seven built-ins and leaves your own card type, the one your app actually cares about, as the only unchecked thing on screen. A schema here WINS over a built-in of the same name. Typed `Record<string, object>` rather than `Record<string, JsonSchema>` deliberately: an imported `.json` schema widens `"type"` to `string`, and an authored one carries `$schema`/`title`/`description`/`additionalProperties`, so the tighter type would reject both of the normal ways to supply one. */
2308
+ cardSchemas?: Record<string, object>;
1975
2309
  /** A message's action button was clicked. `action` is the built-in name (`copy` / `like` / `dislike` / `regenerate` / `edit`) or a custom id. `state` is present only for the toggleable feedback votes: `'on'` when a like/dislike is set, `'off'` when re-tapped to clear. */
1976
2310
  onMessageAction?: (event: CustomEvent<{
1977
2311
  messageId: string;
@@ -1981,21 +2315,21 @@ export interface ThreadProps extends WebComponentProps {
1981
2315
  }
1982
2316
  export declare const Thread: import('react').ForwardRefExoticComponent<ThreadProps & import('react').RefAttributes<HTMLElement>>;
1983
2317
  export interface ToastRegionProps extends WebComponentProps {
1984
- /** The toasts to render. Newest is shown on top. Set as a JS property (array); pass a new array reference to update. */
1985
- toasts: {
2318
+ /** The toasts to render. Newest is shown on top. Set as a JS property (array); pass a new array reference to update. Omit for an empty region, which is the normal resting state and how the imperative `toast()` API starts. */
2319
+ toasts?: {
1986
2320
  id: string;
1987
2321
  message: string;
1988
- variant?: undefined | "error" | "info" | "success" | "warning" | "neutral";
1989
- appearance?: undefined | "pill" | "card";
1990
- inverse?: undefined | boolean;
1991
- description?: undefined | string;
1992
- action?: undefined | {
2322
+ variant?: "neutral" | "success" | "warning" | "error" | "info";
2323
+ appearance?: "pill" | "card";
2324
+ inverse?: boolean;
2325
+ description?: string;
2326
+ action?: {
1993
2327
  label: string;
1994
2328
  onAction: () => void | false;
1995
2329
  };
1996
- duration?: undefined | number;
1997
- dismissible?: undefined | boolean;
1998
- target?: undefined | HTMLElement;
2330
+ duration?: number;
2331
+ dismissible?: boolean;
2332
+ target?: HTMLElement;
1999
2333
  }[];
2000
2334
  /** Stack anchor: `'top-center'` (default), `'top-right'`, `'bottom-center'`, … */
2001
2335
  position?: "top-center" | "top-right" | "top-left" | "bottom-center" | "bottom-right" | "bottom-left";
@@ -2017,7 +2351,7 @@ export interface ToastRegionProps extends WebComponentProps {
2017
2351
  /** A toast left the stack. `reason` is `'timeout' | 'close' | 'action'`. */
2018
2352
  onDismiss?: (event: CustomEvent<{
2019
2353
  id: string;
2020
- reason: "action" | "timeout" | "close";
2354
+ reason: "timeout" | "close" | "action";
2021
2355
  }>) => void;
2022
2356
  }
2023
2357
  export declare const ToastRegion: import('react').ForwardRefExoticComponent<ToastRegionProps & import('react').RefAttributes<HTMLElement>>;
@@ -2025,17 +2359,23 @@ export interface ToolProps extends WebComponentProps {
2025
2359
  /** The tool-call to display. Set as a JS property. */
2026
2360
  tool?: {
2027
2361
  type: string;
2362
+ kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic";
2028
2363
  state: "input-streaming" | "input-available" | "output-available" | "output-error";
2029
2364
  input?: Record<string, unknown>;
2365
+ rawInput?: string;
2030
2366
  output?: Record<string, unknown>;
2031
2367
  toolCallId?: string;
2032
2368
  errorText?: string;
2369
+ raw?: {
2370
+ source: string;
2371
+ payload: unknown;
2372
+ };
2033
2373
  };
2034
2374
  /** Drive/observe open state (Shoelace-style: settable + reflected to the `open` attribute; the element still self-manages on trigger click). Set `el.open = true`, or `<kai-tool open>`; listen for `kai-open-change`. */
2035
2375
  open?: boolean;
2036
2376
  /** Initial open state on mount (uncontrolled seed). */
2037
2377
  defaultOpen?: boolean;
2038
- /** Gate the disclosure trigger programmatic `show()/hide()/toggle()` still work, but the trigger click no longer toggles. */
2378
+ /** Gate the disclosure trigger: programmatic `show()/hide()/toggle()` still work, but the trigger click no longer toggles. */
2039
2379
  disabled?: boolean;
2040
2380
  /** The panel expanded or collapsed (by trigger click or a method). */
2041
2381
  onOpenChange?: (event: CustomEvent<{
@@ -2065,7 +2405,7 @@ export interface TooltipProps extends WebComponentProps {
2065
2405
  }
2066
2406
  export declare const Tooltip: import('react').ForwardRefExoticComponent<TooltipProps & import('react').RefAttributes<HTMLElement>>;
2067
2407
  export interface VoiceInputProps extends WebComponentProps {
2068
- /** Transcriber the host supplies records audio, returns the text. This is a **function-valued property** (`el.transcribe = async blob => '...'`) because a value-returning callback can't be modelled as a fire-and-forget event. */
2408
+ /** Transcriber the host supplies: records audio, returns the text. This is a **function-valued property** (`el.transcribe = async blob => '...'`) because a value-returning callback can't be modelled as a fire-and-forget event. */
2069
2409
  transcribe?: (audio: Blob) => Promise<string>;
2070
2410
  /** Disable the mic button (non-interactive). */
2071
2411
  disabled?: boolean;
@@ -2073,11 +2413,11 @@ export interface VoiceInputProps extends WebComponentProps {
2073
2413
  recognitionLang?: string;
2074
2414
  /** Emit live partial transcripts (`kai-transcript-interim`) during native recognition. Attribute: `interim`. No-op on the transcribe/fallback paths. */
2075
2415
  interim?: boolean;
2076
- /** Raw audio captured (before transcription) for hosts that prefer to handle transcription themselves instead of via the `transcribe` property. Also the unsupported-fallback signal: no `transcribe`, no SpeechRecognition, so only the blob is produced (no text). */
2416
+ /** Raw audio captured (before transcription), for hosts that prefer to handle transcription themselves instead of via the `transcribe` property. Also the unsupported-fallback signal: no `transcribe`, no SpeechRecognition, so only the blob is produced (no text). */
2077
2417
  onAudioCaptured?: (event: CustomEvent<{
2078
2418
  blob: Blob;
2079
2419
  }>) => void;
2080
- /** Recording started or stopped lets the host drive its own UI (waveform, push-to-talk indicator) in sync with the mic. Fires on real transitions only (manual click and programmatic start()/stop()), never on mount. */
2420
+ /** Recording started or stopped. Lets the host drive its own UI (waveform, push-to-talk indicator) in sync with the mic. Fires on real transitions only (manual click and programmatic start()/stop()), never on mount. */
2081
2421
  onRecordingChange?: (event: CustomEvent<{
2082
2422
  recording: boolean;
2083
2423
  }>) => void;
@@ -2085,7 +2425,7 @@ export interface VoiceInputProps extends WebComponentProps {
2085
2425
  onTranscriptInterim?: (event: CustomEvent<{
2086
2426
  text: string;
2087
2427
  }>) => void;
2088
- /** Final transcript the `transcribe` property resolved, OR native `SpeechRecognition` produced final text (no `transcribe` set). */
2428
+ /** Final transcript: the `transcribe` property resolved, OR native `SpeechRecognition` produced final text (no `transcribe` set). */
2089
2429
  onTranscription?: (event: CustomEvent<{
2090
2430
  text: string;
2091
2431
  }>) => void;
@@ -2096,43 +2436,43 @@ export interface VoiceOutputProps extends WebComponentProps {
2096
2436
  text?: string;
2097
2437
  /** Speak automatically when `text` is set/changed. */
2098
2438
  autoplay?: boolean;
2099
- /** TTS model seam the host supplies given text, returns an audio `Blob` to play. This is a **function-valued property** (`el.synthesize = async text => blob`); when set, the native `speechSynthesis` path is bypassed. Mirrors `<kai-voice-input>`'s `transcribe`. A value-returning callback can't be modelled as a fire-and-forget event, hence a property. */
2439
+ /** TTS model seam the host supplies: given text, returns an audio `Blob` to play. This is a **function-valued property** (`el.synthesize = async text => blob`); when set, the native `speechSynthesis` path is bypassed. Mirrors `<kai-voice-input>`'s `transcribe`. A value-returning callback can't be modelled as a fire-and-forget event, hence a property. */
2100
2440
  synthesize?: (text: string) => Promise<Blob>;
2101
2441
  /** Disable the button (non-interactive). */
2102
2442
  disabled?: boolean;
2103
- /** Playback started or stopped drive your own UI in sync. Fires on real transitions only (manual click and programmatic speak()/stop()), never on mount. */
2443
+ /** Playback started or stopped. Drive your own UI in sync. Fires on real transitions only (manual click and programmatic speak()/stop()), never on mount. */
2104
2444
  onSpeakingChange?: (event: CustomEvent<{
2105
2445
  speaking: boolean;
2106
2446
  }>) => void;
2107
- /** The model path (`synthesize`) resolved audio the raw `Blob` before playback. */
2447
+ /** The model path (`synthesize`) resolved audio: the raw `Blob` before playback. */
2108
2448
  onSynthesized?: (event: CustomEvent<{
2109
2449
  blob: Blob;
2110
2450
  }>) => void;
2111
2451
  }
2112
2452
  export declare const VoiceOutput: import('react').ForwardRefExoticComponent<VoiceOutputProps & import('react').RefAttributes<HTMLElement>>;
2113
2453
  export interface WorkspaceProps extends WebComponentProps {
2114
- /** Pre-bucketed conversation groups for the sidebar. Set as a JS property. */
2115
- groups: {
2454
+ /** The sidebar's section headers, rendered in array order. A group carries no conversations of its own; it is matched against `conversations` by id, so the two props are complementary rather than alternatives. Omit for an ungrouped sidebar. Set as a JS property. */
2455
+ groups?: {
2116
2456
  id: string;
2117
- userId?: undefined | string;
2118
- teamId?: undefined | string;
2457
+ userId?: string;
2458
+ teamId?: string;
2119
2459
  name: string;
2120
2460
  sortOrder: number;
2121
2461
  createdAt: string;
2122
2462
  }[];
2123
- /** Flat conversation list (auto-bucketed if `groups` is empty). Set as a JS property. */
2124
- conversations: {
2463
+ /** Every conversation in the sidebar, flat. Each one is filed under the group whose `id` equals its `groupId`; one with no `groupId`, or with a `groupId` matching no entry in `groups`, falls into a trailing ungrouped section (headerless when `compact`), so nothing you pass in is ever dropped. There is no recency bucketing. Set as a JS property. Omit for an empty sidebar, or when `no-conversations` replaces the built-in list with your own `sidebar-header` content. */
2464
+ conversations?: {
2125
2465
  id: string;
2126
2466
  title: string;
2127
- groupId?: undefined | string;
2467
+ groupId?: string;
2128
2468
  scope: {
2129
2469
  type: "document" | "collection";
2130
- documentId?: undefined | string;
2131
- filters?: undefined | {
2132
- tags?: undefined | string[];
2133
- authors?: undefined | string[];
2134
- contentType?: undefined | "transcript" | "markdown";
2135
- dateRange?: undefined | {
2470
+ documentId?: string;
2471
+ filters?: {
2472
+ tags?: string[];
2473
+ authors?: string[];
2474
+ contentType?: "transcript" | "markdown";
2475
+ dateRange?: {
2136
2476
  from: string;
2137
2477
  to: string;
2138
2478
  };
@@ -2141,54 +2481,128 @@ export interface WorkspaceProps extends WebComponentProps {
2141
2481
  messageCount: number;
2142
2482
  lastMessageAt: string;
2143
2483
  updatedAt: string;
2144
- trailing?: undefined | string;
2484
+ trailing?: string;
2145
2485
  }[];
2146
2486
  /** Id of the open conversation, highlighted in the sidebar. */
2147
2487
  activeId?: string;
2148
- /** The active conversation's message thread, newest last. Set as a JS property. */
2149
- messages: {
2488
+ /** The active conversation's message thread, newest last. Set as a JS property (`el.messages = [...]`); a NEW array reference per streaming chunk re-renders (mutating in place does not). Omit for an empty thread. */
2489
+ messages?: {
2150
2490
  id: string;
2151
2491
  role: "user" | "assistant";
2152
- content: string;
2153
- reasoning?: undefined | {
2492
+ parts: ({
2493
+ type: "text";
2154
2494
  text: string;
2155
- label?: undefined | string;
2156
- };
2157
- tools?: undefined | {
2158
- type: string;
2159
- state: "input-streaming" | "input-available" | "output-available" | "output-error";
2160
- input?: undefined | Record<string, unknown>;
2161
- output?: undefined | Record<string, unknown>;
2162
- toolCallId?: undefined | string;
2163
- errorText?: undefined | string;
2164
- }[];
2165
- attachments?: undefined | {
2166
- id: string;
2167
- type: "file" | "source-document";
2168
- filename?: undefined | string;
2169
- mediaType?: undefined | string;
2170
- url?: undefined | string;
2171
- title?: undefined | string;
2172
- }[];
2173
- actions?: undefined | ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
2495
+ raw?: {
2496
+ source: string;
2497
+ payload: unknown;
2498
+ };
2499
+ } | {
2500
+ type: "reasoning";
2501
+ text: string;
2502
+ label?: string;
2503
+ index?: number;
2504
+ streamId?: string;
2505
+ signature?: string;
2506
+ raw?: {
2507
+ source: string;
2508
+ payload: unknown;
2509
+ };
2510
+ } | {
2511
+ type: "tool";
2512
+ tool: {
2513
+ type: string;
2514
+ kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic";
2515
+ state: "input-streaming" | "input-available" | "output-available" | "output-error";
2516
+ input?: Record<string, unknown>;
2517
+ rawInput?: string;
2518
+ output?: Record<string, unknown>;
2519
+ toolCallId?: string;
2520
+ errorText?: string;
2521
+ raw?: {
2522
+ source: string;
2523
+ payload: unknown;
2524
+ };
2525
+ };
2526
+ raw?: {
2527
+ source: string;
2528
+ payload: unknown;
2529
+ };
2530
+ } | {
2531
+ type: "card";
2532
+ envelope: {
2533
+ type: string;
2534
+ id: string;
2535
+ data: unknown;
2536
+ title?: string;
2537
+ resolution?: {
2538
+ kind: "action";
2539
+ action: string;
2540
+ payload?: unknown;
2541
+ at?: string;
2542
+ } | {
2543
+ kind: "submit";
2544
+ data: unknown;
2545
+ at?: string;
2546
+ } | {
2547
+ kind: "dismissed";
2548
+ at?: string;
2549
+ } | {
2550
+ kind: "expired";
2551
+ reason?: string;
2552
+ at?: string;
2553
+ };
2554
+ };
2555
+ raw?: {
2556
+ source: string;
2557
+ payload: unknown;
2558
+ };
2559
+ } | {
2560
+ type: "source";
2561
+ source: {
2562
+ id?: string;
2563
+ url?: string;
2564
+ title?: string;
2565
+ snippet?: string;
2566
+ index?: number;
2567
+ };
2568
+ raw?: {
2569
+ source: string;
2570
+ payload: unknown;
2571
+ };
2572
+ } | {
2573
+ type: "file";
2574
+ attachment: {
2575
+ id: string;
2576
+ type: "file" | "source-document";
2577
+ filename?: string;
2578
+ mediaType?: string;
2579
+ url?: string;
2580
+ title?: string;
2581
+ };
2582
+ raw?: {
2583
+ source: string;
2584
+ payload: unknown;
2585
+ };
2586
+ })[];
2587
+ actions?: ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
2174
2588
  id: string;
2175
2589
  label: string;
2176
- icon?: undefined | string;
2177
- tooltip?: undefined | string;
2590
+ icon?: string;
2591
+ tooltip?: string;
2178
2592
  })[];
2179
- avatar?: undefined | {
2180
- src?: undefined | string;
2181
- fallback?: undefined | string;
2182
- alt?: undefined | string;
2593
+ avatar?: {
2594
+ src?: string;
2595
+ fallback?: string;
2596
+ alt?: string;
2183
2597
  };
2184
- feedback?: undefined | "like" | "dislike";
2598
+ feedback?: "like" | "dislike";
2185
2599
  }[];
2186
2600
  value?: string;
2187
2601
  placeholder?: string;
2188
2602
  loading?: boolean;
2189
2603
  suggestions?: string[];
2190
2604
  suggestionMode?: "submit" | "fill";
2191
- proseSize?: "sm" | "lg" | "xs" | "base";
2605
+ proseSize?: "xs" | "sm" | "base" | "lg";
2192
2606
  codeTheme?: string;
2193
2607
  codeHighlight?: boolean;
2194
2608
  chatTitle?: string;
@@ -2243,6 +2657,10 @@ export interface WorkspaceProps extends WebComponentProps {
2243
2657
  compact?: boolean;
2244
2658
  /** Suppress the built-in ConversationList so the `sidebar-header` slot owns the whole rail flex region (for apps that supply their own rail nav). Default false. Attribute: `no-conversations`. */
2245
2659
  noConversations?: boolean;
2660
+ /** Optional card type -> custom-element tag overrides/additions for `card` parts (merged over the built-ins). Property: `el.cardTypes`. Typed as a plain string map (not the `CardTagMap` alias) so the generated React wrapper inlines it instead of emitting an unresolved named type. */
2661
+ cardTypes?: Record<string, string>;
2662
+ /** JSON Schemas for the card types this app renders, keyed by envelope type. The companion of `cardTypes`, which says what DRAWS a card while this says what a VALID one looks like. An OBJECT, so it is a JS property only: `el.cardSchemas = { 'pricing-table': pricingSchema }`, never an attribute. `createCardRegistry(...).validationSchemas` is exactly this shape. Without it the kit validates its own seven built-ins and leaves your own card type, the one your app actually cares about, as the only unchecked thing on screen. A schema here WINS over a built-in of the same name. Typed `Record<string, object>` rather than `Record<string, JsonSchema>` deliberately: an imported `.json` schema widens `"type"` to `string`, and an authored one carries `$schema`/`title`/`description`/`additionalProperties`, so the tighter type would reject both of the normal ways to supply one. */
2663
+ cardSchemas?: Record<string, object>;
2246
2664
  /** A conversation was selected in the sidebar. */
2247
2665
  onConversationSelect?: (event: CustomEvent<{
2248
2666
  id: string;