@8wave/ai-elements 0.97.0 → 0.98.0-beta.2

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 (112) hide show
  1. package/README.md +20 -18
  2. package/dist/_chunks/{Document-njJL_3oo.js → Document-CjCQXPDF.js} +54 -54
  3. package/dist/_chunks/{Document-njJL_3oo.js.map → Document-CjCQXPDF.js.map} +1 -1
  4. package/dist/_chunks/{PkStreamingMarkdown-Bns7j3b7.js → PkStreamingMarkdown-Djw604Ny.js} +43 -43
  5. package/dist/_chunks/PkStreamingMarkdown-Djw604Ny.js.map +1 -0
  6. package/dist/_chunks/{PkToolShowArtifact-BHGuiacA.js → PkToolShowArtifact-BaGEr7O9.js} +2 -2
  7. package/dist/_chunks/{PkToolShowArtifact-BHGuiacA.js.map → PkToolShowArtifact-BaGEr7O9.js.map} +1 -1
  8. package/dist/_chunks/{PkToolShowContactForm-Cp6fDIOT.js → PkToolShowContactForm-DEQBTzf4.js} +4 -4
  9. package/dist/_chunks/{PkToolShowContactForm-Cp6fDIOT.js.map → PkToolShowContactForm-DEQBTzf4.js.map} +1 -1
  10. package/dist/_chunks/{PkToolShowForm-BqUkMxMK.js → PkToolShowForm-AZwrmmM9.js} +2 -2
  11. package/dist/_chunks/{PkToolShowForm-BqUkMxMK.js.map → PkToolShowForm-AZwrmmM9.js.map} +1 -1
  12. package/dist/_chunks/{PkToolShowSources-Bg0QAcmF.js → PkToolShowSources-FnMkkdm6.js} +3 -3
  13. package/dist/_chunks/{PkToolShowSources-Bg0QAcmF.js.map → PkToolShowSources-FnMkkdm6.js.map} +1 -1
  14. package/dist/_chunks/{VvCheckbox.es-If2fZZst.js → VvCheckbox.es-D5d8k9yP.js} +2 -2
  15. package/dist/_chunks/{VvCheckbox.es-If2fZZst.js.map → VvCheckbox.es-D5d8k9yP.js.map} +1 -1
  16. package/dist/_chunks/{VvCheckboxGroup.es-A-IjEdQh.js → VvCheckboxGroup.es-DVnsOjX0.js} +2 -2
  17. package/dist/_chunks/{VvCheckboxGroup.es-A-IjEdQh.js.map → VvCheckboxGroup.es-DVnsOjX0.js.map} +1 -1
  18. package/dist/_chunks/{VvCombobox.es-DLRkNj0w.js → VvCombobox.es-CFA-K-cQ.js} +2 -2
  19. package/dist/_chunks/{VvCombobox.es-DLRkNj0w.js.map → VvCombobox.es-CFA-K-cQ.js.map} +1 -1
  20. package/dist/_chunks/{VvInputText.es-DV6kHrYx.js → VvInputText.es-csEQ-bSG.js} +2 -2
  21. package/dist/_chunks/{VvInputText.es-DV6kHrYx.js.map → VvInputText.es-csEQ-bSG.js.map} +1 -1
  22. package/dist/_chunks/{VvRadio.es-C_L52PYW.js → VvRadio.es-BpymhC73.js} +2 -2
  23. package/dist/_chunks/{VvRadio.es-C_L52PYW.js.map → VvRadio.es-BpymhC73.js.map} +1 -1
  24. package/dist/_chunks/{VvRadioGroup.es-B64sR46T.js → VvRadioGroup.es-CSNzOJKx.js} +2 -2
  25. package/dist/_chunks/{VvRadioGroup.es-B64sR46T.js.map → VvRadioGroup.es-CSNzOJKx.js.map} +1 -1
  26. package/dist/_chunks/{VvSelect.es-D_WR7HcC.js → VvSelect.es-CjKMd0nH.js} +2 -2
  27. package/dist/_chunks/{VvSelect.es-D_WR7HcC.js.map → VvSelect.es-CjKMd0nH.js.map} +1 -1
  28. package/dist/_chunks/{VvTextarea.es-DpF-slnp.js → VvTextarea.es-eEyRRpuT.js} +2 -2
  29. package/dist/_chunks/{VvTextarea.es-DpF-slnp.js.map → VvTextarea.es-eEyRRpuT.js.map} +1 -1
  30. package/dist/_chunks/index.es-BYny0uhz.js.map +1 -1
  31. package/dist/_chunks/{index.es-DN8D4nRq.js → index.es-eLFDkB2Y.js} +11 -11
  32. package/dist/_chunks/{index.es-DN8D4nRq.js.map → index.es-eLFDkB2Y.js.map} +1 -1
  33. package/dist/_chunks/{schemas-BsOP_5an.js → schemas-DnUKIqgi.js} +503 -503
  34. package/dist/_chunks/{schemas-BsOP_5an.js.map → schemas-DnUKIqgi.js.map} +1 -1
  35. package/dist/ai-elements.es.js +3836 -3743
  36. package/dist/ai-elements.es.js.map +1 -1
  37. package/dist-vue/PkChatbot.js +1 -1
  38. package/dist-vue/PkChatbotAuth.js +1 -1
  39. package/dist-vue/PkChatbotEmptyState.js +1 -1
  40. package/dist-vue/PkChatbotFeedbackForm.js +1 -1
  41. package/dist-vue/PkChatbotInput.js +1 -1
  42. package/dist-vue/PkChatbotMessages.js +1 -1
  43. package/dist-vue/PkChatbotSteps.js +1 -1
  44. package/dist-vue/PkChatbotViewChat.js +1 -1
  45. package/dist-vue/PkChatbotViewConversations.js +1 -1
  46. package/dist-vue/PkChatbotViewFiles.js +1 -1
  47. package/dist-vue/PkChatbotViewProfile.js +1 -1
  48. package/dist-vue/_chunks/{Document-q67u4D3u.js → Document-B8gv0e2O.js} +15 -15
  49. package/dist-vue/_chunks/{Document-q67u4D3u.js.map → Document-B8gv0e2O.js.map} +1 -1
  50. package/dist-vue/_chunks/{Media-BmW9F_3T.js → Media-B_7Yj-ml.js} +26 -26
  51. package/dist-vue/_chunks/{Media-BmW9F_3T.js.map → Media-B_7Yj-ml.js.map} +1 -1
  52. package/dist-vue/_chunks/{PkChatbot-A1jKttsQ.js → PkChatbot-CneS8fVC.js} +7 -7
  53. package/dist-vue/_chunks/{PkChatbot-A1jKttsQ.js.map → PkChatbot-CneS8fVC.js.map} +1 -1
  54. package/dist-vue/_chunks/{PkChatbotAuth-C0ATmt-9.js → PkChatbotAuth-C_L2xWuD.js} +4 -4
  55. package/dist-vue/_chunks/{PkChatbotAuth-C0ATmt-9.js.map → PkChatbotAuth-C_L2xWuD.js.map} +1 -1
  56. package/dist-vue/_chunks/{PkChatbotEmptyState-BGTSWFSS.js → PkChatbotEmptyState-BGOC6vxr.js} +2 -2
  57. package/dist-vue/_chunks/{PkChatbotEmptyState-BGTSWFSS.js.map → PkChatbotEmptyState-BGOC6vxr.js.map} +1 -1
  58. package/dist-vue/_chunks/{PkChatbotFeedbackForm-Dhsa1c06.js → PkChatbotFeedbackForm-BSe40qlc.js} +3 -3
  59. package/dist-vue/_chunks/{PkChatbotFeedbackForm-Dhsa1c06.js.map → PkChatbotFeedbackForm-BSe40qlc.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkChatbotInput-Be3J_Fgz.js → PkChatbotInput-DTazYlPd.js} +2 -2
  61. package/dist-vue/_chunks/{PkChatbotInput-Be3J_Fgz.js.map → PkChatbotInput-DTazYlPd.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkChatbotMessages-Cbn8okze.js → PkChatbotMessages-DEzcxcqc.js} +9 -9
  63. package/dist-vue/_chunks/{PkChatbotMessages-Cbn8okze.js.map → PkChatbotMessages-DEzcxcqc.js.map} +1 -1
  64. package/dist-vue/_chunks/{PkChatbotSteps-BhqYCNWy.js → PkChatbotSteps-BpqdFhsG.js} +2 -2
  65. package/dist-vue/_chunks/{PkChatbotSteps-BhqYCNWy.js.map → PkChatbotSteps-BpqdFhsG.js.map} +1 -1
  66. package/dist-vue/_chunks/{PkChatbotViewChat-Cc8bZfAr.js → PkChatbotViewChat-C7Xv2Oer.js} +6 -6
  67. package/dist-vue/_chunks/{PkChatbotViewChat-Cc8bZfAr.js.map → PkChatbotViewChat-C7Xv2Oer.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkChatbotViewConversations-BsfA4A7O.js → PkChatbotViewConversations-YbHHc8oD.js} +2 -2
  69. package/dist-vue/_chunks/{PkChatbotViewConversations-BsfA4A7O.js.map → PkChatbotViewConversations-YbHHc8oD.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkChatbotViewFiles-C6aouWQh.js → PkChatbotViewFiles-BPE0g2Jk.js} +3 -3
  71. package/dist-vue/_chunks/{PkChatbotViewFiles-C6aouWQh.js.map → PkChatbotViewFiles-BPE0g2Jk.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkChatbotViewProfile-B_ZAXIrC.js → PkChatbotViewProfile-B_gWPgVY.js} +2 -2
  73. package/dist-vue/_chunks/{PkChatbotViewProfile-B_ZAXIrC.js.map → PkChatbotViewProfile-B_gWPgVY.js.map} +1 -1
  74. package/dist-vue/_chunks/{PkStreamingMarkdown-CNLdk20r.js → PkStreamingMarkdown-DEhbK-3c.js} +43 -43
  75. package/dist-vue/_chunks/PkStreamingMarkdown-DEhbK-3c.js.map +1 -0
  76. package/dist-vue/_chunks/{PkToolShowArtifact-B2ilUNT0.js → PkToolShowArtifact-CTBwt4DN.js} +2 -2
  77. package/dist-vue/_chunks/{PkToolShowArtifact-B2ilUNT0.js.map → PkToolShowArtifact-CTBwt4DN.js.map} +1 -1
  78. package/dist-vue/_chunks/{PkToolShowContactForm-C3CXe6sh.js → PkToolShowContactForm-B6-MsExL.js} +4 -4
  79. package/dist-vue/_chunks/{PkToolShowContactForm-C3CXe6sh.js.map → PkToolShowContactForm-B6-MsExL.js.map} +1 -1
  80. package/dist-vue/_chunks/{PkToolShowForm-DnzUxm2o.js → PkToolShowForm-C-mWyeka.js} +2 -2
  81. package/dist-vue/_chunks/{PkToolShowForm-DnzUxm2o.js.map → PkToolShowForm-C-mWyeka.js.map} +1 -1
  82. package/dist-vue/_chunks/{PkToolShowSources-BF2-VGSg.js → PkToolShowSources-rGZz65c2.js} +3 -3
  83. package/dist-vue/_chunks/{PkToolShowSources-BF2-VGSg.js.map → PkToolShowSources-rGZz65c2.js.map} +1 -1
  84. package/dist-vue/_chunks/{constants-DtnBK4PW.js → constants-BSe0uxSf.js} +4 -4
  85. package/dist-vue/_chunks/{constants-DtnBK4PW.js.map → constants-BSe0uxSf.js.map} +1 -1
  86. package/dist-vue/_chunks/{createChatbotApiClient-BHfNaVk8.js → createChatbotApiClient-Bf5DbqVH.js} +125 -113
  87. package/dist-vue/_chunks/createChatbotApiClient-Bf5DbqVH.js.map +1 -0
  88. package/dist-vue/_chunks/{index.es-BODtrBxv.js → index.es-XfWQ82pb.js} +3 -3
  89. package/dist-vue/_chunks/{index.es-BODtrBxv.js.map → index.es-XfWQ82pb.js.map} +1 -1
  90. package/dist-vue/_chunks/{schemas-BsOP_5an.js → schemas-DnUKIqgi.js} +503 -503
  91. package/dist-vue/_chunks/{schemas-BsOP_5an.js.map → schemas-DnUKIqgi.js.map} +1 -1
  92. package/dist-vue/_chunks/{useChatbotStore-bbenzuMe.js → useChatbotStore-Cfx-qlC4.js} +778 -761
  93. package/dist-vue/_chunks/useChatbotStore-Cfx-qlC4.js.map +1 -0
  94. package/dist-vue/api.js +1 -1
  95. package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +6 -0
  96. package/dist-vue/apps/web-component/src/components/FloatingChatWidget.ce.d.ts +6 -0
  97. package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +6 -0
  98. package/dist-vue/apps/web-component/src/lib.d.ts +2 -0
  99. package/dist-vue/composables.js +5 -3
  100. package/dist-vue/composables.js.map +1 -1
  101. package/dist-vue/index.js +23 -23
  102. package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +134 -3
  103. package/dist-vue/packages/components/src/chat/PkMessageParts.d.ts +134 -3
  104. package/dist-vue/packages/composable/src/chatbot/api/index.d.ts +1 -0
  105. package/dist-vue/packages/composable/src/chatbot/api/resolveShortUrls.d.ts +16 -0
  106. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +24 -24
  107. package/dist-vue/packages/models/src/schema/McpServer.d.ts +4 -0
  108. package/package.json +3 -3
  109. package/dist/_chunks/PkStreamingMarkdown-Bns7j3b7.js.map +0 -1
  110. package/dist-vue/_chunks/PkStreamingMarkdown-CNLdk20r.js.map +0 -1
  111. package/dist-vue/_chunks/createChatbotApiClient-BHfNaVk8.js.map +0 -1
  112. package/dist-vue/_chunks/useChatbotStore-bbenzuMe.js.map +0 -1
@@ -1,6 +1,6 @@
1
- import { S as e, a as t, b as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, v as f, x as p } from "./schemas-BsOP_5an.js";
2
- import { i as m, n as ee, t as te } from "./Media-BmW9F_3T.js";
3
- import { a as ne, o as re, r as ie, s as h } from "./constants-DtnBK4PW.js";
1
+ import { S as e, _ as t, a as n, b as r, d as i, f as a, g as o, h as s, i as c, l, n as u, o as d, v as f, x as p } from "./schemas-DnUKIqgi.js";
2
+ import { i as m, n as ee, t as te } from "./Media-B_7Yj-ml.js";
3
+ import { a as ne, o as re, r as ie, s as h } from "./constants-BSe0uxSf.js";
4
4
  import "./src-8QXYVWIx.js";
5
5
  import { r as g, t as ae } from "./url-validation-uLMZ5-AU.js";
6
6
  import { Ability as oe, buildMongoQueryMatcher as se, createAliasResolver as ce } from "@casl/ability";
@@ -42,7 +42,7 @@ var v = /* @__PURE__ */ function(e) {
42
42
  "max"
43
43
  ]).optional(),
44
44
  display: u(["summarized", "omitted"]).optional(),
45
- budgetTokens: l().int().positive().optional()
45
+ budgetTokens: s().int().positive().optional()
46
46
  }), he = o({
47
47
  thinkingLevel: u([
48
48
  "minimal",
@@ -50,7 +50,7 @@ var v = /* @__PURE__ */ function(e) {
50
50
  "medium",
51
51
  "high"
52
52
  ]).optional(),
53
- thinkingBudget: l().int().optional(),
53
+ thinkingBudget: s().int().optional(),
54
54
  includeThoughts: d().optional()
55
55
  }), ge = o({ type: u(["enabled", "disabled"]).optional() }), _e = o({
56
56
  openai: pe.optional(),
@@ -73,7 +73,7 @@ function ve(e) {
73
73
  }
74
74
  return e;
75
75
  }
76
- var S = ne(n(), _e, ve).optional();
76
+ var S = ne(r(), _e, ve).optional();
77
77
  function ye(e, t) {
78
78
  if (!t) return !1;
79
79
  let [n = ""] = e.split("/");
@@ -118,17 +118,17 @@ function Se(e) {
118
118
  return xe.has(e);
119
119
  }
120
120
  var w = o({
121
- maxSteps: l().int().min(1).max(10).optional().default(5),
122
- maxOptionsPerStep: l().int().min(2).max(10).optional().default(5)
121
+ maxSteps: s().int().min(1).max(10).optional().default(5),
122
+ maxOptionsPerStep: s().int().min(2).max(10).optional().default(5)
123
123
  }), T = /* @__PURE__ */ function(e) {
124
124
  return e.Perplexity = "perplexity", e.Parallel = "parallel", e.Native = "native", e;
125
125
  }({}), Ce = o({
126
- maxResults: l().int().min(1).max(20).optional(),
127
- maxTokens: l().int().positive().max(1e6).optional(),
128
- maxTokensPerPage: l().int().positive().optional(),
126
+ maxResults: s().int().min(1).max(20).optional(),
127
+ maxTokens: s().int().positive().max(1e6).optional(),
128
+ maxTokensPerPage: s().int().positive().optional(),
129
129
  country: f().max(2).optional(),
130
- searchLanguageFilter: t(f().max(5)).max(10).optional(),
131
- searchDomainFilter: t(f()).max(20).optional(),
130
+ searchLanguageFilter: n(f().max(5)).max(10).optional(),
131
+ searchDomainFilter: n(f()).max(20).optional(),
132
132
  searchRecencyFilter: u([
133
133
  "day",
134
134
  "week",
@@ -137,25 +137,25 @@ var w = o({
137
137
  ]).optional()
138
138
  }), we = o({
139
139
  mode: u(["one-shot", "agentic"]).optional(),
140
- maxResults: l().int().min(1).max(20).optional(),
140
+ maxResults: s().int().min(1).max(20).optional(),
141
141
  sourcePolicy: o({
142
- includeDomains: t(f()).optional(),
143
- excludeDomains: t(f()).optional(),
142
+ includeDomains: n(f()).optional(),
143
+ excludeDomains: n(f()).optional(),
144
144
  afterDate: f().optional()
145
145
  }).optional(),
146
146
  excerpts: o({
147
- maxCharsPerResult: l().int().positive().optional(),
148
- maxCharsTotal: l().int().positive().optional()
147
+ maxCharsPerResult: s().int().positive().optional(),
148
+ maxCharsTotal: s().int().positive().optional()
149
149
  }).optional(),
150
- fetchPolicy: o({ maxAgeSeconds: l().int().positive().optional() }).optional()
150
+ fetchPolicy: o({ maxAgeSeconds: s().int().positive().optional() }).optional()
151
151
  }), Te = o({
152
152
  openai: o({}).optional(),
153
153
  anthropic: o({
154
- maxUses: l().int().positive().optional(),
155
- allowedDomains: t(f()).optional(),
156
- blockedDomains: t(f()).optional(),
154
+ maxUses: s().int().positive().optional(),
155
+ allowedDomains: n(f()).optional(),
156
+ blockedDomains: n(f()).optional(),
157
157
  userLocation: o({
158
- type: i("approximate").optional(),
158
+ type: a("approximate").optional(),
159
159
  country: f().optional(),
160
160
  region: f().optional(),
161
161
  city: f().optional(),
@@ -170,7 +170,7 @@ var w = o({
170
170
  parallel: we.optional(),
171
171
  native: Te.optional()
172
172
  }), D = o({ useAllUserKb: d().default(!1) }), O = o({ useAllUserFiles: d().default(!1) }), k = o({
173
- disabled: t(u(C)).default([
173
+ disabled: n(u(C)).default([
174
174
  C.UserMemory,
175
175
  C.SearchInUserFiles,
176
176
  C.RunWorker,
@@ -183,27 +183,27 @@ var w = o({
183
183
  }), A = o({
184
184
  freshness: o({
185
185
  enabled: d().default(!1),
186
- scale: l().int().min(86400).max(31536e3).default(7776e3),
187
- weight: l().min(.05).max(.5).default(.1)
186
+ scale: s().int().min(86400).max(31536e3).default(7776e3),
187
+ weight: s().min(.05).max(.5).default(.1)
188
188
  }).prefault({}),
189
189
  priority: o({ enabled: d().default(!0) }).prefault({}),
190
190
  mmr: o({
191
191
  enabled: d().default(!1),
192
- diversity: l().min(0).max(1).default(.3),
193
- candidatesLimit: l().int().min(20).max(100).default(50)
192
+ diversity: s().min(0).max(1).default(.3),
193
+ candidatesLimit: s().int().min(20).max(100).default(50)
194
194
  }).prefault({})
195
195
  }).prefault({}), Ee = o({
196
196
  prompt: f().optional(),
197
- temperature: l().min(0).max(2).optional().default(.6),
198
- maxOutputTokens: l().positive().optional(),
199
- presencePenalty: l().min(-2).max(2).optional(),
200
- frequencyPenalty: l().min(-2).max(2).optional(),
197
+ temperature: s().min(0).max(2).optional().default(.6),
198
+ maxOutputTokens: s().positive().optional(),
199
+ presencePenalty: s().min(-2).max(2).optional(),
200
+ frequencyPenalty: s().min(-2).max(2).optional(),
201
201
  searchMode: u(x).optional().default(x.Balanced),
202
- limit: l().positive().max(100).optional().default(10),
203
- maxStepCount: l().int().min(1).max(40).optional().default(10),
202
+ limit: s().positive().max(100).optional().default(10),
203
+ maxStepCount: s().int().min(1).max(40).optional().default(10),
204
204
  reasoning: S,
205
205
  ranking: A.optional().default(() => A.parse({}))
206
- }), j = ne(n(), a(f(), f()), (e) => typeof e == "string" ? { it: e } : e), M = "https://cdn.jsdelivr.net/npm/@8wave/ai-elements/dist/ai-elements.es.js", N = /* @__PURE__ */ function(e) {
206
+ }), j = ne(r(), t(f(), f()), (e) => typeof e == "string" ? { it: e } : e), M = "https://cdn.jsdelivr.net/npm/@8wave/ai-elements/dist/ai-elements.es.js", N = /* @__PURE__ */ function(e) {
207
207
  return e.InlineModule = "inline-module", e.ScriptSrc = "script-src", e.DynamicImport = "dynamic-import", e;
208
208
  }({}), P = /* @__PURE__ */ function(e) {
209
209
  return e.Frontoffice = "frontoffice", e.App = "app", e.Widget = "widget", e;
@@ -223,7 +223,7 @@ var w = o({
223
223
  ]).optional().default("auto"),
224
224
  useColorsForAgentHeader: d().optional().default(!1),
225
225
  initialMessage: j.optional(),
226
- greeting: t(j).min(1).max(10).optional(),
226
+ greeting: n(j).min(1).max(10).optional(),
227
227
  messagePlaceholder: j.optional(),
228
228
  dismissableNotice: j.optional(),
229
229
  footerMessage: j.optional(),
@@ -231,17 +231,17 @@ var w = o({
231
231
  interactiveLogin: d().optional().default(!0),
232
232
  welcomePopup: d().optional().default(!1),
233
233
  floatingButtonPosition: u(["left", "right"]).optional().default("right"),
234
- maxMessageLength: l().int().positive().optional(),
234
+ maxMessageLength: s().int().positive().optional(),
235
235
  widgetUrl: p().default(M),
236
- loadDelay: l().int().min(0).max(3e4).optional().default(0),
236
+ loadDelay: s().int().min(0).max(3e4).optional().default(0),
237
237
  loaderStrategy: u(N).optional().default(N.InlineModule),
238
238
  customCss: f().optional(),
239
239
  smoothStream: d().optional().default(!1),
240
240
  showExtendedSteps: d().optional().default(!1)
241
241
  }), L = o({
242
242
  enabled: d().default(!1),
243
- maxFileSizeBytes: l().int().positive().max(104857600).optional().default(20971520),
244
- allowedMimeTypes: t(f().regex(te)).optional().default([
243
+ maxFileSizeBytes: s().int().positive().max(104857600).optional().default(20971520),
244
+ allowedMimeTypes: n(f().regex(te)).optional().default([
245
245
  "image/jpeg",
246
246
  "image/png",
247
247
  "image/gif",
@@ -251,47 +251,47 @@ var w = o({
251
251
  "text/markdown",
252
252
  "text/csv"
253
253
  ]),
254
- maxFilesPerMessage: l().int().positive().max(10).optional().default(5),
255
- maxFilesPerChat: l().int().positive().max(50).optional().default(20)
254
+ maxFilesPerMessage: s().int().positive().max(10).optional().default(5),
255
+ maxFilesPerChat: s().int().positive().max(50).optional().default(20)
256
256
  }), R = o({
257
257
  zeroDataRetention: d().default(!0),
258
258
  disallowPromptTraining: d().default(!0),
259
- providerTimeoutMs: l().int().min(1e3).max(789e3).optional()
259
+ providerTimeoutMs: s().int().min(1e3).max(789e3).optional()
260
260
  }), z = o({
261
261
  model: Ee,
262
262
  interface: I,
263
263
  tools: k.optional().default(() => k.parse({})),
264
264
  fileUpload: L.optional().default(() => L.parse({})),
265
265
  gatewayOptions: R.optional().default(() => R.parse({})),
266
- channels: t(u(P)).optional().default(() => [...F]),
266
+ channels: n(u(P)).optional().default(() => [...F]),
267
267
  externalContextSchema: re.optional()
268
268
  }), B = o({
269
269
  rateLimits: o({
270
- minuteRateLimit: l().int().min(0).optional(),
271
- hourRateLimit: l().int().min(0).optional(),
272
- dayRateLimit: l().int().min(0).optional(),
273
- monthRateLimit: l().int().min(0).optional()
270
+ minuteRateLimit: s().int().min(0).optional(),
271
+ hourRateLimit: s().int().min(0).optional(),
272
+ dayRateLimit: s().int().min(0).optional(),
273
+ monthRateLimit: s().int().min(0).optional()
274
274
  }),
275
- trustedOrigins: o({ origins: t(p().or(i(""))).overwrite((e) => e?.filter((e) => e?.trim())).default([]) }).default({ origins: [] })
275
+ trustedOrigins: o({ origins: n(p().or(a(""))).overwrite((e) => e?.filter((e) => e?.trim())).default([]) }).default({ origins: [] })
276
276
  });
277
277
  o({
278
278
  id: f().optional(),
279
279
  name: f(),
280
280
  prompt: f().optional(),
281
281
  model: f().default(ie.gpt52Chat),
282
- fallbackModels: t(f()).default([]),
282
+ fallbackModels: n(f()).default([]),
283
283
  status: u(v).default(v.Draft),
284
284
  visibility: u(y).default(y.Organization),
285
285
  settings: z,
286
286
  security: B.nullish(),
287
287
  type: u(b).default(b.Chat),
288
288
  organizationId: f()
289
- }), r(() => o({
289
+ }), i(() => o({
290
290
  id: f(),
291
291
  name: f(),
292
292
  prompt: f(),
293
293
  model: f(),
294
- fallbackModels: t(f()).nullable().default([]),
294
+ fallbackModels: n(f()).nullable().default([]),
295
295
  status: u(v).default(v.Draft),
296
296
  visibility: u(y).default(y.Organization),
297
297
  settings: z,
@@ -318,7 +318,7 @@ var V = o({
318
318
  createdAt: m(),
319
319
  updatedAt: m(),
320
320
  capabilities: o({ fileUpload: L }),
321
- channels: t(u(P)).default(() => [...F])
321
+ channels: n(u(P)).default(() => [...F])
322
322
  }), De = I.pick({
323
323
  logo: !0,
324
324
  mainColor: !0,
@@ -335,17 +335,17 @@ var V = o({
335
335
  google: d(),
336
336
  microsoft: d()
337
337
  }), U = o({
338
- requiresAuth: i(!1),
338
+ requiresAuth: a(!1),
339
339
  agent: V,
340
- branding: s()
340
+ branding: c()
341
341
  }), W = o({
342
- requiresAuth: i(!0),
343
- agent: s(),
342
+ requiresAuth: a(!0),
343
+ agent: c(),
344
344
  branding: Oe
345
345
  });
346
- c("requiresAuth", [U, W]), c("requiresAuth", [U.extend({ authMethods: H }), W.extend({ authMethods: H })]), o({
346
+ l("requiresAuth", [U, W]), l("requiresAuth", [U.extend({ authMethods: H }), W.extend({ authMethods: H })]), o({
347
347
  id: e(),
348
- agentIds: t(e())
348
+ agentIds: n(e())
349
349
  }), o({
350
350
  ...h.pagination(),
351
351
  ...h.sort([
@@ -388,98 +388,98 @@ var ke = /* @__PURE__ */ function(e) {
388
388
  sentimentTrend: u(Ie).describe("How the user sentiment evolved during the conversation."),
389
389
  userTone: u(Pe).describe("Predominant tone of the user messages."),
390
390
  language: f().max(10).describe("ISO 639-1 language code of the conversation (e.g. \"en\", \"it\")."),
391
- topics: t(f().max(100)).max(10).describe("Main topics discussed, as short lowercase labels."),
391
+ topics: n(f().max(100)).max(10).describe("Main topics discussed, as short lowercase labels."),
392
392
  userAbuseDetected: d().describe("Whether user abuse was detected. If false, userAbuseCategories MUST be empty."),
393
- userAbuseCategories: t(u(ke)).default([]).describe("Abuse categories detected. Non-empty only if userAbuseDetected is true."),
393
+ userAbuseCategories: n(u(ke)).default([]).describe("Abuse categories detected. Non-empty only if userAbuseDetected is true."),
394
394
  userAbuseConfidence: u(Ae).optional().describe("Confidence level of the abuse detection. Set only if userAbuseDetected is true."),
395
395
  userAbuseSummary: f().max(500).optional().describe("Brief description of the abusive behavior detected. Always write in English. Set only if userAbuseDetected is true."),
396
396
  llmIssueDetected: d().describe("Whether an LLM quality issue was detected. If false, llmIssueCategories MUST be empty."),
397
- llmIssueCategories: t(u(je)).default([]).describe("LLM issue categories detected. Non-empty only if llmIssueDetected is true."),
397
+ llmIssueCategories: n(u(je)).default([]).describe("LLM issue categories detected. Non-empty only if llmIssueDetected is true."),
398
398
  llmIssueSummary: f().max(500).optional().describe("Brief description of the LLM quality issue detected. Always write in English. Set only if llmIssueDetected is true."),
399
399
  userEngagement: u(Ne).describe("Level of user engagement in the conversation."),
400
400
  conversationGoalMet: d().optional().describe("Whether the user seems to have achieved what they came for. Leave undefined if unclear."),
401
- riskScore: l().int().min(0).max(100).describe("Overall risk score (0 = safe, 100 = critical). Combination of abuse severity, persistence and escalation.")
401
+ riskScore: s().int().min(0).max(100).describe("Overall risk score (0 = safe, 100 = critical). Combination of abuse severity, persistence and escalation.")
402
402
  }), Re = o({
403
403
  dateTime: f().optional(),
404
404
  timezone: f().optional(),
405
405
  language: f().optional(),
406
- languages: t(f()).optional(),
406
+ languages: n(f()).optional(),
407
407
  url: f().optional(),
408
408
  pathname: f().optional(),
409
409
  pageTitle: f().optional(),
410
410
  referrer: f().optional(),
411
- screenWidth: l().optional(),
412
- screenHeight: l().optional(),
413
- viewportWidth: l().optional(),
414
- viewportHeight: l().optional(),
415
- devicePixelRatio: l().optional(),
416
- maxTouchPoints: l().optional(),
417
- hardwareConcurrency: l().optional(),
418
- deviceMemory: l().optional(),
411
+ screenWidth: s().optional(),
412
+ screenHeight: s().optional(),
413
+ viewportWidth: s().optional(),
414
+ viewportHeight: s().optional(),
415
+ devicePixelRatio: s().optional(),
416
+ maxTouchPoints: s().optional(),
417
+ hardwareConcurrency: s().optional(),
418
+ deviceMemory: s().optional(),
419
419
  platform: f().optional(),
420
420
  connectionType: f().optional(),
421
421
  connectionEffectiveType: f().optional(),
422
- connectionDownlink: l().optional(),
423
- connectionRtt: l().optional(),
422
+ connectionDownlink: s().optional(),
423
+ connectionRtt: s().optional(),
424
424
  saveData: d().optional(),
425
425
  darkMode: d().optional(),
426
426
  reducedMotion: d().optional(),
427
- historyLength: l().optional(),
428
- geolocationLatitude: l().optional(),
429
- geolocationLongitude: l().optional(),
430
- geolocationAccuracy: l().optional(),
427
+ historyLength: s().optional(),
428
+ geolocationLatitude: s().optional(),
429
+ geolocationLongitude: s().optional(),
430
+ geolocationAccuracy: s().optional(),
431
431
  geolocationCity: f().optional()
432
- }), ze = c("type", [o({
433
- type: i("text"),
432
+ }), ze = l("type", [o({
433
+ type: a("text"),
434
434
  text: f()
435
435
  }), o({
436
- type: i("file"),
436
+ type: a("file"),
437
437
  mediaType: f().regex(te),
438
438
  url: p(),
439
439
  filename: f().optional(),
440
- providerMetadata: a(f(), a(f(), n())).optional()
440
+ providerMetadata: t(f(), t(f(), r())).optional()
441
441
  })]);
442
442
  o({
443
443
  id: f(),
444
- messages: t(o({
444
+ messages: n(o({
445
445
  id: f().optional(),
446
446
  role: u(["assistant", "user"]),
447
447
  content: f(),
448
- parts: t(ze),
448
+ parts: n(ze),
449
449
  createdAt: f().optional()
450
450
  })),
451
451
  model: f().optional(),
452
- temperature: l().optional(),
452
+ temperature: s().optional(),
453
453
  prompt: f().optional(),
454
- maxOutputTokens: l().positive().optional(),
455
- presencePenalty: l().min(-2).max(2).optional(),
456
- frequencyPenalty: l().min(-2).max(2).optional(),
454
+ maxOutputTokens: s().positive().optional(),
455
+ presencePenalty: s().min(-2).max(2).optional(),
456
+ frequencyPenalty: s().min(-2).max(2).optional(),
457
457
  searchMode: u(x).optional(),
458
- limit: l().optional(),
458
+ limit: s().optional(),
459
459
  ranking: A.optional(),
460
460
  reasoning: S,
461
461
  webSearch: E.optional(),
462
- maxStepCount: l().int().min(1).max(40).optional(),
463
- disabledTools: t(u(C)).optional(),
464
- fallbackModels: t(f()).optional(),
462
+ maxStepCount: s().int().min(1).max(40).optional(),
463
+ disabledTools: n(u(C)).optional(),
464
+ fallbackModels: n(f()).optional(),
465
465
  gatewayOptions: R.partial().optional(),
466
466
  deviceContext: Re.optional(),
467
- externalContext: a(f(), n()).optional(),
467
+ externalContext: t(f(), r()).optional(),
468
468
  smoothStream: d().optional()
469
469
  });
470
470
  var Be = /* @__PURE__ */ function(e) {
471
471
  return e.SevereAbuse = "severe_abuse", e.HighRiskScore = "high_risk_score", e.RepeatedWarnings = "repeated_warnings", e;
472
472
  }({}), Ve = o({
473
473
  id: f(),
474
- messages: t(n()),
474
+ messages: n(r()),
475
475
  title: f().nullable(),
476
476
  summary: f().nullable(),
477
477
  messageCountAtLastSummary: f().nullable(),
478
478
  createdAt: m(),
479
479
  updatedAt: m(),
480
- metadata: a(f(), n()),
480
+ metadata: t(f(), r()),
481
481
  totalCostInUSD: f(),
482
- usage: n(),
482
+ usage: r(),
483
483
  agentId: f().nullable(),
484
484
  userId: f(),
485
485
  organizationId: f(),
@@ -491,7 +491,7 @@ var Be = /* @__PURE__ */ function(e) {
491
491
  blockedAt: m().nullable(),
492
492
  blockedReasonCode: u(Be).nullable(),
493
493
  blockedReason: f().nullable(),
494
- warningCount: l(),
494
+ warningCount: s(),
495
495
  lastMessageAt: m()
496
496
  });
497
497
  o({
@@ -518,7 +518,7 @@ var He = o({
518
518
  createdAt: m(),
519
519
  updatedAt: m(),
520
520
  lastMessageAt: m(),
521
- messages: t(n()),
521
+ messages: n(r()),
522
522
  blocked: d()
523
523
  }), Ue = class {
524
524
  constructor(e, t) {
@@ -740,13 +740,31 @@ new oe(yt(), {
740
740
  var Q = le(de);
741
741
  Q.newRole(ue.statements), Q.newRole(fe.statements), Q.newRole(_.statements), Q.newRole(_.statements);
742
742
  //#endregion
743
+ //#region ../../packages/composable/src/chatbot/api/resolveShortUrls.ts
744
+ async function St(e, t, n = {}) {
745
+ try {
746
+ let r = g(e), i = await fetch(`${r}/api/r/resolve`, {
747
+ method: "POST",
748
+ credentials: n.credentials ?? "include",
749
+ headers: {
750
+ ...n.headers,
751
+ "Content-Type": "application/json"
752
+ },
753
+ body: JSON.stringify({ hashes: t })
754
+ });
755
+ return i.ok ? (await i.json()).urls ?? {} : {};
756
+ } catch {
757
+ return {};
758
+ }
759
+ }
760
+ //#endregion
743
761
  //#region ../../packages/composable/src/chatbot/api/createChatbotApiClient.ts
744
- var St = Ve.or(He);
762
+ var Ct = Ve.or(He);
745
763
  function $(e) {
746
- let t = St.safeParse(e);
764
+ let t = Ct.safeParse(e);
747
765
  return t.success ? t.data : e;
748
766
  }
749
- function Ct(e) {
767
+ function wt(e) {
750
768
  let t = e.basePath ? ae(e.basePath) : `/api/v1/${X.Public}`, n = `${g(e.baseUrl)}${t}`, r = `${g(e.baseUrl)}${t.replace(/\/[^/]+$/, `/${X.Frontoffice}`)}`;
751
769
  async function i(t, r, i = "json") {
752
770
  let a = await fetch(`${n}${t}`, {
@@ -893,21 +911,15 @@ function Ct(e) {
893
911
  let n = new URLSearchParams({ serverName: t });
894
912
  return i(`/agents/${encodeURIComponent(e)}/mcp-oauth/authorize?${n}`);
895
913
  },
896
- async resolveShortUrls(t) {
897
- let n = g(e.baseUrl), r = await fetch(`${n}/api/r/resolve`, {
898
- method: "POST",
899
- credentials: e.credentials ?? "include",
900
- headers: {
901
- ...e.headers?.(),
902
- "Content-Type": "application/json"
903
- },
904
- body: JSON.stringify({ hashes: t })
914
+ resolveShortUrls(t) {
915
+ return St(e.baseUrl, t, {
916
+ headers: e.headers?.(),
917
+ credentials: e.credentials
905
918
  });
906
- return r.ok ? (await r.json()).urls ?? {} : {};
907
919
  }
908
920
  };
909
921
  }
910
922
  //#endregion
911
- export { L as a, M as c, be as d, ye as f, P as i, T as l, X as n, N as o, C as r, b as s, Ct as t, Se as u };
923
+ export { L as a, M as c, be as d, ye as f, P as i, T as l, X as n, N as o, C as r, b as s, wt as t, Se as u };
912
924
 
913
- //# sourceMappingURL=createChatbotApiClient-BHfNaVk8.js.map
925
+ //# sourceMappingURL=createChatbotApiClient-Bf5DbqVH.js.map