@8wave/ai-elements 0.101.0-beta.3 → 0.101.0-beta.5

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 (86) hide show
  1. package/dist/_chunks/Agent-DMCeO6o-.js +446 -0
  2. package/dist/_chunks/Agent-DMCeO6o-.js.map +1 -0
  3. package/dist/_chunks/{Document-DS83LkQj.js → Document-C1Fp99qu.js} +2 -2
  4. package/dist/_chunks/{Document-DS83LkQj.js.map → Document-C1Fp99qu.js.map} +1 -1
  5. package/dist/_chunks/{Media-CvHHwE7y.js → Media-c-RubI3_.js} +5 -3
  6. package/dist/_chunks/Media-c-RubI3_.js.map +1 -0
  7. package/dist/_chunks/{PkToolRequestGeolocation-OGFqRvLA.js → PkToolRequestGeolocation-OZYwTIls.js} +2 -2
  8. package/dist/_chunks/{PkToolRequestGeolocation-OGFqRvLA.js.map → PkToolRequestGeolocation-OZYwTIls.js.map} +1 -1
  9. package/dist/_chunks/{PkToolRequestOAuthConnection-CkSA6iKU.js → PkToolRequestOAuthConnection-HmWtu2b3.js} +2 -2
  10. package/{dist-vue/_chunks/PkToolRequestOAuthConnection-eW8DmH4-.js.map → dist/_chunks/PkToolRequestOAuthConnection-HmWtu2b3.js.map} +1 -1
  11. package/dist/_chunks/{PkToolShowForm-D0q4LtUx.js → PkToolShowForm-BzopoW7z.js} +2 -2
  12. package/dist/_chunks/{PkToolShowForm-D0q4LtUx.js.map → PkToolShowForm-BzopoW7z.js.map} +1 -1
  13. package/dist/_chunks/{PkToolShowSources-wsRRKYe3.js → PkToolShowSources-Blw5XOA7.js} +2 -2
  14. package/dist/_chunks/{PkToolShowSources-wsRRKYe3.js.map → PkToolShowSources-Blw5XOA7.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowSuggestedReply-Dlm9CXCz.js → PkToolShowSuggestedReply-nsXsvLUW.js} +2 -2
  16. package/dist/_chunks/{PkToolShowSuggestedReply-Dlm9CXCz.js.map → PkToolShowSuggestedReply-nsXsvLUW.js.map} +1 -1
  17. package/dist/ai-elements.es.js +28 -15
  18. package/dist/ai-elements.es.js.map +1 -1
  19. package/dist-vue/PkChatbot.js +1 -1
  20. package/dist-vue/PkChatbotMessages.js +1 -1
  21. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  22. package/dist-vue/PkChatbotSteps.js +1 -1
  23. package/dist-vue/PkChatbotViewChat.js +1 -1
  24. package/dist-vue/PkChatbotViewConversations.js +1 -1
  25. package/dist-vue/PkChatbotViewFiles.js +1 -1
  26. package/dist-vue/PkChatbotViewProfile.js +1 -1
  27. package/dist-vue/_chunks/Agent-WEwgRwnY.js +539 -0
  28. package/dist-vue/_chunks/Agent-WEwgRwnY.js.map +1 -0
  29. package/dist-vue/_chunks/{Document-DjpLDjCX.js → Document-Vx3oKWp3.js} +10 -10
  30. package/dist-vue/_chunks/{Document-DjpLDjCX.js.map → Document-Vx3oKWp3.js.map} +1 -1
  31. package/dist-vue/_chunks/{PkChatbot-CcvW0Nkc.js → PkChatbot-1Y7fGR-C.js} +7 -7
  32. package/dist-vue/_chunks/{PkChatbot-CcvW0Nkc.js.map → PkChatbot-1Y7fGR-C.js.map} +1 -1
  33. package/dist-vue/_chunks/{PkChatbotMessages-DXfytcYV.js → PkChatbotMessages-C6X92Igt.js} +10 -10
  34. package/dist-vue/_chunks/{PkChatbotMessages-DXfytcYV.js.map → PkChatbotMessages-C6X92Igt.js.map} +1 -1
  35. package/dist-vue/_chunks/{PkChatbotStepToolDetail-CtGrjHO0.js → PkChatbotStepToolDetail-BBX4KL3d.js} +2 -2
  36. package/dist-vue/_chunks/{PkChatbotStepToolDetail-CtGrjHO0.js.map → PkChatbotStepToolDetail-BBX4KL3d.js.map} +1 -1
  37. package/dist-vue/_chunks/{PkChatbotSteps-Bbuh0hgL.js → PkChatbotSteps-DlZpwc_a.js} +3 -3
  38. package/dist-vue/_chunks/{PkChatbotSteps-Bbuh0hgL.js.map → PkChatbotSteps-DlZpwc_a.js.map} +1 -1
  39. package/dist-vue/_chunks/{PkChatbotViewChat-CAxNWTBJ.js → PkChatbotViewChat-CBvcSg0J.js} +5 -5
  40. package/dist-vue/_chunks/{PkChatbotViewChat-CAxNWTBJ.js.map → PkChatbotViewChat-CBvcSg0J.js.map} +1 -1
  41. package/dist-vue/_chunks/{PkChatbotViewConversations-BhLswQyH.js → PkChatbotViewConversations-BT5ojZEm.js} +2 -2
  42. package/dist-vue/_chunks/{PkChatbotViewConversations-BhLswQyH.js.map → PkChatbotViewConversations-BT5ojZEm.js.map} +1 -1
  43. package/dist-vue/_chunks/{PkChatbotViewFiles-DyWppF9_.js → PkChatbotViewFiles-DHzFAQZP.js} +3 -3
  44. package/dist-vue/_chunks/{PkChatbotViewFiles-DyWppF9_.js.map → PkChatbotViewFiles-DHzFAQZP.js.map} +1 -1
  45. package/dist-vue/_chunks/{PkChatbotViewProfile-DXPa3C1j.js → PkChatbotViewProfile-DgN0Pydw.js} +2 -2
  46. package/dist-vue/_chunks/{PkChatbotViewProfile-DXPa3C1j.js.map → PkChatbotViewProfile-DgN0Pydw.js.map} +1 -1
  47. package/dist-vue/_chunks/{PkToolRequestGeolocation-C6bqSBj-.js → PkToolRequestGeolocation-B1K2fN7U.js} +2 -2
  48. package/dist-vue/_chunks/{PkToolRequestGeolocation-C6bqSBj-.js.map → PkToolRequestGeolocation-B1K2fN7U.js.map} +1 -1
  49. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-eW8DmH4-.js → PkToolRequestOAuthConnection-D-qoxuPc.js} +2 -2
  50. package/{dist/_chunks/PkToolRequestOAuthConnection-CkSA6iKU.js.map → dist-vue/_chunks/PkToolRequestOAuthConnection-D-qoxuPc.js.map} +1 -1
  51. package/dist-vue/_chunks/{PkToolShowDiagram-8m2w-oeq.js → PkToolShowDiagram-BvOy4aeQ.js} +2 -2
  52. package/dist-vue/_chunks/{PkToolShowDiagram-8m2w-oeq.js.map → PkToolShowDiagram-BvOy4aeQ.js.map} +1 -1
  53. package/dist-vue/_chunks/{PkToolShowForm-BHbyMNqv.js → PkToolShowForm-BzzeoKss.js} +2 -2
  54. package/dist-vue/_chunks/{PkToolShowForm-BHbyMNqv.js.map → PkToolShowForm-BzzeoKss.js.map} +1 -1
  55. package/dist-vue/_chunks/{PkToolShowSources-CqeuJ0tV.js → PkToolShowSources-DdfHFaPA.js} +2 -2
  56. package/dist-vue/_chunks/{PkToolShowSources-CqeuJ0tV.js.map → PkToolShowSources-DdfHFaPA.js.map} +1 -1
  57. package/dist-vue/_chunks/{PkToolShowSuggestedReply-gttr-BH6.js → PkToolShowSuggestedReply-DSd1dnZM.js} +2 -2
  58. package/dist-vue/_chunks/{PkToolShowSuggestedReply-gttr-BH6.js.map → PkToolShowSuggestedReply-DSd1dnZM.js.map} +1 -1
  59. package/dist-vue/_chunks/{createChatbotApiClient-L1dBY3cD.js → createChatbotApiClient-xbpuy6e1.js} +12 -12
  60. package/dist-vue/_chunks/createChatbotApiClient-xbpuy6e1.js.map +1 -0
  61. package/dist-vue/_chunks/{useChatbotStore-CNWLZ-OT.js → useChatbotStore-DWLLr7sg.js} +2 -2
  62. package/dist-vue/_chunks/{useChatbotStore-CNWLZ-OT.js.map → useChatbotStore-DWLLr7sg.js.map} +1 -1
  63. package/dist-vue/_chunks/{utils-Bf73GiBm.js → utils-CgxndZld.js} +2 -2
  64. package/dist-vue/_chunks/{utils-Bf73GiBm.js.map → utils-CgxndZld.js.map} +1 -1
  65. package/dist-vue/api.js +1 -1
  66. package/dist-vue/composables.js +3 -3
  67. package/dist-vue/index.js +3576 -3667
  68. package/dist-vue/index.js.map +1 -1
  69. package/dist-vue/locales.js +2 -0
  70. package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +32 -2
  71. package/dist-vue/packages/components/src/chat/PkReasoningSettings.d.ts +32 -2
  72. package/dist-vue/packages/components/src/chat/constants.d.ts +8 -2
  73. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +96 -6
  74. package/dist-vue/packages/models/src/schema/Agent.d.ts +314 -4
  75. package/dist-vue/packages/models/src/schema/Chat.d.ts +51 -0
  76. package/dist-vue/packages/models/src/schema/ConversationAnalysis.d.ts +1 -0
  77. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +102 -0
  78. package/dist-vue/packages/models/src/schema/SubAgent.d.ts +102 -0
  79. package/dist-vue/packages/models/src/schema/constants.d.ts +30 -14
  80. package/package.json +1 -1
  81. package/dist/_chunks/Agent-DBVPAS7y.js +0 -404
  82. package/dist/_chunks/Agent-DBVPAS7y.js.map +0 -1
  83. package/dist/_chunks/Media-CvHHwE7y.js.map +0 -1
  84. package/dist-vue/_chunks/Agent-KKRQyO8u.js +0 -486
  85. package/dist-vue/_chunks/Agent-KKRQyO8u.js.map +0 -1
  86. package/dist-vue/_chunks/createChatbotApiClient-L1dBY3cD.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import { t as e } from "./_chunks/PkChatbot-CcvW0Nkc.js";
1
+ import { t as e } from "./_chunks/PkChatbot-1Y7fGR-C.js";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "./_chunks/PkChatbotMessages-DXfytcYV.js";
1
+ import { t as e } from "./_chunks/PkChatbotMessages-C6X92Igt.js";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "./_chunks/PkChatbotStepToolDetail-CtGrjHO0.js";
1
+ import { t as e } from "./_chunks/PkChatbotStepToolDetail-BBX4KL3d.js";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "./_chunks/PkChatbotSteps-Bbuh0hgL.js";
1
+ import { t as e } from "./_chunks/PkChatbotSteps-DlZpwc_a.js";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "./_chunks/PkChatbotViewChat-CAxNWTBJ.js";
1
+ import { t as e } from "./_chunks/PkChatbotViewChat-CBvcSg0J.js";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "./_chunks/PkChatbotViewConversations-BhLswQyH.js";
1
+ import { t as e } from "./_chunks/PkChatbotViewConversations-BT5ojZEm.js";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "./_chunks/PkChatbotViewFiles-DyWppF9_.js";
1
+ import { t as e } from "./_chunks/PkChatbotViewFiles-DHzFAQZP.js";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "./_chunks/PkChatbotViewProfile-DXPa3C1j.js";
1
+ import { t as e } from "./_chunks/PkChatbotViewProfile-DgN0Pydw.js";
2
2
  export { e as default };
@@ -0,0 +1,539 @@
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, s as ee, v as f, x as p, y as te } from "./schemas-COkEQ0wM.js";
2
+ import { i as m, n as ne, t as re } from "./Media-yi949VrV.js";
3
+ //#region ../../packages/models/src/utils.ts
4
+ var h = (e, t, n) => ee(e, t, {
5
+ encode: (e) => e,
6
+ decode: n
7
+ }), ie = 51200, ae = t(f(), r()).refine((e) => JSON.stringify(e).length <= ie, { message: `Schema must not exceed ${ie / 1024} KB` }), oe = (e) => [`${e}`, `-${e}`], se = (e) => e.flatMap((e) => oe(e)), g = {
8
+ pagination: (e = 1, t = 10) => ({
9
+ "page[number]": s().or(f()).transform((e) => Number(e)).default(e),
10
+ "page[size]": s().or(f()).transform((e) => Number(e)).default(t)
11
+ }),
12
+ filter: (e) => ({ [`filter[${e}]`]: f().optional() }),
13
+ include: (e) => ({ [`include[${e}]`]: f().optional() }),
14
+ range: (e) => ({
15
+ [`from[${e}]`]: f().optional(),
16
+ [`to[${e}]`]: f().optional()
17
+ }),
18
+ has: (e) => ({ [`has[${e}]`]: d().optional() }),
19
+ fullText: () => ({ "filter[fullText]": f().optional() }),
20
+ ids: () => ({ ids: te([f(), n(f())]).optional() }),
21
+ deleted: () => ({ "filter[isDeleted]": d().default(!1) }),
22
+ filters: (e) => e.map((e) => g.filter(e)).reduce((e, t) => ({
23
+ ...e,
24
+ ...t
25
+ })),
26
+ sort: (e) => {
27
+ let t = se(e);
28
+ return { sort: u(t).optional().default(t[0]) };
29
+ }
30
+ }, _ = /* @__PURE__ */ function(e) {
31
+ return e.gpt5Nano = "openai/gpt-5-nano", e.gpt5Mini = "openai/gpt-5-mini", e.gpt51Thinking = "openai/gpt-5.1-thinking", e.gpt52 = "openai/gpt-5.2", e.gpt54nano = "openai/gpt-5.4-nano", e.gpt54mini = "openai/gpt-5.4-mini", e.gpt54 = "openai/gpt-5.4", e.gpt54Pro = "openai/gpt-5.4-pro", e.gpt55 = "openai/gpt-5.5", e.gpt55Pro = "openai/gpt-5.5-pro", e.gpt56Luna = "openai/gpt-5.6-luna", e.gpt56Terra = "openai/gpt-5.6-terra", e.gpt56Sol = "openai/gpt-5.6-sol", e.gemini25FlashLite = "google/gemini-2.5-flash-lite", e.gemini25Flash = "google/gemini-2.5-flash", e.gemini25Pro = "google/gemini-2.5-pro", e.gemini3Flash = "google/gemini-3-flash", e.gemini31ProPreview = "google/gemini-3.1-pro-preview", e.gemini31FlashLite = "google/gemini-3.1-flash-lite", e.gemini35Flash = "google/gemini-3.5-flash", e.gemini35FlashLite = "google/gemini-3.5-flash-lite", e.gemini36Flash = "google/gemini-3.6-flash", e.gemini37Flash = "google/gemini-3.7-flash", e.claudeHaiku45 = "anthropic/claude-haiku-4.5", e.claudeSonnet46 = "anthropic/claude-sonnet-4.6", e.claudeSonnet5 = "anthropic/claude-sonnet-5", e.claudeOpus46 = "anthropic/claude-opus-4.6", e.claudeOpus47 = "anthropic/claude-opus-4.7", e.claudeOpus48 = "anthropic/claude-opus-4.8", e.claudeOpus5 = "anthropic/claude-opus-5", e.claudeOpus5Fast = "anthropic/claude-opus-5-fast", e.claudeFable5 = "anthropic/claude-fable-5", e.deepseek32 = "deepseek/deepseek-v3.2", e.deepseek4Flash0731 = "deepseek/deepseek-v4-flash-0731", e.alibabaQwen36Plus = "alibaba/qwen3.6-plus", e.alibabaQwen37Max = "alibaba/qwen3.7-max", e.alibabaQwen37Plus = "alibaba/qwen3.7-plus", e.alibabaQwen37Flash = "alibaba/qwen3.7-flash", e.alibabaQwen38Max = "alibaba/qwen3.8-max", e.alibabaQwen3827b = "alibaba/qwen3.8-27b", e.xaiGrok43 = "xai/grok-4.3", e.xaiGrok46 = "xai/grok-4.6", e.zaiGlm52 = "zai/glm-5.2", e.zaiGlm52Fast = "zai/glm-5.2-fast", e.zaiGlm53 = "zai/glm-5.3", e.metaMuseSpark11 = "meta/muse-spark-1.1", e.metaMuseSpark12 = "meta/muse-spark-1.2", e.moonshotaiKimiK3 = "moonshotai/kimi-k3", e.moonshotaiKimiK3Fast = "moonshotai/kimi-k3-fast", e;
32
+ }({});
33
+ (/* @__PURE__ */ (function(e) {
34
+ return e.textEmbedding3Small = "openai/text-embedding-3-small", e.geminiEmbedding2 = "google/gemini-embedding-2", e;
35
+ })({})).geminiEmbedding2;
36
+ var v = /* @__PURE__ */ function(e) {
37
+ return e.it = "it", e.en = "en", e.es = "es", e.fr = "fr", e.de = "de", e;
38
+ }({});
39
+ v.it, v.en, v.es, v.fr, v.de;
40
+ var ce = /* @__PURE__ */ function(e) {
41
+ return e.READABILITY = "readability", e.AI = "ai", e;
42
+ }({}), le = /* @__PURE__ */ function(e) {
43
+ return e.FETCH = "fetch", e.PUPPETEER = "puppeteer", e.REMOTE = "remote", e;
44
+ }({}), y = o({
45
+ dateTime: f().optional(),
46
+ timezone: f().optional(),
47
+ language: f().optional(),
48
+ languages: n(f()).optional(),
49
+ url: f().optional(),
50
+ pathname: f().optional(),
51
+ pageTitle: f().optional(),
52
+ referrer: f().optional(),
53
+ screenWidth: s().optional(),
54
+ screenHeight: s().optional(),
55
+ viewportWidth: s().optional(),
56
+ viewportHeight: s().optional(),
57
+ devicePixelRatio: s().optional(),
58
+ maxTouchPoints: s().optional(),
59
+ hardwareConcurrency: s().optional(),
60
+ deviceMemory: s().optional(),
61
+ platform: f().optional(),
62
+ connectionType: f().optional(),
63
+ connectionEffectiveType: f().optional(),
64
+ connectionDownlink: s().optional(),
65
+ connectionRtt: s().optional(),
66
+ saveData: d().optional(),
67
+ darkMode: d().optional(),
68
+ reducedMotion: d().optional(),
69
+ historyLength: s().optional(),
70
+ geolocationLatitude: s().optional(),
71
+ geolocationLongitude: s().optional(),
72
+ geolocationAccuracy: s().optional(),
73
+ geolocationCity: f().optional()
74
+ }), b = /* @__PURE__ */ function(e) {
75
+ return e.Draft = "draft", e.Active = "active", e.Inactive = "inactive", e;
76
+ }({}), x = /* @__PURE__ */ function(e) {
77
+ return e.Public = "public", e.Private = "private", e.Organization = "organization", e;
78
+ }({}), S = /* @__PURE__ */ function(e) {
79
+ return e.Chat = "chat", e.Reasoning = "reasoning", e;
80
+ }({}), C = /* @__PURE__ */ function(e) {
81
+ return e.Semantic = "semantic", e.Balanced = "balanced", e.Keyword = "keyword", e;
82
+ }({}), w = [
83
+ "none",
84
+ "low",
85
+ "medium",
86
+ "high",
87
+ "xhigh",
88
+ "max"
89
+ ], T = [
90
+ "low",
91
+ "medium",
92
+ "high",
93
+ "xhigh",
94
+ "max"
95
+ ], E = [
96
+ "minimal",
97
+ "low",
98
+ "medium",
99
+ "high"
100
+ ], D = [
101
+ "auto",
102
+ "detailed",
103
+ "concise"
104
+ ], ue = o({
105
+ reasoningEffort: u(w).optional(),
106
+ reasoningSummary: u(D).optional()
107
+ }), de = o({
108
+ type: u([
109
+ "adaptive",
110
+ "enabled",
111
+ "disabled"
112
+ ]).optional(),
113
+ effort: u(T).optional(),
114
+ display: u(["summarized", "omitted"]).optional(),
115
+ budgetTokens: s().int().positive().optional()
116
+ }), fe = o({
117
+ thinkingLevel: u(E).optional(),
118
+ thinkingBudget: s().int().optional(),
119
+ includeThoughts: d().optional()
120
+ }), pe = o({ type: u(["enabled", "disabled"]).optional() }), O = [
121
+ "alibaba",
122
+ "meta",
123
+ "moonshotai",
124
+ "xai",
125
+ "zai"
126
+ ];
127
+ function me(e) {
128
+ return O.includes(e);
129
+ }
130
+ var k = [
131
+ "none",
132
+ "minimal",
133
+ "low",
134
+ "medium",
135
+ "high",
136
+ "xhigh"
137
+ ], A = o({ reasoningEffort: u(k).optional() });
138
+ function j(e, t) {
139
+ return e && t.includes(e) ? e : void 0;
140
+ }
141
+ var he = o({
142
+ openai: ue.optional(),
143
+ anthropic: de.optional(),
144
+ google: fe.optional(),
145
+ deepseek: pe.optional(),
146
+ alibaba: A.optional(),
147
+ meta: A.optional(),
148
+ moonshotai: A.optional(),
149
+ xai: A.optional(),
150
+ zai: A.optional()
151
+ });
152
+ function ge(e) {
153
+ if (!e || typeof e != "object") return e;
154
+ let t = e, n = [
155
+ "openai",
156
+ "anthropic",
157
+ "google",
158
+ "deepseek",
159
+ ...O
160
+ ].some((e) => e in t);
161
+ if ("effort" in t && !n) {
162
+ let e = t.effort, n = t.reasoningSummary, r = {};
163
+ if (e && e !== "off" && e !== "none") {
164
+ let t = j(e, w), i = j(n, D);
165
+ (t || i) && (r.openai = {
166
+ ...t && { reasoningEffort: t },
167
+ ...i && { reasoningSummary: i }
168
+ });
169
+ let a = j(e, T);
170
+ a && (r.anthropic = {
171
+ type: "adaptive",
172
+ effort: a
173
+ });
174
+ let o = j(e === "xhigh" || e === "max" ? "high" : e, E);
175
+ o && (r.google = { thinkingLevel: o }), r.deepseek = { type: "enabled" };
176
+ let s = j(e === "max" ? "xhigh" : e, k);
177
+ if (s) for (let e of O) r[e] = { reasoningEffort: s };
178
+ } else {
179
+ r.openai = { reasoningEffort: "none" }, r.anthropic = { type: "disabled" }, r.google = { thinkingLevel: "minimal" }, r.deepseek = { type: "disabled" };
180
+ for (let e of O) r[e] = { reasoningEffort: "none" };
181
+ }
182
+ return r;
183
+ }
184
+ return e;
185
+ }
186
+ var M = h(r(), he, ge).optional(), _e = {
187
+ openai: { reasoningEffort: "low" },
188
+ anthropic: {
189
+ type: "adaptive",
190
+ effort: "low"
191
+ },
192
+ google: { thinkingLevel: "low" },
193
+ alibaba: { reasoningEffort: "low" },
194
+ meta: { reasoningEffort: "low" },
195
+ moonshotai: { reasoningEffort: "low" },
196
+ xai: { reasoningEffort: "low" },
197
+ zai: { reasoningEffort: "low" }
198
+ };
199
+ function ve(e) {
200
+ return !!e && typeof e == "object" && Object.values(e).some((e) => e !== void 0);
201
+ }
202
+ function ye(e, t) {
203
+ let n = t?.[e];
204
+ return ve(n) ? n : _e[e];
205
+ }
206
+ var N = /* @__PURE__ */ function(e) {
207
+ 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;
208
+ }({});
209
+ function be(e) {
210
+ return !P(e) && e !== N.RequestGeolocation;
211
+ }
212
+ function P(e) {
213
+ return e === N.RequestConfirm || e === N.ShowArtifact || e === N.ShowCalendarEvent || e === N.ShowComparison || e === N.ShowContactForm || e === N.ShowDiagram || e === N.ShowEmail || e === N.ShowImageGallery || e === N.ShowLocation || e === N.ShowMessage || e === N.ShowForm || e === N.ShowMultipleChoice || e === N.ShowProductList || e === N.ShowQrCode || e === N.ShowSources || e === N.ShowSuggestedReply || e === N.ShowVideo || e === N.ShowWeather || e === N.ShowWebPages;
214
+ }
215
+ var xe = /* @__PURE__ */ new Set([
216
+ N.RequestConfirm,
217
+ N.ShowArtifact,
218
+ N.ShowWeather,
219
+ N.ShowLocation,
220
+ N.ShowComparison,
221
+ N.ShowProductList,
222
+ N.ShowWebPages,
223
+ N.ShowImageGallery,
224
+ N.ShowVideo,
225
+ N.ShowSources,
226
+ N.ShowSuggestedReply,
227
+ N.ShowCalendarEvent,
228
+ N.ShowEmail,
229
+ N.ShowMessage,
230
+ N.ShowForm
231
+ ]);
232
+ function Se(e) {
233
+ return xe.has(e);
234
+ }
235
+ var Ce = /* @__PURE__ */ function(e) {
236
+ return e.Web = "web", e.Platform = "platform", e.OpenAiApi = "openai-api", e.Voice = "voice", e;
237
+ }({});
238
+ N.RequestConfirm, N.RequestGeolocation, N.ShowArtifact, N.ShowCalendarEvent, N.ShowContactForm, N.ShowComparison, N.ShowDiagram, N.ShowEmail, N.ShowForm, N.ShowImageGallery, N.ShowLocation, N.ShowMessage, N.ShowMultipleChoice, N.ShowProductList, N.ShowQrCode, N.ShowSources, N.ShowSuggestedReply, N.ShowVideo, N.ShowWeather, N.ShowWebPages;
239
+ var we = "Shown on the caller's screen";
240
+ function Te(e) {
241
+ return typeof e == "string" && (e.startsWith("Voice turn note") || e.startsWith(we));
242
+ }
243
+ var F = o({
244
+ maxSteps: s().int().min(1).max(10).optional().default(5),
245
+ maxOptionsPerStep: s().int().min(2).max(10).optional().default(5)
246
+ }), I = o({ mode: u(["optional", "required"]).optional().default("optional") }), L = o({ mode: u(["optional", "required"]).optional().default("required") }), R = /* @__PURE__ */ function(e) {
247
+ return e.Perplexity = "perplexity", e.Parallel = "parallel", e.Native = "native", e;
248
+ }({}), Ee = o({
249
+ maxResults: s().int().min(1).max(20).optional(),
250
+ maxTokens: s().int().positive().max(1e6).optional(),
251
+ maxTokensPerPage: s().int().positive().optional(),
252
+ country: f().max(2).optional(),
253
+ searchLanguageFilter: n(f().max(5)).max(10).optional(),
254
+ searchDomainFilter: n(f()).max(20).optional(),
255
+ searchRecencyFilter: u([
256
+ "day",
257
+ "week",
258
+ "month",
259
+ "year"
260
+ ]).optional()
261
+ }), De = o({
262
+ mode: u(["one-shot", "agentic"]).optional(),
263
+ maxResults: s().int().min(1).max(20).optional(),
264
+ sourcePolicy: o({
265
+ includeDomains: n(f()).optional(),
266
+ excludeDomains: n(f()).optional(),
267
+ afterDate: f().optional()
268
+ }).optional(),
269
+ excerpts: o({
270
+ maxCharsPerResult: s().int().positive().optional(),
271
+ maxCharsTotal: s().int().positive().optional()
272
+ }).optional(),
273
+ fetchPolicy: o({ maxAgeSeconds: s().int().positive().optional() }).optional()
274
+ }), Oe = o({
275
+ openai: o({}).optional(),
276
+ anthropic: o({
277
+ maxUses: s().int().positive().optional(),
278
+ allowedDomains: n(f()).optional(),
279
+ blockedDomains: n(f()).optional(),
280
+ userLocation: o({
281
+ type: a("approximate").optional(),
282
+ country: f().optional(),
283
+ region: f().optional(),
284
+ city: f().optional(),
285
+ timezone: f().optional()
286
+ }).optional()
287
+ }).optional(),
288
+ google: o({}).optional()
289
+ }), z = o({
290
+ enabled: d().default(!1),
291
+ provider: u(R).optional().default(R.Native),
292
+ perplexity: Ee.optional(),
293
+ parallel: De.optional(),
294
+ native: Oe.optional()
295
+ }), B = o({ useAllUserKb: d().default(!1) }), V = o({ useAllUserFiles: d().default(!1) }), H = o({ tools: n(f()).default([]) }), U = o({
296
+ disabled: n(u(N)).default([
297
+ N.UserMemory,
298
+ N.SearchInUserFiles,
299
+ N.RunWorker,
300
+ N.FetchTeamsChannelHistory
301
+ ]),
302
+ showForm: F.optional().default(() => F.parse({})),
303
+ suggestedReply: I.optional().default(() => I.parse({})),
304
+ showSources: L.optional().default(() => L.parse({})),
305
+ webSearch: z.optional().default(() => z.parse({})),
306
+ userMemory: B.optional().default(() => B.parse({})),
307
+ userFiles: V.optional().default(() => V.parse({})),
308
+ approval: H.optional().default(() => H.parse({}))
309
+ }), W = o({
310
+ freshness: o({
311
+ enabled: d().default(!1),
312
+ scale: s().int().min(86400).max(31536e3).default(7776e3),
313
+ weight: s().min(.05).max(.5).default(.1)
314
+ }).prefault({}),
315
+ priority: o({ enabled: d().default(!0) }).prefault({}),
316
+ mmr: o({
317
+ enabled: d().default(!1),
318
+ diversity: s().min(0).max(1).default(.3),
319
+ candidatesLimit: s().int().min(20).max(100).default(50)
320
+ }).prefault({})
321
+ }).prefault({}), ke = o({
322
+ prompt: f().optional(),
323
+ temperature: s().min(0).max(2).optional().default(.6),
324
+ maxOutputTokens: s().positive().optional(),
325
+ presencePenalty: s().min(-2).max(2).optional(),
326
+ frequencyPenalty: s().min(-2).max(2).optional(),
327
+ searchMode: u(C).optional().default(C.Balanced),
328
+ limit: s().positive().max(100).optional().default(10),
329
+ maxStepCount: s().int().min(1).max(40).optional().default(10),
330
+ reasoning: M,
331
+ ranking: W.optional().default(() => W.parse({}))
332
+ }), G = h(r(), t(f(), f()), (e) => typeof e == "string" ? { it: e } : e), K = "https://cdn.jsdelivr.net/npm/@8wave/ai-elements/dist/ai-elements.es.js", q = /* @__PURE__ */ function(e) {
333
+ return e.InlineModule = "inline-module", e.ScriptSrc = "script-src", e.DynamicImport = "dynamic-import", e;
334
+ }({}), J = /* @__PURE__ */ function(e) {
335
+ return e.Frontoffice = "frontoffice", e.App = "app", e.Widget = "widget", e;
336
+ }({}), Ae = Object.values(J), Y = o({
337
+ media: ne.optional(),
338
+ logo: f().optional(),
339
+ theme: u([
340
+ "light",
341
+ "dark",
342
+ "auto"
343
+ ]).optional().default("auto"),
344
+ mainColor: f().regex(/^#[0-9A-Fa-f]{6}$/).optional().default("#000000"),
345
+ textColor: u([
346
+ "auto",
347
+ "white",
348
+ "black"
349
+ ]).optional().default("auto"),
350
+ useColorsForAgentHeader: d().optional().default(!1),
351
+ initialMessage: G.optional(),
352
+ greeting: n(G).min(1).max(10).optional(),
353
+ messagePlaceholder: G.optional(),
354
+ dismissableNotice: G.optional(),
355
+ footerMessage: G.optional(),
356
+ privacyPolicyNotice: G.optional(),
357
+ interactiveLogin: d().optional().default(!0),
358
+ welcomePopup: d().optional().default(!1),
359
+ floatingButtonPosition: u(["left", "right"]).optional().default("right"),
360
+ maxMessageLength: s().int().positive().optional(),
361
+ widgetUrl: p().default(K),
362
+ loadDelay: s().int().min(0).max(3e4).optional().default(0),
363
+ loaderStrategy: u(q).optional().default(q.InlineModule),
364
+ customCss: f().optional(),
365
+ smoothStream: d().optional().default(!1),
366
+ showExtendedSteps: d().optional().default(!1)
367
+ }), X = o({
368
+ enabled: d().default(!1),
369
+ maxFileSizeBytes: s().int().positive().max(104857600).optional().default(20971520),
370
+ allowedMimeTypes: n(f().regex(re)).optional().default([
371
+ "image/jpeg",
372
+ "image/png",
373
+ "image/gif",
374
+ "image/webp",
375
+ "application/pdf",
376
+ "text/plain",
377
+ "text/markdown",
378
+ "text/csv"
379
+ ]),
380
+ maxFilesPerMessage: s().int().positive().max(10).optional().default(5),
381
+ maxFilesPerChat: s().int().positive().max(50).optional().default(20)
382
+ }), Z = o({
383
+ zeroDataRetention: d().default(!0),
384
+ disallowPromptTraining: d().default(!0),
385
+ providerTimeoutMs: s().int().min(1e3).max(789e3).optional()
386
+ }), je = o({ enabled: d().default(!1) }), Q = o({
387
+ enabled: d().default(!1),
388
+ voiceId: f().optional(),
389
+ language: f().min(2).max(5).default("it"),
390
+ maxSessionSeconds: s().int().min(30).max(3600).default(600),
391
+ cascadeTimeoutSeconds: s().min(2).max(15).default(10),
392
+ fillerAfterSeconds: s().min(.5).max(8).optional(),
393
+ fillerMessage: f().max(200).optional(),
394
+ ignoreBackgroundVoices: d().default(!0),
395
+ turnEagerness: u([
396
+ "patient",
397
+ "normal",
398
+ "eager"
399
+ ]).default("normal"),
400
+ turnTimeoutSeconds: s().min(1).max(30).default(5),
401
+ firstMessage: f().max(300).optional(),
402
+ providerAgentId: f().optional(),
403
+ providerSecretId: f().optional(),
404
+ providerApiKeyId: f().optional()
405
+ }), Me = o({ enabled: d() });
406
+ o({
407
+ chatId: f().min(1).optional(),
408
+ deviceContext: y.optional(),
409
+ externalContext: t(f(), r()).optional()
410
+ });
411
+ var Ne = o({
412
+ sessionId: f(),
413
+ signedUrl: f(),
414
+ providerAgentId: f(),
415
+ chatId: f(),
416
+ maxSessionSeconds: s().int()
417
+ }), Pe = o({
418
+ voiceId: f(),
419
+ name: f(),
420
+ category: f().optional(),
421
+ previewUrl: f().optional(),
422
+ labels: t(f(), f()).optional()
423
+ });
424
+ n(Pe);
425
+ var Fe = o({
426
+ model: ke,
427
+ interface: Y,
428
+ tools: U.optional().default(() => U.parse({})),
429
+ fileUpload: X.optional().default(() => X.parse({})),
430
+ gatewayOptions: Z.optional().default(() => Z.parse({})),
431
+ channels: n(u(J)).optional().default(() => [...Ae]),
432
+ externalContextSchema: ae.optional(),
433
+ openaiApi: je.optional().default(() => je.parse({})),
434
+ voice: Q.optional().default(() => Q.parse({}))
435
+ }), Ie = o({
436
+ rateLimits: o({
437
+ minuteRateLimit: s().int().min(0).optional(),
438
+ hourRateLimit: s().int().min(0).optional(),
439
+ dayRateLimit: s().int().min(0).optional(),
440
+ monthRateLimit: s().int().min(0).optional()
441
+ }),
442
+ trustedOrigins: o({ origins: n(p().or(a(""))).overwrite((e) => e?.filter((e) => e?.trim())).default([]) }).default({ origins: [] })
443
+ });
444
+ o({
445
+ id: f().optional(),
446
+ name: f(),
447
+ prompt: f().optional(),
448
+ model: f().default(_.gpt56Terra),
449
+ fallbackModels: n(f()).default([]),
450
+ status: u(b).default(b.Draft),
451
+ visibility: u(x).default(x.Organization),
452
+ settings: Fe,
453
+ security: Ie.nullish(),
454
+ type: u(S).default(S.Chat),
455
+ organizationId: f()
456
+ }), i(() => o({
457
+ id: f(),
458
+ name: f(),
459
+ prompt: f(),
460
+ model: f(),
461
+ fallbackModels: n(f()).nullable().default([]),
462
+ status: u(b).default(b.Draft),
463
+ visibility: u(x).default(x.Organization),
464
+ settings: Fe,
465
+ security: Ie.nullable(),
466
+ type: u(S).default(S.Chat),
467
+ organizationId: f(),
468
+ createdAt: m(),
469
+ createdBy: f(),
470
+ updatedAt: m(),
471
+ updatedBy: f(),
472
+ deleted: d(),
473
+ deletedAt: m().nullable(),
474
+ deletedBy: f().nullable(),
475
+ outOfBudget: d().optional().default(!1),
476
+ outOfBudgetReason: f().optional().default("")
477
+ }));
478
+ var Le = o({
479
+ id: f(),
480
+ name: f(),
481
+ status: u(b),
482
+ visibility: u(x),
483
+ organizationId: f(),
484
+ interface: Y,
485
+ createdAt: m(),
486
+ updatedAt: m(),
487
+ capabilities: o({
488
+ fileUpload: X,
489
+ voice: Me
490
+ }),
491
+ channels: n(u(J)).default(() => [...Ae])
492
+ }), Re = Y.pick({
493
+ logo: !0,
494
+ mainColor: !0,
495
+ textColor: !0,
496
+ theme: !0,
497
+ floatingButtonPosition: !0,
498
+ customCss: !0
499
+ }), ze = Le.pick({
500
+ id: !0,
501
+ name: !0,
502
+ organizationId: !0
503
+ }).extend({ interface: Re }), Be = o({
504
+ emailPassword: d(),
505
+ google: d(),
506
+ microsoft: d()
507
+ }), Ve = o({
508
+ requiresAuth: a(!1),
509
+ agent: Le,
510
+ branding: c()
511
+ }), $ = o({
512
+ requiresAuth: a(!0),
513
+ agent: c(),
514
+ branding: ze
515
+ });
516
+ l("requiresAuth", [Ve, $]), l("requiresAuth", [Ve.extend({ authMethods: Be }), $.extend({ authMethods: Be })]), o({
517
+ id: e(),
518
+ agentIds: n(e())
519
+ }), o({
520
+ ...g.pagination(),
521
+ ...g.sort([
522
+ "id",
523
+ "updatedAt",
524
+ "createdAt",
525
+ "name",
526
+ "type",
527
+ "status",
528
+ "visibility",
529
+ "model"
530
+ ]),
531
+ ...g.filters(["done", "type"]),
532
+ ...g.filter("id"),
533
+ ...g.fullText(),
534
+ ...g.ids()
535
+ });
536
+ //#endregion
537
+ export { _ as A, me as C, y as D, Te as E, h as M, g as N, le as O, ye as S, P as T, w as _, Z as a, R as b, M as c, S as d, z as f, E as g, k as h, X as i, v as j, ce as k, C as l, K as m, N as n, q as o, Ce as p, J as r, W as s, T as t, b as u, D as v, Se as w, be as x, Ne as y };
538
+
539
+ //# sourceMappingURL=Agent-WEwgRwnY.js.map