@8wave/ai-elements 0.99.0-beta.1 → 0.99.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-vue/_chunks/PkStreamingMarkdown-DEhbK-3c.js → dist/_chunks/PkStreamingMarkdown-6Xx9n1ue.js} +379 -362
- package/dist/_chunks/PkStreamingMarkdown-6Xx9n1ue.js.map +1 -0
- package/dist/_chunks/{PkToolRequestGeolocation-BJ9NJZIg.js → PkToolRequestGeolocation-B73evGBg.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-BJ9NJZIg.js.map → PkToolRequestGeolocation-B73evGBg.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-DdvJ6n1K.js → PkToolRequestOAuthConnection-BWP5dsK_.js} +3 -3
- package/dist/_chunks/{PkToolRequestOAuthConnection-DdvJ6n1K.js.map → PkToolRequestOAuthConnection-BWP5dsK_.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-BaGEr7O9.js → PkToolShowArtifact-bYYaMGxq.js} +7 -7
- package/dist/_chunks/{PkToolShowArtifact-BaGEr7O9.js.map → PkToolShowArtifact-bYYaMGxq.js.map} +1 -1
- package/dist/_chunks/{PkToolShowCalendarEvent-BYnhl2er.js → PkToolShowCalendarEvent-DdEWaTj-.js} +4 -4
- package/dist/_chunks/{PkToolShowCalendarEvent-BYnhl2er.js.map → PkToolShowCalendarEvent-DdEWaTj-.js.map} +1 -1
- package/dist/_chunks/{PkToolShowComparison-DahL5vHr.js → PkToolShowComparison-Dcar7HPW.js} +4 -4
- package/dist/_chunks/{PkToolShowComparison-DahL5vHr.js.map → PkToolShowComparison-Dcar7HPW.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-upUNZtId.js → PkToolShowContactForm-DtjVW-n6.js} +13 -13
- package/dist/_chunks/{PkToolShowContactForm-upUNZtId.js.map → PkToolShowContactForm-DtjVW-n6.js.map} +1 -1
- package/dist/_chunks/{PkToolShowDiagram-Jq_4KWiK.js → PkToolShowDiagram-X35nsoIY.js} +8 -8
- package/dist/_chunks/{PkToolShowDiagram-Jq_4KWiK.js.map → PkToolShowDiagram-X35nsoIY.js.map} +1 -1
- package/dist/_chunks/{PkToolShowEmail-CtmpDS1B.js → PkToolShowEmail-jVoK8qEh.js} +4 -4
- package/dist/_chunks/{PkToolShowEmail-CtmpDS1B.js.map → PkToolShowEmail-jVoK8qEh.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-dFuoqTPs.js → PkToolShowForm-BP8asXtz.js} +101 -79
- package/dist/_chunks/PkToolShowForm-BP8asXtz.js.map +1 -0
- package/dist/_chunks/{PkToolShowImageGallery-mLq2p3aH.js → PkToolShowImageGallery-WQL3T4Hr.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-mLq2p3aH.js.map → PkToolShowImageGallery-WQL3T4Hr.js.map} +1 -1
- package/dist/_chunks/{PkToolShowLocation-SbgTbuGu.js → PkToolShowLocation-w2t7lKpb.js} +4 -4
- package/dist/_chunks/{PkToolShowLocation-SbgTbuGu.js.map → PkToolShowLocation-w2t7lKpb.js.map} +1 -1
- package/dist/_chunks/{PkToolShowMessage-CAVpDTzd.js → PkToolShowMessage-BPo7WPim.js} +4 -4
- package/dist/_chunks/{PkToolShowMessage-CAVpDTzd.js.map → PkToolShowMessage-BPo7WPim.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-puiPFItN.js → PkToolShowProductList-BbY4ni7Y.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-puiPFItN.js.map → PkToolShowProductList-BbY4ni7Y.js.map} +1 -1
- package/dist/_chunks/{PkToolShowQrCode-CctXvRyG.js → PkToolShowQrCode-CN0ms27N.js} +4 -4
- package/dist/_chunks/{PkToolShowQrCode-CctXvRyG.js.map → PkToolShowQrCode-CN0ms27N.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-DwB6VXrK.js → PkToolShowSources-D2tBcx7n.js} +18 -18
- package/dist/_chunks/{PkToolShowSources-DwB6VXrK.js.map → PkToolShowSources-D2tBcx7n.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-QEcIhSxa.js → PkToolShowSuggestedReply-Cdh_elSh.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-QEcIhSxa.js.map → PkToolShowSuggestedReply-Cdh_elSh.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-DoLoI8_N.js → PkToolShowVideo-D3aU5FMO.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-DoLoI8_N.js.map → PkToolShowVideo-D3aU5FMO.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWeather-C2rPCQ_K.js → PkToolShowWeather-CzanXIJp.js} +3 -3
- package/dist/_chunks/{PkToolShowWeather-C2rPCQ_K.js.map → PkToolShowWeather-CzanXIJp.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-BBJYzF8V.js → PkToolShowWebPages-DkMJrWmT.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-BBJYzF8V.js.map → PkToolShowWebPages-DkMJrWmT.js.map} +1 -1
- package/dist/_chunks/{VvCheckbox.es-D5d8k9yP.js → VvCheckbox.es-CRhIKQNR.js} +2 -2
- package/dist/_chunks/{VvCheckbox.es-D5d8k9yP.js.map → VvCheckbox.es-CRhIKQNR.js.map} +1 -1
- package/dist/_chunks/{VvCheckboxGroup.es-DVnsOjX0.js → VvCheckboxGroup.es-gOy2kM1Y.js} +5 -5
- package/dist/_chunks/{VvCheckboxGroup.es-DVnsOjX0.js.map → VvCheckboxGroup.es-gOy2kM1Y.js.map} +1 -1
- package/dist/_chunks/{VvCombobox.es-CFA-K-cQ.js → VvCombobox.es-BOwH3LmO.js} +9 -9
- package/dist/_chunks/VvCombobox.es-BOwH3LmO.js.map +1 -0
- package/dist/_chunks/{VvInputText.es-csEQ-bSG.js → VvInputText.es-D8nXroKO.js} +536 -513
- package/dist/_chunks/VvInputText.es-D8nXroKO.js.map +1 -0
- package/dist/_chunks/{VvRadio.es-BpymhC73.js → VvRadio.es-Djy5J33A.js} +2 -2
- package/dist/_chunks/{VvRadio.es-BpymhC73.js.map → VvRadio.es-Djy5J33A.js.map} +1 -1
- package/dist/_chunks/{VvRadioGroup.es-CSNzOJKx.js → VvRadioGroup.es-DQq3JYCR.js} +5 -5
- package/dist/_chunks/VvRadioGroup.es-DQq3JYCR.js.map +1 -0
- package/dist/_chunks/{VvSelect.es-CjKMd0nH.js → VvSelect.es-CE4x1ww0.js} +4 -4
- package/dist/_chunks/{VvSelect.es-CjKMd0nH.js.map → VvSelect.es-CE4x1ww0.js.map} +1 -1
- package/dist/_chunks/VvTextarea.es-BU2vqdEQ.js +1129 -0
- package/dist/_chunks/VvTextarea.es-BU2vqdEQ.js.map +1 -0
- package/dist/_chunks/{dist-BNET2z7b.js → dist-CvMCBce7.js} +39 -21
- package/dist/_chunks/dist-CvMCBce7.js.map +1 -0
- package/dist/_chunks/dot-prop-CObyt75F.js +141 -0
- package/dist/_chunks/dot-prop-CObyt75F.js.map +1 -0
- package/dist/_chunks/{floating-ui.vue-CIKvCpTA.js → floating-ui.vue-BacoFpVq.js} +278 -305
- package/dist/_chunks/floating-ui.vue-BacoFpVq.js.map +1 -0
- package/dist/_chunks/{index.es-u1dF1xg2.js → index.es-DpqfagWZ.js} +12 -12
- package/dist/_chunks/{index.es-u1dF1xg2.js.map → index.es-DpqfagWZ.js.map} +1 -1
- package/dist/_chunks/{index.es-BYny0uhz.js → index.es-_oXVRjHy.js} +2352 -2329
- package/dist/_chunks/index.es-_oXVRjHy.js.map +1 -0
- package/dist/ai-elements.es.js +4087 -5205
- 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/PkChatbotFeedbackForm.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.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/PkChatbot-Bf5uY3cO.js +236 -0
- package/dist-vue/_chunks/{PkChatbot-BlG1WlAO.js.map → PkChatbot-Bf5uY3cO.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotAuth-C_L2xWuD.js → PkChatbotAuth-BGn2MDYD.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotAuth-C_L2xWuD.js.map → PkChatbotAuth-BGn2MDYD.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-BGOC6vxr.js → PkChatbotEmptyState-CPqLqXek.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-BGOC6vxr.js.map → PkChatbotEmptyState-CPqLqXek.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BSe40qlc.js → PkChatbotFeedbackForm-C_y__RH8.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BSe40qlc.js.map → PkChatbotFeedbackForm-C_y__RH8.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-DTazYlPd.js → PkChatbotInput-jvb0vuak.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-DTazYlPd.js.map → PkChatbotInput-jvb0vuak.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-BrufA7o1.js → PkChatbotMessages-B3G12zah.js} +246 -246
- package/dist-vue/_chunks/{PkChatbotMessages-BrufA7o1.js.map → PkChatbotMessages-B3G12zah.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotSteps-BdU6YC_N.js +172 -0
- package/dist-vue/_chunks/{PkChatbotSteps-Dv9NkYER.js.map → PkChatbotSteps-BdU6YC_N.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-CAqvbbfN.js → PkChatbotViewChat-c0Ecpzoc.js} +6 -6
- package/dist-vue/_chunks/{PkChatbotViewChat-CAqvbbfN.js.map → PkChatbotViewChat-c0Ecpzoc.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-Cq41H-tc.js → PkChatbotViewConversations-BfhRCA_1.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-Cq41H-tc.js.map → PkChatbotViewConversations-BfhRCA_1.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-DNuzmBJc.js → PkChatbotViewFiles-BipRoidH.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewFiles-DNuzmBJc.js.map → PkChatbotViewFiles-BipRoidH.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-C0BXIY2N.js → PkChatbotViewProfile-DuLwYpGZ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-C0BXIY2N.js.map → PkChatbotViewProfile-DuLwYpGZ.js.map} +1 -1
- package/{dist/_chunks/PkStreamingMarkdown-Djw604Ny.js → dist-vue/_chunks/PkStreamingMarkdown-CjBMQ18U.js} +344 -347
- package/dist-vue/_chunks/PkStreamingMarkdown-CjBMQ18U.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowArtifact-CTBwt4DN.js → PkToolShowArtifact-COwSXmF4.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-CTBwt4DN.js.map → PkToolShowArtifact-COwSXmF4.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-B6-MsExL.js → PkToolShowContactForm-DRRtCCxB.js} +10 -10
- package/dist-vue/_chunks/{PkToolShowContactForm-B6-MsExL.js.map → PkToolShowContactForm-DRRtCCxB.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-CQuX08lk.js → PkToolShowForm-j7Ha-0X3.js} +109 -87
- package/dist-vue/_chunks/PkToolShowForm-j7Ha-0X3.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowSources-CFh-i60o.js → PkToolShowSources-BVLw4W5l.js} +43 -43
- package/dist-vue/_chunks/{PkToolShowSources-CFh-i60o.js.map → PkToolShowSources-BVLw4W5l.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-BMZltBLh.js → createChatbotApiClient-IH6wBh4s.js} +365 -381
- package/dist-vue/_chunks/createChatbotApiClient-IH6wBh4s.js.map +1 -0
- package/dist-vue/_chunks/{index.es-XfWQ82pb.js → index.es-Bk1O0p8N.js} +166 -156
- package/dist-vue/_chunks/index.es-Bk1O0p8N.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-DZiorgLW.js → useChatbotStore-C3uKi2FS.js} +3 -5
- package/dist-vue/_chunks/useChatbotStore-C3uKi2FS.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +2 -2
- package/dist-vue/index.js +4430 -4221
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +27 -7
- package/dist-vue/packages/components/src/PkCheckboxField.d.ts +1 -1
- package/dist-vue/packages/components/src/PkOfflineScreen.d.ts +18 -0
- package/dist-vue/packages/components/src/PkPwaNotices.d.ts +19 -0
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +9 -3
- package/dist-vue/packages/components/src/index.d.ts +3 -3
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +36 -0
- package/dist-vue/packages/composable/src/index.d.ts +1 -0
- package/dist-vue/packages/composable/src/useConnectivity.d.ts +28 -0
- package/dist-vue/packages/models/src/schema/Agent.d.ts +81 -0
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +24 -0
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +24 -0
- package/dist-vue/style.css +1 -1
- package/package.json +3 -3
- package/dist/_chunks/PkStreamingMarkdown-Djw604Ny.js.map +0 -1
- package/dist/_chunks/PkToolShowForm-dFuoqTPs.js.map +0 -1
- package/dist/_chunks/VvCombobox.es-CFA-K-cQ.js.map +0 -1
- package/dist/_chunks/VvInputText.es-csEQ-bSG.js.map +0 -1
- package/dist/_chunks/VvRadioGroup.es-CSNzOJKx.js.map +0 -1
- package/dist/_chunks/VvTextarea.es-eEyRRpuT.js +0 -1109
- package/dist/_chunks/VvTextarea.es-eEyRRpuT.js.map +0 -1
- package/dist/_chunks/dist-BNET2z7b.js.map +0 -1
- package/dist/_chunks/dot-prop-BXrC9bAX.js +0 -131
- package/dist/_chunks/dot-prop-BXrC9bAX.js.map +0 -1
- package/dist/_chunks/floating-ui.vue-CIKvCpTA.js.map +0 -1
- package/dist/_chunks/index.es-BYny0uhz.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-BlG1WlAO.js +0 -236
- package/dist-vue/_chunks/PkChatbotSteps-Dv9NkYER.js +0 -172
- package/dist-vue/_chunks/PkStreamingMarkdown-DEhbK-3c.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowForm-CQuX08lk.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-BMZltBLh.js.map +0 -1
- package/dist-vue/_chunks/index.es-XfWQ82pb.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-DZiorgLW.js.map +0 -1
- package/dist-vue/packages/components/src/PkPwaInstallPrompt.d.ts +0 -4
- package/dist-vue/packages/components/src/PkPwaOfflineNotice.d.ts +0 -4
package/dist-vue/_chunks/{createChatbotApiClient-BMZltBLh.js → createChatbotApiClient-IH6wBh4s.js}
RENAMED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { S as e, _ as t, a as n, b as r, d as i, f as a, g as o, h as s, i as
|
|
2
|
-
import { i as
|
|
3
|
-
import { a as
|
|
1
|
+
import { S as e, _ as t, a as n, b as r, d as i, f as a, g as o, h as s, i as c, l, n as u, o as d, v as f, x as p } from "./schemas-DnUKIqgi.js";
|
|
2
|
+
import { i as m, n as ee, t as te } from "./Media-B_7Yj-ml.js";
|
|
3
|
+
import { a as ne, o as re, r as ie, s as h } from "./constants-BCJ_gKeL.js";
|
|
4
4
|
import "./src-8QXYVWIx.js";
|
|
5
|
-
import { r as
|
|
6
|
-
import { Ability as
|
|
7
|
-
import { createAccessControl as
|
|
8
|
-
import { adminAc as
|
|
5
|
+
import { r as g, t as ae } from "./url-validation-uLMZ5-AU.js";
|
|
6
|
+
import { Ability as oe, buildMongoQueryMatcher as se, createAliasResolver as ce } from "@casl/ability";
|
|
7
|
+
import { createAccessControl as le } from "better-auth/plugins";
|
|
8
|
+
import { adminAc as ue, defaultStatements as de, memberAc as _, ownerAc as fe } from "better-auth/plugins/organization/access";
|
|
9
9
|
//#region ../../packages/models/src/schema/Agent.ts
|
|
10
|
-
var
|
|
10
|
+
var v = /* @__PURE__ */ function(e) {
|
|
11
11
|
return e.Draft = "draft", e.Active = "active", e.Inactive = "inactive", e;
|
|
12
|
-
}({}),
|
|
12
|
+
}({}), y = /* @__PURE__ */ function(e) {
|
|
13
13
|
return e.Public = "public", e.Private = "private", e.Organization = "organization", e;
|
|
14
|
-
}({}),
|
|
14
|
+
}({}), b = /* @__PURE__ */ function(e) {
|
|
15
15
|
return e.Chat = "chat", e.Reasoning = "reasoning", e;
|
|
16
|
-
}({}),
|
|
16
|
+
}({}), x = /* @__PURE__ */ function(e) {
|
|
17
17
|
return e.Semantic = "semantic", e.Balanced = "balanced", e.Keyword = "keyword", e;
|
|
18
|
-
}({}),
|
|
19
|
-
reasoningEffort:
|
|
18
|
+
}({}), pe = o({
|
|
19
|
+
reasoningEffort: u([
|
|
20
20
|
"none",
|
|
21
21
|
"low",
|
|
22
22
|
"medium",
|
|
23
23
|
"high",
|
|
24
24
|
"xhigh"
|
|
25
25
|
]).optional(),
|
|
26
|
-
reasoningSummary:
|
|
26
|
+
reasoningSummary: u([
|
|
27
27
|
"auto",
|
|
28
28
|
"detailed",
|
|
29
29
|
"concise"
|
|
30
30
|
]).optional()
|
|
31
|
-
}),
|
|
32
|
-
type:
|
|
31
|
+
}), me = o({
|
|
32
|
+
type: u([
|
|
33
33
|
"adaptive",
|
|
34
34
|
"enabled",
|
|
35
35
|
"disabled"
|
|
36
36
|
]).optional(),
|
|
37
|
-
effort:
|
|
37
|
+
effort: u([
|
|
38
38
|
"low",
|
|
39
39
|
"medium",
|
|
40
40
|
"high",
|
|
41
41
|
"xhigh",
|
|
42
42
|
"max"
|
|
43
43
|
]).optional(),
|
|
44
|
-
display:
|
|
44
|
+
display: u(["summarized", "omitted"]).optional(),
|
|
45
45
|
budgetTokens: s().int().positive().optional()
|
|
46
|
-
}),
|
|
47
|
-
thinkingLevel:
|
|
46
|
+
}), he = o({
|
|
47
|
+
thinkingLevel: u([
|
|
48
48
|
"minimal",
|
|
49
49
|
"low",
|
|
50
50
|
"medium",
|
|
51
51
|
"high"
|
|
52
52
|
]).optional(),
|
|
53
53
|
thinkingBudget: s().int().optional(),
|
|
54
|
-
includeThoughts:
|
|
55
|
-
}),
|
|
56
|
-
openai:
|
|
57
|
-
anthropic:
|
|
58
|
-
google:
|
|
59
|
-
deepseek:
|
|
54
|
+
includeThoughts: d().optional()
|
|
55
|
+
}), ge = o({ type: u(["enabled", "disabled"]).optional() }), _e = o({
|
|
56
|
+
openai: pe.optional(),
|
|
57
|
+
anthropic: me.optional(),
|
|
58
|
+
google: he.optional(),
|
|
59
|
+
deepseek: ge.optional()
|
|
60
60
|
});
|
|
61
|
-
function
|
|
61
|
+
function ve(e) {
|
|
62
62
|
if (!e || typeof e != "object") return e;
|
|
63
63
|
let t = e;
|
|
64
64
|
if ("effort" in t && !("openai" in t || "anthropic" in t || "google" in t || "deepseek" in t)) {
|
|
@@ -73,78 +73,60 @@ function _e(e) {
|
|
|
73
73
|
}
|
|
74
74
|
return e;
|
|
75
75
|
}
|
|
76
|
-
var
|
|
77
|
-
function ve(e, t) {
|
|
78
|
-
if (!t) return !1;
|
|
79
|
-
let [n = ""] = e.split("/");
|
|
80
|
-
if (n === "openai") {
|
|
81
|
-
let e = t.openai;
|
|
82
|
-
return !!(e?.reasoningEffort && e.reasoningEffort !== "none");
|
|
83
|
-
}
|
|
84
|
-
if (n === "anthropic") {
|
|
85
|
-
let e = t.anthropic;
|
|
86
|
-
return !!(e && e.type !== "disabled");
|
|
87
|
-
}
|
|
88
|
-
if (n === "google") {
|
|
89
|
-
let e = t.google;
|
|
90
|
-
return !e || e.thinkingBudget === 0 ? !1 : !!(e.thinkingLevel && e.thinkingLevel !== "minimal" || e.thinkingBudget || e.includeThoughts);
|
|
91
|
-
}
|
|
92
|
-
return n === "deepseek" && t.deepseek?.type === "enabled";
|
|
93
|
-
}
|
|
94
|
-
var w = /* @__PURE__ */ function(e) {
|
|
76
|
+
var S = ne(r(), _e, ve).optional(), C = /* @__PURE__ */ function(e) {
|
|
95
77
|
return e.Geocode = "geocode", e.GetWeather = "getWeather", e.ReadDocumentFile = "readDocumentFile", e.RequestConfirm = "requestConfirm", e.RequestGeolocation = "requestGeolocation", e.RetrieveRevisedAnswers = "retrieveRevisedAnswers", e.SearchInKnowledgeBase = "searchInKnowledgeBase", e.SearchInUserFiles = "searchInUserFiles", e.UserMemory = "userMemory", e.RunWorker = "runWorker", e.FetchTeamsChannelHistory = "fetchTeamsChannelHistory", e.ShowArtifact = "showArtifact", e.ShowCalendarEvent = "showCalendarEvent", e.ShowComparison = "showComparison", e.ShowContactForm = "showContactForm", e.ShowDiagram = "showDiagram", e.ShowEmail = "showEmail", e.ShowImageGallery = "showImageGallery", e.ShowLocation = "showLocation", e.ShowMessage = "showMessage", e.ShowForm = "showForm", e.ShowProductList = "showProductList", e.ShowQrCode = "showQrCode", e.ShowSources = "showSources", e.ShowSuggestedReply = "showSuggestedReply", e.ShowVideo = "showVideo", e.ShowWeather = "showWeather", e.ShowWebPages = "showWebPages", e.ShowMultipleChoice = "showMultipleChoice", e;
|
|
96
78
|
}({});
|
|
97
79
|
function ye(e) {
|
|
98
|
-
return !be(e) && e !==
|
|
80
|
+
return !be(e) && e !== C.RequestGeolocation;
|
|
99
81
|
}
|
|
100
82
|
function be(e) {
|
|
101
|
-
return e ===
|
|
83
|
+
return e === C.RequestConfirm || e === C.ShowArtifact || e === C.ShowCalendarEvent || e === C.ShowComparison || e === C.ShowContactForm || e === C.ShowDiagram || e === C.ShowEmail || e === C.ShowImageGallery || e === C.ShowLocation || e === C.ShowMessage || e === C.ShowForm || e === C.ShowMultipleChoice || e === C.ShowProductList || e === C.ShowQrCode || e === C.ShowSources || e === C.ShowSuggestedReply || e === C.ShowVideo || e === C.ShowWeather || e === C.ShowWebPages;
|
|
102
84
|
}
|
|
103
85
|
var xe = /* @__PURE__ */ new Set([
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
86
|
+
C.RequestConfirm,
|
|
87
|
+
C.ShowArtifact,
|
|
88
|
+
C.ShowWeather,
|
|
89
|
+
C.ShowLocation,
|
|
90
|
+
C.ShowComparison,
|
|
91
|
+
C.ShowProductList,
|
|
92
|
+
C.ShowWebPages,
|
|
93
|
+
C.ShowImageGallery,
|
|
94
|
+
C.ShowVideo,
|
|
95
|
+
C.ShowSources,
|
|
96
|
+
C.ShowSuggestedReply,
|
|
97
|
+
C.ShowCalendarEvent,
|
|
98
|
+
C.ShowEmail,
|
|
99
|
+
C.ShowMessage,
|
|
100
|
+
C.ShowForm
|
|
119
101
|
]);
|
|
120
102
|
function Se(e) {
|
|
121
103
|
return xe.has(e);
|
|
122
104
|
}
|
|
123
|
-
var
|
|
105
|
+
var w = o({
|
|
124
106
|
maxSteps: s().int().min(1).max(10).optional().default(5),
|
|
125
107
|
maxOptionsPerStep: s().int().min(2).max(10).optional().default(5)
|
|
126
|
-
}), E = /* @__PURE__ */ function(e) {
|
|
108
|
+
}), T = o({ mode: u(["optional", "required"]).optional().default("optional") }), E = o({ mode: u(["optional", "required"]).optional().default("required") }), D = /* @__PURE__ */ function(e) {
|
|
127
109
|
return e.Perplexity = "perplexity", e.Parallel = "parallel", e.Native = "native", e;
|
|
128
110
|
}({}), Ce = o({
|
|
129
111
|
maxResults: s().int().min(1).max(20).optional(),
|
|
130
112
|
maxTokens: s().int().positive().max(1e6).optional(),
|
|
131
113
|
maxTokensPerPage: s().int().positive().optional(),
|
|
132
|
-
country:
|
|
133
|
-
searchLanguageFilter: n(
|
|
134
|
-
searchDomainFilter: n(
|
|
135
|
-
searchRecencyFilter:
|
|
114
|
+
country: f().max(2).optional(),
|
|
115
|
+
searchLanguageFilter: n(f().max(5)).max(10).optional(),
|
|
116
|
+
searchDomainFilter: n(f()).max(20).optional(),
|
|
117
|
+
searchRecencyFilter: u([
|
|
136
118
|
"day",
|
|
137
119
|
"week",
|
|
138
120
|
"month",
|
|
139
121
|
"year"
|
|
140
122
|
]).optional()
|
|
141
123
|
}), we = o({
|
|
142
|
-
mode:
|
|
124
|
+
mode: u(["one-shot", "agentic"]).optional(),
|
|
143
125
|
maxResults: s().int().min(1).max(20).optional(),
|
|
144
126
|
sourcePolicy: o({
|
|
145
|
-
includeDomains: n(
|
|
146
|
-
excludeDomains: n(
|
|
147
|
-
afterDate:
|
|
127
|
+
includeDomains: n(f()).optional(),
|
|
128
|
+
excludeDomains: n(f()).optional(),
|
|
129
|
+
afterDate: f().optional()
|
|
148
130
|
}).optional(),
|
|
149
131
|
excerpts: o({
|
|
150
132
|
maxCharsPerResult: s().int().positive().optional(),
|
|
@@ -155,97 +137,99 @@ var T = o({
|
|
|
155
137
|
openai: o({}).optional(),
|
|
156
138
|
anthropic: o({
|
|
157
139
|
maxUses: s().int().positive().optional(),
|
|
158
|
-
allowedDomains: n(
|
|
159
|
-
blockedDomains: n(
|
|
140
|
+
allowedDomains: n(f()).optional(),
|
|
141
|
+
blockedDomains: n(f()).optional(),
|
|
160
142
|
userLocation: o({
|
|
161
143
|
type: a("approximate").optional(),
|
|
162
|
-
country:
|
|
163
|
-
region:
|
|
164
|
-
city:
|
|
165
|
-
timezone:
|
|
144
|
+
country: f().optional(),
|
|
145
|
+
region: f().optional(),
|
|
146
|
+
city: f().optional(),
|
|
147
|
+
timezone: f().optional()
|
|
166
148
|
}).optional()
|
|
167
149
|
}).optional(),
|
|
168
150
|
google: o({}).optional()
|
|
169
|
-
}),
|
|
170
|
-
enabled:
|
|
171
|
-
provider:
|
|
151
|
+
}), O = o({
|
|
152
|
+
enabled: d().default(!1),
|
|
153
|
+
provider: u(D).optional().default(D.Native),
|
|
172
154
|
perplexity: Ce.optional(),
|
|
173
155
|
parallel: we.optional(),
|
|
174
156
|
native: Te.optional()
|
|
175
|
-
}),
|
|
176
|
-
disabled: n(
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
157
|
+
}), k = o({ useAllUserKb: d().default(!1) }), A = o({ useAllUserFiles: d().default(!1) }), j = o({ tools: n(f()).default([]) }), M = o({
|
|
158
|
+
disabled: n(u(C)).default([
|
|
159
|
+
C.UserMemory,
|
|
160
|
+
C.SearchInUserFiles,
|
|
161
|
+
C.RunWorker,
|
|
162
|
+
C.FetchTeamsChannelHistory
|
|
181
163
|
]),
|
|
182
|
-
showForm:
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
164
|
+
showForm: w.optional().default(() => w.parse({})),
|
|
165
|
+
suggestedReply: T.optional().default(() => T.parse({})),
|
|
166
|
+
showSources: E.optional().default(() => E.parse({})),
|
|
167
|
+
webSearch: O.optional().default(() => O.parse({})),
|
|
168
|
+
userMemory: k.optional().default(() => k.parse({})),
|
|
169
|
+
userFiles: A.optional().default(() => A.parse({})),
|
|
170
|
+
approval: j.optional().default(() => j.parse({}))
|
|
171
|
+
}), N = o({
|
|
188
172
|
freshness: o({
|
|
189
|
-
enabled:
|
|
173
|
+
enabled: d().default(!1),
|
|
190
174
|
scale: s().int().min(86400).max(31536e3).default(7776e3),
|
|
191
175
|
weight: s().min(.05).max(.5).default(.1)
|
|
192
176
|
}).prefault({}),
|
|
193
|
-
priority: o({ enabled:
|
|
177
|
+
priority: o({ enabled: d().default(!0) }).prefault({}),
|
|
194
178
|
mmr: o({
|
|
195
|
-
enabled:
|
|
179
|
+
enabled: d().default(!1),
|
|
196
180
|
diversity: s().min(0).max(1).default(.3),
|
|
197
181
|
candidatesLimit: s().int().min(20).max(100).default(50)
|
|
198
182
|
}).prefault({})
|
|
199
|
-
}).prefault({}),
|
|
200
|
-
prompt:
|
|
183
|
+
}).prefault({}), Ee = o({
|
|
184
|
+
prompt: f().optional(),
|
|
201
185
|
temperature: s().min(0).max(2).optional().default(.6),
|
|
202
186
|
maxOutputTokens: s().positive().optional(),
|
|
203
187
|
presencePenalty: s().min(-2).max(2).optional(),
|
|
204
188
|
frequencyPenalty: s().min(-2).max(2).optional(),
|
|
205
|
-
searchMode:
|
|
189
|
+
searchMode: u(x).optional().default(x.Balanced),
|
|
206
190
|
limit: s().positive().max(100).optional().default(10),
|
|
207
191
|
maxStepCount: s().int().min(1).max(40).optional().default(10),
|
|
208
|
-
reasoning:
|
|
209
|
-
ranking:
|
|
210
|
-
}),
|
|
192
|
+
reasoning: S,
|
|
193
|
+
ranking: N.optional().default(() => N.parse({}))
|
|
194
|
+
}), P = ne(r(), t(f(), f()), (e) => typeof e == "string" ? { it: e } : e), F = "https://cdn.jsdelivr.net/npm/@8wave/ai-elements/dist/ai-elements.es.js", I = /* @__PURE__ */ function(e) {
|
|
211
195
|
return e.InlineModule = "inline-module", e.ScriptSrc = "script-src", e.DynamicImport = "dynamic-import", e;
|
|
212
|
-
}({}),
|
|
196
|
+
}({}), L = /* @__PURE__ */ function(e) {
|
|
213
197
|
return e.Frontoffice = "frontoffice", e.App = "app", e.Widget = "widget", e;
|
|
214
|
-
}({}),
|
|
215
|
-
media:
|
|
216
|
-
logo:
|
|
217
|
-
theme:
|
|
198
|
+
}({}), R = Object.values(L), z = o({
|
|
199
|
+
media: ee.optional(),
|
|
200
|
+
logo: f().optional(),
|
|
201
|
+
theme: u([
|
|
218
202
|
"light",
|
|
219
203
|
"dark",
|
|
220
204
|
"auto"
|
|
221
205
|
]).optional().default("auto"),
|
|
222
|
-
mainColor:
|
|
223
|
-
textColor:
|
|
206
|
+
mainColor: f().regex(/^#[0-9A-Fa-f]{6}$/).optional().default("#000000"),
|
|
207
|
+
textColor: u([
|
|
224
208
|
"auto",
|
|
225
209
|
"white",
|
|
226
210
|
"black"
|
|
227
211
|
]).optional().default("auto"),
|
|
228
|
-
useColorsForAgentHeader:
|
|
229
|
-
initialMessage:
|
|
230
|
-
greeting: n(
|
|
231
|
-
messagePlaceholder:
|
|
232
|
-
dismissableNotice:
|
|
233
|
-
footerMessage:
|
|
234
|
-
privacyPolicyNotice:
|
|
235
|
-
interactiveLogin:
|
|
236
|
-
welcomePopup:
|
|
237
|
-
floatingButtonPosition:
|
|
212
|
+
useColorsForAgentHeader: d().optional().default(!1),
|
|
213
|
+
initialMessage: P.optional(),
|
|
214
|
+
greeting: n(P).min(1).max(10).optional(),
|
|
215
|
+
messagePlaceholder: P.optional(),
|
|
216
|
+
dismissableNotice: P.optional(),
|
|
217
|
+
footerMessage: P.optional(),
|
|
218
|
+
privacyPolicyNotice: P.optional(),
|
|
219
|
+
interactiveLogin: d().optional().default(!0),
|
|
220
|
+
welcomePopup: d().optional().default(!1),
|
|
221
|
+
floatingButtonPosition: u(["left", "right"]).optional().default("right"),
|
|
238
222
|
maxMessageLength: s().int().positive().optional(),
|
|
239
|
-
widgetUrl:
|
|
223
|
+
widgetUrl: p().default(F),
|
|
240
224
|
loadDelay: s().int().min(0).max(3e4).optional().default(0),
|
|
241
|
-
loaderStrategy:
|
|
242
|
-
customCss:
|
|
243
|
-
smoothStream:
|
|
244
|
-
showExtendedSteps:
|
|
245
|
-
}),
|
|
246
|
-
enabled:
|
|
225
|
+
loaderStrategy: u(I).optional().default(I.InlineModule),
|
|
226
|
+
customCss: f().optional(),
|
|
227
|
+
smoothStream: d().optional().default(!1),
|
|
228
|
+
showExtendedSteps: d().optional().default(!1)
|
|
229
|
+
}), B = o({
|
|
230
|
+
enabled: d().default(!1),
|
|
247
231
|
maxFileSizeBytes: s().int().positive().max(104857600).optional().default(20971520),
|
|
248
|
-
allowedMimeTypes: n(
|
|
232
|
+
allowedMimeTypes: n(f().regex(te)).optional().default([
|
|
249
233
|
"image/jpeg",
|
|
250
234
|
"image/png",
|
|
251
235
|
"image/gif",
|
|
@@ -257,102 +241,102 @@ var T = o({
|
|
|
257
241
|
]),
|
|
258
242
|
maxFilesPerMessage: s().int().positive().max(10).optional().default(5),
|
|
259
243
|
maxFilesPerChat: s().int().positive().max(50).optional().default(20)
|
|
260
|
-
}),
|
|
261
|
-
zeroDataRetention:
|
|
262
|
-
disallowPromptTraining:
|
|
244
|
+
}), V = o({
|
|
245
|
+
zeroDataRetention: d().default(!0),
|
|
246
|
+
disallowPromptTraining: d().default(!0),
|
|
263
247
|
providerTimeoutMs: s().int().min(1e3).max(789e3).optional()
|
|
264
|
-
}),
|
|
265
|
-
model:
|
|
266
|
-
interface:
|
|
267
|
-
tools:
|
|
268
|
-
fileUpload:
|
|
269
|
-
gatewayOptions:
|
|
270
|
-
channels: n(
|
|
271
|
-
externalContextSchema:
|
|
272
|
-
}),
|
|
248
|
+
}), H = o({
|
|
249
|
+
model: Ee,
|
|
250
|
+
interface: z,
|
|
251
|
+
tools: M.optional().default(() => M.parse({})),
|
|
252
|
+
fileUpload: B.optional().default(() => B.parse({})),
|
|
253
|
+
gatewayOptions: V.optional().default(() => V.parse({})),
|
|
254
|
+
channels: n(u(L)).optional().default(() => [...R]),
|
|
255
|
+
externalContextSchema: re.optional()
|
|
256
|
+
}), U = o({
|
|
273
257
|
rateLimits: o({
|
|
274
258
|
minuteRateLimit: s().int().min(0).optional(),
|
|
275
259
|
hourRateLimit: s().int().min(0).optional(),
|
|
276
260
|
dayRateLimit: s().int().min(0).optional(),
|
|
277
261
|
monthRateLimit: s().int().min(0).optional()
|
|
278
262
|
}),
|
|
279
|
-
trustedOrigins: o({ origins: n(
|
|
263
|
+
trustedOrigins: o({ origins: n(p().or(a(""))).overwrite((e) => e?.filter((e) => e?.trim())).default([]) }).default({ origins: [] })
|
|
280
264
|
});
|
|
281
265
|
o({
|
|
282
|
-
id:
|
|
283
|
-
name:
|
|
284
|
-
prompt:
|
|
285
|
-
model:
|
|
286
|
-
fallbackModels: n(
|
|
287
|
-
status:
|
|
288
|
-
visibility:
|
|
289
|
-
settings:
|
|
290
|
-
security:
|
|
291
|
-
type:
|
|
292
|
-
organizationId:
|
|
266
|
+
id: f().optional(),
|
|
267
|
+
name: f(),
|
|
268
|
+
prompt: f().optional(),
|
|
269
|
+
model: f().default(ie.gpt52Chat),
|
|
270
|
+
fallbackModels: n(f()).default([]),
|
|
271
|
+
status: u(v).default(v.Draft),
|
|
272
|
+
visibility: u(y).default(y.Organization),
|
|
273
|
+
settings: H,
|
|
274
|
+
security: U.nullish(),
|
|
275
|
+
type: u(b).default(b.Chat),
|
|
276
|
+
organizationId: f()
|
|
293
277
|
}), i(() => o({
|
|
294
|
-
id:
|
|
295
|
-
name:
|
|
296
|
-
prompt:
|
|
297
|
-
model:
|
|
298
|
-
fallbackModels: n(
|
|
299
|
-
status:
|
|
300
|
-
visibility:
|
|
301
|
-
settings:
|
|
302
|
-
security:
|
|
303
|
-
type:
|
|
304
|
-
organizationId:
|
|
305
|
-
createdAt:
|
|
306
|
-
createdBy:
|
|
307
|
-
updatedAt:
|
|
308
|
-
updatedBy:
|
|
309
|
-
deleted:
|
|
310
|
-
deletedAt:
|
|
311
|
-
deletedBy:
|
|
312
|
-
outOfBudget:
|
|
313
|
-
outOfBudgetReason:
|
|
278
|
+
id: f(),
|
|
279
|
+
name: f(),
|
|
280
|
+
prompt: f(),
|
|
281
|
+
model: f(),
|
|
282
|
+
fallbackModels: n(f()).nullable().default([]),
|
|
283
|
+
status: u(v).default(v.Draft),
|
|
284
|
+
visibility: u(y).default(y.Organization),
|
|
285
|
+
settings: H,
|
|
286
|
+
security: U.nullable(),
|
|
287
|
+
type: u(b).default(b.Chat),
|
|
288
|
+
organizationId: f(),
|
|
289
|
+
createdAt: m(),
|
|
290
|
+
createdBy: f(),
|
|
291
|
+
updatedAt: m(),
|
|
292
|
+
updatedBy: f(),
|
|
293
|
+
deleted: d(),
|
|
294
|
+
deletedAt: m().nullable(),
|
|
295
|
+
deletedBy: f().nullable(),
|
|
296
|
+
outOfBudget: d().optional().default(!1),
|
|
297
|
+
outOfBudgetReason: f().optional().default("")
|
|
314
298
|
}));
|
|
315
|
-
var
|
|
316
|
-
id:
|
|
317
|
-
name:
|
|
318
|
-
status:
|
|
319
|
-
visibility:
|
|
320
|
-
organizationId:
|
|
321
|
-
interface:
|
|
322
|
-
createdAt:
|
|
323
|
-
updatedAt:
|
|
324
|
-
capabilities: o({ fileUpload:
|
|
325
|
-
channels: n(
|
|
326
|
-
}),
|
|
299
|
+
var De = o({
|
|
300
|
+
id: f(),
|
|
301
|
+
name: f(),
|
|
302
|
+
status: u(v),
|
|
303
|
+
visibility: u(y),
|
|
304
|
+
organizationId: f(),
|
|
305
|
+
interface: z,
|
|
306
|
+
createdAt: m(),
|
|
307
|
+
updatedAt: m(),
|
|
308
|
+
capabilities: o({ fileUpload: B }),
|
|
309
|
+
channels: n(u(L)).default(() => [...R])
|
|
310
|
+
}), Oe = z.pick({
|
|
327
311
|
logo: !0,
|
|
328
312
|
mainColor: !0,
|
|
329
313
|
textColor: !0,
|
|
330
314
|
theme: !0,
|
|
331
315
|
floatingButtonPosition: !0,
|
|
332
316
|
customCss: !0
|
|
333
|
-
}),
|
|
317
|
+
}), ke = De.pick({
|
|
334
318
|
id: !0,
|
|
335
319
|
name: !0,
|
|
336
320
|
organizationId: !0
|
|
337
|
-
}).extend({ interface:
|
|
338
|
-
emailPassword:
|
|
339
|
-
google:
|
|
340
|
-
microsoft:
|
|
341
|
-
}),
|
|
321
|
+
}).extend({ interface: Oe }), Ae = o({
|
|
322
|
+
emailPassword: d(),
|
|
323
|
+
google: d(),
|
|
324
|
+
microsoft: d()
|
|
325
|
+
}), je = o({
|
|
342
326
|
requiresAuth: a(!1),
|
|
343
|
-
agent:
|
|
344
|
-
branding:
|
|
345
|
-
}),
|
|
327
|
+
agent: De,
|
|
328
|
+
branding: c()
|
|
329
|
+
}), W = o({
|
|
346
330
|
requiresAuth: a(!0),
|
|
347
|
-
agent:
|
|
348
|
-
branding:
|
|
331
|
+
agent: c(),
|
|
332
|
+
branding: ke
|
|
349
333
|
});
|
|
350
|
-
|
|
334
|
+
l("requiresAuth", [je, W]), l("requiresAuth", [je.extend({ authMethods: Ae }), W.extend({ authMethods: Ae })]), o({
|
|
351
335
|
id: e(),
|
|
352
336
|
agentIds: n(e())
|
|
353
337
|
}), o({
|
|
354
|
-
...
|
|
355
|
-
...
|
|
338
|
+
...h.pagination(),
|
|
339
|
+
...h.sort([
|
|
356
340
|
"id",
|
|
357
341
|
"updatedAt",
|
|
358
342
|
"createdAt",
|
|
@@ -362,56 +346,56 @@ c("requiresAuth", [V, H]), c("requiresAuth", [V.extend({ authMethods: B }), H.ex
|
|
|
362
346
|
"visibility",
|
|
363
347
|
"model"
|
|
364
348
|
]),
|
|
365
|
-
...
|
|
366
|
-
...
|
|
367
|
-
...
|
|
368
|
-
...
|
|
349
|
+
...h.filters(["done", "type"]),
|
|
350
|
+
...h.filter("id"),
|
|
351
|
+
...h.fullText(),
|
|
352
|
+
...h.ids()
|
|
369
353
|
});
|
|
370
354
|
//#endregion
|
|
371
355
|
//#region ../../packages/models/src/schema/ConversationAnalysis.ts
|
|
372
|
-
var
|
|
356
|
+
var Me = /* @__PURE__ */ function(e) {
|
|
373
357
|
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;
|
|
374
|
-
}({}),
|
|
358
|
+
}({}), Ne = /* @__PURE__ */ function(e) {
|
|
375
359
|
return e.Low = "low", e.Medium = "medium", e.High = "high", e;
|
|
376
|
-
}({}),
|
|
360
|
+
}({}), Pe = /* @__PURE__ */ function(e) {
|
|
377
361
|
return e.Hallucination = "hallucination", e.OffBrand = "off_brand", e.DataLeak = "data_leak", e.InappropriateTone = "inappropriate_tone", e.RefusalLoop = "refusal_loop", e.Repetition = "repetition", e;
|
|
378
|
-
}({}),
|
|
362
|
+
}({}), Fe = /* @__PURE__ */ function(e) {
|
|
379
363
|
return e.SummaryCycle = "summary_cycle", e.AgentRequest = "agent_request", e.Manual = "manual", e;
|
|
380
|
-
}({}),
|
|
364
|
+
}({}), Ie = /* @__PURE__ */ function(e) {
|
|
381
365
|
return e.High = "high", e.Medium = "medium", e.Low = "low", e.Disengaged = "disengaged", e;
|
|
382
|
-
}({}),
|
|
366
|
+
}({}), Le = /* @__PURE__ */ function(e) {
|
|
383
367
|
return e.Polite = "polite", e.Neutral = "neutral", e.Impatient = "impatient", e.Aggressive = "aggressive", e.Abusive = "abusive", e;
|
|
384
|
-
}({}),
|
|
368
|
+
}({}), Re = /* @__PURE__ */ function(e) {
|
|
385
369
|
return e.Positive = "positive", e.Neutral = "neutral", e.Negative = "negative", e.Frustrated = "frustrated", e.Excited = "excited", e;
|
|
386
|
-
}({}),
|
|
370
|
+
}({}), ze = /* @__PURE__ */ function(e) {
|
|
387
371
|
return e.Improving = "improving", e.Stable = "stable", e.Degrading = "degrading", e;
|
|
388
|
-
}({}),
|
|
389
|
-
analyzedAt:
|
|
390
|
-
analysisTrigger:
|
|
391
|
-
sentiment:
|
|
392
|
-
sentimentTrend:
|
|
393
|
-
userTone:
|
|
394
|
-
language:
|
|
395
|
-
topics: n(
|
|
396
|
-
userAbuseDetected:
|
|
397
|
-
userAbuseCategories: n(
|
|
398
|
-
userAbuseConfidence:
|
|
399
|
-
userAbuseSummary:
|
|
400
|
-
llmIssueDetected:
|
|
401
|
-
llmIssueCategories: n(
|
|
402
|
-
llmIssueSummary:
|
|
403
|
-
userEngagement:
|
|
404
|
-
conversationGoalMet:
|
|
372
|
+
}({}), Be = o({
|
|
373
|
+
analyzedAt: m().describe("When the analysis was generated."),
|
|
374
|
+
analysisTrigger: u(Fe).describe("What triggered this analysis run."),
|
|
375
|
+
sentiment: u(Re).describe("Overall user sentiment in the conversation."),
|
|
376
|
+
sentimentTrend: u(ze).describe("How the user sentiment evolved during the conversation."),
|
|
377
|
+
userTone: u(Le).describe("Predominant tone of the user messages."),
|
|
378
|
+
language: f().max(10).describe("ISO 639-1 language code of the conversation (e.g. \"en\", \"it\")."),
|
|
379
|
+
topics: n(f().max(100)).max(10).describe("Main topics discussed, as short lowercase labels."),
|
|
380
|
+
userAbuseDetected: d().describe("Whether user abuse was detected. If false, userAbuseCategories MUST be empty."),
|
|
381
|
+
userAbuseCategories: n(u(Me)).default([]).describe("Abuse categories detected. Non-empty only if userAbuseDetected is true."),
|
|
382
|
+
userAbuseConfidence: u(Ne).optional().describe("Confidence level of the abuse detection. Set only if userAbuseDetected is true."),
|
|
383
|
+
userAbuseSummary: f().max(500).optional().describe("Brief description of the abusive behavior detected. Always write in English. Set only if userAbuseDetected is true."),
|
|
384
|
+
llmIssueDetected: d().describe("Whether an LLM quality issue was detected. If false, llmIssueCategories MUST be empty."),
|
|
385
|
+
llmIssueCategories: n(u(Pe)).default([]).describe("LLM issue categories detected. Non-empty only if llmIssueDetected is true."),
|
|
386
|
+
llmIssueSummary: f().max(500).optional().describe("Brief description of the LLM quality issue detected. Always write in English. Set only if llmIssueDetected is true."),
|
|
387
|
+
userEngagement: u(Ie).describe("Level of user engagement in the conversation."),
|
|
388
|
+
conversationGoalMet: d().optional().describe("Whether the user seems to have achieved what they came for. Leave undefined if unclear."),
|
|
405
389
|
riskScore: s().int().min(0).max(100).describe("Overall risk score (0 = safe, 100 = critical). Combination of abuse severity, persistence and escalation.")
|
|
406
|
-
}),
|
|
407
|
-
dateTime:
|
|
408
|
-
timezone:
|
|
409
|
-
language:
|
|
410
|
-
languages: n(
|
|
411
|
-
url:
|
|
412
|
-
pathname:
|
|
413
|
-
pageTitle:
|
|
414
|
-
referrer:
|
|
390
|
+
}), Ve = o({
|
|
391
|
+
dateTime: f().optional(),
|
|
392
|
+
timezone: f().optional(),
|
|
393
|
+
language: f().optional(),
|
|
394
|
+
languages: n(f()).optional(),
|
|
395
|
+
url: f().optional(),
|
|
396
|
+
pathname: f().optional(),
|
|
397
|
+
pageTitle: f().optional(),
|
|
398
|
+
referrer: f().optional(),
|
|
415
399
|
screenWidth: s().optional(),
|
|
416
400
|
screenHeight: s().optional(),
|
|
417
401
|
viewportWidth: s().optional(),
|
|
@@ -420,111 +404,111 @@ var Ne = /* @__PURE__ */ function(e) {
|
|
|
420
404
|
maxTouchPoints: s().optional(),
|
|
421
405
|
hardwareConcurrency: s().optional(),
|
|
422
406
|
deviceMemory: s().optional(),
|
|
423
|
-
platform:
|
|
424
|
-
connectionType:
|
|
425
|
-
connectionEffectiveType:
|
|
407
|
+
platform: f().optional(),
|
|
408
|
+
connectionType: f().optional(),
|
|
409
|
+
connectionEffectiveType: f().optional(),
|
|
426
410
|
connectionDownlink: s().optional(),
|
|
427
411
|
connectionRtt: s().optional(),
|
|
428
|
-
saveData:
|
|
429
|
-
darkMode:
|
|
430
|
-
reducedMotion:
|
|
412
|
+
saveData: d().optional(),
|
|
413
|
+
darkMode: d().optional(),
|
|
414
|
+
reducedMotion: d().optional(),
|
|
431
415
|
historyLength: s().optional(),
|
|
432
416
|
geolocationLatitude: s().optional(),
|
|
433
417
|
geolocationLongitude: s().optional(),
|
|
434
418
|
geolocationAccuracy: s().optional(),
|
|
435
|
-
geolocationCity:
|
|
436
|
-
}),
|
|
419
|
+
geolocationCity: f().optional()
|
|
420
|
+
}), He = l("type", [o({
|
|
437
421
|
type: a("text"),
|
|
438
|
-
text:
|
|
422
|
+
text: f()
|
|
439
423
|
}), o({
|
|
440
424
|
type: a("file"),
|
|
441
|
-
mediaType:
|
|
442
|
-
url:
|
|
443
|
-
filename:
|
|
444
|
-
providerMetadata: t(
|
|
425
|
+
mediaType: f().regex(te),
|
|
426
|
+
url: p(),
|
|
427
|
+
filename: f().optional(),
|
|
428
|
+
providerMetadata: t(f(), t(f(), r())).optional()
|
|
445
429
|
})]);
|
|
446
430
|
o({
|
|
447
|
-
id:
|
|
431
|
+
id: f(),
|
|
448
432
|
messages: n(o({
|
|
449
|
-
id:
|
|
450
|
-
role:
|
|
451
|
-
content:
|
|
452
|
-
parts: n(
|
|
453
|
-
createdAt:
|
|
433
|
+
id: f().optional(),
|
|
434
|
+
role: u(["assistant", "user"]),
|
|
435
|
+
content: f(),
|
|
436
|
+
parts: n(He),
|
|
437
|
+
createdAt: f().optional()
|
|
454
438
|
})),
|
|
455
|
-
model:
|
|
439
|
+
model: f().optional(),
|
|
456
440
|
temperature: s().optional(),
|
|
457
|
-
prompt:
|
|
441
|
+
prompt: f().optional(),
|
|
458
442
|
maxOutputTokens: s().positive().optional(),
|
|
459
443
|
presencePenalty: s().min(-2).max(2).optional(),
|
|
460
444
|
frequencyPenalty: s().min(-2).max(2).optional(),
|
|
461
|
-
searchMode:
|
|
445
|
+
searchMode: u(x).optional(),
|
|
462
446
|
limit: s().optional(),
|
|
463
|
-
ranking:
|
|
464
|
-
reasoning:
|
|
465
|
-
webSearch:
|
|
447
|
+
ranking: N.optional(),
|
|
448
|
+
reasoning: S,
|
|
449
|
+
webSearch: O.optional(),
|
|
466
450
|
maxStepCount: s().int().min(1).max(40).optional(),
|
|
467
|
-
disabledTools: n(
|
|
468
|
-
fallbackModels: n(
|
|
469
|
-
gatewayOptions:
|
|
470
|
-
deviceContext:
|
|
471
|
-
externalContext: t(
|
|
472
|
-
smoothStream:
|
|
451
|
+
disabledTools: n(u(C)).optional(),
|
|
452
|
+
fallbackModels: n(f()).optional(),
|
|
453
|
+
gatewayOptions: V.partial().optional(),
|
|
454
|
+
deviceContext: Ve.optional(),
|
|
455
|
+
externalContext: t(f(), r()).optional(),
|
|
456
|
+
smoothStream: d().optional()
|
|
473
457
|
});
|
|
474
|
-
var
|
|
458
|
+
var Ue = /* @__PURE__ */ function(e) {
|
|
475
459
|
return e.SevereAbuse = "severe_abuse", e.HighRiskScore = "high_risk_score", e.RepeatedWarnings = "repeated_warnings", e;
|
|
476
|
-
}({}),
|
|
477
|
-
id:
|
|
460
|
+
}({}), We = o({
|
|
461
|
+
id: f(),
|
|
478
462
|
messages: n(r()),
|
|
479
|
-
title:
|
|
480
|
-
summary:
|
|
481
|
-
messageCountAtLastSummary:
|
|
482
|
-
createdAt:
|
|
483
|
-
updatedAt:
|
|
484
|
-
metadata: t(
|
|
485
|
-
totalCostInUSD:
|
|
463
|
+
title: f().nullable(),
|
|
464
|
+
summary: f().nullable(),
|
|
465
|
+
messageCountAtLastSummary: f().nullable(),
|
|
466
|
+
createdAt: m(),
|
|
467
|
+
updatedAt: m(),
|
|
468
|
+
metadata: t(f(), r()),
|
|
469
|
+
totalCostInUSD: f(),
|
|
486
470
|
usage: r(),
|
|
487
|
-
agentId:
|
|
488
|
-
userId:
|
|
489
|
-
organizationId:
|
|
490
|
-
deleted:
|
|
491
|
-
deletedAt:
|
|
492
|
-
deletedBy:
|
|
493
|
-
conversationAnalysis:
|
|
494
|
-
blocked:
|
|
495
|
-
blockedAt:
|
|
496
|
-
blockedReasonCode:
|
|
497
|
-
blockedReason:
|
|
471
|
+
agentId: f().nullable(),
|
|
472
|
+
userId: f(),
|
|
473
|
+
organizationId: f(),
|
|
474
|
+
deleted: d(),
|
|
475
|
+
deletedAt: m().nullable(),
|
|
476
|
+
deletedBy: f().nullable(),
|
|
477
|
+
conversationAnalysis: Be.nullable().optional(),
|
|
478
|
+
blocked: d(),
|
|
479
|
+
blockedAt: m().nullable(),
|
|
480
|
+
blockedReasonCode: u(Ue).nullable(),
|
|
481
|
+
blockedReason: f().nullable(),
|
|
498
482
|
warningCount: s(),
|
|
499
|
-
lastMessageAt:
|
|
483
|
+
lastMessageAt: m()
|
|
500
484
|
});
|
|
501
485
|
o({
|
|
502
|
-
...
|
|
503
|
-
...
|
|
486
|
+
...h.pagination(),
|
|
487
|
+
...h.sort([
|
|
504
488
|
"updatedAt",
|
|
505
489
|
"createdAt",
|
|
506
490
|
"lastMessageAt"
|
|
507
491
|
]),
|
|
508
|
-
...
|
|
509
|
-
...
|
|
510
|
-
...
|
|
511
|
-
...
|
|
512
|
-
startDate:
|
|
513
|
-
endDate:
|
|
492
|
+
...h.filters(["agentId", "userId"]),
|
|
493
|
+
...h.range("updatedAt"),
|
|
494
|
+
...h.range("lastMessageAt"),
|
|
495
|
+
...h.ids(),
|
|
496
|
+
startDate: f().optional(),
|
|
497
|
+
endDate: f().optional()
|
|
514
498
|
});
|
|
515
|
-
var
|
|
516
|
-
id:
|
|
517
|
-
agentId:
|
|
518
|
-
organizationId:
|
|
519
|
-
summary:
|
|
520
|
-
title:
|
|
521
|
-
userId:
|
|
522
|
-
createdAt:
|
|
523
|
-
updatedAt:
|
|
524
|
-
lastMessageAt:
|
|
499
|
+
var Ge = o({
|
|
500
|
+
id: f(),
|
|
501
|
+
agentId: f().optional(),
|
|
502
|
+
organizationId: f(),
|
|
503
|
+
summary: f().optional(),
|
|
504
|
+
title: f().optional(),
|
|
505
|
+
userId: f(),
|
|
506
|
+
createdAt: m(),
|
|
507
|
+
updatedAt: m(),
|
|
508
|
+
lastMessageAt: m(),
|
|
525
509
|
messages: n(r()),
|
|
526
|
-
blocked:
|
|
527
|
-
}),
|
|
510
|
+
blocked: d()
|
|
511
|
+
}), Ke = class {
|
|
528
512
|
constructor(e, t) {
|
|
529
513
|
this.operator = e, this.value = t, Object.defineProperty(this, "_notes", { writable: !0 });
|
|
530
514
|
}
|
|
@@ -534,18 +518,18 @@ var Ke = o({
|
|
|
534
518
|
addNote(e) {
|
|
535
519
|
this._notes = this._notes || [], this._notes.push(e);
|
|
536
520
|
}
|
|
537
|
-
},
|
|
521
|
+
}, qe = class extends Ke {}, G = class extends qe {
|
|
538
522
|
constructor(e, t) {
|
|
539
523
|
if (!Array.isArray(t)) throw Error(`"${e}" operator expects to receive an array of conditions`);
|
|
540
524
|
super(e, t);
|
|
541
525
|
}
|
|
542
|
-
},
|
|
526
|
+
}, Je = "__itself__", K = class extends Ke {
|
|
543
527
|
constructor(e, t, n) {
|
|
544
528
|
super(e, n), this.field = t;
|
|
545
529
|
}
|
|
546
|
-
},
|
|
530
|
+
}, Ye = new qe("__null__", null);
|
|
547
531
|
Object.hasOwn;
|
|
548
|
-
function
|
|
532
|
+
function Xe(e, t) {
|
|
549
533
|
let n;
|
|
550
534
|
for (let r = 0, i = t.length; r < i; r++) {
|
|
551
535
|
let i = t[r];
|
|
@@ -562,69 +546,69 @@ function Ye(e, t) {
|
|
|
562
546
|
}
|
|
563
547
|
return n || t;
|
|
564
548
|
}
|
|
565
|
-
function
|
|
549
|
+
function Ze(e, t) {
|
|
566
550
|
if (t.length === 1) return t[0];
|
|
567
551
|
if (t.length === 0) return new G(e, t);
|
|
568
|
-
let n =
|
|
552
|
+
let n = Xe(e, t);
|
|
569
553
|
return n.length === 1 ? n[0] : (n.length, new G(e, n));
|
|
570
554
|
}
|
|
571
555
|
Object.defineProperty(Object.create(null), "__@type@__", { value: "ignore value" });
|
|
572
556
|
//#endregion
|
|
573
557
|
//#region ../../node_modules/.pnpm/@ucast+mongo@3.0.0/node_modules/@ucast/mongo/dist/esm/index.mjs
|
|
574
|
-
var
|
|
558
|
+
var Qe = Object.defineProperty;
|
|
575
559
|
((e, t) => {
|
|
576
560
|
let n = {};
|
|
577
|
-
for (var r in e)
|
|
561
|
+
for (var r in e) Qe(n, r, {
|
|
578
562
|
get: e[r],
|
|
579
563
|
enumerable: !0
|
|
580
564
|
});
|
|
581
|
-
return t ||
|
|
565
|
+
return t || Qe(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
582
566
|
})({
|
|
583
|
-
$all: () =>
|
|
584
|
-
$and: () =>
|
|
585
|
-
$elemMatch: () =>
|
|
586
|
-
$eq: () =>
|
|
587
|
-
$exists: () =>
|
|
567
|
+
$all: () => st,
|
|
568
|
+
$and: () => $e,
|
|
569
|
+
$elemMatch: () => it,
|
|
570
|
+
$eq: () => pt,
|
|
571
|
+
$exists: () => lt,
|
|
588
572
|
$gt: () => J,
|
|
589
|
-
$gte: () =>
|
|
573
|
+
$gte: () => ut,
|
|
590
574
|
$in: () => q,
|
|
591
|
-
$lt: () =>
|
|
592
|
-
$lte: () =>
|
|
593
|
-
$mod: () =>
|
|
594
|
-
$ne: () =>
|
|
595
|
-
$nin: () =>
|
|
596
|
-
$nor: () =>
|
|
597
|
-
$not: () =>
|
|
598
|
-
$options: () =>
|
|
599
|
-
$or: () =>
|
|
600
|
-
$regex: () =>
|
|
601
|
-
$size: () =>
|
|
602
|
-
$where: () =>
|
|
575
|
+
$lt: () => dt,
|
|
576
|
+
$lte: () => ft,
|
|
577
|
+
$mod: () => ct,
|
|
578
|
+
$ne: () => mt,
|
|
579
|
+
$nin: () => ot,
|
|
580
|
+
$nor: () => tt,
|
|
581
|
+
$not: () => rt,
|
|
582
|
+
$options: () => gt,
|
|
583
|
+
$or: () => et,
|
|
584
|
+
$regex: () => ht,
|
|
585
|
+
$size: () => at,
|
|
586
|
+
$where: () => _t
|
|
603
587
|
});
|
|
604
|
-
var
|
|
588
|
+
var $e = {
|
|
605
589
|
type: "compound",
|
|
606
|
-
validate:
|
|
590
|
+
validate: yt,
|
|
607
591
|
parse(e, t, n) {
|
|
608
|
-
let r =
|
|
609
|
-
return
|
|
592
|
+
let r = nt(e, t, n);
|
|
593
|
+
return Ze(e.name, r);
|
|
610
594
|
}
|
|
611
|
-
},
|
|
595
|
+
}, et = $e, tt = {
|
|
612
596
|
type: "compound",
|
|
613
|
-
validate:
|
|
597
|
+
validate: yt,
|
|
614
598
|
parse(e, t, n) {
|
|
615
|
-
let r =
|
|
599
|
+
let r = nt(e, t, n);
|
|
616
600
|
return new G(e.name, r);
|
|
617
601
|
}
|
|
618
602
|
};
|
|
619
|
-
function
|
|
603
|
+
function nt(e, t, n) {
|
|
620
604
|
let r = Array(t.length);
|
|
621
605
|
for (let i = 0; i < t.length; i++) {
|
|
622
606
|
let a = t[i];
|
|
623
|
-
|
|
607
|
+
xt(e, a, i), r[i] = n.parse(a);
|
|
624
608
|
}
|
|
625
609
|
return r;
|
|
626
610
|
}
|
|
627
|
-
var
|
|
611
|
+
var rt = {
|
|
628
612
|
type: "field",
|
|
629
613
|
validate(e, t) {
|
|
630
614
|
if (!(t && (t instanceof RegExp || t.constructor === Object))) throw Error(`"${e.name}" expects to receive either regular expression or object of field operators`);
|
|
@@ -633,33 +617,33 @@ var nt = {
|
|
|
633
617
|
let r = t instanceof RegExp ? new K("regex", n.field, t) : n.parse(t, n);
|
|
634
618
|
return new G(e.name, [r]);
|
|
635
619
|
}
|
|
636
|
-
},
|
|
620
|
+
}, it = {
|
|
637
621
|
type: "field",
|
|
638
622
|
validate(e, t) {
|
|
639
623
|
if (!t || t.constructor !== Object) throw Error(`"${e.name}" expects to receive an object with nested query or field level operators`);
|
|
640
624
|
},
|
|
641
625
|
parse(e, t, { parse: n, field: r, hasOperators: i }) {
|
|
642
|
-
let a = i(t) ? n(t, { field:
|
|
626
|
+
let a = i(t) ? n(t, { field: Je }) : n(t);
|
|
643
627
|
return new K(e.name, r, a);
|
|
644
628
|
}
|
|
645
|
-
},
|
|
629
|
+
}, at = {
|
|
646
630
|
type: "field",
|
|
647
631
|
validate: Y("number")
|
|
648
632
|
}, q = {
|
|
649
633
|
type: "field",
|
|
650
|
-
validate:
|
|
651
|
-
},
|
|
634
|
+
validate: vt
|
|
635
|
+
}, ot = q, st = q, ct = {
|
|
652
636
|
type: "field",
|
|
653
637
|
validate(e, t) {
|
|
654
638
|
if (!Array.isArray(t) || t.length !== 2) throw Error(`"${e.name}" expects an array with 2 numeric elements`);
|
|
655
639
|
}
|
|
656
|
-
},
|
|
640
|
+
}, lt = {
|
|
657
641
|
type: "field",
|
|
658
642
|
validate: Y("boolean")
|
|
659
|
-
},
|
|
643
|
+
}, ut = {
|
|
660
644
|
type: "field",
|
|
661
|
-
validate:
|
|
662
|
-
}, J =
|
|
645
|
+
validate: bt
|
|
646
|
+
}, J = ut, dt = J, ft = J, pt = { type: "field" }, mt = pt, ht = {
|
|
663
647
|
type: "field",
|
|
664
648
|
validate(e, t) {
|
|
665
649
|
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`);
|
|
@@ -668,20 +652,20 @@ var nt = {
|
|
|
668
652
|
let r = typeof t == "string" ? new RegExp(t, n.query.$options || "") : t;
|
|
669
653
|
return new K(e.name, n.field, r);
|
|
670
654
|
}
|
|
671
|
-
}, ht = {
|
|
672
|
-
type: "field",
|
|
673
|
-
parse: () => Je
|
|
674
655
|
}, gt = {
|
|
656
|
+
type: "field",
|
|
657
|
+
parse: () => Ye
|
|
658
|
+
}, _t = {
|
|
675
659
|
type: "document",
|
|
676
660
|
validate: Y("function")
|
|
677
661
|
};
|
|
678
|
-
function _t(e, t) {
|
|
679
|
-
if (!Array.isArray(t)) throw Error(`"${e.name}" expects value to be an array`);
|
|
680
|
-
}
|
|
681
662
|
function vt(e, t) {
|
|
682
|
-
if (
|
|
663
|
+
if (!Array.isArray(t)) throw Error(`"${e.name}" expects value to be an array`);
|
|
683
664
|
}
|
|
684
665
|
function yt(e, t) {
|
|
666
|
+
if (vt(e, t), !t.length) throw Error(`"${e.name}" expects to have at least one element in array`);
|
|
667
|
+
}
|
|
668
|
+
function bt(e, t) {
|
|
685
669
|
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)`);
|
|
686
670
|
}
|
|
687
671
|
function Y(e) {
|
|
@@ -689,7 +673,7 @@ function Y(e) {
|
|
|
689
673
|
if (typeof n !== e) throw Error(`"${t.name}" expects value to be a "${e}"`);
|
|
690
674
|
};
|
|
691
675
|
}
|
|
692
|
-
function
|
|
676
|
+
function xt(e, t, n) {
|
|
693
677
|
let r = t;
|
|
694
678
|
if (!r || r.constructor !== Object) throw Error(`"${e.name}" expects item at index ${n} to be an object`);
|
|
695
679
|
}
|
|
@@ -699,7 +683,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
699
683
|
return e.Backoffice = "backoffice", e.Frontoffice = "frontoffice", e.System = "system", e.Public = "public", e;
|
|
700
684
|
}({}), Z = /* @__PURE__ */ function(e) {
|
|
701
685
|
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;
|
|
702
|
-
}({}),
|
|
686
|
+
}({}), St = (e) => e ? [
|
|
703
687
|
{
|
|
704
688
|
subject: Z.Chat,
|
|
705
689
|
action: "create"
|
|
@@ -720,7 +704,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
720
704
|
{
|
|
721
705
|
subject: Z.Agent,
|
|
722
706
|
action: "read",
|
|
723
|
-
condition: { status: { $eq:
|
|
707
|
+
condition: { status: { $eq: v.Active } }
|
|
724
708
|
},
|
|
725
709
|
{
|
|
726
710
|
subject: Z.MessageFeedback,
|
|
@@ -731,23 +715,23 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
731
715
|
action: "read",
|
|
732
716
|
condition: { createdBy: { $eq: e.user?.id } }
|
|
733
717
|
}
|
|
734
|
-
] : [],
|
|
718
|
+
] : [], Ct = ce({ modify: [
|
|
735
719
|
"read",
|
|
736
720
|
"update",
|
|
737
721
|
"delete"
|
|
738
|
-
] }),
|
|
739
|
-
new
|
|
740
|
-
conditionsMatcher:
|
|
741
|
-
resolveAction:
|
|
722
|
+
] }), wt = se({ $or: et });
|
|
723
|
+
new oe(St(), {
|
|
724
|
+
conditionsMatcher: wt,
|
|
725
|
+
resolveAction: Ct,
|
|
742
726
|
fieldMatcher: (e) => (t) => e.includes(t)
|
|
743
727
|
});
|
|
744
|
-
var Q =
|
|
745
|
-
Q.newRole(
|
|
728
|
+
var Q = le(de);
|
|
729
|
+
Q.newRole(ue.statements), Q.newRole(fe.statements), Q.newRole(_.statements), Q.newRole(_.statements);
|
|
746
730
|
//#endregion
|
|
747
731
|
//#region ../../packages/composable/src/chatbot/api/resolveShortUrls.ts
|
|
748
|
-
async function
|
|
732
|
+
async function Tt(e, t, n = {}) {
|
|
749
733
|
try {
|
|
750
|
-
let r =
|
|
734
|
+
let r = g(e), i = await fetch(`${r}/api/r/resolve`, {
|
|
751
735
|
method: "POST",
|
|
752
736
|
credentials: n.credentials ?? "include",
|
|
753
737
|
headers: {
|
|
@@ -763,13 +747,13 @@ async function wt(e, t, n = {}) {
|
|
|
763
747
|
}
|
|
764
748
|
//#endregion
|
|
765
749
|
//#region ../../packages/composable/src/chatbot/api/createChatbotApiClient.ts
|
|
766
|
-
var
|
|
750
|
+
var Et = We.or(Ge);
|
|
767
751
|
function $(e) {
|
|
768
|
-
let t =
|
|
752
|
+
let t = Et.safeParse(e);
|
|
769
753
|
return t.success ? t.data : e;
|
|
770
754
|
}
|
|
771
|
-
function
|
|
772
|
-
let t = e.basePath ?
|
|
755
|
+
function Dt(e) {
|
|
756
|
+
let t = e.basePath ? ae(e.basePath) : `/api/v1/${X.Public}`, n = `${g(e.baseUrl)}${t}`, r = `${g(e.baseUrl)}${t.replace(/\/[^/]+$/, `/${X.Frontoffice}`)}`;
|
|
773
757
|
async function i(t, r, i = "json") {
|
|
774
758
|
let a = await fetch(`${n}${t}`, {
|
|
775
759
|
credentials: e.credentials ?? "include",
|
|
@@ -916,7 +900,7 @@ function Et(e) {
|
|
|
916
900
|
return i(`/agents/${encodeURIComponent(e)}/mcp-oauth/authorize?${n}`);
|
|
917
901
|
},
|
|
918
902
|
resolveShortUrls(t) {
|
|
919
|
-
return
|
|
903
|
+
return Tt(e.baseUrl, t, {
|
|
920
904
|
headers: e.headers?.(),
|
|
921
905
|
credentials: e.credentials
|
|
922
906
|
});
|
|
@@ -924,6 +908,6 @@ function Et(e) {
|
|
|
924
908
|
};
|
|
925
909
|
}
|
|
926
910
|
//#endregion
|
|
927
|
-
export {
|
|
911
|
+
export { B as a, F as c, Se as d, be as f, L as i, D as l, X as n, I as o, C as r, b as s, Dt as t, ye as u };
|
|
928
912
|
|
|
929
|
-
//# sourceMappingURL=createChatbotApiClient-
|
|
913
|
+
//# sourceMappingURL=createChatbotApiClient-IH6wBh4s.js.map
|