@8wave/ai-elements 0.114.0-beta.8 → 0.115.0-beta.2

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 (163) hide show
  1. package/dist/_chunks/Agent-DK76k05_.js +566 -0
  2. package/dist/_chunks/Agent-DK76k05_.js.map +1 -0
  3. package/dist/_chunks/{PkStreamingMarkdown-C1sANAr5.js → PkStreamingMarkdown-BKxA6Ntl.js} +688 -672
  4. package/dist/_chunks/PkStreamingMarkdown-BKxA6Ntl.js.map +1 -0
  5. package/dist/_chunks/{PkToolRequestGeolocation-BbxYKt-9.js → PkToolRequestGeolocation-OF1PWhMw.js} +2 -2
  6. package/{dist-vue/_chunks/PkToolRequestGeolocation-9vfYNaQo.js.map → dist/_chunks/PkToolRequestGeolocation-OF1PWhMw.js.map} +1 -1
  7. package/dist/_chunks/{PkToolRequestOAuthConnection-CTp2w60F.js → PkToolRequestOAuthConnection-CgQePKKb.js} +4 -4
  8. package/dist/_chunks/PkToolRequestOAuthConnection-CgQePKKb.js.map +1 -0
  9. package/dist/_chunks/{PkToolShowArtifact-BfTjxGOT.js → PkToolShowArtifact-CHxeuKEU.js} +2 -2
  10. package/dist/_chunks/{PkToolShowArtifact-BfTjxGOT.js.map → PkToolShowArtifact-CHxeuKEU.js.map} +1 -1
  11. package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js +72 -0
  12. package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js.map +1 -0
  13. package/dist/_chunks/{PkToolShowContactForm-PFpY9dIp.js → PkToolShowContactForm-DqVLVwqJ.js} +2 -2
  14. package/dist/_chunks/{PkToolShowContactForm-PFpY9dIp.js.map → PkToolShowContactForm-DqVLVwqJ.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowForm-CMtSN0oX.js → PkToolShowForm-YJQPYfEe.js} +5 -5
  16. package/dist/_chunks/{PkToolShowForm-CMtSN0oX.js.map → PkToolShowForm-YJQPYfEe.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowSources-C6cu66Ts.js → PkToolShowSources-VFoI0YS8.js} +3 -3
  18. package/dist/_chunks/{PkToolShowSources-C6cu66Ts.js.map → PkToolShowSources-VFoI0YS8.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowSuggestedReply-CFO8wV1b.js → PkToolShowSuggestedReply-Dl4x_nEJ.js} +2 -2
  20. package/dist/_chunks/{PkToolShowSuggestedReply-CFO8wV1b.js.map → PkToolShowSuggestedReply-Dl4x_nEJ.js.map} +1 -1
  21. package/dist/_chunks/{markdown-BRD-hDrH.js → markdown-BL7WANiX.js} +19 -12
  22. package/dist/_chunks/markdown-BL7WANiX.js.map +1 -0
  23. package/dist/ai-elements.es.js +3119 -2748
  24. package/dist/ai-elements.es.js.map +1 -1
  25. package/dist-vue/PkChatbot.js +1 -1
  26. package/dist-vue/PkChatbotAuth.js +1 -1
  27. package/dist-vue/PkChatbotEmptyState.js +1 -1
  28. package/dist-vue/PkChatbotInput.js +1 -1
  29. package/dist-vue/PkChatbotMessages.js +1 -1
  30. package/dist-vue/PkChatbotStepPayload.js +1 -1
  31. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  32. package/dist-vue/PkChatbotSteps.js +1 -1
  33. package/dist-vue/PkChatbotViewChat.js +1 -1
  34. package/dist-vue/PkChatbotViewConversations.js +1 -1
  35. package/dist-vue/PkChatbotViewFiles.js +1 -1
  36. package/dist-vue/PkChatbotViewProfile.js +1 -1
  37. package/dist-vue/_chunks/{Agent-BNlmK-uJ.js → Agent-tbKw8Mdt.js} +2 -2
  38. package/dist-vue/_chunks/{Agent-BNlmK-uJ.js.map → Agent-tbKw8Mdt.js.map} +1 -1
  39. package/dist-vue/_chunks/{Document-2X01-F4Z.js → Document-nCWwJC2h.js} +18 -11
  40. package/dist-vue/_chunks/Document-nCWwJC2h.js.map +1 -0
  41. package/dist-vue/_chunks/Media-_HfFLHGD.js.map +1 -1
  42. package/dist-vue/_chunks/{PkChatbot-HRayDr2d.js → PkChatbot-CdtYJ1Lf.js} +8 -8
  43. package/dist-vue/_chunks/{PkChatbot-HRayDr2d.js.map → PkChatbot-CdtYJ1Lf.js.map} +1 -1
  44. package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js +421 -0
  45. package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js.map +1 -0
  46. package/dist-vue/_chunks/{PkChatbotEmptyState-CPOcfoRC.js → PkChatbotEmptyState-Dicjr_Fv.js} +2 -2
  47. package/dist-vue/_chunks/{PkChatbotEmptyState-CPOcfoRC.js.map → PkChatbotEmptyState-Dicjr_Fv.js.map} +1 -1
  48. package/dist-vue/_chunks/{PkChatbotInput-pLJQIu7v.js → PkChatbotInput-DcLmOqA1.js} +2 -2
  49. package/dist-vue/_chunks/{PkChatbotInput-pLJQIu7v.js.map → PkChatbotInput-DcLmOqA1.js.map} +1 -1
  50. package/dist-vue/_chunks/{PkChatbotMessages-GZStJbx_.js → PkChatbotMessages-R1EsTJpM.js} +258 -256
  51. package/dist-vue/_chunks/PkChatbotMessages-R1EsTJpM.js.map +1 -0
  52. package/dist-vue/_chunks/{PkChatbotStepPayload-DU0W-eUp.js → PkChatbotStepPayload-rKaeDQDj.js} +2 -2
  53. package/dist-vue/_chunks/{PkChatbotStepPayload-DU0W-eUp.js.map → PkChatbotStepPayload-rKaeDQDj.js.map} +1 -1
  54. package/dist-vue/_chunks/{PkChatbotStepToolDetail-etlBryOg.js → PkChatbotStepToolDetail-5HdSV8Im.js} +3 -3
  55. package/dist-vue/_chunks/{PkChatbotStepToolDetail-etlBryOg.js.map → PkChatbotStepToolDetail-5HdSV8Im.js.map} +1 -1
  56. package/dist-vue/_chunks/PkChatbotSteps-CPPjwTJN.js +191 -0
  57. package/dist-vue/_chunks/PkChatbotSteps-CPPjwTJN.js.map +1 -0
  58. package/dist-vue/_chunks/{PkChatbotViewChat-DIfBWFoG.js → PkChatbotViewChat-CbqrHEC6.js} +7 -7
  59. package/dist-vue/_chunks/{PkChatbotViewChat-DIfBWFoG.js.map → PkChatbotViewChat-CbqrHEC6.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkChatbotViewConversations-BCdolW0R.js → PkChatbotViewConversations-CHpN4vhm.js} +2 -2
  61. package/dist-vue/_chunks/{PkChatbotViewConversations-BCdolW0R.js.map → PkChatbotViewConversations-CHpN4vhm.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkChatbotViewFiles-Cudao8ew.js → PkChatbotViewFiles-Bk9-K6Hw.js} +3 -3
  63. package/dist-vue/_chunks/{PkChatbotViewFiles-Cudao8ew.js.map → PkChatbotViewFiles-Bk9-K6Hw.js.map} +1 -1
  64. package/dist-vue/_chunks/{PkChatbotViewProfile-DDsKOkcC.js → PkChatbotViewProfile-CosaHA-g.js} +2 -2
  65. package/dist-vue/_chunks/{PkChatbotViewProfile-DDsKOkcC.js.map → PkChatbotViewProfile-CosaHA-g.js.map} +1 -1
  66. package/dist-vue/_chunks/{PkStreamingMarkdown-BloMJaIW.js → PkStreamingMarkdown-DYy79C1P.js} +214 -205
  67. package/dist-vue/_chunks/{PkStreamingMarkdown-BloMJaIW.js.map → PkStreamingMarkdown-DYy79C1P.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkToolRequestGeolocation-9vfYNaQo.js → PkToolRequestGeolocation-BOVbaCzQ.js} +2 -2
  69. package/{dist/_chunks/PkToolRequestGeolocation-BbxYKt-9.js.map → dist-vue/_chunks/PkToolRequestGeolocation-BOVbaCzQ.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BorR5NmZ.js → PkToolRequestOAuthConnection-a2LegFoE.js} +4 -4
  71. package/dist-vue/_chunks/PkToolRequestOAuthConnection-a2LegFoE.js.map +1 -0
  72. package/dist-vue/_chunks/{PkToolShowArtifact-BuMY7GNj.js → PkToolShowArtifact-DUOnFdfa.js} +2 -2
  73. package/dist-vue/_chunks/{PkToolShowArtifact-BuMY7GNj.js.map → PkToolShowArtifact-DUOnFdfa.js.map} +1 -1
  74. package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js +72 -0
  75. package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js.map +1 -0
  76. package/dist-vue/_chunks/{PkToolShowContactForm-0OQRqT8m.js → PkToolShowContactForm-1TFKvG_s.js} +2 -2
  77. package/dist-vue/_chunks/{PkToolShowContactForm-0OQRqT8m.js.map → PkToolShowContactForm-1TFKvG_s.js.map} +1 -1
  78. package/dist-vue/_chunks/{PkToolShowDiagram-BGL27iHG.js → PkToolShowDiagram-Dmtqu3th.js} +2 -2
  79. package/dist-vue/_chunks/{PkToolShowDiagram-BGL27iHG.js.map → PkToolShowDiagram-Dmtqu3th.js.map} +1 -1
  80. package/dist-vue/_chunks/{PkToolShowEmail-BJJpS69F.js → PkToolShowEmail-BDsBoETQ.js} +2 -2
  81. package/dist-vue/_chunks/{PkToolShowEmail-BJJpS69F.js.map → PkToolShowEmail-BDsBoETQ.js.map} +1 -1
  82. package/dist-vue/_chunks/{PkToolShowForm-DDcPpOZ8.js → PkToolShowForm-DwFKxMJd.js} +4 -4
  83. package/dist-vue/_chunks/{PkToolShowForm-DDcPpOZ8.js.map → PkToolShowForm-DwFKxMJd.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkToolShowMessage-BFGynf3p.js → PkToolShowMessage-Dau3agUy.js} +2 -2
  85. package/dist-vue/_chunks/{PkToolShowMessage-BFGynf3p.js.map → PkToolShowMessage-Dau3agUy.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkToolShowProductList-6t1Ir5CW.js → PkToolShowProductList-CsupMsuy.js} +2 -2
  87. package/dist-vue/_chunks/{PkToolShowProductList-6t1Ir5CW.js.map → PkToolShowProductList-CsupMsuy.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkToolShowSources-cOF0ZxOj.js → PkToolShowSources-TzkNgwnr.js} +4 -4
  89. package/dist-vue/_chunks/{PkToolShowSources-cOF0ZxOj.js.map → PkToolShowSources-TzkNgwnr.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DA4NEjHB.js → PkToolShowSuggestedReply-qAWdCUhr.js} +2 -2
  91. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DA4NEjHB.js.map → PkToolShowSuggestedReply-qAWdCUhr.js.map} +1 -1
  92. package/dist-vue/_chunks/{PkToolShowWebPages-OgaT1vYJ.js → PkToolShowWebPages-D4E3Xzg1.js} +2 -2
  93. package/dist-vue/_chunks/{PkToolShowWebPages-OgaT1vYJ.js.map → PkToolShowWebPages-D4E3Xzg1.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkUrl-Cd69XP5z.js → PkUrl-Cu3qKl4G.js} +2 -2
  95. package/dist-vue/_chunks/{PkUrl-Cd69XP5z.js.map → PkUrl-Cu3qKl4G.js.map} +1 -1
  96. package/dist-vue/_chunks/{createChatbotApiClient-CaVLm5W9.js → createChatbotApiClient-BlWs282E.js} +137 -168
  97. package/dist-vue/_chunks/createChatbotApiClient-BlWs282E.js.map +1 -0
  98. package/dist-vue/_chunks/{useChatbotStore-BwrBZJCq.js → useChatbotStore-CMo47fnS.js} +3 -3
  99. package/dist-vue/_chunks/{useChatbotStore-BwrBZJCq.js.map → useChatbotStore-CMo47fnS.js.map} +1 -1
  100. package/dist-vue/_chunks/utils-B45A2ONa.js +184 -0
  101. package/dist-vue/_chunks/utils-B45A2ONa.js.map +1 -0
  102. package/dist-vue/api.js +1 -1
  103. package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +4 -4
  104. package/dist-vue/apps/web-component/src/composables/useChatbotAuth.d.ts +53 -5
  105. package/dist-vue/apps/web-component/src/composables/useChatbotAuthForm.d.ts +14 -0
  106. package/dist-vue/composables.js +466 -39
  107. package/dist-vue/composables.js.map +1 -1
  108. package/dist-vue/index.js +3361 -3237
  109. package/dist-vue/index.js.map +1 -1
  110. package/dist-vue/locales.js +44 -0
  111. package/dist-vue/packages/ability/src/index.d.ts +10 -14
  112. package/dist-vue/packages/auth/src/add-member-to-organization.d.ts +8 -2
  113. package/dist-vue/packages/auth/src/additional-fields.d.ts +48 -0
  114. package/dist-vue/packages/auth/src/organization-member-limit.d.ts +12 -0
  115. package/dist-vue/packages/auth/src/passkey-policy-client-plugin.d.ts +31 -0
  116. package/dist-vue/packages/auth/src/passkey-policy-plugin.d.ts +22 -0
  117. package/dist-vue/packages/auth/src/two-factor-admin-plugin.d.ts +2 -0
  118. package/dist-vue/packages/auth/src/two-factor-policy-client-plugin.d.ts +163 -0
  119. package/dist-vue/packages/auth/src/two-factor-policy-plugin.d.ts +106 -0
  120. package/dist-vue/packages/components/src/PkQrCode.d.ts +14 -0
  121. package/dist-vue/packages/components/src/chat/PkChatbotAuth.d.ts +19 -0
  122. package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +8 -4
  123. package/dist-vue/packages/components/src/chat/PkChatbotSteps.d.ts +1 -0
  124. package/dist-vue/packages/components/src/chat/PkTurnEvaluation.d.ts +8 -0
  125. package/dist-vue/packages/components/src/chat/utils.d.ts +9 -0
  126. package/dist-vue/packages/components/src/index.d.ts +2 -1
  127. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +60 -0
  128. package/dist-vue/packages/models/src/schema/Chat.d.ts +42 -0
  129. package/dist-vue/packages/models/src/schema/Document.d.ts +17 -0
  130. package/dist-vue/packages/models/src/schema/DocumentFolder.d.ts +10 -0
  131. package/dist-vue/packages/models/src/schema/DocumentSyncSource.d.ts +71 -1
  132. package/dist-vue/packages/models/src/schema/Lead.d.ts +1 -1
  133. package/dist-vue/packages/models/src/schema/McpServer.d.ts +13 -0
  134. package/dist-vue/packages/models/src/schema/Media.d.ts +0 -1
  135. package/dist-vue/packages/models/src/schema/Member.d.ts +10 -0
  136. package/dist-vue/packages/models/src/schema/Notification.d.ts +31 -0
  137. package/dist-vue/packages/models/src/schema/Organization.d.ts +20 -0
  138. package/dist-vue/packages/models/src/schema/SignInSecurity.d.ts +168 -0
  139. package/dist-vue/packages/models/src/schema/User.d.ts +1 -0
  140. package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
  141. package/dist-vue/style.css +1 -1
  142. package/package.json +1 -1
  143. package/dist/_chunks/Agent-DTLrWpzX.js +0 -460
  144. package/dist/_chunks/Agent-DTLrWpzX.js.map +0 -1
  145. package/dist/_chunks/Media-Cft7Pwrh.js +0 -108
  146. package/dist/_chunks/Media-Cft7Pwrh.js.map +0 -1
  147. package/dist/_chunks/PkStreamingMarkdown-C1sANAr5.js.map +0 -1
  148. package/dist/_chunks/PkToolRequestOAuthConnection-CTp2w60F.js.map +0 -1
  149. package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js +0 -60
  150. package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js.map +0 -1
  151. package/dist/_chunks/markdown-BRD-hDrH.js.map +0 -1
  152. package/dist-vue/_chunks/Document-2X01-F4Z.js.map +0 -1
  153. package/dist-vue/_chunks/PkChatbotAuth-Bi508F1u.js +0 -349
  154. package/dist-vue/_chunks/PkChatbotAuth-Bi508F1u.js.map +0 -1
  155. package/dist-vue/_chunks/PkChatbotMessages-GZStJbx_.js.map +0 -1
  156. package/dist-vue/_chunks/PkChatbotSteps-Cl4pVtPJ.js +0 -190
  157. package/dist-vue/_chunks/PkChatbotSteps-Cl4pVtPJ.js.map +0 -1
  158. package/dist-vue/_chunks/PkToolRequestOAuthConnection-BorR5NmZ.js.map +0 -1
  159. package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js +0 -61
  160. package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js.map +0 -1
  161. package/dist-vue/_chunks/createChatbotApiClient-CaVLm5W9.js.map +0 -1
  162. package/dist-vue/_chunks/utils-h4C7rRcu.js +0 -177
  163. package/dist-vue/_chunks/utils-h4C7rRcu.js.map +0 -1
@@ -0,0 +1,566 @@
1
+ import { C as e, S as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, n as d, o as f, s as ee, t as p, v as m, x as h, y as g } from "./zod-BTUfq5ZI.js";
2
+ //#region ../../packages/models/src/utils.ts
3
+ var _ = (e, t, n) => ee(e, t, {
4
+ encode: (e) => e,
5
+ decode: n
6
+ }), v = 51200, te = m(g(), h()).refine((e) => JSON.stringify(e).length <= v, { message: `Schema must not exceed ${v / 1024} KB` });
7
+ e();
8
+ var ne = (e) => [`${e}`, `-${e}`], re = (e) => e.flatMap((e) => ne(e)), y = {
9
+ pagination: (e = 1, t = 10) => ({
10
+ "page[number]": c().or(g()).transform((e) => Number(e)).default(e),
11
+ "page[size]": c().or(g()).transform((e) => Number(e)).default(t)
12
+ }),
13
+ filter: (e) => ({ [`filter[${e}]`]: g().optional() }),
14
+ include: (e) => ({ [`include[${e}]`]: g().optional() }),
15
+ range: (e) => ({
16
+ [`from[${e}]`]: g().optional(),
17
+ [`to[${e}]`]: g().optional()
18
+ }),
19
+ has: (e) => ({ [`has[${e}]`]: f().optional() }),
20
+ fullText: () => ({ "filter[fullText]": g().optional() }),
21
+ ids: () => ({ ids: r([g(), n(g())]).optional() }),
22
+ deleted: () => ({ "filter[isDeleted]": f().default(!1) }),
23
+ filters: (e) => e.map((e) => y.filter(e)).reduce((e, t) => ({
24
+ ...e,
25
+ ...t
26
+ })),
27
+ sort: (e) => {
28
+ let t = re(e);
29
+ return { sort: d(t).optional().default(t[0]) };
30
+ }
31
+ }, b = s({
32
+ dateTime: g().optional(),
33
+ timezone: g().optional(),
34
+ language: g().optional(),
35
+ languages: n(g()).optional(),
36
+ url: g().optional(),
37
+ pathname: g().optional(),
38
+ pageTitle: g().optional(),
39
+ referrer: g().optional(),
40
+ screenWidth: c().optional(),
41
+ screenHeight: c().optional(),
42
+ viewportWidth: c().optional(),
43
+ viewportHeight: c().optional(),
44
+ devicePixelRatio: c().optional(),
45
+ maxTouchPoints: c().optional(),
46
+ hardwareConcurrency: c().optional(),
47
+ deviceMemory: c().optional(),
48
+ platform: g().optional(),
49
+ connectionType: g().optional(),
50
+ connectionEffectiveType: g().optional(),
51
+ connectionDownlink: c().optional(),
52
+ connectionRtt: c().optional(),
53
+ saveData: f().optional(),
54
+ darkMode: f().optional(),
55
+ reducedMotion: f().optional(),
56
+ historyLength: c().optional(),
57
+ geolocationLatitude: c().optional(),
58
+ geolocationLongitude: c().optional(),
59
+ geolocationAccuracy: c().optional(),
60
+ geolocationCity: g().optional()
61
+ }), x = /^[a-z]+\/[a-z0-9\-+.]+$/i, ie = /* @__PURE__ */ function(e) {
62
+ return e.DEFAULT = "default", e.COLD = "cold", e.HOT = "hot", e.ARCHIVE = "archive", e;
63
+ }({}), ae = s({
64
+ type: o("azure-blob"),
65
+ blobUri: t(),
66
+ containerName: g().min(1),
67
+ pathRelativeToContainer: g().min(1)
68
+ }), oe = s({
69
+ type: o("s3"),
70
+ bucket: g().min(1),
71
+ key: g().min(1),
72
+ region: g().min(1)
73
+ }), se = u("type", [ae, oe]), S = s({
74
+ type: g().min(1),
75
+ name: g().min(1),
76
+ mimeType: g().regex(x),
77
+ bytesCount: c().positive(),
78
+ extension: g().regex(/^\.[a-zA-Z0-9]+$/).overwrite((e) => e.toLowerCase()),
79
+ storedFileName: g().optional(),
80
+ metadata: m(g(), g()).default({}),
81
+ tags: m(g(), g()).default({})
82
+ }).extend({
83
+ storageHandle: se,
84
+ storagePolicy: d(ie),
85
+ signData: g().optional(),
86
+ storedFileName: g().min(1)
87
+ }), C = s({
88
+ name: g().min(1),
89
+ src: S,
90
+ srcSet: n(S).default([]),
91
+ rawOptions: i().optional()
92
+ });
93
+ s({
94
+ src: S,
95
+ uploadHandle: s({
96
+ uploadSasuri: t(),
97
+ metadata: m(g(), g()).default({}),
98
+ tags: m(g(), g()).default({})
99
+ })
100
+ }), s({
101
+ src: S,
102
+ downloadHandle: s({
103
+ downloadSasuri: t(),
104
+ viewSasuri: t(),
105
+ previewSasuri: t().optional(),
106
+ expiresOn: g().datetime(),
107
+ type: g()
108
+ })
109
+ });
110
+ var w = /* @__PURE__ */ function(e) {
111
+ return e.picture = "picture", e.video = "video", e.audio = "audio", e.office = "office", e.archive = "archive", e.binary = "binary", e.executable = "executable", e;
112
+ }({}), ce = s({
113
+ type: o(w.picture),
114
+ width: c().positive(),
115
+ height: c().positive(),
116
+ blurhash: g().optional()
117
+ }), le = s({
118
+ type: o(w.video),
119
+ width: c().positive(),
120
+ height: c().positive(),
121
+ duration: c().nonnegative()
122
+ }), ue = s({
123
+ type: o(w.audio),
124
+ duration: c().nonnegative()
125
+ }), de = s({ type: o(w.office) }), fe = s({ type: o(w.archive) }), pe = s({ type: o(w.binary) }), me = s({ type: o(w.executable) });
126
+ u("type", [
127
+ ce,
128
+ le,
129
+ ue,
130
+ de,
131
+ fe,
132
+ pe,
133
+ me
134
+ ]);
135
+ //#endregion
136
+ //#region ../../packages/models/src/schema/Agent.ts
137
+ var T = /* @__PURE__ */ function(e) {
138
+ return e.Draft = "draft", e.Active = "active", e.Inactive = "inactive", e;
139
+ }({}), E = /* @__PURE__ */ function(e) {
140
+ return e.Public = "public", e.Private = "private", e.Organization = "organization", e;
141
+ }({}), D = /* @__PURE__ */ function(e) {
142
+ return e.Chat = "chat", e.Reasoning = "reasoning", e;
143
+ }({}), O = /* @__PURE__ */ function(e) {
144
+ return e.Semantic = "semantic", e.Balanced = "balanced", e.Keyword = "keyword", e;
145
+ }({}), k = [
146
+ "none",
147
+ "low",
148
+ "medium",
149
+ "high",
150
+ "xhigh",
151
+ "max"
152
+ ], A = [
153
+ "low",
154
+ "medium",
155
+ "high",
156
+ "xhigh",
157
+ "max"
158
+ ], j = [
159
+ "minimal",
160
+ "low",
161
+ "medium",
162
+ "high"
163
+ ], M = [
164
+ "auto",
165
+ "detailed",
166
+ "concise"
167
+ ], he = s({
168
+ reasoningEffort: d(k).optional(),
169
+ reasoningSummary: d(M).optional()
170
+ }), ge = s({
171
+ type: d([
172
+ "adaptive",
173
+ "enabled",
174
+ "disabled"
175
+ ]).optional(),
176
+ effort: d(A).optional(),
177
+ display: d(["summarized", "omitted"]).optional(),
178
+ budgetTokens: c().int().positive().optional()
179
+ }), _e = s({
180
+ thinkingLevel: d(j).optional(),
181
+ thinkingBudget: c().int().optional(),
182
+ includeThoughts: f().optional()
183
+ }), ve = s({ type: d(["enabled", "disabled"]).optional() }), N = [
184
+ "alibaba",
185
+ "meta",
186
+ "moonshotai",
187
+ "spacexai",
188
+ "xiaomi",
189
+ "zai"
190
+ ], ye = [
191
+ "none",
192
+ "minimal",
193
+ "low",
194
+ "medium",
195
+ "high",
196
+ "xhigh"
197
+ ], P = s({ reasoningEffort: d(ye).optional() });
198
+ function F(e, t) {
199
+ return e && t.includes(e) ? e : void 0;
200
+ }
201
+ var be = s({
202
+ openai: he.optional(),
203
+ anthropic: ge.optional(),
204
+ google: _e.optional(),
205
+ deepseek: ve.optional(),
206
+ alibaba: P.optional(),
207
+ meta: P.optional(),
208
+ moonshotai: P.optional(),
209
+ spacexai: P.optional(),
210
+ xiaomi: P.optional(),
211
+ zai: P.optional()
212
+ });
213
+ function xe(e) {
214
+ if (!e || typeof e != "object") return e;
215
+ let t = e, n = [
216
+ "openai",
217
+ "anthropic",
218
+ "google",
219
+ "deepseek",
220
+ ...N
221
+ ].some((e) => e in t);
222
+ if ("effort" in t && !n) {
223
+ let e = t.effort, n = t.reasoningSummary, r = {};
224
+ if (e && e !== "off" && e !== "none") {
225
+ let t = F(e, k), i = F(n, M);
226
+ (t || i) && (r.openai = {
227
+ ...t && { reasoningEffort: t },
228
+ ...i && { reasoningSummary: i }
229
+ });
230
+ let a = F(e, A);
231
+ a && (r.anthropic = {
232
+ type: "adaptive",
233
+ effort: a
234
+ });
235
+ let o = F(e === "xhigh" || e === "max" ? "high" : e, j);
236
+ o && (r.google = { thinkingLevel: o }), r.deepseek = { type: "enabled" };
237
+ let s = F(e === "max" ? "xhigh" : e, ye);
238
+ if (s) for (let e of N) r[e] = { reasoningEffort: s };
239
+ } else {
240
+ r.openai = { reasoningEffort: "none" }, r.anthropic = { type: "disabled" }, r.google = { thinkingLevel: "minimal" }, r.deepseek = { type: "disabled" };
241
+ for (let e of N) r[e] = { reasoningEffort: "none" };
242
+ }
243
+ return r;
244
+ }
245
+ return e;
246
+ }
247
+ var I = _(h(), be, xe).optional(), L = /* @__PURE__ */ function(e) {
248
+ 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;
249
+ }({});
250
+ function Se(e) {
251
+ return e === L.RequestConfirm || e === L.ShowArtifact || e === L.ShowCalendarEvent || e === L.ShowComparison || e === L.ShowContactForm || e === L.ShowDiagram || e === L.ShowEmail || e === L.ShowImageGallery || e === L.ShowLocation || e === L.ShowMessage || e === L.ShowForm || e === L.ShowMultipleChoice || e === L.ShowProductList || e === L.ShowQrCode || e === L.ShowSources || e === L.ShowSuggestedReply || e === L.ShowVideo || e === L.ShowWeather || e === L.ShowWebPages;
252
+ }
253
+ L.RequestConfirm, L.ShowArtifact, L.ShowWeather, L.ShowLocation, L.ShowComparison, L.ShowProductList, L.ShowWebPages, L.ShowImageGallery, L.ShowVideo, L.ShowSources, L.ShowSuggestedReply, L.ShowCalendarEvent, L.ShowEmail, L.ShowMessage, L.ShowForm;
254
+ var Ce = /* @__PURE__ */ new Set([
255
+ L.RequestConfirm,
256
+ L.RequestGeolocation,
257
+ L.ShowForm,
258
+ L.ShowMultipleChoice,
259
+ "requestOAuthConnection"
260
+ ]);
261
+ function we(e) {
262
+ return Ce.has(e);
263
+ }
264
+ L.RequestConfirm, L.RequestGeolocation, L.ShowArtifact, L.ShowCalendarEvent, L.ShowContactForm, L.ShowComparison, L.ShowDiagram, L.ShowEmail, L.ShowForm, L.ShowImageGallery, L.ShowLocation, L.ShowMessage, L.ShowMultipleChoice, L.ShowProductList, L.ShowQrCode, L.ShowSources, L.ShowSuggestedReply, L.ShowVideo, L.ShowWeather, L.ShowWebPages;
265
+ var Te = "Shown on the caller's screen";
266
+ function Ee(e) {
267
+ return typeof e == "string" && (e.startsWith("Voice turn note") || e.startsWith(Te));
268
+ }
269
+ var R = s({
270
+ maxSteps: c().int().min(1).max(10).optional().default(5),
271
+ maxOptionsPerStep: c().int().min(2).max(10).optional().default(5)
272
+ }), z = /* @__PURE__ */ function(e) {
273
+ return e.Perplexity = "perplexity", e.Parallel = "parallel", e.Native = "native", e;
274
+ }({}), De = s({
275
+ maxResults: c().int().min(1).max(20).optional(),
276
+ maxTokens: c().int().positive().max(1e6).optional(),
277
+ maxTokensPerPage: c().int().positive().optional(),
278
+ country: g().max(2).optional(),
279
+ searchLanguageFilter: n(g().max(5)).max(10).optional(),
280
+ searchDomainFilter: n(g()).max(20).optional(),
281
+ searchRecencyFilter: d([
282
+ "day",
283
+ "week",
284
+ "month",
285
+ "year"
286
+ ]).optional()
287
+ }), Oe = s({
288
+ mode: d(["one-shot", "agentic"]).optional(),
289
+ maxResults: c().int().min(1).max(20).optional(),
290
+ sourcePolicy: s({
291
+ includeDomains: n(g()).optional(),
292
+ excludeDomains: n(g()).optional(),
293
+ afterDate: g().optional()
294
+ }).optional(),
295
+ excerpts: s({
296
+ maxCharsPerResult: c().int().positive().optional(),
297
+ maxCharsTotal: c().int().positive().optional()
298
+ }).optional(),
299
+ fetchPolicy: s({ maxAgeSeconds: c().int().positive().optional() }).optional()
300
+ }), ke = s({
301
+ openai: s({}).optional(),
302
+ anthropic: s({
303
+ maxUses: c().int().positive().optional(),
304
+ allowedDomains: n(g()).optional(),
305
+ blockedDomains: n(g()).optional(),
306
+ userLocation: s({
307
+ type: o("approximate").optional(),
308
+ country: g().optional(),
309
+ region: g().optional(),
310
+ city: g().optional(),
311
+ timezone: g().optional()
312
+ }).optional()
313
+ }).optional(),
314
+ google: s({}).optional()
315
+ }), B = s({
316
+ enabled: f().default(!1),
317
+ provider: d(z).optional().default(z.Native),
318
+ perplexity: De.optional(),
319
+ parallel: Oe.optional(),
320
+ native: ke.optional()
321
+ }), V = s({ useAllUserKb: f().default(!1) }), H = s({ useAllUserFiles: f().default(!1) }), U = s({ tools: n(g()).default([]) }), W = s({
322
+ disabled: n(d(L)).default([
323
+ L.UserMemory,
324
+ L.SearchInUserFiles,
325
+ L.RunWorker,
326
+ L.FetchTeamsChannelHistory
327
+ ]),
328
+ showForm: R.optional().default(() => R.parse({})),
329
+ webSearch: B.optional().default(() => B.parse({})),
330
+ userMemory: V.optional().default(() => V.parse({})),
331
+ userFiles: H.optional().default(() => H.parse({})),
332
+ approval: U.optional().default(() => U.parse({}))
333
+ }), G = s({
334
+ freshness: s({
335
+ enabled: f().default(!1),
336
+ scale: c().int().min(86400).max(31536e3).default(7776e3),
337
+ weight: c().min(.05).max(.5).default(.1)
338
+ }).prefault({}),
339
+ priority: s({ enabled: f().default(!0) }).prefault({}),
340
+ mmr: s({
341
+ enabled: f().default(!1),
342
+ diversity: c().min(0).max(1).default(.3),
343
+ candidatesLimit: c().int().min(20).max(100).default(50)
344
+ }).prefault({})
345
+ }).prefault({}), Ae = s({
346
+ prompt: g().optional(),
347
+ temperature: c().min(0).max(2).optional().default(.6),
348
+ maxOutputTokens: c().positive().optional(),
349
+ presencePenalty: c().min(-2).max(2).optional(),
350
+ frequencyPenalty: c().min(-2).max(2).optional(),
351
+ searchMode: d(O).optional().default(O.Balanced),
352
+ limit: c().positive().max(100).optional().default(10),
353
+ maxStepCount: c().int().min(1).max(40).optional().default(10),
354
+ reasoning: I,
355
+ ranking: G.optional().default(() => G.parse({}))
356
+ }), K = _(h(), m(g(), g()), (e) => typeof e == "string" ? { it: e } : e), je = "https://cdn.jsdelivr.net/npm/@8wave/ai-elements/dist/ai-elements.es.js", q = /* @__PURE__ */ function(e) {
357
+ return e.InlineModule = "inline-module", e.ScriptSrc = "script-src", e.DynamicImport = "dynamic-import", e;
358
+ }({}), J = /* @__PURE__ */ function(e) {
359
+ return e.Frontoffice = "frontoffice", e.App = "app", e.Widget = "widget", e;
360
+ }({}), Y = Object.values(J), X = s({
361
+ media: C.optional(),
362
+ logo: g().optional(),
363
+ theme: d([
364
+ "light",
365
+ "dark",
366
+ "auto"
367
+ ]).optional().default("auto"),
368
+ mainColor: g().regex(/^#[0-9A-Fa-f]{6}$/).optional().default("#000000"),
369
+ textColor: d([
370
+ "auto",
371
+ "white",
372
+ "black"
373
+ ]).optional().default("auto"),
374
+ useColorsForAgentHeader: f().optional().default(!1),
375
+ initialMessage: K.optional(),
376
+ greeting: n(K).min(1).max(10).optional(),
377
+ messagePlaceholder: K.optional(),
378
+ dismissableNotice: K.optional(),
379
+ footerMessage: K.optional(),
380
+ privacyPolicyNotice: K.optional(),
381
+ interactiveLogin: f().optional().default(!0),
382
+ welcomePopup: f().optional().default(!1),
383
+ floatingButtonPosition: d(["left", "right"]).optional().default("right"),
384
+ maxMessageLength: c().int().positive().optional(),
385
+ widgetUrl: t().default(je),
386
+ loadDelay: c().int().min(0).max(3e4).optional().default(0),
387
+ loaderStrategy: d(q).optional().default(q.InlineModule),
388
+ customCss: g().optional(),
389
+ smoothStream: f().optional().default(!1),
390
+ showExtendedSteps: f().optional().default(!1)
391
+ }), Z = s({
392
+ enabled: f().default(!1),
393
+ maxFileSizeBytes: c().int().positive().max(104857600).optional().default(20971520),
394
+ allowedMimeTypes: n(g().regex(x)).optional().default([
395
+ "image/jpeg",
396
+ "image/png",
397
+ "image/gif",
398
+ "image/webp",
399
+ "application/pdf",
400
+ "text/plain",
401
+ "text/markdown",
402
+ "text/csv"
403
+ ]),
404
+ maxFilesPerMessage: c().int().positive().max(10).optional().default(5),
405
+ maxFilesPerChat: c().int().positive().max(50).optional().default(20)
406
+ }), Q = s({
407
+ zeroDataRetention: f().default(!0),
408
+ disallowPromptTraining: f().default(!0),
409
+ providerTimeoutMs: c().int().min(1e3).max(789e3).optional()
410
+ }), Me = s({ enabled: f().default(!1) }), Ne = /* @__PURE__ */ function(e) {
411
+ return e.Off = "off", e.Shadow = "shadow", e.Active = "active", e;
412
+ }({}), Pe = s({ mode: d(Ne).default(Ne.Off) }), Fe = s({
413
+ enabled: f().default(!1),
414
+ voiceId: g().optional(),
415
+ language: g().min(2).max(5).default("it"),
416
+ maxSessionSeconds: c().int().min(30).max(3600).default(600),
417
+ cascadeTimeoutSeconds: c().min(1).max(15).default(15).transform((e) => Math.max(5, e)),
418
+ fillerAfterSeconds: c().min(.5).max(8).optional(),
419
+ fillerMessage: g().max(200).optional(),
420
+ ignoreBackgroundVoices: f().default(!0),
421
+ turnEagerness: d([
422
+ "patient",
423
+ "normal",
424
+ "eager"
425
+ ]).default("normal"),
426
+ turnTimeoutSeconds: c().min(1).max(30).default(5),
427
+ firstMessage: g().max(300).optional(),
428
+ providerAgentId: g().optional(),
429
+ providerSecretId: g().optional(),
430
+ providerApiKeyId: g().optional()
431
+ }), Ie = s({ enabled: f() });
432
+ s({
433
+ chatId: g().min(1).optional(),
434
+ deviceContext: b.optional(),
435
+ externalContext: m(g(), h()).optional()
436
+ });
437
+ var Le = s({
438
+ sessionId: g(),
439
+ signedUrl: g(),
440
+ providerAgentId: g(),
441
+ chatId: g(),
442
+ maxSessionSeconds: c().int()
443
+ }), Re = s({
444
+ voiceId: g(),
445
+ name: g(),
446
+ category: g().optional(),
447
+ previewUrl: g().optional(),
448
+ labels: m(g(), g()).optional()
449
+ });
450
+ n(Re);
451
+ var ze = s({
452
+ model: Ae,
453
+ interface: X,
454
+ tools: W.optional().default(() => W.parse({})),
455
+ fileUpload: Z.optional().default(() => Z.parse({})),
456
+ gatewayOptions: Q.optional().default(() => Q.parse({})),
457
+ channels: n(d(J)).optional().default(() => [...Y]),
458
+ externalContextSchema: te.optional(),
459
+ openaiApi: Me.optional().default(() => Me.parse({})),
460
+ voice: Fe.optional().default(() => Fe.parse({})),
461
+ toolWorkingSet: Pe.optional().default(() => Pe.parse({}))
462
+ }), Be = s({
463
+ rateLimits: s({
464
+ minuteRateLimit: c().int().min(0).optional(),
465
+ hourRateLimit: c().int().min(0).optional(),
466
+ dayRateLimit: c().int().min(0).optional(),
467
+ monthRateLimit: c().int().min(0).optional()
468
+ }),
469
+ trustedOrigins: s({ origins: n(t().or(o(""))).overwrite((e) => e?.filter((e) => e?.trim())).default([]) }).default({ origins: [] })
470
+ });
471
+ s({
472
+ id: g().optional(),
473
+ name: g(),
474
+ prompt: g().optional(),
475
+ model: g().optional(),
476
+ fallbackModels: n(g()).default([]),
477
+ status: d(T).default(T.Draft),
478
+ visibility: d(E).default(E.Organization),
479
+ settings: ze,
480
+ security: Be.nullish(),
481
+ type: d(D).default(D.Chat),
482
+ organizationId: g()
483
+ }), a(() => s({
484
+ id: g(),
485
+ name: g(),
486
+ prompt: g(),
487
+ model: g(),
488
+ fallbackModels: n(g()).nullable().default([]),
489
+ status: d(T).default(T.Draft),
490
+ visibility: d(E).default(E.Organization),
491
+ settings: ze,
492
+ security: Be.nullable(),
493
+ type: d(D).default(D.Chat),
494
+ organizationId: g(),
495
+ createdAt: p(),
496
+ createdBy: g(),
497
+ updatedAt: p(),
498
+ updatedBy: g(),
499
+ deleted: f(),
500
+ deletedAt: p().nullable(),
501
+ deletedBy: g().nullable(),
502
+ outOfBudget: f().optional().default(!1),
503
+ outOfBudgetReason: g().optional().default("")
504
+ }));
505
+ var Ve = s({
506
+ id: g(),
507
+ name: g(),
508
+ status: d(T),
509
+ visibility: d(E),
510
+ organizationId: g(),
511
+ interface: X,
512
+ createdAt: p(),
513
+ updatedAt: p(),
514
+ capabilities: s({
515
+ fileUpload: Z,
516
+ voice: Ie
517
+ }),
518
+ channels: n(d(J)).default(() => [...Y])
519
+ }), He = X.pick({
520
+ logo: !0,
521
+ mainColor: !0,
522
+ textColor: !0,
523
+ theme: !0,
524
+ floatingButtonPosition: !0,
525
+ customCss: !0
526
+ }), Ue = Ve.pick({
527
+ id: !0,
528
+ name: !0,
529
+ organizationId: !0
530
+ }).extend({ interface: He }), We = s({
531
+ emailPassword: f(),
532
+ google: f(),
533
+ microsoft: f()
534
+ }), Ge = s({
535
+ requiresAuth: o(!1),
536
+ agent: Ve,
537
+ branding: l()
538
+ }), $ = s({
539
+ requiresAuth: o(!0),
540
+ agent: l(),
541
+ branding: Ue
542
+ });
543
+ u("requiresAuth", [Ge, $]), u("requiresAuth", [Ge.extend({ authMethods: We }), $.extend({ authMethods: We })]), s({
544
+ id: e(),
545
+ agentIds: n(e())
546
+ }), s({
547
+ ...y.pagination(),
548
+ ...y.sort([
549
+ "id",
550
+ "updatedAt",
551
+ "createdAt",
552
+ "name",
553
+ "type",
554
+ "status",
555
+ "visibility",
556
+ "model"
557
+ ]),
558
+ ...y.filters(["done", "type"]),
559
+ ...y.filter("id"),
560
+ ...y.fullText(),
561
+ ...y.ids()
562
+ });
563
+ //#endregion
564
+ export { O as a, Se as c, x as d, C as f, y as h, I as i, we as l, _ as m, Q as n, B as o, b as p, G as r, Le as s, L as t, Ee as u };
565
+
566
+ //# sourceMappingURL=Agent-DK76k05_.js.map