@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.
- package/dist/_chunks/Agent-DK76k05_.js +566 -0
- package/dist/_chunks/Agent-DK76k05_.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown-C1sANAr5.js → PkStreamingMarkdown-BKxA6Ntl.js} +688 -672
- package/dist/_chunks/PkStreamingMarkdown-BKxA6Ntl.js.map +1 -0
- package/dist/_chunks/{PkToolRequestGeolocation-BbxYKt-9.js → PkToolRequestGeolocation-OF1PWhMw.js} +2 -2
- package/{dist-vue/_chunks/PkToolRequestGeolocation-9vfYNaQo.js.map → dist/_chunks/PkToolRequestGeolocation-OF1PWhMw.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-CTp2w60F.js → PkToolRequestOAuthConnection-ChGMAKV7.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-CTp2w60F.js.map → PkToolRequestOAuthConnection-ChGMAKV7.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-BfTjxGOT.js → PkToolShowArtifact-CHxeuKEU.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-BfTjxGOT.js.map → PkToolShowArtifact-CHxeuKEU.js.map} +1 -1
- package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js +72 -0
- package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js.map +1 -0
- package/dist/_chunks/{PkToolShowContactForm-PFpY9dIp.js → PkToolShowContactForm-DqVLVwqJ.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-PFpY9dIp.js.map → PkToolShowContactForm-DqVLVwqJ.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-CMtSN0oX.js → PkToolShowForm-YJQPYfEe.js} +5 -5
- package/dist/_chunks/{PkToolShowForm-CMtSN0oX.js.map → PkToolShowForm-YJQPYfEe.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-C6cu66Ts.js → PkToolShowSources-VFoI0YS8.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-C6cu66Ts.js.map → PkToolShowSources-VFoI0YS8.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-CFO8wV1b.js → PkToolShowSuggestedReply-Dl4x_nEJ.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-CFO8wV1b.js.map → PkToolShowSuggestedReply-Dl4x_nEJ.js.map} +1 -1
- package/dist/_chunks/{markdown-BRD-hDrH.js → markdown-BL7WANiX.js} +19 -12
- package/dist/_chunks/markdown-BL7WANiX.js.map +1 -0
- package/dist/ai-elements.es.js +3119 -2748
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotAuth.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{Agent-BNlmK-uJ.js → Agent-tbKw8Mdt.js} +2 -2
- package/dist-vue/_chunks/{Agent-BNlmK-uJ.js.map → Agent-tbKw8Mdt.js.map} +1 -1
- package/dist-vue/_chunks/{Document-2X01-F4Z.js → Document-nCWwJC2h.js} +18 -11
- package/dist-vue/_chunks/Document-nCWwJC2h.js.map +1 -0
- package/dist-vue/_chunks/Media-_HfFLHGD.js.map +1 -1
- package/dist-vue/_chunks/{PkChatbot-HRayDr2d.js → PkChatbot-BMIs94QB.js} +8 -8
- package/dist-vue/_chunks/{PkChatbot-HRayDr2d.js.map → PkChatbot-BMIs94QB.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js +421 -0
- package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotEmptyState-CPOcfoRC.js → PkChatbotEmptyState-Dicjr_Fv.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-CPOcfoRC.js.map → PkChatbotEmptyState-Dicjr_Fv.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-pLJQIu7v.js → PkChatbotInput-DcLmOqA1.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-pLJQIu7v.js.map → PkChatbotInput-DcLmOqA1.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-GZStJbx_.js → PkChatbotMessages-Bj7mjhqN.js} +258 -256
- package/dist-vue/_chunks/PkChatbotMessages-Bj7mjhqN.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotStepPayload-DU0W-eUp.js → PkChatbotStepPayload-rKaeDQDj.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-DU0W-eUp.js.map → PkChatbotStepPayload-rKaeDQDj.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-etlBryOg.js → PkChatbotStepToolDetail-5HdSV8Im.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-etlBryOg.js.map → PkChatbotStepToolDetail-5HdSV8Im.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotSteps-CPPjwTJN.js +191 -0
- package/dist-vue/_chunks/PkChatbotSteps-CPPjwTJN.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-DIfBWFoG.js → PkChatbotViewChat-CQ5WcZs8.js} +7 -7
- package/dist-vue/_chunks/{PkChatbotViewChat-DIfBWFoG.js.map → PkChatbotViewChat-CQ5WcZs8.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-BCdolW0R.js → PkChatbotViewConversations-CHpN4vhm.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-BCdolW0R.js.map → PkChatbotViewConversations-CHpN4vhm.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-Cudao8ew.js → PkChatbotViewFiles-Bk9-K6Hw.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-Cudao8ew.js.map → PkChatbotViewFiles-Bk9-K6Hw.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-DDsKOkcC.js → PkChatbotViewProfile-CosaHA-g.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-DDsKOkcC.js.map → PkChatbotViewProfile-CosaHA-g.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-BloMJaIW.js → PkStreamingMarkdown-DYy79C1P.js} +214 -205
- package/dist-vue/_chunks/{PkStreamingMarkdown-BloMJaIW.js.map → PkStreamingMarkdown-DYy79C1P.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-9vfYNaQo.js → PkToolRequestGeolocation-BOVbaCzQ.js} +2 -2
- package/{dist/_chunks/PkToolRequestGeolocation-BbxYKt-9.js.map → dist-vue/_chunks/PkToolRequestGeolocation-BOVbaCzQ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BorR5NmZ.js → PkToolRequestOAuthConnection-DMvCGPuX.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BorR5NmZ.js.map → PkToolRequestOAuthConnection-DMvCGPuX.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-BuMY7GNj.js → PkToolShowArtifact-DUOnFdfa.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-BuMY7GNj.js.map → PkToolShowArtifact-DUOnFdfa.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js +72 -0
- package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowContactForm-0OQRqT8m.js → PkToolShowContactForm-1TFKvG_s.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-0OQRqT8m.js.map → PkToolShowContactForm-1TFKvG_s.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-BGL27iHG.js → PkToolShowDiagram-BziggKVa.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-BGL27iHG.js.map → PkToolShowDiagram-BziggKVa.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowEmail-BJJpS69F.js → PkToolShowEmail-BDsBoETQ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowEmail-BJJpS69F.js.map → PkToolShowEmail-BDsBoETQ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-DDcPpOZ8.js → PkToolShowForm-DwFKxMJd.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-DDcPpOZ8.js.map → PkToolShowForm-DwFKxMJd.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowMessage-BFGynf3p.js → PkToolShowMessage-Dau3agUy.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowMessage-BFGynf3p.js.map → PkToolShowMessage-Dau3agUy.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-6t1Ir5CW.js → PkToolShowProductList-CsupMsuy.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-6t1Ir5CW.js.map → PkToolShowProductList-CsupMsuy.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-cOF0ZxOj.js → PkToolShowSources-TzkNgwnr.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowSources-cOF0ZxOj.js.map → PkToolShowSources-TzkNgwnr.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-DA4NEjHB.js → PkToolShowSuggestedReply-qAWdCUhr.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-DA4NEjHB.js.map → PkToolShowSuggestedReply-qAWdCUhr.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-OgaT1vYJ.js → PkToolShowWebPages-D4E3Xzg1.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-OgaT1vYJ.js.map → PkToolShowWebPages-D4E3Xzg1.js.map} +1 -1
- package/dist-vue/_chunks/{PkUrl-Cd69XP5z.js → PkUrl-Cu3qKl4G.js} +2 -2
- package/dist-vue/_chunks/{PkUrl-Cd69XP5z.js.map → PkUrl-Cu3qKl4G.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-CaVLm5W9.js → createChatbotApiClient-BlWs282E.js} +137 -168
- package/dist-vue/_chunks/createChatbotApiClient-BlWs282E.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-BwrBZJCq.js → useChatbotStore-CMo47fnS.js} +3 -3
- package/dist-vue/_chunks/{useChatbotStore-BwrBZJCq.js.map → useChatbotStore-CMo47fnS.js.map} +1 -1
- package/dist-vue/_chunks/utils-B45A2ONa.js +184 -0
- package/dist-vue/_chunks/utils-B45A2ONa.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +4 -4
- package/dist-vue/apps/web-component/src/composables/useChatbotAuth.d.ts +53 -5
- package/dist-vue/apps/web-component/src/composables/useChatbotAuthForm.d.ts +14 -0
- package/dist-vue/composables.js +466 -39
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +3361 -3237
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +44 -0
- package/dist-vue/packages/ability/src/index.d.ts +10 -14
- package/dist-vue/packages/auth/src/add-member-to-organization.d.ts +8 -2
- package/dist-vue/packages/auth/src/additional-fields.d.ts +48 -0
- package/dist-vue/packages/auth/src/organization-member-limit.d.ts +12 -0
- package/dist-vue/packages/auth/src/passkey-policy-client-plugin.d.ts +31 -0
- package/dist-vue/packages/auth/src/passkey-policy-plugin.d.ts +22 -0
- package/dist-vue/packages/auth/src/two-factor-admin-plugin.d.ts +2 -0
- package/dist-vue/packages/auth/src/two-factor-policy-client-plugin.d.ts +163 -0
- package/dist-vue/packages/auth/src/two-factor-policy-plugin.d.ts +106 -0
- package/dist-vue/packages/components/src/PkQrCode.d.ts +14 -0
- package/dist-vue/packages/components/src/chat/PkChatbotAuth.d.ts +19 -0
- package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +8 -4
- package/dist-vue/packages/components/src/chat/PkChatbotSteps.d.ts +1 -0
- package/dist-vue/packages/components/src/chat/PkTurnEvaluation.d.ts +8 -0
- package/dist-vue/packages/components/src/chat/utils.d.ts +9 -0
- package/dist-vue/packages/components/src/index.d.ts +2 -1
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +60 -0
- package/dist-vue/packages/models/src/schema/Chat.d.ts +42 -0
- package/dist-vue/packages/models/src/schema/Document.d.ts +17 -0
- package/dist-vue/packages/models/src/schema/DocumentFolder.d.ts +10 -0
- package/dist-vue/packages/models/src/schema/DocumentSyncSource.d.ts +71 -1
- package/dist-vue/packages/models/src/schema/Lead.d.ts +1 -1
- package/dist-vue/packages/models/src/schema/McpServer.d.ts +13 -0
- package/dist-vue/packages/models/src/schema/Media.d.ts +0 -1
- package/dist-vue/packages/models/src/schema/Member.d.ts +10 -0
- package/dist-vue/packages/models/src/schema/Notification.d.ts +31 -0
- package/dist-vue/packages/models/src/schema/Organization.d.ts +20 -0
- package/dist-vue/packages/models/src/schema/SignInSecurity.d.ts +168 -0
- package/dist-vue/packages/models/src/schema/User.d.ts +1 -0
- package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-DTLrWpzX.js +0 -460
- package/dist/_chunks/Agent-DTLrWpzX.js.map +0 -1
- package/dist/_chunks/Media-Cft7Pwrh.js +0 -108
- package/dist/_chunks/Media-Cft7Pwrh.js.map +0 -1
- package/dist/_chunks/PkStreamingMarkdown-C1sANAr5.js.map +0 -1
- package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js +0 -60
- package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js.map +0 -1
- package/dist/_chunks/markdown-BRD-hDrH.js.map +0 -1
- package/dist-vue/_chunks/Document-2X01-F4Z.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotAuth-Bi508F1u.js +0 -349
- package/dist-vue/_chunks/PkChatbotAuth-Bi508F1u.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-GZStJbx_.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotSteps-Cl4pVtPJ.js +0 -190
- package/dist-vue/_chunks/PkChatbotSteps-Cl4pVtPJ.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js +0 -61
- package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-CaVLm5W9.js.map +0 -1
- package/dist-vue/_chunks/utils-h4C7rRcu.js +0 -177
- package/dist-vue/_chunks/utils-h4C7rRcu.js.map +0 -1
package/dist-vue/_chunks/{createChatbotApiClient-CaVLm5W9.js → createChatbotApiClient-BlWs282E.js}
RENAMED
|
@@ -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
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
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
|
|
7
|
-
import {
|
|
8
|
-
import { createAccessControl as
|
|
9
|
-
import { adminAc as
|
|
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
|
|
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
|
-
}({}),
|
|
13
|
+
}({}), ge = /* @__PURE__ */ function(e) {
|
|
14
14
|
return e.Low = "low", e.Medium = "medium", e.High = "high", e;
|
|
15
|
-
}({}),
|
|
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
|
-
}({}),
|
|
17
|
+
}({}), y = /* @__PURE__ */ function(e) {
|
|
18
18
|
return e.SummaryCycle = "summary_cycle", e.AgentRequest = "agent_request", e.Manual = "manual", e;
|
|
19
|
-
}({}),
|
|
19
|
+
}({}), b = /* @__PURE__ */ function(e) {
|
|
20
20
|
return e.High = "high", e.Medium = "medium", e.Low = "low", e.Disengaged = "disengaged", e;
|
|
21
|
-
}({}),
|
|
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
|
-
}({}),
|
|
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
|
-
}({}),
|
|
25
|
+
}({}), C = /* @__PURE__ */ function(e) {
|
|
26
26
|
return e.Improving = "improving", e.Stable = "stable", e.Degrading = "degrading", e;
|
|
27
|
-
}({}),
|
|
27
|
+
}({}), w = n({
|
|
28
28
|
analyzedAt: d().describe("When the analysis was generated."),
|
|
29
|
-
analysisTrigger: s(
|
|
30
|
-
sentiment: s(
|
|
31
|
-
sentimentTrend: s(
|
|
32
|
-
userTone: s(
|
|
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(
|
|
37
|
-
userAbuseConfidence: s(
|
|
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(
|
|
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(
|
|
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
|
-
}),
|
|
45
|
+
}), T = n({
|
|
46
46
|
type: l("text"),
|
|
47
47
|
text: i()
|
|
48
|
-
}),
|
|
48
|
+
}), E = n({
|
|
49
49
|
type: l("file"),
|
|
50
|
-
mediaType: i().regex(
|
|
50
|
+
mediaType: i().regex(ee),
|
|
51
51
|
url: e(),
|
|
52
52
|
filename: i().optional(),
|
|
53
53
|
providerMetadata: u(i(), u(i(), t())).optional()
|
|
54
|
-
}),
|
|
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(
|
|
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(
|
|
70
|
+
searchMode: s(oe).optional(),
|
|
71
71
|
limit: a().optional(),
|
|
72
|
-
ranking:
|
|
73
|
-
reasoning:
|
|
74
|
-
webSearch:
|
|
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(
|
|
76
|
+
disabledTools: r(s(se)).optional(),
|
|
77
77
|
fallbackModels: r(i()).optional(),
|
|
78
|
-
gatewayOptions:
|
|
79
|
-
deviceContext:
|
|
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
|
|
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
|
|
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 =
|
|
108
|
-
s && (t.state === "output-error" &&
|
|
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
|
|
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:
|
|
155
|
+
conversationAnalysis: w.nullable().optional(),
|
|
149
156
|
blocked: c(),
|
|
150
157
|
blockedAt: d().nullable(),
|
|
151
|
-
blockedReasonCode: s(
|
|
158
|
+
blockedReasonCode: s(O).nullable(),
|
|
152
159
|
blockedReason: i().nullable(),
|
|
153
160
|
warningCount: a(),
|
|
154
161
|
lastMessageAt: d()
|
|
155
162
|
});
|
|
156
163
|
n({
|
|
157
|
-
...
|
|
158
|
-
...
|
|
164
|
+
...f.pagination(),
|
|
165
|
+
...f.sort([
|
|
159
166
|
"updatedAt",
|
|
160
167
|
"createdAt",
|
|
161
168
|
"lastMessageAt"
|
|
162
169
|
]),
|
|
163
|
-
...
|
|
164
|
-
...
|
|
165
|
-
...
|
|
166
|
-
...
|
|
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
|
-
},
|
|
204
|
+
}, L = "__itself__", R = class extends P {
|
|
198
205
|
constructor(e, t, n) {
|
|
199
206
|
super(e, n), this.field = t;
|
|
200
207
|
}
|
|
201
|
-
},
|
|
208
|
+
}, _e = new F("__null__", null);
|
|
202
209
|
Object.hasOwn;
|
|
203
|
-
function
|
|
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
|
|
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 =
|
|
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
|
|
236
|
+
var z = Object.defineProperty;
|
|
230
237
|
((e, t) => {
|
|
231
238
|
let n = {};
|
|
232
|
-
for (var r in e)
|
|
239
|
+
for (var r in e) z(n, r, {
|
|
233
240
|
get: e[r],
|
|
234
241
|
enumerable: !0
|
|
235
242
|
});
|
|
236
|
-
return t ||
|
|
243
|
+
return t || z(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
237
244
|
})({
|
|
238
|
-
$all: () =>
|
|
239
|
-
$and: () =>
|
|
240
|
-
$elemMatch: () =>
|
|
241
|
-
$eq: () =>
|
|
242
|
-
$exists: () =>
|
|
243
|
-
$gt: () =>
|
|
244
|
-
$gte: () =>
|
|
245
|
-
$in: () =>
|
|
246
|
-
$lt: () =>
|
|
247
|
-
$lte: () =>
|
|
248
|
-
$mod: () =>
|
|
249
|
-
$ne: () =>
|
|
250
|
-
$nin: () =>
|
|
251
|
-
$nor: () =>
|
|
252
|
-
$not: () =>
|
|
253
|
-
$options: () =>
|
|
254
|
-
$or: () =>
|
|
255
|
-
$regex: () =>
|
|
256
|
-
$size: () =>
|
|
257
|
-
$where: () =>
|
|
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
|
|
266
|
+
var B = {
|
|
260
267
|
type: "compound",
|
|
261
|
-
validate:
|
|
268
|
+
validate: Y,
|
|
262
269
|
parse(e, t, n) {
|
|
263
|
-
let r =
|
|
264
|
-
return
|
|
270
|
+
let r = U(e, t, n);
|
|
271
|
+
return ye(e.name, r);
|
|
265
272
|
}
|
|
266
|
-
},
|
|
273
|
+
}, V = B, H = {
|
|
267
274
|
type: "compound",
|
|
268
|
-
validate:
|
|
275
|
+
validate: Y,
|
|
269
276
|
parse(e, t, n) {
|
|
270
|
-
let r =
|
|
277
|
+
let r = U(e, t, n);
|
|
271
278
|
return new I(e.name, r);
|
|
272
279
|
}
|
|
273
280
|
};
|
|
274
|
-
function
|
|
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
|
-
|
|
285
|
+
Pe(e, a, i), r[i] = n.parse(a);
|
|
279
286
|
}
|
|
280
287
|
return r;
|
|
281
288
|
}
|
|
282
|
-
var
|
|
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
|
|
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
|
-
},
|
|
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:
|
|
298
|
-
return new
|
|
304
|
+
let a = i(t) ? n(t, { field: L }) : n(t);
|
|
305
|
+
return new R(e.name, r, a);
|
|
299
306
|
}
|
|
300
|
-
},
|
|
307
|
+
}, Se = {
|
|
301
308
|
type: "field",
|
|
302
|
-
validate:
|
|
303
|
-
},
|
|
309
|
+
validate: X("number")
|
|
310
|
+
}, W = {
|
|
304
311
|
type: "field",
|
|
305
|
-
validate:
|
|
306
|
-
},
|
|
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
|
-
},
|
|
318
|
+
}, Ee = {
|
|
312
319
|
type: "field",
|
|
313
|
-
validate:
|
|
314
|
-
},
|
|
320
|
+
validate: X("boolean")
|
|
321
|
+
}, G = {
|
|
315
322
|
type: "field",
|
|
316
|
-
validate:
|
|
317
|
-
},
|
|
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
|
|
331
|
+
return new R(e.name, n.field, r);
|
|
325
332
|
}
|
|
326
|
-
},
|
|
333
|
+
}, je = {
|
|
327
334
|
type: "field",
|
|
328
|
-
parse: () =>
|
|
329
|
-
},
|
|
335
|
+
parse: () => _e
|
|
336
|
+
}, Me = {
|
|
330
337
|
type: "document",
|
|
331
|
-
validate:
|
|
338
|
+
validate: X("function")
|
|
332
339
|
};
|
|
333
|
-
function
|
|
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
|
|
337
|
-
if (
|
|
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
|
|
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
|
|
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
|
|
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
|
|
360
|
+
var Z = /* @__PURE__ */ function(e) {
|
|
354
361
|
return e.Backoffice = "backoffice", e.Frontoffice = "frontoffice", e.System = "system", e.Public = "public", e;
|
|
355
|
-
}({})
|
|
356
|
-
|
|
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
|
-
] }),
|
|
394
|
-
|
|
395
|
-
|
|
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
|
|
372
|
+
async function Fe(e, t, n = {}) {
|
|
404
373
|
try {
|
|
405
|
-
let r =
|
|
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
|
|
390
|
+
var Ie = M.or(N);
|
|
422
391
|
function $(e) {
|
|
423
|
-
let t =
|
|
392
|
+
let t = Ie.safeParse(e);
|
|
424
393
|
return t.success ? t.data : e;
|
|
425
394
|
}
|
|
426
|
-
async function
|
|
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
|
|
436
|
-
let t = e.basePath ?
|
|
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
|
|
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
|
|
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
|
|
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,
|
|
581
|
+
export { k as a, A as i, Z as n, j as r, Re as t };
|
|
613
582
|
|
|
614
|
-
//# sourceMappingURL=createChatbotApiClient-
|
|
583
|
+
//# sourceMappingURL=createChatbotApiClient-BlWs282E.js.map
|