@8wave/ai-elements 0.114.0-beta.8 → 0.114.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 (161) hide show
  1. package/dist/_chunks/Agent-DK76k05_.js +566 -0
  2. package/dist/_chunks/Agent-DK76k05_.js.map +1 -0
  3. package/dist/_chunks/{PkStreamingMarkdown-C1sANAr5.js → PkStreamingMarkdown-BKxA6Ntl.js} +688 -672
  4. package/dist/_chunks/PkStreamingMarkdown-BKxA6Ntl.js.map +1 -0
  5. package/dist/_chunks/{PkToolRequestGeolocation-BbxYKt-9.js → PkToolRequestGeolocation-OF1PWhMw.js} +2 -2
  6. package/{dist-vue/_chunks/PkToolRequestGeolocation-9vfYNaQo.js.map → dist/_chunks/PkToolRequestGeolocation-OF1PWhMw.js.map} +1 -1
  7. package/dist/_chunks/{PkToolRequestOAuthConnection-CTp2w60F.js → PkToolRequestOAuthConnection-ChGMAKV7.js} +2 -2
  8. package/dist/_chunks/{PkToolRequestOAuthConnection-CTp2w60F.js.map → PkToolRequestOAuthConnection-ChGMAKV7.js.map} +1 -1
  9. package/dist/_chunks/{PkToolShowArtifact-BfTjxGOT.js → PkToolShowArtifact-CHxeuKEU.js} +2 -2
  10. package/dist/_chunks/{PkToolShowArtifact-BfTjxGOT.js.map → PkToolShowArtifact-CHxeuKEU.js.map} +1 -1
  11. package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js +72 -0
  12. package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js.map +1 -0
  13. package/dist/_chunks/{PkToolShowContactForm-PFpY9dIp.js → PkToolShowContactForm-DqVLVwqJ.js} +2 -2
  14. package/dist/_chunks/{PkToolShowContactForm-PFpY9dIp.js.map → PkToolShowContactForm-DqVLVwqJ.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowForm-CMtSN0oX.js → PkToolShowForm-YJQPYfEe.js} +5 -5
  16. package/dist/_chunks/{PkToolShowForm-CMtSN0oX.js.map → PkToolShowForm-YJQPYfEe.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowSources-C6cu66Ts.js → PkToolShowSources-VFoI0YS8.js} +3 -3
  18. package/dist/_chunks/{PkToolShowSources-C6cu66Ts.js.map → PkToolShowSources-VFoI0YS8.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowSuggestedReply-CFO8wV1b.js → PkToolShowSuggestedReply-Dl4x_nEJ.js} +2 -2
  20. package/dist/_chunks/{PkToolShowSuggestedReply-CFO8wV1b.js.map → PkToolShowSuggestedReply-Dl4x_nEJ.js.map} +1 -1
  21. package/dist/_chunks/{markdown-BRD-hDrH.js → markdown-BL7WANiX.js} +19 -12
  22. package/dist/_chunks/markdown-BL7WANiX.js.map +1 -0
  23. package/dist/ai-elements.es.js +3119 -2748
  24. package/dist/ai-elements.es.js.map +1 -1
  25. package/dist-vue/PkChatbot.js +1 -1
  26. package/dist-vue/PkChatbotAuth.js +1 -1
  27. package/dist-vue/PkChatbotEmptyState.js +1 -1
  28. package/dist-vue/PkChatbotInput.js +1 -1
  29. package/dist-vue/PkChatbotMessages.js +1 -1
  30. package/dist-vue/PkChatbotStepPayload.js +1 -1
  31. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  32. package/dist-vue/PkChatbotSteps.js +1 -1
  33. package/dist-vue/PkChatbotViewChat.js +1 -1
  34. package/dist-vue/PkChatbotViewConversations.js +1 -1
  35. package/dist-vue/PkChatbotViewFiles.js +1 -1
  36. package/dist-vue/PkChatbotViewProfile.js +1 -1
  37. package/dist-vue/_chunks/{Agent-BNlmK-uJ.js → Agent-tbKw8Mdt.js} +2 -2
  38. package/dist-vue/_chunks/{Agent-BNlmK-uJ.js.map → Agent-tbKw8Mdt.js.map} +1 -1
  39. package/dist-vue/_chunks/{Document-2X01-F4Z.js → Document-nCWwJC2h.js} +18 -11
  40. package/dist-vue/_chunks/Document-nCWwJC2h.js.map +1 -0
  41. package/dist-vue/_chunks/Media-_HfFLHGD.js.map +1 -1
  42. package/dist-vue/_chunks/{PkChatbot-HRayDr2d.js → PkChatbot-BMIs94QB.js} +8 -8
  43. package/dist-vue/_chunks/{PkChatbot-HRayDr2d.js.map → PkChatbot-BMIs94QB.js.map} +1 -1
  44. package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js +421 -0
  45. package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js.map +1 -0
  46. package/dist-vue/_chunks/{PkChatbotEmptyState-CPOcfoRC.js → PkChatbotEmptyState-Dicjr_Fv.js} +2 -2
  47. package/dist-vue/_chunks/{PkChatbotEmptyState-CPOcfoRC.js.map → PkChatbotEmptyState-Dicjr_Fv.js.map} +1 -1
  48. package/dist-vue/_chunks/{PkChatbotInput-pLJQIu7v.js → PkChatbotInput-DcLmOqA1.js} +2 -2
  49. package/dist-vue/_chunks/{PkChatbotInput-pLJQIu7v.js.map → PkChatbotInput-DcLmOqA1.js.map} +1 -1
  50. package/dist-vue/_chunks/{PkChatbotMessages-GZStJbx_.js → PkChatbotMessages-Bj7mjhqN.js} +258 -256
  51. package/dist-vue/_chunks/PkChatbotMessages-Bj7mjhqN.js.map +1 -0
  52. package/dist-vue/_chunks/{PkChatbotStepPayload-DU0W-eUp.js → PkChatbotStepPayload-rKaeDQDj.js} +2 -2
  53. package/dist-vue/_chunks/{PkChatbotStepPayload-DU0W-eUp.js.map → PkChatbotStepPayload-rKaeDQDj.js.map} +1 -1
  54. package/dist-vue/_chunks/{PkChatbotStepToolDetail-etlBryOg.js → PkChatbotStepToolDetail-5HdSV8Im.js} +3 -3
  55. package/dist-vue/_chunks/{PkChatbotStepToolDetail-etlBryOg.js.map → PkChatbotStepToolDetail-5HdSV8Im.js.map} +1 -1
  56. package/dist-vue/_chunks/PkChatbotSteps-CPPjwTJN.js +191 -0
  57. package/dist-vue/_chunks/PkChatbotSteps-CPPjwTJN.js.map +1 -0
  58. package/dist-vue/_chunks/{PkChatbotViewChat-DIfBWFoG.js → PkChatbotViewChat-CQ5WcZs8.js} +7 -7
  59. package/dist-vue/_chunks/{PkChatbotViewChat-DIfBWFoG.js.map → PkChatbotViewChat-CQ5WcZs8.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkChatbotViewConversations-BCdolW0R.js → PkChatbotViewConversations-CHpN4vhm.js} +2 -2
  61. package/dist-vue/_chunks/{PkChatbotViewConversations-BCdolW0R.js.map → PkChatbotViewConversations-CHpN4vhm.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkChatbotViewFiles-Cudao8ew.js → PkChatbotViewFiles-Bk9-K6Hw.js} +3 -3
  63. package/dist-vue/_chunks/{PkChatbotViewFiles-Cudao8ew.js.map → PkChatbotViewFiles-Bk9-K6Hw.js.map} +1 -1
  64. package/dist-vue/_chunks/{PkChatbotViewProfile-DDsKOkcC.js → PkChatbotViewProfile-CosaHA-g.js} +2 -2
  65. package/dist-vue/_chunks/{PkChatbotViewProfile-DDsKOkcC.js.map → PkChatbotViewProfile-CosaHA-g.js.map} +1 -1
  66. package/dist-vue/_chunks/{PkStreamingMarkdown-BloMJaIW.js → PkStreamingMarkdown-DYy79C1P.js} +214 -205
  67. package/dist-vue/_chunks/{PkStreamingMarkdown-BloMJaIW.js.map → PkStreamingMarkdown-DYy79C1P.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkToolRequestGeolocation-9vfYNaQo.js → PkToolRequestGeolocation-BOVbaCzQ.js} +2 -2
  69. package/{dist/_chunks/PkToolRequestGeolocation-BbxYKt-9.js.map → dist-vue/_chunks/PkToolRequestGeolocation-BOVbaCzQ.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BorR5NmZ.js → PkToolRequestOAuthConnection-DMvCGPuX.js} +2 -2
  71. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BorR5NmZ.js.map → PkToolRequestOAuthConnection-DMvCGPuX.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkToolShowArtifact-BuMY7GNj.js → PkToolShowArtifact-DUOnFdfa.js} +2 -2
  73. package/dist-vue/_chunks/{PkToolShowArtifact-BuMY7GNj.js.map → PkToolShowArtifact-DUOnFdfa.js.map} +1 -1
  74. package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js +72 -0
  75. package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js.map +1 -0
  76. package/dist-vue/_chunks/{PkToolShowContactForm-0OQRqT8m.js → PkToolShowContactForm-1TFKvG_s.js} +2 -2
  77. package/dist-vue/_chunks/{PkToolShowContactForm-0OQRqT8m.js.map → PkToolShowContactForm-1TFKvG_s.js.map} +1 -1
  78. package/dist-vue/_chunks/{PkToolShowDiagram-BGL27iHG.js → PkToolShowDiagram-BziggKVa.js} +2 -2
  79. package/dist-vue/_chunks/{PkToolShowDiagram-BGL27iHG.js.map → PkToolShowDiagram-BziggKVa.js.map} +1 -1
  80. package/dist-vue/_chunks/{PkToolShowEmail-BJJpS69F.js → PkToolShowEmail-BDsBoETQ.js} +2 -2
  81. package/dist-vue/_chunks/{PkToolShowEmail-BJJpS69F.js.map → PkToolShowEmail-BDsBoETQ.js.map} +1 -1
  82. package/dist-vue/_chunks/{PkToolShowForm-DDcPpOZ8.js → PkToolShowForm-DwFKxMJd.js} +4 -4
  83. package/dist-vue/_chunks/{PkToolShowForm-DDcPpOZ8.js.map → PkToolShowForm-DwFKxMJd.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkToolShowMessage-BFGynf3p.js → PkToolShowMessage-Dau3agUy.js} +2 -2
  85. package/dist-vue/_chunks/{PkToolShowMessage-BFGynf3p.js.map → PkToolShowMessage-Dau3agUy.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkToolShowProductList-6t1Ir5CW.js → PkToolShowProductList-CsupMsuy.js} +2 -2
  87. package/dist-vue/_chunks/{PkToolShowProductList-6t1Ir5CW.js.map → PkToolShowProductList-CsupMsuy.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkToolShowSources-cOF0ZxOj.js → PkToolShowSources-TzkNgwnr.js} +4 -4
  89. package/dist-vue/_chunks/{PkToolShowSources-cOF0ZxOj.js.map → PkToolShowSources-TzkNgwnr.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DA4NEjHB.js → PkToolShowSuggestedReply-qAWdCUhr.js} +2 -2
  91. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DA4NEjHB.js.map → PkToolShowSuggestedReply-qAWdCUhr.js.map} +1 -1
  92. package/dist-vue/_chunks/{PkToolShowWebPages-OgaT1vYJ.js → PkToolShowWebPages-D4E3Xzg1.js} +2 -2
  93. package/dist-vue/_chunks/{PkToolShowWebPages-OgaT1vYJ.js.map → PkToolShowWebPages-D4E3Xzg1.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkUrl-Cd69XP5z.js → PkUrl-Cu3qKl4G.js} +2 -2
  95. package/dist-vue/_chunks/{PkUrl-Cd69XP5z.js.map → PkUrl-Cu3qKl4G.js.map} +1 -1
  96. package/dist-vue/_chunks/{createChatbotApiClient-CaVLm5W9.js → createChatbotApiClient-BlWs282E.js} +137 -168
  97. package/dist-vue/_chunks/createChatbotApiClient-BlWs282E.js.map +1 -0
  98. package/dist-vue/_chunks/{useChatbotStore-BwrBZJCq.js → useChatbotStore-CMo47fnS.js} +3 -3
  99. package/dist-vue/_chunks/{useChatbotStore-BwrBZJCq.js.map → useChatbotStore-CMo47fnS.js.map} +1 -1
  100. package/dist-vue/_chunks/utils-B45A2ONa.js +184 -0
  101. package/dist-vue/_chunks/utils-B45A2ONa.js.map +1 -0
  102. package/dist-vue/api.js +1 -1
  103. package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +4 -4
  104. package/dist-vue/apps/web-component/src/composables/useChatbotAuth.d.ts +53 -5
  105. package/dist-vue/apps/web-component/src/composables/useChatbotAuthForm.d.ts +14 -0
  106. package/dist-vue/composables.js +466 -39
  107. package/dist-vue/composables.js.map +1 -1
  108. package/dist-vue/index.js +3361 -3237
  109. package/dist-vue/index.js.map +1 -1
  110. package/dist-vue/locales.js +44 -0
  111. package/dist-vue/packages/ability/src/index.d.ts +10 -14
  112. package/dist-vue/packages/auth/src/add-member-to-organization.d.ts +8 -2
  113. package/dist-vue/packages/auth/src/additional-fields.d.ts +48 -0
  114. package/dist-vue/packages/auth/src/organization-member-limit.d.ts +12 -0
  115. package/dist-vue/packages/auth/src/passkey-policy-client-plugin.d.ts +31 -0
  116. package/dist-vue/packages/auth/src/passkey-policy-plugin.d.ts +22 -0
  117. package/dist-vue/packages/auth/src/two-factor-admin-plugin.d.ts +2 -0
  118. package/dist-vue/packages/auth/src/two-factor-policy-client-plugin.d.ts +163 -0
  119. package/dist-vue/packages/auth/src/two-factor-policy-plugin.d.ts +106 -0
  120. package/dist-vue/packages/components/src/PkQrCode.d.ts +14 -0
  121. package/dist-vue/packages/components/src/chat/PkChatbotAuth.d.ts +19 -0
  122. package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +8 -4
  123. package/dist-vue/packages/components/src/chat/PkChatbotSteps.d.ts +1 -0
  124. package/dist-vue/packages/components/src/chat/PkTurnEvaluation.d.ts +8 -0
  125. package/dist-vue/packages/components/src/chat/utils.d.ts +9 -0
  126. package/dist-vue/packages/components/src/index.d.ts +2 -1
  127. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +60 -0
  128. package/dist-vue/packages/models/src/schema/Chat.d.ts +42 -0
  129. package/dist-vue/packages/models/src/schema/Document.d.ts +17 -0
  130. package/dist-vue/packages/models/src/schema/DocumentFolder.d.ts +10 -0
  131. package/dist-vue/packages/models/src/schema/DocumentSyncSource.d.ts +71 -1
  132. package/dist-vue/packages/models/src/schema/Lead.d.ts +1 -1
  133. package/dist-vue/packages/models/src/schema/McpServer.d.ts +13 -0
  134. package/dist-vue/packages/models/src/schema/Media.d.ts +0 -1
  135. package/dist-vue/packages/models/src/schema/Member.d.ts +10 -0
  136. package/dist-vue/packages/models/src/schema/Notification.d.ts +31 -0
  137. package/dist-vue/packages/models/src/schema/Organization.d.ts +20 -0
  138. package/dist-vue/packages/models/src/schema/SignInSecurity.d.ts +168 -0
  139. package/dist-vue/packages/models/src/schema/User.d.ts +1 -0
  140. package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
  141. package/dist-vue/style.css +1 -1
  142. package/package.json +1 -1
  143. package/dist/_chunks/Agent-DTLrWpzX.js +0 -460
  144. package/dist/_chunks/Agent-DTLrWpzX.js.map +0 -1
  145. package/dist/_chunks/Media-Cft7Pwrh.js +0 -108
  146. package/dist/_chunks/Media-Cft7Pwrh.js.map +0 -1
  147. package/dist/_chunks/PkStreamingMarkdown-C1sANAr5.js.map +0 -1
  148. package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js +0 -60
  149. package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js.map +0 -1
  150. package/dist/_chunks/markdown-BRD-hDrH.js.map +0 -1
  151. package/dist-vue/_chunks/Document-2X01-F4Z.js.map +0 -1
  152. package/dist-vue/_chunks/PkChatbotAuth-Bi508F1u.js +0 -349
  153. package/dist-vue/_chunks/PkChatbotAuth-Bi508F1u.js.map +0 -1
  154. package/dist-vue/_chunks/PkChatbotMessages-GZStJbx_.js.map +0 -1
  155. package/dist-vue/_chunks/PkChatbotSteps-Cl4pVtPJ.js +0 -190
  156. package/dist-vue/_chunks/PkChatbotSteps-Cl4pVtPJ.js.map +0 -1
  157. package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js +0 -61
  158. package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js.map +0 -1
  159. package/dist-vue/_chunks/createChatbotApiClient-CaVLm5W9.js.map +0 -1
  160. package/dist-vue/_chunks/utils-h4C7rRcu.js +0 -177
  161. package/dist-vue/_chunks/utils-h4C7rRcu.js.map +0 -1
@@ -1,64 +1,64 @@
1
1
  import { C as e, S as t, _ as n, a as r, b as i, g as a, l as o, n as s, o as c, p as l, y as u } from "./schemas-DxbHVg3r.js";
2
- import { i as d, t as f } from "./Media-_HfFLHGD.js";
3
- import { A as ee, M as te, N as p, a as m, c as h, l as ne, n as re, p as ie, s as ae, u as oe, x as se } from "./Agent-BNlmK-uJ.js";
4
- import { t as ce } from "./StreamError-D1AtGgS3.js";
2
+ import { i as d, t as ee } from "./Media-_HfFLHGD.js";
3
+ import { M as f, a as p, b as te, c as ne, f as re, j as ie, k as ae, l as oe, n as se, s as ce } from "./Agent-tbKw8Mdt.js";
4
+ import { t as le } from "./StreamError-D1AtGgS3.js";
5
5
  import "./src-DT8FLE4_.js";
6
- import { r as g, t as le } from "./url-validation-uLMZ5-AU.js";
7
- import { Ability as ue, buildMongoQueryMatcher as de, createAliasResolver as fe } from "@casl/ability";
8
- import { createAccessControl as pe } from "better-auth/plugins";
9
- import { adminAc as me, defaultStatements as he, memberAc as _, ownerAc as ge } from "better-auth/plugins/organization/access";
6
+ import { r as m, t as ue } from "./url-validation-uLMZ5-AU.js";
7
+ import { buildMongoQueryMatcher as h, createAliasResolver as g } from "@casl/ability";
8
+ import { createAccessControl as de } from "better-auth/plugins";
9
+ import { adminAc as fe, defaultStatements as pe, memberAc as _, ownerAc as me } from "better-auth/plugins/organization/access";
10
10
  //#region ../../packages/models/src/schema/ConversationAnalysis.ts
11
- var _e = /* @__PURE__ */ function(e) {
11
+ var he = /* @__PURE__ */ function(e) {
12
12
  return e.Harassment = "harassment", e.HateSpeech = "hate_speech", e.SexualContent = "sexual_content", e.SelfHarm = "self_harm", e.Violence = "violence", e.PromptInjection = "prompt_injection", e.DataExtraction = "data_extraction", e.Spam = "spam", e.OffTopicPersistent = "off_topic_persistent", e.Impersonation = "impersonation", e;
13
- }({}), v = /* @__PURE__ */ function(e) {
13
+ }({}), ge = /* @__PURE__ */ function(e) {
14
14
  return e.Low = "low", e.Medium = "medium", e.High = "high", e;
15
- }({}), y = /* @__PURE__ */ function(e) {
15
+ }({}), v = /* @__PURE__ */ function(e) {
16
16
  return e.FalseSuccess = "false_success", e.Hallucination = "hallucination", e.OffBrand = "off_brand", e.DataLeak = "data_leak", e.InappropriateTone = "inappropriate_tone", e.RefusalLoop = "refusal_loop", e.Repetition = "repetition", e;
17
- }({}), b = /* @__PURE__ */ function(e) {
17
+ }({}), y = /* @__PURE__ */ function(e) {
18
18
  return e.SummaryCycle = "summary_cycle", e.AgentRequest = "agent_request", e.Manual = "manual", e;
19
- }({}), x = /* @__PURE__ */ function(e) {
19
+ }({}), b = /* @__PURE__ */ function(e) {
20
20
  return e.High = "high", e.Medium = "medium", e.Low = "low", e.Disengaged = "disengaged", e;
21
- }({}), S = /* @__PURE__ */ function(e) {
21
+ }({}), x = /* @__PURE__ */ function(e) {
22
22
  return e.Polite = "polite", e.Neutral = "neutral", e.Impatient = "impatient", e.Aggressive = "aggressive", e.Abusive = "abusive", e;
23
- }({}), C = /* @__PURE__ */ function(e) {
23
+ }({}), S = /* @__PURE__ */ function(e) {
24
24
  return e.Positive = "positive", e.Neutral = "neutral", e.Negative = "negative", e.Frustrated = "frustrated", e.Excited = "excited", e;
25
- }({}), w = /* @__PURE__ */ function(e) {
25
+ }({}), C = /* @__PURE__ */ function(e) {
26
26
  return e.Improving = "improving", e.Stable = "stable", e.Degrading = "degrading", e;
27
- }({}), T = n({
27
+ }({}), w = n({
28
28
  analyzedAt: d().describe("When the analysis was generated."),
29
- analysisTrigger: s(b).describe("What triggered this analysis run."),
30
- sentiment: s(C).describe("Overall user sentiment in the conversation."),
31
- sentimentTrend: s(w).describe("How the user sentiment evolved during the conversation."),
32
- userTone: s(S).describe("Predominant tone of the user messages."),
29
+ analysisTrigger: s(y).describe("What triggered this analysis run."),
30
+ sentiment: s(S).describe("Overall user sentiment in the conversation."),
31
+ sentimentTrend: s(C).describe("How the user sentiment evolved during the conversation."),
32
+ userTone: s(x).describe("Predominant tone of the user messages."),
33
33
  language: i().max(10).describe("ISO 639-1 language code of the conversation (e.g. \"en\", \"it\")."),
34
34
  topics: r(i().max(100)).max(10).describe("Main topics discussed, as short lowercase labels."),
35
35
  userAbuseDetected: c().describe("Whether user abuse was detected. If false, userAbuseCategories MUST be empty."),
36
- userAbuseCategories: r(s(_e)).default([]).describe("Abuse categories detected. Non-empty only if userAbuseDetected is true."),
37
- userAbuseConfidence: s(v).optional().describe("Confidence level of the abuse detection. Set only if userAbuseDetected is true."),
36
+ userAbuseCategories: r(s(he)).default([]).describe("Abuse categories detected. Non-empty only if userAbuseDetected is true."),
37
+ userAbuseConfidence: s(ge).optional().describe("Confidence level of the abuse detection. Set only if userAbuseDetected is true."),
38
38
  userAbuseSummary: i().max(500).optional().describe("Brief description of the abusive behavior detected. Always write in English. Set only if userAbuseDetected is true."),
39
39
  llmIssueDetected: c().describe("Whether an LLM quality issue was detected. If false, llmIssueCategories MUST be empty."),
40
- llmIssueCategories: r(s(y)).default([]).describe("LLM issue categories detected. Non-empty only if llmIssueDetected is true."),
40
+ llmIssueCategories: r(s(v)).default([]).describe("LLM issue categories detected. Non-empty only if llmIssueDetected is true."),
41
41
  llmIssueSummary: i().max(500).optional().describe("Brief description of the LLM quality issue detected. Always write in English. Set only if llmIssueDetected is true."),
42
- userEngagement: s(x).describe("Level of user engagement in the conversation."),
42
+ userEngagement: s(b).describe("Level of user engagement in the conversation."),
43
43
  conversationGoalMet: c().optional().describe("Whether the user seems to have achieved what they came for. Leave undefined if unclear."),
44
44
  riskScore: a().int().min(0).max(100).describe("Overall risk score (0 = safe, 100 = critical). Combination of abuse severity, persistence and escalation.")
45
- }), E = n({
45
+ }), T = n({
46
46
  type: l("text"),
47
47
  text: i()
48
- }), D = n({
48
+ }), E = n({
49
49
  type: l("file"),
50
- mediaType: i().regex(f),
50
+ mediaType: i().regex(ee),
51
51
  url: e(),
52
52
  filename: i().optional(),
53
53
  providerMetadata: u(i(), u(i(), t())).optional()
54
- }), O = o("type", [E, D]);
54
+ }), D = o("type", [T, E]);
55
55
  n({
56
56
  id: i(),
57
57
  messages: r(n({
58
58
  id: i().optional(),
59
59
  role: s(["assistant", "user"]),
60
60
  content: i(),
61
- parts: r(O),
61
+ parts: r(D),
62
62
  createdAt: i().optional()
63
63
  })),
64
64
  model: i().optional(),
@@ -67,29 +67,29 @@ n({
67
67
  maxOutputTokens: a().positive().optional(),
68
68
  presencePenalty: a().min(-2).max(2).optional(),
69
69
  frequencyPenalty: a().min(-2).max(2).optional(),
70
- searchMode: s(ne).optional(),
70
+ searchMode: s(oe).optional(),
71
71
  limit: a().optional(),
72
- ranking: ae.optional(),
73
- reasoning: h,
74
- webSearch: ie.optional(),
72
+ ranking: ce.optional(),
73
+ reasoning: ne,
74
+ webSearch: re.optional(),
75
75
  maxStepCount: a().int().min(1).max(40).optional(),
76
- disabledTools: r(s(re)).optional(),
76
+ disabledTools: r(s(se)).optional(),
77
77
  fallbackModels: r(i()).optional(),
78
- gatewayOptions: m.partial().optional(),
79
- deviceContext: ee.optional(),
78
+ gatewayOptions: p.partial().optional(),
79
+ deviceContext: ae.optional(),
80
80
  externalContext: u(i(), t()).optional(),
81
81
  smoothStream: c().optional()
82
82
  }), n({
83
83
  id: i().min(1),
84
84
  messages: r(n({ role: i() }).loose()).min(1)
85
85
  }).loose();
86
- var k = /* @__PURE__ */ function(e) {
86
+ var O = /* @__PURE__ */ function(e) {
87
87
  return e.SevereAbuse = "severe_abuse", e.HighRiskScore = "high_risk_score", e.RepeatedWarnings = "repeated_warnings", e;
88
88
  }({});
89
89
  s(/* @__PURE__ */ function(e) {
90
90
  return e.Web = "web", e.WhatsApp = "whatsapp", e.Teams = "teams", e.Voice = "voice", e.Api = "api", e.Reasoning = "reasoning", e.Endpoint = "endpoint", e;
91
91
  }({}));
92
- function A(e) {
92
+ function k(e) {
93
93
  let t = e.metadata?.toolCatalogue, n = t?.workingSet;
94
94
  if (!t || !n) return;
95
95
  let r = new Map(t.groups.flatMap((e) => e.keys.map((t) => [t, e.id]))), i = new Map(t.groups.map((e) => [e.name, e.id])), a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
@@ -104,8 +104,8 @@ function A(e) {
104
104
  }
105
105
  continue;
106
106
  }
107
- let n = te(e, r.keys()), s = n && r.get(n);
108
- s && (t.state === "output-error" && ce.test(t.errorText ?? "") ? o.add(s) : a.add(s));
107
+ let n = ie(e, r.keys()), s = n && r.get(n);
108
+ s && (t.state === "output-error" && le.test(t.errorText ?? "") ? o.add(s) : a.add(s));
109
109
  }
110
110
  let s = new Set(n.selected), c = new Set(n.seeded), l = t.groups.map((e) => ({
111
111
  id: e.id,
@@ -124,7 +124,14 @@ function A(e) {
124
124
  missed: l.filter((e) => e.used && !e.selected).length
125
125
  };
126
126
  }
127
- var j = /* @__PURE__ */ new Set([
127
+ var A = [
128
+ "durableFact",
129
+ "abusive",
130
+ "manipulation",
131
+ "asksHuman",
132
+ "missingInfo",
133
+ "informationGap"
134
+ ], j = /* @__PURE__ */ new Set([
128
135
  "output-available",
129
136
  "output-error",
130
137
  "output-denied"
@@ -145,25 +152,25 @@ var j = /* @__PURE__ */ new Set([
145
152
  deleted: c(),
146
153
  deletedAt: d().nullable(),
147
154
  deletedBy: i().nullable(),
148
- conversationAnalysis: T.nullable().optional(),
155
+ conversationAnalysis: w.nullable().optional(),
149
156
  blocked: c(),
150
157
  blockedAt: d().nullable(),
151
- blockedReasonCode: s(k).nullable(),
158
+ blockedReasonCode: s(O).nullable(),
152
159
  blockedReason: i().nullable(),
153
160
  warningCount: a(),
154
161
  lastMessageAt: d()
155
162
  });
156
163
  n({
157
- ...p.pagination(),
158
- ...p.sort([
164
+ ...f.pagination(),
165
+ ...f.sort([
159
166
  "updatedAt",
160
167
  "createdAt",
161
168
  "lastMessageAt"
162
169
  ]),
163
- ...p.filters(["agentId", "userId"]),
164
- ...p.range("updatedAt"),
165
- ...p.range("lastMessageAt"),
166
- ...p.ids(),
170
+ ...f.filters(["agentId", "userId"]),
171
+ ...f.range("updatedAt"),
172
+ ...f.range("lastMessageAt"),
173
+ ...f.ids(),
167
174
  startDate: i().optional(),
168
175
  endDate: i().optional()
169
176
  });
@@ -194,13 +201,13 @@ var N = n({
194
201
  if (!Array.isArray(t)) throw Error(`"${e}" operator expects to receive an array of conditions`);
195
202
  super(e, t);
196
203
  }
197
- }, ve = "__itself__", L = class extends P {
204
+ }, L = "__itself__", R = class extends P {
198
205
  constructor(e, t, n) {
199
206
  super(e, n), this.field = t;
200
207
  }
201
- }, ye = new F("__null__", null);
208
+ }, _e = new F("__null__", null);
202
209
  Object.hasOwn;
203
- function be(e, t) {
210
+ function ve(e, t) {
204
211
  let n;
205
212
  for (let r = 0, i = t.length; r < i; r++) {
206
213
  let i = t[r];
@@ -217,192 +224,154 @@ function be(e, t) {
217
224
  }
218
225
  return n || t;
219
226
  }
220
- function xe(e, t) {
227
+ function ye(e, t) {
221
228
  if (t.length === 1) return t[0];
222
229
  if (t.length === 0) return new I(e, t);
223
- let n = be(e, t);
230
+ let n = ve(e, t);
224
231
  return n.length === 1 ? n[0] : (n.length, new I(e, n));
225
232
  }
226
233
  Object.defineProperty(Object.create(null), "__@type@__", { value: "ignore value" });
227
234
  //#endregion
228
235
  //#region ../../node_modules/.pnpm/@ucast+mongo@3.0.0/node_modules/@ucast/mongo/dist/esm/index.mjs
229
- var R = Object.defineProperty;
236
+ var z = Object.defineProperty;
230
237
  ((e, t) => {
231
238
  let n = {};
232
- for (var r in e) R(n, r, {
239
+ for (var r in e) z(n, r, {
233
240
  get: e[r],
234
241
  enumerable: !0
235
242
  });
236
- return t || R(n, Symbol.toStringTag, { value: "Module" }), n;
243
+ return t || z(n, Symbol.toStringTag, { value: "Module" }), n;
237
244
  })({
238
- $all: () => De,
239
- $and: () => z,
240
- $elemMatch: () => we,
241
- $eq: () => G,
242
- $exists: () => ke,
243
- $gt: () => W,
244
- $gte: () => U,
245
- $in: () => H,
246
- $lt: () => Ae,
247
- $lte: () => je,
248
- $mod: () => Oe,
249
- $ne: () => Me,
250
- $nin: () => Ee,
251
- $nor: () => Se,
252
- $not: () => Ce,
253
- $options: () => Pe,
254
- $or: () => B,
255
- $regex: () => Ne,
256
- $size: () => Te,
257
- $where: () => Fe
245
+ $all: () => we,
246
+ $and: () => B,
247
+ $elemMatch: () => xe,
248
+ $eq: () => q,
249
+ $exists: () => Ee,
250
+ $gt: () => K,
251
+ $gte: () => G,
252
+ $in: () => W,
253
+ $lt: () => De,
254
+ $lte: () => Oe,
255
+ $mod: () => Te,
256
+ $ne: () => ke,
257
+ $nin: () => Ce,
258
+ $nor: () => H,
259
+ $not: () => be,
260
+ $options: () => je,
261
+ $or: () => V,
262
+ $regex: () => Ae,
263
+ $size: () => Se,
264
+ $where: () => Me
258
265
  });
259
- var z = {
266
+ var B = {
260
267
  type: "compound",
261
- validate: q,
268
+ validate: Y,
262
269
  parse(e, t, n) {
263
- let r = V(e, t, n);
264
- return xe(e.name, r);
270
+ let r = U(e, t, n);
271
+ return ye(e.name, r);
265
272
  }
266
- }, B = z, Se = {
273
+ }, V = B, H = {
267
274
  type: "compound",
268
- validate: q,
275
+ validate: Y,
269
276
  parse(e, t, n) {
270
- let r = V(e, t, n);
277
+ let r = U(e, t, n);
271
278
  return new I(e.name, r);
272
279
  }
273
280
  };
274
- function V(e, t, n) {
281
+ function U(e, t, n) {
275
282
  let r = Array(t.length);
276
283
  for (let i = 0; i < t.length; i++) {
277
284
  let a = t[i];
278
- Le(e, a, i), r[i] = n.parse(a);
285
+ Pe(e, a, i), r[i] = n.parse(a);
279
286
  }
280
287
  return r;
281
288
  }
282
- var Ce = {
289
+ var be = {
283
290
  type: "field",
284
291
  validate(e, t) {
285
292
  if (!(t && (t instanceof RegExp || t.constructor === Object))) throw Error(`"${e.name}" expects to receive either regular expression or object of field operators`);
286
293
  },
287
294
  parse(e, t, n) {
288
- let r = t instanceof RegExp ? new L("regex", n.field, t) : n.parse(t, n);
295
+ let r = t instanceof RegExp ? new R("regex", n.field, t) : n.parse(t, n);
289
296
  return new I(e.name, [r]);
290
297
  }
291
- }, we = {
298
+ }, xe = {
292
299
  type: "field",
293
300
  validate(e, t) {
294
301
  if (!t || t.constructor !== Object) throw Error(`"${e.name}" expects to receive an object with nested query or field level operators`);
295
302
  },
296
303
  parse(e, t, { parse: n, field: r, hasOperators: i }) {
297
- let a = i(t) ? n(t, { field: ve }) : n(t);
298
- return new L(e.name, r, a);
304
+ let a = i(t) ? n(t, { field: L }) : n(t);
305
+ return new R(e.name, r, a);
299
306
  }
300
- }, Te = {
307
+ }, Se = {
301
308
  type: "field",
302
- validate: J("number")
303
- }, H = {
309
+ validate: X("number")
310
+ }, W = {
304
311
  type: "field",
305
- validate: K
306
- }, Ee = H, De = H, Oe = {
312
+ validate: J
313
+ }, Ce = W, we = W, Te = {
307
314
  type: "field",
308
315
  validate(e, t) {
309
316
  if (!Array.isArray(t) || t.length !== 2) throw Error(`"${e.name}" expects an array with 2 numeric elements`);
310
317
  }
311
- }, ke = {
318
+ }, Ee = {
312
319
  type: "field",
313
- validate: J("boolean")
314
- }, U = {
320
+ validate: X("boolean")
321
+ }, G = {
315
322
  type: "field",
316
- validate: Ie
317
- }, W = U, Ae = W, je = W, G = { type: "field" }, Me = G, Ne = {
323
+ validate: Ne
324
+ }, K = G, De = K, Oe = K, q = { type: "field" }, ke = q, Ae = {
318
325
  type: "field",
319
326
  validate(e, t) {
320
327
  if (!(t instanceof RegExp) && typeof t != "string") throw Error(`"${e.name}" expects value to be a regular expression or a string that represents regular expression`);
321
328
  },
322
329
  parse(e, t, n) {
323
330
  let r = typeof t == "string" ? new RegExp(t, n.query.$options || "") : t;
324
- return new L(e.name, n.field, r);
331
+ return new R(e.name, n.field, r);
325
332
  }
326
- }, Pe = {
333
+ }, je = {
327
334
  type: "field",
328
- parse: () => ye
329
- }, Fe = {
335
+ parse: () => _e
336
+ }, Me = {
330
337
  type: "document",
331
- validate: J("function")
338
+ validate: X("function")
332
339
  };
333
- function K(e, t) {
340
+ function J(e, t) {
334
341
  if (!Array.isArray(t)) throw Error(`"${e.name}" expects value to be an array`);
335
342
  }
336
- function q(e, t) {
337
- if (K(e, t), !t.length) throw Error(`"${e.name}" expects to have at least one element in array`);
343
+ function Y(e, t) {
344
+ if (J(e, t), !t.length) throw Error(`"${e.name}" expects to have at least one element in array`);
338
345
  }
339
- function Ie(e, t) {
346
+ function Ne(e, t) {
340
347
  if (!(typeof t == "string" || typeof t == "number" || t instanceof Date)) throw Error(`"${e.name}" expects value to be comparable (i.e., string, number or date)`);
341
348
  }
342
- function J(e) {
349
+ function X(e) {
343
350
  return (t, n) => {
344
351
  if (typeof n !== e) throw Error(`"${t.name}" expects value to be a "${e}"`);
345
352
  };
346
353
  }
347
- function Le(e, t, n) {
354
+ function Pe(e, t, n) {
348
355
  let r = t;
349
356
  if (!r || r.constructor !== Object) throw Error(`"${e.name}" expects item at index ${n} to be an object`);
350
357
  }
351
358
  //#endregion
352
359
  //#region ../../packages/ability/src/types.ts
353
- var Y = /* @__PURE__ */ function(e) {
360
+ var Z = /* @__PURE__ */ function(e) {
354
361
  return e.Backoffice = "backoffice", e.Frontoffice = "frontoffice", e.System = "system", e.Public = "public", e;
355
- }({}), X = /* @__PURE__ */ function(e) {
356
- return e.All = "all", e.Todo = "todo", e.User = "user", e.Chat = "chat", e.Agent = "agent", e.SubAgent = "subAgent", e.Document = "document", e.AgentDocument = "agent_document", e.AgentAnalytic = "agent_analytic", e.McpServer = "mcp_server", e.Media = "media", e.RevisedAnswer = "revised_answer", e.Organization = "organization", e.Member = "member", e.Lead = "lead", e.MessageFeedback = "message_feedback", e.Backoffice = "backoffice", e.Frontoffice = "frontoffice", e.System = "system", e.Invitation = "invitation", e.Crawler = "crawler", e.ReasoningChat = "reasoning_chat", e.TimeTrackerChat = "time_tracker_chat", e.OrganizationExternalAuth = "organization_external_auth", e.AgentEndpoint = "agent_endpoint", e.AgentEndpointLog = "agent_endpoint_log", e.AgentApiTool = "agent_api_tool", e.DocumentFolder = "document_folder", e.Integration = "integration", e.Notification = "notification", e.PlatformConnection = "platform_connection", e;
357
- }({}), Re = (e) => e ? [
358
- {
359
- subject: X.Chat,
360
- action: "create"
361
- },
362
- {
363
- subject: X.Chat,
364
- action: "read",
365
- condition: { createdBy: { $eq: e.user?.id } }
366
- },
367
- {
368
- subject: X.Chat,
369
- action: "update"
370
- },
371
- {
372
- subject: X.Chat,
373
- action: "delete"
374
- },
375
- {
376
- subject: X.Agent,
377
- action: "read",
378
- condition: { status: { $eq: oe.Active } }
379
- },
380
- {
381
- subject: X.MessageFeedback,
382
- action: "create"
383
- },
384
- {
385
- subject: X.MessageFeedback,
386
- action: "read",
387
- condition: { createdBy: { $eq: e.user?.id } }
388
- }
389
- ] : [], ze = fe({ modify: [
362
+ }({});
363
+ g({ modify: [
390
364
  "read",
391
365
  "update",
392
366
  "delete"
393
- ] }), Z = de({ $or: B });
394
- new ue(Re(), {
395
- conditionsMatcher: Z,
396
- resolveAction: ze,
397
- fieldMatcher: (e) => (t) => e.includes(t)
398
- });
399
- var Q = pe(he);
400
- Q.newRole(me.statements), Q.newRole(ge.statements), Q.newRole(_.statements), Q.newRole(_.statements);
367
+ ] }), h({ $or: V });
368
+ var Q = de(pe);
369
+ Q.newRole(fe.statements), Q.newRole(me.statements), Q.newRole(_.statements), Q.newRole(_.statements);
401
370
  //#endregion
402
371
  //#region ../../packages/composable/src/chatbot/api/resolveShortUrls.ts
403
- async function Be(e, t, n = {}) {
372
+ async function Fe(e, t, n = {}) {
404
373
  try {
405
- let r = g(e), i = await fetch(`${r}/api/r/resolve`, {
374
+ let r = m(e), i = await fetch(`${r}/api/r/resolve`, {
406
375
  method: "POST",
407
376
  credentials: n.credentials ?? "include",
408
377
  headers: {
@@ -418,12 +387,12 @@ async function Be(e, t, n = {}) {
418
387
  }
419
388
  //#endregion
420
389
  //#region ../../packages/composable/src/chatbot/api/createChatbotApiClient.ts
421
- var Ve = M.or(N);
390
+ var Ie = M.or(N);
422
391
  function $(e) {
423
- let t = Ve.safeParse(e);
392
+ let t = Ie.safeParse(e);
424
393
  return t.success ? t.data : e;
425
394
  }
426
- async function He(e) {
395
+ async function Le(e) {
427
396
  let t = `${e.status} ${e.statusText}`.trim();
428
397
  try {
429
398
  let n = await e.json();
@@ -432,8 +401,8 @@ async function He(e) {
432
401
  return t;
433
402
  }
434
403
  }
435
- function Ue(e) {
436
- let t = e.basePath ? le(e.basePath) : `/api/v1/${Y.Public}`, n = `${g(e.baseUrl)}${t}`, r = `${g(e.baseUrl)}${t.replace(/\/[^/]+$/, `/${Y.Frontoffice}`)}`;
404
+ function Re(e) {
405
+ let t = e.basePath ? ue(e.basePath) : `/api/v1/${Z.Public}`, n = `${m(e.baseUrl)}${t}`, r = `${m(e.baseUrl)}${t.replace(/\/[^/]+$/, `/${Z.Frontoffice}`)}`;
437
406
  async function i(t, r, i = "json") {
438
407
  let a = await fetch(`${n}${t}`, {
439
408
  credentials: e.credentials ?? "include",
@@ -443,7 +412,7 @@ function Ue(e) {
443
412
  ...r?.headers
444
413
  }
445
414
  });
446
- if (!a.ok) throw Error(await He(a));
415
+ if (!a.ok) throw Error(await Le(a));
447
416
  if (i !== "void" && a.status !== 204) return a.json();
448
417
  }
449
418
  return {
@@ -584,7 +553,7 @@ function Ue(e) {
584
553
  return i(`/agents/${encodeURIComponent(e)}/mcp-oauth/status?${n}`);
585
554
  },
586
555
  async createVoiceSession(e, t, n) {
587
- return se.parse(await i(`/agents/${encodeURIComponent(e)}/voice/session`, {
556
+ return te.parse(await i(`/agents/${encodeURIComponent(e)}/voice/session`, {
588
557
  method: "POST",
589
558
  headers: { "Content-Type": "application/json" },
590
559
  body: JSON.stringify({
@@ -601,7 +570,7 @@ function Ue(e) {
601
570
  }, "void");
602
571
  },
603
572
  resolveShortUrls(t) {
604
- return Be(e.baseUrl, t, {
573
+ return Fe(e.baseUrl, t, {
605
574
  headers: e.headers?.(),
606
575
  credentials: e.credentials
607
576
  });
@@ -609,6 +578,6 @@ function Ue(e) {
609
578
  };
610
579
  }
611
580
  //#endregion
612
- export { A as i, Y as n, j as r, Ue as t };
581
+ export { k as a, A as i, Z as n, j as r, Re as t };
613
582
 
614
- //# sourceMappingURL=createChatbotApiClient-CaVLm5W9.js.map
583
+ //# sourceMappingURL=createChatbotApiClient-BlWs282E.js.map