@8wave/ai-elements 0.112.0-beta.9 → 0.114.0-beta.14

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 (139) hide show
  1. package/dist/_chunks/Agent-D3ODaN3E.js +566 -0
  2. package/dist/_chunks/Agent-D3ODaN3E.js.map +1 -0
  3. package/dist/_chunks/{PkStreamingMarkdown-CRlRDGYl.js → PkStreamingMarkdown-CYOm47PX.js} +1276 -453
  4. package/dist/_chunks/PkStreamingMarkdown-CYOm47PX.js.map +1 -0
  5. package/dist/_chunks/{PkToolRequestGeolocation-BbxYKt-9.js → PkToolRequestGeolocation-BY7nXImb.js} +2 -2
  6. package/dist/_chunks/{PkToolRequestGeolocation-BbxYKt-9.js.map → PkToolRequestGeolocation-BY7nXImb.js.map} +1 -1
  7. package/dist/_chunks/{PkToolRequestOAuthConnection-CTp2w60F.js → PkToolRequestOAuthConnection-DFOTALFt.js} +2 -2
  8. package/dist/_chunks/{PkToolRequestOAuthConnection-CTp2w60F.js.map → PkToolRequestOAuthConnection-DFOTALFt.js.map} +1 -1
  9. package/dist/_chunks/{PkToolShowArtifact-CNnt82aH.js → PkToolShowArtifact-DzHRWoru.js} +2 -2
  10. package/dist/_chunks/{PkToolShowArtifact-CNnt82aH.js.map → PkToolShowArtifact-DzHRWoru.js.map} +1 -1
  11. package/dist/_chunks/{PkToolShowContactForm-D77gyjQG.js → PkToolShowContactForm-1J6_1AA2.js} +2 -2
  12. package/dist/_chunks/{PkToolShowContactForm-D77gyjQG.js.map → PkToolShowContactForm-1J6_1AA2.js.map} +1 -1
  13. package/dist/_chunks/{PkToolShowForm-DP4LLAk3.js → PkToolShowForm-DmQYj3v1.js} +5 -5
  14. package/dist/_chunks/{PkToolShowForm-DP4LLAk3.js.map → PkToolShowForm-DmQYj3v1.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowSources-Bwy0Ptmi.js → PkToolShowSources-BO8V5rlS.js} +3 -3
  16. package/dist/_chunks/{PkToolShowSources-Bwy0Ptmi.js.map → PkToolShowSources-BO8V5rlS.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowSuggestedReply-CFO8wV1b.js → PkToolShowSuggestedReply-CTWVG1Zk.js} +2 -2
  18. package/dist/_chunks/{PkToolShowSuggestedReply-CFO8wV1b.js.map → PkToolShowSuggestedReply-CTWVG1Zk.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowVideo-Djr8Ofsz.js → PkToolShowVideo-p6Y9j3-B.js} +3 -3
  20. package/dist/_chunks/PkToolShowVideo-p6Y9j3-B.js.map +1 -0
  21. package/dist/_chunks/{browser-B0Xnbqi7.js → browser-Ct5TRDgj.js} +521 -518
  22. package/dist/_chunks/{browser-B0Xnbqi7.js.map → browser-Ct5TRDgj.js.map} +1 -1
  23. package/dist/_chunks/{markdown-BRD-hDrH.js → markdown-JpLFzufn.js} +7 -7
  24. package/dist/_chunks/markdown-JpLFzufn.js.map +1 -0
  25. package/dist/_chunks/url-validation-uLMZ5-AU.js.map +1 -1
  26. package/dist/_chunks/{web-Dzr6HJ14.js → web-CEmtEYdH.js} +89 -65
  27. package/dist/_chunks/web-CEmtEYdH.js.map +1 -0
  28. package/dist/ai-elements.es.js +2109 -2321
  29. package/dist/ai-elements.es.js.map +1 -1
  30. package/dist-vue/PkChatbot.js +1 -1
  31. package/dist-vue/PkChatbotAuth.js +1 -1
  32. package/dist-vue/PkChatbotEmptyState.js +1 -1
  33. package/dist-vue/PkChatbotInput.js +1 -1
  34. package/dist-vue/PkChatbotMessages.js +1 -1
  35. package/dist-vue/PkChatbotStepPayload.js +1 -1
  36. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  37. package/dist-vue/PkChatbotSteps.js +1 -1
  38. package/dist-vue/PkChatbotViewChat.js +1 -1
  39. package/dist-vue/PkChatbotViewConversations.js +1 -1
  40. package/dist-vue/PkChatbotViewFiles.js +1 -1
  41. package/dist-vue/PkChatbotViewProfile.js +1 -1
  42. package/dist-vue/_chunks/{Document-B6RpxFr9.js → Document-2X01-F4Z.js} +2 -2
  43. package/dist-vue/_chunks/Document-2X01-F4Z.js.map +1 -0
  44. package/dist-vue/_chunks/Media-_HfFLHGD.js.map +1 -1
  45. package/dist-vue/_chunks/{PkChatbot-CI9ucJ2M.js → PkChatbot-BdvDl_Gw.js} +8 -8
  46. package/dist-vue/_chunks/{PkChatbot-CI9ucJ2M.js.map → PkChatbot-BdvDl_Gw.js.map} +1 -1
  47. package/dist-vue/_chunks/{PkChatbotAuth-AxAOI9t2.js → PkChatbotAuth-Bi508F1u.js} +57 -57
  48. package/dist-vue/_chunks/PkChatbotAuth-Bi508F1u.js.map +1 -0
  49. package/dist-vue/_chunks/{PkChatbotEmptyState-CacY4o02.js → PkChatbotEmptyState-DycCrfwz.js} +2 -2
  50. package/dist-vue/_chunks/{PkChatbotEmptyState-CacY4o02.js.map → PkChatbotEmptyState-DycCrfwz.js.map} +1 -1
  51. package/dist-vue/_chunks/{PkChatbotInput-Dkz3SNAk.js → PkChatbotInput-BCuqLdkT.js} +2 -2
  52. package/dist-vue/_chunks/{PkChatbotInput-Dkz3SNAk.js.map → PkChatbotInput-BCuqLdkT.js.map} +1 -1
  53. package/dist-vue/_chunks/PkChatbotMessages-PjKRDNYJ.js +776 -0
  54. package/dist-vue/_chunks/PkChatbotMessages-PjKRDNYJ.js.map +1 -0
  55. package/dist-vue/_chunks/{PkChatbotStepPayload-DU0W-eUp.js → PkChatbotStepPayload-CI98RiNv.js} +2 -2
  56. package/dist-vue/_chunks/{PkChatbotStepPayload-DU0W-eUp.js.map → PkChatbotStepPayload-CI98RiNv.js.map} +1 -1
  57. package/dist-vue/_chunks/{PkChatbotStepToolDetail-etlBryOg.js → PkChatbotStepToolDetail-B8zXJOdI.js} +3 -3
  58. package/dist-vue/_chunks/{PkChatbotStepToolDetail-etlBryOg.js.map → PkChatbotStepToolDetail-B8zXJOdI.js.map} +1 -1
  59. package/dist-vue/_chunks/PkChatbotSteps-CL27pMFS.js +190 -0
  60. package/dist-vue/_chunks/{PkChatbotSteps-jW07Q-4x.js.map → PkChatbotSteps-CL27pMFS.js.map} +1 -1
  61. package/dist-vue/_chunks/{PkChatbotViewChat-jEBBPmSo.js → PkChatbotViewChat-CS-OSJfX.js} +8 -8
  62. package/dist-vue/_chunks/{PkChatbotViewChat-jEBBPmSo.js.map → PkChatbotViewChat-CS-OSJfX.js.map} +1 -1
  63. package/dist-vue/_chunks/{PkChatbotViewConversations-CWSrP36z.js → PkChatbotViewConversations-BCdolW0R.js} +2 -2
  64. package/dist-vue/_chunks/{PkChatbotViewConversations-CWSrP36z.js.map → PkChatbotViewConversations-BCdolW0R.js.map} +1 -1
  65. package/dist-vue/_chunks/{PkChatbotViewFiles-DzLp1WfU.js → PkChatbotViewFiles-Cudao8ew.js} +3 -3
  66. package/dist-vue/_chunks/{PkChatbotViewFiles-DzLp1WfU.js.map → PkChatbotViewFiles-Cudao8ew.js.map} +1 -1
  67. package/dist-vue/_chunks/{PkChatbotViewProfile-CHbn3W6F.js → PkChatbotViewProfile-DDsKOkcC.js} +2 -2
  68. package/dist-vue/_chunks/{PkChatbotViewProfile-CHbn3W6F.js.map → PkChatbotViewProfile-DDsKOkcC.js.map} +1 -1
  69. package/dist-vue/_chunks/PkStreamingMarkdown-B2iju0WK.js +3245 -0
  70. package/dist-vue/_chunks/PkStreamingMarkdown-B2iju0WK.js.map +1 -0
  71. package/dist-vue/_chunks/{PkToolShowArtifact-BnwU7CV2.js → PkToolShowArtifact-C0J71YF6.js} +2 -2
  72. package/dist-vue/_chunks/{PkToolShowArtifact-BnwU7CV2.js.map → PkToolShowArtifact-C0J71YF6.js.map} +1 -1
  73. package/dist-vue/_chunks/{PkToolShowContactForm-_x_dbiHn.js → PkToolShowContactForm-De3Od9mC.js} +2 -2
  74. package/dist-vue/_chunks/{PkToolShowContactForm-_x_dbiHn.js.map → PkToolShowContactForm-De3Od9mC.js.map} +1 -1
  75. package/dist-vue/_chunks/{PkToolShowDiagram-CjJcLvWs.js → PkToolShowDiagram-DmY_hhAS.js} +2 -2
  76. package/dist-vue/_chunks/{PkToolShowDiagram-CjJcLvWs.js.map → PkToolShowDiagram-DmY_hhAS.js.map} +1 -1
  77. package/dist-vue/_chunks/{PkToolShowEmail-CRQjoJr1.js → PkToolShowEmail-D_Z15wCS.js} +2 -2
  78. package/dist-vue/_chunks/{PkToolShowEmail-CRQjoJr1.js.map → PkToolShowEmail-D_Z15wCS.js.map} +1 -1
  79. package/dist-vue/_chunks/{PkToolShowForm-IPAkJIXh.js → PkToolShowForm-DUGysIxj.js} +3 -3
  80. package/dist-vue/_chunks/{PkToolShowForm-IPAkJIXh.js.map → PkToolShowForm-DUGysIxj.js.map} +1 -1
  81. package/dist-vue/_chunks/{PkToolShowMessage-joTzAg9N.js → PkToolShowMessage-e5_EI5mV.js} +2 -2
  82. package/dist-vue/_chunks/{PkToolShowMessage-joTzAg9N.js.map → PkToolShowMessage-e5_EI5mV.js.map} +1 -1
  83. package/dist-vue/_chunks/{PkToolShowProductList-tOYjd2bq.js → PkToolShowProductList-B3X7Svyc.js} +2 -2
  84. package/dist-vue/_chunks/{PkToolShowProductList-tOYjd2bq.js.map → PkToolShowProductList-B3X7Svyc.js.map} +1 -1
  85. package/dist-vue/_chunks/{PkToolShowSources-Cc26LzRd.js → PkToolShowSources-BUjBSGc5.js} +4 -4
  86. package/dist-vue/_chunks/{PkToolShowSources-Cc26LzRd.js.map → PkToolShowSources-BUjBSGc5.js.map} +1 -1
  87. package/dist-vue/_chunks/{PkToolShowVideo-Bv9kMd88.js → PkToolShowVideo-BZOTu2Qe.js} +3 -3
  88. package/dist-vue/_chunks/PkToolShowVideo-BZOTu2Qe.js.map +1 -0
  89. package/dist-vue/_chunks/{PkToolShowWebPages-D3Xy4iUs.js → PkToolShowWebPages-DEih8h5k.js} +2 -2
  90. package/dist-vue/_chunks/{PkToolShowWebPages-D3Xy4iUs.js.map → PkToolShowWebPages-DEih8h5k.js.map} +1 -1
  91. package/dist-vue/_chunks/{PkUrl-BgMBemSz.js → PkUrl-3NH9t-WA.js} +2 -2
  92. package/dist-vue/_chunks/{PkUrl-BgMBemSz.js.map → PkUrl-3NH9t-WA.js.map} +1 -1
  93. package/dist-vue/_chunks/url-validation-uLMZ5-AU.js.map +1 -1
  94. package/dist-vue/_chunks/{useChatbotStore-CMS2zFht.js → useChatbotStore-BwrBZJCq.js} +944 -1259
  95. package/dist-vue/_chunks/useChatbotStore-BwrBZJCq.js.map +1 -0
  96. package/dist-vue/_chunks/utils-BL4Ppr2R.js +184 -0
  97. package/dist-vue/_chunks/utils-BL4Ppr2R.js.map +1 -0
  98. package/dist-vue/_chunks/{web-Dzr6HJ14.js → web-CEmtEYdH.js} +89 -65
  99. package/dist-vue/_chunks/web-CEmtEYdH.js.map +1 -0
  100. package/dist-vue/apps/web-component/src/composables/useChatbotAuth.d.ts +1 -3
  101. package/dist-vue/apps/web-component/src/composables/useChatbotAuthForm.d.ts +0 -1
  102. package/dist-vue/composables.js +2841 -103
  103. package/dist-vue/composables.js.map +1 -1
  104. package/dist-vue/index.js +261 -206
  105. package/dist-vue/index.js.map +1 -1
  106. package/dist-vue/locales.js +16 -20
  107. package/dist-vue/packages/auth/src/social-redirect-plugin.d.ts +18 -12
  108. package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +2 -2
  109. package/dist-vue/packages/components/src/chat/markdownHtml.d.ts +20 -0
  110. package/dist-vue/packages/components/src/chat/utils.d.ts +9 -0
  111. package/dist-vue/packages/models/src/schema/AgentApiTool.d.ts +70 -0
  112. package/dist-vue/packages/models/src/schema/Lead.d.ts +13 -0
  113. package/dist-vue/packages/models/src/schema/Media.d.ts +0 -1
  114. package/dist-vue/packages/models/src/schema/ModelProvider.d.ts +12 -3
  115. package/dist-vue/packages/models/src/schema/Organization.d.ts +3 -3
  116. package/dist-vue/packages/models/src/schema/User.d.ts +10 -0
  117. package/dist-vue/packages/models/src/schema/constants.d.ts +1 -1
  118. package/dist-vue/style.css +1 -1
  119. package/package.json +4 -3
  120. package/dist/_chunks/Agent-DTLrWpzX.js +0 -460
  121. package/dist/_chunks/Agent-DTLrWpzX.js.map +0 -1
  122. package/dist/_chunks/Media-Cft7Pwrh.js +0 -108
  123. package/dist/_chunks/Media-Cft7Pwrh.js.map +0 -1
  124. package/dist/_chunks/PkStreamingMarkdown-CRlRDGYl.js.map +0 -1
  125. package/dist/_chunks/PkToolShowVideo-Djr8Ofsz.js.map +0 -1
  126. package/dist/_chunks/markdown-BRD-hDrH.js.map +0 -1
  127. package/dist/_chunks/web-Dzr6HJ14.js.map +0 -1
  128. package/dist-vue/_chunks/Document-B6RpxFr9.js.map +0 -1
  129. package/dist-vue/_chunks/PkChatbotAuth-AxAOI9t2.js.map +0 -1
  130. package/dist-vue/_chunks/PkChatbotMessages-BsT48S-h.js +0 -776
  131. package/dist-vue/_chunks/PkChatbotMessages-BsT48S-h.js.map +0 -1
  132. package/dist-vue/_chunks/PkChatbotSteps-jW07Q-4x.js +0 -190
  133. package/dist-vue/_chunks/PkStreamingMarkdown-BoEpwaYQ.js +0 -2430
  134. package/dist-vue/_chunks/PkStreamingMarkdown-BoEpwaYQ.js.map +0 -1
  135. package/dist-vue/_chunks/PkToolShowVideo-Bv9kMd88.js.map +0 -1
  136. package/dist-vue/_chunks/useChatbotStore-CMS2zFht.js.map +0 -1
  137. package/dist-vue/_chunks/utils-h4C7rRcu.js +0 -177
  138. package/dist-vue/_chunks/utils-h4C7rRcu.js.map +0 -1
  139. package/dist-vue/_chunks/web-Dzr6HJ14.js.map +0 -1
@@ -229,7 +229,7 @@ var e = {
229
229
  fileUploadMaxFilesPerChat: "Max files per chat",
230
230
  webSearch: "Web search",
231
231
  toolWorkingSet: "Tool selection",
232
- toolWorkingSetMode: "Show the agent only the tools a message needs",
232
+ toolWorkingSetMode: "Mode",
233
233
  deprecated: "Deprecated",
234
234
  whatsapp: "WhatsApp",
235
235
  teams: "Microsoft Teams",
@@ -397,7 +397,6 @@ var e = {
397
397
  dismissableNotice: "It will be hidden after the first message.",
398
398
  privacyPolicyNotice: "Displayed at the bottom of the contact form. Supports Markdown.",
399
399
  fileUploadEnabled: "Allow users to attach files to their messages.",
400
- toolWorkingSetMode: "Before each reply, an evaluation model (TypeSafe Jev, through the AI gateway) picks the MCP servers, API tools and sub-agents the message needs, and the agent sees only those: a shorter context and quicker replies. When the agent needs another one, it brings it back on its own. In shadow mode the choice is only recorded, to compare it with the tools the agent actually uses.",
401
400
  approvalChannels: "A tool can ask the user to confirm before it runs: expand a tool to turn it on. On API endpoints and scheduled runs the call is refused.",
402
401
  platformSupported: "Renders natively on WhatsApp and Teams",
403
402
  tool: {
@@ -542,20 +541,19 @@ var e = {
542
541
  prompt: "Your confirmation is needed to continue:"
543
542
  },
544
543
  toolSelection: {
545
- title: "Tool selection",
546
- failed: "Failed",
547
- exposed: "Exposed",
548
- threshold: "threshold {threshold}",
549
- latency: "Time",
550
- budget: "limit {budget} ms",
551
- cost: "Cost",
544
+ exposed: "Groups exposed to the model: probability {threshold} or higher, or used earlier",
545
+ latency: "Evaluation time, limit {budget} ms",
546
+ cost: "Cost charged to the organization: {cost}",
552
547
  notCharged: "Not charged",
553
548
  inputTokens: "Input tokens",
549
+ title: "Tool selection",
550
+ failed: "Failed",
551
+ leadFailed: "The evaluation failed or did not answer within {budget} ms: every group stayed exposed.",
554
552
  tools: "{n} tool | {n} tools",
555
553
  missed: "Missed",
556
554
  used: "Used",
557
555
  enabled: "Brought back",
558
- seeded: "From the conversation",
556
+ seeded: "Used earlier",
559
557
  probability: "Probability that the message needs the group; exposed from {threshold}"
560
558
  },
561
559
  validation: { invalidPhoneNumber: "The number entered is incorrect" },
@@ -800,7 +798,7 @@ var e = {
800
798
  fileUploadMaxFilesPerChat: "File massimi per chat",
801
799
  webSearch: "Ricerca web",
802
800
  toolWorkingSet: "Selezione dei tool",
803
- toolWorkingSetMode: "Mostra all’agente solo i tool che servono al messaggio",
801
+ toolWorkingSetMode: "Modalità",
804
802
  deprecated: "Deprecato",
805
803
  whatsapp: "WhatsApp",
806
804
  teams: "Microsoft Teams",
@@ -968,7 +966,6 @@ var e = {
968
966
  dismissableNotice: "Verrà nascosto dopo il primo messaggio.",
969
967
  privacyPolicyNotice: "Visibile del modulo di contatto.",
970
968
  fileUploadEnabled: "Permetti agli utenti di allegare file ai messaggi.",
971
- toolWorkingSetMode: "Prima di ogni risposta un modello di valutazione (TypeSafe Jev, tramite il gateway AI) sceglie i server MCP, gli API Tools e i sotto-agenti che servono al messaggio, e l’agente vede solo quelli: contesto più corto e risposte più rapide. Quando gliene serve un altro, l’agente lo riattiva da solo. In modalità ombra la scelta viene solo registrata, per confrontarla con i tool che l’agente usa davvero.",
972
969
  approvalChannels: "Un tool può chiedere conferma all'utente prima di eseguire: espandi il tool per attivarla. Via API o in esecuzioni schedulate la chiamata viene rifiutata.",
973
970
  platformSupported: "Resa nativa su WhatsApp e Teams",
974
971
  tool: {
@@ -1113,20 +1110,19 @@ var e = {
1113
1110
  prompt: "Per continuare serve la tua conferma:"
1114
1111
  },
1115
1112
  toolSelection: {
1116
- title: "Selezione dei tool",
1117
- failed: "Non riuscita",
1118
- exposed: "Esposti",
1119
- threshold: "soglia {threshold}",
1120
- latency: "Tempo",
1121
- budget: "limite {budget} ms",
1122
- cost: "Costo",
1113
+ exposed: "Gruppi esposti al modello: probabilità da {threshold} in su, o usati prima",
1114
+ latency: "Tempo della valutazione, limite {budget} ms",
1115
+ cost: "Costo addebitato all’organizzazione: {cost}",
1123
1116
  notCharged: "Non addebitata",
1124
1117
  inputTokens: "Token in ingresso",
1118
+ title: "Selezione dei tool",
1119
+ failed: "Non riuscita",
1120
+ leadFailed: "La valutazione non è riuscita o non ha risposto entro {budget} ms: tutti i gruppi sono rimasti esposti.",
1125
1121
  tools: "{n} tool | {n} tool",
1126
1122
  missed: "Mancato",
1127
1123
  used: "Usato",
1128
1124
  enabled: "Riattivato",
1129
- seeded: "Dalla conversazione",
1125
+ seeded: "Usato in precedenza",
1130
1126
  probability: "Probabilità che il messaggio abbia bisogno del gruppo; esposto da {threshold}"
1131
1127
  },
1132
1128
  validation: { invalidPhoneNumber: "Il numero inserito non è corretto" },
@@ -1,22 +1,28 @@
1
1
  import { BetterAuthPlugin } from 'better-auth';
2
2
  /**
3
- * Backs the widget social-login OAuth popup flow end to end.
3
+ * Whether `value` is exactly one of the trusted origins: a bare origin, listed
4
+ * as it is. better-auth matches its trusted origins as patterns, so an agent
5
+ * whose trusted origins hold `*` would let any page through; the CORS plugin
6
+ * (apps/backend/src/plugins/fastifyCors.ts) compares them exactly, and a widget
7
+ * whose host it refuses cannot run anyway.
8
+ */
9
+ export declare function isListedOrigin(value: string, trusted: string[]): boolean;
10
+ /**
11
+ * Backs the social sign-in that runs in a browser window on the backend origin.
4
12
  *
5
13
  * `socialRedirect` initiates the flow through a top-level GET navigation instead
6
14
  * of the default `POST /sign-in/social` XHR call. Better-auth's social sign-in
7
15
  * sets a signed `state` cookie that the OAuth callback verifies (CSRF
8
- * protection). When the flow is started from an XHR on a different origin (e.g.
9
- * the embeddable widget, or any cross-site context), that `Set-Cookie` is a
10
- * third-party cookie and modern browsers drop it, so the callback fails with
11
- * `state_mismatch`. By navigating the browser (popup or full page) directly to
16
+ * protection). When the flow is started from an XHR on a different origin, that
17
+ * `Set-Cookie` is a third-party cookie and modern browsers drop it, so the
18
+ * callback fails with `state_mismatch`. By navigating the browser directly to
12
19
  * this endpoint on the backend origin, the `state` cookie is set first-party and
13
- * survives, both in development and in production on customer domains. It mirrors
14
- * the redirect branch of core `signInSocial`, reusing `generateState` so the
15
- * stored state stays compatible with the standard OAuth callback.
20
+ * survives. It mirrors the redirect branch of core `signInSocial`, reusing
21
+ * `generateState` so the stored state stays compatible with the standard OAuth
22
+ * callback. The frontend uses it; the widget's popup uses `oauthPopup`, whose
23
+ * callback hands back the token of the session it just created, and only to the
24
+ * origin that started it.
16
25
  *
17
- * `widgetOAuthCallback` is the landing page the popup ends on after the OAuth
18
- * callback completes (it's the `callbackURL` passed to `socialRedirect`). It runs
19
- * on the backend origin so it can read the first-party session cookie and post the
20
- * Bearer token back to the widget opener.
26
+ * The before hook narrows the origin `oauthPopup` accepts to the listed ones.
21
27
  */
22
28
  export declare function socialRedirect(): BetterAuthPlugin;
@@ -119,9 +119,9 @@ type __VLS_ModelProps = {
119
119
  } | undefined;
120
120
  };
121
121
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
122
- declare var __VLS_760: {};
122
+ declare var __VLS_766: {};
123
123
  type __VLS_Slots = {} & {
124
- default?: (props: typeof __VLS_760) => any;
124
+ default?: (props: typeof __VLS_766) => any;
125
125
  };
126
126
  declare const __VLS_base: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
127
127
  "update:reasoning": (value: {
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Escapes text for the inside of an HTML element.
3
+ */
4
+ export declare function escapeHtml(text: string): string;
5
+ /**
6
+ * The placeholder a formula waits in until KaTeX renders it. The formula is
7
+ * percent-encoded, not entity-encoded: the sanitizer drops an attribute whose
8
+ * value holds `]>` or `-->`, and a formula can (`[a,b]>0`). The encoding has
9
+ * no quote either, so the formula cannot close the attribute.
10
+ */
11
+ export declare function renderKatexPlaceholder(text: string, displayMode: boolean): string;
12
+ /**
13
+ * Cleans the HTML rendered from a markdown before it reaches `v-html`. The
14
+ * markdown is written by a model, and through the knowledge base, the tools and
15
+ * the pages it reads, by whoever wrote those; marked passes the HTML it finds
16
+ * through untouched, so a handler written in a document ran in the browser of
17
+ * whoever read the answer. Scripts, handlers, `javascript:` urls, styles and
18
+ * forms go, the formatting stays.
19
+ */
20
+ export declare function sanitizeMarkdownHtml(html: string): string;
@@ -7,6 +7,15 @@ export { isTextPart, isFilePart, isToolPart, isReasoningPart, hasPartText, hasTe
7
7
  * that should logically be a single block of text.
8
8
  */
9
9
  export declare function mergeConsecutiveTextParts(parts: UIMessage['parts']): UIMessage['parts'];
10
+ /**
11
+ * Drops a widget call refused for its arguments when a later call of the same
12
+ * widget in the message was drawn: the turn corrected it (the backend's
13
+ * `correctableInputRefusals`), and the refusal would sit next to the working
14
+ * widget, `showForm` drawing its render error above the form. A refusal with
15
+ * nothing drawn after it stays. Only the feed reads this: the steps timeline
16
+ * keeps every call, the refused one included.
17
+ */
18
+ export declare function dropCorrectedWidgetErrors(parts: UIMessage['parts']): UIMessage['parts'];
10
19
  export declare function isStreamingPart(part: UIMessage['parts'][number] | null | undefined): part is Extract<UIMessage['parts'][number], {
11
20
  streaming?: boolean;
12
21
  }>;
@@ -4,6 +4,59 @@ export declare enum AgentApiToolStatus {
4
4
  Active = "active",
5
5
  Inactive = "inactive"
6
6
  }
7
+ /**
8
+ * Where a secret parameter goes in the request. Never the path: a path
9
+ * parameter is filled by the model, and its value ends up in every log line
10
+ * that prints the URL.
11
+ */
12
+ export declare enum AgentApiToolSecretPosition {
13
+ Query = "query",
14
+ Body = "body"
15
+ }
16
+ /** The methods that send a JSON body, the only ones a `body` secret fits. */
17
+ export declare function isApiToolBodyMethod(method: HttpMethod | string): boolean;
18
+ /**
19
+ * A secret parameter as the API returns it: whether a value is stored, never
20
+ * the value, not even encrypted (the same contract as `hasApiKey` on the
21
+ * organization's model provider).
22
+ */
23
+ export declare const AgentApiToolSecretParameterSchema: z.ZodObject<{
24
+ name: z.ZodString;
25
+ position: z.ZodEnum<typeof AgentApiToolSecretPosition>;
26
+ hasValue: z.ZodBoolean;
27
+ }, z.core.$strip>;
28
+ /**
29
+ * A secret parameter as a save sends it. The form is never given the stored
30
+ * value, so it cannot send it back: on an update an empty or missing value
31
+ * keeps the one stored under the same name and position. A value that is
32
+ * needed and missing (any of them on a create) is refused by the service with
33
+ * a reason the interface translates, not here, where it would read as a bare
34
+ * validation error.
35
+ */
36
+ export declare const AgentApiToolSecretParameterDtoSchema: z.ZodObject<{
37
+ name: z.ZodString;
38
+ position: z.ZodEnum<typeof AgentApiToolSecretPosition>;
39
+ value: z.ZodOptional<z.ZodString>;
40
+ }, z.core.$strip>;
41
+ /**
42
+ * The public parameters whose name looks like a credential: `apikey`,
43
+ * `api_key`, `token`, `secret` or `password` as a word of the name, in any
44
+ * case and spelling (`apiKey`, `x-api-key`, `access_token`, `clientSecret`).
45
+ * The model fills them, so the value it is given ends up in the schema of
46
+ * every turn and in the input the turn keeps. A parameter already declared
47
+ * secret is not public and is left out.
48
+ */
49
+ export declare function credentialLikeParameters(inputSchema: Record<string, unknown> | null | undefined, secretNames?: Iterable<string>): string[];
50
+ /**
51
+ * A secret parameter as stored in `agent_api_tools.secret_parameters`, with
52
+ * `value` encrypted by `encryptSecret`. Backend only: it never reaches a
53
+ * response.
54
+ */
55
+ export type AgentApiToolStoredSecretParameter = {
56
+ name: string;
57
+ position: AgentApiToolSecretPosition;
58
+ value: string;
59
+ };
7
60
  export declare const AgentApiToolSchema: z.ZodObject<{
8
61
  id: z.ZodString;
9
62
  agentId: z.ZodString;
@@ -18,6 +71,11 @@ export declare const AgentApiToolSchema: z.ZodObject<{
18
71
  key: z.ZodString;
19
72
  value: z.ZodString;
20
73
  }, z.core.$strip>>>>>;
74
+ secretParameters: z.ZodDefault<z.ZodArray<z.ZodObject<{
75
+ name: z.ZodString;
76
+ position: z.ZodEnum<typeof AgentApiToolSecretPosition>;
77
+ hasValue: z.ZodBoolean;
78
+ }, z.core.$strip>>>;
21
79
  inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
22
80
  outputSchema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
23
81
  timeout: z.ZodDefault<z.ZodNumber>;
@@ -42,6 +100,11 @@ export declare const AgentApiToolCreateSchema: z.ZodObject<{
42
100
  key: z.ZodString;
43
101
  value: z.ZodString;
44
102
  }, z.core.$strip>>>>>;
103
+ secretParameters: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
104
+ name: z.ZodString;
105
+ position: z.ZodEnum<typeof AgentApiToolSecretPosition>;
106
+ value: z.ZodOptional<z.ZodString>;
107
+ }, z.core.$strip>>>>;
45
108
  inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
46
109
  outputSchema: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
47
110
  timeout: z.ZodOptional<z.ZodNumber>;
@@ -59,6 +122,11 @@ export declare const AgentApiToolUpdateSchema: z.ZodObject<{
59
122
  key: z.ZodString;
60
123
  value: z.ZodString;
61
124
  }, z.core.$strip>>>>>;
125
+ secretParameters: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
126
+ name: z.ZodString;
127
+ position: z.ZodEnum<typeof AgentApiToolSecretPosition>;
128
+ value: z.ZodOptional<z.ZodString>;
129
+ }, z.core.$strip>>>>;
62
130
  inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
63
131
  outputSchema: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
64
132
  timeout: z.ZodOptional<z.ZodNumber>;
@@ -81,4 +149,6 @@ export declare const AgentApiToolQuerystringSchema: z.ZodObject<{
81
149
  export type AgentApiTool = z.infer<typeof AgentApiToolSchema>;
82
150
  export type AgentApiToolCreate = z.infer<typeof AgentApiToolCreateSchema>;
83
151
  export type AgentApiToolUpdate = z.infer<typeof AgentApiToolUpdateSchema>;
152
+ export type AgentApiToolSecretParameter = z.infer<typeof AgentApiToolSecretParameterSchema>;
153
+ export type AgentApiToolSecretParameterDto = z.infer<typeof AgentApiToolSecretParameterDtoSchema>;
84
154
  export type AgentApiToolQuerystring = z.infer<typeof AgentApiToolQuerystringSchema>;
@@ -119,6 +119,18 @@ export declare const LeadCreateDtoSchema: z.ZodObject<{
119
119
  budget: z.ZodOptional<z.ZodString>;
120
120
  }, z.core.$strip>>;
121
121
  }, z.core.$strip>;
122
+ /**
123
+ * What the public lead route answers: the submission's own fields back, and
124
+ * nothing the server holds. The same answer whether the email was new, was
125
+ * the caller's, or already held another visitor's lead, so it cannot tell
126
+ * them apart.
127
+ */
128
+ export declare const LeadSubmissionSchema: z.ZodObject<{
129
+ name: z.ZodString;
130
+ chatId: z.ZodString;
131
+ agentId: z.ZodString;
132
+ email: z.ZodEmail;
133
+ }, z.core.$strip>;
122
134
  /**
123
135
  * Lead update schema for PUT endpoint (private/backoffice)
124
136
  */
@@ -200,5 +212,6 @@ export declare const LeadsQuerystringSchema: z.ZodObject<{
200
212
  */
201
213
  export type Lead = z.infer<typeof LeadSchema>;
202
214
  export type LeadCreateDto = z.infer<typeof LeadCreateDtoSchema>;
215
+ export type LeadSubmission = z.infer<typeof LeadSubmissionSchema>;
203
216
  export type LeadUpdateDto = z.infer<typeof LeadUpdateDtoSchema>;
204
217
  export type LeadsQuerystring = z.infer<typeof LeadsQuerystringSchema>;
@@ -2,7 +2,6 @@ import { z } from 'zod';
2
2
  export declare const MAX_FILE_SIZE: number;
3
3
  export declare const MIME_TYPE_REGEX: RegExp;
4
4
  export declare const SUPPORTED_IMAGE_TYPES: readonly ["image/jpeg", "image/png", "image/gif", "image/webp", "image/svg+xml"];
5
- export declare const SUPPORTED_DOCUMENT_TYPES: readonly ["application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "text/plain", "text/markdown"];
6
5
  export declare const SUPPORTED_VIDEO_TYPES: readonly ["video/mp4", "video/webm", "video/ogg"];
7
6
  export declare const SUPPORTED_AUDIO_TYPES: readonly ["audio/mpeg", "audio/wav", "audio/ogg"];
8
7
  export declare enum StoragePolicy {
@@ -69,13 +69,15 @@ export declare const ByokEmbeddingFamilySchema: z.ZodEnum<{
69
69
  "openai/text-embedding-3-large": "openai/text-embedding-3-large";
70
70
  }>;
71
71
  /**
72
- * How the two families read on a page: the product name and its producer.
73
- * Here with the list, because the gateway catalog the pages read holds the
72
+ * How the two families read on a page: the product name, its producer and
73
+ * the producer's logo (the one the catalog gives its language models). Here
74
+ * with the list, because the gateway catalog the pages read holds the
74
75
  * language models only.
75
76
  */
76
77
  export declare const BYOK_EMBEDDING_FAMILY_NAMES: Record<ByokEmbeddingFamily, {
77
78
  label: string;
78
79
  brand: string;
80
+ brandIcon: string;
79
81
  }>;
80
82
  /**
81
83
  * The semantic space a vector belongs to. Two vectors are comparable only
@@ -107,7 +109,7 @@ export declare const EMBEDDING_MODEL_PAYLOAD_KEY = "embedding_model";
107
109
  *
108
110
  * gemini is the calibration the platform has run on; the OpenAI row was
109
111
  * measured on 2026-09-22 and accepted on 2026-09-24
110
- * (`docs/specs/organization-byok-embedding.md`, D2 and F0), to be checked on
112
+ * (`docs/specs/released/organization-byok-embedding.md`, D2 and F0), to be checked on
111
113
  * the customer's own knowledge base before it is activated for them.
112
114
  */
113
115
  export declare const DENSE_SIMILARITY_FLOORS: Record<EmbeddingFamily, {
@@ -348,6 +350,9 @@ export declare const DiscoveredModelSchema: z.ZodObject<{
348
350
  id: z.ZodString;
349
351
  listingMatch: z.ZodNullable<z.ZodString>;
350
352
  kind: z.ZodEnum<typeof DiscoveredModelKind>;
353
+ brand: z.ZodOptional<z.ZodString>;
354
+ brandIcon: z.ZodOptional<z.ZodString>;
355
+ releasedAt: z.ZodOptional<z.ZodString>;
351
356
  }, z.core.$strip>;
352
357
  export type DiscoveredModel = z.infer<typeof DiscoveredModelSchema>;
353
358
  export declare const ModelProviderDiscoverResponseSchema: z.ZodObject<{
@@ -355,6 +360,9 @@ export declare const ModelProviderDiscoverResponseSchema: z.ZodObject<{
355
360
  id: z.ZodString;
356
361
  listingMatch: z.ZodNullable<z.ZodString>;
357
362
  kind: z.ZodEnum<typeof DiscoveredModelKind>;
363
+ brand: z.ZodOptional<z.ZodString>;
364
+ brandIcon: z.ZodOptional<z.ZodString>;
365
+ releasedAt: z.ZodOptional<z.ZodString>;
358
366
  }, z.core.$strip>>;
359
367
  listingUnavailable: z.ZodBoolean;
360
368
  }, z.core.$strip>;
@@ -399,6 +407,7 @@ export declare const ModelCatalogEntrySchema: z.ZodObject<{
399
407
  priceEstimated: z.ZodBoolean;
400
408
  contextWindow: z.ZodOptional<z.ZodNumber>;
401
409
  maxOutputTokens: z.ZodOptional<z.ZodNumber>;
410
+ releasedAt: z.ZodOptional<z.ZodString>;
402
411
  inputModalities: z.ZodOptional<z.ZodArray<z.ZodString>>;
403
412
  reasoning: z.ZodOptional<z.ZodObject<{
404
413
  effortLevels: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -302,9 +302,9 @@ export type OrganizationModelDefaults = z.infer<typeof OrganizationModelDefaults
302
302
  * shape would turn the first switch into a silent change of mode, from
303
303
  * "follow the platform" to "frozen at today's list". The price is on the
304
304
  * other side: a newly curated model appears switched on even for an
305
- * organization that curated its list, which is acceptable because this
306
- * switch is curation, not security (an agent left on a switched off model
307
- * keeps answering).
305
+ * organization that curated its list. A switched off model never answers:
306
+ * an agent left on it answers with the organization's default, and a
307
+ * fallback on it is dropped (`applyModelSwitches` in the backend).
308
308
  */
309
309
  export declare const OrganizationModelSettingsSchema: z.ZodObject<{
310
310
  agentModel: z.ZodOptional<z.ZodString>;
@@ -1,5 +1,15 @@
1
1
  import { StoragePolicy } from './Media';
2
2
  import * as z from 'zod';
3
+ /** Shortest password better-auth accepts, see `packages/auth`. */
4
+ export declare const PASSWORD_MIN_LENGTH = 8;
5
+ /**
6
+ * Longest password better-auth accepts. Since better-auth 1.7.6 a longer one
7
+ * is refused on sign-in too (`PASSWORD_TOO_LONG`), so every form checks it
8
+ * before sending and shows the translated validation error instead.
9
+ */
10
+ export declare const PASSWORD_MAX_LENGTH = 64;
11
+ /** A password as better-auth accepts it, for every form that sends one. */
12
+ export declare const PasswordSchema: z.ZodString;
3
13
  export declare const UserSchema: z.ZodObject<{
4
14
  id: z.ZodString;
5
15
  name: z.ZodString;
@@ -17,7 +17,7 @@
17
17
  * A test checks every id against a saved copy of the listing, which is what
18
18
  * replaces the by-hand verification that missed a model on 2026-09-18.
19
19
  */
20
- export declare const GATEWAY_MODELS: readonly ["openai/gpt-5-nano", "openai/gpt-5-mini", "openai/gpt-5.1-thinking", "openai/gpt-5.2", "openai/gpt-5.4-nano", "openai/gpt-5.4-mini", "openai/gpt-5.4", "openai/gpt-5.4-pro", "openai/gpt-5.5", "openai/gpt-5.5-pro", "openai/gpt-5.6-luna", "openai/gpt-5.6-terra", "openai/gpt-5.6-sol", "openai/gpt-5.6-luna-fast", "openai/gpt-5.6-terra-fast", "openai/gpt-5.6-sol-fast", "openai/gpt-6-astra", "openai/gpt-6-astra-fast", "openai/gpt-6-sol", "openai/gpt-6-sol-fast", "openai/gpt-6-luna", "openai/gpt-6-luna-fast", "google/gemini-2.5-flash-lite", "google/gemini-2.5-flash", "google/gemini-2.5-pro", "google/gemini-3-flash", "google/gemini-3.1-pro-preview", "google/gemini-3.1-flash-lite", "google/gemini-3.5-flash", "google/gemini-3.5-flash-lite", "google/gemini-3.6-flash", "google/gemini-3.7-flash", "google/gemini-3.8-flash", "anthropic/claude-haiku-4.5", "anthropic/claude-sonnet-4.6", "anthropic/claude-sonnet-5", "anthropic/claude-sonnet-5.5", "anthropic/claude-opus-4.6", "anthropic/claude-opus-4.7", "anthropic/claude-opus-4.8", "anthropic/claude-opus-5", "anthropic/claude-opus-5-fast", "anthropic/claude-opus-5.5", "anthropic/claude-opus-5.5-fast", "anthropic/claude-fable-5", "anthropic/claude-fable-5.1", "deepseek/deepseek-v3.2", "deepseek/deepseek-v4-flash-0731", "deepseek/deepseek-v4.1-flash", "deepseek/deepseek-v4-pro-0813", "alibaba/qwen3.6-plus", "alibaba/qwen3.7-max", "alibaba/qwen3.7-plus", "alibaba/qwen3.7-flash", "alibaba/qwen3.8-flash", "alibaba/qwen3.8-max", "alibaba/qwen3.8-27b", "alibaba/qwen3.8-max-0902", "alibaba/qwen3.8-omni-flash", "alibaba/qwen3.8-max-prime", "spacexai/grok-4.3", "spacexai/grok-4.6", "spacexai/grok-4.7", "zai/glm-5.2", "zai/glm-5.2-fast", "zai/glm-5.3", "zai/glm-5.3-flash", "zai/glm-5.3-fast", "zai/glm-5.3-flashx", "meta/muse-spark-1.1", "meta/muse-spark-1.2", "meta/muse-spark-1.3", "moonshotai/kimi-k3", "moonshotai/kimi-k3-fast", "mistral/ministral-14b", "mistral/mistral-small", "mistral/mistral-medium-3.5", "mistral/mistral-large-3", "xiaomi/mimo-v2.6-flash", "xiaomi/mimo-v2.6-pro", "xiaomi/mimo-v2.6-pro-ultraspeed"];
20
+ export declare const GATEWAY_MODELS: readonly ["openai/gpt-5-nano", "openai/gpt-5-mini", "openai/gpt-5.1-thinking", "openai/gpt-5.2", "openai/gpt-5.4-nano", "openai/gpt-5.4-mini", "openai/gpt-5.4", "openai/gpt-5.4-pro", "openai/gpt-5.5", "openai/gpt-5.5-pro", "openai/gpt-5.6-luna", "openai/gpt-5.6-terra", "openai/gpt-5.6-sol", "openai/gpt-5.6-luna-fast", "openai/gpt-5.6-terra-fast", "openai/gpt-5.6-sol-fast", "openai/gpt-6-astra", "openai/gpt-6-astra-fast", "openai/gpt-6-sol", "openai/gpt-6-sol-fast", "openai/gpt-6-luna", "openai/gpt-6-luna-fast", "openai/gpt-6.1-sol", "openai/gpt-6.1-sol-fast", "google/gemini-2.5-flash-lite", "google/gemini-2.5-flash", "google/gemini-2.5-pro", "google/gemini-3-flash", "google/gemini-3.1-pro-preview", "google/gemini-3.1-flash-lite", "google/gemini-3.5-flash", "google/gemini-3.5-flash-lite", "google/gemini-3.6-flash", "google/gemini-3.7-flash", "google/gemini-3.8-flash", "anthropic/claude-haiku-4.5", "anthropic/claude-sonnet-4.6", "anthropic/claude-sonnet-5", "anthropic/claude-sonnet-5.5", "anthropic/claude-opus-4.6", "anthropic/claude-opus-4.7", "anthropic/claude-opus-4.8", "anthropic/claude-opus-5", "anthropic/claude-opus-5-fast", "anthropic/claude-opus-5.5", "anthropic/claude-opus-5.5-fast", "anthropic/claude-fable-5", "anthropic/claude-fable-5.1", "deepseek/deepseek-v3.2", "deepseek/deepseek-v4-flash-0731", "deepseek/deepseek-v4.1-flash", "deepseek/deepseek-v4-pro-0813", "alibaba/qwen3.6-plus", "alibaba/qwen3.7-max", "alibaba/qwen3.7-plus", "alibaba/qwen3.7-flash", "alibaba/qwen3.8-flash", "alibaba/qwen3.8-max", "alibaba/qwen3.8-27b", "alibaba/qwen3.8-max-0902", "alibaba/qwen3.8-omni-flash", "alibaba/qwen3.8-max-prime", "spacexai/grok-4.3", "spacexai/grok-4.6", "spacexai/grok-4.7", "zai/glm-5.2", "zai/glm-5.2-fast", "zai/glm-5.3", "zai/glm-5.3-flash", "zai/glm-5.3-fast", "zai/glm-5.3-flashx", "meta/muse-spark-1.1", "meta/muse-spark-1.2", "meta/muse-spark-1.3", "moonshotai/kimi-k3", "moonshotai/kimi-k3-fast", "mistral/ministral-14b", "mistral/mistral-small", "mistral/mistral-medium-3.5", "mistral/mistral-large-3", "xiaomi/mimo-v2.6-flash", "xiaomi/mimo-v2.6-pro", "xiaomi/mimo-v2.6-pro-ultraspeed"];
21
21
  /**
22
22
  * A model id: an entry of {@link GATEWAY_MODELS}, or a `byok/` id served by an
23
23
  * organization's own endpoint. A plain string on purpose, because the second