@kitn.ai/ui 0.22.1 → 0.23.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 (195) hide show
  1. package/dist/{create-tween-qs-jjvNA.js → create-tween-BmBnlg25.js} +1 -1
  2. package/dist/{create-tween-COnPwAQN.js → create-tween-CTT5l1bo.js} +1 -1
  3. package/dist/{create-tween-DmTUaXWE.js → create-tween-vA7upv0h.js} +1 -1
  4. package/dist/elements/agent-card.js +1 -1
  5. package/dist/elements/artifact.js +1 -1
  6. package/dist/elements/attachments.js +1 -1
  7. package/dist/elements/audio-visualizer.js +1 -1
  8. package/dist/elements/avatar.js +1 -1
  9. package/dist/elements/badge.js +1 -1
  10. package/dist/elements/button.js +1 -1
  11. package/dist/elements/card.js +1 -1
  12. package/dist/elements/cards.js +1 -1
  13. package/dist/elements/chain-of-thought.js +1 -1
  14. package/dist/elements/chat-scope-picker.js +1 -1
  15. package/dist/elements/chat-workspace.js +1 -1
  16. package/dist/elements/chat.js +1 -1
  17. package/dist/elements/checkpoint.js +1 -1
  18. package/dist/elements/choice.js +1 -1
  19. package/dist/elements/chunks/{Icon-CHG5z5L7.js → Icon-b5A8hlHs.js} +1 -1
  20. package/dist/elements/chunks/{action-icons-BAtCEEgg.js → action-icons-DW9muWrY.js} +1 -1
  21. package/dist/elements/chunks/arrow-left-iJVnQmxA.js +1 -0
  22. package/dist/elements/chunks/{artifact-fBZOE4SO.js → artifact-BhJIuh3D.js} +1 -1
  23. package/dist/elements/chunks/{attachments-DpYMe5VQ.js → attachments-CL6TaqIb.js} +1 -1
  24. package/dist/elements/chunks/{audio-visualizer-DFwzAcuL.js → audio-visualizer-BuUqQmaO.js} +1 -1
  25. package/dist/elements/chunks/{badge-D6zodm6E.js → badge-TIMiJFKc.js} +1 -1
  26. package/dist/elements/chunks/{button-C42vrGvO.js → button-B9okqG73.js} +1 -1
  27. package/dist/elements/chunks/{card-renderer-DMZsSuvU.js → card-renderer-aNA0WRFH.js} +1 -1
  28. package/dist/elements/chunks/{chat-thread-CNNEhol-.js → chat-thread-DN9evldr.js} +1 -1
  29. package/dist/elements/chunks/check-MdLzbxrm.js +1 -0
  30. package/dist/elements/chunks/chevron-down-MK7IzDqe.js +1 -0
  31. package/dist/elements/chunks/chevron-right-C5jXhmtV.js +1 -0
  32. package/dist/elements/chunks/{choice-card-YoWjpsFV.js → choice-card-kNsjU2m8.js} +1 -1
  33. package/dist/elements/chunks/circle-BG7VkPep.js +1 -0
  34. package/dist/elements/chunks/circle-check-GqvO2UBs.js +1 -0
  35. package/dist/elements/chunks/{circle-x-QIxXda6k.js → circle-x-mhH7pOK2.js} +1 -1
  36. package/dist/elements/chunks/{code-block-CqeugReY.js → code-block-ClhQO9RW.js} +1 -1
  37. package/dist/elements/chunks/{collapsible-sTv-_5lF.js → collapsible-DBcBkFPh.js} +1 -1
  38. package/dist/elements/chunks/{composer-ldQyeVEB.js → composer-CZZmtYOT.js} +1 -1
  39. package/dist/elements/chunks/{confirm-card-C0RNOwfn.js → confirm-card-CEvFmVhz.js} +1 -1
  40. package/dist/elements/chunks/{context-5qgypNHC.js → context-hKjNqiyQ.js} +1 -1
  41. package/dist/elements/chunks/{conversation-list-DLzOacXz.js → conversation-list-CsGJjSKG.js} +1 -1
  42. package/dist/elements/chunks/{create-tween-V4TXZ93X.js → create-tween-CUrM6D_o.js} +1 -1
  43. package/dist/elements/chunks/{default-input-DeeRSDHc.js → default-input-B1Mem5wu.js} +1 -1
  44. package/dist/elements/chunks/{define-lE-QvQFn.js → define-B_tXMYRm.js} +1 -1
  45. package/dist/elements/chunks/{disclosure-DZSa9jog.js → disclosure-DAoYOKew.js} +1 -1
  46. package/dist/elements/chunks/{download-B2ZmnGqW.js → download-DnCyWFJE.js} +1 -1
  47. package/dist/elements/chunks/{dropdown-R3B7cSRE.js → dropdown-CmNna5lT.js} +1 -1
  48. package/dist/elements/chunks/{ellipsis-BmxceY4l.js → ellipsis-CVxqfsDZ.js} +1 -1
  49. package/dist/elements/chunks/{embed-BVrtTZPo.js → embed-CjAD2jSi.js} +1 -1
  50. package/dist/elements/chunks/{external-link-BbdR7YO7.js → external-link-DG2sRdQL.js} +1 -1
  51. package/dist/elements/chunks/{file-text-D7dijo1A.js → file-text-D0J9F6M7.js} +1 -1
  52. package/dist/elements/chunks/file-tree-yGWNK0Js.js +1 -0
  53. package/dist/elements/chunks/{folder-D8z58t7B.js → folder-NV1pi_ud.js} +1 -1
  54. package/dist/elements/chunks/{form-p5BKJNw5.js → form-lUuJjz6s.js} +1 -1
  55. package/dist/elements/chunks/{hover-card-CN9s2md5.js → hover-card-6KtXpLwT.js} +1 -1
  56. package/dist/elements/chunks/{icon-CNiKP37E.js → icon-97R8SR2p.js} +1 -1
  57. package/dist/elements/chunks/{info-BSnuJiHI.js → info-C8r5Q6cc.js} +1 -1
  58. package/dist/elements/chunks/{input-BauDmzxX.js → input-DrseEjhp.js} +1 -1
  59. package/dist/elements/chunks/{kbd-BlHJaP9b.js → kbd-OGJDUT-O.js} +1 -1
  60. package/dist/elements/chunks/{link-DEi5iUWC.js → link-BdsfLB7b.js} +1 -1
  61. package/dist/elements/chunks/{link-preview-BaHyM6W4.js → link-preview-C9-jNJBf.js} +1 -1
  62. package/dist/elements/chunks/{loader-CmJG_Fkq.js → loader-B5QzK_8_.js} +1 -1
  63. package/dist/elements/chunks/{markdown-D2jaMpCN.js → markdown-BpAHnBJz.js} +1 -1
  64. package/dist/elements/chunks/{message-C5UfXZ2Z.js → message-CoqLuLkd.js} +1 -1
  65. package/dist/elements/chunks/{message-CXWLmmLn.js → message-_oYx5mk1.js} +1 -1
  66. package/dist/elements/chunks/message-square-C9ovmtOo.js +1 -0
  67. package/dist/elements/chunks/{minimize-2-C9ytZFMU.js → minimize-2-SegJ_oku.js} +1 -1
  68. package/dist/elements/chunks/{model-switcher-CivGfD7-.js → model-switcher-D7JrFFHp.js} +1 -1
  69. package/dist/elements/chunks/{overlay-DJL_sbOm.js → overlay-CV7z2YuX.js} +1 -1
  70. package/dist/elements/chunks/{paperclip-CFaB8naM.js → paperclip-Bg0ITU3b.js} +1 -1
  71. package/dist/elements/chunks/{progress-bar-Br5SksfR.js → progress-bar-D1_rzt6N.js} +1 -1
  72. package/dist/elements/chunks/{prompt-suggestion-CMIvtAhU.js → prompt-suggestion-D5Sm8xF1.js} +1 -1
  73. package/dist/elements/chunks/{reasoning-DpZcNzLq.js → reasoning-D26Bb4p6.js} +1 -1
  74. package/dist/elements/chunks/{resizable-Q8i3T9a_.js → resizable-Dpzjlvp4.js} +1 -1
  75. package/dist/elements/chunks/{rotate-cw-B5IHCBFV.js → rotate-cw-DzVDJOA1.js} +1 -1
  76. package/dist/elements/chunks/{scroll-area-eLeydBje.js → scroll-area-93A1bbeG.js} +1 -1
  77. package/dist/elements/chunks/{scroll-button-DWbz0yA1.js → scroll-button-CrTo7wm4.js} +1 -1
  78. package/dist/elements/chunks/{separator-Xic78AD_.js → separator-DH2r_ZSZ.js} +1 -1
  79. package/dist/elements/chunks/{settings-B8H51pAx.js → settings-BFMOd6yB.js} +1 -1
  80. package/dist/elements/chunks/{settings-group-CsG9eYLe.js → settings-group-B3VZKIcz.js} +1 -1
  81. package/dist/elements/chunks/{share-CNTx0z__.js → share-DgNbkJKY.js} +1 -1
  82. package/dist/elements/chunks/{skeleton-CLlHTcMI.js → skeleton-N8BuWYmf.js} +1 -1
  83. package/dist/elements/chunks/{source-BoVcU5ok.js → source-eJurW_-L.js} +1 -1
  84. package/dist/elements/chunks/{star-CxQVTVhI.js → star-DHvACxtm.js} +1 -1
  85. package/dist/elements/chunks/{store-CLtS5CUG.js → store-HIPGhNz9.js} +1 -1
  86. package/dist/elements/chunks/{tasks-card-CzlkLmUt.js → tasks-card-CfqrkoVO.js} +1 -1
  87. package/dist/elements/chunks/{text-shimmer-D5NhpIQ1.js → text-shimmer-BY_rI3s5.js} +1 -1
  88. package/dist/elements/chunks/{textarea-x5Uxsmtm.js → textarea-DPfuhswM.js} +1 -1
  89. package/dist/elements/chunks/{thumbs-up-UobcJnx9.js → thumbs-up-DQe0hvkZ.js} +1 -1
  90. package/dist/elements/chunks/{toast-store-BOfs9eXq.js → toast-store-VUZZBhzH.js} +1 -1
  91. package/dist/elements/chunks/{tool-Be6Dh_dt.js → tool-C1YtxwPu.js} +1 -1
  92. package/dist/elements/chunks/{tooltip-RxMxyCLF.js → tooltip-BqwnFWhn.js} +1 -1
  93. package/dist/elements/chunks/{triangle-alert-C4yxH2XN.js → triangle-alert-B6or7F5u.js} +1 -1
  94. package/dist/elements/chunks/{use-card-resolution-jva9ehH6.js → use-card-resolution-DJg32jGH.js} +1 -1
  95. package/dist/elements/chunks/{variant-aurora-Dx4VRcjS.js → variant-aurora-QXTZPyST.js} +1 -1
  96. package/dist/elements/chunks/{variant-custom-Y1ZTWgEa.js → variant-custom-D5ZlmziF.js} +1 -1
  97. package/dist/elements/chunks/{variant-wave-B9gml9Cg.js → variant-wave-DDCwhLas.js} +1 -1
  98. package/dist/elements/chunks/{video-CrPHsytT.js → video-Bb86fVYI.js} +1 -1
  99. package/dist/elements/chunks/x-BOhjBeOd.js +1 -0
  100. package/dist/elements/coachmark.js +1 -1
  101. package/dist/elements/code-block.js +1 -1
  102. package/dist/elements/command.js +1 -1
  103. package/dist/elements/compare.js +1 -1
  104. package/dist/elements/composer.js +1 -1
  105. package/dist/elements/confirm-card.js +1 -1
  106. package/dist/elements/context-meter.js +1 -1
  107. package/dist/elements/conversation-list.js +1 -1
  108. package/dist/elements/dialog.js +1 -1
  109. package/dist/elements/editable-label.js +1 -1
  110. package/dist/elements/embed.js +1 -1
  111. package/dist/elements/empty.js +1 -1
  112. package/dist/elements/feedback-bar.js +1 -1
  113. package/dist/elements/file-tree.js +1 -1
  114. package/dist/elements/file-upload.js +1 -1
  115. package/dist/elements/form.js +1 -1
  116. package/dist/elements/hover-card.js +1 -1
  117. package/dist/elements/icon.js +1 -1
  118. package/dist/elements/image.js +1 -1
  119. package/dist/elements/input.js +1 -1
  120. package/dist/elements/kbd.js +1 -1
  121. package/dist/elements/link-preview.js +1 -1
  122. package/dist/elements/loader.js +1 -1
  123. package/dist/elements/markdown.js +1 -1
  124. package/dist/elements/menu.js +1 -1
  125. package/dist/elements/message-skills.js +1 -1
  126. package/dist/elements/message.js +1 -1
  127. package/dist/elements/model-switcher.js +1 -1
  128. package/dist/elements/nav.js +1 -1
  129. package/dist/elements/notice.js +1 -1
  130. package/dist/elements/pane-group.js +1 -1
  131. package/dist/elements/pane.js +1 -1
  132. package/dist/elements/popover.js +1 -1
  133. package/dist/elements/progress-bar.js +1 -1
  134. package/dist/elements/prompt-dock.js +1 -1
  135. package/dist/elements/prompt-input.js +1 -1
  136. package/dist/elements/prompt-suggestions.js +1 -1
  137. package/dist/elements/reasoning.js +1 -1
  138. package/dist/elements/remote.js +1 -1
  139. package/dist/elements/resizable.js +1 -1
  140. package/dist/elements/response-stream.js +1 -1
  141. package/dist/elements/screen.js +1 -1
  142. package/dist/elements/scroll-area.js +1 -1
  143. package/dist/elements/scroll-button.js +1 -1
  144. package/dist/elements/search.js +1 -1
  145. package/dist/elements/segmented.js +1 -1
  146. package/dist/elements/separator.js +1 -1
  147. package/dist/elements/setting-item.js +1 -1
  148. package/dist/elements/settings-group.js +1 -1
  149. package/dist/elements/skeleton.js +1 -1
  150. package/dist/elements/source.js +1 -1
  151. package/dist/elements/status.js +1 -1
  152. package/dist/elements/switch.js +1 -1
  153. package/dist/elements/tabs.js +1 -1
  154. package/dist/elements/tasks.js +1 -1
  155. package/dist/elements/text-shimmer.js +1 -1
  156. package/dist/elements/thinking-bar.js +1 -1
  157. package/dist/elements/thread.js +1 -1
  158. package/dist/elements/toast.js +1 -1
  159. package/dist/elements/tool.js +1 -1
  160. package/dist/elements/tooltip.js +1 -1
  161. package/dist/elements/voice-input.js +1 -1
  162. package/dist/elements/voice-output.js +1 -1
  163. package/dist/index.js +1423 -1425
  164. package/dist/index.server.js +1212 -1214
  165. package/dist/kai.es.js +1 -1
  166. package/dist/mcp.es.js +376 -118
  167. package/dist/{register-impl-AxIlqjo7.js → register-impl-C96AnOJn.js} +18 -18
  168. package/dist/{solid-Dt2nEwfl.js → solid-BuqWLn6x.js} +1034 -1036
  169. package/dist/{solid-BGYSJyHG.js → solid-C76UXJuy.js} +1719 -1721
  170. package/dist/solid.js +1 -1
  171. package/dist/solid.server.js +1 -1
  172. package/dist/{variant-aurora-Ds5ou9BH.js → variant-aurora-CD35fdJF.js} +2 -2
  173. package/dist/{variant-aurora-B44X69AG.js → variant-aurora-Dau5Z4yR.js} +1 -1
  174. package/dist/{variant-aurora-BRhV8Flk.js → variant-aurora-Dc-2RVH9.js} +2 -2
  175. package/dist/{variant-custom-D6Rtvneb.js → variant-custom-CHr_jbMU.js} +2 -2
  176. package/dist/{variant-custom-B20FhtYj.js → variant-custom-Cyu8zx4A.js} +2 -2
  177. package/dist/{variant-custom-BvA1Schl.js → variant-custom-Df7QvXyZ.js} +1 -1
  178. package/dist/{variant-wave-DXC6_LcH.js → variant-wave-BkVpxkVF.js} +2 -2
  179. package/dist/{variant-wave-BUQtkryq.js → variant-wave-CXcaP_9W.js} +1 -1
  180. package/dist/{variant-wave-BVYnqy9L.js → variant-wave-DcGqjVnK.js} +2 -2
  181. package/package.json +5 -2
  182. package/src/agent-tooling/integrations/vercel-ai-sdk.ts +255 -14
  183. package/src/agent-tooling/mcp/tools/scaffold.ts +30 -188
  184. package/src/agent-tooling/route-emit.ts +281 -0
  185. package/src/components/file-tree.tsx +7 -3
  186. package/src/elements/compiled.css +1 -1
  187. package/dist/elements/chunks/arrow-left-CFPTeL1Y.js +0 -1
  188. package/dist/elements/chunks/check-7Q3K-iXE.js +0 -1
  189. package/dist/elements/chunks/chevron-down-CpNYLn7E.js +0 -1
  190. package/dist/elements/chunks/chevron-right-DrH85Fha.js +0 -1
  191. package/dist/elements/chunks/circle-C9KRjKYv.js +0 -1
  192. package/dist/elements/chunks/circle-check-Dmi7Y4zw.js +0 -1
  193. package/dist/elements/chunks/file-tree-0upJ5jeb.js +0 -1
  194. package/dist/elements/chunks/message-square-hXylwsy0.js +0 -1
  195. package/dist/elements/chunks/x-_-OPHept.js +0 -1
package/dist/solid.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as e, a as t, b as o, d as r, e as n, f as i, g as c, h as d, i as C, j as l, k as b, l as g, m, n as u, B as p, o as T, p as h, q as A, r as R, t as S, u as I, v as E, x as P, y as v, z as D, D as f, E as x, F as L, G as k, H as w, I as _, J as M, K as O, L as y, M as B, N as F, M as H, O as N, P as z, Q as V, R as U, S as G, T as Y, U as K, V as W, W as j, X as q, Y as J, Z as Q, _ as X, $ as Z, a0 as $, a1 as aa, a2 as sa, a3 as ea, a4 as ta, a5 as oa, a6 as ra, a7 as na, a8 as ia, a9 as ca, aa as da, ab as Ca, ac as la, ad as ba, ae as ga, af as ma, ag as ua, ah as pa, ai as Ta, aj as ha, ak as Aa, al as Ra, am as Sa, an as Ia, ao as Ea, ap as Pa, aq as va, ar as Da, as as fa, at as xa, au as La, av as ka, aw as wa, ax as _a, ay as Ma, az as Oa, aA as ya, aB as Ba, aC as Fa, aD as Ha, aE as Na, aF as za, aG as Va, aH as Ua, aI as Ga, aJ as Ya, aK as Ka, aL as Wa, aM as ja, aN as qa, aO as Ja, aP as Qa, aQ as Xa, aR as Za, aS as $a, aT as as, aU as ss, aV as es, aW as ts, aX as os, aY as rs, aZ as ns, a_ as is, a$ as cs, b0 as ds, b1 as Cs, b2 as ls, b3 as bs, b4 as gs, b5 as ms, b6 as us, b7 as ps, b8 as Ts, b9 as hs, ba as As, bb as Rs, bc as Ss, bd as Is, be as Es, bf as Ps, bg as vs, bh as Ds, bi as fs, bj as xs, bk as Ls, bl as ks, bm as ws, bn as _s, bo as Ms, bp as Os, bq as ys, br as Bs, bs as Fs, bt as Hs, bu as Ns, bv as zs, bw as Vs, bx as Us, by as Gs, bz as Ys, bA as Ks, bB as Ws, bC as js, bD as qs, bE as Js, bF as Qs, bG as Xs, bH as Zs, bI as $s, bJ as ae, bK as se, bL as ee, bM as te, bN as oe, bO as re, bP as ne, bQ as ie, bR as ce, bS as de, bT as Ce, bU as le, bV as be, bW as ge, bX as me, bY as ue, bZ as pe, b_ as Te, b$ as he, c0 as Ae, c1 as Re, c2 as Se, c3 as Ie, c4 as Ee, c5 as Pe, c6 as ve, c as De, c7 as fe, c8 as xe, c9 as Le, ca as ke, cb as we, cc as _e, cd as Me, ce as Oe, cf as ye, cg as Be, ch as Fe, ci as He, cj as Ne, ck as ze, cl as Ve, cm as Ue, cn as Ge, co as Ye, cp as Ke, cq as We, cr as je, cs as qe, ct as Je, cu as Qe, cv as Xe, cw as Ze, cx as $e, cy as at, cz as st, cA as et, cB as tt, cC as ot, cD as rt, cE as nt, cF as it, cG as ct, cH as dt, cI as Ct, cJ as lt, cK as bt, cL as gt, cM as mt, cN as ut, cO as pt, cP as Tt, cQ as ht, cR as At, cS as Rt, cT as St, cU as It, cV as Et, cW as Pt, cX as vt, cY as Dt, cZ as ft, c_ as xt, c$ as Lt, d0 as kt, d1 as wt, d2 as _t, d3 as Mt, d4 as Ot, d5 as yt, d6 as Bt, d7 as Ft, d8 as Ht, d9 as Nt, da as zt, db as Vt, dc as Ut, dd as Gt } from "./solid-BGYSJyHG.js";
1
+ import { A as e, a as t, b as o, d as r, e as n, f as i, g as c, h as d, i as C, j as l, k as b, l as g, m, n as u, B as p, o as T, p as h, q as A, r as R, t as S, u as I, v as E, x as P, y as v, z as D, D as f, E as x, F as L, G as k, H as w, I as _, J as M, K as O, L as y, M as B, N as F, M as H, O as N, P as z, Q as V, R as U, S as G, T as Y, U as K, V as W, W as j, X as q, Y as J, Z as Q, _ as X, $ as Z, a0 as $, a1 as aa, a2 as sa, a3 as ea, a4 as ta, a5 as oa, a6 as ra, a7 as na, a8 as ia, a9 as ca, aa as da, ab as Ca, ac as la, ad as ba, ae as ga, af as ma, ag as ua, ah as pa, ai as Ta, aj as ha, ak as Aa, al as Ra, am as Sa, an as Ia, ao as Ea, ap as Pa, aq as va, ar as Da, as as fa, at as xa, au as La, av as ka, aw as wa, ax as _a, ay as Ma, az as Oa, aA as ya, aB as Ba, aC as Fa, aD as Ha, aE as Na, aF as za, aG as Va, aH as Ua, aI as Ga, aJ as Ya, aK as Ka, aL as Wa, aM as ja, aN as qa, aO as Ja, aP as Qa, aQ as Xa, aR as Za, aS as $a, aT as as, aU as ss, aV as es, aW as ts, aX as os, aY as rs, aZ as ns, a_ as is, a$ as cs, b0 as ds, b1 as Cs, b2 as ls, b3 as bs, b4 as gs, b5 as ms, b6 as us, b7 as ps, b8 as Ts, b9 as hs, ba as As, bb as Rs, bc as Ss, bd as Is, be as Es, bf as Ps, bg as vs, bh as Ds, bi as fs, bj as xs, bk as Ls, bl as ks, bm as ws, bn as _s, bo as Ms, bp as Os, bq as ys, br as Bs, bs as Fs, bt as Hs, bu as Ns, bv as zs, bw as Vs, bx as Us, by as Gs, bz as Ys, bA as Ks, bB as Ws, bC as js, bD as qs, bE as Js, bF as Qs, bG as Xs, bH as Zs, bI as $s, bJ as ae, bK as se, bL as ee, bM as te, bN as oe, bO as re, bP as ne, bQ as ie, bR as ce, bS as de, bT as Ce, bU as le, bV as be, bW as ge, bX as me, bY as ue, bZ as pe, b_ as Te, b$ as he, c0 as Ae, c1 as Re, c2 as Se, c3 as Ie, c4 as Ee, c5 as Pe, c6 as ve, c as De, c7 as fe, c8 as xe, c9 as Le, ca as ke, cb as we, cc as _e, cd as Me, ce as Oe, cf as ye, cg as Be, ch as Fe, ci as He, cj as Ne, ck as ze, cl as Ve, cm as Ue, cn as Ge, co as Ye, cp as Ke, cq as We, cr as je, cs as qe, ct as Je, cu as Qe, cv as Xe, cw as Ze, cx as $e, cy as at, cz as st, cA as et, cB as tt, cC as ot, cD as rt, cE as nt, cF as it, cG as ct, cH as dt, cI as Ct, cJ as lt, cK as bt, cL as gt, cM as mt, cN as ut, cO as pt, cP as Tt, cQ as ht, cR as At, cS as Rt, cT as St, cU as It, cV as Et, cW as Pt, cX as vt, cY as Dt, cZ as ft, c_ as xt, c$ as Lt, d0 as kt, d1 as wt, d2 as _t, d3 as Mt, d4 as Ot, d5 as yt, d6 as Bt, d7 as Ft, d8 as Ht, d9 as Nt, da as zt, db as Vt, dc as Ut, dd as Gt } from "./solid-C76UXJuy.js";
2
2
  export {
3
3
  e as AgentCard,
4
4
  t as Artifact,
@@ -1,4 +1,4 @@
1
- import { A as e, a as t, b as o, d as r, e as n, f as i, g as c, h as d, i as C, j as l, k as b, l as g, m, n as u, B as p, o as T, p as h, q as A, r as R, t as S, u as I, v as E, x as P, y as v, z as D, D as f, E as x, F as L, G as k, H as w, I as _, J as M, K as O, L as y, M as B, N as F, M as H, O as N, P as z, Q as V, R as U, S as G, T as Y, U as K, V as W, W as j, X as q, Y as J, Z as Q, _ as X, $ as Z, a0 as $, a1 as aa, a2 as sa, a3 as ea, a4 as ta, a5 as oa, a6 as ra, a7 as na, a8 as ia, a9 as ca, aa as da, ab as Ca, ac as la, ad as ba, ae as ga, af as ma, ag as ua, ah as pa, ai as Ta, aj as ha, ak as Aa, al as Ra, am as Sa, an as Ia, ao as Ea, ap as Pa, aq as va, ar as Da, as as fa, at as xa, au as La, av as ka, aw as wa, ax as _a, ay as Ma, az as Oa, aA as ya, aB as Ba, aC as Fa, aD as Ha, aE as Na, aF as za, aG as Va, aH as Ua, aI as Ga, aJ as Ya, aK as Ka, aL as Wa, aM as ja, aN as qa, aO as Ja, aP as Qa, aQ as Xa, aR as Za, aS as $a, aT as as, aU as ss, aV as es, aW as ts, aX as os, aY as rs, aZ as ns, a_ as is, a$ as cs, b0 as ds, b1 as Cs, b2 as ls, b3 as bs, b4 as gs, b5 as ms, b6 as us, b7 as ps, b8 as Ts, b9 as hs, ba as As, bb as Rs, bc as Ss, bd as Is, be as Es, bf as Ps, bg as vs, bh as Ds, bi as fs, bj as xs, bk as Ls, bl as ks, bm as ws, bn as _s, bo as Ms, bp as Os, bq as ys, br as Bs, bs as Fs, bt as Hs, bu as Ns, bv as zs, bw as Vs, bx as Us, by as Gs, bz as Ys, bA as Ks, bB as Ws, bC as js, bD as qs, bE as Js, bF as Qs, bG as Xs, bH as Zs, bI as $s, bJ as ae, bK as se, bL as ee, bM as te, bN as oe, bO as re, bP as ne, bQ as ie, bR as ce, bS as de, bT as Ce, bU as le, bV as be, bW as ge, bX as me, bY as ue, bZ as pe, b_ as Te, b$ as he, c0 as Ae, c1 as Re, c2 as Se, c3 as Ie, c4 as Ee, c5 as Pe, c6 as ve, c as De, c7 as fe, c8 as xe, c9 as Le, ca as ke, cb as we, cc as _e, cd as Me, ce as Oe, cf as ye, cg as Be, ch as Fe, ci as He, cj as Ne, ck as ze, cl as Ve, cm as Ue, cn as Ge, co as Ye, cp as Ke, cq as We, cr as je, cs as qe, ct as Je, cu as Qe, cv as Xe, cw as Ze, cx as $e, cy as at, cz as st, cA as et, cB as tt, cC as ot, cD as rt, cE as nt, cF as it, cG as ct, cH as dt, cI as Ct, cJ as lt, cK as bt, cL as gt, cM as mt, cN as ut, cO as pt, cP as Tt, cQ as ht, cR as At, cS as Rt, cT as St, cU as It, cV as Et, cW as Pt, cX as vt, cY as Dt, cZ as ft, c_ as xt, c$ as Lt, d0 as kt, d1 as wt, d2 as _t, d3 as Mt, d4 as Ot, d5 as yt, d6 as Bt, d7 as Ft, d8 as Ht, d9 as Nt, da as zt, db as Vt, dc as Ut, dd as Gt } from "./solid-Dt2nEwfl.js";
1
+ import { A as e, a as t, b as o, d as r, e as n, f as i, g as c, h as d, i as C, j as l, k as b, l as g, m, n as u, B as p, o as T, p as h, q as A, r as R, t as S, u as I, v as E, x as P, y as v, z as D, D as f, E as x, F as L, G as k, H as w, I as _, J as M, K as O, L as y, M as B, N as F, M as H, O as N, P as z, Q as V, R as U, S as G, T as Y, U as K, V as W, W as j, X as q, Y as J, Z as Q, _ as X, $ as Z, a0 as $, a1 as aa, a2 as sa, a3 as ea, a4 as ta, a5 as oa, a6 as ra, a7 as na, a8 as ia, a9 as ca, aa as da, ab as Ca, ac as la, ad as ba, ae as ga, af as ma, ag as ua, ah as pa, ai as Ta, aj as ha, ak as Aa, al as Ra, am as Sa, an as Ia, ao as Ea, ap as Pa, aq as va, ar as Da, as as fa, at as xa, au as La, av as ka, aw as wa, ax as _a, ay as Ma, az as Oa, aA as ya, aB as Ba, aC as Fa, aD as Ha, aE as Na, aF as za, aG as Va, aH as Ua, aI as Ga, aJ as Ya, aK as Ka, aL as Wa, aM as ja, aN as qa, aO as Ja, aP as Qa, aQ as Xa, aR as Za, aS as $a, aT as as, aU as ss, aV as es, aW as ts, aX as os, aY as rs, aZ as ns, a_ as is, a$ as cs, b0 as ds, b1 as Cs, b2 as ls, b3 as bs, b4 as gs, b5 as ms, b6 as us, b7 as ps, b8 as Ts, b9 as hs, ba as As, bb as Rs, bc as Ss, bd as Is, be as Es, bf as Ps, bg as vs, bh as Ds, bi as fs, bj as xs, bk as Ls, bl as ks, bm as ws, bn as _s, bo as Ms, bp as Os, bq as ys, br as Bs, bs as Fs, bt as Hs, bu as Ns, bv as zs, bw as Vs, bx as Us, by as Gs, bz as Ys, bA as Ks, bB as Ws, bC as js, bD as qs, bE as Js, bF as Qs, bG as Xs, bH as Zs, bI as $s, bJ as ae, bK as se, bL as ee, bM as te, bN as oe, bO as re, bP as ne, bQ as ie, bR as ce, bS as de, bT as Ce, bU as le, bV as be, bW as ge, bX as me, bY as ue, bZ as pe, b_ as Te, b$ as he, c0 as Ae, c1 as Re, c2 as Se, c3 as Ie, c4 as Ee, c5 as Pe, c6 as ve, c as De, c7 as fe, c8 as xe, c9 as Le, ca as ke, cb as we, cc as _e, cd as Me, ce as Oe, cf as ye, cg as Be, ch as Fe, ci as He, cj as Ne, ck as ze, cl as Ve, cm as Ue, cn as Ge, co as Ye, cp as Ke, cq as We, cr as je, cs as qe, ct as Je, cu as Qe, cv as Xe, cw as Ze, cx as $e, cy as at, cz as st, cA as et, cB as tt, cC as ot, cD as rt, cE as nt, cF as it, cG as ct, cH as dt, cI as Ct, cJ as lt, cK as bt, cL as gt, cM as mt, cN as ut, cO as pt, cP as Tt, cQ as ht, cR as At, cS as Rt, cT as St, cU as It, cV as Et, cW as Pt, cX as vt, cY as Dt, cZ as ft, c_ as xt, c$ as Lt, d0 as kt, d1 as wt, d2 as _t, d3 as Mt, d4 as Ot, d5 as yt, d6 as Bt, d7 as Ft, d8 as Ht, d9 as Nt, da as zt, db as Vt, dc as Ut, dd as Gt } from "./solid-BuqWLn6x.js";
2
2
  export {
3
3
  e as AgentCard,
4
4
  t as Artifact,
@@ -1,7 +1,7 @@
1
1
  import { ssr as b, ssrAttribute as h, escape as l, ssrStyleProperty as d, createComponent as w } from "solid-js/web";
2
2
  import { createEffect as u, createSignal as R, onCleanup as A } from "solid-js";
3
- import { c, S, h as _, D as k } from "./create-tween-COnPwAQN.js";
4
- import { C } from "./solid-Dt2nEwfl.js";
3
+ import { c, S, h as _, D as k } from "./create-tween-CTT5l1bo.js";
4
+ import { C } from "./solid-BuqWLn6x.js";
5
5
  const T = `
6
6
  const float PI = 3.14159265359;
7
7
  // Strand phase span: 0.5 + pi (fact sheet section 2's "sigma", the
@@ -1,4 +1,4 @@
1
- import{i as x,s as y,c as b,a as w,C as R,t as A}from"./register-impl-AxIlqjo7.js";import{d as u,j as S,b as _,f as k,o as M}from"./kai.es.js";import{c as n,h as T,S as W,D as C}from"./create-tween-qs-jjvNA.js";const q=`
1
+ import{i as x,s as y,c as b,a as w,C as R,t as A}from"./register-impl-C96AnOJn.js";import{d as u,j as S,b as _,f as k,o as M}from"./kai.es.js";import{c as n,h as T,S as W,D as C}from"./create-tween-BmBnlg25.js";const q=`
2
2
  const float PI = 3.14159265359;
3
3
  // Strand phase span: 0.5 + pi (fact sheet section 2's "sigma", the
4
4
  // midpoint of the interval [1, 2*pi] with the interpolation knob fixed
@@ -1,7 +1,7 @@
1
1
  import { insert as x, createComponent as y, effect as b, setAttribute as w, className as R, setStyleProperty as A, template as S } from "solid-js/web";
2
2
  import { createEffect as u, createSignal as k, onCleanup as C } from "solid-js";
3
- import { c as l, S as T, h as _, D as M } from "./create-tween-DmTUaXWE.js";
4
- import { C as W } from "./solid-BGYSJyHG.js";
3
+ import { c as l, S as T, h as _, D as M } from "./create-tween-vA7upv0h.js";
4
+ import { C as W } from "./solid-C76UXJuy.js";
5
5
  const z = `
6
6
  const float PI = 3.14159265359;
7
7
  // Strand phase span: 0.5 + pi (fact sheet section 2's "sigma", the
@@ -1,7 +1,7 @@
1
1
  import { createComponent as d, insert as A, effect as m, setAttribute as c, className as y, style as b, template as C } from "solid-js/web";
2
2
  import { createEffect as g, createMemo as E, Show as x } from "solid-js";
3
- import { c as S, D as N, S as k, h as w } from "./create-tween-DmTUaXWE.js";
4
- import { s as M, C as T } from "./solid-BGYSJyHG.js";
3
+ import { c as S, D as N, S as k, h as w } from "./create-tween-vA7upv0h.js";
4
+ import { s as M, C as T } from "./solid-C76UXJuy.js";
5
5
  var h = /* @__PURE__ */ C("<div>");
6
6
  const O = {
7
7
  "1f": !0,
@@ -1,7 +1,7 @@
1
1
  import { createComponent as c, ssr as m, ssrAttribute as o, escape as u, ssrStyle as d } from "solid-js/web";
2
2
  import { createEffect as v, createMemo as g, Show as y } from "solid-js";
3
- import { c as b, D as x, S as $, h as S } from "./create-tween-COnPwAQN.js";
4
- import { s as z, C as A } from "./solid-Dt2nEwfl.js";
3
+ import { c as b, D as x, S as $, h as S } from "./create-tween-CTT5l1bo.js";
4
+ import { s as z, C as A } from "./solid-BuqWLn6x.js";
5
5
  var h = ["<div", ' style="', '"></div>'], C = ["<div", ' style="', '">', "</div>"];
6
6
  const E = {
7
7
  "1f": !0,
@@ -1 +1 @@
1
- import{b as k,i as w,s as d,c,d as m,t as S,C as M}from"./register-impl-AxIlqjo7.js";import{d as h,c as A,j as y,S as g,b as p}from"./kai.es.js";import{c as x,S as N,h as j,D as C}from"./create-tween-qs-jjvNA.js";var b=S("<div>");const E={"1f":!0,"1i":!0,"1fv":!0,"2f":!0,"3f":!0,"3fv":!0,"4f":!0,"4fv":!0,Matrix2fv:!0,Matrix3fv:!0,Matrix4fv:!0},V=new Set(["1f","1i"]),F={"2f":2,"3f":3,"4f":4,Matrix2fv:4,Matrix3fv:9,Matrix4fv:16};function O(r,e){if(e==null||typeof e!="object")return`uniform "${r}" is not a valid declaration (expected an object with "type" and "value").`;if(E[e.type]!==!0)return`uniform "${r}" has an unrecognized type "${String(e.type)}".`;if(V.has(e.type))return typeof e.value!="number"||!Number.isFinite(e.value)?`uniform "${r}" is declared "${e.type}" (a number) but its value is not a finite number.`:void 0;if(!Array.isArray(e.value)||e.value.some(s=>typeof s!="number"||!Number.isFinite(s)))return`uniform "${r}" is declared "${e.type}" (an array) but its value is not an array of finite numbers.`;const o=F[e.type];if(o!==void 0&&e.value.length!==o)return`uniform "${r}" is declared "${e.type}", which takes exactly ${o} numbers, but its value has ${e.value.length}.`}function $(r,e){const o=r.bands.length?r.bands:[0],s={uColor:{type:"3fv",value:j(r.color)},uIntensity:{type:"1f",value:r.intensity},uSpeed:{type:"1f",value:r.speed},uComplexity:{type:"1f",value:r.complexity},uVolume:{type:"1f",value:r.volume},uBands:{type:"1fv",value:o,arraySize:o.length}};if(!e)return s;for(const[l,v]of Object.entries(e)){const t=O(l,v);if(t)throw new Error(t)}return{...s,...e}}function U(r){const e=x(.3),o=x(1);h(()=>{const t=k(r.state);if(r.state==="speaking")e.to(.3+.7*r.volume,{duration:0});else{const a=r.frozen?{duration:0}:{duration:.5,ease:"easeOut"};e.to(Array.isArray(t.intensity)&&r.frozen?t.intensity[0]:t.intensity,a)}o.to(r.frozen?0:t.speed,{duration:0})});const s=A(()=>{var t;try{return{uniforms:$({color:r.color??C,intensity:e.value(),speed:o.value(),complexity:r.complexity??.5,volume:r.volume,bands:r.bands},(t=r.shader)==null?void 0:t.uniforms)}}catch(a){return{error:a instanceof Error?a.message:String(a)}}});let l=!1;h(()=>{const{error:t}=s();if(!t){l=!1;return}l||(l=!0,console.error(`<kai-audio-visualizer variant="custom">: ${t}`),r.onUnavailable())});const v=()=>({height:`${M[r.size]}px`,"aspect-ratio":"1"});return y(g,{get when(){var t;return(t=r.shader)==null?void 0:t.fragment},get fallback(){return(()=>{var t=b();return p(a=>{var n=r.state,i=r.class,u=v();return n!==a.e&&d(t,"data-kai-state",a.e=n),i!==a.t&&c(t,a.t=i),a.a=m(t,u,a.a),a},{e:void 0,t:void 0,a:void 0}),t})()},children:t=>y(g,{get when(){return s().uniforms},get fallback(){return(()=>{var a=b();return p(n=>{var i=r.state,u=r.class,f=v();return i!==n.e&&d(a,"data-kai-state",n.e=i),u!==n.t&&c(a,n.t=u),n.a=m(a,f,n.a),n},{e:void 0,t:void 0,a:void 0}),a})()},children:a=>(()=>{var n=b();return w(n,y(N,{get fragment(){return t()},get precision(){return r.size==="icon"||r.size==="sm"?"mediump":"highp"},get uniforms(){return a()},get animateWhenNotVisible(){return r.animateWhenNotVisible},onError:i=>{/not available/i.test(i)?console.warn('<kai-audio-visualizer variant="custom">: shader unavailable',i):console.error('<kai-audio-visualizer variant="custom">: shader error',i),r.onUnavailable()}})),p(i=>{var u=r.state,f=r.class,z=v();return u!==i.e&&d(n,"data-kai-state",i.e=u),f!==i.t&&c(n,i.t=f),i.a=m(n,z,i.a),i},{e:void 0,t:void 0,a:void 0}),n})()})})}export{$ as customUniforms,U as default};
1
+ import{b as k,i as w,s as d,c,d as m,t as S,C as M}from"./register-impl-C96AnOJn.js";import{d as h,c as A,j as y,S as g,b as p}from"./kai.es.js";import{c as x,S as N,h as j,D as C}from"./create-tween-BmBnlg25.js";var b=S("<div>");const E={"1f":!0,"1i":!0,"1fv":!0,"2f":!0,"3f":!0,"3fv":!0,"4f":!0,"4fv":!0,Matrix2fv:!0,Matrix3fv:!0,Matrix4fv:!0},V=new Set(["1f","1i"]),F={"2f":2,"3f":3,"4f":4,Matrix2fv:4,Matrix3fv:9,Matrix4fv:16};function O(r,e){if(e==null||typeof e!="object")return`uniform "${r}" is not a valid declaration (expected an object with "type" and "value").`;if(E[e.type]!==!0)return`uniform "${r}" has an unrecognized type "${String(e.type)}".`;if(V.has(e.type))return typeof e.value!="number"||!Number.isFinite(e.value)?`uniform "${r}" is declared "${e.type}" (a number) but its value is not a finite number.`:void 0;if(!Array.isArray(e.value)||e.value.some(s=>typeof s!="number"||!Number.isFinite(s)))return`uniform "${r}" is declared "${e.type}" (an array) but its value is not an array of finite numbers.`;const o=F[e.type];if(o!==void 0&&e.value.length!==o)return`uniform "${r}" is declared "${e.type}", which takes exactly ${o} numbers, but its value has ${e.value.length}.`}function $(r,e){const o=r.bands.length?r.bands:[0],s={uColor:{type:"3fv",value:j(r.color)},uIntensity:{type:"1f",value:r.intensity},uSpeed:{type:"1f",value:r.speed},uComplexity:{type:"1f",value:r.complexity},uVolume:{type:"1f",value:r.volume},uBands:{type:"1fv",value:o,arraySize:o.length}};if(!e)return s;for(const[l,v]of Object.entries(e)){const t=O(l,v);if(t)throw new Error(t)}return{...s,...e}}function U(r){const e=x(.3),o=x(1);h(()=>{const t=k(r.state);if(r.state==="speaking")e.to(.3+.7*r.volume,{duration:0});else{const a=r.frozen?{duration:0}:{duration:.5,ease:"easeOut"};e.to(Array.isArray(t.intensity)&&r.frozen?t.intensity[0]:t.intensity,a)}o.to(r.frozen?0:t.speed,{duration:0})});const s=A(()=>{var t;try{return{uniforms:$({color:r.color??C,intensity:e.value(),speed:o.value(),complexity:r.complexity??.5,volume:r.volume,bands:r.bands},(t=r.shader)==null?void 0:t.uniforms)}}catch(a){return{error:a instanceof Error?a.message:String(a)}}});let l=!1;h(()=>{const{error:t}=s();if(!t){l=!1;return}l||(l=!0,console.error(`<kai-audio-visualizer variant="custom">: ${t}`),r.onUnavailable())});const v=()=>({height:`${M[r.size]}px`,"aspect-ratio":"1"});return y(g,{get when(){var t;return(t=r.shader)==null?void 0:t.fragment},get fallback(){return(()=>{var t=b();return p(a=>{var n=r.state,i=r.class,u=v();return n!==a.e&&d(t,"data-kai-state",a.e=n),i!==a.t&&c(t,a.t=i),a.a=m(t,u,a.a),a},{e:void 0,t:void 0,a:void 0}),t})()},children:t=>y(g,{get when(){return s().uniforms},get fallback(){return(()=>{var a=b();return p(n=>{var i=r.state,u=r.class,f=v();return i!==n.e&&d(a,"data-kai-state",n.e=i),u!==n.t&&c(a,n.t=u),n.a=m(a,f,n.a),n},{e:void 0,t:void 0,a:void 0}),a})()},children:a=>(()=>{var n=b();return w(n,y(N,{get fragment(){return t()},get precision(){return r.size==="icon"||r.size==="sm"?"mediump":"highp"},get uniforms(){return a()},get animateWhenNotVisible(){return r.animateWhenNotVisible},onError:i=>{/not available/i.test(i)?console.warn('<kai-audio-visualizer variant="custom">: shader unavailable',i):console.error('<kai-audio-visualizer variant="custom">: shader error',i),r.onUnavailable()}})),p(i=>{var u=r.state,f=r.class,z=v();return u!==i.e&&d(n,"data-kai-state",i.e=u),f!==i.t&&c(n,i.t=f),i.a=m(n,z,i.a),i},{e:void 0,t:void 0,a:void 0}),n})()})})}export{$ as customUniforms,U as default};
@@ -1,7 +1,7 @@
1
1
  import { ssr as m, ssrAttribute as f, escape as o, ssrStyleProperty as l, createComponent as h } from "solid-js/web";
2
2
  import { createEffect as d } from "solid-js";
3
- import { c, S as p, h as x, D as g } from "./create-tween-COnPwAQN.js";
4
- import { C as y, w as b } from "./solid-Dt2nEwfl.js";
3
+ import { c, S as p, h as x, D as g } from "./create-tween-CTT5l1bo.js";
4
+ import { C as y, w as b } from "./solid-BuqWLn6x.js";
5
5
  const w = `
6
6
  const float TAU = 6.28318530718;
7
7
 
@@ -1,4 +1,4 @@
1
- import{i as p,s as m,c as h,a as x,C as g,t as y,w as b}from"./register-impl-AxIlqjo7.js";import{d as v,j as w,b as C}from"./kai.es.js";import{c as r,h as z,S,D as U}from"./create-tween-qs-jjvNA.js";const F=`
1
+ import{i as p,s as m,c as h,a as x,C as g,t as y,w as b}from"./register-impl-C96AnOJn.js";import{d as v,j as w,b as C}from"./kai.es.js";import{c as r,h as z,S,D as U}from"./create-tween-BmBnlg25.js";const F=`
2
2
  const float TAU = 6.28318530718;
3
3
 
4
4
  // Noise for dithering
@@ -1,7 +1,7 @@
1
1
  import { insert as m, createComponent as h, effect as p, setAttribute as x, className as g, setStyleProperty as y, template as b } from "solid-js/web";
2
2
  import { createEffect as v } from "solid-js";
3
- import { c as r, S as w, h as C, D as S } from "./create-tween-DmTUaXWE.js";
4
- import { C as z, w as U } from "./solid-BGYSJyHG.js";
3
+ import { c as r, S as w, h as C, D as S } from "./create-tween-vA7upv0h.js";
4
+ import { C as z, w as U } from "./solid-C76UXJuy.js";
5
5
  const A = `
6
6
  const float TAU = 6.28318530718;
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitn.ai/ui",
3
- "version": "0.22.1",
3
+ "version": "0.23.0",
4
4
  "nx": {
5
5
  "name": "ui",
6
6
  "targets": {
@@ -155,7 +155,7 @@
155
155
  "scripts": {
156
156
  "prepublishOnly": "npm run build",
157
157
  "prebuild": "npm run build:css && npm run build:card-validation",
158
- "build": "vite build --config vite.config.ts && vite build --config vite.config.provider.ts && vite build --config vite.config.react.ts && vite build --config vite.config.barrel.ts && vite build --config vite.config.barrel.server.ts && vite build --config vite.config.solid.ts && vite build --config vite.config.solid.server.ts && vite build --config vite.config.state.ts && vite build --config vite.config.wire.ts && vite build --config vite.config.schemas.ts && vite build --config vite.config.mcp.ts && npm run build:elements && node scripts/verify-elements-bundle.mjs && node scripts/verify-react-wrappers.mjs && node scripts/verify-shader-lazy.mjs",
158
+ "build": "vite build --config vite.config.ts && vite build --config vite.config.provider.ts && vite build --config vite.config.react.ts && vite build --config vite.config.barrel.ts && vite build --config vite.config.barrel.server.ts && vite build --config vite.config.solid.ts && vite build --config vite.config.solid.server.ts && vite build --config vite.config.state.ts && vite build --config vite.config.wire.ts && vite build --config vite.config.schemas.ts && vite build --config vite.config.mcp.ts && npm run build:elements && npm run verify:elements-bundle && npm run verify:react-wrappers && npm run verify:shader-lazy",
159
159
  "build:elements": "node scripts/gen-elements-manifest.mjs && vite build --config vite.config.elements.ts && node scripts/gen-element-dts.mjs",
160
160
  "postbuild": "npm run build:theme && npm run build:api && npm run build:schemas && npm run build:subpath-dts && npm run verify:dts",
161
161
  "build:theme": "node scripts/build-theme-tokens.mjs",
@@ -166,11 +166,14 @@
166
166
  "verify:card-validation": "node scripts/gen-card-validation-schemas.mjs --check",
167
167
  "verify:consumer": "node scripts/verify-consumer-sideeffects.mjs",
168
168
  "verify:dts": "node scripts/verify-dts-boundaries.mjs",
169
+ "verify:elements-bundle": "node scripts/verify-elements-bundle.mjs --self-test && node scripts/verify-elements-bundle.mjs",
169
170
  "verify:dts:consumer": "node scripts/verify-dts-consumer.mjs",
170
171
  "verify:generated": "node scripts/verify-generated-sync.mjs",
171
172
  "verify:quarantine": "node scripts/verify-quarantine.mjs",
173
+ "verify:react-wrappers": "node scripts/verify-react-wrappers.mjs --self-test && node scripts/verify-react-wrappers.mjs",
172
174
  "verify:scaffold": "node scripts/verify-scaffold-compiles.mjs",
173
175
  "verify:schemas": "node scripts/verify-schemas-exported.mjs",
176
+ "verify:shader-lazy": "node scripts/verify-shader-lazy.mjs --self-test && node scripts/verify-shader-lazy.mjs",
174
177
  "verify:solid-coverage": "node scripts/verify-solid-coverage.mjs",
175
178
  "verify:tool-schemas": "node scripts/verify-tool-schemas.mjs",
176
179
  "verify:ssr": "node scripts/verify-ssr-imports.mjs && node scripts/verify-ssr-render.mjs",
@@ -10,13 +10,50 @@ const vercelAiSdk: Integration = {
10
10
  // No per-framework templates: the handler below is web-standard, so the
11
11
  // scaffolder wraps it in the target framework's own route declaration.
12
12
  routeTemplates: {},
13
- webRoute: `import { streamText } from 'ai';
14
- import type { ModelMessage, AssistantContent, UserContent, FilePart, ToolResultPart } from 'ai';
13
+ webRoute: `import { dynamicTool, jsonSchema, streamText } from 'ai';
14
+ import type {
15
+ AssistantContent,
16
+ FilePart,
17
+ JSONSchema7,
18
+ ModelMessage,
19
+ SystemModelMessage,
20
+ ToolResultPart,
21
+ ToolSet,
22
+ UserContent,
23
+ } from 'ai';
15
24
 
16
25
  // Next.js only: add \`export const maxDuration = 30\` to the route file to allow
17
26
  // long streaming responses. It is a Next route-segment config, not part of the
18
27
  // handler, so it lives in the file rather than in here.
19
28
 
29
+ /**
30
+ * The model, PINNED — and deliberately NOT read off the request body.
31
+ *
32
+ * Change THIS LINE to change the model; it is the only place one is named. The
33
+ * AI Gateway takes a \`creator/model-name\` string, so any id it routes works
34
+ * here without touching another import.
35
+ *
36
+ * Why it is not forwarded from the client, unlike the openai / openrouter /
37
+ * anthropic routes:
38
+ *
39
+ * · Those three POST to ONE host with ONE id space, so the scaffold can seed a
40
+ * valid default. The Gateway is a router across every vendor's id space at
41
+ * once, so there is no default that is right for it — only one vendor's guess
42
+ * baked into a provider-agnostic template.
43
+ * · A forwarded model id on a \`needs-proxy\` route is a spend lever handed to
44
+ * anything that can POST here, and the Gateway bills per token per model.
45
+ *
46
+ * WHY THIS ID. It is the one this route has actually been driven against live —
47
+ * text, a single tool call and a multi-round tool loop, through the Gateway —
48
+ * and, unlike a frontier default, it ANSWERS ON A FREE GATEWAY ACCOUNT. A paid
49
+ * id fails a first \`npm run dev\` with
50
+ * \`Free tier users do not have access to this model\`, which reads as a broken
51
+ * scaffold rather than as a billing setting. It also supports tools and
52
+ * reasoning, so the two things this route re-frames are reachable by default,
53
+ * and it is cheaper than gpt-4o by roughly two orders of magnitude.
54
+ */
55
+ const MODEL = 'openai/gpt-oss-120b';
56
+
20
57
  /**
21
58
  * One attachment to an AI SDK FilePart.
22
59
  *
@@ -88,21 +125,211 @@ function toModelMessages(messages: ChatRequestBody['messages']): ModelMessage[]
88
125
  });
89
126
  }
90
127
 
128
+ /** The OpenAI function-calling envelope the front end sends, narrowed from
129
+ * \`unknown[]\`. Declared as this integration's \`clientToolFormat\`. */
130
+ type OpenAIFunctionTool = {
131
+ function?: { name?: string; description?: string; parameters?: unknown };
132
+ };
133
+
134
+ /**
135
+ * OpenAI function schemas -> the AI SDK's own ToolSet.
136
+ *
137
+ * \`dynamicTool\` is the helper for a schema known only at RUNTIME. The ordinary
138
+ * \`tool()\` infers its input type from a Zod schema written in the route, which
139
+ * a list arriving in the request body cannot have.
140
+ *
141
+ * NO \`execute\`, deliberately. A tool the SDK can run makes the ROUTE the loop
142
+ * owner: streamText would call it, feed the result back and answer in a single
143
+ * response, so the tool call would never reach the browser and \`<kai-tool>\`
144
+ * would have nothing to render. Without \`execute\` the SDK emits the call and
145
+ * stops, which is the contract the kit's front end already implements — run the
146
+ * tool, \`applyToolOutput\`, POST the thread again.
147
+ */
148
+ function toToolSet(tools: ChatRequestBody['tools']): ToolSet | undefined {
149
+ if (!tools?.length) return undefined;
150
+ const out: ToolSet = {};
151
+ for (const raw of tools) {
152
+ const fn = (raw as OpenAIFunctionTool).function;
153
+ if (!fn?.name) continue;
154
+ out[fn.name] = dynamicTool({
155
+ description: fn.description ?? '',
156
+ inputSchema: jsonSchema((fn.parameters as JSONSchema7 | undefined) ?? { type: 'object' }),
157
+ });
158
+ }
159
+ return Object.keys(out).length > 0 ? out : undefined;
160
+ }
161
+
162
+ /** AI SDK finish reasons -> OpenAI's spelling. They agree on 'stop', 'length'
163
+ * and 'error' and disagree on the other two, and readOpenAIStream's table reads
164
+ * OpenAI's — so an unmapped 'tool-calls' normalises to 'other' and the turn
165
+ * stops saying why it stopped. */
166
+ const FINISH_REASONS: Record<string, string> = {
167
+ 'tool-calls': 'tool_calls',
168
+ 'content-filter': 'content_filter',
169
+ };
170
+
91
171
  async function chatHandler(request: Request): Promise<Response> {
92
- const { messages } = await readChatRequest(request);
172
+ const { messages, tools } = await readChatRequest(request);
173
+ const toolSet = toToolSet(tools);
174
+ const prompt = toModelMessages(messages);
175
+
176
+ // THE SYSTEM TURN DOES NOT GO IN \`messages\`, and this is the one that costs a
177
+ // live run to find. \`SystemModelMessage\` is still part of the \`ModelMessage\`
178
+ // union, so a system entry in this array TYPECHECKS — and then \`ai\` v7's
179
+ // \`standardizePrompt\` throws \`InvalidPromptError: System messages are not
180
+ // allowed in the prompt or messages fields. Use the instructions option
181
+ // instead.\` The kit's own encoder puts the system prompt at \`messages[0]\`, so
182
+ // that is every single turn of a scaffolded app, not an edge case.
183
+ //
184
+ // Hoisted rather than joined into a string: \`instructions\` takes the message
185
+ // array, so several system turns keep their order and their count.
186
+ //
187
+ // On \`ai\` v5/v6 there is no \`instructions\` option and a system message in
188
+ // \`messages\` is correct — drop this split and pass \`prompt\` straight through
189
+ // if you pin an older SDK.
190
+ const instructions = prompt.filter((m): m is SystemModelMessage => m.role === 'system');
191
+ const conversation = prompt.filter((m) => m.role !== 'system');
93
192
 
193
+ // \`streamText\` is not awaited: it returns synchronously and does its work as
194
+ // the stream is iterated. Prompt validation is part of that work, so an
195
+ // invalid prompt surfaces from \`for await (… of result.fullStream)\` below
196
+ // rather than from this line — which is why the catch that reports it lives
197
+ // in the stream and not around this call. Confirmed by observation: a rejected
198
+ // prompt reached the browser as an in-band error frame, not as a 500.
94
199
  const result = streamText({
95
- model: 'openai/gpt-4o', // AI Gateway id; needs AI_GATEWAY_API_KEY
96
- messages: toModelMessages(messages),
200
+ model: MODEL, // AI Gateway id; needs AI_GATEWAY_API_KEY
201
+ ...(instructions.length > 0 ? { instructions } : {}),
202
+ messages: conversation,
203
+ ...(toolSet ? { tools: toolSet } : {}),
97
204
  });
98
205
 
99
206
  const encoder = new TextEncoder();
207
+
208
+ // OpenAI correlates tool-call fragments by their POSITION in the tool_calls
209
+ // array; the SDK identifies each call by id and never sends a position. So one
210
+ // is derived from the other, in first-seen order, and every fragment of a call
211
+ // carries the same number. Getting this wrong does not throw — the fragments
212
+ // land on the wrong call and the arguments come out as spliced JSON.
213
+ const toolIndex = new Map<string, number>();
214
+ const indexOf = (id: string): number => {
215
+ const known = toolIndex.get(id);
216
+ if (known !== undefined) return known;
217
+ const next = toolIndex.size;
218
+ toolIndex.set(id, next);
219
+ return next;
220
+ };
221
+ // How many argument characters a call streamed. \`tool-call\` re-sends the whole
222
+ // input at the end, so emitting it unconditionally would DOUBLE the arguments
223
+ // of every call that streamed — and skipping it unconditionally would empty
224
+ // the arguments of any provider that does not stream them. Neither is safe to
225
+ // assume, so the decision is made per call from what actually arrived.
226
+ const streamedArgs = new Map<string, number>();
227
+
100
228
  const sse = new ReadableStream({
101
229
  async start(controller) {
230
+ const send = (chunk: unknown): void => {
231
+ controller.enqueue(encoder.encode(\`data: \${JSON.stringify(chunk)}\\n\\n\`));
232
+ };
102
233
  try {
103
- for await (const delta of result.textStream) {
104
- const chunk = { choices: [{ delta: { content: delta } }] };
105
- controller.enqueue(encoder.encode(\`data: \${JSON.stringify(chunk)}\\n\\n\`));
234
+ // fullStream, NOT textStream. textStream is text deltas only: a tool call
235
+ // or a reasoning block goes past it silently, so a route built on it
236
+ // emits a plain answer and nothing else however the model replied.
237
+ for await (const part of result.fullStream) {
238
+ switch (part.type) {
239
+ case 'text-delta':
240
+ send({ choices: [{ delta: { content: part.text } }] });
241
+ break;
242
+
243
+ case 'reasoning-delta':
244
+ send({ choices: [{ delta: { reasoning: part.text } }] });
245
+ break;
246
+
247
+ // The call is ANNOUNCED here, before its arguments exist, which is
248
+ // what lets <kai-tool> open a panel with the tool's name in it while
249
+ // the arguments are still being written.
250
+ case 'tool-input-start':
251
+ streamedArgs.set(part.id, 0);
252
+ send({
253
+ choices: [{
254
+ delta: {
255
+ tool_calls: [{
256
+ index: indexOf(part.id),
257
+ id: part.id,
258
+ type: 'function',
259
+ function: { name: part.toolName, arguments: '' },
260
+ }],
261
+ },
262
+ }],
263
+ });
264
+ break;
265
+
266
+ case 'tool-input-delta':
267
+ streamedArgs.set(part.id, (streamedArgs.get(part.id) ?? 0) + part.delta.length);
268
+ send({
269
+ choices: [{
270
+ delta: { tool_calls: [{ index: indexOf(part.id), function: { arguments: part.delta } }] },
271
+ }],
272
+ });
273
+ break;
274
+
275
+ case 'tool-call':
276
+ // Only when nothing streamed: see \`streamedArgs\`.
277
+ if ((streamedArgs.get(part.toolCallId) ?? 0) === 0) {
278
+ send({
279
+ choices: [{
280
+ delta: {
281
+ tool_calls: [{
282
+ index: indexOf(part.toolCallId),
283
+ id: part.toolCallId,
284
+ type: 'function',
285
+ function: {
286
+ name: part.toolName,
287
+ arguments: JSON.stringify(part.input ?? {}),
288
+ },
289
+ }],
290
+ },
291
+ }],
292
+ });
293
+ }
294
+ break;
295
+
296
+ // One frame carries both, the way chat-completions sends them.
297
+ // \`reasoning_tokens\` is the number that proves thinking happened even
298
+ // when the provider streamed no reasoning text.
299
+ case 'finish':
300
+ send({
301
+ choices: [{
302
+ delta: {},
303
+ finish_reason: FINISH_REASONS[part.finishReason] ?? part.finishReason,
304
+ }],
305
+ usage: {
306
+ prompt_tokens: part.totalUsage.inputTokens,
307
+ completion_tokens: part.totalUsage.outputTokens,
308
+ total_tokens: part.totalUsage.totalTokens,
309
+ completion_tokens_details: {
310
+ reasoning_tokens: part.totalUsage.outputTokenDetails.reasoningTokens,
311
+ },
312
+ },
313
+ });
314
+ break;
315
+
316
+ // An error the SDK caught mid-stream. The status is long spent, so it
317
+ // goes IN BAND like the catch below.
318
+ case 'error':
319
+ send({
320
+ error: {
321
+ message: part.error instanceof Error ? part.error.message : String(part.error),
322
+ },
323
+ });
324
+ break;
325
+
326
+ // Everything else — text-start/end, tool-input-end, sources, files,
327
+ // step boundaries, raw provider frames — has no OpenAI-wire spelling
328
+ // and is dropped. \`source\` is the one worth knowing about: map it to
329
+ // \`delta.annotations[].url_citation\` if your model cites its sources.
330
+ default:
331
+ break;
332
+ }
106
333
  }
107
334
  } catch (err) {
108
335
  // The status is spent by the time the SDK fails — the headers went out
@@ -110,7 +337,7 @@ async function chatHandler(request: Request): Promise<Response> {
110
337
  // this on turn.error and keeps whatever streamed before it. Without it a
111
338
  // failed key is an empty bubble and nothing in the console.
112
339
  const message = err instanceof Error ? err.message : 'Model stream failed';
113
- controller.enqueue(encoder.encode(\`data: \${JSON.stringify({ error: { message } })}\\n\\n\`));
340
+ send({ error: { message } });
114
341
  }
115
342
  controller.enqueue(encoder.encode('data: [DONE]\\n\\n'));
116
343
  controller.close();
@@ -127,12 +354,26 @@ async function chatHandler(request: Request): Promise<Response> {
127
354
  },
128
355
  });
129
356
  }`,
130
- streamMapping: "The Vercel AI SDK's toUIMessageStreamResponse() and toTextStreamResponse() don't emit OpenAI-format SSE. Wrap result.textStream manually: iterate text deltas and emit data: {choices:[{delta:{content}}]} frames, closing with data: [DONE]. readOpenAIStream from @kitn.ai/ui/wire parses tool calls and reasoning too, but textStream carries neither: it is text deltas only. Switch to result.fullStream, which yields typed parts, and re-frame its tool-call and reasoning parts onto delta.tool_calls and delta.reasoning to get them.",
131
- runNote: 'Set AI_GATEWAY_API_KEY for the AI Gateway (string model id form: creator/model-name). For direct provider access, import its provider package (e.g. @ai-sdk/openai) and set the corresponding key (e.g. OPENAI_API_KEY).',
357
+ streamMapping:
358
+ "The Vercel AI SDK's toUIMessageStreamResponse() and toTextStreamResponse() don't emit OpenAI-format SSE, so the route re-frames the stream itself and readOpenAIStream from @kitn.ai/ui/wire parses it exactly as it does every other integration. Iterate result.fullStream, NOT result.textStream: textStream carries text deltas only, so a route built on it emits a plain answer however the model replied and drops every tool call and every reasoning block silently. fullStream yields typed parts: text-delta.text -> delta.content, reasoning-delta.text -> delta.reasoning, tool-input-start plus its tool-input-delta fragments -> delta.tool_calls, finish -> finish_reason plus a usage frame, error -> an in-band {error:{message}}. Two traps. (1) OpenAI correlates tool-call fragments by their POSITION in the tool_calls array and the SDK only ever gives an id, so the route keeps an id -> index map; passing anything else through as the index splices one call's arguments into another. (2) fullStream sends the complete input AGAIN on the tool-call part after streaming it in fragments, so emitting both doubles the arguments — the route tracks how much each call streamed and emits the tool-call part only for a provider that streamed none. Parts with no OpenAI spelling (text-start/end, tool-input-end, step boundaries, raw) are dropped; source parts have one — delta.annotations[].url_citation — and are left unmapped because the SDK's Source union carries document sources a url_citation cannot express. On the REQUEST side the trap that only a live run finds: ai v7 REFUSES a system message inside `messages` (InvalidPromptError, 'Use the instructions option instead') even though SystemModelMessage is still in the ModelMessage union and therefore typechecks — and the kit's encoder puts the system prompt at messages[0], so that is every turn. Hoist system turns into `instructions` and pass the rest as `messages`. That failure arrives from ITERATING fullStream, not from the streamText() call — streamText returns synchronously and validates as the stream is read — so the in-band catch around the loop is what reports it, and it reaches the browser as an error frame rather than as a 500.",
359
+ runNote:
360
+ "Set AI_GATEWAY_API_KEY for the AI Gateway (string model id form: creator/model-name). The route pins `const MODEL = 'openai/gpt-oss-120b'` — one line, at the top, and any id the Gateway routes works in it. That id is pinned because it answers on a FREE Gateway account: most ids (deepseek/*, meta/*, anthropic/*) return `Free tier users do not have access to this model` or a free-tier rate limit until the account has paid credits, which looks like a broken scaffold rather than a billing setting. For direct provider access, import its provider package (e.g. @ai-sdk/openai) and set the corresponding key (e.g. OPENAI_API_KEY). The tools the front end posts become `dynamicTool`s with NO `execute`, which is what keeps the tool loop in the app: the SDK emits the call and stops, the app runs it, renders it in <kai-tool> and posts the thread back. Give a tool an `execute` and the SDK runs the whole loop server-side, so nothing reaches the browser but the final sentence.",
132
361
  docsSlug: 'integrations/vercel-ai-sdk',
133
- // Nothing. The route pins model: 'openai/gpt-4o' in the streamText() call and
134
- // defines any tools there too, so neither belongs in the front end.
135
- forwardsFromClient: [],
362
+ // `tools` only. `model` is deliberately NOT forwarded the route pins it in
363
+ // one named const, and see that const's comment for why the Gateway is the one
364
+ // host where a client-supplied id has no correct default. The catalog check
365
+ // agrees from the other direction: `every integration that forwards a model
366
+ // emits one valid for the host it POSTs to` reads the host off the route's own
367
+ // fetch(), and this route makes no fetch call at all — the SDK owns the
368
+ // transport — so a forwarded model here could not be validated against
369
+ // anything.
370
+ forwardsFromClient: ['tools'],
371
+ // 'openai': the ROUTE's request contract, not the SDK's own. `toToolSet` reads
372
+ // `raw.function.name` / `.function.parameters` off each entry — the OpenAI
373
+ // function-calling envelope — and rebuilds it as a `dynamicTool` with a
374
+ // `jsonSchema()` input. Sending the SDK's own tool shape from the client would
375
+ // leave `.function` undefined and every tool would arrive nameless.
376
+ clientToolFormat: 'openai',
136
377
  // `ai` only. A direct provider (e.g. @ai-sdk/openai) is the alternative path
137
378
  // described in runNote, not what this route imports, so it is not listed: the
138
379
  // rule is what the emitted code actually imports.