@8wave/ai-elements 0.114.0-beta.28 → 0.114.0-beta.7

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 (150) hide show
  1. package/dist/_chunks/Agent-DTLrWpzX.js +460 -0
  2. package/dist/_chunks/Agent-DTLrWpzX.js.map +1 -0
  3. package/dist/_chunks/Media-Cft7Pwrh.js +108 -0
  4. package/dist/_chunks/Media-Cft7Pwrh.js.map +1 -0
  5. package/dist/_chunks/{PkStreamingMarkdown-ZD0SROu1.js → PkStreamingMarkdown-C1sANAr5.js} +672 -688
  6. package/dist/_chunks/PkStreamingMarkdown-C1sANAr5.js.map +1 -0
  7. package/dist/_chunks/{PkToolRequestGeolocation-OF1PWhMw.js → PkToolRequestGeolocation-BbxYKt-9.js} +2 -2
  8. package/{dist-vue/_chunks/PkToolRequestGeolocation-BOVbaCzQ.js.map → dist/_chunks/PkToolRequestGeolocation-BbxYKt-9.js.map} +1 -1
  9. package/dist/_chunks/{PkToolRequestOAuthConnection-ChGMAKV7.js → PkToolRequestOAuthConnection-CTp2w60F.js} +2 -2
  10. package/dist/_chunks/{PkToolRequestOAuthConnection-ChGMAKV7.js.map → PkToolRequestOAuthConnection-CTp2w60F.js.map} +1 -1
  11. package/dist/_chunks/{PkToolShowArtifact-LEfO5zfg.js → PkToolShowArtifact-BfTjxGOT.js} +2 -2
  12. package/dist/_chunks/{PkToolShowArtifact-LEfO5zfg.js.map → PkToolShowArtifact-BfTjxGOT.js.map} +1 -1
  13. package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js +60 -0
  14. package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js.map +1 -0
  15. package/dist/_chunks/{PkToolShowContactForm-BO3JQfts.js → PkToolShowContactForm-PFpY9dIp.js} +2 -2
  16. package/dist/_chunks/{PkToolShowContactForm-BO3JQfts.js.map → PkToolShowContactForm-PFpY9dIp.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowForm-KW8MOL-j.js → PkToolShowForm-CMtSN0oX.js} +5 -5
  18. package/dist/_chunks/{PkToolShowForm-KW8MOL-j.js.map → PkToolShowForm-CMtSN0oX.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowSources-Sc1W6WHe.js → PkToolShowSources-C6cu66Ts.js} +3 -3
  20. package/dist/_chunks/{PkToolShowSources-Sc1W6WHe.js.map → PkToolShowSources-C6cu66Ts.js.map} +1 -1
  21. package/dist/_chunks/{PkToolShowSuggestedReply-Dl4x_nEJ.js → PkToolShowSuggestedReply-CFO8wV1b.js} +2 -2
  22. package/dist/_chunks/{PkToolShowSuggestedReply-Dl4x_nEJ.js.map → PkToolShowSuggestedReply-CFO8wV1b.js.map} +1 -1
  23. package/dist/_chunks/{markdown-BrvkrEUr.js → markdown-BRD-hDrH.js} +10 -10
  24. package/dist/_chunks/{markdown-BrvkrEUr.js.map → markdown-BRD-hDrH.js.map} +1 -1
  25. package/dist/ai-elements.es.js +2753 -3001
  26. package/dist/ai-elements.es.js.map +1 -1
  27. package/dist-vue/PkChatbot.js +1 -1
  28. package/dist-vue/PkChatbotAuth.js +1 -1
  29. package/dist-vue/PkChatbotEmptyState.js +1 -1
  30. package/dist-vue/PkChatbotInput.js +1 -1
  31. package/dist-vue/PkChatbotMessages.js +1 -1
  32. package/dist-vue/PkChatbotStepPayload.js +1 -1
  33. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  34. package/dist-vue/PkChatbotSteps.js +1 -1
  35. package/dist-vue/PkChatbotViewChat.js +1 -1
  36. package/dist-vue/PkChatbotViewConversations.js +1 -1
  37. package/dist-vue/PkChatbotViewFiles.js +1 -1
  38. package/dist-vue/PkChatbotViewProfile.js +1 -1
  39. package/dist-vue/_chunks/{Agent-tbKw8Mdt.js → Agent-BNlmK-uJ.js} +2 -2
  40. package/dist-vue/_chunks/{Agent-tbKw8Mdt.js.map → Agent-BNlmK-uJ.js.map} +1 -1
  41. package/dist-vue/_chunks/{Document-p2Y_4gk8.js → Document-2X01-F4Z.js} +9 -9
  42. package/dist-vue/_chunks/{Document-p2Y_4gk8.js.map → Document-2X01-F4Z.js.map} +1 -1
  43. package/dist-vue/_chunks/Media-_HfFLHGD.js.map +1 -1
  44. package/dist-vue/_chunks/{PkChatbot-Dn_6yrFw.js → PkChatbot-HRayDr2d.js} +8 -8
  45. package/dist-vue/_chunks/{PkChatbot-Dn_6yrFw.js.map → PkChatbot-HRayDr2d.js.map} +1 -1
  46. package/dist-vue/_chunks/PkChatbotAuth-Bi508F1u.js +349 -0
  47. package/dist-vue/_chunks/PkChatbotAuth-Bi508F1u.js.map +1 -0
  48. package/dist-vue/_chunks/{PkChatbotEmptyState-9mWiPd4B.js → PkChatbotEmptyState-CPOcfoRC.js} +2 -2
  49. package/dist-vue/_chunks/{PkChatbotEmptyState-9mWiPd4B.js.map → PkChatbotEmptyState-CPOcfoRC.js.map} +1 -1
  50. package/dist-vue/_chunks/{PkChatbotInput-BzaCyeFp.js → PkChatbotInput-pLJQIu7v.js} +2 -2
  51. package/dist-vue/_chunks/{PkChatbotInput-BzaCyeFp.js.map → PkChatbotInput-pLJQIu7v.js.map} +1 -1
  52. package/dist-vue/_chunks/{PkChatbotMessages-Yaf_5xJV.js → PkChatbotMessages-GZStJbx_.js} +256 -258
  53. package/dist-vue/_chunks/PkChatbotMessages-GZStJbx_.js.map +1 -0
  54. package/dist-vue/_chunks/{PkChatbotStepPayload-C36nXLW7.js → PkChatbotStepPayload-DU0W-eUp.js} +2 -2
  55. package/dist-vue/_chunks/{PkChatbotStepPayload-C36nXLW7.js.map → PkChatbotStepPayload-DU0W-eUp.js.map} +1 -1
  56. package/dist-vue/_chunks/{PkChatbotStepToolDetail-CBX-AQXv.js → PkChatbotStepToolDetail-etlBryOg.js} +3 -3
  57. package/dist-vue/_chunks/{PkChatbotStepToolDetail-CBX-AQXv.js.map → PkChatbotStepToolDetail-etlBryOg.js.map} +1 -1
  58. package/dist-vue/_chunks/PkChatbotSteps-Cl4pVtPJ.js +190 -0
  59. package/dist-vue/_chunks/PkChatbotSteps-Cl4pVtPJ.js.map +1 -0
  60. package/dist-vue/_chunks/{PkChatbotViewChat-DFYw4nzP.js → PkChatbotViewChat-DIfBWFoG.js} +7 -7
  61. package/dist-vue/_chunks/{PkChatbotViewChat-DFYw4nzP.js.map → PkChatbotViewChat-DIfBWFoG.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkChatbotViewConversations-CHpN4vhm.js → PkChatbotViewConversations-BCdolW0R.js} +2 -2
  63. package/dist-vue/_chunks/{PkChatbotViewConversations-CHpN4vhm.js.map → PkChatbotViewConversations-BCdolW0R.js.map} +1 -1
  64. package/dist-vue/_chunks/{PkChatbotViewFiles-BBBO5hyd.js → PkChatbotViewFiles-Cudao8ew.js} +3 -3
  65. package/dist-vue/_chunks/{PkChatbotViewFiles-BBBO5hyd.js.map → PkChatbotViewFiles-Cudao8ew.js.map} +1 -1
  66. package/dist-vue/_chunks/{PkChatbotViewProfile-CosaHA-g.js → PkChatbotViewProfile-DDsKOkcC.js} +2 -2
  67. package/dist-vue/_chunks/{PkChatbotViewProfile-CosaHA-g.js.map → PkChatbotViewProfile-DDsKOkcC.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkStreamingMarkdown-BN7waklD.js → PkStreamingMarkdown-BloMJaIW.js} +205 -214
  69. package/dist-vue/_chunks/{PkStreamingMarkdown-BN7waklD.js.map → PkStreamingMarkdown-BloMJaIW.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkToolRequestGeolocation-BOVbaCzQ.js → PkToolRequestGeolocation-9vfYNaQo.js} +2 -2
  71. package/{dist/_chunks/PkToolRequestGeolocation-OF1PWhMw.js.map → dist-vue/_chunks/PkToolRequestGeolocation-9vfYNaQo.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DMvCGPuX.js → PkToolRequestOAuthConnection-BorR5NmZ.js} +2 -2
  73. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DMvCGPuX.js.map → PkToolRequestOAuthConnection-BorR5NmZ.js.map} +1 -1
  74. package/dist-vue/_chunks/{PkToolShowArtifact-DrE_mK1z.js → PkToolShowArtifact-BuMY7GNj.js} +2 -2
  75. package/dist-vue/_chunks/{PkToolShowArtifact-DrE_mK1z.js.map → PkToolShowArtifact-BuMY7GNj.js.map} +1 -1
  76. package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js +61 -0
  77. package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js.map +1 -0
  78. package/dist-vue/_chunks/{PkToolShowContactForm-BBTbrgt4.js → PkToolShowContactForm-0OQRqT8m.js} +2 -2
  79. package/dist-vue/_chunks/{PkToolShowContactForm-BBTbrgt4.js.map → PkToolShowContactForm-0OQRqT8m.js.map} +1 -1
  80. package/dist-vue/_chunks/{PkToolShowDiagram-WyUnnDUn.js → PkToolShowDiagram-BGL27iHG.js} +2 -2
  81. package/dist-vue/_chunks/{PkToolShowDiagram-WyUnnDUn.js.map → PkToolShowDiagram-BGL27iHG.js.map} +1 -1
  82. package/dist-vue/_chunks/{PkToolShowEmail-C30K5kJA.js → PkToolShowEmail-BJJpS69F.js} +2 -2
  83. package/dist-vue/_chunks/{PkToolShowEmail-C30K5kJA.js.map → PkToolShowEmail-BJJpS69F.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkToolShowForm-C9N_SSm8.js → PkToolShowForm-DDcPpOZ8.js} +4 -4
  85. package/dist-vue/_chunks/{PkToolShowForm-C9N_SSm8.js.map → PkToolShowForm-DDcPpOZ8.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkToolShowMessage-DvkCRERv.js → PkToolShowMessage-BFGynf3p.js} +2 -2
  87. package/dist-vue/_chunks/{PkToolShowMessage-DvkCRERv.js.map → PkToolShowMessage-BFGynf3p.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkToolShowProductList-cfjg3CmV.js → PkToolShowProductList-6t1Ir5CW.js} +2 -2
  89. package/dist-vue/_chunks/{PkToolShowProductList-cfjg3CmV.js.map → PkToolShowProductList-6t1Ir5CW.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkToolShowSources-BItTltB5.js → PkToolShowSources-cOF0ZxOj.js} +4 -4
  91. package/dist-vue/_chunks/{PkToolShowSources-BItTltB5.js.map → PkToolShowSources-cOF0ZxOj.js.map} +1 -1
  92. package/dist-vue/_chunks/{PkToolShowSuggestedReply-qAWdCUhr.js → PkToolShowSuggestedReply-DA4NEjHB.js} +2 -2
  93. package/dist-vue/_chunks/{PkToolShowSuggestedReply-qAWdCUhr.js.map → PkToolShowSuggestedReply-DA4NEjHB.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkToolShowWebPages-CkQ2NhRj.js → PkToolShowWebPages-OgaT1vYJ.js} +2 -2
  95. package/dist-vue/_chunks/{PkToolShowWebPages-CkQ2NhRj.js.map → PkToolShowWebPages-OgaT1vYJ.js.map} +1 -1
  96. package/dist-vue/_chunks/{PkUrl-BsD4Vby6.js → PkUrl-Cd69XP5z.js} +2 -2
  97. package/dist-vue/_chunks/{PkUrl-BsD4Vby6.js.map → PkUrl-Cd69XP5z.js.map} +1 -1
  98. package/dist-vue/_chunks/{createChatbotApiClient-BlWs282E.js → createChatbotApiClient-CaVLm5W9.js} +168 -137
  99. package/dist-vue/_chunks/createChatbotApiClient-CaVLm5W9.js.map +1 -0
  100. package/dist-vue/_chunks/{useChatbotStore-CMo47fnS.js → useChatbotStore-BwrBZJCq.js} +3 -3
  101. package/dist-vue/_chunks/{useChatbotStore-CMo47fnS.js.map → useChatbotStore-BwrBZJCq.js.map} +1 -1
  102. package/dist-vue/_chunks/utils-h4C7rRcu.js +177 -0
  103. package/dist-vue/_chunks/utils-h4C7rRcu.js.map +1 -0
  104. package/dist-vue/api.js +1 -1
  105. package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +4 -4
  106. package/dist-vue/apps/web-component/src/composables/useChatbotAuth.d.ts +8 -54
  107. package/dist-vue/apps/web-component/src/composables/useChatbotAuthForm.d.ts +0 -14
  108. package/dist-vue/composables.js +98 -402
  109. package/dist-vue/composables.js.map +1 -1
  110. package/dist-vue/index.js +3235 -3357
  111. package/dist-vue/index.js.map +1 -1
  112. package/dist-vue/locales.js +0 -42
  113. package/dist-vue/packages/ability/src/index.d.ts +14 -10
  114. package/dist-vue/packages/auth/src/social-redirect-plugin.d.ts +12 -18
  115. package/dist-vue/packages/components/src/chat/PkChatbotAuth.d.ts +0 -19
  116. package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +4 -8
  117. package/dist-vue/packages/components/src/chat/PkChatbotSteps.d.ts +0 -1
  118. package/dist-vue/packages/components/src/chat/utils.d.ts +0 -9
  119. package/dist-vue/packages/components/src/index.d.ts +1 -2
  120. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +0 -60
  121. package/dist-vue/packages/models/src/schema/Chat.d.ts +0 -42
  122. package/dist-vue/packages/models/src/schema/Media.d.ts +1 -0
  123. package/dist-vue/packages/models/src/schema/Member.d.ts +0 -3
  124. package/dist-vue/packages/models/src/schema/Notification.d.ts +0 -2
  125. package/dist-vue/packages/models/src/schema/Organization.d.ts +0 -1
  126. package/dist-vue/packages/models/src/schema/User.d.ts +0 -1
  127. package/dist-vue/style.css +1 -1
  128. package/package.json +1 -1
  129. package/dist/_chunks/Agent-DK76k05_.js +0 -566
  130. package/dist/_chunks/Agent-DK76k05_.js.map +0 -1
  131. package/dist/_chunks/PkStreamingMarkdown-ZD0SROu1.js.map +0 -1
  132. package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js +0 -72
  133. package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js.map +0 -1
  134. package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js +0 -421
  135. package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js.map +0 -1
  136. package/dist-vue/_chunks/PkChatbotMessages-Yaf_5xJV.js.map +0 -1
  137. package/dist-vue/_chunks/PkChatbotSteps-356rnZG5.js +0 -191
  138. package/dist-vue/_chunks/PkChatbotSteps-356rnZG5.js.map +0 -1
  139. package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js +0 -72
  140. package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js.map +0 -1
  141. package/dist-vue/_chunks/createChatbotApiClient-BlWs282E.js.map +0 -1
  142. package/dist-vue/_chunks/utils--8iNpBr_.js +0 -184
  143. package/dist-vue/_chunks/utils--8iNpBr_.js.map +0 -1
  144. package/dist-vue/packages/auth/src/additional-fields.d.ts +0 -48
  145. package/dist-vue/packages/auth/src/passkey-policy-client-plugin.d.ts +0 -31
  146. package/dist-vue/packages/auth/src/passkey-policy-plugin.d.ts +0 -22
  147. package/dist-vue/packages/auth/src/two-factor-policy-client-plugin.d.ts +0 -60
  148. package/dist-vue/packages/auth/src/two-factor-policy-plugin.d.ts +0 -65
  149. package/dist-vue/packages/components/src/PkQrCode.d.ts +0 -14
  150. package/dist-vue/packages/components/src/chat/PkTurnEvaluation.d.ts +0 -8
@@ -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 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";
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";
5
5
  import "./src-DT8FLE4_.js";
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";
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";
10
10
  //#region ../../packages/models/src/schema/ConversationAnalysis.ts
11
- var he = /* @__PURE__ */ function(e) {
11
+ var _e = /* @__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
- }({}), ge = /* @__PURE__ */ function(e) {
14
- return e.Low = "low", e.Medium = "medium", e.High = "high", e;
15
13
  }({}), v = /* @__PURE__ */ function(e) {
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;
14
+ return e.Low = "low", e.Medium = "medium", e.High = "high", e;
17
15
  }({}), y = /* @__PURE__ */ function(e) {
18
- return e.SummaryCycle = "summary_cycle", e.AgentRequest = "agent_request", e.Manual = "manual", e;
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;
19
17
  }({}), b = /* @__PURE__ */ function(e) {
20
- return e.High = "high", e.Medium = "medium", e.Low = "low", e.Disengaged = "disengaged", e;
18
+ return e.SummaryCycle = "summary_cycle", e.AgentRequest = "agent_request", e.Manual = "manual", e;
21
19
  }({}), x = /* @__PURE__ */ function(e) {
22
- return e.Polite = "polite", e.Neutral = "neutral", e.Impatient = "impatient", e.Aggressive = "aggressive", e.Abusive = "abusive", e;
20
+ return e.High = "high", e.Medium = "medium", e.Low = "low", e.Disengaged = "disengaged", e;
23
21
  }({}), S = /* @__PURE__ */ function(e) {
24
- return e.Positive = "positive", e.Neutral = "neutral", e.Negative = "negative", e.Frustrated = "frustrated", e.Excited = "excited", e;
22
+ return e.Polite = "polite", e.Neutral = "neutral", e.Impatient = "impatient", e.Aggressive = "aggressive", e.Abusive = "abusive", e;
25
23
  }({}), C = /* @__PURE__ */ function(e) {
24
+ return e.Positive = "positive", e.Neutral = "neutral", e.Negative = "negative", e.Frustrated = "frustrated", e.Excited = "excited", e;
25
+ }({}), w = /* @__PURE__ */ function(e) {
26
26
  return e.Improving = "improving", e.Stable = "stable", e.Degrading = "degrading", e;
27
- }({}), w = n({
27
+ }({}), T = n({
28
28
  analyzedAt: d().describe("When the analysis was generated."),
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."),
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."),
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(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."),
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."),
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(v)).default([]).describe("LLM issue categories detected. Non-empty only if llmIssueDetected is true."),
40
+ llmIssueCategories: r(s(y)).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(b).describe("Level of user engagement in the conversation."),
42
+ userEngagement: s(x).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
- }), T = n({
45
+ }), E = n({
46
46
  type: l("text"),
47
47
  text: i()
48
- }), E = n({
48
+ }), D = n({
49
49
  type: l("file"),
50
- mediaType: i().regex(ee),
50
+ mediaType: i().regex(f),
51
51
  url: e(),
52
52
  filename: i().optional(),
53
53
  providerMetadata: u(i(), u(i(), t())).optional()
54
- }), D = o("type", [T, E]);
54
+ }), O = o("type", [E, D]);
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(D),
61
+ parts: r(O),
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(oe).optional(),
70
+ searchMode: s(ne).optional(),
71
71
  limit: a().optional(),
72
- ranking: ce.optional(),
73
- reasoning: ne,
74
- webSearch: re.optional(),
72
+ ranking: ae.optional(),
73
+ reasoning: h,
74
+ webSearch: ie.optional(),
75
75
  maxStepCount: a().int().min(1).max(40).optional(),
76
- disabledTools: r(s(se)).optional(),
76
+ disabledTools: r(s(re)).optional(),
77
77
  fallbackModels: r(i()).optional(),
78
- gatewayOptions: p.partial().optional(),
79
- deviceContext: ae.optional(),
78
+ gatewayOptions: m.partial().optional(),
79
+ deviceContext: ee.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 O = /* @__PURE__ */ function(e) {
86
+ var k = /* @__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 k(e) {
92
+ function A(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 k(e) {
104
104
  }
105
105
  continue;
106
106
  }
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));
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));
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,14 +124,7 @@ function k(e) {
124
124
  missed: l.filter((e) => e.used && !e.selected).length
125
125
  };
126
126
  }
127
- var A = [
128
- "durableFact",
129
- "abusive",
130
- "manipulation",
131
- "asksHuman",
132
- "missingInfo",
133
- "informationGap"
134
- ], j = /* @__PURE__ */ new Set([
127
+ var j = /* @__PURE__ */ new Set([
135
128
  "output-available",
136
129
  "output-error",
137
130
  "output-denied"
@@ -152,25 +145,25 @@ var A = [
152
145
  deleted: c(),
153
146
  deletedAt: d().nullable(),
154
147
  deletedBy: i().nullable(),
155
- conversationAnalysis: w.nullable().optional(),
148
+ conversationAnalysis: T.nullable().optional(),
156
149
  blocked: c(),
157
150
  blockedAt: d().nullable(),
158
- blockedReasonCode: s(O).nullable(),
151
+ blockedReasonCode: s(k).nullable(),
159
152
  blockedReason: i().nullable(),
160
153
  warningCount: a(),
161
154
  lastMessageAt: d()
162
155
  });
163
156
  n({
164
- ...f.pagination(),
165
- ...f.sort([
157
+ ...p.pagination(),
158
+ ...p.sort([
166
159
  "updatedAt",
167
160
  "createdAt",
168
161
  "lastMessageAt"
169
162
  ]),
170
- ...f.filters(["agentId", "userId"]),
171
- ...f.range("updatedAt"),
172
- ...f.range("lastMessageAt"),
173
- ...f.ids(),
163
+ ...p.filters(["agentId", "userId"]),
164
+ ...p.range("updatedAt"),
165
+ ...p.range("lastMessageAt"),
166
+ ...p.ids(),
174
167
  startDate: i().optional(),
175
168
  endDate: i().optional()
176
169
  });
@@ -201,13 +194,13 @@ var N = n({
201
194
  if (!Array.isArray(t)) throw Error(`"${e}" operator expects to receive an array of conditions`);
202
195
  super(e, t);
203
196
  }
204
- }, L = "__itself__", R = class extends P {
197
+ }, ve = "__itself__", L = class extends P {
205
198
  constructor(e, t, n) {
206
199
  super(e, n), this.field = t;
207
200
  }
208
- }, _e = new F("__null__", null);
201
+ }, ye = new F("__null__", null);
209
202
  Object.hasOwn;
210
- function ve(e, t) {
203
+ function be(e, t) {
211
204
  let n;
212
205
  for (let r = 0, i = t.length; r < i; r++) {
213
206
  let i = t[r];
@@ -224,154 +217,192 @@ function ve(e, t) {
224
217
  }
225
218
  return n || t;
226
219
  }
227
- function ye(e, t) {
220
+ function xe(e, t) {
228
221
  if (t.length === 1) return t[0];
229
222
  if (t.length === 0) return new I(e, t);
230
- let n = ve(e, t);
223
+ let n = be(e, t);
231
224
  return n.length === 1 ? n[0] : (n.length, new I(e, n));
232
225
  }
233
226
  Object.defineProperty(Object.create(null), "__@type@__", { value: "ignore value" });
234
227
  //#endregion
235
228
  //#region ../../node_modules/.pnpm/@ucast+mongo@3.0.0/node_modules/@ucast/mongo/dist/esm/index.mjs
236
- var z = Object.defineProperty;
229
+ var R = Object.defineProperty;
237
230
  ((e, t) => {
238
231
  let n = {};
239
- for (var r in e) z(n, r, {
232
+ for (var r in e) R(n, r, {
240
233
  get: e[r],
241
234
  enumerable: !0
242
235
  });
243
- return t || z(n, Symbol.toStringTag, { value: "Module" }), n;
236
+ return t || R(n, Symbol.toStringTag, { value: "Module" }), n;
244
237
  })({
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
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
265
258
  });
266
- var B = {
259
+ var z = {
267
260
  type: "compound",
268
- validate: Y,
261
+ validate: q,
269
262
  parse(e, t, n) {
270
- let r = U(e, t, n);
271
- return ye(e.name, r);
263
+ let r = V(e, t, n);
264
+ return xe(e.name, r);
272
265
  }
273
- }, V = B, H = {
266
+ }, B = z, Se = {
274
267
  type: "compound",
275
- validate: Y,
268
+ validate: q,
276
269
  parse(e, t, n) {
277
- let r = U(e, t, n);
270
+ let r = V(e, t, n);
278
271
  return new I(e.name, r);
279
272
  }
280
273
  };
281
- function U(e, t, n) {
274
+ function V(e, t, n) {
282
275
  let r = Array(t.length);
283
276
  for (let i = 0; i < t.length; i++) {
284
277
  let a = t[i];
285
- Pe(e, a, i), r[i] = n.parse(a);
278
+ Le(e, a, i), r[i] = n.parse(a);
286
279
  }
287
280
  return r;
288
281
  }
289
- var be = {
282
+ var Ce = {
290
283
  type: "field",
291
284
  validate(e, t) {
292
285
  if (!(t && (t instanceof RegExp || t.constructor === Object))) throw Error(`"${e.name}" expects to receive either regular expression or object of field operators`);
293
286
  },
294
287
  parse(e, t, n) {
295
- let r = t instanceof RegExp ? new R("regex", n.field, t) : n.parse(t, n);
288
+ let r = t instanceof RegExp ? new L("regex", n.field, t) : n.parse(t, n);
296
289
  return new I(e.name, [r]);
297
290
  }
298
- }, xe = {
291
+ }, we = {
299
292
  type: "field",
300
293
  validate(e, t) {
301
294
  if (!t || t.constructor !== Object) throw Error(`"${e.name}" expects to receive an object with nested query or field level operators`);
302
295
  },
303
296
  parse(e, t, { parse: n, field: r, hasOperators: i }) {
304
- let a = i(t) ? n(t, { field: L }) : n(t);
305
- return new R(e.name, r, a);
297
+ let a = i(t) ? n(t, { field: ve }) : n(t);
298
+ return new L(e.name, r, a);
306
299
  }
307
- }, Se = {
300
+ }, Te = {
308
301
  type: "field",
309
- validate: X("number")
310
- }, W = {
302
+ validate: J("number")
303
+ }, H = {
311
304
  type: "field",
312
- validate: J
313
- }, Ce = W, we = W, Te = {
305
+ validate: K
306
+ }, Ee = H, De = H, Oe = {
314
307
  type: "field",
315
308
  validate(e, t) {
316
309
  if (!Array.isArray(t) || t.length !== 2) throw Error(`"${e.name}" expects an array with 2 numeric elements`);
317
310
  }
318
- }, Ee = {
311
+ }, ke = {
319
312
  type: "field",
320
- validate: X("boolean")
321
- }, G = {
313
+ validate: J("boolean")
314
+ }, U = {
322
315
  type: "field",
323
- validate: Ne
324
- }, K = G, De = K, Oe = K, q = { type: "field" }, ke = q, Ae = {
316
+ validate: Ie
317
+ }, W = U, Ae = W, je = W, G = { type: "field" }, Me = G, Ne = {
325
318
  type: "field",
326
319
  validate(e, t) {
327
320
  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`);
328
321
  },
329
322
  parse(e, t, n) {
330
323
  let r = typeof t == "string" ? new RegExp(t, n.query.$options || "") : t;
331
- return new R(e.name, n.field, r);
324
+ return new L(e.name, n.field, r);
332
325
  }
333
- }, je = {
326
+ }, Pe = {
334
327
  type: "field",
335
- parse: () => _e
336
- }, Me = {
328
+ parse: () => ye
329
+ }, Fe = {
337
330
  type: "document",
338
- validate: X("function")
331
+ validate: J("function")
339
332
  };
340
- function J(e, t) {
333
+ function K(e, t) {
341
334
  if (!Array.isArray(t)) throw Error(`"${e.name}" expects value to be an array`);
342
335
  }
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`);
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`);
345
338
  }
346
- function Ne(e, t) {
339
+ function Ie(e, t) {
347
340
  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)`);
348
341
  }
349
- function X(e) {
342
+ function J(e) {
350
343
  return (t, n) => {
351
344
  if (typeof n !== e) throw Error(`"${t.name}" expects value to be a "${e}"`);
352
345
  };
353
346
  }
354
- function Pe(e, t, n) {
347
+ function Le(e, t, n) {
355
348
  let r = t;
356
349
  if (!r || r.constructor !== Object) throw Error(`"${e.name}" expects item at index ${n} to be an object`);
357
350
  }
358
351
  //#endregion
359
352
  //#region ../../packages/ability/src/types.ts
360
- var Z = /* @__PURE__ */ function(e) {
353
+ var Y = /* @__PURE__ */ function(e) {
361
354
  return e.Backoffice = "backoffice", e.Frontoffice = "frontoffice", e.System = "system", e.Public = "public", e;
362
- }({});
363
- g({ modify: [
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: [
364
390
  "read",
365
391
  "update",
366
392
  "delete"
367
- ] }), h({ $or: V });
368
- var Q = de(pe);
369
- Q.newRole(fe.statements), Q.newRole(me.statements), Q.newRole(_.statements), Q.newRole(_.statements);
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);
370
401
  //#endregion
371
402
  //#region ../../packages/composable/src/chatbot/api/resolveShortUrls.ts
372
- async function Fe(e, t, n = {}) {
403
+ async function Be(e, t, n = {}) {
373
404
  try {
374
- let r = m(e), i = await fetch(`${r}/api/r/resolve`, {
405
+ let r = g(e), i = await fetch(`${r}/api/r/resolve`, {
375
406
  method: "POST",
376
407
  credentials: n.credentials ?? "include",
377
408
  headers: {
@@ -387,12 +418,12 @@ async function Fe(e, t, n = {}) {
387
418
  }
388
419
  //#endregion
389
420
  //#region ../../packages/composable/src/chatbot/api/createChatbotApiClient.ts
390
- var Ie = M.or(N);
421
+ var Ve = M.or(N);
391
422
  function $(e) {
392
- let t = Ie.safeParse(e);
423
+ let t = Ve.safeParse(e);
393
424
  return t.success ? t.data : e;
394
425
  }
395
- async function Le(e) {
426
+ async function He(e) {
396
427
  let t = `${e.status} ${e.statusText}`.trim();
397
428
  try {
398
429
  let n = await e.json();
@@ -401,8 +432,8 @@ async function Le(e) {
401
432
  return t;
402
433
  }
403
434
  }
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}`)}`;
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}`)}`;
406
437
  async function i(t, r, i = "json") {
407
438
  let a = await fetch(`${n}${t}`, {
408
439
  credentials: e.credentials ?? "include",
@@ -412,7 +443,7 @@ function Re(e) {
412
443
  ...r?.headers
413
444
  }
414
445
  });
415
- if (!a.ok) throw Error(await Le(a));
446
+ if (!a.ok) throw Error(await He(a));
416
447
  if (i !== "void" && a.status !== 204) return a.json();
417
448
  }
418
449
  return {
@@ -553,7 +584,7 @@ function Re(e) {
553
584
  return i(`/agents/${encodeURIComponent(e)}/mcp-oauth/status?${n}`);
554
585
  },
555
586
  async createVoiceSession(e, t, n) {
556
- return te.parse(await i(`/agents/${encodeURIComponent(e)}/voice/session`, {
587
+ return se.parse(await i(`/agents/${encodeURIComponent(e)}/voice/session`, {
557
588
  method: "POST",
558
589
  headers: { "Content-Type": "application/json" },
559
590
  body: JSON.stringify({
@@ -570,7 +601,7 @@ function Re(e) {
570
601
  }, "void");
571
602
  },
572
603
  resolveShortUrls(t) {
573
- return Fe(e.baseUrl, t, {
604
+ return Be(e.baseUrl, t, {
574
605
  headers: e.headers?.(),
575
606
  credentials: e.credentials
576
607
  });
@@ -578,6 +609,6 @@ function Re(e) {
578
609
  };
579
610
  }
580
611
  //#endregion
581
- export { k as a, A as i, Z as n, j as r, Re as t };
612
+ export { A as i, Y as n, j as r, Ue as t };
582
613
 
583
- //# sourceMappingURL=createChatbotApiClient-BlWs282E.js.map
614
+ //# sourceMappingURL=createChatbotApiClient-CaVLm5W9.js.map